Reviewed-on: #13
Drone
- Category: Apps
- Status: 1, alpha
- Image:
drone/drone, 4, upstream - Healthcheck: Yes
- Backups: ?
- Email: ?
- Tests: 2
- SSO: 3 (OAuth)
Basic usage
- Set up Docker Swarm and
abra - Deploy
coop-cloud/traefik abra app new drone --secrets(optionally with--passif you'd like to save secrets inpass)abra app config YOURAPPDOMAIN- be sure to changeDOMAINto something that resolves to your Docker swarm boxabra app deploy YOURAPPDOMAIN- Open the configured domain in your browser to finish set-up
Setup with Gitea
follow this guide: https://docs.drone.io/server/provider/gitea/
then you'll also need to setup drone-docker-runner (abra app new drone-docker-runner). More info at https://docs.drone.io/runner/docker/installation/linux/.
Setting up a server for auto-deployment
For Drone to be able to deploy to a server, you need:
- A drone user on the server, added to the
dockergroup - An SSH key, added as a secret in Drone, and added to
/home/drone/.ssh/authorized_keys on the server
-
Add a
droneuser onexample.zone, the server which you’re hosting the site on.a.
sudo adduser droneb. create an SSH key for the user using
ssh-keygen, e.g.sudo -u drone ssh-keygenc. copy the contents of the public side of the new key to
/home/drone/.ssh/authorized_keysd. run
chmod go-rwx /home/drone/.sshe. add
dronetoAllowUsersin/etc/ssh/sshd_confandrestart SSH,sudo service sshd restart -
Give the drone user access to the
dockergroup;sudo usermod -aG docker drone -
Generate a new SSH key and insert it as a Drone “orgsecret”
a. Log into Drone as
admin, then either:b. Add the “orgsecret” using the Drone CLI:
i. Go to the “account” page https://drone.autonomic.zone/account ii. Copy/paste the “Example CLI usage” into a terminal (you might want to add to `~/.bashrc` to make this easier next time) iii. Run `drone orgsecret add [org you're adding the org secret to] [domain name] @drone_ssh_[example.zone]`c. Add the “orgsecret” using the Drone web interface:
i. Find the repository page, or the page for another repository in the same organisation, in Drone ii. On the “Settings” tab, under “Organization” on the left, click “Secrets”, then create a new secret and paste in the private key value