Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

big 'ol www update #516

Merged
merged 11 commits into from
Oct 26, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup/ansible-inventory
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ test-nodesource_piccoloaiutante-debian8-arm_pi3-1
iojs-www

[node-www]
node-www
infra-digitalocean-ubuntu1604-x64-1

[iojs-jenkins]
iojs-jenkins
Expand Down
1 change: 1 addition & 0 deletions setup/www/ansible-playbook.retry
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
infra-digitalocean-ubuntu1604-x64-1
13 changes: 5 additions & 8 deletions setup/www/ansible-playbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,11 @@
- include: tasks/nginx.yaml
tags: nginx

- include: tasks/dist-indexer.yaml
tags: dist-indexer

- include: tasks/nightly-builder.yaml
tags: nightly-builder

- include: tasks/promote.yaml
tags: promote

- include: tasks/latest-linker.yaml
tags: latest-linker
- include: tasks/tools.yaml
tags: tools

- include: tasks/metrics.yaml
tags: metrics
15 changes: 8 additions & 7 deletions setup/www/ansible-vars.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
---
server_user: nodejs
root_users:
- rvagg
- jbergstroem
- orangemocha
dist_users:
- cjihrig
- chrisdickinson
- sam-github
- fishrock123
- cjihrig
- evanlucas
- jasnell
- fishrock123
- thealphanerd
- rvagg
- sam-github
libuv_users:
- saghul
- piscisaureus
Expand All @@ -19,3 +17,6 @@ packages:
- nodejs
- nginx
- git
- python-pip
- gnuplot
benchmark_host: 50.97.245.4
2 changes: 1 addition & 1 deletion setup/www/host_vars/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
node-www
infra-*
3 changes: 1 addition & 2 deletions setup/www/host_vars/node-www.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ cdn_api_key: "INSERT CLOUDFLARE API KEY"
cdn_api_email: "INSERT CLOUDFLARE API EMAIL"
cdn_api_iojs_id: "INSERT CLOUDFLARE API iojs.org ID"
cdn_api_nodejs_id: "INSERT CLOUDFLARE API nodejs.org ID"
cloudfuse_user: "INSERT RACKSPACE CLOUD USERNAME"
cloudfuse_key: "INSERT RACKSPACE CLOUD API KEY"
jenkins_token: "INSERT JENKINS API TOKEN"
1 change: 0 additions & 1 deletion setup/www/resources/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
*.crt
*.key
*.pem
secrets/*
3 changes: 0 additions & 3 deletions setup/www/resources/config/.cloudfuse

This file was deleted.

25 changes: 6 additions & 19 deletions setup/www/resources/config/benchmarking.nodejs.org
Original file line number Diff line number Diff line change
@@ -1,32 +1,19 @@
server {
listen *:80;
listen [::]:80;
server_name benchmarking.nodejs.org;

return 301 https://benchmarking.nodejs.org$request_uri;
}

server {
listen [::]:443 ssl spdy;
listen *:443 ssl spdy;
listen [::]:443 ssl http2;
listen *:443 ssl http2;
server_name benchmarking.nodejs.org;

ssl_certificate ssl/nodejs_chained.crt;
ssl_certificate_key ssl/nodejs.key;
ssl_trusted_certificate ssl/nodejs_chained.crt;
ssl_dhparam ssl/dhparam.pem;

ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS;
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

ssl_session_cache shared:benchmarking:100m;
ssl_session_timeout 24h;

ssl_stapling on;
ssl_stapling_verify on;

spdy_keepalive_timeout 300;
spdy_headers_comp 9;

keepalive_timeout 60;
server_tokens off;
Expand All @@ -38,13 +25,13 @@ server {
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;

access_log /var/log/nginx/benchmarking.nodejs.org-access.log nodejs;
error_log /var/log/nginx/benchmarking.nodejs.org-error.log;
access_log /var/log/nginx/benchmarking/benchmarking.nodejs.org-access.log nodejs;
error_log /var/log/nginx/benchmarking/benchmarking.nodejs.org-error.log;

gzip on;
gzip_static on;
gzip_disable "MSIE [1-6]\.";
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_types text/plain text/css application/javascript text/xml application/xml application/xml+rss image/svg+xml;

root /home/www/benchmarking;
default_type text/plain;
Expand Down
39 changes: 39 additions & 0 deletions setup/www/resources/config/coverage.nodejs.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
server {
listen *:80;
listen [::]:80;
server_name coverage.nodejs.org;

return 301 https://coverage.nodejs.org$request_uri;
}

server {
listen [::]:443 ssl http2;
listen *:443 ssl http2;
server_name coverage.nodejs.org;

ssl_certificate ssl/nodejs_chained.crt;
ssl_certificate_key ssl/nodejs.key;
ssl_trusted_certificate ssl/nodejs_chained.crt;

keepalive_timeout 60;
server_tokens off;

resolver 8.8.4.4 8.8.8.8 valid=300s;
resolver_timeout 10s;

add_header Strict-Transport-Security max-age=63072000;
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;

access_log /var/log/nginx/coverage/coverage.nodejs.org-access.log nodejs;
error_log /var/log/nginx/coverage/coverage.nodejs.org-error.log;

gzip on;
gzip_static on;
gzip_disable "MSIE [1-6]\.";
gzip_types text/plain text/css application/javascript text/xml application/xml application/xml+rss image/svg+xml;

root /home/www/coverage;
default_type text/plain;
index index.html;
}
9 changes: 0 additions & 9 deletions setup/www/resources/config/github-webhook.conf

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"port": 9999,
"path": "/webhook",
"secret": "{{github_secret}}",
"secret": "{{ github_secret }}",
"log": "/home/nodejs/github-webhook.log",
"rules": [
{
Expand Down
21 changes: 21 additions & 0 deletions setup/www/resources/config/github-webhook.service.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[Unit]
Description=GitHub Webhook
Wants=network.target
After=network.target

[Install]
WantedBy=multi-user.target

[Service]
Type=simple
User={{ server_user }}

Environment="USER={{ server_user }}"
Environment="SHELL=/bin/bash"
Environment="HOME=/home/{{ server_user }}"
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

ExecStart=/usr/bin/github-webhook --config /etc/github-webhook.json
Restart=always
RestartSec=30
StartLimitInterval=0
14 changes: 7 additions & 7 deletions setup/www/resources/config/iojs.org
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ server {
}

server {
listen [::]:443 ssl spdy;
listen *:443 ssl spdy;
listen [::]:443 ssl http2;
listen *:443 ssl http2;
server_name www.iojs.org;

ssl_certificate ssl/iojs_chained.crt;
Expand All @@ -18,8 +18,8 @@ server {
}

server {
listen [::]:443 ssl spdy;
listen *:443 ssl spdy;
listen [::]:443 ssl http2;
listen *:443 ssl http2;
server_name iojs.org;

ssl_certificate ssl/iojs_chained.crt;
Expand All @@ -36,13 +36,13 @@ server {
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;

access_log /var/log/nginx/iojs.org-access.log nodejs;
error_log /var/log/nginx/iojs.org-error.log;
access_log /var/log/nginx/iojs/iojs.org-access.log nodejs;
error_log /var/log/nginx/iojs/iojs.org-error.log;

gzip on;
gzip_static on;
gzip_disable "MSIE [1-6]\.";
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_types text/plain text/css application/javascript text/xml application/xml application/xml+rss image/svg+xml;

root /home/www/iojs;
default_type text/plain;
Expand Down
7 changes: 4 additions & 3 deletions setup/www/resources/config/libuv.org
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
server {
listen *:80;
listen [::]:80;
server_name dist.libuv.org;

keepalive_timeout 60;
Expand All @@ -11,13 +12,13 @@ server {
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;

access_log /var/log/nginx/libuv.org-access.log nodejs;
error_log /var/log/nginx/libuv.org-error.log;
access_log /var/log/nginx/libuv/libuv.org-access.log nodejs;
error_log /var/log/nginx/libuv/libuv.org-error.log;

gzip on;
gzip_static on;
gzip_disable "MSIE [1-6]\.";
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_types text/plain text/css application/javascript text/xml application/xml application/xml+rss image/svg+xml;

root /home/libuv/www;
default_type text/plain;
Expand Down
3 changes: 2 additions & 1 deletion setup/www/resources/config/logrotate-nginx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/var/log/nginx/*.log {
/var/log/nginx/*.log, /var/log/nginx/nodejs/*.log, /var/log/nginx/iojs/*.log, /var/log/nginx/libuv/*.log, /var/log/nginx/benchmarking/*.log, /var/log/nginx/coverage/*.log {
daily
missingok
compresscmd /usr/bin/xz
Expand All @@ -13,6 +13,7 @@
dateyesterday
maxsize 500M
sharedscripts
rotate 36500
prerotate
if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
run-parts /etc/logrotate.d/httpd-prerotate; \
Expand Down
11 changes: 11 additions & 0 deletions setup/www/resources/config/nightly-builder.json.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"jenkinsToken": "{{ jenkins_token }}",
"jenkinsJobUrl": "https://ci-release.nodejs.org/job/iojs+release",
"jenkinsCrumbUrl": "https://ci-release.nodejs.org/crumbIssuer/api/json",
"githubAuthUser": "{{ github_auth_user }}",
"githubAuthToken": "{{ github_auth_token }}",
"githubOrg": "nodejs",
"githubRepo": "node",
"githubScheme": "https://github.com/",
"releaseUrlBase": "https://nodejs.org/download/"
}
24 changes: 12 additions & 12 deletions setup/www/resources/config/nodejs.org
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ server {
listen [::]:80 default_server ipv6only=on;
server_name nodejs.org;

access_log /var/log/nginx/nodejs.org-access.log nodejs;
error_log /var/log/nginx/nodejs.org-error.log;
access_log /var/log/nginx/nodejs/nodejs.org-access.log nodejs;
error_log /var/log/nginx/nodejs/nodejs.org-error.log;

keepalive_timeout 60;
server_tokens off;

gzip on;
gzip_static on;
gzip_disable "MSIE [1-6]\.";
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_types text/plain text/css application/javascript text/xml application/xml application/xml+rss image/svg+xml;

# let the blog.nodejs.org redirector handle this
location ~ ^/blog(.*) {
Expand Down Expand Up @@ -168,24 +168,24 @@ server {
}

server {
listen *:443 ssl spdy;
listen [::]:443 ssl spdy;
listen *:443 ssl http2;
listen [::]:443 ssl http2;
server_name www.nodejs.org;

return 301 https://nodejs.org$request_uri;
}

server {
listen *:443 ssl spdy;
listen [::]:443 ssl spdy;
listen *:443 ssl http2;
listen [::]:443 ssl http2;
server_name blog.nodejs.org;

return 301 http://blog.nodejs.org$request_uri;
}

server {
listen *:443 default_server ssl spdy;
listen [::]:443 default_server ipv6only=on ssl spdy;
listen *:443 default_server ssl http2;
listen [::]:443 default_server ipv6only=on ssl http2;

server_name nodejs.org;

Expand All @@ -199,13 +199,13 @@ server {
#add_header X-Frame-Options DENY;
#add_header X-Content-Type-Options nosniff;

access_log /var/log/nginx/nodejs.org-access.log nodejs;
error_log /var/log/nginx/nodejs.org-error.log;
access_log /var/log/nginx/nodejs/nodejs.org-access.log nodejs;
error_log /var/log/nginx/nodejs/nodejs.org-error.log;

gzip on;
gzip_static on;
gzip_disable "MSIE [1-6]\.";
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_types text/plain text/css application/javascript text/xml application/xml application/xml+rss image/svg+xml;

error_page 404 @localized_404;

Expand Down
4 changes: 4 additions & 0 deletions setup/www/resources/config/nodejs_ssh_config.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Host benchmark
HostName {{ benchmark_host }}
User benchmark
IdentityFile ~/.ssh/benchmark_id_rsa
4 changes: 0 additions & 4 deletions setup/www/resources/config/ssl-defaults.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@ ssl_trusted_certificate ssl/nodejs_chained.crt;
ssl_dhparam ssl/dhparam.pem;

ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS;
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

ssl_session_cache shared:nodejs:376m;
ssl_session_timeout 24h;

ssl_stapling on;
ssl_stapling_verify on;

spdy_keepalive_timeout 300;
spdy_headers_comp 9;
Loading