mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 22:17:30 -07:00
1.4 KiB
1.4 KiB
Running a Calckey server with Kubernetes and Helm
This is a Helm chart directory in the root of the project that you can use to deploy calckey to a Kubernetes cluster
Deployment
- Copy the example helm values and make your changes:
cp .config/helm_values_example.yml .config/helm_values.yml
- Update helm dependencies:
cd chart
helm dependency list $dir 2> /dev/null | tail +2 | head -n -1 | awk '{ print "helm repo add " $1 " " $3 }' | while read cmd; do $cmd; done;
cd ../
- Create the calckey helm release (also used to update existing deployment):
helm upgrade \
--install \
--namespace calckey \
--create-namespace \
calckey chart/ \
-f .config/helm_values.yml
- Watch your calckey server spin up:
kubectl -n calckey get po -w
- Initial the admin user and managed config:
export CALCKEY_USERNAME="my_desired_admin_handle" && \
export CALCKEY_PASSWORD="myDesiredInitialPassword" && \
export CALCKEY_HOST="calckey.example.com" && \
export CALCKEY_TOKEN=$(curl -X POST https://$CALCKEY_HOST/api/admin/accounts/create -H "Content-Type: application/json" -d "{ \"username\":\"$CALCKEY_USERNAME\", \"password\":\"$CALCKEY_PASSWORD\" }" | jq -r '.token') && \
echo "Save this token: ${CALCKEY_TOKEN}" && \
curl -X POST -H "Authorization: Bearer $CALCKEY_TOKEN" https://$CALCKEY_HOST/api/admin/accounts/hosted
- Enjoy!