This module will install the Nexus 3 (>= 3.1) in your system.
The default version is the 3.9.0-01.
This module can also configure SSL for Nexus.
This module was tested under these platforms
- EL 7
- Debian 8 and 9
Tested only in X86_64 arch.
- Puppet >= 5.3.3
- Hiera >= 3.4.2 (v5 format)
Via git
# cd /etc/puppetlabs/code/environment/production/modules
# git clone https://github.com/instruct-br/puppet-nexus.git nexus
puppet apply -e "include nexus"
class { 'nexus':
http_listen_address => '192.168.250.80',
http_port => 8080,
major_version => 3,
minor_version => 7,
release_version => 1,
revision => 02,
}
## first generate a certificate
## puppet cert generate nexus
java_ks { 'nexus_keystore_base':
ensure => latest,
certificate => '/etc/puppetlabs/puppet/ssl/certs/ca.pem',
target => "${nexus::nexus_path}/etc/ssl/keystore.jks",
password => 'puppet',
trustcacerts => true,
}
java_ks { 'nexus_keystore_certs':
ensure => latest,
certificate => '/etc/puppetlabs/puppet/ssl/certs/nexus.pem',
private_key => '/etc/puppetlabs/puppet/ssl/private_keys/nexus.pem',
private_key_type => 'rsa',
target => "${nexus::nexus_path}/etc/ssl/keystore.jks",
password => 'puppet',
password_fail_reset => true,
}
class { 'nexus':
enable_https => true,
listen_address => '192.168.250.80',
https_port => 8081,
https_keystore => "${nexus::nexus_path}/etc/ssl/keystore.jks",
https_keystore_password => 'puppet',
}
nexus
nexus::install (private)
nexus::config (private)
nexus::service (private)
Type: String
User that will execute Nexus and own its directories
Type: String
Group for Nexus user
Type: String
Path where the file will be downloaded before extraction
Type: String
Path where Nexus will be extracted
Type: String
Name for Nexus's service
Type: String
Service provider
Type: String
Extension for filename that depends on OS
Type: String
Nexus's major version
Type: String
Nexus's minor version
Type: String
Nexus's release version
Type: String
Nexus's revision
Type: Integer
Port to serve HTTP
Type: Integer
Port to serve HTTPS
Type: String
IP address Nexus listen (same for http and https)
Type: Boolean
Whether to enable HTTPS or not
Type: String
Path to the keystore.jks
Type: String
Password to access the keystore
Type: String
The JVM minimum heap size. Default to '512M'.
Type: String
The JVM maximum heap size. Default to '1200M'.
Type: String
The JVM maximum direct memory size. Default to '2G'.
Type: Boolean
Whether this module will manage Java or not
Type: String
Java's desired distribution
---
nexus::user: 'nexus'
nexus::group: 'nexus'
nexus::service_name: 'nexus3'
nexus::major_version: '9'
nexus::minor_version: '0'
nexus::revision: '01'
nexus::http_port: 8081
nexus::listen_address: '0.0.0.0'
nexus::enable_https: true
nexus::https_port: 8082
---
nexus::temp_path
nexus::install_path
nexus::service_provider
nexus::os_ext
This is the Hiera v5 configuration inside the module.
This module does not have params class, everything is under hiera v5.
---
version: 5
defaults:
datadir: data
data_hash: yaml_data
hierarchy:
- name: "OSes"
paths:
- "oses/distro/%{facts.os.name}/%{facts.os.release.major}.yaml"
- "oses/family/%{facts.os.family}.yaml"
- name: "common"
path: "common.yaml"
This is an example of files under modules/nexus/data
common.yaml
oses/family/RedHat.yaml
oses/family/Debian.yaml
oses/family/Windows.yaml
oses/family/Darwin.yaml
This module was developed using
- Puppet 5.3.3
- Hiera 3.4.2 (v5 format)
- Facter 2.5.1
- CentOS 7.3
- Debian 8
- Vagrant 2.0.2 + VirtualBox 5.2.8
- box: centos/7
- box: debian/jessie64
Igor Oliveira