Commit 34e68327 authored by Christian Kuhn's avatar Christian Kuhn
Browse files

Merge pull request #19 in T3COM/bamboo-remote-agent from...

Merge pull request #19 in T3COM/bamboo-remote-agent from feature/INFRA-160-remove-nginx-and-php-fpm to develop

* commit 'dc8668e7':
  [BUGFIX] Another bogus sudo
  [BUGFIX] Remove a copy&paste sudo call
  [TASK] Prepare /tmp/.X11-unix for xvfb
  [TASK] Bump minor versions
  [TASK] Add xvfb and firefox 45 to php71 build
  [TASK] Add firefox 45.4.0 and xvfb
  [TASK] Ah, forget wget, too
  [TASK] Ok, maybe lynx should be left out
  [TASK] Add wget and lynx to baseimage
  Revert "[TASK] Bump patch level bamboo-remote-agent-php"
  [TASK] Bump patch level bamboo-remote-agent-php
  [TASK] Remove nginx and php-fpm
  [TASK] Remove unused php-apcu setup from php55 and php56 builds
parents 0ba19dff dc8668e7
NAME_BASEIMAGE = typo3gmbh/baseimage
MAJOR_BASEIMAGE=1
MINOR_BASEIMAGE=0
PATCHLEVEL_BASEIMAGE=1
PATCHLEVEL_BASEIMAGE=2
FULLVERSION_BASEIMAGE=$(MAJOR_BASEIMAGE).$(MINOR_BASEIMAGE).$(PATCHLEVEL_BASEIMAGE)
SHORTVERSION_BASEIMAGE=$(MAJOR_BASEIMAGE).$(MINOR_BASEIMAGE)
NAME_BAMBOO_PHP55 = typo3gmbh/bamboo-remote-agent-php55
MAJOR_BAMBOO_PHP55=1
MINOR_BAMBOO_PHP55=0
PATCHLEVEL_BAMBOO_PHP55=1
PATCHLEVEL_BAMBOO_PHP55=2
FULLVERSION_BAMBOO_PHP55=$(MAJOR_BAMBOO_PHP55).$(MINOR_BAMBOO_PHP55).$(PATCHLEVEL_BAMBOO_PHP55)
SHORTVERSION_BAMBOO_PHP55=$(MAJOR_BAMBOO_PHP55).$(MINOR_BAMBOO_PHP55)
NAME_BAMBOO_PHP56 = typo3gmbh/bamboo-remote-agent-php56
MAJOR_BAMBOO_PHP56=1
MINOR_BAMBOO_PHP56=0
PATCHLEVEL_BAMBOO_PHP56=1
PATCHLEVEL_BAMBOO_PHP56=2
FULLVERSION_BAMBOO_PHP56=$(MAJOR_BAMBOO_PHP56).$(MINOR_BAMBOO_PHP56).$(PATCHLEVEL_BAMBOO_PHP56)
SHORTVERSION_BAMBOO_PHP56=$(MAJOR_BAMBOO_PHP56).$(MINOR_BAMBOO_PHP56)
NAME_BAMBOO_PHP70 = typo3gmbh/bamboo-remote-agent-php70
MAJOR_BAMBOO_PHP70=1
MINOR_BAMBOO_PHP70=0
PATCHLEVEL_BAMBOO_PHP70=13
PATCHLEVEL_BAMBOO_PHP70=14
FULLVERSION_BAMBOO_PHP70=$(MAJOR_BAMBOO_PHP70).$(MINOR_BAMBOO_PHP70).$(PATCHLEVEL_BAMBOO_PHP70)
SHORTVERSION_BAMBOO_PHP70=$(MAJOR_BAMBOO_PHP70).$(MINOR_BAMBOO_PHP70)
NAME_BAMBOO_PHP71 = typo3gmbh/bamboo-remote-agent-php71
MAJOR_BAMBOO_PHP71=1
MINOR_BAMBOO_PHP71=0
PATCHLEVEL_BAMBOO_PHP71=5
PATCHLEVEL_BAMBOO_PHP71=6
FULLVERSION_BAMBOO_PHP71=$(MAJOR_BAMBOO_PHP71).$(MINOR_BAMBOO_PHP71).$(PATCHLEVEL_BAMBOO_PHP71)
SHORTVERSION_BAMBOO_PHP71=$(MAJOR_BAMBOO_PHP71).$(MINOR_BAMBOO_PHP71)
......
server {
listen 127.0.0.1:8000;
server_name localhost;
root /srv/bamboo-agent-home/xml-data/build-dir/CORE-CB-JOB1;
index index.php;
client_max_body_size 64M;
location /typo3/install {
return 307 $scheme://$host/typo3/sysext/install/Start/Install.php;
}
# Prevent clients from accessing hidden files (starting with a dot)
# This is particularly important if you store .htpasswd files in the site hierarchy
# Access to `/.well-known/` is allowed.
location ~* /\.(?!well-known\/) {
deny all;
}
# Prevent clients from accessing to backup/config/source files
location ~* (?:\.(?:bak|conf|dist|fla|in[ci]|log|psd|sh|sql|sw[op])|~)$ {
deny all;
}
# Built-in filename-based cache busting
location ~* (.+)\.(?:\d+)\.(js|css|png|jpg|jpeg|gif)$ {
try_files $uri $1.$2;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
# regex to split $uri to $fastcgi_script_name and $fastcgi_path
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# Check that the PHP script exists before passing it
try_files $fastcgi_script_name =404;
# Bypass the fact that try_files resets $fastcgi_path_info
# see: http://trac.nginx.org/nginx/ticket/321
set $path_info $fastcgi_path_info;
fastcgi_param PATH_INFO $path_info;
fastcgi_index index.php;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param HTTPS $https if_not_empty;
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;
fastcgi_pass acceptance-tests-fpm;
fastcgi_read_timeout 90;
}
}
user www-data;
worker_processes 1;
pid /run/nginx.pid;
daemon off;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
upstream acceptance-tests-fpm {
server unix:/run/php/acceptance-tests-fpm.sock;
}
; Start a new pool named 'acceptance-tests'.
; the variable $pool can we used in any directive and will be replaced by the
; pool name ('acceptance-tests' here)
[acceptance-tests]
user = bamboo
group = bamboo
listen = /run/php/$pool-fpm.sock
listen.owner = www-data
listen.group = www-data
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
php_value[memory_limit] = 128M
php_value[max_execution_time] = 240
php_value[variables_order] = EGPCS
php_value[post_max_size] = 32M
php_value[upload_max_filesize] = 32M
php_value[date.timezone] = UTC
php_value[max_input_vars] = 2000
php_value[always_populate_raw_post_data] = -1
......@@ -3,15 +3,11 @@ set -e
source /pd_build/buildconfig
set -x
## NGINX Stable Releases
echo deb http://ppa.launchpad.net/nginx/stable/ubuntu xenial main > /etc/apt/sources.list.d/nginx-stable.list
## ondrej with php 5.5
echo deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main > /etc/apt/sources.list.d/php.list
# The recv-keys part takes a bit of time, so it's faster to receive multiple keys at once.
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys \
C300EE8C \
E5267A6C \
#
......
......@@ -7,11 +7,9 @@ set -x
/pd_build/prepare.sh
/pd_build/bamboo-agent.sh
/pd_build/mysql.sh
/pd_build/nginx.sh
/pd_build/redis-server.sh
/pd_build/memcached.sh
/pd_build/nodejs.sh
/pd_build/php.sh
/pd_build/finalize.sh
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
## Install NGINX
minimal_apt_get_install nginx
## Create document root
mkdir -p /srv/bamboo-agent-home/xml-data/build-dir/CORE-CB-JOB1
chown -R bamboo:bamboo /srv/bamboo-agent-home
## Disable default site
rm -f /etc/nginx/sites-enabled/default
## Configure NGINX
cp /pd_build/config/nginx/nginx.conf /etc/nginx/nginx.conf
cp /pd_build/config/nginx/upstream-acceptance-tests.conf /etc/nginx/conf.d/
cp /pd_build/config/nginx-sites/* /etc/nginx/sites-enabled/
## Enable nginx daemon
cp -a /pd_build/runit/nginx /etc/service/nginx
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
minimal_apt_get_install \
make \
php7.0-dev \
#
cd /usr/local/src/
git clone https://github.com/krakjoe/apcu.git
cd apcu
phpize
./configure
make
make install
cd ../
git clone https://github.com/krakjoe/apcu-bc.git
cd apcu-bc
phpize
./configure
make
make install
echo "extension=apcu.so" > /etc/php/7.0/mods-available/apcu.ini
echo "apc.enable_cli=1" >> /etc/php/7.0/mods-available/apcu.ini
echo "apc.slam_defense=0" >> /etc/php/7.0/mods-available/apcu.ini
echo "extension=apc.so" > /etc/php/7.0/mods-available/apc.ini
ln -s /etc/php/7.0/mods-available/apcu.ini /etc/php/7.0/cli/conf.d/20-apcu.ini
ln -s /etc/php/7.0/mods-available/apcu.ini /etc/php/7.0/fpm/conf.d/20-apcu.ini
# apc-bc module must be loaded *after* apcu, have a higher integer in front to enforce this
ln -s /etc/php/7.0/mods-available/apc.ini /etc/php/7.0/cli/conf.d/21-apc.ini
ln -s /etc/php/7.0/mods-available/apc.ini /etc/php/7.0/fpm/conf.d/21-apc.ini
......@@ -10,7 +10,6 @@ minimal_apt_get_install \
php5.5-cli \
php5.5-common \
php5.5-curl \
php5.5-fpm \
php5.5-gd \
php5.5-gmp \
php5.5-imap \
......@@ -37,13 +36,4 @@ minimal_apt_get_install \
## Enable phar writing
sed -i s/';phar.readonly = On'/'phar.readonly = Off'/ /etc/php/5.5/cli/php.ini
# commented for now
# /pd_build/php-apcu.sh
/pd_build/php-finalize.sh
## Configure pool
cp /pd_build/config/php-fpm/*.conf /etc/php/5.5/fpm/pool.d/acceptance-tests.conf
## Enable php-fpm
cp -a /pd_build/runit/php-fpm /etc/service/php-fpm
#!/bin/sh
mkdir -p /var/log/nginx
exec svlogd -tt /var/log/nginx
#!/bin/sh
exec 2>&1
exec /usr/sbin/nginx -c /etc/nginx/nginx.conf
#!/bin/sh
mkdir -p /var/log/php-fpm
exec svlogd -tt /var/log/php-fpm
#!/bin/sh
exec 2>&1
mkdir -p /run/php/
chmod 777 /run/php
exec /usr/sbin/php-fpm5.5 --nodaemonize --fpm-config /etc/php/5.5/fpm/php-fpm.conf
server {
listen 127.0.0.1:8000;
server_name localhost;
root /srv/bamboo-agent-home/xml-data/build-dir/CORE-CB-JOB1;
index index.php;
client_max_body_size 64M;
location /typo3/install {
return 307 $scheme://$host/typo3/sysext/install/Start/Install.php;
}
# Prevent clients from accessing hidden files (starting with a dot)
# This is particularly important if you store .htpasswd files in the site hierarchy
# Access to `/.well-known/` is allowed.
location ~* /\.(?!well-known\/) {
deny all;
}
# Prevent clients from accessing to backup/config/source files
location ~* (?:\.(?:bak|conf|dist|fla|in[ci]|log|psd|sh|sql|sw[op])|~)$ {
deny all;
}
# Built-in filename-based cache busting
location ~* (.+)\.(?:\d+)\.(js|css|png|jpg|jpeg|gif)$ {
try_files $uri $1.$2;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
# regex to split $uri to $fastcgi_script_name and $fastcgi_path
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# Check that the PHP script exists before passing it
try_files $fastcgi_script_name =404;
# Bypass the fact that try_files resets $fastcgi_path_info
# see: http://trac.nginx.org/nginx/ticket/321
set $path_info $fastcgi_path_info;
fastcgi_param PATH_INFO $path_info;
fastcgi_index index.php;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param HTTPS $https if_not_empty;
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;
fastcgi_pass acceptance-tests-fpm;
fastcgi_read_timeout 90;
}
}
user www-data;
worker_processes 1;
pid /run/nginx.pid;
daemon off;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
upstream acceptance-tests-fpm {
server unix:/run/php/acceptance-tests-fpm.sock;
}
; Start a new pool named 'acceptance-tests'.
; the variable $pool can we used in any directive and will be replaced by the
; pool name ('acceptance-tests' here)
[acceptance-tests]
user = bamboo
group = bamboo
listen = /run/php/$pool-fpm.sock
listen.owner = www-data
listen.group = www-data
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
php_value[memory_limit] = 128M
php_value[max_execution_time] = 240
php_value[variables_order] = EGPCS
php_value[post_max_size] = 32M
php_value[upload_max_filesize] = 32M
php_value[date.timezone] = UTC
php_value[max_input_vars] = 2000
php_value[always_populate_raw_post_data] = -1
......@@ -3,15 +3,11 @@ set -e
source /pd_build/buildconfig
set -x
## NGINX Stable Releases
echo deb http://ppa.launchpad.net/nginx/stable/ubuntu xenial main > /etc/apt/sources.list.d/nginx-stable.list
## ondrej with php 5.6
echo deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main > /etc/apt/sources.list.d/php.list
# The recv-keys part takes a bit of time, so it's faster to receive multiple keys at once.
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys \
C300EE8C \
E5267A6C \
#
......
......@@ -7,11 +7,9 @@ set -x
/pd_build/prepare.sh
/pd_build/bamboo-agent.sh
/pd_build/mysql.sh
/pd_build/nginx.sh
/pd_build/redis-server.sh
/pd_build/memcached.sh
/pd_build/nodejs.sh
/pd_build/php.sh
/pd_build/finalize.sh
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment