This is a simple Python Provisioner Service for Keptn's automatic git provisioning extension based on Gitea.
Pre-requesits
- Kubernetes cluster
- Keptn
First, we will install gitea in the gitea
namespace. After that, we will install python-provisioner-service.
GITEA_NAMESPACE=gitea
helm repo add gitea-charts https://dl.gitea.io/charts/
helm repo update
helm install -n ${GITEA_NAMESPACE} gitea gitea-charts/gitea --create-namespace \
--set memcached.enabled=false \
--set postgresql.enabled=false \
--set gitea.config.database.DB_TYPE=sqlite3 \
--set gitea.config.server.OFFLINE_MODE=true \
--set gitea.config.server.ROOT_URL=http://gitea-http.${GITEA_NAMESPACE}:3000/
You can access your gitea installation using
kubectl -n ${GITEA_NAMESPACE} port-forward services/gitea-http 3000:3000
This will install python-provisioner-service into the default namespace
helm install python-provisioner-service https://github.com/christian-kreuzberger-dtx/python-provisioner-service/releases/download/1.0.1-next.0/python-provisioner-service-1.0.1-next.0.tgz
Verify it's installed
kubectl get pods -l app.kubernetes.io/instance=python-provisioner-service
This is done by setting control-plane.features.automaticProvisioningURL
to http://python-provisioner-service.default
(without trailing slash), e.g.:
helm upgrade --install keptn keptn/keptn -n keptn --create-namespace --version=0.16.0 \
--set=control-plane.apiGatewayNginx.type=LoadBalancer,control-plane.features.automaticProvisioningURL=http://python-provisioner-service.default
Create a Python 3 virtual environment
virtualenv -p python3 venv
Activate virtual environment
source venv/bin/activate
Develop
Run using skaffold
skaffold run --tail
It is assumed that the current development takes place in the main
/master
branch (either via Pull Requests or directly).
Once you're ready, go to the Actions tab on GitHub, select Pre-Release or Release, and run the action.
Please find more information in the LICENSE file.