Compile nginx from source

Compile nginx from source and cleanup nginx.conf template.

Change-Id: I0adce7bdfb673853952cb58734fc2c35f9724e04
This commit is contained in:
Corey Bryant 2017-05-17 19:24:23 +00:00
parent 967d6c6750
commit f3212259d4
3 changed files with 13 additions and 15 deletions

View File

@ -7,10 +7,6 @@ setup:
- "{snap_common}/log"
- "{snap_common}/lock"
- "{snap_common}/run"
# NOTE(coreycb): Drop /var/*/nginx dirs once nginx is compiled from source.
# nginx hardcodes paths at compile time without override capability.
- "/var/lib/nginx"
- "/var/log/nginx"
templates:
nova-snap.conf.j2: "{snap_common}/etc/nova/conf.d/nova-snap.conf"
nova-placement-api.ini.j2: "{snap_common}/etc/uwsgi/nova-placement-api.ini"
@ -18,7 +14,7 @@ setup:
nginx.conf.j2: "{snap_common}/etc/nginx/nginx.conf"
copyfiles:
"{snap}/etc/nova": "{snap_common}/etc/nova"
"{snap}/etc/nginx": "{snap_common}/etc/nginx"
"{snap}/usr/conf": "{snap_common}/etc/nginx"
entry_points:
nova-api-os-compute:
binary: "{snap}/bin/nova-api-os-compute"

View File

@ -1,14 +1,12 @@
user root;
worker_processes auto;
pid {{ snap_common }}/run/nginx.pid;
include {{ snap_common }}/etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
}
http {
##
# Basic Settings
##
@ -22,13 +20,6 @@ http {
include {{ snap_common }}/etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
##
# Logging Settings
##

View File

@ -74,7 +74,6 @@ parts:
- libssl-dev
- libxml2-dev
- libxslt1-dev
stage-packages: [nginx]
stage:
- -usr/bin/2to3
- -usr/bin/pydoc
@ -99,6 +98,18 @@ parts:
- etc/nova/rootwrap.d
stage: [$etc]
snap: [$etc]
nginx:
source: http://www.nginx.org/download/nginx-1.13.0.tar.gz
plugin: autotools
configflags:
- --prefix=/usr
- --http-log-path=/var/snap/nova/common/log/nginx-access.log
- --error-log-path=/var/snap/nova/common/log/nginx-error.log
- --lock-path=/var/snap/nova/common/lock/nginx.lock
- --pid-path=/var/snap/nova/common/run/nginx.pid
build-packages:
- libpcre3-dev
- libssl-dev
python:
source: https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tar.xz
plugin: autotools