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

update centos repo gpgkey for rhel gpu vulkan-filesystem install #69

Open
wants to merge 64 commits into
base: galaxy-fix-and-additionals
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
2bde375
added optional checksum for DC/OS download task
Sep 2, 2019
8a3d2e5
updated docs
Sep 2, 2019
170bbfa
Merge pull request #63 from dcos/feature/checksum
Sep 3, 2019
0739dd7
Merge branch 'galaxy-fix-and-additionals'
sebbrandt87 Sep 3, 2019
6e673cf
rollback ssh_args, as there was an undetected error
sebbrandt87 Sep 3, 2019
8aeb678
remove pipefail from shell command
jr0d Aug 30, 2019
1855aa7
create the /var/lib/dcos and write the PSK
jr0d Sep 3, 2019
6f49cba
remove newlines
jr0d Sep 5, 2019
9ea327f
unique molecule keypairs, security groups, 1.13.4 and enterprise test…
sebbrandt87 Sep 6, 2019
f6a1ca6
back to full parallel run, disabled rhel7 enterprise for now
sebbrandt87 Sep 11, 2019
52375bd
instance tag needs to be unique too
sebbrandt87 Sep 11, 2019
ee5f877
wrong brackets
sebbrandt87 Sep 11, 2019
caff29a
replace instance name within platforms molecule.yml
sebbrandt87 Sep 11, 2019
a2d1701
before agent addded and ansible configurations to env only for CI tests
sebbrandt87 Sep 11, 2019
1684902
set again the env vars in post stage
sebbrandt87 Sep 11, 2019
fae825a
Merge pull request #66 from jr0d/jr/DCOS-56344-revised
sebbrandt87 Sep 11, 2019
a3020de
added PYTHONUNBUFFERED to Jenkinsfile
sebbrandt87 Sep 11, 2019
0dbe911
Merge branch 'master' of github.com:dcos/dcos-ansible
sebbrandt87 Sep 11, 2019
4e44d25
all Jenkins stages for molecule in single shell block, as we otherwis…
sebbrandt87 Sep 11, 2019
09c7429
exit 0 for rhel enterprise, still not working
sebbrandt87 Sep 11, 2019
c67de58
Remove nogroup group from DCOS 2.0
janisz Sep 17, 2019
365f8f5
Update roles/dcos_requirements/tasks/main.yml
janisz Sep 17, 2019
e2c3725
correct Jenkinsfile to do the ansible-lint for all roles, corrected l…
sebbrandt87 Sep 18, 2019
1bc335c
Merge pull request #68 from janisz/patch-1
Sep 18, 2019
01dd4d9
use command instead of shell
Sep 19, 2019
651b07f
fix wrong pubkey being used for rhel vulkan support
Sep 19, 2019
d1e93e3
Merge branch 'master' of github.com:dcos/dcos-ansible
Sep 19, 2019
2710274
improve spot and non-spot handling
Sep 19, 2019
ab17b52
g3 instances are hard to get via spot lets use on-demand for this sin…
Sep 19, 2019
0dd21c0
wrong scenario name it checks multiple systems
Sep 19, 2019
765d0d4
ansible 2.8
Sep 19, 2019
59d7528
add GPU scenario
Sep 19, 2019
726b77e
added fallback if vault is not available but major repo got already r…
Sep 19, 2019
fafaa3c
fix error in Jenkinsfile
Sep 19, 2019
8164aad
Merge pull request #70 from dcos/bug/gpu-repository-errors
Sep 20, 2019
5bfe3e6
Bump ansible from 2.8 to 2.8.2
dependabot[bot] Sep 23, 2019
e4526ad
Replace default('') with default(omit) jinja filter in docker install…
rubioks Sep 30, 2019
4e217a7
Merge pull request #71 from dcos/dependabot/pip/ansible-2.8.2
dependabot[bot] Sep 30, 2019
867efe4
Merge pull request #72 from keedio/Default_Dockerce_Repo
sebbrandt87 Oct 14, 2019
cf28e30
raised version for next release
sebbrandt87 Oct 15, 2019
dc20495
preinstall containerd.io to avoid kmem bug on >=containerd.io-1.2.10
Nov 18, 2019
3d4449e
Merge pull request #76 from dcos/bug/COPS-5597
Nov 19, 2019
585c912
merge by default. Needed for Universal Installer
Nov 21, 2019
07b40c5
Merge pull request #77 from dcos/julferts/hashing-merge
Nov 21, 2019
edff72a
raised version for next release
sebbrandt87 Nov 22, 2019
5b91151
chore: also build and push docker images for feature branches
sebbrandt87 Dec 18, 2019
7680e99
Use examples for molecule testing (#79)
Jan 29, 2020
19827da
Feature/airgapped (#90)
stefan-schlott Feb 12, 2020
f2e4be0
Revert "Feature/airgapped (#90)"
fatz Feb 13, 2020
9fe3ef5
Merge pull request #92 from dcos/revert-90-feature/airgapped
Feb 13, 2020
7224034
Bump ansible from 2.8.2 to 2.8.8
dependabot[bot] Feb 26, 2020
47e3b1e
Merge pull request #97 from dcos/dependabot/pip/ansible-2.8.8
Mar 2, 2020
7fd65a5
Use Exhibitor certificates if TLS supported
jongiddy Apr 23, 2020
2b2f9cc
Merge pull request #112 from jongiddy/jongiddy/secure-exhibitor
Apr 24, 2020
9d9fff5
dcos_requirements: fix centos7 install
jkoelker May 19, 2020
0e4def5
Merge pull request #115 from jkoelker/fix_centos_install
May 19, 2020
303d966
fix: DC/OS expects cuda 10
Oct 1, 2020
b33a456
Merge pull request #120 from dcos/julferts/cuda-pkg-var
Oct 1, 2020
b964a4c
fix: use the correct cuda version and specify driver version
Oct 5, 2020
0f2311a
Merge pull request #121 from dcos/julferts/cuda-pkg-var
Oct 6, 2020
ee0ac2a
fix: docker-py latest does not suppoer py2
fatz Apr 8, 2021
7437e12
Merge pull request #125 from dcos/julferts/fix-docker-py
Apr 8, 2021
0edbc92
bootstrap: pin `websocket-client`
jkoelker May 20, 2021
0c590a2
Merge pull request #126 from jkoelker/pin_websocket
May 21, 2021
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
279 changes: 254 additions & 25 deletions Jenkinsfile

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ dcos_legacy_node_type_name=slave_public

```yml
dcos:
download: "https://downloads.dcos.io/dcos/stable/1.13.3/dcos_generate_config.sh"
version: "1.13.3"
download: "https://downloads.dcos.io/dcos/stable/1.13.4/dcos_generate_config.sh"
download_checksum: "sha256:a3d295de33ad55b10f5dc66c9594d9175a40f5aaec7734d664493968a9f751fd"
version: "1.13.4"
enterprise_dcos: false
selinux_mode: enforcing

Expand All @@ -90,6 +91,7 @@ dcos:
| Name | Required? | Description |
|:------------------------|:-------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| download | REQUIRED | (https) URL to download the Mesosphere DC/OS install from |
| download_checksum | no | Checksum to check the download against. It should start with the method being used. E.g. "sha256:<checksum>"
| version | REQUIRED | Version string that reflects the version that the installer (given by `download`) installs. Can be collected by running `dcos_generate_config.sh --version`. |
| version_to_upgrade_from | for upgrades | Version string of Mesosphere DC/OS the upgrade procedure expectes to upgrade FROM. A per-version upgrade script will be generated on the bootstrap machine, each cluster node downloads the proper upgrade for its currenly running DC/OS version. |
| image_commit | no | Can be used to force same version / same config upgrades. Mostly useful for deploying/upgrading non-released versions, e.g. `1.12-dev`. This parameter takes precedence over `version`. |
Expand Down
4 changes: 2 additions & 2 deletions ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ inventory = inventory
host_key_checking = False
remote_user = centos
forks = 100
hash_behaviour = replace
hash_behaviour = merge
[ssh_connection]
control_path = %(directory)s/%%C
pipelining = True
ssh_args = -o PreferredAuthentications=publickey -o ControlMaster=auto -o ControlPersist=5m -o IdentitiesOnly=yes -o PasswordAuthentication=no -o ConnectTimeout=320
ssh_args = -o PreferredAuthentications=publickey -o ControlMaster=auto -o ControlPersist=5m
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
namespace: dcos
name: cluster
version: 0.56.0
version: 0.58.0
readme: README.md
description: Ansible roles to manage a Mesosphere DC/OS clusters lifecycle
authors:
Expand Down
28 changes: 28 additions & 0 deletions group_vars/all/dcos-ee.yaml.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
dcos:
download: "https://downloads.mesosphere.com/dcos-enterprise/stable/2.0.1/dcos_generate_config.ee.sh"
download_checksum: "sha256:b41ed2fbb5e82562c6c666777054b24a563fedfccf604b6a4b44f5ee2af464a7"
download_win: "https://downloads.mesosphere.com/dcos-enterprise/testing/master/windows/dcos_generate_config_win.ee.sh"
version: "2.0.1"
enterprise_dcos: true

selinux_mode: permissive

config:
# This is a direct yaml representation of the DC/OS config.yaml
# Please see https://docs.mesosphere.com/1.13/installing/production/advanced-configuration/configuration-reference/
# for parameter reference.
cluster_name: "examplecluster"
license_key_contents: "<REPLACE WITH VALID LICENSE>"
security: strict
bootstrap_url: http://int-bootstrap1-examplecluster.example.com:8080
exhibitor_storage_backend: static
master_discovery: static
master_list:
- 172.31.2.95
# This is an ip-detect script example which also stands for ip_detect_public_contents
# more info about ip-detect can be found here: https://docs.mesosphere.com/1.13/installing/production/deploying-dcos/installation/#create-an-ip-detection-script
# ip_detect_contents: |
# #!/bin/sh
# set -o nounset -o errexit
# ip addr show dev eth1 primary | awk '/(inet .*\/)/ { print $2 }' | cut -d'/' -f1
6 changes: 4 additions & 2 deletions group_vars/all/dcos.yaml.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
---
dcos:
download: "https://downloads.dcos.io/dcos/stable/1.13.3/dcos_generate_config.sh"
version: "1.13.3"
download: "https://downloads.dcos.io/dcos/stable/2.0.1/dcos_generate_config.sh"
download_checksum: "sha256:4c23098d14ca7920062114def614f2d60d3f76ab5f59783ddfb713aa96718ed8"
download_win: "https://downloads.dcos.io/dcos/testing/master/windows/dcos_generate_config_win.sh"
version: "2.0.1"
enterprise_dcos: false

selinux_mode: permissive
Expand Down
9 changes: 0 additions & 9 deletions molecule/default/idempotence.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
name: dcos_bootstrap
vars:
dcos:
download: "https://downloads.dcos.io/dcos/stable/1.13.3/dcos_generate_config.sh"
version: "1.13.3"
version_to_upgrade_from: "1.13.3"
config:
bootstrap_url: "http://{{ hostvars[groups['bootstraps'][0]].ansible_facts.default_ipv4.address }}:8080"
master_list: ["{{ hostvars[groups['masters'][0]].ansible_facts.default_ipv4.address }}"]
Expand All @@ -28,9 +25,6 @@
name: dcos_master
vars:
dcos:
download: "https://downloads.dcos.io/dcos/stable/1.13.3/dcos_generate_config.sh"
version: "1.13.3"
version_to_upgrade_from: "1.13.3"
config:
bootstrap_url: "http://{{ hostvars[groups['bootstraps'][0]].ansible_facts.default_ipv4.address }}:8080"
master_list: ["{{ hostvars[groups['masters'][0]].ansible_facts.default_ipv4.address }}"]
Expand All @@ -44,9 +38,6 @@
name: dcos_agent
vars:
dcos:
download: "https://downloads.dcos.io/dcos/stable/1.13.3/dcos_generate_config.sh"
version: "1.13.3"
version_to_upgrade_from: "1.13.3"
config:
bootstrap_url: "http://{{ hostvars[groups['bootstraps'][0]].ansible_facts.default_ipv4.address }}:8080"
master_list: ["{{ hostvars[groups['masters'][0]].ansible_facts.default_ipv4.address }}"]
Expand Down
62 changes: 26 additions & 36 deletions molecule/ec2/create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,21 @@
vars:
ssh_user: ec2-user
ssh_port: 22
spot_price_max_calc: 5

security_group_name: molecule
admin_ip: "{{ lookup('url', 'http://whatismyip.akamai.com') }}"
security_group_name: "molecule_{{ lookup('env', 'HOSTNAME') | default(lookup('env', 'USER') | to_uuid, true) }}"
security_group_description: Security group for testing Molecule
security_group_rules:
- proto: tcp
from_port: "{{ ssh_port }}"
to_port: "{{ ssh_port }}"
cidr_ip: "0.0.0.0/0"
cidr_ip: "{{ admin_ip }}/32"
- proto: icmp
from_port: 8
to_port: -1
cidr_ip: "0.0.0.0/0"
- proto: tcp
cidr_ip: "{{ admin_ip }}/32"
- proto: all
from_port: 0
to_port: 65535
cidr_ip: "172.31.0.0/16"
Expand All @@ -29,7 +31,7 @@
to_port: 0
cidr_ip: "0.0.0.0/0"

keypair_name: molecule_key
keypair_name: "molecule_key_{{ lookup('env', 'HOSTNAME') | default(lookup('env', 'USER') | to_uuid, true) }}"
keypair_path: "{{ lookup('env', 'MOLECULE_EPHEMERAL_DIRECTORY') }}/ssh_key"
tasks:
- debug:
Expand All @@ -40,53 +42,39 @@
description: "{{ security_group_name }}"
rules: "{{ security_group_rules }}"
rules_egress: "{{ security_group_rules_egress }}"
region: "{{ item.region }}"
with_items: "{{ molecule_yml.platforms }}"

- name: Test for presence of local keypair
stat:
path: "{{ keypair_path }}"
register: keypair_local
region: "{{ molecule_yml.platforms[0].region }}"
register: security_group

- name: Delete remote keypair
- name: Create keypair
ec2_key:
name: "{{ keypair_name }}"
state: absent
region: "{{ item.region }}"
with_items: "{{ molecule_yml.platforms }}"
when: not keypair_local.stat.exists
region: "{{ molecule_yml.platforms[0].region }}"
register: keypair

- name: Create keypairs
ec2_key:
name: "{{ keypair_name }}"
region: "{{ item.region }}"
with_items: "{{ molecule_yml.platforms }}"
register: keypairs

- name: Persist the keypairs
blockinfile:
path: "{{ keypair_path }}"
create: yes
state: present
block: "{{ item.key.private_key }}"
- name: Persist the keypair
copy:
dest: "{{ keypair_path }}"
content: "{{ keypair.key.private_key }}"
mode: 0600
when: item.changed
with_items: "{{ keypairs.results }}"
when: keypair.changed

- name: Create molecule instance(s)
ec2:
key_name: "{{ keypair_name }}"
image: "{{ item.image }}"
region: "{{ item.region }}"
zone: "{{ item.zone|default(omit) }}"
instance_initiated_shutdown_behavior: terminate
instance_type: "{{ item.instance_type }}"
spot_price: "{{ item.spot_price | ternary(item.spot_price, omit) if item.spot_price is defined else spot_price_max_calc }}"
group: "{{ security_group_name }}"
volumes:
- device_name: /dev/sda1
volume_size: 20
volume_type: gp2
delete_on_termination: yes
instance_tags:
Name: "molecule {{ item.name }} {{ lookup('env', 'USER') | default('ci', true) }}@{{ lookup('env', 'HOSTNAME') | default((lookup('env', 'USER') + lookup('pipe', 'date +%Y-%m-%d-%H-%M-%S')) | to_uuid, true) }}"
Name: "molecule {{ item.name }}"
instance: "{{ item.name }}"
molecule_region: "{{ item.region }}"
molecule_ssh_user: "{{ item.ssh_user | default(ssh_user) }}"
Expand All @@ -95,7 +83,9 @@
count_tag:
instance: "{{ item.name }}"
register: server
with_items: "{{ molecule_yml.platforms }}"
loop: "{{ molecule_yml.platforms }}"
loop_control:
index_var: index
async: 7200
poll: 0

Expand All @@ -121,7 +111,7 @@
"identity_file": "{{ keypair_path }}",
"instance_ids": "{{ item.instance_ids }}",
}
with_items: "{{ ec2_jobs.results | default(server.results) }}"
with_items: "{{ ec2_jobs.results }}"
register: instance_config_dict
when: server.changed | bool

Expand All @@ -147,4 +137,4 @@

- name: Wait for boot process to finish
pause:
seconds: 42
seconds: 2
58 changes: 36 additions & 22 deletions molecule/ec2/destroy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,45 +4,59 @@
connection: local
gather_facts: false
no_log: "{{ not (lookup('env', 'MOLECULE_DEBUG') | bool or molecule_yml.provisioner.log|default(false) | bool) }}"
vars:
security_group_name: "molecule_{{ lookup('env', 'HOSTNAME') | default(lookup('env', 'USER') | to_uuid, true) }}"
keypair_name: "molecule_key_{{ lookup('env', 'HOSTNAME') | default(lookup('env', 'USER') | to_uuid, true) }}"
tasks:
- block:
- name: Populate instance config
set_fact:
instance_conf: "{{ lookup('file', molecule_instance_config) | molecule_from_yaml }}"
skip_instances: false
rescue:
- name: Populate instance config when file missing
set_fact:
instance_conf: {}
skip_instances: true

- name: Destroy molecule instance(s)
- name: "check if {{ molecule_instance_config }} file exists"
stat:
path: "{{ molecule_instance_config }}"
register: molecule_instance_config_stat

- name: Populate instance config
set_fact:
instance_conf: "{{ lookup('file', molecule_instance_config) | molecule_from_yaml }}"
skip_instances: false
when: molecule_instance_config_stat.stat.exists

- name: Populate instance config when file missing
set_fact:
instance_conf: {}
skip_instances: true
when: not molecule_instance_config_stat.stat.exists

- name: Destroy molecule instances
ec2:
state: absent
instance_ids: "{{ item.instance_ids }}"
region: "{{ item.region }}"
wait: true
wait_timeout: 600
register: server
with_items: "{{ instance_conf }}"
when: not skip_instances
async: 7200
poll: 0

- name: Wait for instance(s) deletion to complete
async_status:
jid: "{{ item.ansible_job_id }}"
register: ec2_jobs
until: ec2_jobs.finished
retries: 300
with_items: "{{ server.results }}"
- name: Delete remote keypair
ec2_key:
name: "{{ keypair_name }}"
state: absent
region: "{{ molecule_yml.platforms[0].region }}"

- name: Destroy molecule security_group
ec2_group:
name: "{{ security_group_name }}"
state: absent
region: "{{ molecule_yml.platforms[0].region }}"

# Mandatory configuration for Molecule to function.

- name: Populate instance config
set_fact:
instance_conf: {}
register: clear_config

- name: Dump instance config
copy:
content: "{{ instance_conf | to_json | from_json | molecule_to_yaml | molecule_header }}"
dest: "{{ molecule_instance_config }}"
when: server.changed | bool
when: clear_config
Loading