-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add OpenStack Keystone to be installed
Adds the ability to install OpenStack Keystone into the cluster.
- Loading branch information
Showing
10 changed files
with
1,339 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: keystone | ||
spec: | ||
project: understack | ||
source: | ||
repoURL: https://github.com/rackerlabs/understack.git | ||
path: components/10-keystone/ | ||
targetRevision: HEAD | ||
destination: | ||
server: "https://kubernetes.default.svc" | ||
namespace: openstack | ||
syncPolicy: | ||
automated: | ||
selfHeal: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ resources: | |
- memcached.yaml | ||
- postgres-db.yaml | ||
- nautobot.yaml | ||
- keystone.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
resources: | ||
- mariadb-configmap.yaml | ||
- mariadb-instance.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# OpenStack Keystone | ||
|
||
So unfortunately OpenStack Helm doesn't publish helm charts that can be consumed like | ||
regular helm charts. You must instead clone two of their git repos side by side and | ||
build the dependencies manually. They additionally don't split out secrets but instead | ||
template them into giant config files or even executable scripts that then get stored | ||
as secrets, a clear violation of <https://12factor.net>. As a result we cannot store | ||
a declarative config of Keystone and allow users to supply their own secrets. | ||
|
||
Due to the above issues, for now we'll skip the ArgoCD ability for this deployment. | ||
|
||
## Get OpenStack Helm Ready | ||
|
||
You may have done this for another OpenStack component and can share the same | ||
git clones. This assumes you're doing this from the top level of this repo. | ||
|
||
```bash | ||
# clone the two repos because they reference the infra one as a relative path | ||
# so you can't use real helm commands | ||
git clone https://github.com/openstack/openstack-helm | ||
git clone https://github.com/openstack/openstack-helm-infra | ||
# update the dependencies cause we can't use real helm references | ||
./scripts/openstack-helm-depend-sync.sh keystone | ||
cd components/10-keystone | ||
``` | ||
|
||
## Deploy Keystone | ||
|
||
Since we cannot refer to the secrets by name, we must look them up live from the cluster | ||
so that we can injected them into the templated configs. Upstream should really allow | ||
secrets to be passed by reference. As a result of this we cannot use GitOps to generate | ||
these charts and have them applied to the cluster. | ||
|
||
Secrets Reference: | ||
|
||
- openstack-default-user is created by the messaging-topology-operator which is | ||
executed by the rabbitmq-queues component. The name stems from the RabbitMQ | ||
cluster from the rabbitmq-cluster component. `${CLUSTER_NAME}-default-user` | ||
|
||
```bash | ||
helm --namespace openstack template \ | ||
keystone \ | ||
./openstack-helm/keystone/ \ | ||
-f aio-values.yaml \ | ||
--set endpoints.identity.auth.admin.password="$(kubectl --namespace openstack get secret keystone-admin -o jsonpath='{.data.password}' | base64 -d)" \ | ||
--set endpoints.oslo_db.auth.admin.password="$(kubectl --namespace openstack get secret mariadb -o jsonpath='{.data.root-password}' | base64 -d)" \ | ||
--set endpoints.oslo_db.auth.keystone.password="$(kubectl --namespace openstack get secret keystone-db-password -o jsonpath='{.data.password}' | base64 -d)" \ | ||
--set endpoints.oslo_messaging.auth.admin.password="$(kubectl --namespace openstack get secret openstack-default-user -o jsonpath='{.data.password}' | base64 -d)" \ | ||
--set endpoints.oslo_messaging.auth.keystone.password="$(kubectl --namespace openstack get secret keystone-rabbitmq-password -o jsonpath='{.data.password}' | base64 -d)" \ | ||
--post-renderer $(git rev-parse --show-toplevel)/scripts/openstack-helm-sealed-secrets.sh \ | ||
| kubectl -n openstack apply -f - | ||
``` |
Oops, something went wrong.