Skip to content
Snippets Groups Projects
Unverified Commit 49c6ed6e authored by Thomas Maurice's avatar Thomas Maurice
Browse files

update(requirements): upgrades requirements & tidy up root folder

parent a4ee9277
No related branches found
No related tags found
No related merge requests found
...@@ -66,14 +66,14 @@ You can now update your `inventory` file by modifying it with your new values (h ...@@ -66,14 +66,14 @@ You can now update your `inventory` file by modifying it with your new values (h
Ansible runs `playbooks`, which are collections of `roles` that in turn are a collection of `tasks`. `tasks` are instructions like "install this package", "copy this file", "create this directory", "install this service", "create this container" and so on and so forth. Ansible runs `playbooks`, which are collections of `roles` that in turn are a collection of `tasks`. `tasks` are instructions like "install this package", "copy this file", "create this directory", "install this service", "create this container" and so on and so forth.
I have very much documented the example roles in `./roles` and I would _greatly_ encourage you to read them to understand how to do basic stuff in ansible such as copying a file, starting a service and so on. If you do not do that, you will be lost and won't understand anything that is coming at you. I have very much documented the example roles in `./roles` and I would _greatly_ encourage you to read them to understand how to do basic stuff in ansible such as copying a file, starting a service and so on. If you do not do that, you will be lost and won't understand anything that is coming at you. The playbooks on the other hand are stored in the `./playbooks/` directory, feel free to look at them to inspire your own playbooks for this lab.
### Check everything works properly ### Check everything works properly
You should now be able to actually `run` ansible to execute the `base.yml` playbook. You should now be able to actually `run` ansible to execute the `base.yml` playbook.
``` ```
$ ansible-playbook -vi inventory -l all base.yml $ ansible-playbook -vi inventory -l all playbooks/base.yml
``` ```
The `-i` flag specifies the inventory file to use, the `-l` file limits which hosts it applies to, either by hostname or group name, here we apply it to all the hosts. The `-i` flag specifies the inventory file to use, the `-l` file limits which hosts it applies to, either by hostname or group name, here we apply it to all the hosts.
...@@ -88,7 +88,7 @@ To deploy Synapse and Mastodon, you need to deploy a database server. We are goi ...@@ -88,7 +88,7 @@ To deploy Synapse and Mastodon, you need to deploy a database server. We are goi
For more details to do this, I refer you to [this link](https://stribny.name/blog/ansible-postgresql/) which will walk you through how to deal with this. For more details to do this, I refer you to [this link](https://stribny.name/blog/ansible-postgresql/) which will walk you through how to deal with this.
Note that you won't be using the `dnf` instruction here since DNF is the package manager for CentOS based systems, use `apt` instead. Similarily the packages are named a bit differently, you need to install Note that you won't be using the `dnf` instruction here since DNF is the package manager for CentOS based systems, use `apt` instead. Similarily the packages are named a bit differently, you need to install (with ansible !)
- `postgresql` - `postgresql`
- `python3-psycopg2` - `python3-psycopg2`
...@@ -99,7 +99,7 @@ Either way, you need to install this on youd DB machine, which should be the one ...@@ -99,7 +99,7 @@ Either way, you need to install this on youd DB machine, which should be the one
## Install Nginx ## Install Nginx
You need to install nginx (or apache2, or traefik, whichever you are more comfortable with, but be aware I'll only be able to help with nginx and traefik as I have no idea how apache2 works). Use ansible for this, and install the `nginx-extras` package, because why not. You need to install nginx (or apache2, or traefik, whichever you are more comfortable with, but be aware I'll only be able to help with nginx and traefik as I have no idea how apache2 works). Use ansible for this, and install the `nginx-extras` package.
## Create a certificate for our deployments ## Create a certificate for our deployments
...@@ -193,7 +193,7 @@ Anyways back to synapse, create a playbook real quick just containing the synaps ...@@ -193,7 +193,7 @@ Anyways back to synapse, create a playbook real quick just containing the synaps
- synapse - synapse
``` ```
Then apply it like we have seen above (`ansible-playbook -vi inventory -l <dockerhost> synapse.yml`) Then apply it like we have seen above (`ansible-playbook -vi inventory -l <dockerhost> playbooks/synapse.yml`)
You should now have a running container by now, that has a directory mounted with your configuration. Check your container works with the `docker ps` command, you should see something like You should now have a running container by now, that has a directory mounted with your configuration. Check your container works with the `docker ps` command, you should see something like
......
File moved
File moved
File moved
File moved
--- ---
roles: roles:
- src: geerlingguy.docker - src: geerlingguy.docker
version: 4.2.3 version: 7.0.2
collections: collections:
- name: community.docker - name: community.docker
version: 2.6.0 version: 3.4.11
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment