|
| 1 | +# Configuring OpenStack (Shared) |
| 2 | + |
| 3 | +The `openstack` component provides shared infrastructure and prerequisites for all OpenStack services in UnderStack. This includes database, messaging, and common resources needed by individual OpenStack services like Keystone, Nova, Neutron, and Ironic. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +The OpenStack component is a Helm chart that creates: |
| 8 | + |
| 9 | +- **MariaDB cluster** - Primary database for OpenStack services |
| 10 | +- **RabbitMQ cluster** - Message broker for OpenStack communication |
| 11 | +- **Shared secrets and credentials** - Common authentication resources |
| 12 | +- **Kubernetes Service accounts** - Kubernetes RBAC for workflow automation |
| 13 | +- **External secret stores** - Integration with external secret management |
| 14 | + |
| 15 | +## Configuration |
| 16 | + |
| 17 | +Configure the OpenStack component by editing `$DEPLOY_NAME/helm-configs/openstack.yaml` in your deployment repository. |
| 18 | + |
| 19 | +### MariaDB Database Configuration |
| 20 | + |
| 21 | +The MariaDB cluster provides the primary database for OpenStack services: |
| 22 | + |
| 23 | +```yaml |
| 24 | +mariadb: |
| 25 | + # Root password configuration |
| 26 | + rootPasswordSecretKeyRef: |
| 27 | + name: mariadb |
| 28 | + key: root-password |
| 29 | + generate: true # Auto-generate if not provided |
| 30 | + |
| 31 | + # Storage configuration |
| 32 | + storage: |
| 33 | + size: 10Gi |
| 34 | + resizeInUseVolumes: true |
| 35 | + waitForVolumeResize: true |
| 36 | + volumeClaimTemplate: |
| 37 | + storageClassName: ceph-block-single |
| 38 | + accessModes: |
| 39 | + - ReadWriteOnce |
| 40 | + resources: |
| 41 | + requests: |
| 42 | + storage: 10Gi |
| 43 | + |
| 44 | + # Enable Galera cluster with 3 replicas for HA |
| 45 | + replicas: 3 |
| 46 | +``` |
| 47 | +
|
| 48 | +#### Storage Considerations |
| 49 | +
|
| 50 | +- **Size**: Start with 10Gi minimum, scale based on your deployment size |
| 51 | +- **Storage Class**: Use your cluster's high-performance storage class |
| 52 | +- **Replicas**: 3 replicas provide high availability via Galera clustering |
| 53 | +- **Resize**: Enable volume resizing for future scaling needs |
| 54 | +
|
| 55 | +### RabbitMQ Message Broker Configuration |
| 56 | +
|
| 57 | +RabbitMQ handles inter-service communication for OpenStack: |
| 58 | +
|
| 59 | +```yaml |
| 60 | +rabbitmq: |
| 61 | + # Configure persistent storage for message queues |
| 62 | + persistence: |
| 63 | + enabled: true |
| 64 | + size: 8Gi |
| 65 | + storageClassName: ceph-block-single |
| 66 | +``` |
| 67 | +
|
| 68 | +### Additional Kubernetes Resources |
| 69 | +
|
| 70 | +Use `extraObjects` to deploy additional Kubernetes manifests alongside the OpenStack component: |
| 71 | + |
| 72 | +```yaml |
| 73 | +extraObjects: |
| 74 | + - apiVersion: external-secrets.io/v1beta1 |
| 75 | + kind: ExternalSecret |
| 76 | + metadata: |
| 77 | + name: openstack-credentials |
| 78 | + spec: |
| 79 | + secretStoreRef: |
| 80 | + kind: ClusterSecretStore |
| 81 | + name: vault-backend |
| 82 | + target: |
| 83 | + name: openstack-admin-credentials |
| 84 | + dataFrom: |
| 85 | + - extract: |
| 86 | + key: openstack/admin |
| 87 | +``` |
| 88 | + |
| 89 | +## Integration with OpenStack Services |
| 90 | + |
| 91 | +Individual OpenStack services (Keystone, Nova, Neutron, etc.) depend on resources created by this component: |
| 92 | + |
| 93 | +- **Database**: Each service gets dedicated MariaDB databases |
| 94 | +- **Messaging**: Services connect to the shared RabbitMQ cluster |
| 95 | +- **Secrets**: Common credentials are managed centrally |
| 96 | +- **Kubernetes Service Accounts**: Argo Workflows automation uses shared service accounts |
| 97 | + |
| 98 | +## Security Considerations |
| 99 | + |
| 100 | +### Secret Management |
| 101 | + |
| 102 | +- Use External Secrets Operator for production deployments |
| 103 | +- Rotate database and RabbitMQ credentials regularly |
| 104 | +- Ensure proper RBAC for service accounts |
| 105 | + |
| 106 | +### Network Security |
| 107 | + |
| 108 | +- Configure network policies to restrict inter-pod communication |
| 109 | +- Use TLS for all database and message broker connections |
| 110 | +- Isolate OpenStack traffic using Kubernetes namespaces |
| 111 | + |
| 112 | +## Monitoring and Observability |
| 113 | + |
| 114 | +The OpenStack component integrates with cluster monitoring: |
| 115 | + |
| 116 | +```yaml |
| 117 | +# Enable monitoring for MariaDB |
| 118 | +mariadb: |
| 119 | + metrics: |
| 120 | + enabled: true |
| 121 | + serviceMonitor: |
| 122 | + enabled: true |
| 123 | +
|
| 124 | +# Enable monitoring for RabbitMQ |
| 125 | +rabbitmq: |
| 126 | + metrics: |
| 127 | + enabled: true |
| 128 | + serviceMonitor: |
| 129 | + enabled: true |
| 130 | +``` |
| 131 | + |
| 132 | +## Troubleshooting |
| 133 | + |
| 134 | +### Database Connection Issues |
| 135 | + |
| 136 | +If OpenStack services can't connect to MariaDB: |
| 137 | + |
| 138 | +1. Check MariaDB pod status: `kubectl get pods -l app=mariadb` |
| 139 | +2. Verify service endpoints: `kubectl get endpoints mariadb` |
| 140 | +3. Test connectivity from a service pod: `kubectl exec -it <pod> -- mysql -h mariadb -u root -p` |
| 141 | + |
| 142 | +### Message Queue Problems |
| 143 | + |
| 144 | +For RabbitMQ connectivity issues: |
| 145 | + |
| 146 | +1. Check RabbitMQ cluster status: `kubectl exec -it rabbitmq-0 -- rabbitmqctl cluster_status` |
| 147 | +2. Verify queue status: `kubectl exec -it rabbitmq-0 -- rabbitmqctl list_queues` |
| 148 | +3. Check service connectivity: `kubectl get svc rabbitmq` |
| 149 | + |
| 150 | +### Resource Scaling |
| 151 | + |
| 152 | +To scale the database cluster: |
| 153 | + |
| 154 | +```yaml |
| 155 | +mariadb: |
| 156 | + replicas: 5 # Scale to 5 nodes |
| 157 | + storage: |
| 158 | + size: 50Gi # Increase storage per node |
| 159 | +``` |
| 160 | + |
| 161 | +Apply changes and monitor the scaling process: |
| 162 | + |
| 163 | +```bash |
| 164 | +kubectl get pods -l app=mariadb -w |
| 165 | +``` |
| 166 | + |
| 167 | +## Related Documentation |
| 168 | + |
| 169 | +- [Component Configuration](./component-config.md) - General component configuration patterns |
| 170 | +- [Override OpenStack Service Config](./override-openstack-svc-config.md) - Service-specific configuration overrides |
| 171 | +- [Deploy Repo](./deploy-repo.md) - Deployment repository structure |
0 commit comments