This tutorial will guide you through setting up a production environment.
First, install K3s (or some other Kubernetes distribution).
Please note that you need a valid domain name to set up TLS and use Let's Encrypt.
If you are using Nginx:
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.10.0/cert-manager.yaml
kubectl create -f letsencrypt_nginx.yaml
If you are using Traefik:
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.10.0/cert-manager.yaml
kubectl create -f letsencrypt_traefik.yaml
Verify the installation:
kubectl get pods --namespace cert-manager
NAME READY STATUS RESTARTS AGE
cert-manager-646dddd544-rrmx4 1/1 Running 0 19h
cert-manager-cainjector-8676c4b7-dxsjw 1/1 Running 0 19h
You may also want to install Longhorn.
kubectl apply -f https://raw.githubusercontent.com/longhorn/longhorn/v1.5.1/deploy/longhorn.yaml
First, clone the ColonyOS Helm chart Git repo.
git clone https://github.com/colonyos/helm
cd helm/colonyos/colonies
Update the values.yaml file. See Tutorial-7 how to create a server private key.
ColoniesServerHostname: "TODO, e.g server.colonyos.io"
ColoniesServerID: "TODO"
ColoniesServerPrvKey: "TODO"
DBPassword: "TODO"
Create a namespace:
kubectl create namespace colonyos
Deploy Helm chart:
helm install colonies -f values.yaml -n colonyos .
cd minio
Update values.yaml file (e.g. credentials) and type:
helm install ${namespace} -f values.yaml -n ${namespace} .
Create a prod.env file like docker-compose.env. Be sure to replace all server addresses, private keys, and IDs with the appropriate production values.
source prod.env
First install the Minio client. Instructions can be found here.
Create a Minio account:
mc alias set myminio http://localhost:9000 $MINIO_USER $MINIO_PASSWORD;
mc admin user add myminio $AWS_S3_ACCESSKEY $AWS_S3_SECRETKEY;
mc admin policy attach myminio readwrite --user=$AWS_S3_ACCESSKEY;
mc mb myminio/$AWS_S3_BUCKET;
Create a new colony and a new user:
colonies colony add --name $COLONIES_COLONY_NAME --colonyid $COLONIES_COLONY_ID;
colonies user add --name="myuser" --email="" --phone="" --userid=$COLONIES_ID