Please refer to the rockcraft documentations to learn how to develop a rock.
Please install pre-commit
hooks to help enforce various validations:
pre-commit install -t commit-msg
You can build the rock using the following command:
rockcraft pack -v
Assuming the skopeo
has been
installed. Import the created rock into Docker:
sudo /snap/rockcraft/current/bin/skopeo --insecure-policy copy oci-archive:<local-rock-name>.rock docker-daemon:<image-name>:<image-tag>
Run a GLAuth container using Docker with a minimum working config file:
docker run -d \
--rm \
-p 127.0.0.1:3893:3893/tcp \
--name <container-name> \
<image-name>:<image-tag>
⚠️ NOTEPlease refer to the GLAuth for more details about the configuration file.
Before deploying the GLAuth rock locally, there are several prerequisites:
- Enable the MicroK8s' built-in registry
microk8s enable registry
- Tag the Docker image:
docker tag <image-name>:<image-tag> localhost:32000/<image-name>:<image-tag>
- Push the Docker image to the local built-in registry:
docker push localhost:32000/<image-name>:<image-tag>
Run the following command to deploy a locally-built rock with the glauth-k8s-operator charm:
juju deploy glauth-k8s --resource oci-image=localhost:32000/<image-name>:<image-tag>