2022-07-19 14:26:29 +05:30
|
|
|
# cinder-k8s
|
2021-09-23 09:32:42 +01:00
|
|
|
|
|
|
|
## Developing
|
|
|
|
|
|
|
|
Create and activate a virtualenv with the development requirements:
|
|
|
|
|
|
|
|
virtualenv -p python3 venv
|
|
|
|
source venv/bin/activate
|
|
|
|
pip install -r requirements-dev.txt
|
|
|
|
|
|
|
|
## Code overview
|
|
|
|
|
2022-07-19 14:26:29 +05:30
|
|
|
Get familiarise with [Charmed Operator Framework](https://juju.is/docs/sdk)
|
|
|
|
and [Sunbeam documentation](sunbeam-docs).
|
|
|
|
|
2022-07-25 10:12:53 +01:00
|
|
|
cinder-k8s charm uses the ops\_sunbeam library and extends
|
2022-07-19 14:26:29 +05:30
|
|
|
OSBaseOperatorAPICharm from the library.
|
|
|
|
|
2022-09-06 15:08:24 +09:30
|
|
|
cinder-k8s charm consumes database relation to connect to database,
|
2022-07-19 14:26:29 +05:30
|
|
|
identity-service to register the service endpoints to keystone
|
|
|
|
and ingress-internal/ingress-public relation to get exposed over
|
|
|
|
internal and public networks.
|
2021-09-23 09:32:42 +01:00
|
|
|
|
|
|
|
## Intended use case
|
|
|
|
|
2022-07-19 14:26:29 +05:30
|
|
|
cinder-k8s charm deploys and configures OpenStack Block storage service
|
|
|
|
on a kubernetes based environment. It should be possible to use
|
|
|
|
local storage or ceph based storage as backend.
|
2021-09-23 09:32:42 +01:00
|
|
|
|
|
|
|
## Roadmap
|
|
|
|
|
2022-07-19 14:26:29 +05:30
|
|
|
TODO
|
2021-09-23 09:32:42 +01:00
|
|
|
|
|
|
|
## Testing
|
|
|
|
|
|
|
|
The Python operator framework includes a very nice harness for testing
|
2022-07-26 15:39:12 +05:30
|
|
|
operator behaviour without full deployment. Run tests using command:
|
2021-09-23 09:32:42 +01:00
|
|
|
|
2022-07-26 15:39:12 +05:30
|
|
|
tox -e py3
|
2022-07-19 14:26:29 +05:30
|
|
|
|
|
|
|
## Deployment
|
|
|
|
|
|
|
|
This project uses tox for building and managing. To build the charm
|
|
|
|
run:
|
|
|
|
|
|
|
|
tox -e build
|
|
|
|
|
|
|
|
To deploy the local test instance:
|
|
|
|
|
2024-04-12 13:37:22 +01:00
|
|
|
juju deploy ./cinder-k8s_ubuntu-20.04-amd64.charm --resource cinder-api-image=ghcr.io/canonical/cinder-api:2024.1 --resource cinder-scheduler-image=ghcr.io/canonical/cinder-scheduler:2024.1
|
2022-07-19 14:26:29 +05:30
|
|
|
|
|
|
|
<!-- LINKS -->
|
|
|
|
|
2025-03-05 16:44:44 +05:30
|
|
|
[sunbeam-docs]: https://opendev.org/openstack/sunbeam-charms/src/branch/main/README.md
|