mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-24 01:39:06 +01:00
91b8b7b76b
Co-authored-by: Luna <luna.dragon@suse.com> Reviewed-on: https://iceshrimp.dev/iceshrimp/iceshrimp/pulls/125 Co-authored-by: Luna D Dragon <lunarequest@nullrequest.com> Co-committed-by: Luna D Dragon <lunarequest@nullrequest.com>
1.4 KiB
1.4 KiB
Running a iceshrimp server with Kubernetes and Helm
This is a Helm chart directory in the root of the project that you can use to deploy iceshrimp 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 iceshrimp helm release (also used to update existing deployment):
helm upgrade \
--install \
--namespace iceshrimp \
--create-namespace \
iceshrimp chart/ \
-f .config/helm_values.yml
- Watch your iceshrimp server spin up:
kubectl -n iceshrimp get po -w
- Initial the admin user and managed config:
export iceshrimp_USERNAME="my_desired_admin_handle" && \
export iceshrimp_PASSWORD="myDesiredInitialPassword" && \
export iceshrimp_HOST="iceshrimp.example.com" && \
export iceshrimp_TOKEN=$(curl -X POST https://$iceshrimp_HOST/api/admin/accounts/create -H "Content-Type: application/json" -d "{ \"username\":\"$iceshrimp_USERNAME\", \"password\":\"$iceshrimp_PASSWORD\" }" | jq -r '.token') && \
echo "Save this token: ${iceshrimp_TOKEN}" && \
curl -X POST -H "Authorization: Bearer $iceshrimp_TOKEN" https://$iceshrimp_HOST/api/admin/accounts/hosted
- Enjoy!