Deploy Docker Swarm at Oracle Cloud with Oracle Linux 7

With the announce of the availability of Docker CE for Oracle Linux I decide to makes this series of 6 short videos on how to deploy Docker Swarm at Oracle Cloud using Cloud API, see my other blog post at Managing Oracle Cloud IaaS — The API way for more details, as I mentioned in other posts I love Docker Swarm as orchestration services basically because is Docker native implementation, is based on command line and is faster than others as is described in #SWARMWEEK: DOCKER SWARM EXCEEDS KUBERNETES PERFORMANCE AT SCALE

Step 0, define environment variable to login at Oracle Cloud using API:

export API_URL=”https://api-z49.compute.us6.oraclecloud.com/"
export IDNTTY=arfcex
export USR_LOGIN=mochoa@slab.exa.unicen.edu.ar
curl -i -X POST -H “Content-Type: application/oracle-compute-v3+json” -d ‘{“user”:”Compute-$IDNTTY/$USR_LOGIN”,”password”:” — — — -”}’ “$API_URL”authenticate/
— — — Authorization token is output here copy paste below
export COMPUTE_COOKIE=”nimbula=………; Path=/; Max-Age=1800"

Step 1, create storage (boot disk associated to Oracle Linux 7 image, repository disk which will be formatted with XFS file-system), script used deploy-storage-ol7.sh (put YouTube player in HD resolution to see texts)

Step 2, deploy nodes (instances) using Oracle Linux 7 as base image, script executed deploy-nodes-ol7.sh

Step 3, edit your cloud.host file with the public IPs assigned to the new cloud instances

Step 4, installing Docker CE on Oracle Linux 7, script deploy-docker-ol7.sh

Step 5, create docker-machine associations to manage these docker nodes from your Linux command line, note that there is hack at the script deploy-machines-ol7.sh which is executed if docker-machine fails to communicate with the node, this suppose to be fixed in newer implementations of docker-machine provision tool for ol7, see changes added at /etc/sysconfig/docker-network file.

Step 6, deploy Docker Swarm at Oracle Cloud using docker-machine tool, at this point We are operating with nodes at Oracle Cloud using TLS security, Swarm is easy to configure by executing native docker commands, also this script works with any deployment installation such as Oracle Linux or Ubuntu

Testing your Swarm Cluster, at this point as an example of Swarm cluster usage We will deploy an Elastic Search cluster, a Portainer.io monitoring tool for Docker/Swarm and Cerebro monitoring tool

Finally See you cluster in action, Visualize with Docker Swarm Visualizer, scale up/down ElasticSearch nodes using Portainer.io tool and see how they are added automatically using Cerebro.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store