Swarm Stack local-with-out-proxy

Before using these make sure you had clone the repository by:

git submodule update --init --recursive

Now let’s go..

(*) All Open Sources

Services Software
GUI Control Portainer
Central Monitoring Promotheus + Grafana
Central Logging Elastic ELK
Layer 7 Proxy  
Storage Local File System
Networking Docker Swarm Overlay
Orchestration Docker Swarm
Runtime Docker CE
Machine and OS Docker Machine + VirtualBox

You have 2 way to deploy it:

- The fast way by launch the ansible workbook, just type:

    ansible-playbook -i ansible/swarm/local-inventory ansible/swarm/local-with-out-proxy.yml
    # NOTE: that will take around 5 minutes

- Or the long way but where you can learn every step ...

Learn every step to deploy the swarm local-with-out-proxy

1/ Create the Machine:

./utils2devops/bin/docker-machine-cluster.sh -c 5
You can go to see the doc of this tools here Create your local cluster of docker-machine
Here we will create a swarm with 5 machines

2/ Enable monitoring (optional):

./utils2devops/bin/enable-monitoring.sh -p ./utils2devops/docker/ -n 5

3/ Create the Docker Swarm:

./utils2devops/bin/swarm.sh -c -m 3 -w 2
You can go to see the doc of this tools here Add local nodes in docker-machine
Here we will create a swarm with 3 manager and 2 worker

4/ Launch docker command in the Master:

eval "$(docker-machine env node-1)"

5/ Deploy Ops Stacks Graphics UI (optional):

export PORTAINER_HOST=portainer.example.com
docker stack deploy -c ./utils2devops/docker/local-with-out-proxy/portainer.yml portainer

After these steps we will have a Portainer at:

Portainer at:
and so many other... have a look here https://www.portainer.io/overview/

6/ Deploy Ops Stacks:

docker stack deploy -c ./submodules/swarmprom/docker-compose.yml prom
docker stack deploy -c ./utils2devops/docker/local-with-out-proxy/elk.yml elk

After these steps we will have

Grafana login at:
Grafana Swarm nodes at:
Grafana Swarm Services at:
Promotheus Stat at:
Promotheus Query at::
Alert manager at:
Alert Dashboard at:
Elasticsearch at:
kibana at:
and much more have a look at https://github.com/stefanprodan/swarmprom

Now it’s ready to deploy your apps and test them:

docker stack deploy my_company/my_services my_service

When you have finish to use it, Destroy it by:

./utils2devops/bin/docker-machine-cluster.sh -d 5