Forge Home

nexus

Puppet module for Sonatype Nexus

177,911 downloads

64,588 latest version

4.6 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 1.7.3 (latest)
  • 1.7.1
  • 1.7.0
  • 1.6.1
  • 1.6.0
  • 1.5.0
  • 1.4.0
  • 1.3.3
  • 1.3.2
  • 1.3.1
  • 1.2.0
  • 1.0.1
released Oct 27th 2017
This version is compatible with:
  • , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'hubspot-nexus', '1.7.3'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add hubspot-nexus
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install hubspot-nexus --version 1.7.3

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download
Tags: nexus

Documentation

hubspot/nexus — version 1.7.3 Oct 27th 2017

Sonatype Nexus Puppet module Build Status

Install and configure Sonatype Nexus.

Requires

  • maestrodev/wget
  • puppetlabs/stdlib

Usage

The following is a basic role class for building a nexus host. Adjust accordingly as needed.

NOTE: you must pass version to Class['nexus']. This is needed for the download link and determining the name of the nexus directory.

class role_nexus_server {

  # puppetlabs-java
  # NOTE: Nexus requires
  class{ '::java': }

  class{ '::nexus':
    version    => '2.8.0',
    revision   => '05',
    nexus_root => '/srv', # All directories and files will be relative to this
  }

  Class['::java'] ->
  Class['::nexus']
}

NOTE: If you wish to deploy a Nexus Pro server instead of Nexus OSS set deploy_pro => true

Usage(draft): Nexus 3 support

class role_nexus_server {

  class{ '::nexus':
    version               => '3.0.0',
    revision              => '03',
    download_site         => 'http://download.sonatype.com/nexus/3',
    nexus_type            => 'unix',
    nexus_work_dir_manage => false
  }

}

NOTE: If you wish to use Nexus 3, nexus_work_dir_manage need to be set to false because this module support only Nexus 3 installation

Nginx proxy

The following is setup for using the jfryman/puppet-nginx module. Nexus does not adequately support HTTP and HTTPS simultaneously. Below forces all connections to HTTPS. Be sure to login after the app is up and head to Administration -> Server. Change the base URL to "https" and check "Force Base URL". The application will be available at:

https://${::fqdn}/nexus/

  class{ '::nginx': }

  file { '/etc/nginx/conf.d/default.conf':
    ensure => absent,
    require => Class['::nginx::package'],
    notify => Class['::nginx::service']
  }

  nginx::resource::vhost { 'nexus':
    ensure            => present,
    www_root          => '/usr/share/nginx/html',
    rewrite_to_https  => true,
    ssl               => true,
    ssl_cert          => '/etc/pki/tls/certs/server.crt',
    ssl_key           => '/etc/pki/tls/private/server.key',
  }

  nginx::resource::location { 'nexus':
    ensure    => present,
    location  => '/nexus',
    vhost     => 'nexus',
    proxy     => "http://${nexus_host}:${nexus_port}/nexus",
    ssl       => true,
  }

TODO

  • Find a way to not require a version to be passed to Class['nexus']

Authors

Copyright

Hubspot, Inc.