@ -165,65 +165,32 @@ Before proceeding from this section, review the section checklist to ensure you
| [ ] | Network specific ansible inventory file was created |
| [ ] | Ansible runs through the entire playbook with no errors |
### Configure The Panel
I need to create an account on the panel, https://panel.mjb-stage.com/register with the email address manager@mjb-stage.com.
### Step 1: Machine Selection
First, I should layout the servers. At least one panel, build, store and certbot server will be needed to run the platform. One or more webservers will be needed to serve blogs.
These servers should all be Debian 11 machines. I will also need a machine to install from, which should have git, ansible, and SSH access to all of the other machines.
I have choosen to lay out the machines as follows. The private IP addresses will be used to limit database access.
Each of these machines is now online, brought up on Linode with their default Debian 11 image.
Next I will need to checkout the repository and update the configuration file.
Once I create the account, I need to promote it to an admin. From a shell on panel.mjb-stage.com server, I run the following.
```bash
git clone ...
cd devops/ansible/
mkdir -p env/staging
cp config.example.yml env/staging/inventory.yml
vim env/staging/inventory.yml
cd mjb/Web
./script/mjb flip_admin manager@mjb-stage.com
```
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.
Now that I have an admin account, I can access the Servers tab at https://panel.mjb-stage.com/admin/servers
The tab configures web servers that the system will deploy blogs to. Each of the webservers that were configures by Ansible should go here, so I enter `web-west.mjb-stage.com` and then `web-west.mjb-stage.com`. The servers tab now lists these two servers.
This command took about two and a half hours to complete, it should largely setup the whole platform across all of the machines.
Next I need to go to the Domains tab and add `mjb-stage-blog.com`.
There is a drop down for SSL Challenge. When selecting `HTTP`, each time a blog is added, certbot will be used to complete an HTTP challenge for the domain. When selecting `DNS-Linode`, a Wildcard SSL certificate will be obtained and then blogs will not need their own certificates. `DNS-Linode` requires a Linode account and API credentials.
Now the ansible playbook has run successfully, and all of the machines are set up.
### Configure The Store
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.
@ -243,13 +210,41 @@ Once this is done, you'll need to create the mjb organization.
3. Name the organization "mjb"
4. Click "Create Organization"
Now we need to add a Jekyll blog as a template.
Get a shell into the build server and create a new Jekyll blog.
```bash
# Create the default blog
alias jekyll="podman run -ti --rm -v .:/srv/jekyll -e JEKYLL_ROOTLESS=1 docker.io/jekyll/jekyll jekyll"
jekyll new jekyll-default
# Push this default to the panel_config.jekyll_init_repo repository