Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Server \ How to use the Docker Machine cluster deployment Swarm     - Linux Platform Oracle 11g Single Instance Installation Deployment Configuration Quick Reference (Database)

- C # Future: Method Contract (Programming)

- Nginx server load balancing dual-system availability (Server)

- How linux network security configuration (Linux)

- Bootable ISO image using GRUB (Linux)

- How to build Mono 3.4.0 / 3.4.1 on Windows (Linux)

- Ubuntu server 8.04 Firewall Guide (Linux)

- RAID configuration and management under linux (Server)

- MariaDB 10.1 and MySQL 5.7 in general performance on commodity hardware (Database)

- VirtualBox installation enhancements let the mouse move and share CentOS 6.4 (Linux)

- cursor_sharing induced error ORA-00600 (Database)

- Security of data to create a safe .mdb database (Linux)

- FreeRadius installation process record (Linux)

- Linux LVM Logical Volume Management to resize partitions (Linux)

- Tsunami-udp accelerated network transmission (Linux)

- How to install the NVIDIA 358.16 driver in Ubuntu 15.10,14.04 (Linux)

- iptables using summary (Linux)

- Linux Security (Linux)

- Windows environment Android Studio v1.0 Installation Guide (Linux)

- LAN in Ubuntu shared folders to Windows (Linux)

  How to use the Docker Machine cluster deployment Swarm
  Add Date : 2018-11-21      
  Hello everyone, today we have to look at how to use the Docker Machine deployment Swarm cluster. Docker Machine provides a standard Docker API support, so anything that can interact with Docker daemon tools can be used to Swarm (transparently) to amplify multiple hosts. Docker Docker Machine can be used to create a host PC, and the cloud data center. It is to create a server, and install Docker Docker set by the user to configure the client provides facilitation solutions. We can use any drive to deploy swarm cluster, and the cluster will swarm the use of TLS encryption has excellent security.

1. Install Docker Machine

Docker Machine on a variety of Linux systems are supported well. First, we need to download the latest version of the Docker Machine from Github. We use the curl command to download the first version Docker Machine ie 0.2.0.

64-bit operating systems:

# Curl -L https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_linux-amd64> / usr / local / bin / docker-machine
32-bit operating systems:

# Curl -L https://github.com/docker/machine/releases/download/v0.2.0/docker-machine_linux-i386> / usr / local / bin / docker-machine
Downloaded the first version of the Docker Machine, we need permission to / usr / local / bin / directory docker-machine file to be modified. Command is as follows:

# Chmod + x / usr / local / bin / docker-machine
After doing the above things in the future, we want to ensure docker-machine has been installed correctly. How the inspections? Run docker-machine -v instructions that will be given docker-machine version of our installed on your system.

# Docker-machine -v

Installing Docker Machine

To make Docker command to run on our machines, you must also install the client on the machine Docker. Command is as follows.

# Curl -L https://get.docker.com/builds/linux/x86_64/docker-latest> / usr / local / bin / docker
# Chmod + x / usr / local / bin / docker
2. Create Machine

After the Docker Machine installed on our devices, we need to use the Docker Machine create a machine. In this article, we will be deployed on the Digital Ocean Platform. So we will use the "digitalocean" as its Driver API, then docker swarm run in them. The Droplet is set to Swarm master node, we need to create another Droplet, and set it to Swarm node agent.

Create machine commands are as follows:

# Docker-machine create --driver digitalocean --digitalocean-access-token < API-Token> linux-dev
Note: Suppose we want to create a machine named "linux-dev" of. The user is generated in the Digital Ocean Cloud Platform of Digital Ocean control panel keys. To get the key, we need to log in to our Digital Ocean Control Panel, then click on the API options, then click Generate New Token, a name, and then tick the Read and Write two options. Then we will get a very long hex keys, the grindstone. Use it to replace the one above command API-Token field.

Now, run the following command will Machine configuration variables loaded into the shell.

# Eval "$ (docker-machine env linux-dev)"

Docker Machine Digitalocean Cloud

Then, we use the following command to our machine marked ACTIVE.

# Docker-machine active linux-dev
Now, we check it (refer to machine) whether the order is marked ACTIVE "*".

# Docker-machine ls

Docker Machine Active List

3. Run Swarm Docker image

Now, we have created the machine after. We need to swarm docker up image deployment. The machine will run the docker mirrored and control Swarm master node and slave nodes. Use the following command to run the mirror:

# Docker run swarm create
Docker Machine Swarm Create

If you want to run swarm docker mirrors on 32-bit operating system. You need to log in to the SSH Droplet them.

# Docker-machine ssh
# Docker run swarm create
# Exit

4. Create a master node Swarm

After our swarm image which has been running in the machine, we will create a Swarm master node. Use the following statement to add a master node.

# Docker-machine create \
-d digitalocean \
--digitalocean-access-token < DIGITALOCEAN-TOKEN>
--swarm \
--swarm-master \
--swarm-discovery token: // < CLUSTER-ID> \

Docker Machine Swarm Master Create

5. Create Swarm from node

Now, we are going to create a swarm from the node, which will be connected with the Swarm master node. The following command will create a new named swarm-node of the droplet, which is connected to the master node Swarm. At this point, we have a two-node cluster of the swarm.

# Docker-machine create \
-d digitalocean \
--digitalocean-access-token < DIGITALOCEAN-TOKEN>
--swarm \
--swarm-discovery token: // < TOKEN-FROM-ABOVE> \

Docker Machine Swarm Nodes

6. The master node is connected with the Swarm

Now, we connect Swarm master node so that we can deploy Docker container between nodes in accordance with the needs and profile. Run the following command loads Machine profile Swarm master node to the environment.

# Eval "$ (docker-machine env --swarm swarm-master)"
Then, we will be able to run across the nodes we need a container. Here, we have to check if everything is normal. So, run docker info command to check Swarm cluster.

# Docker info
to sum up

We can create a Swarm Docker Machine clusters easily. This method has very high efficiency, because it greatly reduces the system administrator and user time-consuming. In this article, we take a drive Digital Ocean, through the creation of a master node and a slave node successfully deployed cluster. There are other similar drive VirtualBox, Google Cloud Computing, Amazon Web Service, Microsoft Azure and so on. These connections are encrypted via TLS, with high security.
- Awk include binding capacity larger than the specified size of all files directory (Linux)
- Linux system security settings after installation (Linux)
- Github inventory objects Algorithm (Linux)
- Modify Linux terminal prompt path length (Linux)
- Oracle 11g new features of the collection of multi-column statistics (Database)
- Binary search is really easy as you think you do (Programming)
- How to Install Telegram instant messaging software on Ubuntu (Linux)
- Hadoop + Zookeeper NameNode achieve high availability (Server)
- Tomcat configuration memory and remote debug port (Server)
- View and modify Linux machine name (Linux)
- Use ISO document production OpenStack used CoreOS mirror (Linux)
- MongoDB query statistics grouping remove duplicate records (Database)
- Linux System Getting Started Learning: Linux in the last command (Linux)
- libreadline.so.6: can not open shared object file problem solution (Linux)
- MySQL Error Code Complete (Database)
- The direct insertion sort algorithm (Programming)
- Linux / UNIX: Use the dd command to create a 1GB size binary (Linux)
- Execute command sentence can result in equipment permanently bricked in Linux laptop (Linux)
- 10 example of the detection memory usage free Linux commands (Linux)
- Beautiful start Ubuntu installation tool Duck Launcher 0.64.5 (Linux)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.