Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Server \ How to use the Docker Machine cluster deployment Swarm     - Oracle ORA-01089 failure analysis (Database)

- Improve the Ubuntu SSH login authentication approach speed (Linux)

- Ubuntu 14.04 compile RT288x_SDK / toolchain / squashfs3.2-r2 Error (Linux)

- Linux kernel programming parameter passing between modules and function calls (Programming)

- Java in several ways of using MongoDB (Programming)

- Efficient running Linux virtual machine Six Tips (Linux)

- About Linux iptables firewall interview questions and answers (Linux)

- Android use canvas board painting (Programming)

- mysql_config_editor encryption and decryption of the new features of MySQL realization (Database)

- To assign multiple IP addresses NIC on the CentOS 7 (Linux)

- How do you change the default browser and Email Client in Ubuntu (Linux)

- Kubernetes (k8s) environment to build combat (Server)

- Rails project prepared some tips small experience (Linux)

- Ubuntu 14.04 installed Nvidia CUDA 7.5 and build Python Theano deep learning development environment (Linux)

- Using open source software to build XWiki Wiki system installed within the company (Linux)

- Can not empty the Recycle Bin to repair problems in Ubuntu 14.04 (Linux)

- Close Pycharm spell check (Programming)

- JavaScript cross-browser event object library (Programming)

- Linux systems use logwatch log file monitoring (Linux)

- Nginx Load Balancing (standby) + Keepalived (Server)

  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.
- CentOS7 install NTFS-3G driver (Linux)
- Oracle 12C RAC on temporary table space Enlighten (Database)
- Linux set to select the appropriate level of security of the network according to deployment (Linux)
- Flow control message transmission between RAC (Database)
- JavaScript common array manipulation functions and usage (Programming)
- CentOS 6.5 boot automatically mount the hard drive (Linux)
- Ubuntu 12.04 install RTL8723BE wireless network card driver (Programming)
- Permissions and attributes of files and directories under Linux (Linux)
- Ubuntu 14.04 / Linux Mint 17 How to install the MintMenu 5.5.2 menu (Linux)
- Oracle in the add & split partition on the impact of global & local index (Database)
- Generators and iterators in Python (Programming)
- Ubuntu GCC, G ++ and fortran Version Switch (Linux)
- Git / Github use notes (Linux)
- Linux the best download manager uGet (Linux)
- NGINX Plus now fully supports HTTP / 2 (Server)
- Java multi-threaded shared communications variables (Programming)
- CentOS 7.0 local address and configure yum source address priority (Linux)
- Internet proxy workaround can not be used under Linux YUM (Linux)
- Use preseed script to install Ubuntu 14.04 (Linux)
- Oracle 12c R2 new feature dbca command to create a standby database (Database)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.