From cdf92cc6eaa8061703abf321d6bd5ce12d6b2460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Mon, 4 Feb 2019 15:36:39 +0100 Subject: [PATCH] Remove obsolete kubernetes folder --- kubernetes/README.md | 51 ------------------- kubernetes/backend-deployment.yaml | 41 --------------- kubernetes/backend-service.json | 35 ------------- kubernetes/dashboard-admin.yml | 14 ----- .../neo4j-data-persistentvolumeclaim.yaml | 14 ----- kubernetes/neo4j-deployment.yaml | 40 --------------- kubernetes/neo4j-service.json | 43 ---------------- 7 files changed, 238 deletions(-) delete mode 100644 kubernetes/README.md delete mode 100644 kubernetes/backend-deployment.yaml delete mode 100644 kubernetes/backend-service.json delete mode 100644 kubernetes/dashboard-admin.yml delete mode 100644 kubernetes/neo4j-data-persistentvolumeclaim.yaml delete mode 100644 kubernetes/neo4j-deployment.yaml delete mode 100644 kubernetes/neo4j-service.json diff --git a/kubernetes/README.md b/kubernetes/README.md deleted file mode 100644 index ffbf225b2..000000000 --- a/kubernetes/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# Usage with minikube -Assuming you installed the packages git, docker ([all-distributions](https://docs.docker.com/install/)), minikube ([ubuntu]([minikube](https://computingforgeeks.com/how-to-install-minikube-on-ubuntu-18-04/)), [all-distributions](https://kubernetes.io/docs/tasks/tools/install-minikube/)) and virtualbox here... - -First of all start minikube on your machine: -```sh -minikube start -``` - -You can always get an overview and see what's going on with your minikube: -```sh -minikube dashboard -``` - -From now on stay in your favorite work directory. First let's clone the necessary sources: -```sh -git clone https://github.com/Human-Connection/Nitro-Backend.git -git clone https://github.com/Human-Connection/Nitro-Web.git -``` - -Build Docker images, using the Minikube Docker daemon: -```sh -eval $(minikube docker-env) -docker build -t humanconnection/nitro-backend:latest Nitro-Backend/ -docker build -t humanconnection/neo4j:latest -f Nitro-Backend/Dockerfile.neo4j Nitro-Backend/ -``` - -Check that the image is in Minikube’s Docker registry: -```sh -minikube ssh docker images -``` - -Now change into directory Nitro-Backend/kubernetes and create services and deployments: -```sh -cd Nitro-Backend/kubernetes -kubectl create -f neo4j-deployment.yaml,neo4j-data-persistentvolumeclaim.yaml,backend-deployment.yaml,neo4j-service.json,backend-service.json -``` - -You can see the backend in action with: -```sh -minikube service backend -``` - -### Troubleshoot - -1. If you get an error message along th lines of 'The vboxdrv kernel module is not loaded.' - then you have the same issue i had. to solve this you need to install the propper linux kernel host modules package. Here an example for Manjaro: -https://forum.manjaro.org/t/installing-virtualbox-kernel-modules/6999 -2. When you can not start minikube, try also to remove the cluster with `minikube delete` and start again with `minikube start`. Sometimes this fix startup problems of the cluster. -3. Now again you might run into trouble with an error like 'kubectl could not be found on your path.' In this case run the following command: - ```sh - curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.10.0/bin/linux/amd64/kubectl && chmod +x kubectl && sudo cp kubectl /usr/local/bin/ && rm kubectl - ``` diff --git a/kubernetes/backend-deployment.yaml b/kubernetes/backend-deployment.yaml deleted file mode 100644 index f75920f0d..000000000 --- a/kubernetes/backend-deployment.yaml +++ /dev/null @@ -1,41 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - kompose.cmd: kompose convert -f ../docker-compose.yml - kompose.version: 1.16.0 (0c01309) - creationTimestamp: null - labels: - io.kompose.service: backend - name: backend -spec: - replicas: 1 - strategy: {} - template: - metadata: - creationTimestamp: null - labels: - io.kompose.service: backend - spec: - containers: - - env: - - name: CLIENT_URI - value: http://localhost:3000 - - name: GRAPHQL_PORT - value: "4000" - - name: GRAPHQL_URI - value: http://localhost:4000 - - name: JWT_SECRET - value: b/&&7b78BF&fv/Vd - - name: MOCK - value: "false" - - name: NEO4J_URI - value: bolt://neo4j:7687 - image: humanconnection/nitro-backend:latest - name: backend - ports: - - containerPort: 4000 - resources: {} - imagePullPolicy: IfNotPresent - restartPolicy: Always -status: {} diff --git a/kubernetes/backend-service.json b/kubernetes/backend-service.json deleted file mode 100644 index 28581be45..000000000 --- a/kubernetes/backend-service.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "kind": "Service", - "apiVersion": "v1", - "metadata": { - "name": "backend", - "namespace": "default", - "selfLink": "/api/v1/namespaces/default/services/backend", - "uid": "57749bc1-dea3-11e8-ace2-080027b5d96d", - "resourceVersion": "8321", - "creationTimestamp": "2018-11-02T13:29:36Z", - "labels": { - "io.kompose.service": "backend" - } - }, - "spec": { - "ports": [ - { - "protocol": "TCP", - "port": 4000, - "targetPort": 4000, - "nodePort": 32633 - } - ], - "selector": { - "io.kompose.service": "backend" - }, - "clusterIP": "10.110.129.92", - "type": "LoadBalancer", - "sessionAffinity": "None", - "externalTrafficPolicy": "Cluster" - }, - "status": { - "loadBalancer": {} - } -} diff --git a/kubernetes/dashboard-admin.yml b/kubernetes/dashboard-admin.yml deleted file mode 100644 index 5d76d3902..000000000 --- a/kubernetes/dashboard-admin.yml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - name: kubernetes-dashboard - labels: - k8s-app: kubernetes-dashboard -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: cluster-admin -subjects: -- kind: ServiceAccount - name: kubernetes-dashboard - namespace: kube-system diff --git a/kubernetes/neo4j-data-persistentvolumeclaim.yaml b/kubernetes/neo4j-data-persistentvolumeclaim.yaml deleted file mode 100644 index de9c89e2f..000000000 --- a/kubernetes/neo4j-data-persistentvolumeclaim.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - creationTimestamp: null - labels: - io.kompose.service: neo4j-data - name: neo4j-data -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Mi -status: {} diff --git a/kubernetes/neo4j-deployment.yaml b/kubernetes/neo4j-deployment.yaml deleted file mode 100644 index 13f4d52e3..000000000 --- a/kubernetes/neo4j-deployment.yaml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - annotations: - kompose.cmd: kompose convert -f ../docker-compose.yml - kompose.version: 1.16.0 (0c01309) - creationTimestamp: null - labels: - io.kompose.service: neo4j - name: neo4j -spec: - replicas: 1 - strategy: - type: Recreate - template: - metadata: - creationTimestamp: null - labels: - io.kompose.service: neo4j - spec: - containers: - - env: - - name: NEO4J_AUTH - value: none - image: humanconnection/neo4j:latest - name: neo4j - ports: - - containerPort: 7687 - - containerPort: 7474 - resources: {} - imagePullPolicy: IfNotPresent - volumeMounts: - - mountPath: /data - name: neo4j-data - restartPolicy: Always - volumes: - - name: neo4j-data - persistentVolumeClaim: - claimName: neo4j-data -status: {} diff --git a/kubernetes/neo4j-service.json b/kubernetes/neo4j-service.json deleted file mode 100644 index 89ac10367..000000000 --- a/kubernetes/neo4j-service.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "kind": "Service", - "apiVersion": "v1", - "metadata": { - "name": "neo4j", - "namespace": "default", - "selfLink": "/api/v1/namespaces/default/services/neo4j", - "uid": "57de6181-dea3-11e8-ace2-080027b5d96d", - "resourceVersion": "8326", - "creationTimestamp": "2018-11-02T13:29:37Z", - "labels": { - "io.kompose.service": "neo4j" - } - }, - "spec": { - "ports": [ - { - "name": "port-1", - "protocol": "TCP", - "port": 7687, - "targetPort": 7687, - "nodePort": 30116 - }, - { - "name": "port-2", - "protocol": "TCP", - "port": 7474, - "targetPort": 7474, - "nodePort": 32658 - } - ], - "selector": { - "io.kompose.service": "neo4j" - }, - "clusterIP": "10.108.175.122", - "type": "LoadBalancer", - "sessionAffinity": "None", - "externalTrafficPolicy": "Cluster" - }, - "status": { - "loadBalancer": {} - } -}