GALAXY 2.0 - BETA RELEASE

December 14, 2015 by Chris Houseknecht

 

We have been working hard on some exciting changes to Galaxy that we think you’re going to like. The changes are substantial, and we want your feedback, so today we are releasing Galaxy 2.0 in beta

2015-galaxy-blog-header.png

Check it out and help us shape the future of Galaxy. Comments and bug reports can be filed at
Galaxy Issues. Keep in mind that the beta site is purely a playground for trying out the new Galaxy. Any roles you import or remove will not be reflected in a future production Galaxy site.

What follows is a summary of some of the new features you’ll see on the beta site.

Tighter Integration with GitHub

Using your GitHub login, Galaxy now interacts directly with the GitHub API. This allows you to import all the repositories you collaborate on, including those in organizations you belong to.

To make it even better, we decoupled roles from the Galaxy username. Roles imported into Galaxy are now namespaced by GitHub user rather than Galaxy username. This gives you the flexibility of importing roles from your GitHub account or from an organization. The repo namespace in Galaxy will exactly match the GitHub namespace.

This might sound scary, especially if you imported roles in the past using a Galaxy username not matching your GitHub username. To keep things stable and not break dependencies, existing roles will not automatically move to the GitHub namespace. It’s up to you to move it when you’re ready - or never.

No More Ratings

Let’s face it. The Galaxy ratings were not great, so we chucked ‘em. Now you can access the GitHub Star and GitHub Watch buttons directly in Galaxy. Like a role? Click the star button. Want to be in the loop when a role gets updated? Click the watch button.

galaxyblog1

Download Counts

How many people are actually using this thing? Knowing that number seems like a pretty good measure of interest, so going forward we’ll be tracking each time a role is downloaded and installed by the ansible-galaxy client. It won’t be a perfect measurement, but it should be reasonably close.

galaxyblog2

Simple Role Management

Now with the toggle of a switch you can import any of your GitHub role repositories. We made Galaxy smarter by enabling it to use the GitHub API to view your repositories and know which ones contain an Ansible role. If you have access to a repo, and it looks like a role (i.e. it contains a meta/main.yml), it will appear on your My Roles page, where it can be imported.

galaxyblog3

And if you don’t want the role in Galaxy anymore, slide the toggle the other way. Done.

Smarter Role Imports

Imports now come with full detail to help you troubleshoot when something goes wrong.

galaxyblog4

Travis Integration

Start testing your roles and enjoy automatic Galaxy imports. It’s easy!

Add your Travis token to any role you want to integrate with Travis CI. Your token is not stored in Galaxy. It is used to calculate a hash as described in the Travis documentation and then discarded.

Add the token on My Roles page.

galaxyblog5

Enable the repo on your Travis profile page.

galaxyblog6

Add a .travis.yml file to your repo that includes a notifications section with webhooks pointed to the beta server as pictured below.

notifications:
    webhooks: https://galaxy-qa.ansible.com/api/v1/notifications/
NOTE: For a full .travis.yml example run the init command with the ansible-galaxy command line tool. Starting in Ansible 2.0, the generated scaffolding includes a working .travis.yml file and related tests folder.

Push the changes to your GitHub repo, and see the Travis build icon appear on your role.

galaxyblog8

Want to associate Galaxy imports with a specific branch? No problem. Assign the name of the branch to github_branch in meta/main.yml.

galaxy_info:
    author: Me
    description: A super, fantastic, must-have role.
    company: Ansible, inc.
    license: MIT
    min_ansible_version: 1.9
    github_branch: release

Command Line Improvements

The ansible-galaxy command line client is getting some love as well. In the Ansible 2.0 release we added import, delete, setup and login commands to provide a full set of tools for managing roles. You’ll see more and better output with the search command. And as mentioned earlier, we added a sample test playbook and a .travis.yml file to help you test your roles.

Try it Out

Lots of new things to take for a test drive. Check it out, and let us know about your experience at Galaxy Issues. We’re excited to hear what you think!

 

Share:

Topics:
GitHub, Ansible Galaxy, Travis CI


 

Chris Houseknecht

Chris is the Principal Engineer at Ansible by Red Hat. Starting as employee number five, Chris keeps watch over Ansible Docker modules, maintains Ansible Galaxy and is the lead Engineer for Ansible Container. When he’s not working he spends his time cooking, walking his dogs or outside on his mountain bike or motorcycle. He can be found on twitter at @chouseknecht.


rss-icon  RSS Feed

Ansible Tower by Red Hat
Ansible In-Depth Whitepaper
ansiblefest brooklyn 2016
Learn About Ansible Tower