45
45
generate-tag :
46
46
name : Generate container image tag
47
47
if : github.repository == 'stackhpc/stackhpc-kayobe-config'
48
- runs-on : [self-hosted, stackhpc-kayobe-config-kolla-builder]
48
+ runs-on : ubuntu-latest
49
49
permissions : {}
50
50
outputs :
51
51
kolla_tag : ${{ steps.kolla_tag.outputs.kolla_tag }}
97
97
container-image-build :
98
98
name : Build Kolla container images
99
99
if : github.repository == 'stackhpc/stackhpc-kayobe-config'
100
- runs-on : [self-hosted, stackhpc-kayobe-config-kolla- builder]
100
+ runs-on : arc-skc-container-image- builder-runner
101
101
timeout-minutes : 720
102
102
permissions : {}
103
103
strategy :
@@ -106,7 +106,13 @@ jobs:
106
106
needs :
107
107
- generate-tag
108
108
steps :
109
- - uses : actions/checkout@v4
109
+ - name : Install package dependencies
110
+ run : |
111
+ sudo apt update
112
+ sudo apt install -y build-essential git unzip nodejs python3-wheel python3-pip python3-venv
113
+
114
+ - name : Checkout
115
+ uses : actions/checkout@v4
110
116
with :
111
117
path : src/kayobe-config
112
118
@@ -117,33 +123,9 @@ jobs:
117
123
ref : refs/heads/stackhpc/${{ needs.generate-tag.outputs.openstack_release }}
118
124
path : src/kayobe
119
125
120
- # FIXME: Failed in kolla-ansible : Ensure the latest version of pip is installed
121
- - name : Install dependencies
126
+ - name : Make sure dockerd is running and test Docker
122
127
run : |
123
- sudo dnf -y install python3-virtualenv
124
-
125
- - name : Setup networking
126
- run : |
127
- if ! ip l show breth1 >/dev/null 2>&1; then
128
- sudo ip l add breth1 type bridge
129
- fi
130
- sudo ip l set breth1 up
131
- if ! ip a show breth1 | grep 192.168.33.3/24; then
132
- sudo ip a add 192.168.33.3/24 dev breth1
133
- fi
134
- if ! ip l show dummy1 >/dev/null 2>&1; then
135
- sudo ip l add dummy1 type dummy
136
- fi
137
- sudo ip l set dummy1 up
138
- sudo ip l set dummy1 master breth1
139
-
140
- # FIXME: Without this workaround we see the following issue after the runner is power cycled:
141
- # TASK [MichaelRigart.interfaces : RedHat | ensure network service is started and enabled] ***
142
- # Unable to start service network: Job for network.service failed because the control process exited with error code.
143
- # See \"systemctl status network.service\" and \"journalctl -xe\" for details.
144
- - name : Kill dhclient (workaround)
145
- run : |
146
- (sudo killall dhclient || true) && sudo systemctl restart network
128
+ docker run --rm hello-world
147
129
148
130
- name : Install Kayobe
149
131
run : |
@@ -154,23 +136,19 @@ jobs:
154
136
pip install -U pip &&
155
137
pip install ../src/kayobe
156
138
157
- - name : Bootstrap the control host
158
- run : |
159
- source venvs/kayobe/bin/activate &&
160
- source src/kayobe-config/kayobe-env --environment ci-builder &&
161
- kayobe control host bootstrap
162
-
163
- - name : Configure the seed host
139
+ # Required for Docker registry login. Normally installed during host configure.
140
+ - name : Install Docker Python SDK
164
141
run : |
165
- source venvs/kayobe/bin/activate &&
166
- source src/kayobe-config/kayobe-env --environment ci-builder &&
167
- kayobe seed host configure
168
- env :
169
- KAYOBE_VAULT_PASSWORD : ${{ secrets.KAYOBE_VAULT_PASSWORD }}
142
+ pip install --user docker
170
143
171
- - name : Prune local Kolla container images over 1 week old
144
+ - name : Configure localhost as a seed
172
145
run : |
173
- sudo docker image prune --all --force --filter until=168h --filter="label=kolla_version"
146
+ cat > src/kayobe-config/etc/kayobe/environments/ci-builder/inventory/hosts << EOF
147
+ # A 'seed' host used for building images.
148
+ # Use localhost for container image builds.
149
+ [seed]
150
+ localhost ansible_connection=local ansible_python_interpreter=/usr/bin/python3
151
+ EOF
174
152
175
153
- name : Build and push kolla overcloud images
176
154
run : |
@@ -203,7 +181,7 @@ jobs:
203
181
204
182
- name : Get built container images
205
183
run : |
206
- sudo docker image ls --filter "reference=ark.stackhpc.com/stackhpc-dev/${{ matrix.distro }}-*:${{ needs.generate-tag.outputs.kolla_tag }}" > ${{ matrix.distro }}-container-images
184
+ docker image ls --filter "reference=ark.stackhpc.com/stackhpc-dev/${{ matrix.distro }}-*:${{ needs.generate-tag.outputs.kolla_tag }}" > ${{ matrix.distro }}-container-images
207
185
208
186
- name : Fail if no images have been built
209
187
run : if [ $(wc -l < ${{ matrix.distro }}-container-images) -le 1 ]; then exit 1; fi
0 commit comments