Skip to content

Commit

Permalink
update installation to be more accurate
Browse files Browse the repository at this point in the history
  • Loading branch information
Siem2l authored and HugoPeters1024 committed Sep 28, 2023
1 parent ae91c0c commit d4ccd52
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,31 +161,34 @@ performed, which are explained in detail in [this guide][deployment-new-producti
`$ git clone https://github.com/svsticky/sadserver`
`$ cd sadserver`

1. Update the submodule and enter the ansible folder.
`$ git submodule update --init`
`$ cd ansible`

1. Create a file `.discord-webhook` containing the webhook to be used for Slack
notifications. If unsure, read it via the command `$ ansible-vault view
group_vars/production/vault.yml` (search for
`vault_slack_notifications_webhook_url`).

1. To install all required dependencies for the deploy script, first change to the `ansible` directory.
`$ cd ansible`
Then run the following command to enter a shell with all dependencies installed.
`$ nix-shell`

1. To run the deploy script, an active session with bitwarden is required. To do this, run `$ bw login` and follow the instructions. The account required is managed by the IT Crowd. You will have these credentials if you are a member of the IT Crowd.

1. Bootstrap the host for either production or staging.
`$ nix run -c ./deploy.py --host=(production|staging) --playbook bootstrap-new-host.yml`
`$ ./deploy.py --host=(production|staging) --playbook bootstrap-new-host.yml`
You do not need to enter a SUDO password, but you do need to enter the correct Vault password. (Can usually be found in bitwarden).
At the end of the process you will receive a newly generated SUDO password, which you will need in the next step. (Save this in bitwarden for future reference).
On staging, if the playbook fails immediately, you might have an old ssh key. To solve this type:
`$ ssh [email protected]`
SSH will guide you the rest of the way.

1. Run the main playbook for either production or staging.
`$ nix run -c ./deploy.py --host=(production|staging)`
`$ ./deploy.py --host=(production|staging)`
Enter the password from the previous step when prompted for.


1. To create a new database and start Koala, you will also need to run these two playbooks.
`$ nix run -c ./deploy.py --host=(production|staging) --playbook playbooks/koala/db-setup.yml`
`$ nix run -c ./deploy.py --host=(production|staging) --playbook playbooks/koala/start.yml`
`$ ./deploy.py --host=(production|staging) --playbook playbooks/koala/db-setup.yml`
`$ ./deploy.py --host=(production|staging) --playbook playbooks/koala/start.yml`


## Contact
Expand Down

0 comments on commit d4ccd52

Please sign in to comment.