-
Notifications
You must be signed in to change notification settings - Fork 32
77 lines (72 loc) · 2.1 KB
/
scale_cluster.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
name: scale-cluster
on:
workflow_dispatch:
inputs:
CLUSTER:
description: 'Cluster Name'
required: true
default: ci-ai
NODES:
description: 'Nodes'
required: true
default: 3
PULLSECRET:
description: 'Pull Secret'
required: false
default: /root/openshift_pull.json
PARAMFILE:
description: 'paramfile'
required: false
default: .github/scale_parameters.yml
PLANFILE:
description: 'planfile'
required: false
default: .github/kcli_plan.yml
EXTRAPARAMS:
description: 'Extra params'
default: ''
env:
HOME: /root
PYTHONUNBUFFERED: true
CLUSTER: ${{github.event.inputs.CLUSTER}}
NODES: ${{github.event.inputs.NODES}}
PULLSECRET: ${{github.event.inputs.PULLSECRET}}
PARAMFILE: ${{github.event.inputs.PARAMFILE}}
PLANFILE: ${{github.event.inputs.PLANFILE}}
EXTRAPARAMS: ${{github.event.inputs.EXTRAPARAMS}}
AI_OFFLINETOKEN: ${{ secrets.AI_OFFLINETOKEN }}
# CLUSTER: ai-ci
# PULLSECRET: /root/openshift_pull.json
# PARAMFILE: .github/aicli_parameters.yml
jobs:
requirements:
runs-on: libvirt
steps:
- uses: actions/checkout@v2
- run: git pull origin ${GITHUB_REF##*/}
- name: Install kcli
run: |
curl https://raw.githubusercontent.com/karmab/kcli/master/install.sh | bash
kcli create sushy-service
- name: Install aicli
run: |
pip3 install -U assisted-service-client
python3 setup.py install
- name: Clean up
continue-on-error: true
run: |
kcli delete iso --yes full.iso || true
scale-kcli-plan:
needs: requirements
runs-on: libvirt
steps:
- name: Scale kcli plan
run: kcli -C local create plan -f $PLANFILE -P nodes=$(($NODES +2)) $CLUSTER
scale-ai-cluster:
needs: scale-kcli-plan
runs-on: libvirt
timeout-minutes: 30
steps:
- name: Scale ai cluster
run: |
aicli scale deployment --pf $PARAMFILE -P pull_secret=$PULLSECRET $EXTRAPARAMS $CLUSTER