This repository has been archived by the owner on Jan 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #311 from fao89/6836
Document how to install from galaxy
- Loading branch information
Showing
14 changed files
with
173 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Document how to install from galaxy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
Getting started | ||
=============== | ||
|
||
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: | ||
[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 | ||
``` | ||
|
||
**NOTE:** Some plugins may require a prereq role, which is the case of `pulp_rpm`: | ||
``` | ||
ansible-galaxy install pulp.pulp_rpm_prerequisites | ||
``` | ||
|
||
Installation | ||
------------ | ||
The recommended installation is from ansible-galaxy: | ||
|
||
``` | ||
ansible-galaxy collection install pulp.pulp_installer | ||
``` | ||
|
||
Using the example playbook | ||
-------------------------- | ||
|
||
Some of the roles used in the playbook use root privileges on the managed node, so when prompted, | ||
you will need to provide the password for the managed node user. | ||
|
||
``` | ||
ansible-playbook playbooks/example-use/playbook.yml -u <managed_node_username> --ask-become-pass | ||
``` | ||
|
||
<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. | ||
|
||
|
||
My first playbook | ||
----------------- | ||
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: | ||
``` | ||
ansible-galaxy collection install pulp.pulp_installer | ||
``` | ||
|
||
2 - Installing geerlingguy.postgresql role: | ||
``` | ||
ansible-galaxy install geerlingguy.postgresql | ||
``` | ||
|
||
3 - Writing the playbook (Example of playbook below): | ||
``` | ||
vim install.yml | ||
``` | ||
|
||
|
||
```yaml | ||
--- | ||
- hosts: all | ||
vars: | ||
pulp_settings: | ||
secret_key: << YOUR SECRET HERE >> | ||
content_origin: "http://{{ ansible_fqdn }}" | ||
pulp_default_admin_password: << YOUR PASSWORD HERE >> | ||
pulp_install_plugins: | ||
# galaxy-ng: {} | ||
# pulp-ansible: {} | ||
# pulp-certguard: {} | ||
pulp-container: {} | ||
# pulp-cookbook: {} | ||
# pulp-deb: {} | ||
# pulp-file: {} | ||
# pulp-gem: {} | ||
# pulp-maven: {} | ||
# pulp-npm: {} | ||
# pulp-python: {} | ||
pulp-rpm: | ||
prereq_role: "pulp.pulp_rpm_prerequisites" # RPM plugin needs a prereq_role: https://galaxy.ansible.com/pulp/pulp_rpm_prerequisites | ||
roles: | ||
- pulp.pulp_installer.pulp_database | ||
- pulp.pulp_installer.pulp_workers | ||
- pulp.pulp_installer.pulp_resource_manager | ||
- pulp.pulp_installer.pulp_webserver | ||
- pulp.pulp_installer.pulp_content | ||
environment: | ||
DJANGO_SETTINGS_MODULE: pulpcore.app.settings | ||
``` | ||
4 - Installing `pulp_rpm` prereq role: | ||
``` | ||
ansible-galaxy install pulp.pulp_rpm_prerequisites | ||
``` | ||
5 - Running the playbook: | ||
``` | ||
ansible-playbook install.yml -u <managed_node_username> --ask-become-pass | ||
``` | ||
<script id="asciicast-335829" src="https://asciinema.org/a/335829.js" async data-autoplay="true" data-speed="2"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
--- | ||
pulp_default_admin_password: password | ||
pulp_install_plugins: | ||
# pulp-ansible: {} | ||
# galaxy-ng: {} | ||
# pulp-ansible: {} | ||
# pulp-certguard: {} | ||
# pulp-container: {} | ||
# pulp-cookbook: {} | ||
# pulp-deb: {} | ||
# pulp-container: {} | ||
pulp-file: {} | ||
# pulp-gem: {} | ||
# pulp-maven: {} | ||
# pulp-npm: {} | ||
# pulp-python: {} | ||
# pulp-rpm: | ||
# prereq_role: "pulp.pulp_rpm_prerequisites" # RPM needs a prereq_role: https://galaxy.ansible.com/pulp/pulp_rpm_prerequisites | ||
pulp-file: {} | ||
pulp_settings: | ||
secret_key: secret | ||
content_origin: "http://{{ ansible_fqdn }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.