nexus

Manages Sonatype Nexus
North Development

North Development

unibet

10,583 downloads

5,462 latest version

5.0 quality score

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 3rd 2019
This version is compatible with:
  • Puppet Enterprise 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
  • RedHat
    ,
    CentOS

Start using this module

Documentation

unibet/nexus — version 0.3.0 Jul 3rd 2019

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!