cookbook 'nexus3', '= 0.1.1'
nexus3
(36) Versions
0.1.1
-
Follow8
Installs/Configures Sonatype Nexus 3 Repository Manager
cookbook 'nexus3', '= 0.1.1', :supermarket
knife supermarket install nexus3
knife supermarket download nexus3
Nexus3 Cookbook
This cookbook installs and configures Nexus 3 Repository Manager OSS (http://www.sonatype.com/download-oss-sonatype).
Usage
Include default recipe or use
nexus3 resource to download and install
the latest Nexus 3 Repository Manager OSS.
Requirements
Nexus Repository Manager requires a Java 8 Runtime Environment (JRE) from Oracle which is not included in this cookbook.
Platforms
- CentOS, RedHat, Fedora
- Debian, Ubuntu
Recipes
default
Downloads and installs the latest Nexus 3 Repository Manager OSS.
Attributes
-
node['nexus3']['url']
- The download URL of latest Nexus 3 Repository Manager OSS. This can be updated to download a specific version of Nexus Repository Manager OSS or Nexus Repository Manager Pro. Defaulthttp://download.sonatype.com/nexus/3/latest-unix.tar.gz
. -
node['nexus3']['checksum']
(optional) - The checksum of Nexus Repository Manager. Defaultnil
. -
node['nexus3']['data']
- Data directory. Default/opt/repository/data
. -
node['nexus3']['root']
- Root directory. Default/opt/nexus
. -
node['nexus3']['home']
- Link to install directory. Default#{node['nexus3']['root']}/nexus3
. -
node['nexus3']['cfg_cookbook']
- Cookbook that contains the template to use. Defaultnexus3
. -
node['nexus3']['cfg_source']
- Template file that will be used to create the#{home}/bin/org.sonatype.nexus.cfg
file. Defaultorg.sonatype.nexus.cfg.erb
. -
node['nexus3']['cfg_variables']
- A Hash of variables that are passed into a template file. Default{ port: '8081', context_path: '/' }
. -
node['nexus3']['vmoptions']
- Array of application startup options used to create the#{home}/bin/nexus.vmoptions
file. Default['-Xms1200M', '-Xmx1200M', '-XX:+UnlockDiagnosticVMOptions', '-XX:+UnsyncloadClass', '-Djava.net.preferIPv4Stack=true', '-Dkaraf.home=.', '-Dkaraf.base=.', '-Dkaraf.etc=etc', '-Djava.util.logging.config.file=etc/java.util.logging.properties', "-Dkaraf.data=#{node['nexus3']['data']}", "-Djava.io.tmpdir=#{node['nexus3']['data']}/tmp", '-Dkaraf.startLocalConsole=false']
.
Examples
Changing the HTTP Port and/or Context Path
The default value for the HTTP port used to access the repository manager user interface and resources is 8081.
To change HTTP Port and Context Path as 9081 and /components/, set the cfg_variables hash with the updated settings:
include_recipe 'java_se' node.default['nexus3']['cfg_variables'] = { port: '9081', context_path: '/components/' } include_recipe 'nexus3'
Updating Memory Allocation and other JVM Paramaters
The default and maximum heap sizes for the repository manager are a value of 1200M, suitable for most usage patterns.
To install latest nexus3 with 1500M initial memory and 2G max memory, set it in the vmoptions array along with all
the other settings:
include_recipe 'java_se' node.default['nexus3']['vmoptions'] = [ '-Xms1500M', '-Xmx2G', '-XX:+UnlockDiagnosticVMOptions', '-XX:+UnsyncloadClass', '-Djava.net.preferIPv4Stack=true', '-Dkaraf.home=.', '-Dkaraf.base=.', '-Dkaraf.etc=etc', '-Djava.util.logging.config.file=etc/java.util.logging.properties', "-Dkaraf.data=#{node['nexus3']['data']}", "-Djava.io.tmpdir=#{node['nexus3']['data']}/tmp", '-Dkaraf.startLocalConsole=false' ] include_recipe 'nexus3'
Resources
nexus3
Downloads and installs the latest Nexus Repository Manager OSS v3.
Actions
-
:install
- Default. Downloads and installs the latest Nexus Repository Manager OSS v3.
-
:nothing
- Define this resource block to do nothing until notified by another resource to take action. When this resource is notified, this resource block is either run immediately or it is queued up to be run at the end of the chef-client run.
Attributes
-
servicename
- Name of service. Default value is the name of the resource block. -
user
- The owner of nexus3. Creates a nexus user when nil or uses value passed in. Defaultnil
. -
group
- The group of nexus3. Creates a nexus group when nil or uses value passed in. Defaultnil
. -
url
- The download URL of latest Nexus 3 Repository Manager OSS. This can be updated to download a specific version of Nexus Repository Manager OSS or Nexus Repository Manager Pro. Defaultnode['nexus3']['url']
. -
checksum
(optional) - The checksum of Nexus Repository Manager. Defaultnode['nexus3']['checksum']
. -
data
- Data directory. Defaultnode['nexus3']['data']
. -
root
- Root directory. Defaultnode['nexus3']['root']
. -
home
- Link to install directory. Defaultnode['nexus3']['home']
. -
cfg_cookbook
- Cookbook that contains the template to use. Defaultnode['nexus3']['cfg_cookbook']
. -
cfg_source
- Template file that will be used to create the#{home}/bin/org.sonatype.nexus.cfg
file. Defaultnode['nexus3']['cfg_source']
. -
cfg_variables
- A Hash of variables that are passed into a template file. Defaultnode['nexus3']['cfg_variables']
. -
vmoptions
- Array of application startup options used to create the#{home}/bin/nexus.vmoptions
file. Defaultnode['nexus3']['vmoptions']
.
Examples
Changing the HTTP Port and/or Context Path
The default value for the HTTP port used to access the repository manager user interface and resources is 8081.
To change HTTP Port and Context Path as 9081 and /components/, set the cfg_variables hash with the updated settings:
include_recipe 'java_se' nexus3 'nexus' do cfg_variables( port: '9081', context_path: '/components/' ) action :install end
Updating Memory Allocation and other JVM Paramaters
The default and maximum heap sizes for the repository manager are a value of 1200M, suitable for most usage patterns.
To install latest nexus3 with 1500M initial memory and 2G max memory, set it in the vmoptions array along with all
the other settings:
include_recipe 'java_se' nexus3 'nexus' do vmoptions( [ '-Xms1500M', '-Xmx2G', '-XX:+UnlockDiagnosticVMOptions', '-XX:+UnsyncloadClass', '-Djava.net.preferIPv4Stack=true', '-Dkaraf.home=.', '-Dkaraf.base=.', '-Dkaraf.etc=etc', '-Djava.util.logging.config.file=etc/java.util.logging.properties', "-Dkaraf.data=#{data}", "-Djava.io.tmpdir=#{data}/tmp", '-Dkaraf.startLocalConsole=false' ] ) action :install end
Nexus3 Cookbook Matchers
- install_nexus3(resource_name)
Getting Help
- Ask specific questions on Stack Overflow.
- Report bugs and discuss potential features in Github issues.
Contributing
Please refer to CONTRIBUTING.
License
MIT - see the accompanying LICENSE file for details.
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Changelog
0.1.1 2016-07-28
- Fix #1 FileNotFoundException due to Chef searching for template files in a wrapper cookbook
0.1.0 2016-07-26
- Initial beta release
Collaborator Number Metric
0.1.1 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Foodcritic Metric
0.1.1 passed this metric
0.1.1 failed this metric
0.1.1 passed this metric