Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
virtualisation:start [2018/07/24 14:09]
preisig [Integrating Software into a Container]
virtualisation:start [2024/02/22 14:43] (current)
juraschek [Example Containers]
Line 31: Line 31:
 =====  Devices ===== =====  Devices =====
  
-What Devices ​can be mapped ​into LXC+Depending on the extension modules you do have in your router, there is the possibility of passing the device into the container. This way you can make the hardware available for the system running in your container. Common use cases are CAN or Bluetooth modules. The devices that are available to map into the container are automatically shown on the webgui. Here is an exmample with bluetooth available. 
 + 
 +{{:​virtualisation:​virt.png?​500|}} 
 + 
 + 
 +==== Serial-Interface ​ ==== 
 + 
 + ​Serial-Interfaces can be also used inside of the lxc Container please check the page [[virtualisation:​serial-interface|]] for details.
  
 =====  Networking ===== =====  Networking =====
Line 39: Line 46:
 Generally you can either create a routed interface, where you set your own IP settings that will connect the router (through a virtual interface, virt0) to the guest interface of your cotnainer. The other option is that you bridge the containers interface to an existing one on the router. ​ Generally you can either create a routed interface, where you set your own IP settings that will connect the router (through a virtual interface, virt0) to the guest interface of your cotnainer. The other option is that you bridge the containers interface to an existing one on the router. ​
  
 +If you are using a routed interface please be sure you networking file is setting the ethernet interface into manual mode and not dhcp: 
  
 +Example on an alpine guest: ​
 +
 +Default in alpine template from linuxcontainers:​
 +<​konsole>​
 +/ $ cat /​etc/​network/​interfaces ​
 +auto eth0
 +iface eth0 inet dhcp
 +hostname $(hostname)
 +/ $
 +</​konsole>​
 + 
 +Need to be switched to 
 +
 +<​konsole>​
 +/ $ cat /​etc/​network/​interfaces ​
 +auto eth0
 +iface eth0 inet manual
 +hostname $(hostname)
 +/ $
 +</​konsole>​
  
-Routed and Bridged Interfaces -> Detailed Subpage 
  
-====== Examples ====== 
  
-Generic ​ 
  
 ===== Container Templates ===== ===== Container Templates =====
Line 55: Line 80:
 The following list contains some generic OS based Containers, that are available through our ftp server: The following list contains some generic OS based Containers, that are available through our ftp server:
  
