Skip to content

Latest commit

 

History

History
78 lines (54 loc) · 1.75 KB

CONTRIBUTING.md

File metadata and controls

78 lines (54 loc) · 1.75 KB

Contributing

Developing

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

Building & Running Locally

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>

⚠️ NOTE

Please refer to the GLAuth for more details about the configuration file.

Deploying

Prerequisites

Before deploying the GLAuth rock locally, there are several prerequisites:

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>

Deploy

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>