Setup for nexus OSS version 2. No download, only configuration
parent
78e96f5c95
commit
143b88202a
@ -1,3 +1,21 @@
|
||||
---
|
||||
nexus_behind_nginx: True
|
||||
nexus_service_port: 8081
|
||||
nexus_service_bind_host: 127.0.0.1
|
||||
nexus_major_version: '2'
|
||||
#nexus_version: '{{ nexus_major_version }}.28.1'
|
||||
nexus_version: '{{ nexus_major_version }}.14.19'
|
||||
nexus_release: '01'
|
||||
nexus_download_url: 'https://download.sonatype.com/nexus/{{ nexus_major_version }}/nexus-{{ nexus_version }}-{{ nexus_release }}-unix.tar.gz'
|
||||
nexus_install_basedir: /srv/nexus
|
||||
nexus_webapp_dir: '{{ nexus_install_basedir }}/nexus-oss-webapp'
|
||||
nexus_data_basedir: /data
|
||||
nexus_data_dir: '{{ nexus_data_basedir }}/sonatype-work/nexus'
|
||||
nexus_logdir: '/var/log/nexus'
|
||||
nexus_accesslog_maxhistory: 20
|
||||
nexus_wrapper_initmemory: 256
|
||||
nexus_wrapper_maxmemory: 1024
|
||||
nexus_wrapper_conf_dir: '{{ nexus_webapp_dir }}/bin/jsw/conf'
|
||||
nexus_wrapper_logdir: '/var/log/nexus-wrapper'
|
||||
# MB
|
||||
nexus_wrapper_diskcache_buffersize: 4096
|
||||
|
@ -1,2 +1,6 @@
|
||||
---
|
||||
# handlers file for ansible-role-template
|
||||
- name: Reload the systemd data
|
||||
systemd: daemon_reload=yes
|
||||
|
||||
- name: Restart Nexus
|
||||
service: name=nexus state=restarted
|
||||
|
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
|
||||
Sonatype Nexus (TM) Open Source Version
|
||||
Copyright (c) 2008-present Sonatype, Inc.
|
||||
All rights reserved. Includes the third-party code listed at http://links.sonatype.com/products/nexus/oss/attributions.
|
||||
|
||||
This program and the accompanying materials are made available under the terms of the Eclipse Public License Version 1.0,
|
||||
which accompanies this distribution and is available at http://www.eclipse.org/legal/epl-v10.html.
|
||||
|
||||
Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc. "Sonatype" and "Sonatype Nexus" are trademarks
|
||||
of Sonatype, Inc. Apache Maven is a trademark of the Apache Software Foundation. M2eclipse is a trademark of the
|
||||
Eclipse Foundation. All other trademarks are the property of their respective owners.
|
||||
|
||||
-->
|
||||
<configuration>
|
||||
|
||||
<appender name="request.logfile" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<File>{{ nexus_logdir }}/request.log</File>
|
||||
<Append>true</Append>
|
||||
<encoder class="org.sonatype.nexus.bootstrap.log.AccessPatternLayoutEncoder">
|
||||
<pattern>%clientHost %l %user [%date] "%requestURL" %statusCode %bytesSent %elapsedTime</pattern>
|
||||
</encoder>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>{{ nexus_logdir }}/request-%d{yyyy-MM-dd}.log.gz</fileNamePattern>
|
||||
<maxHistory>{{ nexus_accesslog_maxhistory }}</maxHistory>
|
||||
</rollingPolicy>
|
||||
</appender>
|
||||
|
||||
<appender-ref ref="request.logfile"/>
|
||||
</configuration>
|
@ -0,0 +1,36 @@
|
||||
#
|
||||
# Sonatype Nexus (TM) Open Source Version
|
||||
# Copyright (c) 2008-present Sonatype, Inc.
|
||||
# All rights reserved. Includes the third-party code listed at http://links.sonatype.com/products/nexus/oss/attributions.
|
||||
#
|
||||
# This program and the accompanying materials are made available under the terms of the Eclipse Public License Version 1.0,
|
||||
# which accompanies this distribution and is available at http://www.eclipse.org/legal/epl-v10.html.
|
||||
#
|
||||
# Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc. "Sonatype" and "Sonatype Nexus" are trademarks
|
||||
# of Sonatype, Inc. Apache Maven is a trademark of the Apache Software Foundation. M2eclipse is a trademark of the
|
||||
# Eclipse Foundation. All other trademarks are the property of their respective owners.
|
||||
#
|
||||
|
||||
# Sonatype Nexus
|
||||
# ==============
|
||||
# This is the most basic configuration of Nexus.
|
||||
|
||||
# Jetty section
|
||||
application-port={{ nexus_service_port }}
|
||||
application-host={{ nexus_service_bind_host }}
|
||||
nexus-webapp=${bundleBasedir}/nexus
|
||||
nexus-webapp-context-path=/nexus
|
||||
|
||||
# Nexus section
|
||||
#nexus-work=${bundleBasedir}/../sonatype-work/nexus
|
||||
nexus-work={{ nexus_data_dir }}
|
||||
runtime=${bundleBasedir}/nexus/WEB-INF
|
||||
|
||||
# orientdb buffer size in megabytes
|
||||
storage.diskCache.bufferSize={{ nexus_wrapper_diskcache_buffersize }}
|
||||
|
||||
# Storage whitelist
|
||||
# Generated using existing configured values from all repositories if not found on upgrade
|
||||
# Comma-separated list of allowed override storage locations for repositories
|
||||
# See https://links.sonatype.com/products/nxrm2/configuring-repositories
|
||||
nexus.override.local.storage.whitelist=
|
@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=nexus service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
LimitNOFILE=65536
|
||||
ExecStart={{ nexus_webapp_dir }}/bin/nexus start
|
||||
ExecStop={{ nexus_webapp_dir }}/bin/nexus stop
|
||||
User={{ nexus_user }}
|
||||
Restart=on-abort
|
||||
TimeoutSec=600
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -0,0 +1,53 @@
|
||||
|
||||
wrapper.java.additional.3=-Dcom.sun.jndi.ldap.connect.pool.protocol="plain ssl"
|
||||
wrapper.java.additional.3.stripquotes=TRUE
|
||||
#wrapper.java.additional.4=-Xdebug
|
||||
#wrapper.java.additional.5=-Xnoagent
|
||||
#wrapper.java.additional.6=-Djava.compiler=NONE
|
||||
#wrapper.java.additional.7=-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||
#wrapper.java.additional.8=-XX:+HeapDumpOnOutOfMemoryError
|
||||
|
||||
wrapper.app.parameter.1=./conf/jetty.xml
|
||||
wrapper.app.parameter.2=./conf/jetty-requestlog.xml
|
||||
|
||||
# Size Java memory, in MB (-Xms)
|
||||
wrapper.java.initmemory={{ nexus_wrapper_initmemory }}
|
||||
# Size Java memory, in MB (-Xmx). This option only supports a setting up to 4000 (4Gb).
|
||||
# If you need more, comment this option out and use an explicit wrapper.java.additional option with -Xmx
|
||||
wrapper.java.maxmemory={{ nexus_wrapper_maxmemory }}
|
||||
|
||||
# How much to wait for JVM to respond to "ping" (increase on slower machines and VMs if needed)
|
||||
wrapper.ping.timeout=0
|
||||
# How much to wait for application to start up (increase on slower machines if needed)
|
||||
wrapper.startup.timeout=0
|
||||
# How much to wait for application to shutdown
|
||||
wrapper.shutdown.timeout=300
|
||||
|
||||
# Make wrapper reload configuration between app restarts
|
||||
# and set exit code 12 as "RESTART" command
|
||||
wrapper.restart.reload_configuration=TRUE
|
||||
wrapper.on_exit.12=RESTART
|
||||
|
||||
# Set up JSW logging
|
||||
wrapper.logfile={{ nexus_wrapper_logdir }}/wrapper.log
|
||||
wrapper.logfile.format=PM
|
||||
wrapper.logfile.loglevel=INFO
|
||||
wrapper.logfile.maxsize=10m
|
||||
wrapper.logfile.maxfiles=10
|
||||
|
||||
# Set up system logging (if needed, change to INFO or other valid values)
|
||||
wrapper.syslog.loglevel=NONE
|
||||
|
||||
# Set up JSW Console
|
||||
wrapper.console.title=Sonatype Nexus
|
||||
wrapper.console.format=PM
|
||||
wrapper.console.loglevel=INFO
|
||||
wrapper.console.flush=true
|
||||
|
||||
# Set up JSW as NT Service (unused on other OSes)
|
||||
wrapper.ntservice.name=nexus-webapp
|
||||
wrapper.ntservice.displayname=nexus
|
||||
wrapper.ntservice.description=Sonatype Nexus
|
||||
wrapper.ntservice.dependency.1=
|
||||
wrapper.ntservice.starttype=AUTO_START
|
||||
wrapper.ntservice.interactive=false
|
Loading…
Reference in New Issue