Files
sunbeam-charms/charms/ironic-k8s/CONTRIBUTING.md
Claudiu Belu f07ada88f1 Adds ironic-k8s charm
Adds the basic charm, with typical relations and setup.

The charm has the following resources:

- ironic-api-image
- ironic-novncproxy-image

The charm enables the audit middleware for the Ironic API.

The charm provides the "ironic-api" relation, based on
service_readiness.

The charm has the traefik-route-internal and traefik-route-public for
the ironic-novncproxy service.

Change-Id: Ic00a933bae43a5d598c03eef18969a41138ea653
Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2025-09-30 10:07:41 +00:00

1.7 KiB

ironic-k8s

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

Get familiarised with Charmed Operator Framework and Sunbeam documentation.

ironic-k8s charm uses the ops_sunbeam library and extends OSBaseOperatorAPICharm from the library.

ironic-k8s charm consumes database relation to connect to database, identity-service to register the service endpoints to keystone and ingress-internal/ingress-public relation to get exposed over internal and public networks.

The charms starts the ironic-api and ironic-novncproxy services.

Intended use case

ironic-k8s charm deploys and configures OpenStack Ironic - a bare metal provisioning service - on a kubernetes based environment.

Roadmap

TODO

Testing

The Python operator framework includes a very nice harness for testing operator behaviour without full deployment. Run tests using command:

tox --root ../../ -e py3 -- ironic-k8s

Deployment

This project uses tox for building and managing. To build the charm run:

tox --root ../../ -e build -- ironic-k8s

To deploy the local test instance:

juju deploy ./ironic-k8s.charm ironic --trust \
  --resource ironic-api-image=ghcr.io/canonical/ironic-api:2025.1 \
  --resource ironic-novncproxy-image=ghcr.io/canonical/ironic-novncproxy:2025.1

To upgrade / refresh the ironic-k8s charm with a locally-built charm, use the following command:

juju refresh ironic --path ./ironic-k8s.charm