File tree Expand file tree Collapse file tree 7 files changed +29
-13
lines changed Expand file tree Collapse file tree 7 files changed +29
-13
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ pipeline {
27
27
}
28
28
steps {
29
29
retry(3 ) {
30
- sh(" pip install ansible-lint==4.0.1 yamllint==1.11.1 " )
30
+ sh(" pip install -r test_requirements.txt " )
31
31
}
32
32
sh(" yamllint -c .yamllint.yml ." )
33
33
sh(" ansible-lint roles/" )
Original file line number Diff line number Diff line change 90
90
instance : " {{ item.name }}"
91
91
molecule_region : " {{ item.region }}"
92
92
molecule_ssh_user : " {{ item.ssh_user | default(ssh_user) }}"
93
- wait : true
93
+ wait : yes
94
94
exact_count : 1
95
95
count_tag :
96
96
instance : " {{ item.name }}"
113
113
set_fact :
114
114
instance_conf_dict : {
115
115
' instance ' : " {{ item.instances[0].tags.instance }}" ,
116
- ' region ' : " {{ item.instances[0].tags[' molecule_region'] }}" ,
116
+ ' region ' : " {{ item.instances[0].tags. molecule_region }}" ,
117
117
' address ' : " {{ item.instances[0].public_ip }}" ,
118
- ' user ' : " {{ item.instances[0].tags[' molecule_ssh_user'] }}" ,
118
+ ' user ' : " {{ item.instances[0].tags. molecule_ssh_user }}" ,
119
119
' port ' : " {{ ssh_port }}" ,
120
120
' identity_file ' : " {{ keypair_path }}" ,
121
121
' instance_ids ' : " {{ item.instance_ids }}" , }
136
136
137
137
- name : Wait for SSH
138
138
wait_for :
139
- port : " {{ ssh_port }}"
139
+ port : " {{ item.port }}"
140
140
host : " {{ item.address }}"
141
141
search_regex : SSH
142
- delay : 10
142
+ delay : 60
143
143
timeout : 320
144
144
with_items : " {{ lookup('file', molecule_instance_config) | molecule_from_yaml }}"
145
145
Original file line number Diff line number Diff line change 24
24
# Same version config updates for nodes that are on the same version, but differ in `dcos-config--setup` package version
25
25
- name : " Same version config update? Register latest DC/OS-config--setup version from bootstrap"
26
26
shell : |
27
+ set -o pipefail
27
28
curl {{ dcos['config']['bootstrap_url'] }}/{{ dcos_version_specifier }}/genconf/serve/package_lists/$(curl {{ dcos['config']['bootstrap_url'] }}/{{ dcos_version_specifier }}/genconf/serve/cluster-package-list.latest).package_list.json | \
28
29
jq -r '.[] | select(.|test("dcos-config--setup"))' | sed s/dcos-config--//
29
30
args :
33
34
34
35
- name : " Same version config update? Is latest DC/OS-config--setup package installed?"
35
36
shell : |
37
+ set -o pipefail
36
38
/opt/mesosphere/bin/dcos-path/dcos-shell pkgpanda list | grep {{ latest_dcos_config_setup.stdout }}
37
39
args :
38
40
executable : bash
Original file line number Diff line number Diff line change 61
61
62
62
- name : Purge old upgrade directory
63
63
file :
64
- path : " {{ download_path }}/genconf/serve"
64
+ path : " {{ download_path }}/genconf/serve/* "
65
65
state : absent
66
+ when : " dcos['version'] is version('1.9', '>=')"
67
+ loop : >
68
+ {{ groups['dcos'] | default([]) | map('extract',hostvars,'ansible_local')| list |
69
+ select('defined') | selectattr('dcos_installation', 'defined') |
70
+ map(attribute='dcos_installation') | map(attribute='version') | list |
71
+ union([dcos['version_to_upgrade_from'] | default(dcos['version']) ]) | unique }}
66
72
67
73
- name : Ceate install directory/genconf
68
74
file : path={{ download_path }}/genconf state=directory mode=0755
171
177
union([dcos['version_to_upgrade_from'] | default(dcos['version']) ]) | unique }}
172
178
173
179
- name : Get upgrade directory hash
174
- shell : " ls -td -- */ | head -n 1 | cut -d'/' -f1"
180
+ shell : |
181
+ set -o pipefail
182
+ ls -td -- */ | head -n 1 | cut -d'/' -f1
175
183
args :
176
184
chdir : " {{ download_path }}/genconf/serve/upgrade_from_{{ item }}"
177
185
changed_when : false
189
197
src : " {{ item.stdout }}"
190
198
state : link
191
199
when : " dcos['version'] is version('1.9', '>=')"
192
- loop : " {{upgrade_dir_hash.results}}"
200
+ loop : " {{ upgrade_dir_hash.results }}"
193
201
194
202
# vvv serve files via http vvv
195
203
Original file line number Diff line number Diff line change 29
29
# Step 1 on upgrading prcedure
30
30
- name : " Upgrade: Check for all-green Exhibitor status"
31
31
shell : |
32
+ set -o pipefail
32
33
curl --silent http://localhost:8181/exhibitor/v1/cluster/status | jq -r '.[].description' | uniq
33
34
args :
34
35
warn : false # Curl inside shell is what we need, silence warning.
50
51
port : 5050
51
52
delay : 10
52
53
- name : " Upgrade: Check for mesos-master systemd unit to be 'running'"
53
- shell : systemctl status dcos-mesos-master | grep '(running)'
54
+ shell : |
55
+ set -o pipefail
56
+ systemctl status dcos-mesos-master | grep '(running)'
54
57
args :
55
58
warn : false # We are not interested in changing the state itself, just if it's 'running'
56
59
retries : 12
60
63
# Step 5 on upgrading procedure
61
64
- name : " Upgrade: Check for CockrockDB replication status (Enterprise only)"
62
65
shell : |
66
+ set -o pipefail
63
67
/opt/mesosphere/bin/cockroach node status --ranges --certs-dir=/run/dcos/pki/cockroach --host=$(/opt/mesosphere/bin/detect_ip) --format tsv 2>/dev/null | tail -n+2 | head -n-1 | cut -f 10 | uniq
64
68
retries : 12
65
69
delay : 10
Original file line number Diff line number Diff line change 24
24
# Same version config updates for nodes that are on the same version, but differ in `dcos-config--setup` package version
25
25
- name : " Same version config update? Register latest DC/OS-config--setup version from bootstrap"
26
26
shell : |
27
+ set -o pipefail
27
28
curl {{ dcos['config']['bootstrap_url'] }}/{{ dcos_version_specifier }}/genconf/serve/package_lists/$(curl {{ dcos['config']['bootstrap_url'] }}/{{ dcos_version_specifier }}/genconf/serve/cluster-package-list.latest).package_list.json | \
28
29
jq -r '.[] | select(.|test("dcos-config--setup"))' | sed s/dcos-config--//
29
30
args :
33
34
34
35
- name : " Same version config update? Is latest DC/OS-config--setup package installed?"
35
36
shell : |
37
+ set -o pipefail
36
38
/opt/mesosphere/bin/dcos-path/dcos-shell pkgpanda list | grep {{ latest_dcos_config_setup.stdout }}
37
39
args :
38
40
executable : bash
Original file line number Diff line number Diff line change 1
- molecule==2.19.0
1
+ molecule==2.20.1
2
2
molecule[ec2]
3
3
molecule[vagrant]
4
4
boto
5
5
boto3
6
- ansible-lint==4.0.1
7
- yamllint==1.11.1
6
+ ansible-lint==4.1.0
7
+ yamllint==1.15.0
You can’t perform that action at this time.
0 commit comments