-
Notifications
You must be signed in to change notification settings - Fork 4
Update release with new fabrica-based services; remove old services #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| #!/bin/bash | ||
|
|
||
| CLIENT="${1}" | ||
| SERVICE="smd" | ||
|
|
||
| TOKENSMITH_BOOTSTRAP_TOKEN=$(podman exec -e SERVICE=$SERVICE -e CLIENT=$CLIENT tokensmith /bin/sh -c "\ | ||
| /usr/local/bin/tokensmith mint-bootstrap-token \ | ||
| --key-file /tmp/tokensmith/keys/private.pem \ | ||
| --service-id ${CLIENT}-client \ | ||
| --target-service ${SERVICE} | ||
| ") | ||
| SECRET_NAME="${CLIENT}-bootstrap-token" | ||
| printf '%s' "$TOKENSMITH_BOOTSTRAP_TOKEN" | podman secret rm ${SECRET_NAME} 2>/dev/null || true | ||
| printf '%s' "$TOKENSMITH_BOOTSTRAP_TOKEN" | podman secret create ${SECRET_NAME} - |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,20 +14,6 @@ URLS_LOGOUT=https://${SYSTEM_URL}/logout | |
| # Environemnt Variables | ||
| POSTGRES_USER=ochami | ||
|
|
||
| # Environemnt Variables | ||
| BSS_USESQL=true | ||
| BSS_INSECURE=true | ||
| BSS_DEBUG=true | ||
| BSS_DBHOST=postgres | ||
| BSS_DBPORT=5432 | ||
| BSS_DBNAME=bssdb | ||
| BSS_DBUSER=bss-user | ||
| BSS_JWKS_URL=http://opaal:3333/keys | ||
| BSS_OAUTH2_ADMIN_BASE_URL=http://opaal:3333 | ||
| BSS_OAUTH2_PUBLIC_BASE_URL=http://opaal:3333 | ||
| BSS_IPXE_SERVER=${SYSTEM_URL} | ||
| BSS_CHAIN_PROTO=https | ||
|
|
||
| # Environemnt Variables | ||
| SMD_DBHOST=postgres | ||
| SMD_DBPORT=5432 | ||
|
|
@@ -36,6 +22,15 @@ SMD_DBUSER=smd-user | |
| SMD_DBOPTS=sslmode=disable | ||
| SMD_JWKS_URL=http://opaal:3333/keys | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure what changes have been made to SMD with the tokensmith integration, but this would probably need to be changed or removed. |
||
|
|
||
| # Environemnt Variables | ||
| TOKENSMITH_ISSUER=https://tokensmith.openchami.dev | ||
| TOKENSMITH_CLUSTER_ID=demo-cluster | ||
| TOKENSMITH_OPENCHAMI_ID=demo-openchami | ||
| TOKENSMITH_CONFIG=/tokensmith/config.json | ||
| TOKENSMITH_KEY_DIR=/tmp/tokensmith/keys | ||
| TOKENSMITH_OIDC_PROVIDER=http://hydra:4444 | ||
| TOKENSMITH_PORT=8080 | ||
|
|
||
| # Environemnt Variables | ||
| STEPPATH=/home/step | ||
| DOCKER_STEPCA_INIT_NAME=OpenCHAMI | ||
|
|
@@ -53,6 +48,4 @@ ANSIBLE_HOST_KEY_CHECKING=False | |
| # Environemnt Variables for cloud-init | ||
| LISTEN=:27777 | ||
| SMD_URL=http://smd:27779 | ||
| OPAAL_URL=http://opaal:3333 | ||
| JWKS_URL=http://opaal:3333/keys | ||
| IMPERSONATION=true | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| { | ||
| "groupScopes": { | ||
| "admin": [ | ||
| "admin", | ||
| "write", | ||
| "read" | ||
| ], | ||
| "operator": [ | ||
| "write", | ||
| "read" | ||
| ], | ||
| "user": [ | ||
| "read" | ||
| ], | ||
| "viewer": [ | ||
| "read" | ||
| ] | ||
| } | ||
| } |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a quick note glancing at this: The files in |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| [Unit] | ||
| Description=The bss container | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| PartOf=openchami.target | ||
|
|
||
| # Ensure SMD has started already | ||
| Wants=smd.service tokensmith.service | ||
| After=smd.service tokensmith.service | ||
|
|
||
| [Container] | ||
| ContainerName=boot-service | ||
| HostName=boot-service | ||
| Image=boot-service:test | ||
|
|
||
| # Environment Variables | ||
| EnvironmentFile=/etc/openchami/configs/openchami.env | ||
|
|
||
| # Secrets | ||
| Secret=boot-service-bootstrap-token,type=env,target=TOKENSMITH_BOOTSTRAP_TOKEN | ||
|
|
||
| # Networks for the Container to use | ||
| Network=openchami-internal.network | ||
|
|
||
| # Proxy settings | ||
| PodmanArgs=--http-proxy=false | ||
|
|
||
| Exec=serve --enable-auth --tokensmith_url=http://tokensmith:8080 --hsm-url=http://smd:27779 --tokensmith-target-service smd | ||
|
|
||
| [Service] | ||
| ExecStartPre=/usr/local/sbin/tokensmith_bootstrap_token.sh boot-service | ||
| Restart=always | ||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| [Unit] | ||
| Description=The metadata-service container | ||
| Wants=smd.service | ||
| After=smd.service tokensmith.service | ||
| PartOf=openchami.target | ||
|
|
||
| [Container] | ||
| ContainerName=metadata-service | ||
| HostName=metadata-service | ||
| Image=metadata-service:test | ||
|
|
||
| Secret=metadata-service-bootstrap-token,type=env,target=TOKENSMITH_BOOTSTRAP_TOKEN | ||
|
|
||
| # Environment Variables | ||
| EnvironmentFile=/etc/openchami/configs/openchami.env | ||
|
|
||
| Exec=serve --tokensmith-url=http://tokensmith:8080 | ||
|
|
||
| # Networks for the Container to use | ||
| Network=openchami-internal.network | ||
|
|
||
| # Proxy settings | ||
| PodmanArgs=--http-proxy=false | ||
|
|
||
| [Service] | ||
| ExecStartPre=/usr/local/sbin/tokensmith_bootstrap_token.sh metadata-service | ||
| Restart=always |
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This script needs to be copied and permissions changed in the
openchami.specfile. I'm not sure exactly where it goes but I'm guessing here.cp scripts/tokensmith_bootstrap_token.sh %{buildroot}/usr/bin # ... chmod +x %{buildroot}/usr/bin/tokensmith_bootstrap_token.sh*Edit: It looks like the
tokensmith_bootstrap_token.shscript should be placed in/usr/local/sbin/judging by theExecStartPrepath in theboot-service.servicefile.