diff --git a/setup/centos5/resources/jenkins.sysconfig b/setup/centos5/resources/jenkins.sysconfig index fe7ab4c57..74ba62aad 100644 --- a/setup/centos5/resources/jenkins.sysconfig +++ b/setup/centos5/resources/jenkins.sysconfig @@ -3,5 +3,5 @@ JENKINS_SLAVE_JAR="/home/iojs/slave.jar" JENKINS_SLAVE_LOG="/home/iojs/$NAME.log" JENKINS_SECRET="{{secret}}" JENKINS_SLAVE_ARGS="-jnlpUrl https://ci.nodejs.org/computer/iojs-digitalocean-centos6-64-{{id}}/slave-agent.jnlp -secret $JENKINS_SECRET" -JENKINS_ENV="DESTCPU={{arch}} ARCH={{arch}} OSTYPE=linux-gnu NODE_COMMON_PIPE=/home/iojs/test.pipe" +JENKINS_ENV="PRE_1_PATH=/home/iojs/bin:$PATH JOBS=$(getconf _NPROCESSORS_ONLN) DESTCPU={{arch}} ARCH={{arch}} OSTYPE=linux-gnu NODE_COMMON_PIPE=/home/iojs/test.pipe" JENKINS_PATH="/opt/rh/devtoolset-2/root/usr/bin" diff --git a/setup/www/ansible-vars.yaml b/setup/www/ansible-vars.yaml index bbc26ed00..9e94972df 100644 --- a/setup/www/ansible-vars.yaml +++ b/setup/www/ansible-vars.yaml @@ -11,6 +11,10 @@ dist_users: - fishrock123 - jasnell - rvagg +libuv_users: + - saghul + - piscisaureus + - bnoordhuis packages: - iojs - nginx diff --git a/setup/www/resources/config/libuv.org b/setup/www/resources/config/libuv.org new file mode 100644 index 000000000..cc4967432 --- /dev/null +++ b/setup/www/resources/config/libuv.org @@ -0,0 +1,27 @@ +server { + listen 80; + listen dist.libuv.org:80; + server_name dist.libuv.org; + + keepalive_timeout 60; + server_tokens off; + + resolver 8.8.4.4 8.8.8.8 valid=300s; + resolver_timeout 10s; + + 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; + + 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; + + root /home/libuv/dist; + default_type text/plain; + index index.html; + autoindex on; +} diff --git a/setup/www/tasks/nginx.yaml b/setup/www/tasks/nginx.yaml index 67edec23f..39f64497b 100644 --- a/setup/www/tasks/nginx.yaml +++ b/setup/www/tasks/nginx.yaml @@ -6,6 +6,7 @@ with_items: - nodejs.org - iojs.org + - libuv.org tags: nginx - name: nginx | Create nginx config symlinks @@ -16,6 +17,7 @@ with_items: - { src: nodejs.org, dest: 00-nodejs.org } - { src: iojs.org, dest: 01-iojs.org } + - { src: libuv.org, dest: 02-libuv.org } tags: nginx - name: nginx | Make /etc/nginx/ssl/ diff --git a/setup/www/tasks/site-setup.yaml b/setup/www/tasks/site-setup.yaml index 84973db50..ac20c57d0 100644 --- a/setup/www/tasks/site-setup.yaml +++ b/setup/www/tasks/site-setup.yaml @@ -31,10 +31,16 @@ - { regexp: '\{\{cdn_api_nodejs_id\}\}', replace: '{{ cdn_api_nodejs_id }}' } tags: setup -- name: Site Setup | Add cdn-purge.sh to crontab +- name: Site Setup | Add periodic tasks to crontab lineinfile: dest: /etc/crontab - line: '* * * * * root /home/nodejs/cdn-purge.sh' + line: "{{ item }}" + with_items: + - '*/5 * * * * dist /home/staging/tools/promote/promote_nightly.sh nodejs' + - '*/5 * * * * dist /home/staging/tools/promote/promote_nightly.sh iojs' + - '* * * * * nodejs /home/nodejs/check-build-site.sh nodejs' + - '* * * * * nodejs /home/nodejs/check-build-site.sh iojs' + - '* * * * * root /home/nodejs/cdn-purge.sh' tags: setup - name: Site Setup | Copy queue-cdn-purge.sh script diff --git a/setup/www/tasks/user.yaml b/setup/www/tasks/user.yaml index d480feec6..effca6202 100644 --- a/setup/www/tasks/user.yaml +++ b/setup/www/tasks/user.yaml @@ -1,4 +1,4 @@ -- name: User | Add nodejs, dist, staging users +- name: User | Add nodejs, dist, staging, libuv users user: name: "{{ item }}" shell: /bin/bash @@ -6,6 +6,7 @@ - nodejs - dist - staging + - libuv tags: user - name: User | Add dist to staging group @@ -28,6 +29,14 @@ with_items: dist_users tags: user +- name: User | Download pubkeys (libuv_users) + get_url: + url: https://github.com/{{ item }}.keys + dest: /tmp/{{ item }}.keys + delegate_to: 127.0.0.1 + with_items: libuv_users + tags: user + - name: User | Create authorized_keys for root authorized_key: user: "root" @@ -56,6 +65,13 @@ with_items: dist_users tags: user +- name: User | Create authorized_keys for libuv (libuv_users) + authorized_key: + user: "libuv" + key: "{{ lookup('file', '/tmp/' + item + '.keys') }}" + with_items: libuv_users + tags: user + - name: User | Set up dist/{nodejs,iojs}/ directories file: path: /home/dist/{{ item }} @@ -101,3 +117,13 @@ - iojs/nightly - iojs/release tags: user + +- name: User | Set up libuv directories + file: + path: /home/libuv/{{ item }} + state: directory + mode: 0755 + owner: libuv + with_items: + - dist + tags: user \ No newline at end of file diff --git a/setup/www/tools/promote/_resha.sh b/setup/www/tools/promote/_resha.sh index b006b0d85..77ea0ab1a 100755 --- a/setup/www/tools/promote/_resha.sh +++ b/setup/www/tools/promote/_resha.sh @@ -16,7 +16,10 @@ if [ "X${version}" == "X" ]; then exit 1 fi -(cd "${dstdir}/${version}" && shasum -a256 $(ls node* iojs* win-*/* 2> /dev/null) > SHASUMS256.txt) || exit 1 +(cd "${dstdir}/${version}" && shasum -a256 $(ls node* openssl* iojs* win-*/* x64/* 2> /dev/null) > SHASUMS256.txt) || exit 1 +if [[ $version =~ ^v[0] ]]; then + (cd "${dstdir}/${version}" && shasum $(ls node* openssl* x64/* 2> /dev/null) > SHASUMS.txt) || exit 1 +fi echo "${dstdir}/${version}/SHASUMS256.txt" /home/dist/tools/dist-indexer/dist-indexer.js --dist $dstdir --indexjson ${dstdir}/index.json --indextab ${dstdir}/index.tab find "${dstdir}/${version}" -type f -exec chmod 644 '{}' \; diff --git a/setup/www/tools/promote/promote_nightly.sh b/setup/www/tools/promote/promote_nightly.sh index 7684b5632..aa1e2f7bf 100755 --- a/setup/www/tools/promote/promote_nightly.sh +++ b/setup/www/tools/promote/promote_nightly.sh @@ -7,12 +7,7 @@ site=$1 __dirname="$(CDPATH= cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" if [ "X$site" != "Xiojs" ] && [ "X$site" != "Xnodejs" ]; then - echo "Usage: promote_nightly.sh < iojs | nodejs > " - exit 1 -fi - -if [ "X$2" == "X" ]; then - echo "Usage: promote_nightly.sh < iojs | nodejs > " + echo "Usage: promote_nightly.sh < iojs | nodejs >" exit 1 fi @@ -27,3 +22,8 @@ srcdir=$next_nightly_srcdir dstdir=$next_nightly_dstdir . ${__dirname}/_promote.sh $site + +srcdir=$rc_srcdir +dstdir=$rc_dstdir + +. ${__dirname}/_promote.sh $site diff --git a/setup/www/tools/promote/settings b/setup/www/tools/promote/settings index 20c827703..70dd3705b 100755 --- a/setup/www/tools/promote/settings +++ b/setup/www/tools/promote/settings @@ -1,8 +1,14 @@ staging_rootdir=/home/staging/${site}/ dist_rootdir=/home/dist/${site}/ -nightly_srcdir=${staging_rootdir}nightly -next_nightly_srcdir=${staging_rootdir}next-nightly + release_srcdir=${staging_rootdir}release +release_dstdir=${dist_rootdir}release + +rc_srcdir=${staging_rootdir}custom +rc_dstdir=${dist_rootdir}rc + +nightly_srcdir=${staging_rootdir}nightly nightly_dstdir=${dist_rootdir}nightly + +next_nightly_srcdir=${staging_rootdir}next-nightly next_nightly_dstdir=${dist_rootdir}next-nightly -release_dstdir=${dist_rootdir}release