/ansible-nexus

An Ansible role that installs and configures Nexus Repository OSS service on Linux

Apache License 2.0Apache-2.0

nexus

Build Status Ansible Galaxy

An Ansible role that installs and configures Nexus Repository OSS service on Linux.

It installs Nexus Repository OSS and some tooling: unzip, gzip, bzip2 and maven.

Platforms

Role tested on Linux operating systems:

  • Ubuntu Server 16.04 LTS
  • Ubuntu Server 18.04 LTS

Requirements

It recommends a server with 4 CPUs and assumes that the server will have at lest 4GB of RAM. For more informantion see the nexus_sizing_profile variable.

Role Variables

nexus_major_version: The Nexus Repository OSS major version to install.

Default: 3

nexus_major_version: 3

nexus_archive_version: The Nexus Repository OSS archive version.

Default: nexus-3.12.1-01

nexus_archive_version: nexus-3.12.1-01

nexus_application_port: host port.

Default: 8091

nexus_application_port: 8091

nexus_application_host: host address.

Default: 0.0.0.0

nexus_application_host: 0.0.0.0

nexus_sizing_profile: Instance Sizing profiles.

Default: small

The role follows the general memory guidelines:

  • set minimum heap should always equal set maximum heap
  • minimum heap size 1200MB
  • maximum heap size <= 4GB
  • minimum MaxDirectMemory size 2GB
  • minimum unallocated physical memory should be no less than 1/3 of total physical RAM to allow for virtual memory swap
  • max heap + max direct memory <= host physical RAM * 2/3

Do not set max heap size larger than 4GB

Here are instance profiles pre-configured that you can use to configure physical memory requirements needed for a dedicated server:

Profile Use Case  Physical Memory RAM Example Maximum Memory Configuration
small 4 GB -Xms1200M -Xmx1200M -XX:MaxDirectMemorySize=2G
medium 8 GB -Xms2703M -Xmx2703M -XX:MaxDirectMemorySize=2703M
large16 16 GB -Xms4G -Xmx4G -XX:MaxDirectMemorySize=6717M
large32 32 GB -Xms4G -Xmx4G -XX:MaxDirectMemorySize=17530M
large64 64 GB -Xms4G -Xmx4G -XX:MaxDirectMemorySize=39158M
nexus_sizing_profile: small

nexus_instance_profiles: A dict variable that is used by nexus_sizing_profile varible to configure JVM options for memory usage.

Default: N/A

nexus_instance_profiles:
  small:
    xms: 1200M
    xmx: 1200M
    xx_max_direct_memory_size: 2G
  medium:
    xms: 2703M
    xmx: 2703M
    xx_max_direct_memory_size: 2703M
  large16:
    xms: 4G
    xmx: 4G
    xx_max_direct_memory_size: 6717M
  large32:
    xms: 4G
    xmx: 4G
    xx_max_direct_memory_size: 17530M
  large64:
    xms: 4G
    xmx: 4G
    xx_max_direct_memory_size: 39158M

Dependencies

everproven.jdk: Installs Oracle Java Development Kit 1.8.

Example Playbook

- hosts: nexus
  become: True
  roles:
  - role: everproven.nexus

License

Apache License 2.0

Author Information

Ever Proven