Installing Drone on Manjaro

Drone is a continuous integration and delivery platform that was designed to automate software testing and deployment. In this tutorial, we will go through the process of installing Drone on Manjaro.

Prerequisites

Before proceeding with the installation of Drone, you should ensure that the following requirements are met:

Step 1: Install Drone

  1. Open your terminal.
  2. Create a directory where your Drone installation will be stored.
mkdir drone
cd drone
  1. Create a file called docker-compose.yml in this directory.
nano docker-compose.yml
  1. Copy and paste the following content into the docker-compose.yml file.
version: '3'
services:
  drone-server:
    image: drone/drone:1
    ports:
      - 80:80
      - 443:443
    volumes:
      - ./data:/data
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - DRONE_GITEA_SERVER=https://git.example.com
      - DRONE_GITEA_CLIENT_ID=xxx
      - DRONE_GITEA_CLIENT_SECRET=yyy
      - DRONE_RPC_SECRET=zzz
      - DRONE_SERVER_HOST=drone.example.com
      - DRONE_SERVER_PROTO=https
    restart: always

  drone-agent:
    image: drone/drone-runner-docker:1
    depends_on:
      - drone-server
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - DRONE_RPC_HOST=drone-server
      - DRONE_RPC_PROTO=http
      - DRONE_RPC_SECRET=zzz
      - DRONE_RUNNER_CAPACITY=2
    restart: always

Note:

  1. Run the docker-compose command to bring up the Drone instance.
docker-compose up -d

This will start the Drone server and agent containers running in the background.

Step 2: Create an Admin User

  1. Open your browser and navigate to the web interface of your Drone installation at http://localhost/.
  2. Click on the "Sign In" button and sign in via your Git provider.
  3. Drone will prompt you to authorize the application. Click on "Authorize Application".
  4. Once you are authenticated, click on the gear icon in the top right corner of the interface, then click on "Users".
  5. Click on the "Create User" button and create an admin user.
  6. Assign the admin user to the "admin" team.

Step 3: Enable Your Repository in Drone

  1. In the Drone interface, click on your username in the top right corner, then click on "Repositories".
  2. Search for the repository you want to enable for Drone and click on the "Activate" button.

That's it! You've successfully installed Drone on Manjaro and enabled a repository. You can now configure your build pipelines by editing the .drone.yml file in your repository.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!