-  * Ubuntu Bionic Beaver 18.04 LTS (armhf) / md5sum: f91b9f6ff431fdc01194bc100fde296f / [[ftp://public:​public@share.netmodule.com/​virt/​ubuntu_bionic.tar.xz|Download]] +  * Ubuntu Bionic Beaver 18.04 LTS (armhf) / md5sum: f91b9f6ff431fdc01194bc100fde296f / [[https://​share.netmodule.com/​router/​public/​virt/​ubuntu_bionic.tar.xz|Download]] 
-  * Debian Stretch (armhf) / md5sum: 6b716a50df69404dfe54f61021374008 / [[ftp://public:​public@share.netmodule.com/​virt/​debian_stretch.tar.xz|Download]] +  * Debian Stretch (armhf) / md5sum: 6b716a50df69404dfe54f61021374008 / [[https://​share.netmodule.com/​router/​public/​virt/​debian_stretch.tar.xz|Download]] 
-  * Debian Jessie (armhf) / md5sum: b3907135c41721a70cfbd72cc2873cda / [[ftp://public:​public@share.netmodule.com/​virt/​debian_jessie.tar.xz|Download]] ​  +  * Debian Jessie (armhf) / md5sum: b3907135c41721a70cfbd72cc2873cda / [[https://​share.netmodule.com/​router/​public/​virt/​debian_jessie.tar.xz|Download]] ​  
-  * Alpine Linux 3.8 (armhf) / md5sum: 80bfd7775c48757d37124c844b88d5e9 / [[ftp://public:​public@share.netmodule.com/​virt/​alpine_3.8.tar.xz|Download]] ​+  * Alpine Linux 3.8 (armhf) / md5sum: 80bfd7775c48757d37124c844b88d5e9 / [[https://​share.netmodule.com/​router/​public/​virt/​alpine_3.8.tar.xz|Download]] ​
  
  
Line 65: Line 90:
  
 Here are some ready to use containers and descriptions about the setup: Here are some ready to use containers and descriptions about the setup:
 +  * [[virtualisation:​bluetooth|Bluetooth within a container]]
 + {{ :​virtualisation:​virt_logo_bluetooth.jpg?​200 }}
 + * [[https://​share.netmodule.com/​router/​public/​virt/​debian_jessie_bluetooth.tar.xz|Download]] - md5sum: b3907135c41721a70cfbd72cc2873cda
  
   * [[virtualisation:​file-server|File Server (samba, vsftpd, net2ftp & file transfer possibilites via usb)]]   * [[virtualisation:​file-server|File Server (samba, vsftpd, net2ftp & file transfer possibilites via usb)]]
- * [[ftp://​share.netmodule.com/​router/​public/​virt/​debian_stretch_ftp_samba_net2ftp.tar.xz|Download]] - md5sum: efbf0e0f0bc6b3d4e1c2a55127b762e0+{{ :​virtualisation:​samba_einbinden_windows_6.png?​200 |}} 
 + * [[https://​share.netmodule.com/​router/​public/​virt/​debian_stretch_ftp_samba_net2ftp.tar.xz|Download]] - md5sum: efbf0e0f0bc6b3d4e1c2a55127b762e0
  
   * [[[[virtualisation:​dlna|ReadyMedia DLNA server]]   * [[[[virtualisation:​dlna|ReadyMedia DLNA server]]
- * [[ftp://​share.netmodule.com/​router/​public/​virt/​debian_stretch_ftp_samba_net2ftp_readymedia.tar.xz|Download]] - md5sum: 7d520cbf4ac55a7484e80deebfc67a26+ {{ :​virtualisation:​readymedia_statusseite.png?​200 ​ }} 
 + 
 + * [[https://​share.netmodule.com/​router/​public/​virt/​debian_stretch_ftp_samba_net2ftp_readymedia.tar.xz|Download]] - md5sum: 7d520cbf4ac55a7484e80deebfc67a26
  
   * [[virtualisation:​plex|Plex Media server]]   * [[virtualisation:​plex|Plex Media server]]
- * [[ftp://​share.netmodule.com/​router/​public/​virt/​debian_stretch_ftp_samba_net2ftp_plex.tar.xz|Download]] - md5sum: df26b99fb333f5baf53d6239bb0d2530+{{ :​virtualisation:​pms_setup_1.png?​200 }} 
 + * [[https://​share.netmodule.com/​router/​public/​virt/​debian_stretch_ftp_samba_net2ftp_plex.tar.xz|Download]] - md5sum: df26b99fb333f5baf53d6239bb0d2530
  
   * [[virtualisation:​media-portal|Emby Media server]]   * [[virtualisation:​media-portal|Emby Media server]]
- * [[ftp://​share.netmodule.com/​router/​public/​virt/​debian_stretch_ftp_samba_net2ftp_emby.tar.xz|Download]] - md5sum: 35658e3cb6de96efe9e42379a5eaa976+{{ :​virtualisation:​emby-setup_1.png?​200 ​ }} 
 + * [[https://​share.netmodule.com/​router/​public/​virt/​debian_stretch_ftp_samba_net2ftp_emby.tar.xz|Download]] - md5sum: 35658e3cb6de96efe9e42379a5eaa976
  
   * [[virtualisation:​nextcloud|Nextcloud]]   * [[virtualisation:​nextcloud|Nextcloud]]
- * [[ftp://​share.netmodule.com/​router/​public/​virt/​debian_stretch_nextcloud13.tar.xz|Download]] - md5sum: 5bb1a90637ae5f1c46a0d994c8785a38+ {{ :​virtualisation:​nc-setup.jpg?​200 }} 
 + * [[https://​share.netmodule.com/​router/​public/​virt/​debian_stretch_nextcloud13.tar.xz|Download]] - md5sum: 5bb1a90637ae5f1c46a0d994c8785a38
  
   * [[app-notes:​webvpn-secure-https-portforwardings-for-unsecure-http-devices|Traefik reverse proxy]]   * [[app-notes:​webvpn-secure-https-portforwardings-for-unsecure-http-devices|Traefik reverse proxy]]
- * [[ftp://​share.netmodule.com/​router/​public/​virt/​alpine_3.7_traefik.tar.xz|Download]] - md5sum: 63ba17029d2db8f62f981874eb4fe3b8+   {{ :​virtualisation:​virt_logo_traefik.jpg?​200 ​ }} 
 + * [[https://​share.netmodule.com/​router/​public/​virt/​alpine_3.7_traefik.tar.xz|Download]] - md5sum: 63ba17029d2db8f62f981874eb4fe3b8
  
 +
 + *  [[virtualisation:​pihole_lxc_container|pi-hole]]
 ===== Integrating Software into a Container ===== ===== Integrating Software into a Container =====
  
-The link below describes hello-world examples in different languages and how they could be setup within a container. Normally you need to install the required environment first to be able to write or run software. Depending on your base-image this includes the interpreter as well as software libraries +The link below describes hello-world examples in different languages and how they could be setup within a container. Normally you need to install the required environment ​(interpreter & libraries) ​first to be able to write & compile code.
  
 [[virtualisation:​integrating-software|Integrating Software]] [[virtualisation:​integrating-software|Integrating Software]]
Line 93: Line 130:
 ====== Lifecycle ====== ====== Lifecycle ======
  
-Overview of typicle "​Duties"​ during ​lifecycle: ​ CreatingProvision, Installing, Updating +The topics below show brief introduction on ideas about provisioninginstalling and maintaining containers. Please be aware that the containers are supposed to run on our routers and therefore provisioning and maintenance is a task that you have to think of and adapt to your environment. However there are a lot of different approaches that you can use from complex build-chains to simplified shell-scripts. ​
  
 ===== Provisioning ===== ===== Provisioning =====
  
-Possibilites ​of Provisioning ​Container _-> new Wiki page +If you do run a large amount ​of different containers provisioning currently needs to be done by you. Since this is currently not supported on our devices as they provide the runtime environment. There are lot of options like Ansible, Puppet, Chef or others that could help you setup your containers. In a smaller environment you could just use a shell script, that your run after unpacking you base-image to provision your container and then deploy the packed archive. Put your packed and compressed archive on a WebServer or FTP of yours and use the automated installation on the router to extract your archive to the system. ​
 ===== Installing ===== ===== Installing =====
 +
 +Setting up a container can either be done automatically via the WebGui or manually via Shell. The link below shows you how to get your image onto a router. ​
 +
 [[How to setup a container]] [[How to setup a container]]
  
Line 106: Line 144:
 ===== Maintaining Containers ===== ===== Maintaining Containers =====
  
 +Maintaining containers could be done over shell scripts, excecuted via ssh remotly on the routers for small updates or even manually per container. When your fleet and amount of containers grow in size you might think of a plan to regularily release tested and provisioned containers that you could then download over the web from a central side to your routers (via automated install option). ​