Section | ||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Installation
Ensure that you got
docker-compose
installed.Code Block root@ubuntu:~# which docker-compose /usr/local/bin/docker-compose root@ubuntu:~# docker-compose -v docker-compose version 1.7.1, build 0a9ab35 root@ubuntu:~#
Extract the installation files
Code Block ~/Downloads ❯❯❯ unzip demoStack-1.0.6.zip ... inflating: demo/init_stack.sh
Execute
init_stack.sh
and follow the instructions. It will automatically pull the required images and files from the azeti repository and set up the basic system.Code Block ~/Downloads/demo ❯❯❯ ./init_stack.sh For this script to work, you need credentials for the DockerHub and you must have read access to the Azeti Organization! Enter DockerHub username and press [ENTER]:
Docker Stack Administration
The azeti Engine stack comes with a collection of administrative scripts which wrap around docker-compose
. Change into the demo directory to access the scripts.
Code Block |
---|
azeti@ubuntu:~/demo$ ll total 48 ... -rwxr-xr-x 1 azeti azeti 101 May 31 17:40 start_stack.sh* -rwxr-xr-x 1 azeti azeti 99 May 31 17:40 stop_stack.sh* -rwxr-xr-x 1 azeti azeti 915 May 31 17:40 update_stack.sh* |
Starting and Stopping
Use the start and stop script.
...
Code Block |
---|
azeti@ubuntu:~/demo$ sudo ./start_stack.sh Starting the full stack... Starting influxdb_data ... done Starting db_data ... done Starting db ... done Starting influxdb ... done ... |
Update
You can easily update the full stack with the script, it does a docker-compose pull ...
and fetches the latest application builds. Make sure to create backups before hand.
Code Block |
---|
azeti@ubuntu:~/demo$ sudo ./update_stack.sh Enter DockerHub username and press [ENTER]: Enter DockerHub password and press [ENTER]: Login Succeeded Stopping the full stack... Stopping sscdemo_tomcat_1 ... done Stopping sscdemo_activemq_1 ... done Stopping sscdemo_influxdb_1 ... done Stopping sscdemo_db_1 ... done Pulling tomcat (azeti/tomcat-data:latest)... latest: Pulling from azeti/tomcat-data 8b87079b7a06: Already exists .. Starting sscdemo_db_data_1 ...Starting activemq ... done Starting tomcat ... done |
Log Rotation
Docker will not rotate container logfiles automatically. This can cause high disk usages and large amount of log file data. Check with your Docker Administrator if any log rotation is already configured. Below is an easy approach (based upon this article) for regular rotation using logrotate.
- Create a new Logrotate config file in
/etc/logrotate.d/docker-container
Enter the below configuration
Code Block var/lib/docker/containers/*/*.log { rotate 7 daily compress size=1M missingok delaycompress copytruncate }
Start
logrotate
with the new configurationCode Block logrotate -fv /etc/logrotate.d/docker-container
Next Steps
Info | ||
---|---|---|
| ||
|