Docker Swarm is a native clustering tool for Docker containers that can be used to manage a cluster of Docker nodes as a single virtual system. Docker Swarm allows you to add or subtract container iterations as computing demands change. Docker Swarm consists of two main components Manager node and Worker node. Manager node used for handling cluster management tasks such as, maintaining cluster state, scheduling services and serving swarm mode HTTP API endpoints. Worker node is a instance of Docker engine that can be used to execute container. The Swarm manager allows you to create a primary manager instance and multiple replica instances in case the primary instance fails. You can deploy manager and worker nodes at runtime in Docker engine's Swarm mode.
In this tutorial, we will go through the step by step instruction on configuring three node Docker Swarm cluster on CentOS 7.
First, Login to your Alibaba Cloud ECS Console. Create a new ECS instance, choosing CentOS 7 as the operating system with at least 2GB RAM. Connect to your ECS instance and log in as the root user.
Once you are logged into your CentOS 7 instance, run the following command to update your base system with the latest available packages.
yum update -y
Before starting, you will need to configure /etc/hosts file on each node, so each node can communicate with each other by hostname.
You can update the /etc/hosts file on each node as shown below:
nano /etc/hosts
192.168.0.102 managernode
192.168.0.103 workernode1
192.168.0.104 workernode2
Save and close the file when you are finished.
Next, you will need to configure hostname on each node as per /etc/hosts file.
You can refer to How to Install and Configure Docker Swarm Mode on CentOS 7 to get the following steps.
Docker is a favorite container amongst DevOps practitioners. Nearly every tech company - and a not-insignificant number of non-tech companies - use Docker in some fashion or another.
Due to the portability, flexibility, and maintainability of containers, it's no surprise that Docker is a favorite amongst DevOps practitioners. Nearly every tech company—and a not-insignificant number of non-tech companies—use Docker in some fashion or another.
There are many different ways to run Docker. But if you’re looking for an easy solution for getting up and running with Docker containers without having to do much setup and management yourself, Alibaba Container Service is a good solution. This article shows how to get started using Alibaba Container Service.
Thanks to the growing ubiquity of Docker, I took a look at how to spin up a production-ready Docker environment with Alibaba Container Service. To get started with the Alibaba Container Service, the first thing we must do is create a new Docker Cluster. To do this, head on over to the Alibaba Container Service dashboard by clicking on the Container Service button within your Alibaba Cloud Console. I should note here that, if this is your first time accessing the Alibaba Container Service, you will be asked to activate it. All this step does is ask you to agree to the terms and conditions of the service, and does not incur any charges to your account.
Once you've activated the service, you will be taken to the Container Service Overview. This page will present you with the option to create a cluster using a button helpfully labeled "Create Cluster." Clicking on it will take you to a page that allows you to select all of the information required to spin up a new container cluster.
In this tutorial, you will learn how to manage and monitor Docker containers, images, and networks running on ECS instances using Dry.
Dry is a simple terminal application to manage and monitor Docker containers, which gives detailed information about Nodes, Service, Stacks and Swarm constructs. You can easily start and stop Docker containers, remove Docker images, and monitor real-time container processes by using Dry.
In this tutorial, we will learn how to install Dry on an Alibaba Cloud Elastic Compute Service (ECS) instance that is installed with Ubuntu 16.04. We will also learn how to use Dry to manage and monitor Docker containers, images, and networks.
To manage and monitor Docker containers with Dry, follow these steps:
First, log on to your Alibaba Cloud ECS Console. Then, create a new ECS instance with Ubuntu 16.04 as the operating system and with at least 2GB RAM. Last, connect to your ECS instance and log on as the root user.
After you are logged on to your Ubuntu 16.04 instance, run the following command to update your base system with the latest available packages.
apt-get update -y
This set of tutorials focuses on giving you practical experience on using Docker Compose when working with containers on Alibaba Cloud Elastic Compute Service (ECS). This tutorial focuses on you using the shell a lot: interactively exciting.
After you completed this set of 5 tutorials you can spend time reading the official Docker Compose documentation: https://docs.docker.com/compose/compose-file/. Everything will make a lot more sense since you now have actual practical (simple) experience with most of the Docker Compose instructions.
Part 1 of 5 demonstrates several docker-compose configuration options that can be explored in isolation. Every separate heading section below explores just ONE docker-compose option - making the config files very short and very easy to understand.
Let's get started.
You need access to a server/VPS with a recent version of Docker already installed. In this tutorial, I will be using an Alibaba Cloud Elastic Compute Service (ECS) instance with CentOS and Docker.
You don't need to purchase a large instance to follow this tutorial. Even when swarms of 6 containers are running in later tutorials you still need a server with only a total RAM of 512MB.
Although I am writing this tutorial using CentOS, you can also use Debian or Ubuntu. A large majority of this tutorial will work on any Linux distributions since it mostly uses Docker Compose commands.
You need a very basic understanding of Docker, images, containers and using docker-compose and docker ps -a. You need to have used docker-compose up around 3 times to roughly understand its concepts.
The purpose of this tutorial is to get you to docker-compose up several very simple docker compose files. Your understanding of Docker compose concepts will grow as you use it.
This course aims to help IT companies who want to container their business applications, and cloud computing engineers or enthusiasts who want to learn container technology and Swarm. By learning this course, you can fully understand what a Swarm is, some key concepts of Swarm, the basic architecture of Swarm, why we need Swarm, and the basic use of Alibaba Cloud Container Service for Swarm, so as to provide reference for the evaluation, design and implementation of application containerization.
This course is associated with Introduction to Docker Container. You must purchase the certification package before you are able to complete all lessons for a certificate.
After December 31, 2019, Alibaba Cloud will no longer provide technical support for Container Service Swarm. However, you can continue to use Container Service Kubernetes and enjoy stable and reliable enterprise-class services. We recommend that you migrate your applications in advance according to the following information:
For information about how to migrate applications from Swarm clusters to Kubernetes clusters, see Migration solution overview.
Chef is an automated deployment framework. Combined with Alibaba Cloud Container Service, Chef can help you achieve customization and automation in your deployment. Log on to the Chef official website first to learn about basic terms for quick start, such as cookbook, recipe, chef workstation, chef server, and chef nodes.
Through the introduction of Docker, Swarm and Alibaba Cloud Swarm, this course enables learners to quickly get started with Container Service for Swarm.
This course is aiming to provide comprehensive introduction of docker container technology and the container service on alibaba cloud as well.
A fully-managed service compatible with Kubernetes to help users focus on their applications rather than managing container infrastructure
Container Registry allows you to manage images throughout the image lifecycle. It provides secure image management, stable image build creation across global regions, and easy image permission management. This service simplifies the creation and maintenance of the image registry and supports image management in multiple regions. Combined with other cloud services such as Container Service, Container Registry provides an optimized solution for using Docker in the cloud.
2,599 posts | 762 followers
FollowAlibaba Clouder - July 2, 2020
Alibaba Clouder - June 11, 2020
Alibaba Clouder - February 12, 2019
Tran Phuc Hau - April 23, 2023
Alibaba Clouder - January 24, 2019
Alibaba Clouder - March 21, 2019
2,599 posts | 762 followers
FollowAlibaba Cloud Container Service for Kubernetes is a fully managed cloud container management service that supports native Kubernetes and integrates with other Alibaba Cloud products.
Learn MoreConduct large-scale data warehousing with MaxCompute
Learn MoreMore Posts by Alibaba Clouder