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

improve README #93

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ This playbook has been tested with Ansible version 5.10.0 and above. We recommen

## Install

On systems running the latest Ubuntu LTS version (Jammy), run the following commands to install Ansible:

```
sudo apt-get install ansible
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this installs an older version of ansible- we can just refer people to the ansible installation documentation instead, or recommend to install via pip like ansible documentation recommends

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a strong reason to ask people to install the upstream version instead of the Ubuntu version? Do we use any feature that is not available?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the lines bellow instructing the install of ansible.utils is useful, but I think it's safe to assume the user has ansible installed if they're using our playbook, and since there are so many methods to install ansible, I think it would be reasonable to specify a minimum version, but leave it to the user as to how its installed. There's also ansible-tower / AWX which makes this a bit more complicated, so best we just leave this open in my opinion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think leaving it open or directing the user to Ansible's own installation documentation should suffice

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is generally not advisable to install ansible directly as a package on your system, since this usually cause a lot of issue down the line when trying to work with different ansible playbooks from different projects, which require different versions. To avoid this, i would recommend to use a virtual environment and install ansible into it. To document the needed steps, i have created the PR #122.

ansible-galaxy collection install ansible.utils
```

Finally, download the playbook from Github using git

```
git clone [email protected]:maas/maas-ansible-playbook
```
Expand Down Expand Up @@ -193,7 +202,7 @@ The following variables are only required when using HA Postgres:

```
ansible-playbook -i ./hosts\
--extra-vars="maas_version=3.2 maas_postgres_password=example maas_installation_type=deb maas_url=http://example.com:5240/MAAS"\
--extra-vars="maas_version=3.3 maas_postgres_password=example maas_installation_type=deb maas_url=http://example.com:5240/MAAS"\
./site.yaml
```

Expand All @@ -217,6 +226,8 @@ ansible-playbook -i ./hosts \
ansible-playbook -i ./hosts ./teardown.yaml
```

> Note: this action teardowns only the services, the MAAS database is preserved in the `maas_postgres_*` nodes. You must remove these files manually before attempting to redeploy the stack.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an issue with teardown that I was not aware of, by itself teardown is meant to restore the nodes to pre-install state. I think we should fix teardown (which needs updating anyway, with new changes to the playbooks) rather than tell people to do manual removal alongside running teardown?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO this is an interesting feature as is (I don't like dropping databases without getting multiple confirmations first). What we need is a flag purge_db (or something like this) that the user needs to explicitly set if he wants to delete data files.


### Backup the MAAS stack

Backup MAAS requires the `maas_backup_download_path` variable to be set, it will designate a path local to where the playbook is being run to download backup archives. This path must exist prior to running the playbook. `maas_installation_type` is also required.
Expand Down
Loading