Change docker repository to develop-neo4j

- nitro-neo4j  —>  develop-neo4j
This commit is contained in:
Wolfgang Huß 2020-10-28 11:10:41 +01:00
parent 13c70903e1
commit 884e876208
5 changed files with 15 additions and 15 deletions

View File

@ -5,7 +5,7 @@
SMTP_HOST: "mailserver.human-connection"
SMTP_PORT: "25"
GRAPHQL_URI: "http://develop-backend.human-connection:4000"
NEO4J_URI: "bolt://nitro-neo4j.human-connection:7687"
NEO4J_URI: "bolt://develop-neo4j.human-connection:7687"
NEO4J_AUTH: "none"
CLIENT_URI: "https://nitro-staging.human-connection.org"
NEO4J_apoc_import_file_enabled: "true"

View File

@ -44,10 +44,10 @@ Then temporarily delete backend and database deployments
$ kubectl --namespace=human-connection get deployments
NAME READY UP-TO-DATE AVAILABLE AGE
develop-backend 1/1 1 1 3d11h
nitro-neo4j 1/1 1 1 3d11h
develop-neo4j 1/1 1 1 3d11h
develop-webapp 2/2 2 2 73d
$ kubectl --namespace=human-connection delete deployment nitro-neo4j
deployment.extensions "nitro-neo4j" deleted
$ kubectl --namespace=human-connection delete deployment develop-neo4j
deployment.extensions "develop-neo4j" deleted
$ kubectl --namespace=human-connection delete deployment develop-backend
deployment.extensions "develop-backend" deleted
```

View File

@ -29,7 +29,7 @@ database connections left and nobody can access the application.
Run the following:
```sh
kubectl --namespace=human-connection edit deployment nitro-neo4j
kubectl --namespace=human-connection edit deployment develop-neo4j
```
Add the following to `spec.template.spec.containers`:
@ -61,7 +61,7 @@ exit
# Download the file from the pod to your computer.
kubectl cp human-connection/<POD-ID>:/root/neo4j-backup ./neo4j-backup
```
Revert your changes to deployment `nitro-neo4j` which will restart the database.
Revert your changes to deployment `develop-neo4j` which will restart the database.
## Restore a Backup in Kubernetes
@ -79,4 +79,4 @@ kubectl --namespace=human-connection exec -it <POD-ID> bash
neo4j-admin load --from=/root/neo4j-backup --force
exit
```
Revert your changes to deployment `nitro-neo4j` which will restart the database.
Revert your changes to deployment `develop-neo4j` which will restart the database.

View File

@ -7,7 +7,7 @@ database in a kubernetes cluster.
One of the benefits of doing an online backup is that the Neo4j database does not need to be stopped, so there is no downtime. Read [the docs](https://neo4j.com/docs/operations-manual/current/backup/performing/)
To use Neo4j Enterprise you must add this line to your configmap, if using, or your deployment `nitro-neo4j` env.
To use Neo4j Enterprise you must add this line to your configmap, if using, or your deployment `develop-neo4j` env.
```
NEO4J_ACCEPT_LICENSE_AGREEMENT: "yes"
@ -15,18 +15,18 @@ NEO4J_ACCEPT_LICENSE_AGREEMENT: "yes"
## Create a Backup in Kubernetes
```sh
# Backup the database with one command, this will get the nitro-neo4j pod, ssh into it, and run the backup command
kubectl -n=human-connection exec -it $(kubectl -n=human-connection get pods | grep nitro-neo4j | awk '{ print $1 }') -- neo4j-admin backup --backup-dir=/var/lib/neo4j --name=neo4j-backup
# Backup the database with one command, this will get the develop-neo4j pod, ssh into it, and run the backup command
kubectl -n=human-connection exec -it $(kubectl -n=human-connection get pods | grep develop-neo4j | awk '{ print $1 }') -- neo4j-admin backup --backup-dir=/var/lib/neo4j --name=neo4j-backup
# Download the file from the pod to your computer.
kubectl cp human-connection/$(kubectl -n=human-connection get pods | grep nitro-neo4j | awk '{ print $1 }'):/var/lib/neo4j/neo4j-backup ./neo4j-backup/
kubectl cp human-connection/$(kubectl -n=human-connection get pods | grep develop-neo4j | awk '{ print $1 }'):/var/lib/neo4j/neo4j-backup ./neo4j-backup/
```
You should now have a backup of the database locally. If you want, you can simulate disaster recovery by sshing into the nitro-neo4j pod, deleting all data and restoring from backup
You should now have a backup of the database locally. If you want, you can simulate disaster recovery by sshing into the develop-neo4j pod, deleting all data and restoring from backup
## Disaster where database data is gone somehow
```sh
kubectl -n=human-connection exec -it $(kubectl -n=human-connection get pods | grep nitro-neo4j |awk '{ print $1 }') bash
kubectl -n=human-connection exec -it $(kubectl -n=human-connection get pods | grep develop-neo4j |awk '{ print $1 }') bash
# Enter cypher-shell
cypher-shell
# Delete all data
@ -54,4 +54,4 @@ kubectl --namespace=human-connection exec -it <POD-ID> bash
neo4j-admin restore --from=/root/neo4j-backup --force
exit
```
Revert your changes to deployment `nitro-neo4j` which will restart the database.
Revert your changes to deployment `develop-neo4j` which will restart the database.

View File

@ -66,7 +66,7 @@ You should see the persistent volumes at the end of the log:
Restic Backups:
Completed:
human-connection/develop-backend-5b6dd96d6b-q77n6: uploads
human-connection/nitro-neo4j-686d768598-z2vhh: neo4j-data
human-connection/develop-neo4j-686d768598-z2vhh: neo4j-data
```
## Simulate a Disaster