Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
Remove line saying roles unavailable on Galaxy
Browse files Browse the repository at this point in the history
*  Update Ansible version (Galaxy site says 2.9 is required)
*   s/install/installation
*   Some readability improvements
*   Move requirements to one section

fixes #7055
  • Loading branch information
Melanie Corr committed Jun 29, 2020
1 parent 3dbd660 commit 9b8c68e
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 52 deletions.
1 change: 1 addition & 0 deletions CHANGES/7055.doc
@@ -0,0 +1 @@
Removing outdated reference to unavailablity of Roles on Ansible Galaxy.
72 changes: 38 additions & 34 deletions docs/index.md
@@ -1,12 +1,9 @@
Pulp 3 Ansible Installer
========================

A collection of roles to install or upgrade Pulp 3. Can also reconfigure or add plugins to an existing install.
The Pulp 3 Ansible installer is a collection of Ansible roles that you can use to install or upgrade Pulp 3, as well as reconfigure or add plugins to an existing installation.

The Pulp 3 Ansible Installer consists of a collection of roles. Each role installs and configures a
component of Pulp. The roles are not currently available on Ansible Galaxy; to run the Pulp 3
Ansible installer, the [pulp_installer](https://github.com/pulp/pulp_installer) git repository must
be cloned or downloaded.
Each Ansible role installs and configures a component of Pulp.

This version of the installer, 3.4.1, installs Pulp 3.4.1 specifically.

Expand All @@ -16,7 +13,7 @@ System Requirements
-------------------

The [control node](https://docs.ansible.com/ansible/2.5/network/getting_started/basic_concepts.html#control-node)
must have Python 3 and Ansible (>= 2.8) installed.
must have Python 3 and Ansible (>= 2.9) installed.

The [managed node](https://docs.ansible.com/ansible/2.5/network/getting_started/basic_concepts.html#managed-nodes)
must be one of these currently supported operating systems:
Expand All @@ -28,11 +25,18 @@ Ansibles Python interpreter must have the package installed:
* psycopg2
* firewall (if firewalld should be configured; you can disable that with `pulp_configure_firewall=false`)

The Ansible collection requires [geerlingguy.postgresql](https://galaxy.ansible.com/geerlingguy/postgresql) role,
which should be installed from ansible-galaxy.

```
ansible-galaxy install geerlingguy.postgresql
```

Variables
---------

**Each role documents all the variables that it uses**. Some variables are
used by multiple roles. In that case, they are be documented in their primary role and mentioned in
used by multiple roles. In that case, they are documented in their primary role and mentioned in
the `shared_variables` section the other roles.

**Required Variables:**
Expand All @@ -48,12 +52,12 @@ These roles can be used against any managed node and are highly configurable. K
be helpful, but even if you are new to Ansible, this section will get you started, or you can try
the Vagrant installations to bypass the Ansible boilerplate.

First, you will need to configure ssh between your control node and your managed node. When you can
ssh into the managed node without a password, you are ready to move to the next step.
First, you will need to configure SSH between your control node and your managed node. When you can
SSH into the managed node without a password, you are ready to move to the next step.

Next, add the managed node's hostname or ip address to `/etc/ansible/hosts`.
Next, add the managed node's hostname or IP address to `/etc/ansible/hosts`.

It may be helpful to ensure that Ansible can communicate with the managed node.
Ensure that Ansible can communicate with the managed node.

```
ansible all -m ping -u <managed_node_username>
Expand All @@ -62,53 +66,53 @@ ansible all -m ping -u <managed_node_username>
Note on Plugin Version Compatibility with Pulpcore
--------------------------------------------------

Pulp 3 has a plugin architecture so that new content types, and new features, can be added by the
Pulp 3 has a plugin architecture so that new content types and features can be added by the
larger community. However, both pulpcore & plugins are installed via pip, which has limited
dependency resolution. Plugins release at their own lifecycles. Thus in the worst case scenario, the
2 stable branches of plugin pulp_juicy could depend on the current branch of pulpcore, while the 2
stable branches of pulp_sugary could depend on an older branch of pulpcore.

In order to avoid breaking multiple plugins for the sake of 1 plugin, and to avoid breaking existing
installs, upgrading a plugin will not cause pulpcore to be updated as dependency. Similarly, if a
plugin were to be attempted to be updated to an incompatible version with pulpcore, the installer
will fail & exit. The installer does a compatibility check early in the installation to prevent Pulp
from being installed/upgraded to an incompatible state.
In order to avoid breaking multiple plugins for the sake of one plugin, and to avoid breaking existing
installations, upgrading a plugin will not cause pulpcore to be updated as a dependency. Similarly,
if there is an attempt to update a plugin to a version that is incompatible with pulpcore, the installer
will fail and exit. The installer does a compatibility check early in the installation to prevent Pulp
from being installed or upgraded to an incompatible state.

Thus you, yourself, must research plugin compatibility with the pulpcore version whether you are
installing 1 plugin, or more than 1 plugin.
installing one or more plugins.

Recommended Workflows for Pulpcore & Plugin Versioning
------------------------------------------------------

### Latest Version with Minimal Work:
### Latest Version with Minimal Work Overview:

Initial install:
Initial installation:

1. Make sure you are running the latest version of the installer, which installs the latest version
of pulpcore (3.4.1).
1. Confirm that all the latest stable releases of your desired plugins are compatible with pulpcore
3.4.1, such as by reading the release announcement email thread for pulpcore 3.4.1, reading the
plugins README, or as a last resort, reading their setup.py.
1. Run pulp_installer.
plugins README, or as a last resort, reading their `setup.py`.
1. Run `pulp_installer`.

Upgrading your install:
Upgrading your installation:

1. Observe what the latest version of pulp_installer is, and what version of pulpcore it installed
1. Observe what is the latest version of `pulp_installer`, and what version of pulpcore it installed
(3.4.1).
1. Confirm that all the latest stable releases of **currently installed** plugins are compatible
with pulpcore 3.4.1, such as by reading the release announcement email thread for pulpcore 3.4.1,
reading the plugins README, or as a last resort, reading their setup.py.
1. If they are not all compatible yet, hold off & **wait** for the plugins to be updated for
1. If they are not all compatible yet, **wait** for the plugins to be updated for
compatibility.
1. Upgrade pulp_installer to the latest version.
1. re-run the pulp_installer with `upgrade` set to `true` for each plugin under
1. Upgrade `pulp_installer` to the latest version.
1. Re-run the `pulp_installer` with `upgrade` set to `true` for each plugin under
`pulp_install_plugins`

### Specifying Exact Versions with Reproducibility

Initial install:
Initial installation:

1. Observe the latest branch of pulp_installer, and what version of pulpcore it installs (3.4.1).
1. Observe the latest branch of `pulp_installer`, and what version of pulpcore it installs (3.4.1).
1. Confirm that all the latest stable releases of your desired plugins are compatible with pulpcore
3.4.1, such as by reading the release announcement email thread for pulpcore 3.4.1, reading the
plugins README, or as a last resort, reading their setup.py.
Expand All @@ -117,11 +121,11 @@ plugins README, or as a last resort, reading their setup.py.
with pulpcore 3.3.z. If there are none, try pulpcore 3.2.z, and repeate.
1. Once a compatible pulpcore version is found, specify `version` for each plugin under
`pulp_install_plugins`.
1. Run pulp_installer
1. Run `pulp_installer`

Upgrading your install:

1. Observe what the latest version of pulp_installer is, and what version of pulpcore it installed
1. Observe what the latest version of `pulp_installer` is, and what version of pulpcore it installed
(3.4.1). (Even if there is no update, you can still upgrade your plugins.)
1. Confirm that all the latest stable releases of **currently installed** plugins are compatible
with pulpcore 3.4.1, such as by reading the release announcement email thread for pulpcore 3.4.1,
Expand All @@ -131,13 +135,13 @@ reading the plugins README, or as a last resort, reading their setup.py.
with pulpcore 3.3.z. If there are none, try pulpcore 3.2.z, and repeat.
1. Once a compatible pulpcore version is found, **revise** `version` for each plugin under
`pulp_install_plugins`. Do not specify `upgrade` as well.
1. Upgrade pulp_installer to the latest version (if there is a new version.)
1. Run pulp_installer
1. Upgrade `pulp_installer` to the latest version (if there is a new version.)
1. Run `pulp_installer`

Roles
-----

pulp_installer is equipped with the following roles:
`pulp_installer` is equipped with the following roles:

- [pulp_common](roles/pulp_common): installs shared components of the Pulp 3 services from PyPi or source and provides basic config
- [pulp_api](roles/pulp_api): install, configure, and set the state of pulp API service
Expand Down
27 changes: 9 additions & 18 deletions docs/quickstart.md
@@ -1,22 +1,13 @@
Getting started
===============

Pulp 3 Ansible installer is a collection of roles to install or upgrade Pulp 3 hosted on galaxy:
The Pulp 3 Ansible installer is a collection of roles to install or upgrade Pulp 3 hosted on galaxy:
[https://galaxy.ansible.com/pulp/pulp_installer](https://galaxy.ansible.com/pulp/pulp_installer)

Some plugins may require a prereq role, if so, you can find the prereq roles under pulp user here:
Some plugins require a prerequisite role. You can find information about prerequisite roles that you require in the **Roles** area of the Pulp page on Ansible Galaxy:
[https://galaxy.ansible.com/pulp](https://galaxy.ansible.com/pulp)


Requirements
------------
The collection requires [geerlingguy.postgresql](https://galaxy.ansible.com/geerlingguy/postgresql) role,
which should be installed from ansible-galaxy.

```
ansible-galaxy install geerlingguy.postgresql
```

Installation
------------
The recommended installation is from ansible-galaxy:
Expand All @@ -37,26 +28,26 @@ ansible-playbook playbooks/example-use/playbook.yml -u <managed_node_username> -

<script id="asciicast-335159" src="https://asciinema.org/a/335159.js" async data-autoplay="true" data-speed="2"></script>

To configure a custom install, you will need to set configuration variables. In the simplest case,
they can be set in the playbook. See the ansible docs for more flexible idiomatic alternatives.
To configure a custom installation, you will need to set configuration variables. In the simplest case,
they can be set in the playbook. See the Ansible docs for more flexible idiomatic alternatives.


My first playbook
Example Playbook for Installing Plugins
-----------------
As an example, we are going to write a playbook for installing `pulp_container` and `pulp_rpm`.
You can learn more about the variables on the [roles section](https://pulp-installer.readthedocs.io/en/latest/roles/pulp/#role-variables)

1 - Installing pulp_installer collection:
1 - Install the `pulp_installer` collection:
```
ansible-galaxy collection install pulp.pulp_installer
```

2 - Installing geerlingguy.postgresql role:
2 - Install the `geerlingguy.postgresql` role:
```
ansible-galaxy install geerlingguy.postgresql
```

3 - Writing the playbook (Example of playbook below):
3 - Write the following playbook:
```
vim install.yml
```
Expand Down Expand Up @@ -88,7 +79,7 @@ vim install.yml
environment:
DJANGO_SETTINGS_MODULE: pulpcore.app.settings
```
4 - Running the playbook:
4 - Run the playbook:
```
ansible-playbook install.yml -u <managed_node_username> --ask-become-pass
```
Expand Down

0 comments on commit 9b8c68e

Please sign in to comment.