Forge Home

nexus

Manages Sonatype Nexus

12,130 downloads

6,601 latest version

5.0 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.

Version information

  • 0.3.0 (latest)
  • 0.2.1
  • 0.2.0
  • 0.1.3
  • 0.1.2
  • 0.1.1
  • 0.1.0
released Jul 28th 2016
This version is compatible with:
  • Puppet Enterprise 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 3.0.0
  • ,

Start using this module

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

Add this module to your Puppetfile:

mod 'unibet-nexus', '0.3.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

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

Manually install this module globally with Puppet module tool:

puppet module install unibet-nexus --version 0.3.0

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

Documentation

unibet/nexus — version 0.3.0 Jul 28th 2016

nexus

Build Status

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with nexus
  4. Usage - Configuration options and additional functionality
  5. Limitations - OS compatibility, etc.

Overview

Installs Sonatype Nexus OSS from tar ball. Tested on RHEL derivates but should work on any distro provided it has java, wget and tar/gzip installed.

Module Description

Nexus is a commercial software artifact repository provided by Sonatype, this module installs the open source version (Nexus OSS).

Configuration parameters is kept to a minimum, other modules such as the nice nexus_rest module from Atlassian: https://forge.puppetlabs.com/atlassian/nexus_rest could be used together with this module encapsulated in something like a profile module.

Setup

What nexus affects

  • Downloads and extract the Nexus OSS tar ball
  • Creates user and group
  • Supports installation of plugins

Setup Requirements

This module assumes you already have the required JDK installed, and the tar ball installation depends on wget, tar and gzip, rather than locking you to a particular module implementation of these tools you should install them outside of this module.

Oracle JDK is required for Nexus to function as expected, actually Nexus 2 does not even start when using OpenJDK.

Beginning with nexus

For Nexus 2 OSS example see test/integration/default/puppet/manifests/site.pp for minimal RHEL setup.

Nexus 3 OSS support is available as well, see test/integration/nexus3/puppet/manifests/site.pp or this section that I copy pasted into the readme:

$java_packages = $::osfamily ? {
  redhat  => 'java-1.8.0-openjdk',
  debian  => ['openjdk-8-jdk', 'openjdk-8-jre']
}
if $::osfamily == 'RedHat' {
  package { 'epel-release': ensure => installed } -> Package[$java_packages]
}
package { $java_packages: ensure => installed }

package { ['tar', 'gzip', 'wget']: ensure => present } ->
class { '::nexus':
  download_url => 'http://download.sonatype.com/nexus/3/nexus-3.0.0-03-unix.tar.gz',
  version      => '3.0.0-03',
  initmemory   => '512M',
  maxmemory    => '512M',
}

By default the data directory is stored in the installation folder of the Nexus 3 distribution you should control this by setting some extra parameters, moving the data directory outside of the installation dir:

class { '::nexus':
  download_url   => 'http://download.sonatype.com/nexus/3/nexus-3.0.0-03-unix.tar.gz',
  version        => '3.0.0-03',
  data_directory => '/opt/sonatype-data',
  tmp_directory  => '/opt/sonatype-data/tmp',
}

Upgrades can be done by setting a new version but take caution when doing this on mission critical systems, it is recommended to test upgrade before hand, have the proper backups in place etc. For example upgrading from 3.0.0-03 to 3.0.1-01 required purging of karaf bundle cache files: https://issues.sonatype.org/browse/NEXUS-10449

Usage

The only class that should be included in your manifest is the nexus class.

Limitations

Only tested on EL6 and 7, may work on other distros and version combinations. Pull requests are always welcome!