formatting
continuous-integration/drone/push Build is passing Details

This commit is contained in:
trav 2024-01-17 15:58:12 -08:00
parent 63d7346dc5
commit 5bbf1e37b4
1 changed files with 15 additions and 0 deletions

View File

@ -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` - 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 youre hosting the site on. 1. Add a `drone` user on `example.zone`, the server which youre hosting the site on.
a. `sudo adduser drone` a. `sudo adduser drone`
b. create an SSH key for the user using `ssh-keygen` , e.g. `sudo -u drone ssh-keygen` 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` 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` d. run `chmod go-rwx /home/drone/.ssh`
e. add `drone` to `AllowUsers` in `/etc/ssh/sshd_confand` restart SSH, `sudo service sshd restart` 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` 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” 3. Generate a new SSH key and insert it as a Drone “orgsecret”
a. Log into Drone as `admin`, then either: a. Log into Drone as `admin`, then either:
b. Add the “orgsecret” using the [Drone CLI](https://docs.drone.io/cli/install/): 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 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) 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]` 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: 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 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 ii. On the “Settings” tab, under “Organization” on the left, click “Secrets”, then create a new secret and paste in the private key value