Skip to content
Update development cluster authored by Remco Haszing's avatar Remco Haszing
The instructions now match the cluster.
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
The review cluster was created with the following settings The review cluster was created with the following settings
- **Kubernetes version**: 1.20.2.do.0 (latest) - **Kubernetes version**: 1.21.2.do.0 (latest)
- **Datacenter region**: Amsterdam 3 - **Datacenter region**: Amsterdam 3
- **Cluster capacity**: - **Cluster capacity**:
- **Node pool name**: development - **Node pool name**: development
- **Machine type**: Standard nodes - **Machine type**: Basic nodes
- **Node plan**: \$10/Month per node - **Node plan**: \$20/Month per node
- **Number nodes**: 4 - **Number nodes**:
- **Tags**: `review`, `staging` - **Tags**: `review`, `staging`
- **Name**: development - **Name**: development
...@@ -30,12 +30,6 @@ doctl kubernetes cluster kubeconfig development ...@@ -30,12 +30,6 @@ doctl kubernetes cluster kubeconfig development
### Namespaces ### Namespaces
Create a namespace for our managed services
```sh
kubectl create namespace managed
```
Create a namespace for the staging environment Create a namespace for the staging environment
```sh ```sh
...@@ -48,29 +42,23 @@ Create a namespace for review environments ...@@ -48,29 +42,23 @@ Create a namespace for review environments
kubectl create namespace review kubectl create namespace review
``` ```
#### Client Apps
> **Note**: This is not a proper permanent solution
For now we deploy specific client backends in the review cluster in their own namespace.
Namespaces:
- `10-second-dance`
### NGINX Ingress Controller ### NGINX Ingress Controller
Install [NGINX ingress controller](https://hub.helm.sh/charts/nginx/nginx-ingress) Install [NGINX ingress controller](https://artifacthub.io/packages/helm/ingress-nginx/ingress-nginx)
```sh ```sh
helm repo add stable https://kubernetes-charts.storage.googleapis.com helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm install ingress stable/nginx-ingress --namespace managed --version 1.41.2 \ helm repo update
helm install ingress-nginx ingress-nginx/ingress-nginx \
--create-namespace \
--namespace ingress-nginx \
--set-string 'controller.config.compute-full-forwarded-for=true' \ --set-string 'controller.config.compute-full-forwarded-for=true' \
--set-string 'controller.config.enable-real-ip=true' \ --set-string 'controller.config.enable-real-ip=true' \
--set-string 'controller.config.use-forwarded-headers=true' \ --set-string 'controller.config.use-forwarded-headers=true' \
--set-string 'controller.config.use-proxy-protocol=true' \ --set-string 'controller.config.use-proxy-protocol=true' \
--set-string 'controller.service.annotations.service\.beta\.kubernetes\.io/do-loadbalancer-enable-proxy-protocol=true' \ --set-string 'controller.service.annotations.service\.beta\.kubernetes\.io/do-loadbalancer-enable-proxy-protocol=true' \
--set-string 'controller.service.annotations.service\.beta\.kubernetes\.io/do-loadbalancer-hostname=appsemble.review' --set-string 'controller.service.annotations.service\.beta\.kubernetes\.io/do-loadbalancer-hostname=appsemble.review' \
--set-string 'controller.service.annotations.service\.beta\.kubernetes\.io/do-loadbalancer-name=development'
``` ```
### Cert-manager ### Cert-manager
...@@ -78,13 +66,23 @@ helm install ingress stable/nginx-ingress --namespace managed --version 1.41.2 \ ...@@ -78,13 +66,23 @@ helm install ingress stable/nginx-ingress --namespace managed --version 1.41.2 \
Install cert-manager based on Install cert-manager based on
[these instructions](https://docs.cert-manager.io/en/latest/getting-started/install/kubernetes.html#installing-with-helm) [these instructions](https://docs.cert-manager.io/en/latest/getting-started/install/kubernetes.html#installing-with-helm)
```sh
helm repo add jetstack https://charts.jetstack.io
helm repo update
helm install cert-manager jetstack/cert-manager \
--create-namespace \
--namespace cert-manager \
--version 1.4.0 \
--set 'installCRDs=true'
```
Get a read-only access token for admin@appsemble.com and create a secret for it based on Get a read-only access token for admin@appsemble.com and create a secret for it based on
[these instruction](https://cert-manager.io/docs/configuration/acme/dns01/digitalocean/) [these instruction](https://cert-manager.io/docs/configuration/acme/dns01/digitalocean/)
```sh ```sh
kubectl create secret generic digitalocean-dns \ kubectl create secret generic digitalocean-dns \
--from-literal "access-token=$DO_ACCESS_TOKEN" \ --from-literal "access-token=$DO_ACCESS_TOKEN" \
--namespace managed --namespace cert-manager
``` ```
Create a [cluster issuer](review/cluster-issuer.yaml) resource for cert manager Create a [cluster issuer](review/cluster-issuer.yaml) resource for cert manager
...@@ -93,16 +91,6 @@ Create a [cluster issuer](review/cluster-issuer.yaml) resource for cert manager ...@@ -93,16 +91,6 @@ Create a [cluster issuer](review/cluster-issuer.yaml) resource for cert manager
kubectl apply -f https://gitlab.com/appsemble/infra/wikis/config/development/cluster-issuer.yaml kubectl apply -f https://gitlab.com/appsemble/infra/wikis/config/development/cluster-issuer.yaml
``` ```
Install [cert-manager chart](https://hub.helm.sh/charts/jetstack/cert-manager)
```sh
helm repo add jetstack https://charts.jetstack.io
helm install cert-manager jetstack/cert-manager \
--namespace managed \
--version v1.3.1 \
--set 'installCRDs=true'
```
### Appsemble secrets ### Appsemble secrets
Follow Follow
...@@ -112,11 +100,13 @@ generating passwords, the following command was used ...@@ -112,11 +100,13 @@ generating passwords, the following command was used
```sh ```sh
kubectl create secret generic postgresql-secret \ kubectl create secret generic postgresql-secret \
--from-literal "postgresql-password=$(uuidgen)" \
--from-literal "postgresql-postgres-password=$(uuidgen)" \ --from-literal "postgresql-postgres-password=$(uuidgen)" \
--from-literal "postgresql-replication-password=$(uuidgen)" \ --from-literal "postgresql-replication-password=$(uuidgen)" \
--namespace review --namespace review
kubectl create secret generic postgresql-secret \ kubectl create secret generic postgresql-secret \
--from-literal "postgresql-password=$(uuidgen)" \ --from-literal "postgresql-password=$(uuidgen)" \
--from-literal "postgresql-postgres-password=$(uuidgen)" \
--from-literal "postgresql-replication-password=$(uuidgen)" \ --from-literal "postgresql-replication-password=$(uuidgen)" \
--namespace staging --namespace staging
``` ```
... ...
......