owned this note
owned this note
Published
Linked with GitHub
# Host Your Own Ansible Galaxy
In an on-premise environment, discovering and sharing Ansible content between different parts of your organization is a major problem. With the release of Ansible Galaxy_NG, you can take advantage of the following workflows on-premise:
1. Enable multiple teams to produce Ansible collections within your organization
2. Search for, discover, view, and use collections that already exist in your organization
3. Mix-and-match your private collections with public collections from either galaxy.ansible.com or supported collections from cloud.redhat.com
4. Add private Ansible collections to AWX
## The Ansible Galaxy_NG Workflow
<iframe width="560" height="315" src="https://www.youtube.com/embed/f5-IO1ExlHU" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Using the Ansible Galaxy_NG web UI, you can upload collections to various namespaces. You can also identify collections that you want to synchronize from galaxy.ansible.com or cloud.redhat.com. All of these collections are browseable via the web UI. Once you select the collections you need, the web UI generates the command line copy-and-paste commands that clients can use to install on-premise hosted collections to various development machines.
Using the galaxy.ansible.com website, the Ansible community can share a wide range of Ansible content, but running it on-premise has been hard or impossible in practice. If you work within an area of limited Internet access or security policies that limits your connectivity, accessing galaxy.ansible.com becomes problematic. Additionally, if you develop Ansible content that your organization needs to store privately, Ansible Galaxy’s public nature doesn’t provide a suitable environment for you to distribute your Ansible content within your organization. If you have tried to manage Ansible content on-premise or using a version control system such as Git, it can be challenging to discover, release, collaborate on, and distribute Ansible content within your organization. Ansible Galaxy_NG is a free open source tool that makes hosting your private Ansible collections a lot easier.
Ansible Galaxy_NG is built by the same team that brought you galaxy.ansible.com. The NG portion of the name stands for "Next Generation" and is designed to be a collection focused, user-friendly, on-premise reboot of the use cases provided by galaxy.ansible.com. They've teamed up with the [Pulp project](https://pulpproject.org/) who has been providing on-premise Ansible collection and role storage with the Pulp Ansible plugin for over two years. The Galaxy_NG project is built on top of the Pulp Ansible plugin and adds a web UI and structured workflow that uses features of the Pulp Ansible plugin. Using Ansible Galaxy_NG, you can import public and private Ansible collections, and manage their promotion to different development lifecycle environments.
## Connecting Ansible Galaxy_NG with Ansible Galaxy and others
A valuable feature of Ansible Galaxy_NG is the ability to synchronize collection content from remote sources. These can be galaxy.ansible.com or Red Hat Certified and Supported Content. You can easily set up a remote sync from the Galaxy_NG user interface by passing your authorizing token to the preconfigured endpoints or, for galaxy.ansible.com, the list of collections you wish to synchronize, and click **Sync**. The collections are synchronized to the local Ansible Galaxy_NG server and are available for the `ansible-galaxy` CLI to download and install. You can control what content from these remote sources are available to your Ansible environments.

## Manage Dependencies with Ease
Another challenge is the need to maintain a list of Ansible collections dependencies on every client. For example, with Git, if you have hundreds or thousands of servers, you would need to maintain and pick the Git reference and tag for each Ansible collections dependency on every client. With Ansible Galaxy_NG, dependency metadata can be moved to the server side, allowing clients to easily receive the relevant Ansible collections.
```yaml
namespace: "namespace_name"
name: "collection_name"
version: "1.0.12"
readme: "README.md"
authors:
- "Author1"
- "Author2 (https://author2.example.com)"
- "Author3 <author3@example.com>"
dependencies:
"other_namespace.collection1": ">=1.0.0"
"other_namespace.collection2": ">=2.0.0,<3.0.0"
"anderson55.my_collection": "*" # note: "*" selects the highest version available
license:
- "MIT"
tags:
- demo
- collection
repository: "https://www.github.com/my_org/my_collection"
```
## Manage Ansible Collection Lifecycles
In Ansible Galaxy_NG, you can define your environments and what Ansible collections to include in those environments. According to the maturity phases of the environment, for example, `dev`, `staging`, and `production`, you can promote Ansible collections across one environment to another. If you do not want to include a specific repository, you can inspect and reject specific Ansible collections. In this way, you can protect the stability and integrity of your environment.
## Using your private Ansible Collection in AWX
Using Ansible Galaxy_NG, you can pull private Ansible collections from a Galaxy_NG server into AWX. You can stage Ansible collections, whether they are from galaxy.ansible.com, Red Hat, or your own private collections on the Galaxy_NG server when the AWX server is not directly connected to the internet. Linking AWX and Galaxy_NG together is done using AWX credentials that are defined for the organisation. This means you can connect multiple Galaxy_NG servers with a single AWX server.

If you’re interested in installing Ansible Galaxy_NG, check out the [Ansible Galaxy_NG GitHub](https://github.com/ansible/galaxy_ng).
## Pulp Ansible Plugin
Ansible Galaxy_NG comes with a web UI and a workflow, but it does not contain functionality to manage Ansible roles. If you need to manage Ansible roles, you can use Pulp with the Pulp Ansible plugin to mirror, synchronize, and distribute Ansible roles. While the Pulp Ansible plugin can perform this functionality, it does not have a web UI or a structured workflow, so you have to interact with the REST API.
For more information about Pulp, and Pulp Ansible, [Pulp website](https://pulpproject.org/) or read the opensource.con article [Manage your software repositories with this open source tool](https://opensource.com/article/20/8/manage-repositories-pulp).
## The Ansible Galaxy_NG Community Needs You
As this is the first release of Ansible Galaxy_NG, your input will help shape its future. If you need to manage Ansible collecions on-premise, please let us know if the workflows that are covered by this release suit your deployment. If you think something is missing, you can [request features](https://github.com/ansible/galaxy_ng/issues). If you have general questions, need support or would like to provide feedback, please feel free to write to our [mailing list](https://www.redhat.com/mailman/listinfo/galaxy-ng) or find us on Freenode IRC in the `#ansible-galaxy` channel.
If you find any bugs, you can file an [issue](https://github.com/ansible/galaxy_ng/issues).