Docker

Principe :

Modélisation :

Implémentation :

Installation :

Architecture Docker & Swarm

sudo apt install -y libwww-perl curl htop iotop iftop
#installation docker UBUNTU
sudo apt install -y software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add –
sudo add-apt-repository « deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable »
sudo apt-get clean
sudo apt-get update
sudo apt-cache policy docker-ce
sudo apt-get install -y docker-ce
sudo systemctl status docker
sudo usermod -aG docker ${USER}
sudo su – ${USER}
sudo id -nG

docker run -d –restart always –privileged -h docker.lambdaprod.com –name Portainer –label Portainer -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v Portainer_data:/data -d portainer/portainer
docker run -d –restart always -h registry.lambdaprod.com –name Registry –label Registry -v Registry_data:/var/lib/registry registry:2
docker run -d –restart always -h influxdb.lambdaprod.com –name InfluxDB –label InfluxDB -p 8086:8086 -p 8083:8083 -v Influxdb_data:/var/lib/influxdb influxdb
docker run -d –restart always -h mongo.lambdaprod.com –name Mongo –label Mongo -v Mongo_data:/data/db -v Mongo_data:/data/configdb mongo:3
docker run -d –restart always -h mysql.lambdaprod.com –name MySQL –label MySQL -v MySQL_data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=[PASWWORD] mysql
docker run -d –restart always -h elasticsearch.lambdaprod.com –name ElasticSearch –label ElasticSearch -p 9200:9200 -p 9300:9300 -v Elasticeearch_data:/data -v Elasticeearch_data:/usr/share/elasticsearch/data –security-opt seccomp=unconfined -e « http.host=0.0.0.0 » -e « xpack.security.enabled=false » -e ES_JAVA_OPTS=’-Xms2g -Xmx2g’ -d docker.elastic.co/elasticsearch/elasticsearch:5.6.2

docker run -d –restart always -h grafana.lambdaprod.com –name Grafana –label Grafana -v Grafana_data:/var/lib/grafana -v Grafana_data:/var/log/grafana -e « GF_SECURITY_ADMIN_PASSWORD=[PASWWORD]! » grafana/grafana
docker run -d –restart always -h graylog.lambdaprod.com –name Graylog –link Mongo -p 12201:12201 -p 514:514 -p514:514/udp -p1514:1514/udp -v Graylog_data:/data -v Graylog_data:/usr/share/graylog/data -e GRAYLOG_WEB_ENDPOINT_URI= »http://172.17.0.10:9000/api » -e ES_JAVA_OPTS=’-Xms2g -Xmx2g’ -e JVM_HEAPSIZE=’-Xms2g -Xmx2g’ -e GRAYLOG_SERVER_JAVA_OPTS=’-Xms2g -Xmx2g -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:NewRatio=1 -XX:MaxMetaspaceSize=512m -server -XX:+ResizeTLAB -XX:+UseConcMarkSweepGC -XX:+CMSConcurrentMTEnabled -XX:+CMSClassUnloadingEnabled -XX:+UseParNewGC -XX:-OmitStackTraceInFastThrow’ -d graylog/graylog:2.4
docker run -d –restart=always -h rb.lambdaprod.com –name Registry-Browser –label Registry-Browser -e DOCKER_REGISTRY_URL=http://registry.lambdaprod.com klausmeyer/docker-registry-browser

docker run -d –restart=always -h wordpress.lambdaprod.com –name WordPress –label WordPress -v WordPress_data:/var/www/html -e WORDPRESS_DB_PASSWORD=[PASWWORD] ! -e WORDPRESS_DB_HOST=172.17.0.6 wordpress

 

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Translate »