news
Serverspace has added a new Rocky Linux OS
BM
December 12, 2022
Updated June 7, 2023

How to install and configure Drone on Ubuntu 20.04 server

Linux Ubuntu

Introduction

CI/CD - Response to specific requests or triggers when working with containers,
or any other project, that is, acts as a notification of changes in the project.

Simplifies the work with notification, storing results, as well as publishing various projects.

Drone CI also has a free SaaS (software as a service) plan that is available for open source projects.

Integrates with Github, Bitbucket, Gitea. Configuration is customizable thanks to yaml (+ starlark and jsconnet).

It doesn't require a lot of resources to make it work, which saves on hardware and gets you started with Dorne even on weak devices.

It requires Docker to be pre-installed, in my publication i will able to use pre-installed version of Docker.

To install Docker, use our instructions or create a server in Serverspace with the application already installed.

Required dependencies for deploy

  • A github account.
  • You need your own domain or an open IP address for Drone to work.
  • The server must also have 11 gigabytes of free space, and 2 gigabytes of RAM to keep the containers running.

Preliminary configuration of machine

Visit page of account settings, and create access there to delegate our machine for github.

1drone

Generate your own OAuth application by first changing domain-name to subdomain "drone.****".

You can use your own ip address of your server by replacing the domain
"http://yourip" in the homepage URL tab to "http://yourip/login".

Copy your client id, as well as create an authorization key, its will be needed later.

2drone-768x603

Configure machine

Create RPC server key.

openssl rand -hex 16

3drone

Create and configure the local config.

nano /etc/drone

4drone

DRONE_SERVER_HOST=drone.steammmmm.space
#Host of your subdomain
DRONE_SERVER_PROTO=http
#what type of connection you will use
DRONE_GITHUB_CLIENT_ID=id_from_git_OAuth
#Client id from github
DRONE_GITHUB_CLIENT_SECRET=secret_from_github
#Secret from github
DRONE_RPC_SECRET=secret_from_server
#rpc password that we created on server
DRONE_USER_CREATE=username:barikasss,admin:true
#Username of your profile github

The full list of available configuration file options is located on the developer page.

Installing application

Setup the latest version of software.

docker pull drone/drone:1

5drone

Create a database for application.

docker volume create drone-base

6drone

Launch software.

docker run --name=dronegit --detach --restart=always --env-file=/etc/drone --volume=drone-base --publish=80:80 --publish=443:443 drone/drone:1

7drone

Check

Go to your ip-address that you specified in your profile, you will see the authorization window on github.

8drone_1

After authorization , you will ascertain the drone interface.

9drone_1

Conclusion

There are a lot of CI and CD products on the market that allow take them for free,
but each has its own limitations for commercial use.
Drone CI :

  • A free SaaS plan that is only available for opensource projects.
  • Priced SaaS available only for enterprise
  • Integration is possible with Github, Bitbucket, Gitea
  • Yaml configuration (+starlark, jsconnect)
  • Minimalistic
  • Requires few resources to run

Vote:
5 out of 5
Аverage rating : 5
Rated by: 1
1101 CT Amsterdam The Netherlands, Herikerbergweg 292
+31 20 262-58-98
700 300
ITGLOBAL.COM NL
700 300
We use cookies to make your experience on the Serverspace better. By continuing to browse our website, you agree to our
Use of Cookies and Privacy Policy.