From 6eeb4f8d272216b1b883a5ec53c14983cbb09e9f Mon Sep 17 00:00:00 2001 From: Kaitlyn Parkhurst Date: Mon, 31 Oct 2022 01:05:56 -0700 Subject: [PATCH] Update readme. --- README.md | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0aced20..768a7cd 100644 --- a/README.md +++ b/README.md @@ -95,19 +95,48 @@ Next I will need to checkout the repository and update the configuration file. ```bash git clone ... cd devops/ansible/ -cp config.example.yml staging.yml -vim staging.yml +mkdir -p env/staging +cp config.example.yml env/staging/inventory.yml +vim env/staging/inventory.yml ``` -I named the configuration file `staging.yml`, since this will be a staging environment. One should pay special attention to go through this example file and update it with details of their network. Once this is complete, the installation should be smooth sailing with ansible. I use the following command to get everything installed. +I named the configuration file `env/staging/inventory.yml`, since this will be a staging environment. I placed this in its own directory because some environment specific files will be stored in the inventory directory, and keeping seperate directories will prevent file clobbering. One should pay special attention to go through this example config file and update it with details of their network. Once this is complete, the installation should be smooth sailing with ansible. I use the following command to get everything installed. ```bash - ansible-playbook -i staging.yml site.yml +ansible-playbook -i env/staging/inventory.yml site.yml ``` +This command took about two and a half hours to complete, it should largely setup the whole platform across all of the machines. +### Step 2: Manual Steps +Now the ansible playbook has run successfully, and all of the machines are set up. +During the installation process, an SSH keypair was created. The public key must be added to the Gitea user that was setup. This must be done through the Gitea web panel. + +1. Login to Gitea on the store server, using the credentials for gitea user/pass from the inventory file. +2. Click the user drop down in the upper right +3. Click Settings from the drop down menu +4. Click "SSH / GPG Keys" +5. Click "Add Key" under "Manage SSH Keys" +6. Type a title +7. Paste the contents of env/staging/files/ssh/id\_rsa.pub +8. Click to add the key + +Once this is done, you'll need to create the mjb organization. + +1. Click the + Plus button drop down +2. Click "New Organization" +3. Name the organization "mjb" +4. Click "Create Organization" + +Everything should be setup now. + +### Step 3: Confirm It All Works! + +1. Create a user account +2. Create a blog +3. Delete a post