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

WIP alpine: support alpine 3.5 #989

Closed
wants to merge 2 commits into from
Closed
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
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
6 changes: 4 additions & 2 deletions ansible/inventory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +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}
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
2 changes: 1 addition & 1 deletion ansible/roles/baselayout/tasks/partials/repo/alpine.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

#
# alpine34 repos - these are required in bootstrap so they're probably in place
# alpine3 repos - these are required in bootstrap so they're probably in place
#

- name: "repos : add alpine edge package repos"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

#
# alpine 3.4
# alpine 3.x
#

- name: check for python
Expand All @@ -24,14 +24,20 @@
create: yes
line: "{{ item }}"
state: present
with_items: "{{ alpine34_repos }}"
with_items: "{{ alpine3_repos }}"
register: has_added_package_repo

- name: check for shadow
raw: apk info -q shadow
raw: apk info | grep shadow
failed_when: has_shadow.rc > 1
register: has_shadow

- 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/bootstrap/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#


alpine34_repos: [
alpine3_repos: [
'https://dl-3.alpinelinux.org/alpine/edge/main',
'https://dl-3.alpinelinux.org/alpine/edge/community' # java lives here
]
1 change: 1 addition & 0 deletions ansible/roles/java-base/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

packages: {
'alpine34': 'openjdk8-jre-base',
'alpine35': 'openjdk8-jre-base',
'centos5': 'java-1.7.0-openjdk',
'centos': 'java-1.8.0-openjdk-headless',
'debian7': 'openjdk-7-jre-headless',
Expand Down
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
1 change: 1 addition & 0 deletions ansible/roles/jenkins-worker/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jenkins: "{{ jenkins_init[init_type] }}"

needs_monit: [
'alpine34',
'alpine35',
'centos5',
'centos6',
'debian7',
Expand Down