kerbside 0.2.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. kerbside-0.2.5/.github/workflows/functional-tests.yml +475 -0
  2. kerbside-0.2.5/.github/workflows/pin-indirect-dependencies.yml +106 -0
  3. kerbside-0.2.5/.github/workflows/release.yml +137 -0
  4. kerbside-0.2.5/.gitignore +143 -0
  5. kerbside-0.2.5/.stestr.conf +3 -0
  6. kerbside-0.2.5/AGENTS.md +205 -0
  7. kerbside-0.2.5/ARCHITECTURE.md +274 -0
  8. kerbside-0.2.5/AUTHORS +1 -0
  9. kerbside-0.2.5/LICENSE +201 -0
  10. kerbside-0.2.5/PKG-INFO +219 -0
  11. kerbside-0.2.5/README.md +158 -0
  12. kerbside-0.2.5/RELEASE-SETUP.md +164 -0
  13. kerbside-0.2.5/alembic/env.py +76 -0
  14. kerbside-0.2.5/alembic/script.py.mako +24 -0
  15. kerbside-0.2.5/alembic/versions/5c8101ff14d7_sources_can_be_deleted.py +23 -0
  16. kerbside-0.2.5/alembic/versions/7d1c2f36a7b3_connection_id_as_bigint.py +29 -0
  17. kerbside-0.2.5/alembic/versions/ad47e96baff6_initial_schema.py +106 -0
  18. kerbside-0.2.5/alembic/versions/bb26023f0c98_remove_flavor_column.py +23 -0
  19. kerbside-0.2.5/alembic.ini +107 -0
  20. kerbside-0.2.5/bindep.txt +14 -0
  21. kerbside-0.2.5/docs/capabilities.md +175 -0
  22. kerbside-0.2.5/docs/channel-protocols.md +908 -0
  23. kerbside-0.2.5/docs/compression-protocols.md +251 -0
  24. kerbside-0.2.5/docs/configuration.md +107 -0
  25. kerbside-0.2.5/docs/console-sources.md +141 -0
  26. kerbside-0.2.5/docs/index.md +286 -0
  27. kerbside-0.2.5/docs/protocol-overview.md +253 -0
  28. kerbside-0.2.5/docs/proxy-architecture.md +437 -0
  29. kerbside-0.2.5/docs/scancodes.md +297 -0
  30. kerbside-0.2.5/docs/schema.html +81 -0
  31. kerbside-0.2.5/docs/schema.md +158 -0
  32. kerbside-0.2.5/docs/spice-link-protocol.md +307 -0
  33. kerbside-0.2.5/docs/usb-redirection.md +613 -0
  34. kerbside-0.2.5/docs/vd-agent-protocol.md +376 -0
  35. kerbside-0.2.5/etc/ovirt-44-rocky-8-answers.conf +26 -0
  36. kerbside-0.2.5/etc/ovirt-44-rocky-8-repos.patch +95 -0
  37. kerbside-0.2.5/etc/ovirt-45-rocky-8-answers.conf +30 -0
  38. kerbside-0.2.5/etc/ovirt-45-rocky-8-repos.patch +94 -0
  39. kerbside-0.2.5/etc/ovirt-45-rocky-9-answers.conf +30 -0
  40. kerbside-0.2.5/etc/ovirt-45-rocky-9-repos.patch +0 -0
  41. kerbside-0.2.5/kerbside/__init__.py +0 -0
  42. kerbside-0.2.5/kerbside/_version.py +34 -0
  43. kerbside-0.2.5/kerbside/api/static/css/bootstrap-grid.css +4085 -0
  44. kerbside-0.2.5/kerbside/api/static/css/bootstrap-grid.css.map +1 -0
  45. kerbside-0.2.5/kerbside/api/static/css/bootstrap-grid.min.css +6 -0
  46. kerbside-0.2.5/kerbside/api/static/css/bootstrap-grid.min.css.map +1 -0
  47. kerbside-0.2.5/kerbside/api/static/css/bootstrap-grid.rtl.css +4084 -0
  48. kerbside-0.2.5/kerbside/api/static/css/bootstrap-grid.rtl.css.map +1 -0
  49. kerbside-0.2.5/kerbside/api/static/css/bootstrap-grid.rtl.min.css +6 -0
  50. kerbside-0.2.5/kerbside/api/static/css/bootstrap-grid.rtl.min.css.map +1 -0
  51. kerbside-0.2.5/kerbside/api/static/css/bootstrap-reboot.css +593 -0
  52. kerbside-0.2.5/kerbside/api/static/css/bootstrap-reboot.css.map +1 -0
  53. kerbside-0.2.5/kerbside/api/static/css/bootstrap-reboot.min.css +6 -0
  54. kerbside-0.2.5/kerbside/api/static/css/bootstrap-reboot.min.css.map +1 -0
  55. kerbside-0.2.5/kerbside/api/static/css/bootstrap-reboot.rtl.css +590 -0
  56. kerbside-0.2.5/kerbside/api/static/css/bootstrap-reboot.rtl.css.map +1 -0
  57. kerbside-0.2.5/kerbside/api/static/css/bootstrap-reboot.rtl.min.css +6 -0
  58. kerbside-0.2.5/kerbside/api/static/css/bootstrap-reboot.rtl.min.css.map +1 -0
  59. kerbside-0.2.5/kerbside/api/static/css/bootstrap-utilities.css +5399 -0
  60. kerbside-0.2.5/kerbside/api/static/css/bootstrap-utilities.css.map +1 -0
  61. kerbside-0.2.5/kerbside/api/static/css/bootstrap-utilities.min.css +6 -0
  62. kerbside-0.2.5/kerbside/api/static/css/bootstrap-utilities.min.css.map +1 -0
  63. kerbside-0.2.5/kerbside/api/static/css/bootstrap-utilities.rtl.css +5390 -0
  64. kerbside-0.2.5/kerbside/api/static/css/bootstrap-utilities.rtl.css.map +1 -0
  65. kerbside-0.2.5/kerbside/api/static/css/bootstrap-utilities.rtl.min.css +6 -0
  66. kerbside-0.2.5/kerbside/api/static/css/bootstrap-utilities.rtl.min.css.map +1 -0
  67. kerbside-0.2.5/kerbside/api/static/css/bootstrap.css +12071 -0
  68. kerbside-0.2.5/kerbside/api/static/css/bootstrap.css.map +1 -0
  69. kerbside-0.2.5/kerbside/api/static/css/bootstrap.min.css +6 -0
  70. kerbside-0.2.5/kerbside/api/static/css/bootstrap.min.css.map +1 -0
  71. kerbside-0.2.5/kerbside/api/static/css/bootstrap.rtl.css +12035 -0
  72. kerbside-0.2.5/kerbside/api/static/css/bootstrap.rtl.css.map +1 -0
  73. kerbside-0.2.5/kerbside/api/static/css/bootstrap.rtl.min.css +6 -0
  74. kerbside-0.2.5/kerbside/api/static/css/bootstrap.rtl.min.css.map +1 -0
  75. kerbside-0.2.5/kerbside/api/static/icons/README.md +8 -0
  76. kerbside-0.2.5/kerbside/api/static/icons/audit.svg +1 -0
  77. kerbside-0.2.5/kerbside/api/static/icons/bug.svg +1 -0
  78. kerbside-0.2.5/kerbside/api/static/icons/change.svg +1 -0
  79. kerbside-0.2.5/kerbside/api/static/icons/connect.svg +1 -0
  80. kerbside-0.2.5/kerbside/api/static/icons/sessions.svg +1 -0
  81. kerbside-0.2.5/kerbside/api/static/icons/tokens.svg +1 -0
  82. kerbside-0.2.5/kerbside/api/static/js/axios.min.js +2 -0
  83. kerbside-0.2.5/kerbside/api/static/js/bootstrap.bundle.js +6306 -0
  84. kerbside-0.2.5/kerbside/api/static/js/bootstrap.bundle.js.map +1 -0
  85. kerbside-0.2.5/kerbside/api/static/js/bootstrap.bundle.min.js +7 -0
  86. kerbside-0.2.5/kerbside/api/static/js/bootstrap.bundle.min.js.map +1 -0
  87. kerbside-0.2.5/kerbside/api/static/js/bootstrap.esm.js +4439 -0
  88. kerbside-0.2.5/kerbside/api/static/js/bootstrap.esm.js.map +1 -0
  89. kerbside-0.2.5/kerbside/api/static/js/bootstrap.esm.min.js +7 -0
  90. kerbside-0.2.5/kerbside/api/static/js/bootstrap.esm.min.js.map +1 -0
  91. kerbside-0.2.5/kerbside/api/static/js/bootstrap.js +4486 -0
  92. kerbside-0.2.5/kerbside/api/static/js/bootstrap.js.map +1 -0
  93. kerbside-0.2.5/kerbside/api/static/js/bootstrap.min.js +7 -0
  94. kerbside-0.2.5/kerbside/api/static/js/bootstrap.min.js.map +1 -0
  95. kerbside-0.2.5/kerbside/api/static/js/jquery-3.7.0.min.js +2 -0
  96. kerbside-0.2.5/kerbside/api/static/logo.svg +228 -0
  97. kerbside-0.2.5/kerbside/api/templates/audit.html +30 -0
  98. kerbside-0.2.5/kerbside/api/templates/base.html +77 -0
  99. kerbside-0.2.5/kerbside/api/templates/consoles.html +102 -0
  100. kerbside-0.2.5/kerbside/api/templates/login.html +83 -0
  101. kerbside-0.2.5/kerbside/api/templates/sessions.html +63 -0
  102. kerbside-0.2.5/kerbside/api/templates/sources.html +35 -0
  103. kerbside-0.2.5/kerbside/api.py +722 -0
  104. kerbside-0.2.5/kerbside/config.py +200 -0
  105. kerbside-0.2.5/kerbside/consoletoken.py +49 -0
  106. kerbside-0.2.5/kerbside/db.py +654 -0
  107. kerbside-0.2.5/kerbside/main.py +213 -0
  108. kerbside-0.2.5/kerbside/proxy.py +623 -0
  109. kerbside-0.2.5/kerbside/sources/base.py +14 -0
  110. kerbside-0.2.5/kerbside/sources/ovirt.py +149 -0
  111. kerbside-0.2.5/kerbside/sources/shakenfist.py +86 -0
  112. kerbside-0.2.5/kerbside/spiceprotocol/__init__.py +201 -0
  113. kerbside-0.2.5/kerbside/spiceprotocol/packets/authentication.py +56 -0
  114. kerbside-0.2.5/kerbside/spiceprotocol/packets/constants.py +415 -0
  115. kerbside-0.2.5/kerbside/spiceprotocol/packets/cursor.py +160 -0
  116. kerbside-0.2.5/kerbside/spiceprotocol/packets/display.py +542 -0
  117. kerbside-0.2.5/kerbside/spiceprotocol/packets/inputs.py +226 -0
  118. kerbside-0.2.5/kerbside/spiceprotocol/packets/inspection.py +230 -0
  119. kerbside-0.2.5/kerbside/spiceprotocol/packets/linkmessages.py +313 -0
  120. kerbside-0.2.5/kerbside/spiceprotocol/packets/main.py +122 -0
  121. kerbside-0.2.5/kerbside/spiceprotocol/packets/port.py +70 -0
  122. kerbside-0.2.5/kerbside/spiceprotocol/packets/scancodes.py +42 -0
  123. kerbside-0.2.5/kerbside/spiceprotocol/packets/unknown.py +66 -0
  124. kerbside-0.2.5/kerbside/tests/__init__.py +0 -0
  125. kerbside-0.2.5/kerbside/tests/functional/__init__.py +0 -0
  126. kerbside-0.2.5/kerbside/tests/functional/test_openstack.py +106 -0
  127. kerbside-0.2.5/kerbside/tests/functional/test_proxy.py +52 -0
  128. kerbside-0.2.5/kerbside/tests/functional/test_shakenfist.py +123 -0
  129. kerbside-0.2.5/kerbside/tests/unit/__init__.py +0 -0
  130. kerbside-0.2.5/kerbside/tests/unit/test_main.py +351 -0
  131. kerbside-0.2.5/kerbside/util.py +23 -0
  132. kerbside-0.2.5/kerbside/utilities/glz.py +131 -0
  133. kerbside-0.2.5/kerbside/utilities/lz.py +100 -0
  134. kerbside-0.2.5/kerbside/utilities/main.py +159 -0
  135. kerbside-0.2.5/kerbside.egg-info/PKG-INFO +219 -0
  136. kerbside-0.2.5/kerbside.egg-info/SOURCES.txt +155 -0
  137. kerbside-0.2.5/kerbside.egg-info/dependency_links.txt +1 -0
  138. kerbside-0.2.5/kerbside.egg-info/entry_points.txt +3 -0
  139. kerbside-0.2.5/kerbside.egg-info/requires.txt +50 -0
  140. kerbside-0.2.5/kerbside.egg-info/top_level.txt +1 -0
  141. kerbside-0.2.5/loadtests/latency/Dockerfile +26 -0
  142. kerbside-0.2.5/loadtests/latency/cleanupconsoles.sh +11 -0
  143. kerbside-0.2.5/loadtests/latency/makeconsole.sh +82 -0
  144. kerbside-0.2.5/pyproject.toml +102 -0
  145. kerbside-0.2.5/setup.cfg +4 -0
  146. kerbside-0.2.5/testclient/README.md +7 -0
  147. kerbside-0.2.5/testclient/requirements.txt +2 -0
  148. kerbside-0.2.5/testclient/ryll/common.py +23 -0
  149. kerbside-0.2.5/testclient/ryll/decompressors.py +242 -0
  150. kerbside-0.2.5/testclient/ryll/display_types.py +163 -0
  151. kerbside-0.2.5/testclient/ryll/main.py +833 -0
  152. kerbside-0.2.5/testclient/ryll/scancodes.py +121 -0
  153. kerbside-0.2.5/testclient/ryll/statistics_types.py +80 -0
  154. kerbside-0.2.5/testclient/setup.cfg +27 -0
  155. kerbside-0.2.5/testclient/setup.py +28 -0
  156. kerbside-0.2.5/tools/flake8wrap.sh +37 -0
  157. kerbside-0.2.5/tox.ini +57 -0
