From d4ccd52f8322b763817e1f4854d634a1d2196a5d Mon Sep 17 00:00:00 2001 From: Siem Date: Wed, 3 May 2023 21:39:22 +0200 Subject: [PATCH] update installation to be more accurate --- README.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 714b4c61b..10b0ac99e 100644 --- a/README.md +++ b/README.md @@ -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 root@dev.svsticky.nl` 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