Linux Media Delivery System Stack based on Docker and Raspberry Pi
Project goal is to simplify Docker and Docker-compose deployment on Raspberry Pi. LMDS will allow you to dynamically choose containers and automate their deployment. Create Docker server and start microservices in minutes with LMDS.
What is currently a part of the LMDS Stack:
Numbers after ":" identify a port that particular container will respond on, i.e. Portainer default port is :9000, point your browser it to your server IP adding :9000 at the end i.e. http://192.168.100.100:9000 you will see Portainer login page.
YouTube: https://youtu.be/oLxsSQIqOMw
Blog link: http://greenfrognest.com/lmdsondocker.php
Before you start using LMDS, set your Raspberry Pi IP address to be static, it will make some things easier later on. Static IP address is not absolutely necessary just to try the project to find out if you like it or not, but in case if you would like to properly utilize pi-hole in your network - you would have to point your router towards RPi IP for DNS resolution and having it static would be mandatory.
install git using a command:
sudo apt-get install git
Clone the repository with:
git clone https://github.com/GreenFrogSB/LMDS.git ~/LMDS
Do not change name of the folder on your local system it should stay as is for the script to work properly
cd ~/LMDS
./deploy.sh
First "Install Docker & Docker-compose" this might take a while. Script will install Docker and Docker-compose. When installation is completed you will be prompted to reboot, please do so before continuing.
### Build LMDS Stack
Next "Build LMDS Stack", select docker containers that you would like to pull and deploy. You do not have to select them all, select only the one you will use. You can add or remove your selection later on if needed. Selecting only containers you need will reduce RAM consumption on your Pi what might be a problem on RPi 3 that has only 1GB or RAM
You might want to install Portainer among all the other containers for sure - Portainer is a graphical interface that lets you manage Docker engine - very useful tool if you don’t want to use Docker command Line interface.
### Docker commandsThis small section contains few useful commands in case of Portainer is not available (stop working) and you would like to get something done without the GUI.
### Miscellaneous commands.There are three scripts that could be used in case you would like to disable swapping to your SD card. You might want to do this in order to extend life of your SD card. SD cards were not designed for intensive IO tasks, therefore using them like normal HDDs is not ideal. Swap file is used to offload your RAM in case of OS wanting to dump it somewhere. Swap will be quite often modify, what might wear out your SD card in a long run. In other hand if your OS is swapping it means his RAM size is generally to small - this might be a case on RPi3 where we have only 1GB of RAM.
### Update LMDS StackEach time you run ./deploy.sh
script will check GitHub repository for any updates and download them if available. You can also manually check for update using this option. Updates will not modify your configuration or any private files except the ones that are part of the LMDS logic. Some new functions might be added or new containers etc.
Debian based distribution is not always first to adopt latest Docker-compose updates and even if you keep your system up to date issuing apt-get update $ upgrade you will find out that your Docker-compose version is sometimes quite out of date. This option is specifically created to target Docker-compose updates to be done as easily as possible. Script is removing current Docker-compose and utilizing PIP Install newest available published by Docker-compose guys independently from what is available in Debian repository.
### Backup and Restore LMDSThis option will let you backup LMDS config and store it locally or in the cloud. Local backup is great for small changes that you are not sure of, so you can recover from failure quickly. Backup can be also configured to go in to the cloud i.e. Google Drive, Amazon, DropBox etc. This is great in case you would like to migrate or completely wipeout current SD card but in the same time you would like easily recover LMDS in to new OS installation.