Commit 6e87cb4d authored by Emmanuel Jaep's avatar Emmanuel Jaep
Browse files

Merge branch 'fixAwsPath' into 'master'

Fix aws path

See merge request !3
parents a47d7a2c c97c762d
......@@ -3,4 +3,35 @@
s3_base_url: https://s3.epfl.ch/10282-70726cc2c34fcfe7d4325ef7ea151411
tmp_montools: "/tmp/montools"
\ No newline at end of file
tmp_montools: "/tmp/montools"
dcgm_install_version: "datacenter-gpu-manager-2.1.4-1-x86_64"
tmp_dcgm: "/tmp/"
dcgm_versions:
datacenter-gpu-manager-2.1.4-1-x86_64:
url: datacenter-gpu-manager-2.1.4-1-x86_64.rpm
password: !vault |
$ANSIBLE_VAULT;1.1;AES256
32663566646239356237643931646662353436666461656132646566326438306237656332643264
3262333631646562363333636637613863653861383162610a663663616135383639646264393438
39363638646364616133396562666239353266313863343733316436363764666565343839613034
6138326137393132660a323564613133373065323739666263306139633561363463323332306336
6234
aws_access_key: !vault |
$ANSIBLE_VAULT;1.1;AES256
61653863313239353563376165396363303837326136376336363164313861346265666165633264
3866613631376466323065623537356461643135666531640a643933373139623637373234633864
63346235373732373034633261633465353931663630353936396230323863323964343762323762
3233313132306666350a373439363938366362663634323039393966336464306565353066393362
36643262316139393531616335326439643566666135306466386231343762336135
aws_secret_key: !vault |
$ANSIBLE_VAULT;1.1;AES256
63333833383837636135663937313738353364323635366162323366663633666264396161666165
3435313865363630376261313638646366396466633662650a383239666665333938663136353834
33653735386665333938373332343865343235623266616538633366323837383530633364623736
3063656234356462380a366638626665313933626462623432356238616363393636333862633964
66366338336561366235666561333133653337366637333835383063323765353732313665343334
3162363761623835393664613230376164653263386165393162
---
# tasks file for ansible_gpu_exporter
- name: Install dnf packages manager to proceed later to install DCGM
yum:
name:
- dnf
state: present
- name: Install the latest version of datacenter-gpu-manager
dnf:
name: datacenter-gpu-manager
state: latest
update_cache: yes
- name: Download {{ dcgm_install_version }}.zip
amazon.aws.aws_s3:
access_key: "{{ aws_access_key }}"
secret_key: "{{ aws_secret_key }}"
bucket: 10282-70726cc2c34fcfe7d4325ef7ea151411
object: "/{{ dcgm_versions[dcgm_install_version]['url'] }}"
dest: "{{ tmp_dcgm }}/{{ dcgm_versions[dcgm_install_version]['url'] }}"
mode: get
s3_url: https://s3.epfl.ch/
validate_certs: no
- name: Install rpm package requirements
yum:
name: "{{ tmp_dcgm }}/{{ dcgm_versions[dcgm_install_version]['url'] }}"
- name: Check montools temp folder
become: yes
stat:
path: "{{ tmp_montools }}"
register: montools_tmp
- name: Create montools tmp folder
file:
path: "{{ tmp_montools }}"
state: directory
mode: "0755"
when: montools_tmp.stat.exists == False
- name: check that gpu_montools.zip is not already downloaded
stat:
path: "{{ tmp_montools }}/gpu_montools.zip"
register: montools_bundle
- name: download gpu_montools
get_url:
url: "{{ s3_base_url }}/gpu_montools.zip"
dest: "{{ tmp_montools }}"
timeout: 120
when: montools_bundle.stat.exists == false
- name: unzip gpu_montools.zip
unarchive:
dest: "{{ tmp_montools }}"
src: "{{ tmp_montools }}/gpu_montools.zip"
remote_src: yes
- name: Install target as root
make:
chdir: "{{ tmp_montools }}/gpu_montools"
target: install
file: "{{ tmp_montools }}/gpu_montools/Makefile"
become: yes
- name: enable and start prometheus-dcgm.service
systemd:
name: prometheus-dcgm.service
state: started
enabled: yes
---
# tasks file for ansible_gpu_exporter
- name: Download {{ dcgm_install_version }}.zip
amazon.aws.aws_s3:
access_key: "{{ aws_access_key }}"
secret_key: "{{ aws_secret_key }}"
bucket: 10282-70726cc2c34fcfe7d4325ef7ea151411
object: "/{{ dcgm_versions[dcgm_install_version]['url'] }}"
dest: "{{ tmp_dcgm }}/{{ dcgm_versions[dcgm_install_version]['url'] }}"
mode: get
s3_url: https://s3.epfl.ch/
validate_certs: no
- name: Install rpm package requirements
yum:
name: "{{ tmp_dcgm }}/{{ dcgm_versions[dcgm_install_version]['url'] }}"
- name: Check montools temp folder
become: yes
stat:
path: "{{ tmp_montools }}"
register: montools_tmp
- name: Create montools tmp folder
file:
path: "{{ tmp_montools }}"
state: directory
mode: "0755"
when: montools_tmp.stat.exists == False
- name: check that gpu_montools.zip is not already downloaded
stat:
path: "{{ tmp_montools }}/gpu_montools.zip"
register: montools_bundle
- name: download gpu_montools
get_url:
url: "{{ s3_base_url }}/gpu_montools.zip"
dest: "{{ tmp_montools }}"
timeout: 120
when: montools_bundle.stat.exists == false
- name: unzip gpu_montools.zip
unarchive:
dest: "{{ tmp_montools }}"
src: "{{ tmp_montools }}/gpu_montools.zip"
remote_src: yes
- name: Install target as root
make:
chdir: "{{ tmp_montools }}/gpu_montools"
target: install
file: "{{ tmp_montools }}/gpu_montools/Makefile"
become: yes
- name: enable and start prometheus-dcgm.service
systemd:
name: prometheus-dcgm.service
state: started
enabled: yes
---
# tasks file for ansible_gpu_exporter
- include: debian.yml tags=debian
when: ansible_os_family == 'Debian'
- name: Download deb package
get_url:
url: "{{ s3_base_url }}/datacenter-gpu-manager_1.7.2_amd64.deb"
dest: "/tmp/datacenter-gpu-manager_1.7.2_amd64.deb"
mode: '0770'
- name: Install deb package requirements
apt:
deb: "/tmp/datacenter-gpu-manager_1.7.2_amd64.deb"
force: yes
- name: Check montools temp folder
become: yes
stat:
path: "{{ tmp_montools }}"
register: montools_tmp
- name: Create montools tmp folder
file:
path: "{{ tmp_montools }}"
state: directory
mode: "0755"
when: montools_tmp.stat.exists == False
- name: check that gpu_montools.zip is not already downloaded
stat:
path: "{{ tmp_montools }}/gpu_montools.zip"
register: montools_bundle
- name: download gpu_montools
get_url:
url: "{{ s3_base_url }}/gpu_montools.zip"
dest: "{{ tmp_montools }}"
timeout: 120
when: montools_bundle.stat.exists == false
- name: unzip gpu_montools.zip
unarchive:
dest: "{{ tmp_montools }}"
src: "{{ tmp_montools }}/gpu_montools.zip"
remote_src: yes
- name: Install target as root
make:
chdir: "{{ tmp_montools }}/gpu_montools"
target: install
file: "{{ tmp_montools }}/gpu_montools/Makefile"
become: yes
- name: enable and start prometheus-dcgm.service
systemd:
name: prometheus-dcgm.service
state: started
enabled: yes
- include: centos.yml tags=centos
when: ansible_distribution == "CentOS"
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment