Age container continuous delivery tools --- Drone: Drone Introduction and Installation

 

Drone:Drone is a Container-Native, Continuous Delivery Platform。

To the official definition, the definition can be drawn from the above two key points:

1, Container-Native: Cloud is a cloud-Native native, Container-Native that can be translated into the native container, that is a product of the times Drone container is a container for implementation.

2,  the Continuous Delivery: continuous delivery, the vessel is now a synonym for fast delivery, and Drone is a container of continuous delivery platform, in fact, not only can achieve continuous delivery Drone, with some of the plugin, you can also achieve sustained deployment.

Official Address: https://drone.io/

how to install?

A, Drone is Container-Native platform that also use natural Drone way to install the container, so we must first prepare the operating environment of the container, we use here docker, installation docker do the following:

1, install the required packages

yum install -y yum-utils \
device-mapper-persistent-data \
lvm2

2, source disposed yum

yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

3, mounting docker-ce

yum install docker-ce

4, start docker

systemctl start docker

 

Through the above docker way to complete the installation.

 

Second, the installation Drone

Drone divided into two parts, part server, part Agent, first look at the server is installed, to start a container Drone server by performing the following instructions

docker run 
--volume=/data:/data
--env=DRONE_AGENTS_ENABLED=true
--env=DRONE_GOGS_SERVER={Gogs地址}
--env=DRONE_RPC_SECRET={与agent通信的密钥}
--env=DRONE_SERVER_HOST={HOST}
--env=DRONE_SERVER_PROTO=http
--env=DRONE_USER_CREATE=username:{管理员账号},admin:true
--env=DRONE_LOGS_TRACE=true
--publish=30000:80
--restart=always
--detach=true
--name=drone drone/drone:1.4.0

 Several key configuration:

DRONE_GOGS_SERVER: as used here is gogs git storage, of course, also supports the drone github, gitlab and some mainstream source code management platform, different platforms require different set of environment variables, with specific reference to official documents Parameter name 
DRONE_RPC_SECRET: communication between the agent and the key, be sure to configure
DRONE_SERVER_HOST: set drone server host name used, can be ip address plus port number
DRONE_SERVER_PROTO: protocol http / https use
DRONE_USER_CREATE: set the initial administrator, this is a super administrator
DRONE_LOGS_TRACE: start logging, default is closed
publish: port mapping

above after the instruction execution, a drone server started the container, can be accessed by the host system configuration of the

following Agent is installed, the following instruction to complete:

docker run -d  
-v /var/run/docker.sock:/var/run/docker.sock
-e DRONE_RPC_PROTO=http
-e DRONE_RPC_HOST={server host}
-e DRONE_RPC_SECRET={密钥}
-e DRONE_RUNNER_CAPACITY=2
-e DRONE_RUNNER_NAME={Host}
--env=DRONE_LOGS_TRACE=true
-p 3000:3000
--restart=always
--name runner
drone/agent:1.4.0

 

DRONE_RPC_HOST: start server configuration above host

DRONE_RPC_SECRET: configuration with the server should be the same

DRONE_RUNNER_CAPACITY: the number of tasks you can perform at the same time

DRONE_RUNNER_NAME: usually set to the hostname

The installation of this agent.

 

Open your browser and enter the address DRONE_SERVER_HOST configuration, you can enter the system using

 

Guess you like

Origin www.cnblogs.com/dxp909/p/11585020.html