464 Commits

Author SHA1 Message Date
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
aa799e6f6b Merge branch 'master' of github.com:Human-Connection/Human-Connection into helm 2020-01-28 21:07:17 +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
Robert Schäfer
5cd57a0cc5
docs(deployment): Explain how to setup metrics (#2825)
* docs(deployment): Explain how to setup metrics

close #2411
close #2777

* Update docs with some info I found useful

Co-authored-by: mattwr18 <mattwr18@gmail.com>
2020-01-21 23:19:17 +01:00
roschaefer
7c6d5b5129 fix: Re-enable webfinger feature
Ok, so here is the plan. Let's give both our cucumber features and your
cypress tests a prominent place to live. That would be the root level
folder of our application. Second, let's revive formerly dead code step
by step.

Ie. move code from the former location `backend/features/` to `features/`
when it is ready. All edge cases should be tested with unit tests in
`backend/`, see my `webfinger.spec.js` as an example.
2019-12-02 17:31:56 +01:00
roschaefer
84d3323856 refactor: remove redundant port configuration
If you set GRAPQHL_URI the port is already in there
2019-11-15 11:45:52 +01:00
mattwr18
d105739c0b Update docs for deploying new server, env variables 2019-11-11 11:10:02 +01:00
mattwr18
a02ad972d4 Add documentation for online backups/restoring after disaster 2019-10-03 16:11:52 +02: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
af3bdaef52 Don't create accounts for unverified users 2019-09-17 19:16:56 +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
roschaefer
5555e64f0f Fix #1555 2019-09-13 13:52:54 +02:00
roschaefer
5804b1352c Remove old docker files 2019-09-11 08:43:26 +02:00
roschaefer
cce4ce07df Increase default split size a little 2019-09-05 12:52:20 +02:00
roschaefer
ab96e30bf4 Always pull down the maintenance-worker image 2019-09-05 12:50:47 +02:00
mattwr18
60659626c8 Merge branch 'master' of github.com:Human-Connection/Human-Connection into update-legacy-migration-config 2019-09-05 08:11:01 +02:00
roschaefer
66ed78e19b Remove a lot of unused code, reduce graphql schema 2019-09-05 03:20:32 +02:00
mattwr18
17941678b1 Update export syntax, update maintenance worker/neo4j config
- I was getting an error locally  Failed: error parsing query as Extended JSON: invalid JSON input
- updating the syntax to wrap the json in single quotes, and key/values
in double quotes fixed the issue
- update memory limits
2019-09-04 16:53:13 +02:00
mattwr18
32388549a0 Revert use of variables in cql file
- breaks the import functionality
2019-09-04 16:24:48 +02:00
Wolfgang Huß
0df086e07f Rename variables 2019-09-04 15:38:28 +02:00
mattwr18
9bb0884f89 Follow @alina-beck's PR suggestions
- save regex to descriptive variables
2019-09-03 22:10:02 +02:00
Matt Rider
62e7aee4a3 Revert changes from commit #ca88d1a
- we need to remove the whitespaces first, then check if there are still illegitimate characters in the hashtag before removing them
- this is to maintain the maximum number of hashtags imported from the legacy database as possible
2019-09-02 15:07:22 +02:00
Matt Rider
d1309d2b8f Merge branch 'master' of github.com:Human-Connection/Human-Connection into 1395-hashtags-imported-with-not-allowed-chars 2019-09-02 12:51:11 +02:00
roschaefer
4ea47eafab Move Neo4j configuration in configmap
I think it's beneficial to have these settings in a central location.
That way, we're not running into the danger of overwriting the
`nitro-deployment` by accident with a `kubectl apply -f ...`.
2019-08-30 22:11:12 +02:00
Matt Rider
ca88d1a369 Remove redundant code, simplify import
- follow @Tirokk's suggestion
- good catch!!
2019-08-30 15:21:29 +02:00
mattwr18
f275799856
Merge pull request #1351 from Human-Connection/1333-fix_checks_for_deleted_and_disabled
Fix database import, pagination and counters on user profile page
2019-08-30 13:51:41 +02:00
Matt Rider
ecb32f2c48 Add backslashes to regex contributions.cql 2019-08-29 18:46:46 +02:00
Wolfgang Huß
0bc4c558ae Refactore the import and hashtags to all unicode characters
Co-Authored-By: mattwr18 <mattwr18@gmail.com>
2019-08-29 17:02:02 +02:00
Wolfgang Huß
fe2d21c5c2 Merge branch 'master' of https://github.com/Human-Connection/Human-Connection into 1395-hashtags-imported-with-not-allowed-chars 2019-08-29 09:29:36 +02:00
roschaefer
e4d57f80aa Fix #1333
Ok, so here are multiple issues:
1. In cypher, `NOT NULL` will return `NULL` not `FALSE`. If we want
`FALSE` to be set in the database import, we should use `COAELESCE`
to find the first not-null value.
See:
https://neo4j.com/docs/cypher-manual/current/syntax/working-with-null/
https://markhneedham.com/blog/2017/02/22/neo4j-null-values-even-work/

2. I removed the `disabled` and `deleted` checks on the commented
counter. With `neo4j-graphql-js` it is not possible to filter on the
join models (at least not without a lot of complexity) for disabled or
deleted items. Let's live with the fact that the list of commented posts
will include those posts, where the user has deleted his comment or where
the user's comment was disabled. It's being displayed as "not available"
so I think this is OK for now.

3. De-couple the pagination counters from the "commented", "shouted"
etc. counters. It might be that the list of posts is different for
different users. E.g. if the user has blocked you, the "posts" list
will be empty. The "shouted" or "commented" list will not have the
posts of the author. If you are a moderator, the list will include
disabled posts. So the counters are not in sync with the actual list
coming from the backend. Therefore I implemented "fetch and check if
resultSet < pageSize" instead of a global counter.
2019-08-28 12:57:32 +02:00
Matt Rider
907233cbc9 Increase nginx client max body size, split size legacy migration
- allows the client to send files at least the size we agreed in the vue-dropzone
- we don't need such a small split size as we don't run it on the remote server
2019-08-27 18:03:50 +02:00
Matt Rider
20c625a827 Update broken cypher statement
- I think this does what you want @Tirokk, but let me know if I missed something
- this removes all white spaces in the hashtag, then removes any hashtags that have special characters, or that start with a number, but do not have any letters after
- it does not check that the size is greater or equal to 1 because the regex already removes anything that does not have at least one character
2019-08-27 01:35:28 +02:00
Wolfgang Huß
25bac9a84c Correct the import of tags from the Alpha
Remove the tags which can not be corrected.

Co-Authored-By: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
2019-08-26 18:24:21 +02:00
roschaefer
f206d40e86 Add memory limits to neo4j deployment
I cannot increase the memory above "2G" without getting an error that no
node has capacity for it. So I believe we have to change the kubernetes
cluster if we want to assign more memory to neo4j.

The other settings were suggested to me by neo4j-admin memrec:
https://neo4j.com/docs/operations-manual/current/tools/neo4j-admin-memrec/
2019-08-26 13:03:48 +02:00
Robert Schäfer
89b377fee1
Merge pull request #1281 from Human-Connection/272-add_error_reporting
272 add error reporting
2019-08-20 19:07:49 +02:00
roschaefer
175b187f69 Update the COMMIT env var on every deployment
This should do the trick: First update the configmap, then trigger a
rollout. The new pods should have the update environment variables.
2019-08-20 11:28:41 +02:00
roschaefer
df2949a6ca Configure dbms.security.procedures
Bug:
> apoc.cluster.graph is unavailable because it is sandboxed and has dependencies
> outside of the sandbox. Sandboxing is controlled by the
> dbms.security.procedures.unrestricted setting

See: https://stackoverflow.com/a/48773575
2019-08-19 22:08:53 +02:00
roschaefer
fcb944b7c4 Add documentation to setup error reporting 2019-08-19 21:21:51 +02:00
mattwr18
90e5579cab
Merge pull request #1278 from Human-Connection/fix_hashtag_db_import
Fix hashtag db import
2019-08-16 14:37:09 +02:00