Installing Drone on Fedora Server Latest
Drone is a Continuous Integration (CI) and Continuous Deployment (CD) platform that helps developers automate project builds, testing, and deployment processes. In this tutorial, we will show you how to install Drone on Fedora Server Latest using the official installation script.
Prerequisites
Before you begin, make sure you have the following:
- A Fedora Server Latest instance with sudo privileges
- A domain name or IP address that resolves to your server's public IP address
- A valid SSL/TLS certificate and private key for your domain name. You can obtain a free SSL/TLS certificate from Let's Encrypt.
Step 1 - Install Docker
Drone requires Docker to build and run containers. Install Docker CE (Community Edition) using a package manager:
sudo dnf install docker-ce
Start the Docker service and enable it to automatically start at boot time:
sudo systemctl start docker
sudo systemctl enable docker
Verify that Docker is running:
sudo docker version
Step 2 - Install Drone
Clone the official Drone installation script from GitHub:
git clone https://github.com/drone/drone-installer.git
Change the directory to the Drone installer:
cd drone-installer
Run the installation script with the following command, replacing "your-domain.com" with your domain name, and "/path/to/your/certificates" with the path to your SSL/TLS certificate and private key:
sudo DRONE_AGENTS_ENABLED=true DRONE_SERVER_HOST=your-domain.com DRONE_SERVER_PROTO=https DRONE_TLS_CERT=/path/to/your/certificates/cert.pem DRONE_TLS_KEY=/path/to/your/certificates/privkey.pem ./drone.sh
Step 3 - Create a Drone User
Drone requires a user account to authenticate and authorize access to repositories. Create a new user account using the drone user add command:
sudo docker run --rm \
-e DRONE_RPC_PROTO=https \
-e DRONE_RPC_HOST=your-domain.com \
-e DRONE_RPC_SECRET=<rpc-secret> \
-e DRONE_USER_CREATE=username:your-username,admin:true \
drone/drone-cli user add
Replace "your-domain.com" with your domain name, "
Step 4 - Configure Repositories
In order to build, test, and deploy projects, Drone must have permission to access source code repositories. Configure repositories using the drone repo command:
sudo docker run --rm \
-e DRONE_RPC_PROTO=https \
-e DRONE_RPC_HOST=your-domain.com \
-e DRONE_RPC_SECRET=<rpc-secret> \
-e DRONE_USER_FILTER=your-username \
drone/drone-cli repo ls
This command will list all repositories that your username has access to. You can add or remove repositories using the drone repo enable and drone repo disable commands.
Step 5 - Access Drone
You can access the Drone web interface by visiting "https://your-domain.com" in a web browser. Authenticate using the credentials you created in Step 3.
Congratulations! You have successfully installed and configured Drone on Fedora Server Latest.