|
| 1 | +# SCS Compliance Check Pipeline Manual |
| 2 | + |
| 3 | +## How to add a new test subject in 8 easy steps |
| 4 | + |
| 5 | +This is a how-to guide for adding your own subject if you so desire. This will probably be the quickest way, |
| 6 | +but we are of course happy to help. |
| 7 | + |
| 8 | +### for SCS-compatible IaaS |
| 9 | + |
| 10 | +You need an OpenStack project that allows for at least one server and one router, possibly more if it's going |
| 11 | +to be used for purposes other than compliance testing (such as the |
| 12 | +[OpenStack Health Monitor](https://github.com/SovereignCloudStack/openstack-health-monitor) or the |
| 13 | +[SCS Health Monitor](https://github.com/SovereignCloudStack/scs-health-monitor)). |
| 14 | + |
| 15 | +1. Create an application credential. It must be possible to create resources such as servers, routers, etc. |
| 16 | +2. Create a new branch in [the standards repository](https://github.com/SovereignCloudStack/standards): |
| 17 | + |
| 18 | + - `git clone [email protected]:SovereignCloudStack/standards.git` |
| 19 | + - `cd standards` |
| 20 | + - `git checkout -b feat/add_my_cloud` |
| 21 | + |
| 22 | +3. Modify [playbooks/clouds.yaml.j2](https://github.com/SovereignCloudStack/standards/blob/main/playbooks/clouds.yaml.j2). |
| 23 | + This is necessary so that the tests can access your cloud. |
| 24 | + You can use the following template (replace all-caps parts): |
| 25 | + |
| 26 | + ```yaml |
| 27 | + SUBJECT_NAME: |
| 28 | + region_name: REGION |
| 29 | + interface: "public" |
| 30 | + identity_api_version: 3 |
| 31 | + auth_type: "v3applicationcredential" |
| 32 | + auth: |
| 33 | + auth_url: AUTH_URL |
| 34 | + application_credential_id: "{{ clouds_conf.SUBJECT_NAME_ac_id }}" |
| 35 | + application_credential_secret: "{{ clouds_conf.SUBJECT_NAME_a_ac_secret }}" |
| 36 | + ``` |
| 37 | +
|
| 38 | + Note that you need to replace dashes (and other special characters) by underscores in the last two lines. |
| 39 | +
|
| 40 | +4. Add your subject to [Tests/config.toml](https://github.com/SovereignCloudStack/standards/blob/main/Tests/config.toml). |
| 41 | + This is necessary so that your cloud will be included in the nightly tests. Add a line like so: |
| 42 | +
|
| 43 | + ```diff |
| 44 | + [presets.all] |
| 45 | + scopes = [ |
| 46 | + "scs-compatible-iaas", |
| 47 | + ] |
| 48 | + subjects = [ |
| 49 | + "gx-scs", |
| 50 | + + "SUBJECT_NAME", |
| 51 | + ``` |
| 52 | + |
| 53 | + Ideally insert your subject so that the list (after `gx-scs`) remains sorted. |
| 54 | + |
| 55 | +5. Add your subject to [compliance-monitor/bootstrap.yaml](https://github.com/SovereignCloudStack/standards/blob/main/compliance-monitor/bootstrap.yaml). |
| 56 | + This is necessary to that the reports will be accepted as genuine. Add a section like so: |
| 57 | + |
| 58 | + ```diff |
| 59 | + - subject: artcodix |
| 60 | + delegates: |
| 61 | + - zuul_ci |
| 62 | + + - subject: SUBJECT_NAME |
| 63 | + + delegates: |
| 64 | + + - zuul_ci |
| 65 | + ``` |
| 66 | + |
| 67 | + Again, insert your subject so that the list (after `gx-scs`) remains sorted. |
| 68 | + |
| 69 | +6. Add your subject to the results table. This is necessary so your subject shows up in the |
| 70 | + [compliance monitor web-site](https://compliance.sovereignit.cloud/page/table). Add the folling lines |
| 71 | + (again substituting all-caps parts): |
| 72 | + |
| 73 | + ```diff |
| 74 | + | [gx-scs](https://github.com/SovereignCloudStack/docs/blob/main/community/cloud-resources/plusserver-gx-scs.md) | Dev environment provided for SCS & GAIA-X context | plusserver GmbH | |
| 75 | + {#- #} [{{ results | pick('gx-scs', iaas) | summary }}]({{ detail_url('gx-scs', iaas) }}) {# -#} |
| 76 | + | [HM](https://health.gx-scs.sovereignit.cloud:3000/) | |
| 77 | + +| [SUBJECT_NAME](YOUR_URL) | DESCRIPTION | COMPANY_NAME | |
| 78 | + +{#- #} [{{ results | pick('SUBJECT_NAME', iaas) | summary }}]({{ detail_url('SUBJECT_NAME', iaas) }}) {# -#} |
| 79 | + +| [HM](HEALTH_MONITOR_URL) | |
| 80 | + ``` |
| 81 | + |
| 82 | + Again, insert the lines at a position that keeps the table sorted (below `gx-scs`). |
| 83 | + |
| 84 | +7. Finally, add secrets to [.zuul.d/secure.yaml](https://github.com/SovereignCloudStack/standards/blob/main/.zuul.d/secure.yaml). |
| 85 | + This is necessary so the tests can access your cloud. |
| 86 | + |
| 87 | + This step is the most involved, and you can always have us do it for you; in that case, please send us |
| 88 | + the application credential id and secret via an encrypted channel, e.g. Matrix. |
| 89 | + |
| 90 | + To proceed, you need `zuul-client` installed: |
| 91 | + |
| 92 | + ```shell |
| 93 | + pipx install zuul-client |
| 94 | + ``` |
| 95 | + |
| 96 | + Then you can execute: |
| 97 | + |
| 98 | + ```shell |
| 99 | + $ zuul-client --zuul-url https://zuul.sovereignit.cloud/ encrypt --tenant scs --project SovereignCloudStack/standards |
| 100 | + <PASTE application credential id HERE> |
| 101 | + <HIT ctrl-d> |
| 102 | + |
| 103 | + ... |
| 104 | + - secret: |
| 105 | + name: <name> |
| 106 | + data: |
| 107 | + <fieldname>: !encrypted/pkcs1-oaep |
| 108 | + - ... |
| 109 | + |
| 110 | + $ zuul-client --zuul-url https://zuul.sovereignit.cloud/ encrypt --tenant scs --project SovereignCloudStack/standards |
| 111 | + <PASTE application credential secret HERE> |
| 112 | + <HIT ctrl-d> |
| 113 | + |
| 114 | + ... |
| 115 | + - secret: |
| 116 | + name: <name> |
| 117 | + data: |
| 118 | + <fieldname>: !encrypted/pkcs1-oaep |
| 119 | + - ... |
| 120 | + ``` |
| 121 | + |
| 122 | + Copy the parts of the respective outputs starting in the final line shown here (the one starting `-`). |
| 123 | + Insert them like so: |
| 124 | + |
| 125 | + ```diff |
| 126 | + + SUBJECT_NAME_ac_id: !encrypted/pkcs1-oaep |
| 127 | + + - ENCRYPTED_ID |
| 128 | + + SUBJECT_NAME_ac_secret: !encrypted/pkcs1-oaep |
| 129 | + + - ENCRYPTED_SECRET |
| 130 | + ``` |
| 131 | + |
| 132 | + Note that you have to use the same keys as in Step 3 (that is, with special characters replaced). |
| 133 | + |
| 134 | +8. Commit your changes and open a pull request: |
| 135 | + |
| 136 | + ```shell |
| 137 | + git commit -asm "Add SUBJECT_NAME" |
| 138 | + git push |
| 139 | + ``` |
0 commit comments