Setup the Automation Hub ( Galaxy NG) using Ansible
Categories:
Projects: c2platform/ansible
, c2platform.mw
This step-by-step guide demonstrates how to create an instance of Ansible Galaxy on the c2d-galaxy1
node using the Pulp Operator
. The Pulp
platform is a recently developed open-source software that facilitates the management and distribution of software packages, similar to Sonatype Nexus Repository
. A Galaxy NG instance essentially refers to a Pulp instance with the Galaxy NextGen
Pulp plugin installed.
Note:
The documentation for the Pulp Operator, especially regarding its integration with Galaxy NG, is currently inadequate. If you plan to utilize the Pulp Operator outside of this project, it is recommended to locally clone the Pulp Operator project repository. This will allow you to investigate and address configuration issues by examining both the code and documentation.Prerequisites
Create the reverse and forward proxy c2d-rproxy1
.
c2
unset PLAY # ensure all plays run
vagrant up c2d-rproxy1
For more information about the various roles that c2d-rproxy1
performs in this project:
- Setup Reverse Proxy and CA server
- Setup SOCKS proxy
- Managing Server Certificates as a Certificate Authority
- Setup DNS for Kubernetes
Setup
To create the Kubernetes instance and deploy the Galaxy NG instance, execute the following command:
vagrant up c2d-galaxy1
Verify
You can now verify your AWX instance using the Kubernetes Dashboard and the AWX web interface via the forward proxy, as described in Getting Started.
Kubernetes Dashboard
To access the Kubernetes Dashboard, navigate to
https://dashboard-galaxy.c2platform.org/
and log in using a token. Obtain the token by running the following command inside
the c2d-galaxy1
node:
kubectl -n kube-system describe secret microk8s-dashboard-token
Using the dashboard, you can navigate to the
awx
namespace. There, you should see
running pods without any errors, such as galaxy-web
and galaxy-content
.
For more information about the token and dashboard setup, refer to Setup the Kubernetes Dashboard.
Galaxy NG
To access the Galaxy NG web interface, please visit
https://galaxy.c2platform.org
.
You can log in using the admin
account with the password secret
.
Thanks to Ansible’s configuration of the remote community
repository along
with its dependencies, you should be able to synchronize it. To do so, follow
these steps:
- Navigate to Collections → Repository Management → Remote.
- Click on the Sync button to initiate the synchronization process.
After initiating the sync, head over to the Task Management section. You’ll
notice a job in progress. Be patient and wait for it to complete. Once it’s
done, navigate to the Namespaces section. Here, you’ll find several
namespaces housing Ansible collections, including the c2platform
namespace.
Review
For a comprehensive understanding of the Galaxy NG instance creation process
using Ansible, please consult the following components within the Ansible
playbook project
c2platform/ansible
:
Vagrantfile.yml
: This file configures thec2d_galaxy1
node with themgmt/galaxy
playbook.plays/mgmt/awx_galaxy.yml
: This playbook sets up Ansible roles for thegalaxy
Ansible group.hosts-dev.ini
: The inventory file assigns thec2d_galaxy1
node to thegalaxy
Ansible group.group_vars/galaxy/main.yml
: In this file, you’ll find the primary Kubernetes configuration, including the activation of add-ons such asdashboard
and themetallb
load balancer.group_vars/galaxy/kubernetes.yml
: This file contains configurations for setting up the Kubernetes cluster and installing Galaxy. It encompasses three critical settings:ansible_api_hostname
,ansible_content_hostname
,content_origin
. These settings must be correctly configured to match the URL of the Galaxy NG instance at https://galaxy.c2platform.org , as an incorrect configuration may hinder Galaxy NG’s correct operation outside the cluster. This setup is crucial for enabling the successful execution of theansible-galaxy collection install
command, as demonstrated in Utilizing the Ansible Automation Platform (AAP) from the Virtual Desktop.group_vars/galaxy/hub.yml
: This file contains configuration that is utilized by the galaxy.galaxy to configure the remotecommunity
collection’s “requirements”. It’s important to note that this collection is currently undergoing active development and is known to have a multitude of issues.
Warning!
At this juncture, it’s advisable to exercise caution when using thegalaxy.galaxy
collection. This collection has not yet been officially released
on the Ansible Galaxy
website and is presently in the midst of active development, marked by a
significant number of known issues.Additionally, within the Ansible collection project
c2platform.mw
,
you can explore:
- The
c2platform.mw.microk8s
Ansible role. - The
c2platform.mw.kubernetes
Ansible role.
To access various resources within the c2d
environment via the forward Proxy
please use the following URLs:
- https://galaxy.c2platform.org for the Automation Hub ( Galaxy NG ) web interface.
- https://dashboard-galaxy.c2platform.org/
for the Kubernetes Dashboard where Galaxy NG is deployed in the
galaxy
namespace. - Django REST framework
- Automation Hub API
Links
- For guidance on using the Automation Hub (Galaxy NG) from the Virtual Desktop, consult Use the Automation Hub ( Galaxy NG) from the Virtual Desktop.
- End User Installation · ansible/galaxy_ng Wiki . This document offers detailed instructions on installing Pulp and Galaxy NG from PyPi packages, along with an Ansible playbook. Although this method of installing Galaxy was initially considered, it has been surpassed by the preference for deploying Galaxy on Kubernetes through the utilization of the Pulp Operator.
- About Pulp 3 | software repository management
- OperatorHub.io | The registry for Kubernetes Operators
- pulp/pulp-operator: Kubernetes Operator for Pulp 3. Under active development.
- Galaxy NG
- Welcome to Pulp Ansible’s documentation!
- Settings
various settings that can be passed to Galaxy Operator using
pulp_settings
.
- Settings
various settings that can be passed to Galaxy Operator using
- pulp/pulp-operator: Kubernetes Operator for Pulp 3. Under active development.
- Red Hat Communities of Practice
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.