Creating a Swarm Cluster on On-premises VirtualBox
To create a Swarm cluster:
- Navigate to the folder
docker-deploy/onprem/swarm/manifest-onprem-swarm.
Put all the Mashery Local images in this folder that you downloaded earlier and follow the steps below. Also make sure your docker client is configured to communicate with swarm manager. In this case, execute the following:
eval "$(docker-machine env master)"
Note: If you built the Mashery Local images using tml-installer, copy those images from that build machine to this location on deployment host. If your build and deployment host are the same, you can copy those images from tml-installer container into this location using the following example Docker cp command (assuming build no 1):docker cp tml-installer:/var/jenkins_home/jobs/build_docker/builds/1/archive/tmgc-docker/tml-nosql.tar.gz . docker cp tml-installer:/var/jenkins_home/jobs/build_docker/builds/1/archive/tmgc-docker/tml-sql.tar.gz . docker cp tml-installer:/var/jenkins_home/jobs/build_docker/builds/1/archive/tmgc-docker/tml-log.tar.gz . docker cp tml-installer:/var/jenkins_home/jobs/build_docker/builds/1/archive/tmgc-docker/tml-cm.tar.gz . docker cp tml-installer:/var/jenkins_home/jobs/build_docker/builds/1/archive/tmgc-docker/tml-cache.tar.gz . docker cp tml-installer:/var/jenkins_home/jobs/build_docker/builds/1/archive/tmgc-docker/tml-tm.tar.gz .
- Execute the following command.
./create-local-swarm-cluster.sh
This creates a local swarm cluster consisting of 1 master node, which is Swarm manager also, and a worker node (node-1). - Configure Docker client to talk to Swarm manager on the current working terminal.
eval "$(docker-machine env master)"
- Verify that cluster is created successfully by running the following command. Status should be ready for all the nodes. Do not proceed until all the nodes are in active status.
docker node ls
- Run the following command to load the Mashery Local images on each machine.
./load-images.sh
- If the Swarm cluster is created successfully, create an Overlay network
ml5 for the containers networking. Execute below on manager node.
docker network create -d overlay --attachable ml5
Copyright © Cloud Software Group, Inc. All rights reserved.