Skip to content

Commit

Permalink
Hacking on ironic component
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaskuechler committed Feb 26, 2024
1 parent 0a9ec07 commit 9e2b491
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 17 deletions.
11 changes: 10 additions & 1 deletion components/13-ironic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ Secrets Reference:
executed by the rabbitmq-queues component. The name stems from the RabbitMQ
cluster from the rabbitmq-cluster component. `${CLUSTER_NAME}-default-user`

### Create the rabbitmq and mariadb instances

```bash
kubectl -n openstack apply -k components/13-ironic
```

### Apply the ironic helm template with our custom aio-values.yaml

```bash
helm --namespace openstack template \
ironic \
Expand All @@ -45,12 +53,13 @@ helm --namespace openstack template \
--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.hosts.default="openstack" \
--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 -
```

At this point Keystone will go through some initialization and start uo.
At this point Ironic will go through some initialization and start up.

## Validating Keystone

Expand Down
11 changes: 11 additions & 0 deletions components/13-ironic/aio-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ conf:
ironic:
ironic_conductor:
automated_clean: false
conductor:
automated_clean: false
dhcp:
dhcp_provider: none
logging:
logger_root:
level: DEBUG
logger_ironic:
level: DEBUG

endpoints:
identity:
Expand All @@ -62,6 +71,8 @@ network:
external_policy_local: false
node_port:
enabled: false
pxe:
device: ens1f0

dependencies:
dynamic:
Expand Down
12 changes: 6 additions & 6 deletions components/13-ironic/ironic-mariadb-db.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: mariadb.mmontes.io/v1alpha1
kind: Database
metadata:
name: keystone
name: ironic
namespace: openstack
spec:
# If you want the database to be created with a different name than the resource name
Expand All @@ -17,7 +17,7 @@ spec:
apiVersion: mariadb.mmontes.io/v1alpha1
kind: User
metadata:
name: keystone
name: ironic
namespace: openstack
spec:
# If you want the user to be created with a different name than the resource name
Expand All @@ -26,7 +26,7 @@ spec:
name: mariadb # name of the MariaDB kind
waitForIt: true
passwordSecretKeyRef:
name: keystone-db-password
name: ironic-db-password
key: password
# This field is immutable and defaults to 10, 0 means unlimited.
maxUserConnections: 0
Expand All @@ -36,17 +36,17 @@ spec:
apiVersion: mariadb.mmontes.io/v1alpha1
kind: Grant
metadata:
name: keystone-grant
name: ironic-grant
namespace: openstack
spec:
mariaDbRef:
name: mariadb # name of the MariaDB kind
waitForIt: true
privileges:
- "ALL"
database: "keystone"
database: "ironic"
table: "*"
username: keystone
username: ironic
grantOption: true
host: "%"
retryInterval: 5s
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: rabbitmq.com/v1beta1
kind: User
metadata:
name: keystone
name: ironic
namespace: openstack
spec:
tags:
Expand All @@ -12,15 +12,15 @@ spec:
name: rabbitmq # rabbitmqCluster must exist in the same namespace as this resource

Check warning on line 12 in components/13-ironic/ironic-rabbitmq-queue.yaml

View workflow job for this annotation

GitHub Actions / lint-yaml

12:20 [comments] too few spaces before comment
namespace: openstack
importCredentialsSecret:
name: keystone-rabbitmq-password
name: ironic-rabbitmq-password
---
apiVersion: rabbitmq.com/v1beta1
kind: Vhost
metadata:
name: keystone-vhost
name: ironic-vhost
namespace: openstack
spec:
name: "keystone" # vhost name; required and cannot be updated
name: "ironic" # vhost name; required and cannot be updated

Check warning on line 23 in components/13-ironic/ironic-rabbitmq-queue.yaml

View workflow job for this annotation

GitHub Actions / lint-yaml

23:18 [comments] too few spaces before comment
defaultQueueType: quorum # default queue type for this vhost; require RabbitMQ version 3.11.12 or above

Check warning on line 24 in components/13-ironic/ironic-rabbitmq-queue.yaml

View workflow job for this annotation

GitHub Actions / lint-yaml

24:28 [comments] too few spaces before comment
rabbitmqClusterReference:
name: rabbitmq # rabbitmqCluster must exist in the same namespace as this resource

Check warning on line 26 in components/13-ironic/ironic-rabbitmq-queue.yaml

View workflow job for this annotation

GitHub Actions / lint-yaml

26:20 [comments] too few spaces before comment
Expand All @@ -29,11 +29,11 @@ spec:
apiVersion: rabbitmq.com/v1beta1
kind: Queue
metadata:
name: keystone-queue
name: ironic-queue
namespace: openstack
spec:
name: keystone-qq # name of the queue
vhost: "keystone" # default to '/' if not provided
name: ironic-qq # name of the queue

Check warning on line 35 in components/13-ironic/ironic-rabbitmq-queue.yaml

View workflow job for this annotation

GitHub Actions / lint-yaml

35:19 [comments] too few spaces before comment
vhost: "ironic" # default to '/' if not provided

Check warning on line 36 in components/13-ironic/ironic-rabbitmq-queue.yaml

View workflow job for this annotation

GitHub Actions / lint-yaml

36:19 [comments] too few spaces before comment
type: quorum # without providing a queue type, rabbitmq creates a classic queue

Check warning on line 37 in components/13-ironic/ironic-rabbitmq-queue.yaml

View workflow job for this annotation

GitHub Actions / lint-yaml

37:16 [comments] too few spaces before comment
autoDelete: false
durable: true # seting 'durable' to false means this queue won't survive a server restart

Check warning on line 39 in components/13-ironic/ironic-rabbitmq-queue.yaml

View workflow job for this annotation

GitHub Actions / lint-yaml

39:17 [comments] too few spaces before comment
Expand All @@ -44,12 +44,12 @@ spec:
apiVersion: rabbitmq.com/v1beta1
kind: Permission
metadata:
name: keystone-permission
name: ironic-permission
namespace: openstack
spec:
vhost: "keystone" # name of a vhost
vhost: "ironic" # name of a vhost
userReference:
name: "keystone" # name of a user.rabbitmq.com in the same namespace; must specify either spec.userReference or spec.user
name: "ironic" # name of a user.rabbitmq.com in the same namespace; must specify either spec.userReference or spec.user
permissions:
write: ".*"
configure: ".*"
Expand Down

0 comments on commit 9e2b491

Please sign in to comment.