-
Notifications
You must be signed in to change notification settings - Fork 53
157 lines (149 loc) · 5.75 KB
/
z_base_callable.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
name : Base Callable Workflow
on:
workflow_call:
inputs:
resource_group:
description: 'Name of the resource group to deploy in - In case of an existing resource group the environment will be updated'
required: true
default: 'AUTO_GENERATED'
type: string
location:
description: 'Azure location where to deploy to - default to westeurope'
required: true
default: 'westeurope'
type: string
scheduler:
description: 'Job Scheduler to be installed : openpbs/slurm'
required: true
default: 'slurm' # use it with ${{ inputs.scheduler }}
type: string
images:
description: 'Images to be used (marketplace/shared) or built (private): marketplace/shared/private'
required: false
default: 'marketplace' # use it with ${{ inputs.images }}
type: string
lustre:
description: 'Deploy a Lustre cluster (true/false) - Default to false'
required: false
default: 'false' # use it with ${{ inputs.lustre }}
type: string
home_type:
description: 'Home directory type anf/azurefiles- Default to anf'
required: false
default: 'anf' # use it with ${{ inputs.home_type }}
type: string
user_auth:
description: 'User Authentication: local/ad - Default to ad'
required: false
default: 'ad' # use it with ${{ inputs.user_auth }}
type: string
deploy_with:
description: 'Method used for the deployment - tf, bicep or arm - Default to bicep'
required: false
default: 'bicep' # use it with ${{ inputs.deploy_with }}
type: string
ui_tests:
description: 'Run UI tests - Default to false'
required: false
default: 'false' # use it with ${{ inputs.ui_tests }}
type: string
monitoring:
description: 'Monitoring agent - ama, grafana, none - Default to grafana'
required: false
default: 'grafana' # use it with ${{ inputs.monitoring }}
type: string
clean:
description: 'Clean all resources'
required: false
default: 'true' # use it with ${{ inputs.clean }}
type: string
infra_os:
description: 'Operating System for the infrastructure: centos/almalinux/ubuntu - Default to almalinux'
required: false
default: 'almalinux' # use it with ${{ inputs.infra_os }}
type: string
cycle_slurm_version:
description: 'Version of the cyclecloud slurm project 2.7 or 3.0 - default to 2.7'
required: false
default: '3.0' # use it with ${{ inputs.cycle_slurm_version }}
type: string
secrets:
ARM_SUBSCRIPTION_ID:
required: true
ARM_TENANT_ID:
required: true
REGISTRY_USERNAME:
required: true
REGISTRY_PASSWORD:
required: true
jobs:
create_config:
uses: ./.github/workflows/z_create_config_callable.yml
with:
resource_group: ${{ inputs.resource_group }}
location: ${{ inputs.location }}
scheduler: ${{ inputs.scheduler }}
lustre: ${{ inputs.lustre }}
home_type: ${{ inputs.home_type }}
user_auth: ${{ inputs.user_auth }}
monitoring: ${{ inputs.monitoring }}
infra_os: ${{ inputs.infra_os }}
cycle_slurm_version: ${{ inputs.cycle_slurm_version }}
secrets:
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
deploy:
uses: ./.github/workflows/z_deploy_callable.yml
needs: create_config
with:
resource_group: ${{ needs.create_config.outputs.resource_group }}
deploy_with: ${{ inputs.deploy_with }}
secrets:
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
install:
uses: ./.github/workflows/z_install_callable.yml
needs: [create_config, deploy]
with:
resource_group: ${{ needs.create_config.outputs.resource_group }}
secrets:
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
test:
uses: ./.github/workflows/z_test_callable.yml
needs: [create_config, install]
with:
resource_group: ${{ needs.create_config.outputs.resource_group }}
secrets:
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
ui_tests:
uses: ./.github/workflows/z_uitesting_callable.yml
needs: [create_config, install]
if: inputs.ui_tests == 'true'
with:
resource_group: ${{ needs.create_config.outputs.resource_group }}
secrets:
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
destroy:
uses: ./.github/workflows/z_destroy_callable.yml
if: always() && inputs.clean == 'true'
needs: [create_config, test, ui_tests]
with:
resource_group: ${{ needs.create_config.outputs.resource_group }}
secrets:
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}