Microservices are revolutionizing how applications are developed and deployed. The microservice architecture augmented by containerization technology provided by Docker allows for flexibility, rapid iteration, high availability and more. The days of monolithic applications are coming to an end; in this lab you'll learn about container technology, and the integration of IBM API Connect with Docker Swarm to manage and deploy microservices.
- Setup atleast two networked host machines, preferably running Linux.
- Install Node.js and API Connect Toolkit
npm i -g apiconnect
- Install Docker Engine 1.12 or newer
- Ensure the following ports are open:
- TCP port 2377 for cluster management communications
- TCP and UDP port 7946 for communication among nodes
- UDP port 4789 for overlay network traffic
To stay organized, let's create a workspace and clone this repository:
mkdir ~/workspace
cd ~/workspace
git clone http://github.com/ibm-apiconnect/docker-swarm-lab.git
Run through each of the exercises sequentially - they should only take 5-10 min each.
- Exercise 1: Initialize Docker Swarm and Add Nodes to the Cluster
- Exercise 2: Deploy a Private Registry Service to the Swarm
- Exercise 3: Create an API Microservice
- Exercise 4: Dockerize your API microservice
- Exercise 5: Deploy your API Microservice to Docker Swarm
- Exercise 6: Load-balance your API Microservices with NGINX