Skip to content

Commit

Permalink
alpine: alpine fixes, introduce server_jobs in inventory.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
rvagg committed Nov 9, 2017
1 parent 38261c1 commit 22297c1
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 10 deletions.
11 changes: 6 additions & 5 deletions ansible/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,13 @@ For more information refer to other hosts in `inventory.yml` or the

Each host needs a bit of metadata:

- (required) `ip`: used both by ansible and placed in your ssh config.
- `user`: only provide if ssh requires a non-root login. Passing this
- (required) `ip`: used both by ansible and placed in your ssh config
- `user`: only provide if ssh requires a non-root login—passing this
will additionally make ansible try to become root for all
commands executed.
- `alias`: creates shorthand names for ssh convenience.
- `labels`: Each host can also labels. More on that below.
commands executed
- `alias`: creates shorthand names for ssh convenience
- `labels`: each host can also labels, more on that below
- `server_jobs`: fix the number of parallel compile and test processes

### Adding extra options to a host

Expand Down
8 changes: 4 additions & 4 deletions ansible/inventory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ hosts:
aix61-ppc64-1: {ip: 50.200.166.131, port: 18822}

- joyent:
alpine34-x64-1: {ip: 72.2.114.80}
alpine34-x64-2: {ip: 72.2.115.165}
alpine35-x64-1: {ip: }
alpine35-x64-2: {ip: }
alpine34-x64-1: {ip: 72.2.114.80, server_jobs: 2}
alpine34-x64-2: {ip: 72.2.115.165, server_jobs: 2}
alpine35-x64-1: {ip: 72.2.119.198, server_jobs: 2}
alpine35-x64-2: {ip: 72.2.118.27, server_jobs: 2}
freebsd10-x64-1: {ip: 72.2.115.15}
freebsd10-x64-2: {ip: 72.2.114.23}
smartos14-x64-1: {ip: 72.2.114.47}
Expand Down
4 changes: 4 additions & 0 deletions ansible/plugins/inventory/nodejs_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
# - ip [string] (required): ip address of host
# - alias [string]: 'nickname', will be used in ssh config
# - labels [sequence]: passed to jenkins
# - server_jobs [cpus]: passed as JOBS to jenkins
#
# parsing done on host naming:
#
Expand Down Expand Up @@ -135,6 +136,9 @@ def main():
if 'alias' in metadata:
c.update({'alias': metadata['alias']})

if 'server_jobs' in metadata:
c.update({'server_jobs': metadata['server_jobs']})

if 'win' in hostname:
c.update({'is_win': True})

Expand Down
6 changes: 6 additions & 0 deletions ansible/roles/bootstrap/tasks/partials/alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,9 @@
- name: install shadow
when: has_shadow.rc == 1
raw: apk add shadow

# required for bug on Joyent for Alpine 3.4 using OpenSSL 7.5+
# discussio @ https://github.com/nodejs/build/pull/989
- name: fix openssl to < 7.5
raw: apk add 'openssh<7.5'

2 changes: 1 addition & 1 deletion ansible/roles/jenkins-worker/tasks/monit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
args:
src: "{{ monitrc }}"
dest: "/etc/monitrc"
mode: 0440
mode: 0400
loop_control:
loop_var: monitrc
with_first_found:
Expand Down

0 comments on commit 22297c1

Please sign in to comment.