44 Commits

Author SHA1 Message Date
Robert Schäfer
628b57aa29
feat(other): major improvement of deployment (#7925)
* feat(other): major improvement of deployment

Motivation
----------

Kubernetes:
* backend becomes a statefulset (exclusive volume mount)
  See: https://spacelift.io/blog/statefulset-vs-deployment
* implement neo4j backup with job

Docker:
* consistent targets across all dockerfiles
* remove redundant labels
* remove unnecessary build args
* remove obsolete networks
* remove development dependencies for production

Rebranding:
* add image tags for local tagging and pulling
* use Github's docker build workflows
* use Github container registry
* ONBUILD to simplify caller Dockerfiles
* docker compose for branding

Tooling:
* same node --version as in dockerfile

Docs:
* missing step in README.md

* refactor: remove submodules

It's better to keep them all in a separate repository

* improve kubernetes chart

* better image tag defaults
* split neo4j into its own chart (for re-use)
* use application defaults where possible

* optional resources for all pods

* remove obsolete key/value pair from secrets

* remove obsolete build argsand

and add labels for neo4j enterprise

* env vars for webapp

* allow to define redirect domains

Define a list of Domains that redirect to the domain of the project. The
idea is to provide the ability to redirect eg. www.domain.tld to
domain.tld

* remove maintenance part regarding database

* move backup job outside template folder

* name the ingress

* updated ingress

* handle empty case of middlewares

* try to default the ingress

* use quote

* restore todo-next-update

* fix docu check

* fix naming

* try using prod:migrate

* try using override config

* copy src folder

* try using base as image instead of build

* fix test build

* force build

* comment for the problem

* fix webapp tests (potentially)

---------

Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
2025-02-28 18:22:23 +01:00
208b893bef
removed all deployment scripts (moved to rebranding repo) 2021-02-25 19:06:34 +01:00
289e62ddb4
corrected image & service names 2021-01-22 14:14:34 +01:00
Wolfgang Huß
be62c7d284 Rename back letsencrypt-XXX ClusterIssuer and files 2020-12-13 17:07:51 +01:00
Wolfgang Huß
1b01d35c8d Refactor ingress.yaml(s) and issuer.yaml(S) 2020-12-13 15:18:17 +01:00
Wolfgang Huß
fe6f052ded Replace deployment labels and selectors 2020-12-08 09:50:19 +01:00
Wolfgang Huß
62646df4f8 Replace URI 2020-12-08 09:43:56 +01:00
Wolfgang Huß
ea27a1bddc Rename several
- mailserver.human-connection  —>  mail.ocelot.social
- letsencrypt-staging  —>  letsencrypt-develop
- letsencrypt-prod  —>  letsencrypt-production
- Renamed files.
2020-12-03 17:15:44 +01:00
Wolfgang Huß
d92c5c5356 Rename namespace: human-connection and name: human-connection 2020-12-03 13:11:18 +01:00
Moriz Wahl
af54ec3704 further changes requested by Tirokk 2020-12-01 10:46:41 +01:00
Moriz Wahl
e47671c52a further changed requested by Tirokk 2020-11-24 19:10:46 +01:00
Moriz Wahl
ecb0bb3766 Starting rebranding to ocelot.social 2020-11-10 12:08:44 +01:00
Moriz Wahl
bd962bbfcc merging rebranding branch from / 2020-11-10 10:28:20 +01:00
Wolfgang Huß
da91be2136 Change docker repository to develop-maintenance
- maintenance  —>  develop-maintenance
2020-10-29 11:14:09 +01:00
Wolfgang Huß
a1e4a5bf5f Change docker repository to develop-neo4j
- neo4j  —>  develop-neo4j
2020-10-29 10:39:09 +01:00
Wolfgang Huß
13c70903e1 Change docker repository to develop-backend
- nitro-backend  —>  develop-backend
2020-10-28 10:59:36 +01:00
Wolfgang Huß
b6c8acab36 Change docker repository to develop-webapp
- nitro-web  —>  develop-webapp
2020-10-28 10:52:07 +01:00
Wolfgang Huß
360f545fb7 Change docker account
- humanconnection  —>  ocelotsocialnetwork
2020-10-28 10:36:14 +01:00
roschaefer
23ae569509 Rename dockerhub organizations
..plus get rid of obsolete prefix `nitro-`.
2020-06-04 13:04:05 +02:00
mattwr18
8773589d82 Add develop mailserver, upgrade version 2020-02-11 11:57:25 +01:00
mattwr18
8f6d71e4be Update helm charts 2020-02-10 10:46:55 +01:00
mattwr18
5fad1bb628 Update to version 0.3.0, version image in webapp 2020-02-04 15:46:08 +01:00
mattwr18
b9e5686860 Add basic documentation for Helm deploy 2020-01-31 15:32:33 +01:00
mattwr18
9f3f6cfe02 Set up PVC with helm!!
- It turns out we can set it up with helm, it was just an issue with not
  starting with a clean slate. I guess it probably would have been
better to just set it up from scratch and deleted the develop server,
like we intend to do in production.
2020-01-30 21:02:27 +01:00
mattwr18
baf3b7818d Escape double quotes to deploy configmap
- It was failing without them... also ACCEPT_LICENSE_AGREEMENT wasn't
  set properly using .Values
2020-01-30 21:00:56 +01:00
mattwr18
8647cba648 Temporarily use latest image for migration job
- it hasn't been deployed yet, therefore is not in any versioned image
2020-01-30 20:59:56 +01:00
mattwr18
4cbe8a2c5a Update deployments following Helm best practices
- image is set configurable and set to the app version for version
  control
- imagePullPolicy revert earlier changes to flatten hierarchy since helm
  create uses .Values.image.pullPolicy
- update imagePullPolicy to IfNotPresent since this is the default with
  helm create and fits with our strategy as well.
- Source, https://helm.sh/docs/topics/chart_best_practices/pods/
2020-01-30 17:39:13 +01:00
mattwr18
7472a0bc72 Add labels following Helm best practices
- There are 4 recommended labels, and one optional that were added.
- Source, https://helm.sh/docs/topics/chart_best_practices/labels/
2020-01-30 17:20:15 +01:00
mattwr18
43753e52f2 Rename Job file following Helm best practices
- "Template file names should reflect the resource kind in the name."
- Source, https://helm.sh/docs/topics/chart_best_practices/templates/#structure-of-templates
2020-01-30 16:48:36 +01:00
mattwr18
2e6dfbbd42 Refactor values.yaml following Helm best practices
- Variables should use camel case.
- Favor flat hierarchy over nested.
- "Every defined property in values.yaml should be documented. The
  documentation string should begin with the name of the property it
describes, and then give at least a one-sentence description."
- Source, https://helm.sh/docs/topics/chart_best_practices/values/
2020-01-30 16:37:12 +01:00
mattwr18
c3548e5d8d Add db-migrations-job, not working yet 2020-01-30 15:50:51 +01:00
mattwr18
a74abbb053 Reorganize helm charts, add lifecycle hooks
- remove namespace, since it's best practice to use the cli to add it,
  @roschaefer points out
- organize templates into directories
- migrations should be ran after the backend has started...
- should init really be ran every time??
2020-01-29 20:39:47 +01:00
mattwr18
6a1079ac42 Clean up 2020-01-28 21:05:26 +01:00
mattwr18
1c10f3769c Drop nitro prefix 2020-01-28 20:57:55 +01:00
mattwr18
b05e997743 Update templates and deploy to develop
- proof of concept that this works!
2020-01-28 20:55:08 +01:00
roschaefer
2363c285e1 Implement ingress and letsencrypt issuers 2019-09-18 02:13:20 +02:00
roschaefer
6e0b7c86e1 Conditionally deploy mailserver 2019-09-18 02:13:20 +02:00
roschaefer
c8c345be48 Fixup bug dath 2019-09-18 02:13:20 +02:00
roschaefer
c189b62073 Set app version 2019-09-18 02:13:20 +02:00
roschaefer
18ffafcabc 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
2019-09-18 02:13:19 +02:00
roschaefer
fccf53a176 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 ☝️
2019-09-18 02:13:19 +02:00
roschaefer
a2a71975ab Templates for webapp+neo4j, use camelCase 2019-09-17 22:22:14 +02:00
roschaefer
caf2bc79cf Start to write a helm chart for Human Connection 2019-09-17 13:47:51 +02:00
roschaefer
889a7cdd24 Intermediate commit 2019-09-17 02:20:24 +02:00