From af15ec6393b127123371d29915225081605ddcbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Fri, 1 Feb 2019 23:34:19 +0100 Subject: [PATCH 1/5] Fix certain configuration for Digital Ocean --- config/neo4j.yml | 2 +- deployments/db-migration-worker.yml | 17 +++-------------- services/neo4j.yml | 2 +- volumes/mongo-export.yml | 16 ++-------------- volumes/uploads.yml | 16 ++-------------- 5 files changed, 9 insertions(+), 44 deletions(-) diff --git a/config/neo4j.yml b/config/neo4j.yml index 78d1ba3cd..0165338db 100644 --- a/config/neo4j.yml +++ b/config/neo4j.yml @@ -1,7 +1,7 @@ apiVersion: v1 kind: ConfigMap data: - NEO4J_URI: "bolt://neo4j.staging:7687" + NEO4J_URI: "bolt://nitro-neo4j.staging:7687" NEO4J_USER: "neo4j" NEO4J_AUTH: none metadata: diff --git a/deployments/db-migration-worker.yml b/deployments/db-migration-worker.yml index 952cf0121..f4d427096 100644 --- a/deployments/db-migration-worker.yml +++ b/deployments/db-migration-worker.yml @@ -76,19 +76,6 @@ restartPolicy: Always terminationGracePeriodSeconds: 30 status: {} ---- - apiVersion: v1 - kind: PersistentVolume - metadata: - name: ssh-keys-volume - namespace: staging - spec: - accessModes: - - ReadWriteOnce - capacity: - storage: 1Mi - hostPath: - path: /data/pv0001/ --- kind: PersistentVolumeClaim apiVersion: v1 @@ -100,4 +87,6 @@ - ReadWriteOnce resources: requests: - storage: 1Mi + # waaay too much + # unfortunately Digital Oceans volumes start at 1Gi + storage: 1Gi diff --git a/services/neo4j.yml b/services/neo4j.yml index 4ff0953a7..d6c7a95b4 100644 --- a/services/neo4j.yml +++ b/services/neo4j.yml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Service metadata: - name: neo4j + name: nitro-neo4j namespace: staging labels: workload.user.cattle.io/workloadselector: deployment-staging-neo4j diff --git a/volumes/mongo-export.yml b/volumes/mongo-export.yml index a5ef064cc..1fb537e5c 100644 --- a/volumes/mongo-export.yml +++ b/volumes/mongo-export.yml @@ -1,16 +1,3 @@ ---- - kind: PersistentVolume - apiVersion: v1 - metadata: - name: mongo-export-volume - namespace: staging - spec: - accessModes: - - ReadWriteMany - capacity: - storage: 1Gi - hostPath: - path: /data/shared/mongo-exports/ --- kind: PersistentVolumeClaim apiVersion: v1 @@ -19,7 +6,8 @@ namespace: staging spec: accessModes: - - ReadWriteMany + - ReadWriteOnce resources: requests: storage: 1Gi + storageClassName: do-block-storage diff --git a/volumes/uploads.yml b/volumes/uploads.yml index 34b600aab..3a9dfcdad 100644 --- a/volumes/uploads.yml +++ b/volumes/uploads.yml @@ -1,16 +1,3 @@ ---- - apiVersion: v1 - kind: PersistentVolume - metadata: - name: uploads-volume - namespace: staging - spec: - accessModes: - - ReadWriteMany - capacity: - storage: 8Gi - hostPath: - path: /data/shared/uploads/ --- kind: PersistentVolumeClaim apiVersion: v1 @@ -19,7 +6,8 @@ namespace: staging spec: accessModes: - - ReadWriteMany + - ReadWriteOnce resources: requests: storage: 8Gi + storageClassName: do-block-storage From 671826e060032596ab2e112786eb0913f3031034 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Sat, 2 Feb 2019 12:40:29 +0100 Subject: [PATCH 2/5] Bundle all configuration in one folder staging/ --- .gitignore | 2 +- {config => staging/config}/.gitignore | 0 {config => staging/config}/backend.yml | 0 {config => staging/config}/neo4j.yml | 0 {config => staging/config}/web.yml | 0 {deployments => staging/deployments}/backend.yml | 0 {deployments => staging/deployments}/db-migration-worker.yml | 0 {deployments => staging/deployments}/neo4j.yml | 0 {deployments => staging/deployments}/web.yml | 0 namespace-staging.yml => staging/namespace-staging.yml | 0 {services => staging/services}/backend.yml | 0 {services => staging/services}/neo4j.yml | 0 {services => staging/services}/web.yml | 0 {volumes => staging/volumes}/mongo-export.yml | 1 - {volumes => staging/volumes}/uploads.yml | 1 - 15 files changed, 1 insertion(+), 3 deletions(-) rename {config => staging/config}/.gitignore (100%) rename {config => staging/config}/backend.yml (100%) rename {config => staging/config}/neo4j.yml (100%) rename {config => staging/config}/web.yml (100%) rename {deployments => staging/deployments}/backend.yml (100%) rename {deployments => staging/deployments}/db-migration-worker.yml (100%) rename {deployments => staging/deployments}/neo4j.yml (100%) rename {deployments => staging/deployments}/web.yml (100%) rename namespace-staging.yml => staging/namespace-staging.yml (100%) rename {services => staging/services}/backend.yml (100%) rename {services => staging/services}/neo4j.yml (100%) rename {services => staging/services}/web.yml (100%) rename {volumes => staging/volumes}/mongo-export.yml (84%) rename {volumes => staging/volumes}/uploads.yml (84%) diff --git a/.gitignore b/.gitignore index 32cfb3b9e..8a42d3602 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -*secrets*.yml +*secrets.yml diff --git a/config/.gitignore b/staging/config/.gitignore similarity index 100% rename from config/.gitignore rename to staging/config/.gitignore diff --git a/config/backend.yml b/staging/config/backend.yml similarity index 100% rename from config/backend.yml rename to staging/config/backend.yml diff --git a/config/neo4j.yml b/staging/config/neo4j.yml similarity index 100% rename from config/neo4j.yml rename to staging/config/neo4j.yml diff --git a/config/web.yml b/staging/config/web.yml similarity index 100% rename from config/web.yml rename to staging/config/web.yml diff --git a/deployments/backend.yml b/staging/deployments/backend.yml similarity index 100% rename from deployments/backend.yml rename to staging/deployments/backend.yml diff --git a/deployments/db-migration-worker.yml b/staging/deployments/db-migration-worker.yml similarity index 100% rename from deployments/db-migration-worker.yml rename to staging/deployments/db-migration-worker.yml diff --git a/deployments/neo4j.yml b/staging/deployments/neo4j.yml similarity index 100% rename from deployments/neo4j.yml rename to staging/deployments/neo4j.yml diff --git a/deployments/web.yml b/staging/deployments/web.yml similarity index 100% rename from deployments/web.yml rename to staging/deployments/web.yml diff --git a/namespace-staging.yml b/staging/namespace-staging.yml similarity index 100% rename from namespace-staging.yml rename to staging/namespace-staging.yml diff --git a/services/backend.yml b/staging/services/backend.yml similarity index 100% rename from services/backend.yml rename to staging/services/backend.yml diff --git a/services/neo4j.yml b/staging/services/neo4j.yml similarity index 100% rename from services/neo4j.yml rename to staging/services/neo4j.yml diff --git a/services/web.yml b/staging/services/web.yml similarity index 100% rename from services/web.yml rename to staging/services/web.yml diff --git a/volumes/mongo-export.yml b/staging/volumes/mongo-export.yml similarity index 84% rename from volumes/mongo-export.yml rename to staging/volumes/mongo-export.yml index 1fb537e5c..563a9cfe6 100644 --- a/volumes/mongo-export.yml +++ b/staging/volumes/mongo-export.yml @@ -10,4 +10,3 @@ resources: requests: storage: 1Gi - storageClassName: do-block-storage diff --git a/volumes/uploads.yml b/staging/volumes/uploads.yml similarity index 84% rename from volumes/uploads.yml rename to staging/volumes/uploads.yml index 3a9dfcdad..a48d28ddc 100644 --- a/volumes/uploads.yml +++ b/staging/volumes/uploads.yml @@ -10,4 +10,3 @@ resources: requests: storage: 8Gi - storageClassName: do-block-storage From 15f391539440fe7755b1e60cce85571c7747e208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Sat, 2 Feb 2019 13:08:07 +0100 Subject: [PATCH 3/5] Adding dashboard deployment for digital ocean --- README.md | 110 ++++++++++++------ dashboard/admin-user.yml | 5 + dashboard/role-binding.yml | 12 ++ ...space-staging.yml => namespace-staging.yml | 0 4 files changed, 89 insertions(+), 38 deletions(-) create mode 100644 dashboard/admin-user.yml create mode 100644 dashboard/role-binding.yml rename staging/namespace-staging.yml => namespace-staging.yml (100%) diff --git a/README.md b/README.md index d43687b4a..3fb1a983b 100644 --- a/README.md +++ b/README.md @@ -10,13 +10,12 @@ - [ ] configure persistent & shared storage between nodes - [x] reproduce setup locally - -## Install Minikube, kubectl +## Minikube There are many Kubernetes distributions, but if you're just getting started, Minikube is a tool that you can use to get your feet wet. [Install Minikube](https://kubernetes.io/docs/tasks/tools/install-minikube/) -# Open minikube dashboard +### Open minikube dashboard ``` $ minikube dashboard ``` @@ -25,63 +24,98 @@ Some of the steps below need some timing to make ressources available to other dependent deployments. Keeping an eye on the dashboard is a great way to check that. -## Create a namespace locally -```shell -$ kubectl create -f namespace-staging.yml -``` -Switch to the namespace `staging` in your kubernetes dashboard. +### Access exposed services -## Setup config maps -```shell -$ cp db-migration-worker.template.yml config/db-migration-worker.yml -# edit all variables according to the setup of the remote legacy server +Follow the installation instruction below. Just at the end, expose the +`nitro-web` service on your host system with: -$ kubectl apply -f config/ +```shell +$ minikube service nitro-web --namespace=staging ``` -## Setup secrets and deploy themn +## Digital Ocean + +Install the kubernetes dashboard first: +```sh +$ kubectl apply -f dashboard/ +``` +Proxy localhost to the remote kubernetes dashboard: +```sh +kubectl proxy +``` +Get your token on the command line: +```sh +$ kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep admin-user | awk '{print $1}') +``` +It should print something like: +``` +Name: admin-user-token-6gl6l +Namespace: kube-system +Labels: +Annotations: kubernetes.io/service-account.name=admin-user + kubernetes.io/service-account.uid=b16afba9-dfec-11e7-bbb9-901b0e532516 + +Type: kubernetes.io/service-account-token + +Data +==== +ca.crt: 1025 bytes +namespace: 11 bytes +token: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJrdWJlLXN5c3RlbSIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJhZG1pbi11c2VyLXRva2VuLTZnbDZsIiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQubmFtZSI6ImFkbWluLXVzZXIiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC51aWQiOiJiMTZhZmJhOS1kZmVjLTExZTctYmJiOS05MDFiMGU1MzI1MTYiLCJzdWIiOiJzeXN0ZW06c2VydmljZWFjY291bnQ6a3ViZS1zeXN0ZW06YWRtaW4tdXNlciJ9.M70CU3lbu3PP4OjhFms8PVL5pQKj-jj4RNSLA4YmQfTXpPUuxqXjiTf094_Rzr0fgN_IVX6gC4fiNUL5ynx9KU-lkPfk0HnX8scxfJNzypL039mpGt0bbe1IXKSIRaq_9VW59Xz-yBUhycYcKPO9RM2Qa1Ax29nqNVko4vLn1_1wPqJ6XSq3GYI8anTzV8Fku4jasUwjrws6Cn6_sPEGmL54sq5R4Z5afUtv-mItTmqZZdxnkRqcJLlg2Y8WbCPogErbsaCDJoABQ7ppaqHetwfM_0yMun6ABOQbIwwl8pspJhpplKwyo700OSpvTT9zlBsu-b35lzXGBRHzv5g_RA + +``` +Grab the token and paste it into the login screen at [http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/](http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/) + + +## Installation with kubernetes (minikube + Digital Ocean) + +You have to do some prerequisites and change some secrets according to your own setup. + +#### Setup config maps +```shell +$ cp db-migration-worker.template.yml staging/config/db-migration-worker.yml +``` +Edit all variables according to the setup of the remote legacy server. + +#### Setup secrets and deploy themn + +```sh +$ cp secrets.yml.template staging/secrets.yml +``` +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). ```shell # example how to base64 a string: $ echo -n 'admin' | base64 YWRtaW4= +``` +Those secrets get `base64` decoded in a kubernetes pod. -$ cp secrets.yml.template secrets.yml -# change all variables as needed and deploy them +#### Create a namespace locally +```shell +$ kubectl create -f namespace-staging.yml +``` +Switch to the namespace `staging` in your kubernetes dashboard. + +### Run the configuration +```shell +$ cd staging/ $ kubectl apply -f secrets.yml -``` - -## Create volumes -```shell +$ kubectl apply -f config/ $ kubectl apply -f volumes/ -``` - -## Expose the services - -```shell $ kubectl apply -f services/ -``` -Wait until persistent volumes and services become available. - -## Create deployments -```shell $ kubectl apply -f deployments/ ``` + 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. -## Access the services - -```shell -$ minikube service nitro-web --namespace=staging -``` - - -## Provision db-migration-worker +### Provision db-migration-worker Copy your private ssh key and the `.known-hosts` file of your remote legacy server. ```shell diff --git a/dashboard/admin-user.yml b/dashboard/admin-user.yml new file mode 100644 index 000000000..27b6bb802 --- /dev/null +++ b/dashboard/admin-user.yml @@ -0,0 +1,5 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: admin-user + namespace: kube-system diff --git a/dashboard/role-binding.yml b/dashboard/role-binding.yml new file mode 100644 index 000000000..faa8927a2 --- /dev/null +++ b/dashboard/role-binding.yml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: admin-user +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin +subjects: +- kind: ServiceAccount + name: admin-user + namespace: kube-system diff --git a/staging/namespace-staging.yml b/namespace-staging.yml similarity index 100% rename from staging/namespace-staging.yml rename to namespace-staging.yml From 0b075830bc497dde1145aa6a9617687d3f46bc2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Sat, 2 Feb 2019 13:33:42 +0100 Subject: [PATCH 4/5] Put many configuration files in one folder --- README.md | 47 +++++++++---------- ...onfigmap-db-migration-worker.template.yaml | 0 ...pace-staging.yml => namespace-staging.yaml | 0 secrets.template.yml => secrets.template.yaml | 0 staging/.gitignore | 2 + staging/config/.gitignore | 1 - staging/config/backend.yml | 9 ---- staging/config/neo4j.yml | 9 ---- staging/config/web.yml | 8 ---- staging/configmaps.yaml | 29 ++++++++++++ .../backend.yml => deployment-backend.yaml} | 0 ...ml => deployment-db-migration-worker.yaml} | 0 .../neo4j.yml => deployment-neo4j.yaml} | 0 .../web.yml => deployment-web.yaml} | 0 .../backend.yml => service-backend.yaml} | 0 .../neo4j.yml => service-neo4j.yaml} | 0 .../{services/web.yml => service-web.yaml} | 0 ...rt.yml => volume-claim-mongo-exports.yaml} | 0 .../uploads.yml => volume-claim-uploads.yaml} | 0 19 files changed, 52 insertions(+), 53 deletions(-) rename db-migration-worker.template.yml => configmap-db-migration-worker.template.yaml (100%) rename namespace-staging.yml => namespace-staging.yaml (100%) rename secrets.template.yml => secrets.template.yaml (100%) create mode 100644 staging/.gitignore delete mode 100644 staging/config/.gitignore delete mode 100644 staging/config/backend.yml delete mode 100644 staging/config/neo4j.yml delete mode 100644 staging/config/web.yml create mode 100644 staging/configmaps.yaml rename staging/{deployments/backend.yml => deployment-backend.yaml} (100%) rename staging/{deployments/db-migration-worker.yml => deployment-db-migration-worker.yaml} (100%) rename staging/{deployments/neo4j.yml => deployment-neo4j.yaml} (100%) rename staging/{deployments/web.yml => deployment-web.yaml} (100%) rename staging/{services/backend.yml => service-backend.yaml} (100%) rename staging/{services/neo4j.yml => service-neo4j.yaml} (100%) rename staging/{services/web.yml => service-web.yaml} (100%) rename staging/{volumes/mongo-export.yml => volume-claim-mongo-exports.yaml} (100%) rename staging/{volumes/uploads.yml => volume-claim-uploads.yaml} (100%) diff --git a/README.md b/README.md index 3fb1a983b..0225f0aa9 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,20 @@ # Human-Connection Nitro | Deployment Configuration -> Currently the deployment is not primetime ready as you still have to do some manual work. That we need to change, the following list gives some glimpse of the missing steps. - -## Todo`s -- [ ] check labels and selectors if they all are correct -- [ ] configure NGINX from yml +Todos: +- [x] check labels and selectors if they all are correct +- [x] configure NGINX from yml - [ ] configure Let's Encrypt cert-manager from yml -- [ ] configure ingress form yml -- [ ] configure persistent & shared storage between nodes +- [x] configure ingress from yml +- [x] configure persistent & shared storage between nodes - [x] reproduce setup locally ## Minikube -There are many Kubernetes distributions, but if you're just getting started, Minikube is a tool that you can use to get your feet wet. +There are many Kubernetes distributions, but if you're just getting started, +Minikube is a tool that you can use to get your feet wet. [Install Minikube](https://kubernetes.io/docs/tasks/tools/install-minikube/) -### Open minikube dashboard +Open minikube dashboard: ``` $ minikube dashboard ``` @@ -24,10 +23,9 @@ Some of the steps below need some timing to make ressources available to other dependent deployments. Keeping an eye on the dashboard is a great way to check that. -### Access exposed services - -Follow the installation instruction below. Just at the end, expose the -`nitro-web` service on your host system with: +Follow the [installation instruction](#installation-with-kubernetes) below. +If all the pods and services have settled and everything looks green in your +minikube dashboard, expose the `nitro-web` service on your host system with: ```shell $ minikube service nitro-web --namespace=staging @@ -35,7 +33,7 @@ $ minikube service nitro-web --namespace=staging ## Digital Ocean -Install the kubernetes dashboard first: +First, install kubernetes dashboard: ```sh $ kubectl apply -f dashboard/ ``` @@ -67,20 +65,21 @@ token: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZ Grab the token and paste it into the login screen at [http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/](http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/) -## Installation with kubernetes (minikube + Digital Ocean) +## Installation with kubernetes -You have to do some prerequisites and change some secrets according to your own setup. +You have to do some prerequisites e.g. change some secrets according to your +own setup. #### Setup config maps ```shell -$ cp db-migration-worker.template.yml staging/config/db-migration-worker.yml +$ cp configmap-db-migration-worker.template.yaml staging/configmap-db-migration-worker.yaml ``` Edit all variables according to the setup of the remote legacy server. #### Setup secrets and deploy themn ```sh -$ cp secrets.yml.template staging/secrets.yml +$ cp secrets.template.yaml staging/secrets.yaml ``` Change all secrets as needed. @@ -95,18 +94,13 @@ Those secrets get `base64` decoded in a kubernetes pod. #### Create a namespace locally ```shell -$ kubectl create -f namespace-staging.yml +$ kubectl create -f namespace-staging.yaml ``` Switch to the namespace `staging` in your kubernetes dashboard. ### Run the configuration ```shell -$ cd staging/ -$ kubectl apply -f secrets.yml -$ kubectl apply -f config/ -$ kubectl apply -f volumes/ -$ kubectl apply -f services/ -$ kubectl apply -f deployments/ +$ kubectl apply -f staging/ ``` This can take a while because kubernetes will download the docker images. @@ -116,7 +110,8 @@ Wait until all pods turn green and they don't show a warning ### Provision db-migration-worker -Copy your private ssh key and the `.known-hosts` file of your remote legacy server. +Copy your private ssh key and the `.known-hosts` file of your remote legacy +server. ```shell # check the corresponding db-migration-worker pod diff --git a/db-migration-worker.template.yml b/configmap-db-migration-worker.template.yaml similarity index 100% rename from db-migration-worker.template.yml rename to configmap-db-migration-worker.template.yaml diff --git a/namespace-staging.yml b/namespace-staging.yaml similarity index 100% rename from namespace-staging.yml rename to namespace-staging.yaml diff --git a/secrets.template.yml b/secrets.template.yaml similarity index 100% rename from secrets.template.yml rename to secrets.template.yaml diff --git a/staging/.gitignore b/staging/.gitignore new file mode 100644 index 000000000..599426dbb --- /dev/null +++ b/staging/.gitignore @@ -0,0 +1,2 @@ +configmap-db-migration-worker.yaml +secrets.yaml diff --git a/staging/config/.gitignore b/staging/config/.gitignore deleted file mode 100644 index 6fe22561d..000000000 --- a/staging/config/.gitignore +++ /dev/null @@ -1 +0,0 @@ -db-migration-worker.yml diff --git a/staging/config/backend.yml b/staging/config/backend.yml deleted file mode 100644 index cfb19b538..000000000 --- a/staging/config/backend.yml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -data: - GRAPHQL_PORT: "4000" - GRAPHQL_URI: "http://nitro-backend.staging:4000" - MOCK: "false" -metadata: - name: staging-backend - namespace: staging diff --git a/staging/config/neo4j.yml b/staging/config/neo4j.yml deleted file mode 100644 index 0165338db..000000000 --- a/staging/config/neo4j.yml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -data: - NEO4J_URI: "bolt://nitro-neo4j.staging:7687" - NEO4J_USER: "neo4j" - NEO4J_AUTH: none -metadata: - name: staging-neo4j - namespace: staging diff --git a/staging/config/web.yml b/staging/config/web.yml deleted file mode 100644 index 1dbf5e25e..000000000 --- a/staging/config/web.yml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -data: - CLIENT_URI: "https://nitro-staging.human-connection.org" - MAPBOX_TOKEN: pk.eyJ1IjoiaHVtYW4tY29ubmVjdGlvbiIsImEiOiJjajl0cnBubGoweTVlM3VwZ2lzNTNud3ZtIn0.KZ8KK9l70omjXbEkkbHGsQ -metadata: - name: staging-web - namespace: staging diff --git a/staging/configmaps.yaml b/staging/configmaps.yaml new file mode 100644 index 000000000..c07353141 --- /dev/null +++ b/staging/configmaps.yaml @@ -0,0 +1,29 @@ +--- + apiVersion: v1 + kind: ConfigMap + data: + GRAPHQL_PORT: "4000" + GRAPHQL_URI: "http://nitro-backend.staging:4000" + MOCK: "false" + metadata: + name: staging-backend + namespace: staging +--- + apiVersion: v1 + kind: ConfigMap + data: + NEO4J_URI: "bolt://nitro-neo4j.staging:7687" + NEO4J_USER: "neo4j" + NEO4J_AUTH: none + metadata: + name: staging-neo4j + namespace: staging +--- + apiVersion: v1 + kind: ConfigMap + data: + CLIENT_URI: "https://nitro-staging.human-connection.org" + MAPBOX_TOKEN: pk.eyJ1IjoiaHVtYW4tY29ubmVjdGlvbiIsImEiOiJjajl0cnBubGoweTVlM3VwZ2lzNTNud3ZtIn0.KZ8KK9l70omjXbEkkbHGsQ + metadata: + name: staging-web + namespace: staging diff --git a/staging/deployments/backend.yml b/staging/deployment-backend.yaml similarity index 100% rename from staging/deployments/backend.yml rename to staging/deployment-backend.yaml diff --git a/staging/deployments/db-migration-worker.yml b/staging/deployment-db-migration-worker.yaml similarity index 100% rename from staging/deployments/db-migration-worker.yml rename to staging/deployment-db-migration-worker.yaml diff --git a/staging/deployments/neo4j.yml b/staging/deployment-neo4j.yaml similarity index 100% rename from staging/deployments/neo4j.yml rename to staging/deployment-neo4j.yaml diff --git a/staging/deployments/web.yml b/staging/deployment-web.yaml similarity index 100% rename from staging/deployments/web.yml rename to staging/deployment-web.yaml diff --git a/staging/services/backend.yml b/staging/service-backend.yaml similarity index 100% rename from staging/services/backend.yml rename to staging/service-backend.yaml diff --git a/staging/services/neo4j.yml b/staging/service-neo4j.yaml similarity index 100% rename from staging/services/neo4j.yml rename to staging/service-neo4j.yaml diff --git a/staging/services/web.yml b/staging/service-web.yaml similarity index 100% rename from staging/services/web.yml rename to staging/service-web.yaml diff --git a/staging/volumes/mongo-export.yml b/staging/volume-claim-mongo-exports.yaml similarity index 100% rename from staging/volumes/mongo-export.yml rename to staging/volume-claim-mongo-exports.yaml diff --git a/staging/volumes/uploads.yml b/staging/volume-claim-uploads.yaml similarity index 100% rename from staging/volumes/uploads.yml rename to staging/volume-claim-uploads.yaml From abf623bd51d539c9ec94efce251b037073fc12ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Sat, 2 Feb 2019 18:44:21 +0100 Subject: [PATCH 5/5] Rename .yml to .yaml files for consistency See: https://stackoverflow.com/a/21059164 @appinteractive --- .gitignore | 1 - README.md | 2 +- dashboard/{admin-user.yml => admin-user.yaml} | 0 dashboard/{role-binding.yml => role-binding.yaml} | 0 4 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 .gitignore rename dashboard/{admin-user.yml => admin-user.yaml} (100%) rename dashboard/{role-binding.yml => role-binding.yaml} (100%) diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 8a42d3602..000000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*secrets.yml diff --git a/README.md b/README.md index 0225f0aa9..7f998fcf2 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ $ kubectl apply -f dashboard/ ``` Proxy localhost to the remote kubernetes dashboard: ```sh -kubectl proxy +$ kubectl proxy ``` Get your token on the command line: ```sh diff --git a/dashboard/admin-user.yml b/dashboard/admin-user.yaml similarity index 100% rename from dashboard/admin-user.yml rename to dashboard/admin-user.yaml diff --git a/dashboard/role-binding.yml b/dashboard/role-binding.yaml similarity index 100% rename from dashboard/role-binding.yml rename to dashboard/role-binding.yaml