diff --git a/SUMMARY.md b/SUMMARY.md index 54a751238..24470f8fa 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -25,6 +25,7 @@ * [Digital Ocean](deployment/digital-ocean/README.md) * [Kubernetes Dashboard](deployment/digital-ocean/dashboard/README.md) * [HTTPS](deployment/digital-ocean/https/README.md) + * [Human Connection](deployment/human-connection/README.md) * [Neo4J DB Backup](deployment/backup.md) * [Legacy Migration](deployment/legacy-migration/README.md) * [Feature Specification](cypress/features.md) diff --git a/deployment/.gitignore b/deployment/.gitignore index aad0daea8..14cfa18ed 100644 --- a/deployment/.gitignore +++ b/deployment/.gitignore @@ -1,3 +1,4 @@ secrets.yaml -*/secrets.yaml -kubeconfig.yaml +configmap.yaml +**/secrets.yaml +**/configmap.yaml diff --git a/deployment/README.md b/deployment/README.md index e191bddc0..0615ccf9b 100644 --- a/deployment/README.md +++ b/deployment/README.md @@ -7,41 +7,5 @@ and get a kubernetes cluster. We have tested two different kubernetes providers: [Minikube](./minikube/README.md) and [Digital Ocean](./digital-ocean/README.md). - -## Installation with kubernetes - -You have to do some prerequisites e.g. change some secrets according to your own setup. - -### Edit secrets - -```bash -$ cp secrets.template.yaml human-connection/secrets.yaml -``` - -Change all secrets as needed. - -If you want to edit secrets, you have to `base64` encode them. See [kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/secret/#creating-a-secret-manually). - -```text -# example how to base64 a string: -$ echo -n 'admin' | base64 -YWRtaW4= -``` - -Those secrets get `base64` decoded in a kubernetes pod. - -### Create a namespace - -```text -$ kubectl apply -f namespace-human-connection.yaml -``` - -Switch to the namespace `human-connection` in your kubernetes dashboard. - -### Run the configuration - -```text -$ kubectl apply -f human-connection/ -``` - -This can take a while because kubernetes will download the docker images. Sit back and relax and have a look into your kubernetes dashboard. Wait until all pods turn green and they don't show a warning `Waiting: ContainerCreating` anymore. +Check out the specific documentation for your provider. After that, learn how +to apply the specific kubernetes configuration for [Human Connection](./human-connection/README.md). diff --git a/deployment/human-connection/configmap.yaml b/deployment/configmap.template.yaml similarity index 67% rename from deployment/human-connection/configmap.yaml rename to deployment/configmap.template.yaml index 5e4d6ba89..baf41661a 100644 --- a/deployment/human-connection/configmap.yaml +++ b/deployment/configmap.template.yaml @@ -9,8 +9,6 @@ NEO4J_USER: "neo4j" NEO4J_AUTH: "none" CLIENT_URI: "https://nitro-staging.human-connection.org" - MAPBOX_TOKEN: "pk.eyJ1IjoiaHVtYW4tY29ubmVjdGlvbiIsImEiOiJjajl0cnBubGoweTVlM3VwZ2lzNTNud3ZtIn0.KZ8KK9l70omjXbEkkbHGsQ" - PRIVATE_KEY_PASSPHRASE: "a7dsf78sadg87ad87sfagsadg78" metadata: name: configmap namespace: human-connection diff --git a/deployment/human-connection/README.md b/deployment/human-connection/README.md new file mode 100644 index 000000000..7df30e345 --- /dev/null +++ b/deployment/human-connection/README.md @@ -0,0 +1,50 @@ +# Kubernetes Configuration for Human Connection + +Deploying Human Connection with kubernetes is straight forward. All you have to +do is to change certain parameters, like domain names and API keys, then you +just apply our provided configuration files to your cluster. + +## Configuration + +Copy our provided templates: + +```bash +$ cp secrets.template.yaml human-connection/secrets.yaml +$ cp configmap.template.yaml human-connection/configmap.yaml +``` + +Change the `configmap.yaml` as needed, all variables will be available as +environment variables in your deployed kubernetes pods. + +If you want to edit secrets, you have to `base64` encode them. See [kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/secret/#creating-a-secret-manually). + +```text +# example how to base64 a string: +$ echo -n 'admin' | base64 --wrap 0 +YWRtaW4= +``` + +Those secrets get `base64` decoded and are available as environment variables in +your deployed kubernetes pods. + +## Create a namespace + +```text +$ kubectl apply -f namespace-human-connection.yaml +``` + +If you have a [kubernets dashboard](../digital-ocean/dashboard/README.md) +deployed you should switch to namespace `human-connection` in order to +monitor the state of your deployments. + +## Apply the configuration + +```text +# in folder deployment/ +$ kubectl apply -f human-connection/ +``` + +This can take a while because kubernetes will download the docker images. Sit +back and relax and have a look into your kubernetes dashboard. Wait until all +pods turn green and they don't show a warning `Waiting: ContainerCreating` +anymore. diff --git a/deployment/secrets.template.yaml b/deployment/secrets.template.yaml index ac56b7aa1..8f18dbf46 100644 --- a/deployment/secrets.template.yaml +++ b/deployment/secrets.template.yaml @@ -4,6 +4,7 @@ data: JWT_SECRET: "Yi8mJjdiNzhCRiZmdi9WZA==" MONGODB_PASSWORD: "TU9OR09EQl9QQVNTV09SRA==" PRIVATE_KEY_PASSPHRASE: "YTdkc2Y3OHNhZGc4N2FkODdzZmFnc2FkZzc4" + MAPBOX_TOKEN: "cGsuZXlKMUlqb2lhSFZ0WVc0dFkyOXVibVZqZEdsdmJpSXNJbUVpT2lKamFqbDBjbkJ1Ykdvd2VUVmxNM1Z3WjJsek5UTnVkM1p0SW4wLktaOEtLOWw3MG9talhiRWtrYkhHc1EK" metadata: name: human-connection namespace: human-connection