-
Notifications
You must be signed in to change notification settings - Fork 0
/
sno.yml
75 lines (63 loc) · 1.98 KB
/
sno.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
- name: Single-Node OpenShift (SNO) with GPU on Equinix Metal
gather_facts: no
hosts: localhost
pre_tasks:
- name: Install Python dependencies
pip:
name: aicli
state: present
- name: Make sure the temp directory exists
file:
path: "{{ temp_dir }}"
state: directory
tasks:
- name: Create assisted cluster
karmab.aicli.ai_cluster:
name: "{{ cluster_name }}"
state: present
parameters:
openshift_version: "{{ openshift_version }}"
sno: true
minimal: false
pull_secret: "{{ pull_secret_path }}"
base_dns_domain: "{{ openshift_base_domain }}"
ssh_public_key: "{{ lookup('file', ssh_public_key) }}"
offlinetoken: "{{ ocm_offline_token }}"
- name: Read assisted cluster's InfraEnv for ISO download URL
karmab.aicli.ai_infraenv_info:
name: "{{ cluster_name }}"
offlinetoken: "{{ ocm_offline_token }}"
register: assisted_infraenv
- name: Provision bastion host
include_role:
name: bastion
vars:
iso_download_url: "{{ assisted_infraenv.download_url }}"
- name: Provision control nodes
include_role:
name: metal_nodes
vars:
machine_size: g2.large.x86 # c3.small.x86 for testing
roles:
- sno
- name: Install OpenShift cluster
include_role:
name: empovit.assisted_openshift.cluster_installation
vars:
temp_directory: "{{ temp_dir }}"
- name: Update DNS entries
include_role:
name: empovit.assisted_openshift.etc_hosts
vars:
api_vip: "{{ assisted_cluster.api_vip }}"
ingress_vip: "{{ assisted_cluster.ingress_vip }}"
- name: Delete bastion host
include_role:
name: bastion
tasks_from: destroy
- name: Install GPU Operator
include_role:
name: empovit.gpu_operator
vars:
openshift_api_vip: "{{ assisted_cluster.api_vip }}"