diff --git a/setup/centos6/README.md b/setup/centos6/README.md index 1b0c1d88a..f26782621 100644 --- a/setup/centos6/README.md +++ b/setup/centos6/README.md @@ -9,6 +9,12 @@ Host test-softlayer-centos6-x64-1 Host test-softlayer-centos6-x64-2 HostName 184.173.120.137 User root +Host release-softlayer-centos6-x64-1 + HostName 50.97.245.10 + User root +Host release-digitalocean-centos6-x86-1 + HostName 162.243.248.28 + User root ``` Note that these hostnames are also used in the *ansible-inventory* file. The IP addresses will need to be updated each time the servers are reprovisioned. diff --git a/setup/centos6/ansible-playbook.yaml b/setup/centos6/ansible-playbook.yaml index 5c2897a50..12240a6ba 100644 --- a/setup/centos6/ansible-playbook.yaml +++ b/setup/centos6/ansible-playbook.yaml @@ -17,7 +17,7 @@ tags: general - name: General | Add SLC devtoolset repo GPG key - command: rpm --import http://ftp.scientificlinux.org/linux/scientific/5x/x86_64/RPM-GPG-KEYs/RPM-GPG-KEY-cern + command: rpm --import http://linuxsoft.cern.ch/cern/slc6X/x86_64/RPM-GPG-KEY-cern tags: general - name: General | Download SLC SCL repo config @@ -26,7 +26,7 @@ - name: General | Install required packages yum: name={{ item }} state=latest - with_items: packages + with_items: "{{ packages }}" tags: general - name: NTP | Run initial NTP @@ -38,7 +38,7 @@ tags: ntp - name: ccache | Install ccache - include: ../ansible-tasks/ccache.yaml version=3.2.4 + include: ../ansible-tasks/ccache.yaml version=3.3.4 tags: ccache - name: General | Increase file descriptor limits @@ -63,15 +63,7 @@ tags: jenkins - name: Jenkins | Copy environment files - copy: src=./resources/jenkins.sysconfig dest=/etc/sysconfig/jenkins owner={{ server_user }} group={{ server_user }} mode=0400 - tags: jenkins - - - name: Jenkins | Copy secret to environment - replace: dest=/etc/sysconfig/jenkins regexp="\{\{secret\}\}" replace="{{ secret }}" - tags: jenkins - - - name: Jenkins | Copy server id to environment - replace: dest=/etc/sysconfig/jenkins regexp="\{\{id\}\}" replace="{{ inventory_hostname }}" + template: src=./resources/jenkins.sysconfig.j2 dest=/etc/sysconfig/jenkins owner={{ server_user }} group={{ server_user }} mode=0400 tags: jenkins - name: Jenkins | Enable and start init scripts diff --git a/setup/centos6/host_vars/_tmpl b/setup/centos6/host_vars/_tmpl new file mode 100644 index 000000000..b25e67e69 --- /dev/null +++ b/setup/centos6/host_vars/_tmpl @@ -0,0 +1,3 @@ +--- +server_secret: "" +ci_server: "ci-release.nodejs.org" diff --git a/setup/centos6/resources/jenkins.sysconfig b/setup/centos6/resources/jenkins.sysconfig deleted file mode 100644 index b04eb845a..000000000 --- a/setup/centos6/resources/jenkins.sysconfig +++ /dev/null @@ -1,7 +0,0 @@ -JENKINS_SLAVE_USER="iojs" -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/{{id}}/slave-agent.jnlp -secret $JENKINS_SECRET" -JENKINS_ENV="OSTYPE=linux-gnu NODE_COMMON_PIPE=/home/iojs/test.pipe" -JENKINS_PATH="/opt/rh/devtoolset-2/root/usr/bin" diff --git a/setup/centos6/resources/jenkins.sysconfig.j2 b/setup/centos6/resources/jenkins.sysconfig.j2 new file mode 100644 index 000000000..01eb2fadb --- /dev/null +++ b/setup/centos6/resources/jenkins.sysconfig.j2 @@ -0,0 +1,14 @@ +JENKINS_SLAVE_USER="iojs" +JENKINS_SLAVE_JAR="/home/iojs/slave.jar" +JENKINS_SLAVE_LOG="/home/iojs/$NAME.log" +JENKINS_SECRET="{{ secret }}" +JENKINS_SLAVE_ARGS="-jnlpUrl https://{{ ci_server }}/computer/{{ ansible_hostname }}/slave-agent.jnlp -secret $JENKINS_SECRET" +JENKINS_ENV="OSTYPE=linux-gnu NODE_COMMON_PIPE=/home/iojs/test.pipe" +JENKINS_PATH="/opt/rh/devtoolset-2/root/usr/bin" +JENKINS_ENV="JOBS={{ ansible_processor_vcpus }} \ + HOME=/home/{{ server_user }} \ + NODE_TEST_DIR=$HOME/tmp \ + DESTCPU={{ server_arch }} \ + ARCH={{ server_arch }} \ + OSTYPE=linux-gnu \ + NODE_COMMON_PIPE=/home/iojs/test.pipe"