From 889a7cdd24dda04a139b2b77d626e984d6db6781 Mon Sep 17 00:00:00 2001 From: roschaefer Date: Tue, 17 Sep 2019 02:20:24 +0200 Subject: [PATCH 001/171] Intermediate commit --- deployment/helm/human-connection/.helmignore | 22 +++++++++++++++++++ deployment/helm/human-connection/Chart.yaml | 5 +++++ .../human-connection/templates/configmap.yml | 21 ++++++++++++++++++ deployment/helm/human-connection/values.yaml | 1 + 4 files changed, 49 insertions(+) create mode 100644 deployment/helm/human-connection/.helmignore create mode 100644 deployment/helm/human-connection/Chart.yaml create mode 100644 deployment/helm/human-connection/templates/configmap.yml create mode 100644 deployment/helm/human-connection/values.yaml diff --git a/deployment/helm/human-connection/.helmignore b/deployment/helm/human-connection/.helmignore new file mode 100644 index 000000000..50af03172 --- /dev/null +++ b/deployment/helm/human-connection/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/deployment/helm/human-connection/Chart.yaml b/deployment/helm/human-connection/Chart.yaml new file mode 100644 index 000000000..ab0d80bb1 --- /dev/null +++ b/deployment/helm/human-connection/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: human-connection +version: 0.1.0 diff --git a/deployment/helm/human-connection/templates/configmap.yml b/deployment/helm/human-connection/templates/configmap.yml new file mode 100644 index 000000000..82973fd69 --- /dev/null +++ b/deployment/helm/human-connection/templates/configmap.yml @@ -0,0 +1,21 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }}-configmap +dath: + SMTP_HOST: "mailserver.human-connection" + SMTP_PORT: "25" + GRAPHQL_PORT: "4000" + GRAPHQL_URI: "http://nitro-backend.human-connection:4000" + NEO4J_URI: "bolt://nitro-neo4j.human-connection:7687" + NEO4J_AUTH: "none" + CLIENT_URI: "https://{{ .Values.domain }}" + NEO4J_apoc_import_file_enabled: "true" + NEO4J_dbms_memory_pagecache_size: "490M" + NEO4J_dbms_memory_heap_max__size: "500M" + NEO4J_dbms_memory_heap_initial__size: "500M" + NEO4J_dbms_security_procedures_unrestricted: "algo.*,apoc.*" + VERSION: "0.1.0" + SENTRY_DSN_WEBAPP: "" + SENTRY_DSN_BACKEND: "" + COMMIT: "" diff --git a/deployment/helm/human-connection/values.yaml b/deployment/helm/human-connection/values.yaml new file mode 100644 index 000000000..0fe0dc898 --- /dev/null +++ b/deployment/helm/human-connection/values.yaml @@ -0,0 +1 @@ +domain: nitro-staging.human-connection.org From caf2bc79cfa343d90e6550e4808fa72478c28d56 Mon Sep 17 00:00:00 2001 From: roschaefer Date: Tue, 17 Sep 2019 13:41:49 +0200 Subject: [PATCH 002/171] Start to write a helm chart for Human Connection --- deployment/helm/human-connection/Chart.yaml | 2 +- .../human-connection/templates/configmap.yml | 28 ++++++------ .../templates/deployment-backend.yaml | 45 +++++++++++++++++++ deployment/helm/human-connection/values.yaml | 31 +++++++++++++ 4 files changed, 90 insertions(+), 16 deletions(-) create mode 100644 deployment/helm/human-connection/templates/deployment-backend.yaml diff --git a/deployment/helm/human-connection/Chart.yaml b/deployment/helm/human-connection/Chart.yaml index ab0d80bb1..1cfe9378b 100644 --- a/deployment/helm/human-connection/Chart.yaml +++ b/deployment/helm/human-connection/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 appVersion: "1.0" -description: A Helm chart for Kubernetes +description: A Helm chart for Human Connection name: human-connection version: 0.1.0 diff --git a/deployment/helm/human-connection/templates/configmap.yml b/deployment/helm/human-connection/templates/configmap.yml index 82973fd69..d298f1b08 100644 --- a/deployment/helm/human-connection/templates/configmap.yml +++ b/deployment/helm/human-connection/templates/configmap.yml @@ -3,19 +3,17 @@ kind: ConfigMap metadata: name: {{ .Release.Name }}-configmap dath: - SMTP_HOST: "mailserver.human-connection" - SMTP_PORT: "25" - GRAPHQL_PORT: "4000" - GRAPHQL_URI: "http://nitro-backend.human-connection:4000" - NEO4J_URI: "bolt://nitro-neo4j.human-connection:7687" - NEO4J_AUTH: "none" + GRAPHQL_URI: "http://{{ .Release.Name }}-backend:4000" + NEO4J_URI: "bolt://{{ .Release.Name }}-neo4j:7687" CLIENT_URI: "https://{{ .Values.domain }}" - NEO4J_apoc_import_file_enabled: "true" - NEO4J_dbms_memory_pagecache_size: "490M" - NEO4J_dbms_memory_heap_max__size: "500M" - NEO4J_dbms_memory_heap_initial__size: "500M" - NEO4J_dbms_security_procedures_unrestricted: "algo.*,apoc.*" - VERSION: "0.1.0" - SENTRY_DSN_WEBAPP: "" - SENTRY_DSN_BACKEND: "" - COMMIT: "" + NEO4J_apoc_import_file_enabled: {{ .Values.neo4j.apoc_import_file_enabled }} + NEO4J_dbms_memory_pagecache_size: {{ .Values.neo4j.dbms_memory_pagecache_size }} + NEO4J_dbms_memory_heap_max__size: {{ .Values.neo4j.dbms_memory_heap_max__size }} + NEO4J_dbms_memory_heap_initial__size: {{ .Values.neo4j.dbms_memory_heap_initial__size }} + NEO4J_dbms_security_procedures_unrestricted: {{ .Values.neo4j.dbms_security_procedures_unrestricted }} + VERSION: {{ .Chart.AppVersion }} + SENTRY_DSN_WEBAPP: {{ .Values.sentry.dsn_webapp }} + SENTRY_DSN_BACKEND: {{ .Values.sentry.dsn_backend }} + COMMIT: {{ .Values.commit }} + SMTP_HOST: {{ .Values.smtp.host }} + SMTP_PORT: {{ .Values.smtp.port }} diff --git a/deployment/helm/human-connection/templates/deployment-backend.yaml b/deployment/helm/human-connection/templates/deployment-backend.yaml new file mode 100644 index 000000000..596036fd2 --- /dev/null +++ b/deployment/helm/human-connection/templates/deployment-backend.yaml @@ -0,0 +1,45 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ .Release.Name }}-backend +spec: + replicas: 1 + minReadySeconds: 15 + progressDeadlineSeconds: 60 + strategy: + rollingUpdate: + maxSurge: 0 + maxUnavailable: "100%" + selector: + matchLabels: + human-connection.org/selector: deployment-backend + template: + metadata: + name: deployment-backend + annotations: + backup.velero.io/backup-volumes: uploads + labels: + human-connection.org/commit: {{ .Values.commit }} + human-connection.org/selector: deployment-backend + spec: + containers: + - name: backend + image: humanconnection/nitro-backend:latest + imagePullPolicy: {{ .Values.pullPolicy }} + ports: + - containerPort: 4000 + envFrom: + - configMapRef: + name: {{ .Release.Name }}-configmap + - secretRef: + name: {{ .Release.Name }}-secrets + # volumeMounts: + # - mountPath: /nitro-backend/public/uploads + # name: uploads + # volumes: + # - name: uploads + # persistentVolumeClaim: + # claimName: uploads-claim + restartPolicy: Always + terminationGracePeriodSeconds: 30 +status: {} diff --git a/deployment/helm/human-connection/values.yaml b/deployment/helm/human-connection/values.yaml index 0fe0dc898..c15537a83 100644 --- a/deployment/helm/human-connection/values.yaml +++ b/deployment/helm/human-connection/values.yaml @@ -1 +1,32 @@ domain: nitro-staging.human-connection.org +commit: 889a7cdd24dda04a139b2b77d626e984d6db6781 +pullPolicy: Always + +# configs +smtp: + host: "mailserver.human-connection" + port: "25" +neo4j: + apoc_import_file_enabled: "true" + dbms_memory_pagecache_size: "490M" + dbms_memory_heap_max__size: "500M" + dbms_memory_heap_initial__size: "500M" + dbms_security_procedures_unrestricted: "algo.*,apoc.*" +sentry: + dsn_webapp: + dsn_backend: + +# secrets +jwt_secret: b/&&7b78BF&fv/Vd +private_key_passphrase: a7dsf78sadg87ad87sfagsadg78 +mapbox: + token: pk.eyJ1IjoiaHVtYW4tY29ubmVjdGlvbiIsImEiOiJjajl0cnBubGoweTVlM3VwZ2lzNTNud3ZtIn0.KZ8KK9l70omjXbEkkbHGsQ +mongodb: + username: + password: +neo4j: + username: + password: +smtp: + username: + password: From a2a71975abdba9a806add1477da0e0f14a6f7700 Mon Sep 17 00:00:00 2001 From: roschaefer Date: Tue, 17 Sep 2019 20:01:34 +0200 Subject: [PATCH 003/171] Templates for webapp+neo4j, use camelCase --- .../human-connection/templates/configmap.yml | 13 ++--- .../templates/deployment-neo4j.yaml | 55 +++++++++++++++++++ .../templates/deployment-web.yaml | 37 +++++++++++++ deployment/helm/human-connection/values.yaml | 35 +++++------- 4 files changed, 110 insertions(+), 30 deletions(-) create mode 100644 deployment/helm/human-connection/templates/deployment-neo4j.yaml create mode 100644 deployment/helm/human-connection/templates/deployment-web.yaml diff --git a/deployment/helm/human-connection/templates/configmap.yml b/deployment/helm/human-connection/templates/configmap.yml index d298f1b08..8be7b517e 100644 --- a/deployment/helm/human-connection/templates/configmap.yml +++ b/deployment/helm/human-connection/templates/configmap.yml @@ -6,14 +6,9 @@ dath: GRAPHQL_URI: "http://{{ .Release.Name }}-backend:4000" NEO4J_URI: "bolt://{{ .Release.Name }}-neo4j:7687" CLIENT_URI: "https://{{ .Values.domain }}" - NEO4J_apoc_import_file_enabled: {{ .Values.neo4j.apoc_import_file_enabled }} - NEO4J_dbms_memory_pagecache_size: {{ .Values.neo4j.dbms_memory_pagecache_size }} - NEO4J_dbms_memory_heap_max__size: {{ .Values.neo4j.dbms_memory_heap_max__size }} - NEO4J_dbms_memory_heap_initial__size: {{ .Values.neo4j.dbms_memory_heap_initial__size }} - NEO4J_dbms_security_procedures_unrestricted: {{ .Values.neo4j.dbms_security_procedures_unrestricted }} VERSION: {{ .Chart.AppVersion }} - SENTRY_DSN_WEBAPP: {{ .Values.sentry.dsn_webapp }} - SENTRY_DSN_BACKEND: {{ .Values.sentry.dsn_backend }} + SENTRY_DSN_WEBAPP: {{ .Values.sentryDsnWebapp }} + SENTRY_DSN_BACKEND: {{ .Values.sentryDsnBackend }} COMMIT: {{ .Values.commit }} - SMTP_HOST: {{ .Values.smtp.host }} - SMTP_PORT: {{ .Values.smtp.port }} + SMTP_HOST: {{ .Values.smtpHost }} + SMTP_PORT: {{ .Values.smtpPort }} diff --git a/deployment/helm/human-connection/templates/deployment-neo4j.yaml b/deployment/helm/human-connection/templates/deployment-neo4j.yaml new file mode 100644 index 000000000..692533abf --- /dev/null +++ b/deployment/helm/human-connection/templates/deployment-neo4j.yaml @@ -0,0 +1,55 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ .Release.Name }}-neo4j +spec: + replicas: 1 + strategy: + rollingUpdate: + maxSurge: 0 + maxUnavailable: "100%" + selector: + matchLabels: + human-connection.org/selector: deployment-neo4j + template: + metadata: + name: neo4j + annotations: + backup.velero.io/backup-volumes: neo4j-data + labels: + human-connection.org/commit: {{ .Values.commit }} + human-connection.org/selector: deployment-neo4j + spec: + containers: + - name: neo4j + image: humanconnection/neo4j:latest + imagePullPolicy: {{ .Values.pullPolicy }} + ports: + - containerPort: 7687 + - containerPort: 7474 + # resources: + # requests: + # memory: "2G" + # limits: + # memory: "8G" + env: + - name: NEO4J_dbms_security_procedures_unrestricted + value: "algo.*,apoc.*" + {{- range $key, $val := .Values.neo4jConfig }} + - name: NEO4J_{{ $key }} + value: {{ $val | quote }} + {{- end}} + envFrom: + - configMapRef: + name: {{ .Release.Name }}-configmap + - secretRef: + name: {{ .Release.Name }}-secrets + # volumeMounts: + # - mountPath: /data/ + # name: neo4j-data + # volumes: + # - name: neo4j-data + # persistentVolumeClaim: + # claimName: neo4j-data-claim + restartPolicy: Always + terminationGracePeriodSeconds: 30 diff --git a/deployment/helm/human-connection/templates/deployment-web.yaml b/deployment/helm/human-connection/templates/deployment-web.yaml new file mode 100644 index 000000000..0e432774f --- /dev/null +++ b/deployment/helm/human-connection/templates/deployment-web.yaml @@ -0,0 +1,37 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ .Release.Name }}-webapp +spec: + replicas: 2 + minReadySeconds: 15 + progressDeadlineSeconds: 60 + selector: + matchLabels: + human-connection.org/selector: deployment-webapp + template: + metadata: + name: webapp + labels: + human-connection.org/commit: {{ .Values.commit }} + human-connection.org/selector: deployment-webapp + spec: + containers: + - name: webapp + image: humanconnection/nitro-web:latest + imagePullPolicy: {{ .Values.pullPolicy }} + envFrom: + - configMapRef: + name: {{ .Release.Name }}-configmap + - secretRef: + name: {{ .Release.Name }}-secrets + env: + - name: HOST + value: 0.0.0.0 + ports: + - containerPort: 3000 + resources: {} + imagePullPolicy: Always + restartPolicy: Always + terminationGracePeriodSeconds: 30 +status: {} diff --git a/deployment/helm/human-connection/values.yaml b/deployment/helm/human-connection/values.yaml index c15537a83..25a346fae 100644 --- a/deployment/helm/human-connection/values.yaml +++ b/deployment/helm/human-connection/values.yaml @@ -3,30 +3,23 @@ commit: 889a7cdd24dda04a139b2b77d626e984d6db6781 pullPolicy: Always # configs -smtp: - host: "mailserver.human-connection" - port: "25" -neo4j: +smtpHost: "mailserver.human-connection" +smtpPort: "25" +smtpUsername: +smtpPassword: +sentryDsnWebapp: +sentryDsnBackend: +neo4jConfig: apoc_import_file_enabled: "true" dbms_memory_pagecache_size: "490M" dbms_memory_heap_max__size: "500M" dbms_memory_heap_initial__size: "500M" - dbms_security_procedures_unrestricted: "algo.*,apoc.*" -sentry: - dsn_webapp: - dsn_backend: # secrets -jwt_secret: b/&&7b78BF&fv/Vd -private_key_passphrase: a7dsf78sadg87ad87sfagsadg78 -mapbox: - token: pk.eyJ1IjoiaHVtYW4tY29ubmVjdGlvbiIsImEiOiJjajl0cnBubGoweTVlM3VwZ2lzNTNud3ZtIn0.KZ8KK9l70omjXbEkkbHGsQ -mongodb: - username: - password: -neo4j: - username: - password: -smtp: - username: - password: +jwtSecret: b/&&7b78BF&fv/Vd +privateKeyPassphrase: a7dsf78sadg87ad87sfagsadg78 +mapboxToken: pk.eyJ1IjoiaHVtYW4tY29ubmVjdGlvbiIsImEiOiJjajl0cnBubGoweTVlM3VwZ2lzNTNud3ZtIn0.KZ8KK9l70omjXbEkkbHGsQ +mongodbUsername: +mongodbPassword: +neo4jUsername: +neo4jPassword: From fccf53a176789ecc728032bda99cc2f55ab018b8 Mon Sep 17 00:00:00 2001 From: roschaefer Date: Tue, 17 Sep 2019 23:28:17 +0200 Subject: [PATCH 004/171] Implement services and maintenance deployment Also found: ``` Some users have raised concerns that the Neo4j image changes file permissions on the host machine. By default, Neo4j runs as the user neo4j who only exists in the container, not on the host. That means that it's hard to set up mount folders on the host which this new user has write permissions for. We have updated the error messaging with advice about how to fix file permission errors. We also introduced writability checks and reduced the amount of file permission changes the image will perform. This has been found to interfere with some Kubernetes setups, so is currently an opt-in feature. To enforce stricter file permissions checking you can pass this environment variable to the container: --env SECURE_FILE_PERMISSIONS=yes ``` from https://hub.docker.com/_/neo4j Implemented the above :point_up: --- .../templates/deployment-maintenance.yaml | 26 +++++++++++++++++++ .../templates/deployment-neo4j.yaml | 2 ++ .../templates/service-backend.yaml | 11 ++++++++ .../templates/service-maintenance.yaml | 11 ++++++++ .../templates/service-neo4j.yaml | 14 ++++++++++ .../templates/service-webapp.yaml | 11 ++++++++ 6 files changed, 75 insertions(+) create mode 100644 deployment/helm/human-connection/templates/deployment-maintenance.yaml create mode 100644 deployment/helm/human-connection/templates/service-backend.yaml create mode 100644 deployment/helm/human-connection/templates/service-maintenance.yaml create mode 100644 deployment/helm/human-connection/templates/service-neo4j.yaml create mode 100644 deployment/helm/human-connection/templates/service-webapp.yaml diff --git a/deployment/helm/human-connection/templates/deployment-maintenance.yaml b/deployment/helm/human-connection/templates/deployment-maintenance.yaml new file mode 100644 index 000000000..8ce4442b9 --- /dev/null +++ b/deployment/helm/human-connection/templates/deployment-maintenance.yaml @@ -0,0 +1,26 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ .Release.Name }}-maintenance +spec: + selector: + matchLabels: + human-connection.org/selector: deployment-maintenance + template: + metadata: + labels: + human-connection.org/commit: {{ .Values.commit }} + human-connection.org/selector: deployment-maintenance + name: maintenance + spec: + containers: + - name: maintenance + env: + - name: HOST + value: 0.0.0.0 + image: humanconnection/maintenance:latest + ports: + - containerPort: 80 + imagePullPolicy: Always + restartPolicy: Always + terminationGracePeriodSeconds: 30 diff --git a/deployment/helm/human-connection/templates/deployment-neo4j.yaml b/deployment/helm/human-connection/templates/deployment-neo4j.yaml index 692533abf..290f79332 100644 --- a/deployment/helm/human-connection/templates/deployment-neo4j.yaml +++ b/deployment/helm/human-connection/templates/deployment-neo4j.yaml @@ -35,6 +35,8 @@ spec: env: - name: NEO4J_dbms_security_procedures_unrestricted value: "algo.*,apoc.*" + - name: SECURE_FILE_PERMISSIONS + value: "yes" {{- range $key, $val := .Values.neo4jConfig }} - name: NEO4J_{{ $key }} value: {{ $val | quote }} diff --git a/deployment/helm/human-connection/templates/service-backend.yaml b/deployment/helm/human-connection/templates/service-backend.yaml new file mode 100644 index 000000000..b9d40ef8a --- /dev/null +++ b/deployment/helm/human-connection/templates/service-backend.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Release.Name }}-backend +spec: + ports: + - name: graphql + port: 4000 + targetPort: 4000 + selector: + human-connection.org/selector: deployment-backend diff --git a/deployment/helm/human-connection/templates/service-maintenance.yaml b/deployment/helm/human-connection/templates/service-maintenance.yaml new file mode 100644 index 000000000..a82473e2e --- /dev/null +++ b/deployment/helm/human-connection/templates/service-maintenance.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Release.Name }}-maintenance +spec: + ports: + - name: web + port: 80 + targetPort: 80 + selector: + human-connection.org/selector: deployment-maintenance diff --git a/deployment/helm/human-connection/templates/service-neo4j.yaml b/deployment/helm/human-connection/templates/service-neo4j.yaml new file mode 100644 index 000000000..547dad6c7 --- /dev/null +++ b/deployment/helm/human-connection/templates/service-neo4j.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Release.Name }}-neo4j +spec: + ports: + - name: bolt + port: 7687 + targetPort: 7687 + - name: web + port: 7474 + targetPort: 7474 + selector: + human-connection.org/selector: deployment-neo4j diff --git a/deployment/helm/human-connection/templates/service-webapp.yaml b/deployment/helm/human-connection/templates/service-webapp.yaml new file mode 100644 index 000000000..c1a9771ee --- /dev/null +++ b/deployment/helm/human-connection/templates/service-webapp.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Release.Name }}-webapp +spec: + ports: + - name: web + port: 3000 + targetPort: 3000 + selector: + human-connection.org/selector: deployment-webapp From 18ffafcabce8a46fba55d0b33950847caa95ff1b Mon Sep 17 00:00:00 2001 From: roschaefer Date: Wed, 18 Sep 2019 00:05:00 +0200 Subject: [PATCH 005/171] Assign the neo4j pod at least 1G memory I just went into memory issues when creating all the pods. Neo4j was in a crash loop with exit code 137. Apparently this one: https://success.docker.com/article/what-causes-a-container-to-exit-with-code-137 --- .../human-connection/templates/deployment-neo4j.yaml | 10 +++++----- deployment/helm/human-connection/values.yaml | 6 ++++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/deployment/helm/human-connection/templates/deployment-neo4j.yaml b/deployment/helm/human-connection/templates/deployment-neo4j.yaml index 290f79332..3818af2ef 100644 --- a/deployment/helm/human-connection/templates/deployment-neo4j.yaml +++ b/deployment/helm/human-connection/templates/deployment-neo4j.yaml @@ -27,11 +27,11 @@ spec: ports: - containerPort: 7687 - containerPort: 7474 - # resources: - # requests: - # memory: "2G" - # limits: - # memory: "8G" + resources: + requests: + memory: {{ .Values.neo4jResourceRequestsMemory | default "1G" | quote }} + limits: + memory: {{ .Values.neo4jResourceLimitsMemory | default "1G" | quote }} env: - name: NEO4J_dbms_security_procedures_unrestricted value: "algo.*,apoc.*" diff --git a/deployment/helm/human-connection/values.yaml b/deployment/helm/human-connection/values.yaml index 25a346fae..77d799861 100644 --- a/deployment/helm/human-connection/values.yaml +++ b/deployment/helm/human-connection/values.yaml @@ -9,6 +9,8 @@ smtpUsername: smtpPassword: sentryDsnWebapp: sentryDsnBackend: +neo4jResourceRequestsMemory: "1G" +neo4jResourceLimitsMemory: "1G" neo4jConfig: apoc_import_file_enabled: "true" dbms_memory_pagecache_size: "490M" @@ -21,5 +23,5 @@ privateKeyPassphrase: a7dsf78sadg87ad87sfagsadg78 mapboxToken: pk.eyJ1IjoiaHVtYW4tY29ubmVjdGlvbiIsImEiOiJjajl0cnBubGoweTVlM3VwZ2lzNTNud3ZtIn0.KZ8KK9l70omjXbEkkbHGsQ mongodbUsername: mongodbPassword: -neo4jUsername: -neo4jPassword: +neo4jUsername: neo4j +neo4jPassword: neo4j From c189b620739b9aca1344054ed8dc28c3f5f9cf09 Mon Sep 17 00:00:00 2001 From: roschaefer Date: Wed, 18 Sep 2019 00:19:24 +0200 Subject: [PATCH 006/171] Set app version --- deployment/helm/human-connection/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/helm/human-connection/Chart.yaml b/deployment/helm/human-connection/Chart.yaml index 1cfe9378b..0f303ade0 100644 --- a/deployment/helm/human-connection/Chart.yaml +++ b/deployment/helm/human-connection/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 -appVersion: "1.0" +appVersion: "0.1.0" description: A Helm chart for Human Connection name: human-connection version: 0.1.0 From c8c345be485d0b3516eb6787d8b432c74487d4e7 Mon Sep 17 00:00:00 2001 From: roschaefer Date: Wed, 18 Sep 2019 01:19:06 +0200 Subject: [PATCH 007/171] Fixup bug dath --- deployment/helm/human-connection/templates/configmap.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/helm/human-connection/templates/configmap.yml b/deployment/helm/human-connection/templates/configmap.yml index 8be7b517e..dec2c2bac 100644 --- a/deployment/helm/human-connection/templates/configmap.yml +++ b/deployment/helm/human-connection/templates/configmap.yml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: {{ .Release.Name }}-configmap -dath: +data: GRAPHQL_URI: "http://{{ .Release.Name }}-backend:4000" NEO4J_URI: "bolt://{{ .Release.Name }}-neo4j:7687" CLIENT_URI: "https://{{ .Values.domain }}" From 6e0b7c86e17fff78464aef34726c091b645cb8c9 Mon Sep 17 00:00:00 2001 From: roschaefer Date: Wed, 18 Sep 2019 01:19:50 +0200 Subject: [PATCH 008/171] Conditionally deploy mailserver --- .../human-connection/templates/configmap.yml | 5 +++ .../templates/deployment-mailserver.yaml | 34 +++++++++++++++++++ .../templates/service-mailserver.yaml | 16 +++++++++ deployment/helm/human-connection/values.yaml | 1 + 4 files changed, 56 insertions(+) create mode 100644 deployment/helm/human-connection/templates/deployment-mailserver.yaml create mode 100644 deployment/helm/human-connection/templates/service-mailserver.yaml diff --git a/deployment/helm/human-connection/templates/configmap.yml b/deployment/helm/human-connection/templates/configmap.yml index dec2c2bac..4c57a7e94 100644 --- a/deployment/helm/human-connection/templates/configmap.yml +++ b/deployment/helm/human-connection/templates/configmap.yml @@ -10,5 +10,10 @@ data: SENTRY_DSN_WEBAPP: {{ .Values.sentryDsnWebapp }} SENTRY_DSN_BACKEND: {{ .Values.sentryDsnBackend }} COMMIT: {{ .Values.commit }} +{{- if .Values.developmentMailserverDomain }} + SMTP_HOST: {{ .Release.Name }}-mailserver + SMTP_PORT: "25" +{{- else }} SMTP_HOST: {{ .Values.smtpHost }} SMTP_PORT: {{ .Values.smtpPort }} +{{- end }} diff --git a/deployment/helm/human-connection/templates/deployment-mailserver.yaml b/deployment/helm/human-connection/templates/deployment-mailserver.yaml new file mode 100644 index 000000000..685cabea0 --- /dev/null +++ b/deployment/helm/human-connection/templates/deployment-mailserver.yaml @@ -0,0 +1,34 @@ +{{- if .Values.developmentMailserverDomain }} +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ .Release.Name }}-mailserver +spec: + replicas: 1 + minReadySeconds: 15 + progressDeadlineSeconds: 60 + selector: + matchLabels: + human-connection.org/selector: deployment-mailserver + template: + metadata: + labels: + human-connection.org/selector: deployment-mailserver + name: mailserver + spec: + containers: + - name: mailserver + image: djfarrelly/maildev + imagePullPolicy: {{ .Values.pullPolicy }} + ports: + - containerPort: 80 + - containerPort: 25 + envFrom: + - configMapRef: + name: {{ .Release.Name }}-configmap + - secretRef: + name: {{ .Release.Name }}-secrets + restartPolicy: Always + terminationGracePeriodSeconds: 30 +status: {} +{{- end}} diff --git a/deployment/helm/human-connection/templates/service-mailserver.yaml b/deployment/helm/human-connection/templates/service-mailserver.yaml new file mode 100644 index 000000000..e5e22aa37 --- /dev/null +++ b/deployment/helm/human-connection/templates/service-mailserver.yaml @@ -0,0 +1,16 @@ +{{- if .Values.developmentMailserverDomain }} +apiVersion: v1 +kind: Service +metadata: + name: {{ .Release.Name }}-mailserver +spec: + ports: + - name: web + port: 80 + targetPort: 80 + - name: smtp + port: 25 + targetPort: 25 + selector: + human-connection.org/selector: deployment-mailserver +{{- end}} diff --git a/deployment/helm/human-connection/values.yaml b/deployment/helm/human-connection/values.yaml index 77d799861..6db2f87fd 100644 --- a/deployment/helm/human-connection/values.yaml +++ b/deployment/helm/human-connection/values.yaml @@ -3,6 +3,7 @@ commit: 889a7cdd24dda04a139b2b77d626e984d6db6781 pullPolicy: Always # configs +developmentMailserverDomain: "nitro-mailserver.human-connection.org" smtpHost: "mailserver.human-connection" smtpPort: "25" smtpUsername: From 2363c285e146b8a76864bab1eec0e8d8961fb07e Mon Sep 17 00:00:00 2001 From: roschaefer Date: Wed, 18 Sep 2019 02:12:50 +0200 Subject: [PATCH 009/171] Implement ingress and letsencrypt issuers --- .../templates/ingress.template.yaml | 31 +++++++++++++++++++ .../templates/letsencrypt-prod.yaml | 11 +++++++ .../templates/letsencrypt-staging.yaml | 11 +++++++ deployment/helm/human-connection/values.yaml | 5 ++- 4 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 deployment/helm/human-connection/templates/ingress.template.yaml create mode 100644 deployment/helm/human-connection/templates/letsencrypt-prod.yaml create mode 100644 deployment/helm/human-connection/templates/letsencrypt-staging.yaml diff --git a/deployment/helm/human-connection/templates/ingress.template.yaml b/deployment/helm/human-connection/templates/ingress.template.yaml new file mode 100644 index 000000000..99c3fbb78 --- /dev/null +++ b/deployment/helm/human-connection/templates/ingress.template.yaml @@ -0,0 +1,31 @@ +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ .Release.Name }}-ingress + annotations: + kubernetes.io/ingress.class: "nginx" + certmanager.k8s.io/issuer: {{ .Values.letsencryptIssuer }} + certmanager.k8s.io/acme-challenge-type: http01 + nginx.ingress.kubernetes.io/proxy-body-size: 6m +spec: + tls: + - hosts: + - {{ .Values.humanConnectionDomain }} + secretName: tls + rules: + - host: {{ .Values.humanConnectionDomain }} + http: + paths: + - path: / + backend: + serviceName: webapp + servicePort: 3000 +{{- if .Values.developmentMailserverDomain }} + - host: {{ .Values.developmentMailserverDomain }} + http: + paths: + - path: / + backend: + serviceName: {{ .Release.Name }}-mailserver + servicePort: 80 +{{- end }} diff --git a/deployment/helm/human-connection/templates/letsencrypt-prod.yaml b/deployment/helm/human-connection/templates/letsencrypt-prod.yaml new file mode 100644 index 000000000..9801fb974 --- /dev/null +++ b/deployment/helm/human-connection/templates/letsencrypt-prod.yaml @@ -0,0 +1,11 @@ +apiVersion: certmanager.k8s.io/v1alpha1 +kind: Issuer +metadata: + name: {{ .Release.Name }}-letsencrypt-prod +spec: + acme: + server: https://acme-v02.api.letsencrypt.org/directory + email: {{ .Values.supportEmail }} + privateKeySecretRef: + name: letsencrypt-prod + http01: {} diff --git a/deployment/helm/human-connection/templates/letsencrypt-staging.yaml b/deployment/helm/human-connection/templates/letsencrypt-staging.yaml new file mode 100644 index 000000000..2bb6784a8 --- /dev/null +++ b/deployment/helm/human-connection/templates/letsencrypt-staging.yaml @@ -0,0 +1,11 @@ +apiVersion: certmanager.k8s.io/v1alpha1 +kind: Issuer +metadata: + name: {{ .Release.Name }}-letsencrypt-staging +spec: + acme: + server: https://acme-staging-v02.api.letsencrypt.org/directory + email: {{ .Values.supportEmail }} + privateKeySecretRef: + name: letsencrypt-staging + http01: {} diff --git a/deployment/helm/human-connection/values.yaml b/deployment/helm/human-connection/values.yaml index 6db2f87fd..f5fd5a6aa 100644 --- a/deployment/helm/human-connection/values.yaml +++ b/deployment/helm/human-connection/values.yaml @@ -3,7 +3,10 @@ commit: 889a7cdd24dda04a139b2b77d626e984d6db6781 pullPolicy: Always # configs -developmentMailserverDomain: "nitro-mailserver.human-connection.org" +developmentMailserverDomain: "helm-nitro-mailserver.human-connection.org" +humanConnectionDomain: "helm-staging.human-connection.org" +supportEmail: "developer@human-connection.org" +letsencryptIssuer: "letsencrypt-staging" smtpHost: "mailserver.human-connection" smtpPort: "25" smtpUsername: From b9676271ea1baf158c9f22bbde6210b807e2d917 Mon Sep 17 00:00:00 2001 From: ogerly Date: Thu, 19 Dec 2019 17:46:25 +0100 Subject: [PATCH 010/171] Delete teaser image --- .../ContributionForm/ContributionForm.vue | 19 +++++++++++++++++++ webapp/components/TeaserImage/TeaserImage.vue | 3 ++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/webapp/components/ContributionForm/ContributionForm.vue b/webapp/components/ContributionForm/ContributionForm.vue index eeba47b72..fd54d4948 100644 --- a/webapp/components/ContributionForm/ContributionForm.vue +++ b/webapp/components/ContributionForm/ContributionForm.vue @@ -7,6 +7,12 @@ @submit="submit" >