Add module for CI custom configuration
This module holds custom config files required for single node CI setup Change-Id: I22bb33c266e1f9035f7a8b0dce61dc3bf3b7cc39
This commit is contained in:
parent
a55e748833
commit
5da365ea84
|
@ -0,0 +1,11 @@
|
|||
ProxyPass /jenkins http://localhost:8080/jenkins
|
||||
ProxyPassReverse /jenkins http://localhost:8080/jenkins nocanon
|
||||
ProxyRequests Off
|
||||
AllowEncodedSlashes NoDecode
|
||||
|
||||
# Local reverse proxy authorization override
|
||||
# Most unix distribution deny proxy by default (ie /etc/apache2/mods-enabled/proxy.conf in Ubuntu)
|
||||
<Proxy http://localhost:8080/jenkins*>
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</Proxy>
|
|
@ -0,0 +1,62 @@
|
|||
# defaults for jenkins continuous integration server
|
||||
|
||||
# pulled in from the init script; makes things easier.
|
||||
NAME=jenkins
|
||||
|
||||
# location of java
|
||||
JAVA=/usr/bin/java
|
||||
|
||||
# arguments to pass to java
|
||||
#JAVA_ARGS="-Xmx256m"
|
||||
#JAVA_ARGS="-Djava.net.preferIPv4Stack=true" # make jenkins listen on IPv4 address
|
||||
# Disable compression as zip deflation threads eat CPU time.
|
||||
# https://issues.jenkins-ci.org/browse/JENKINS-14362
|
||||
JAVA_ARGS="-Xloggc:/var/log/jenkins/gc.log -XX:+PrintGCDetails -Xmx12g -Dorg.kohsuke.stapler.compression.CompressionFilter.disabled=true -Djava.util.logging.config.file=/var/lib/jenkins/logger.conf"
|
||||
|
||||
PIDFILE=/var/run/jenkins/jenkins.pid
|
||||
|
||||
# user id to be invoked as (otherwise will run as root; not wise!)
|
||||
JENKINS_USER=jenkins
|
||||
|
||||
# location of the jenkins war file
|
||||
JENKINS_WAR=/usr/share/jenkins/jenkins.war
|
||||
|
||||
# jenkins home location
|
||||
JENKINS_HOME=/var/lib/jenkins
|
||||
|
||||
# set this to false if you don't want Hudson to run by itself
|
||||
# in this set up, you are expected to provide a servlet container
|
||||
# to host jenkins.
|
||||
RUN_STANDALONE=true
|
||||
|
||||
# log location. this may be a syslog facility.priority
|
||||
JENKINS_LOG=/var/log/jenkins/$NAME.log
|
||||
#HUDSON_LOG=daemon.info
|
||||
|
||||
# OS LIMITS SETUP
|
||||
# comment this out to observe /etc/security/limits.conf
|
||||
# this is on by default because http://github.com/jenkinsci/jenkins/commit/2fb288474e980d0e7ff9c4a3b768874835a3e92e
|
||||
# reported that Ubuntu's PAM configuration doesn't include pam_limits.so, and as a result the # of file
|
||||
# descriptors are forced to 1024 regardless of /etc/security/limits.conf
|
||||
MAXOPENFILES=8192
|
||||
|
||||
# port for HTTP connector (default 8080; disable with -1)
|
||||
HTTP_PORT=8080
|
||||
|
||||
# port for AJP connector (disabled by default)
|
||||
AJP_PORT=-1
|
||||
|
||||
# servlet context, important if you want to use apache proxying
|
||||
PREFIX=/jenkins
|
||||
|
||||
# arguments to pass to jenkins.
|
||||
# --javahome=$JAVA_HOME
|
||||
# --httpPort=$HTTP_PORT (default 8080; disable with -1)
|
||||
# --httpsPort=$HTTP_PORT
|
||||
# --ajp13Port=$AJP_PORT
|
||||
# --argumentsRealm.passwd.$ADMIN_USER=[password]
|
||||
# --argumentsRealm.$ADMIN_USER=admin
|
||||
# --webroot=~/.jenkins/war
|
||||
# --prefix=$PREFIX
|
||||
|
||||
JENKINS_ARGS="--webroot=/var/cache/jenkins/war --httpPort=$HTTP_PORT --ajp13Port=$AJP_PORT --prefix=$PREFIX"
|
|
@ -0,0 +1,96 @@
|
|||
<VirtualHost *:80>
|
||||
ServerName <%= @vhost_name %>
|
||||
ServerAdmin <%= @serveradmin %>
|
||||
#DocumentRoot /var/lib/zuul/www
|
||||
|
||||
<Directory /var/lib/zuul/www>
|
||||
<IfVersion >= 2.4>
|
||||
Require all granted
|
||||
</IfVersion>
|
||||
<IfVersion < 2.4>
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</IfVersion>
|
||||
</Directory>
|
||||
<Directory /usr/lib/git-core>
|
||||
<IfVersion >= 2.4>
|
||||
Require all granted
|
||||
</IfVersion>
|
||||
<IfVersion < 2.4>
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</IfVersion>
|
||||
</Directory>
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/<%= @vhost_name %>-error.log
|
||||
|
||||
LogLevel warn
|
||||
|
||||
CustomLog ${APACHE_LOG_DIR}/<%= @vhost_name %>-access.log combined
|
||||
|
||||
RewriteEngine on
|
||||
RewriteRule ^/zuul/status.json$ http://127.0.0.1:8001/status.json [P]
|
||||
RewriteRule ^/zuul/status/(.*) http://127.0.0.1:8001/status/$1 [P]
|
||||
|
||||
Alias /zuul /var/lib/zuul/www
|
||||
|
||||
<% if @builds_archive_dir != '' %>
|
||||
Alias /logs <%= @builds_archive_dir %>
|
||||
|
||||
<Directory <%= @builds_archive_dir %>>
|
||||
<IfVersion >= 2.4>
|
||||
Require all granted
|
||||
Options +Indexes
|
||||
</IfVersion>
|
||||
<IfVersion < 2.4>
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
Options +Indexes
|
||||
</IfVersion>
|
||||
</Directory>
|
||||
<% end %>
|
||||
|
||||
AddType text/plain .log
|
||||
Alias /icons/ "/usr/share/apache2/icons/"
|
||||
|
||||
<Directory "/usr/share/apache2/icons">
|
||||
<IfVersion >= 2.4>
|
||||
Require all granted
|
||||
Options FollowSymlinks
|
||||
AllowOverride None
|
||||
</IfVersion>
|
||||
<IfVersion < 2.4>
|
||||
Options FollowSymlinks
|
||||
AllowOverride None
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</IfVersion>
|
||||
</Directory>
|
||||
|
||||
AddOutputFilterByType DEFLATE application/json
|
||||
|
||||
SetEnv GIT_PROJECT_ROOT /var/lib/zuul/git/
|
||||
SetEnv GIT_HTTP_EXPORT_ALL
|
||||
|
||||
AliasMatch ^/p/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$ /var/lib/zuul/git/$1
|
||||
AliasMatch ^/p/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ /var/lib/zuul/git/$1
|
||||
ScriptAlias /p/ /usr/lib/git-core/git-http-backend/
|
||||
|
||||
<IfModule mod_cache.c>
|
||||
CacheDefaultExpire 5
|
||||
<IfModule mod_mem_cache.c>
|
||||
CacheEnable mem /status.json
|
||||
# 12MByte total cache size.
|
||||
MCacheSize 12288
|
||||
MCacheMaxObjectCount 10
|
||||
MCacheMinObjectSize 1
|
||||
# 8MByte max size per cache entry
|
||||
MCacheMaxObjectSize 8388608
|
||||
MCacheMaxStreamingBuffer 8388608
|
||||
</IfModule>
|
||||
<IfModule mod_cache_disk.c>
|
||||
CacheEnable disk /status.json
|
||||
CacheRoot /var/cache/apache2/mod_cache_disk
|
||||
</IfModule>
|
||||
</IfModule>
|
||||
</VirtualHost>
|
Loading…
Reference in New Issue