Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation guide update #434

Merged
merged 2 commits into from
Sep 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading