diff --git a/README.md b/README.md index 6b63d1e..9102d29 100644 --- a/README.md +++ b/README.md @@ -39,20 +39,35 @@ For Drone to be able to deploy to a server, you need: - An SSH key, added as a secret in Drone, and added to `/home/drone/.ssh/authorized_keys on the server` 1. Add a `drone` user on `example.zone`, the server which you’re hosting the site on. + a. `sudo adduser drone` + b. create an SSH key for the user using `ssh-keygen` , e.g. `sudo -u drone ssh-keygen` + c. copy the contents of the public side of the new key to `/home/drone/.ssh/authorized_keys` + d. run `chmod go-rwx /home/drone/.ssh` + e. add `drone` to `AllowUsers` in `/etc/ssh/sshd_confand` restart SSH, `sudo service sshd restart` + 2. Give the drone user access to the `docker` group; `sudo usermod -aG docker drone` + 3. 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](https://docs.drone.io/cli/install/): + 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