@@ -0,0 +1,475 @@
1
+ name: Test cloud compatibility
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ target:
7
+ description: Select target
8
+ type: choice
9
+ options:
10
+ - '["ovirt-44-rocky-8"]'
11
+ - '["ovirt-45-rocky-8"]'
12
+ - '["ovirt-45-rocky-9"]'
13
+ - '["kolla-ansible-master-debian-12"]'
14
+ default: '["kolla-ansible-master-debian-12"]'
15
+ required: true
16
+ retention:
17
+ description: 'How long to retain the environment after the workflow run in minutes'
18
+ required: true
19
+ default: '0'
20
+ pull_request:
21
+ branches:
22
+ - develop
23
+
24
+ jobs:
25
+ sanity_checks:
26
+ runs-on: [self-hosted, vm, debian-12]
27
+ concurrency:
28
+ group: ${{ github.workflow }}-${{ github.ref }}-lint
29
+ cancel-in-progress: true
30
+
31
+ steps:
32
+ - name: Checkout code with two commits
33
+ uses: actions/checkout@v4
34
+ with:
35
+ fetch-depth: 0
36
+
37
+ - name: Install additional dependencies not tracked by pip
38
+ timeout-minutes: 5
39
+ run: |
40
+ sudo apt-get install -y python3-venv
41
+ python3 -mvenv /tmp/bindep-venv
42
+ /tmp/bindep-venv/bin/pip3 install bindep
43
+ echo
44
+ /tmp/bindep-venv/bin/bindep || true
45
+ echo
46
+ sudo apt-get install -y $(/tmp/bindep-venv/bin/bindep --brief || true)
47
+
48
+ - name: Upgrade base test tools
49
+ timeout-minutes: 5
50
+ run: |
51
+ python3 -mvenv /tmp/venv-test
52
+ . /tmp/venv-test/bin/activate
53
+ pip3 install uv
54
+ uv pip install tox tox-uv
55
+
56
+ - name: Lint with flake8
57
+ timeout-minutes: 5
58
+ run: |
59
+ . /tmp/venv-test/bin/activate
60
+ tox -eflake8
61
+
62
+ - name: Attempt to install requirements
63
+ timeout-minutes: 5
64
+ run: |
65
+ python3 -mvenv /tmp/venv-reqs
66
+ . /tmp/venv-reqs/bin/activate
67
+ pip3 install uv
68
+ uv pip install -r pyproject.toml
69
+
70
+ - name: Run python3 unit tests
71
+ timeout-minutes: 10
72
+ run: |
73
+ . /tmp/venv-test/bin/activate
74
+ tox -epy3
75
+
76
+ - name: List failing tests
77
+ if: failure()
78
+ id: failures
79
+ run: |
80
+ echo "Gathering list of failed tests..."
81
+ touch /srv/ci/failed
82
+ . /tmp/venv-test/bin/activate
83
+ tox -efailing || true > /srv/ci/failed
84
+ echo
85
+
86
+ failed=$(cat /srv/ci/failed | egrep "^FAIL: " | \
87
+ sed -z 's/FAIL: shakenfist_ci\.//g;s/\n/, /g;s/, $/\n/')
88
+
89
+ echo "Failed tests:"
90
+ cat /srv/ci/failed
91
+ echo
92
+
93
+ echo "failures<<EOF" >> ${GITHUB_OUTPUT}
94
+ echo "${failed}" >> ${GITHUB_OUTPUT}
95
+ echo "EOF" >> ${GITHUB_OUTPUT}
96
+ echo "GITHUB_OUTPUT is:"
97
+ cat ${GITHUB_OUTPUT}
98
+
99
+ - name: Generate coverage report
100
+ timeout-minutes: 10
101
+ run: |
102
+ . /tmp/venv-test/bin/activate
103
+ tox -ecover
104
+ zip -r cover.zip cover
105
+
106
+ - uses: actions/upload-artifact@v4
107
+ with:
108
+ name: coverage
109
+ retention-days: 90
110
+ if-no-files-found: error
111
+ path: cover.zip
112
+
113
+ ovirt_matrix:
114
+ name: "${{ matrix.test.description }}"
115
+ strategy:
116
+ fail-fast: false
117
+ matrix:
118
+ test: [
119
+ {
120
+ 'name': 'ovirt-44-rocky-8',
121
+ 'description': 'oVirt 4.4 on Rocky 8',
122
+ 'environment_name': 'ovirt',
123
+ 'ovirt_rpm': 'https://resources.ovirt.org/pub/yum-repo/ovirt-release44.rpm',
124
+ 'base': 'rocky:8',
125
+ 'baseuser': 'cloud-user',
126
+ 'hostname': 'ovirt'
127
+ },
128
+ {
129
+ 'name': 'ovirt-45-rocky-8',
130
+ 'description': 'oVirt 4.5 on Rocky 8',
131
+ 'environment_name': 'ovirt',
132
+ 'ovirt_rpm': 'centos-release-ovirt45',
133
+ 'base': 'rocky:8',
134
+ 'baseuser': 'cloud-user',
135
+ 'hostname': 'ovirt'
136
+ },
137
+ {
138
+ 'name': 'ovirt-45-rocky-9',
139
+ 'description': 'oVirt 4.5 on Rocky 9',
140
+ 'environment_name': 'ovirt',
141
+ 'ovirt_rpm': 'centos-release-ovirt45',
142
+ 'base': 'rocky:9',
143
+ 'baseuser': 'cloud-user',
144
+ 'hostname': 'ovirt'
145
+ },
146
+ ]
147
+ runs-on: [self-hosted, vm]
148
+ needs: sanity_checks
149
+ timeout-minutes: 120
150
+ concurrency:
151
+ group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.test.name }}
152
+ cancel-in-progress: true
153
+
154
+ # NOTE(mikal): git repos are checked out to /srv/github/_work/{org}/{repo}
155
+ # which is available as GITHUB_WORKSPACE. You can find other environment
156
+ # variables at https://docs.github.com/en/actions/learn-github-actions/environment-variables
157
+
158
+ steps:
159
+ - name: Filter workflow_dispatch runs
160
+ if: github.event_name == 'workflow_dispatch' && ! contains(inputs.target, matrix.test.name)
161
+ uses: actions/github-script@v6
162
+ with:
163
+ script: |
164
+ core.setFailed('Target skipped')
165
+
166
+ - name: Set environment variables
167
+ shell: bash
168
+ run: |
169
+ echo "SF_HEAD_SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
170
+ echo "SHAKENFIST_NAMESPACE=$(hostname)" >> $GITHUB_ENV
171
+
172
+ - name: Checkout the actions repository
173
+ uses: actions/checkout@v4
174
+ with:
175
+ repository: shakenfist/actions
176
+ path: actions
177
+ fetch-depth: 0
178
+
179
+ - name: Checkout kerbside
180
+ uses: actions/checkout@v4
181
+ with:
182
+ path: kerbside
183
+ fetch-depth: 0
184
+
185
+ - name: Build infrastructure
186
+ shell: bash
187
+ run: |
188
+ . $GITHUB_ENV
189
+ ansible-playbook -i /home/debian/ansible-hosts \
190
+ --extra-vars "identifier=${SHAKENFIST_NAMESPACE} base=${{ matrix.test.base }} environment_name=${{ matrix.test.environment_name }} hostname=${{ matrix.test.hostname }}" \
191
+ --tags all ${GITHUB_WORKSPACE}/actions/ansible/kerbside-single-node.yml
192
+
193
+ - name: Install base packages
194
+ run: |
195
+ . $GITHUB_ENV
196
+
197
+ script="export PS4='=======================\n+ '; set -x;"
198
+ script="${script} sudo dnf update -y;"
199
+ script="${script} sudo dnf install -y epel-release;"
200
+ script="${script} sudo crb enable;"
201
+ script="${script} sudo dnf update -y;"
202
+ script="${script} sudo dnf install -y vim patch yum-utils;"
203
+ script="${script} sudo chown ${{ matrix.test.baseuser }}:${{ matrix.test.baseuser }} /srv;"
204
+
205
+ ssh -i /srv/github/id_ci -o StrictHostKeyChecking=no \
206
+ -o UserKnownHostsFile=/dev/null \
207
+ ${{ matrix.test.baseuser }}@10.0.2.2 \
208
+ "${script}"
209
+
210
+ - name: Install upstream oVirt release package
211
+ run: |
212
+ . $GITHUB_ENV
213
+
214
+ script="export PS4='=======================\n+ '; set -x;"
215
+ script="${script} sudo dnf install -y ${{ matrix.test.ovirt_rpm }};"
216
+
217
+ ssh -i /srv/github/id_ci -o StrictHostKeyChecking=no \
218
+ -o UserKnownHostsFile=/dev/null \
219
+ ${{ matrix.test.baseuser }}@10.0.2.2 \
220
+ "${script}"
221
+
222
+ - name: Copy oVirt yum repos patch to target node
223
+ run: |
224
+ . $GITHUB_ENV
225
+
226
+ scp -rp -i /srv/github/id_ci -o StrictHostKeyChecking=no \
227
+ -o UserKnownHostsFile=/dev/null \
228
+ ${GITHUB_WORKSPACE}/kerbside/etc/${{ matrix.test.name }}-repos.patch \
229
+ ${{ matrix.test.baseuser }}@10.0.2.2:/srv/
230
+
231
+ - name: Apply repos patch
232
+ run: |
233
+ . $GITHUB_ENV
234
+
235
+ script="export PS4='=======================\n+ '; set -x;"
236
+ script="${script} cd /etc/yum.repos.d;"
237
+ script="${script} sudo patch -p1 < /srv/${{ matrix.test.name }}-repos.patch;"
238
+
239
+ ssh -i /srv/github/id_ci -o StrictHostKeyChecking=no \
240
+ -o UserKnownHostsFile=/dev/null \
241
+ ${{ matrix.test.baseuser }}@10.0.2.2 \
242
+ "${script}"
243
+
244
+ - name: Further package configuration
245
+ run: |
246
+ . $GITHUB_ENV
247
+
248
+ script="export PS4='=======================\n+ '; set -x;"
249
+ script="${script} sudo dnf update -y;"
250
+ script="${script} sudo dnf module -y enable javapackages-tools;"
251
+ script="${script} sudo dnf module -y enable postgresql:12;"
252
+ script="${script} sudo dnf module -y enable mod_auth_openidc:2.3;"
253
+ script="${script} sudo dnf module -y enable nodejs:14;"
254
+ script="${script} sudo dnf module -y enable pki-deps;"
255
+ script="${script} sudo dnf distro-sync --nobest -y;"
256
+
257
+ ssh -i /srv/github/id_ci -o StrictHostKeyChecking=no \
258
+ -o UserKnownHostsFile=/dev/null \
259
+ ${{ matrix.test.baseuser }}@10.0.2.2 \
260
+ "${script}"
261
+
262
+ - name: Install ovirt-engine
263
+ run: |
264
+ . $GITHUB_ENV
265
+
266
+ script="export PS4='=======================\n+ '; set -x;"
267
+ script="${script} sudo dnf install -y ovirt-engine;"
268
+
269
+ ssh -i /srv/github/id_ci -o StrictHostKeyChecking=no \
270
+ -o UserKnownHostsFile=/dev/null \
271
+ ${{ matrix.test.baseuser }}@10.0.2.2 \
272
+ "${script}"
273
+
274
+ - name: Setup ovirt-engine
275
+ run: |
276
+ . $GITHUB_ENV
277
+
278
+ scp -rp -i /srv/github/id_ci -o StrictHostKeyChecking=no \
279
+ -o UserKnownHostsFile=/dev/null \
280
+ ${GITHUB_WORKSPACE}/kerbside/etc/${{ matrix.test.name }}-answers.conf \
281
+ ${{ matrix.test.baseuser }}@10.0.2.2:/srv/
282
+
283
+ script="export PS4='=======================\n+ '; set -x;"
284
+ script="${script} sudo engine-setup"
285
+ script="${script} --config-append=/srv/${{ matrix.test.name }}-answers.conf;"
286
+
287
+ ssh -i /srv/github/id_ci -o StrictHostKeyChecking=no \
288
+ -o UserKnownHostsFile=/dev/null \
289
+ ${{ matrix.test.baseuser }}@10.0.2.2 \
290
+ "${script}"
291
+
292
+ - name: Gather artifacts
293
+ run: |
294
+ . $GITHUB_ENV
295
+
296
+ script="export PS4='=======================\n+ '; set -x;"
297
+
298
+ script="${script} sudo rpm -qa --qf "
299
+ script="${script} \"%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n\" "
300
+ script="${script} > /tmp/rpms.list;"
301
+
302
+ script="${script} for rpm in \$(cat /tmp/rpms.list); do"
303
+ script="${script} echo \"Caching URLs for \${rpm}\";"
304
+ script="${script} sudo yumdownloader --resolve --urls \${rpm} |"
305
+ script="${script} egrep -v '(metadata expiration|Waiting for)' "
306
+ script="${script} >> /tmp/rpms.urls;"
307
+ script="${script} done;"
308
+
309
+ script="${script} sudo zip -r /tmp/bundle.zip "
310
+ script="${script} /etc/yum.repos.d "
311
+ script="${script} /tmp/rpms.list "
312
+ script="${script} /tmp/rpms.urls "
313
+ script="${script} /var/lib/ovirt-engine/setup "
314
+ script="${script} || true;"
315
+ script="${script} sudo chmod ugo+r /tmp/bundle.zip;"
316
+ script="${script} ls -lrth /tmp/bundle.zip;"
317
+
318
+ ssh -i /srv/github/id_ci -o StrictHostKeyChecking=no \
319
+ -o UserKnownHostsFile=/dev/null \
320
+ ${{ matrix.test.baseuser }}@10.0.2.2 \
321
+ "${script}"
322
+
323
+ mkdir -p /srv/github/artifacts/bundle/
324
+ scp -rp -i /srv/github/id_ci -o StrictHostKeyChecking=no \
325
+ -o UserKnownHostsFile=/dev/null \
326
+ ${{ matrix.test.baseuser }}@10.0.2.2:/tmp/bundle.zip \
327
+ /srv/github/artifacts/bundle/
328
+
329
+ cd /srv/github/artifacts/bundle/
330
+ unzip bundle.zip
331
+ rm bundle.zip
332
+ cd ..
333
+ zip -r bundle.zip bundle
334
+
335
+ - uses: actions/upload-artifact@v4
336
+ if: always()
337
+ with:
338
+ name: bundle-${{ matrix.test.name }}
339
+ retention-days: 90
340
+ if-no-files-found: error
341
+ path: /srv/github/artifacts/bundle.zip
342
+
343
+ - name: Retain the environment if requested
344
+ if: github.event_name == 'workflow_dispatch'
345
+ run: sleep $(( $MINUTES * 60 ))
346
+ env:
347
+ MINUTES: ${{ inputs.retention }}
348
+
349
+ openstack_matrix:
350
+ name: "${{ matrix.test.description }}"
351
+ strategy:
352
+ fail-fast: false
353
+ matrix:
354
+ test: [
355
+ {
356
+ 'name': 'kolla-ansible-master-debian-12',
357
+ 'environment_name': 'kolla',
358
+ 'description': 'OpenStack via Kolla-Ansible master on Debian 12',
359
+ 'openstack_release': 'master',
360
+ 'base': 'debian:12',
361
+ 'baseuser': 'debian'
362
+ },
363
+ ]
364
+ runs-on: [self-hosted, vm]
365
+ needs: sanity_checks
366
+ timeout-minutes: 120
367
+ concurrency:
368
+ group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.test.name }}
369
+ cancel-in-progress: true
370
+
371
+ # NOTE(mikal): git repos are checked out to /srv/github/_work/{org}/{repo}
372
+ # which is available as GITHUB_WORKSPACE. You can find other environment
373
+ # variables at https://docs.github.com/en/actions/learn-github-actions/environment-variables
374
+
375
+ steps:
376
+ - name: Filter workflow_dispatch runs
377
+ if: github.event_name == 'workflow_dispatch' && ! contains(inputs.target, matrix.test.name)
378
+ uses: actions/github-script@v6
379
+ with:
380
+ script: |
381
+ core.setFailed('Target skipped')
382
+
383
+ - name: Setup test environment
384
+ uses: shakenfist/actions/setup-kerbside-environment@main
385
+ with:
386
+ base: ${{ matrix.test.base }}
387
+ base_user: ${{ matrix.test.baseuser }}
388
+ openstack_release: ${{ matrix.test.openstack_release }}
389
+ topology: all-in-one
390
+
391
+ - name: Build patched repositories
392
+ run: |
393
+ . $GITHUB_ENV
394
+ ssh -i /srv/github/id_ci -o StrictHostKeyChecking=no \
395
+ -o UserKnownHostsFile=/dev/null \
396
+ ${{ matrix.test.baseuser }}@10.0.2.2 \
397
+ 'cd /srv/shakenfist/kerbside-patches; ./_build/assemble-source.sh ${{ matrix.test.openstack_release }}'
398
+
399
+ - name: Build container images
400
+ run: |
401
+ . $GITHUB_ENV
402
+
403
+ script="cd /srv/shakenfist/kerbside-patches;"
404
+ script="${script} hash=\$(./_build/calculate-container-hash.sh kolla kolla-2* nova nova-2* requirements requirements-2*);"
405
+ script="${script} ./_build/build-containers.sh --use-ci-registry --build-targets ${{ matrix.test.openstack_release }} --build-images all --image-tag "\$hash-debian-bookworm";"
406
+
407
+ ssh -i /srv/github/id_ci -o StrictHostKeyChecking=no \
408
+ -o UserKnownHostsFile=/dev/null \
409
+ ${{ matrix.test.baseuser }}@10.0.2.2 "${script}"
410
+
411
+ - name: Bootstrap Kolla-Ansible
412
+ run: |
413
+ . $GITHUB_ENV
414
+ ssh -i /srv/github/id_ci -o StrictHostKeyChecking=no \
415
+ -o UserKnownHostsFile=/dev/null \
416
+ ${{ matrix.test.baseuser }}@10.0.2.2 \
417
+ 'cd /srv/shakenfist/kerbside-patches; sudo ./tools/bootstrap-kolla-ansible ${{ matrix.test.openstack_release }} all-in-one'
418
+
419
+ - name: Install Kolla-Ansible
420
+ run: |
421
+ . $GITHUB_ENV
422
+ ssh -i /srv/github/id_ci -o StrictHostKeyChecking=no \
423
+ -o UserKnownHostsFile=/dev/null \
424
+ ${{ matrix.test.baseuser }}@10.0.2.2 \
425
+ 'cd /srv/shakenfist/kerbside-patches; sudo ./tools/install-kolla-ansible'
426
+
427
+ - name: Install patched OpenStack clients
428
+ run: |
429
+ . $GITHUB_ENV
430
+ ssh -i /srv/github/id_ci -o StrictHostKeyChecking=no \
431
+ -o UserKnownHostsFile=/dev/null \
432
+ ${{ matrix.test.baseuser }}@10.0.2.2 \
433
+ 'cd /srv/shakenfist/kerbside-patches; sudo ./tools/install-openstack-clients'
434
+
435
+ - name: Post install Kolla-Ansible setup
436
+ run: |
437
+ . $GITHUB_ENV
438
+ ssh -i /srv/github/id_ci -o StrictHostKeyChecking=no \
439
+ -o UserKnownHostsFile=/dev/null \
440
+ ${{ matrix.test.baseuser }}@10.0.2.2 \
441
+ 'cd /srv/shakenfist/kerbside-patches; sudo ./tools/postinstall-kolla-ansible'
442
+
443
+ - name: Attempt to start an instance with a console and connect to it
444
+ run: |
445
+ . $GITHUB_ENV
446
+ ssh -i /srv/github/id_ci -o StrictHostKeyChecking=no \
447
+ -o UserKnownHostsFile=/dev/null \
448
+ ${{ matrix.test.baseuser }}@10.0.2.2 \
449
+ 'cd /srv/shakenfist/kerbside-patches; sudo ./tools/test-console'
450
+
451
+ - name: Collect logs
452
+ if: always()
453
+ run: |
454
+ . $GITHUB_ENV
455
+ ssh -i /srv/github/id_ci -o StrictHostKeyChecking=no \
456
+ -o UserKnownHostsFile=/dev/null \
457
+ ${{ matrix.test.baseuser }}@10.0.2.2 \
458
+ 'cd /srv/shakenfist/kerbside-patches; sudo ./tools/gather-logs'
459
+ scp -i /srv/github/id_ci -o StrictHostKeyChecking=no \
460
+ -o UserKnownHostsFile=/dev/null \
461
+ ${{ matrix.test.baseuser }}@10.0.2.2:/tmp/bundle.zip /tmp/bundle.zip
462
+
463
+ - uses: actions/upload-artifact@v4
464
+ if: always()
465
+ with:
466
+ name: bundle-${{ matrix.test.name }}
467
+ retention-days: 90
468
+ if-no-files-found: error
469
+ path: /tmp/bundle.zip
470
+
471
+ - name: Retain the environment if requested
472
+ if: github.event_name == 'workflow_dispatch'
473
+ run: sleep $(( $MINUTES * 60 ))
474
+ env:
475
+ MINUTES: ${{ inputs.retention }}
@@ -0,0 +1,106 @@
1
+ # NOTE(mikal): we need to pin indirect dependencies because some of our
2
+ # dependencies don't pin things how we like to. If they're not pinned then when
3
+ # something multiple layers away does a release and breaks us it can be super
4
+ # confusing.
5
+
6
+ name: Pin indirect dependencies
7
+
8
+ on:
9
+ pull_request:
10
+ paths:
11
+ - .github/workflows/pin-indirect-dependencies.yml
12
+ workflow_dispatch:
13
+ schedule:
14
+ - cron: '00 00 * * *' # utc
15
+
16
+ jobs:
17
+ indirect-dependencies:
18
+ runs-on: [self-hosted, vm]
19
+ timeout-minutes: 60
20
+ concurrency:
21
+ group: ${{ github.workflow }}-${{ github.ref }}
22
+ cancel-in-progress: true
23
+
24
+ # NOTE(mikal): git repos are checked out to /srv/github/_work/{org}/{repo}
25
+ # which is available as GITHUB_WORKSPACE. You can find other environment
26
+ # variables at https://docs.github.com/en/actions/learn-github-actions/environment-variables
27
+
28
+ steps:
29
+ - name: Set environment variables
30
+ run: |
31
+ echo "SHAKENFIST_NAMESPACE=$(hostname)" >> $GITHUB_ENV
32
+
33
+ - name: Checkout kerbside
34
+ uses: actions/checkout@v4
35
+ with:
36
+ path: kerbside
37
+ fetch-depth: 0
38
+
39
+ - name: Install CI dependencies
40
+ run: |
41
+ sudo apt update
42
+ sudo apt install -y pkg-config build-essential python3-dev \
43
+ default-libmysqlclient-dev
44
+
45
+ - name: Install the github command line
46
+ run: |
47
+ sudo apt update
48
+ sudo apt install -y curl
49
+
50
+ curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
51
+ sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
52
+ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
53
+
54
+ sudo apt update
55
+ sudo apt install -y gh
56
+
57
+ - name: Install all our dependencies in a venv
58
+ run: |
59
+ sudo DEBIAN_FRONTEND=noninteractive apt-get -o DPkg::Lock::Timeout=-1 -o Dpkg::Options::="--force-confold" -y \
60
+ install git python3-cffi python3-dev python3-grpcio python3-pip python3-venv python3-wheel
61
+
62
+ cd ${GITHUB_WORKSPACE}/kerbside
63
+ python3 -m venv --system-site-packages ${RUNNER_TEMP}/venv
64
+ ${RUNNER_TEMP}/venv/bin/pip install -r requirements.txt
65
+
66
+ - name: List all our dependencies
67
+ run: |
68
+ ${RUNNER_TEMP}/venv/bin/pip freeze --local
69
+
70
+ - name: Ensure all dependencies are pinned
71
+ env:
72
+ GITHUB_TOKEN: ${{ secrets.DEPENDENCIES_TOKEN }}
73
+ run: |
74
+ cd ${GITHUB_WORKSPACE}/kerbside
75
+
76
+ datestamp=$(date "+%Y%m%d")
77
+ git checkout -b pin-dependencies-${datestamp}
78
+
79
+ for depver in $(${RUNNER_TEMP}/venv/bin/pip freeze --local); do
80
+ dep=$(echo ${depver} | sed 's/==.*//')
81
+
82
+ if [ $(egrep -ic "^${dep}==" requirements.txt) -lt 1 ]; then
83
+ echo "${depver}" >> requirements.txt
84
+ fi
85
+ done
86
+
87
+ # Did we find something new?
88
+ if [ $(git diff | wc -l) -gt 0 ]; then
89
+ echo "New dependencies detected..."
90
+ echo
91
+ git diff
92
+
93
+ git config --global user.name "shakenfist-bot"
94
+ git config --global user.email "bot@shakenfist.com"
95
+ git commit -a -m "Update pinned dependencies."
96
+ git push -f origin pin-dependencies-${datestamp}
97
+ echo
98
+ gh pr create \
99
+ --assignee mikalstill \
100
+ --reviewer mikalstill \
101
+ --title "Update pinned dependencies." \
102
+ --body "New indirect dependencies were detected." \
103
+ --label dependencies
104
+ echo
105
+ echo "Pull request created."
106
+ fi