Puppet Module for Sonatype Nexus

Developer, Peter Leschev

Puppet Module For Nexus

Our friends at Atlassian have created an open-sourced Puppet module to help manage the configuration of Sonatype Nexus instances. Here’s the news directly from Peter Leschev, Senior Development Team Lead:

Developer, Peter LeschevThe Build Engineering team at Atlassian has been running Sonatype Nexus instances for a few years now. We use Nexus for storing our public and private artifacts on https://maven.atlassian.com/ (which receives 2.6 million requests/day), publishing to maven central and the various proxies that we have spread out across the world to support our build grid, and our global development teams.

Sonatype’s support has been absolutely fantastic when we’ve hit hairy scaling issues. We’re also big users of Puppet where we manage our infrastructure as code. We originally managed our Sonatype Nexus instances by getting Puppet to manage the various xml files in the ‘sonatype-work/nexus/conf’ directory. This option had a few problems:

  • The need to restart Nexus to make sure new XML configuration files are processed
  • Ephemeral changes (staging repositories, for example) are lost after a Puppet run
  • When Nexus changes XML configuration files, Puppet will overwrite them and restart Nexus
  • Using XML for configuration is so passé

Having Nexus & Puppet fight over control of the configuration files isn’t a fun experience. The other alternative is to use Puppet Augeas, which allows more intelligent management of XML content, but this approach still shares several disadvantages and has its own:

  • The need to restart Nexus to make sure new XML configuration files are processed
  • Have to manage and maintain XML configuration templates and files
  • Introduce additional complexity to Puppet manifests

Thankfully, Nexus comes with a REST API, and we’ve taken advantage of it in writing a Puppet module that aims to address all of the above disadvantages. We’ve now open sourced this Puppet module so you can use it to manage your own Nexus instances in a Puppet managed environment.

Read Peter’s full article, along with code snippets on his Atlassian blog, or go directly to the project page on Puppet Forge.

The following two tabs change content below.

Mark Miller

Senior Storyteller and Community Advocate at Sonatype
Mark Miller is Senior Storyteller and DevOps Advocate for TheNEXUS. His expertise is in the creation and growth of online communities. Mark is Executive Producer of the OWASP 24/7 Podcast Series and is co-producer of the world's largest online DevOps conference, All Day DevOps. You can follow him on Twitter: @AllDayDevOps. You can also find him as the moderator of the LinkedIn DevOps Group.

Related posts

One Comment;

  1. Derek E. Weeks said:

    Great to see that this module now has over 21,000 downloads (as of March 2015). Nice work and a great contribution to the Puppet and Nexus communities.