Skip to content

Commit db580de

Browse files
committed
Basic Kubernetes install
1 parent 716fb06 commit db580de

24 files changed

Lines changed: 2398 additions & 1 deletion

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,6 @@ jspm_packages/
3838

3939
datamodels.md
4040
datamodels.context-ngsi.jsonld
41-
datamodels.context.jsonld
41+
datamodels.context.jsonld
42+
43+
Chart.lock

kubernetes/mongodb/Chart.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: v2
2+
name: mongo-db
3+
description: Chart holder for argo-cd
4+
5+
type: application
6+
version: 0.1.0
7+
appVersion: "4.4.12"
8+
9+
dependencies:
10+
- name: mongodb
11+
version: 12.1.31
12+
repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami

kubernetes/mongodb/values.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
mongodb:
2+
auth:
3+
enabled: true
4+
existingSecret: mongodb-secret
5+
6+
architecture: standalone
7+
podSecurityContext:
8+
enabled: false
9+
containerSecurityContext:
10+
enabled: false
11+
resources:
12+
limits:
13+
cpu: 400m
14+
memory: 1024Mi
15+
requests:
16+
cpu: 400m
17+
memory: 1024Mi
18+
persistence:
19+
enabled: true
20+
size: 8Gi

kubernetes/orion-ld-down.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
#
3+
# Command Line Interface to start all services associated with the Getting-Started Tutorial
4+
#
5+
# For this tutorial the commands are merely a convenience script to run kubernetes
6+
#
7+
8+
set -e
9+
10+
helm uninstall mongodb-orion
11+
helm uninstall orion-ld orion-ld

kubernetes/orion-ld.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
#
3+
# Command Line Interface to start all services associated with the Getting-Started Tutorial
4+
#
5+
# For this tutorial the commands are merely a convenience script to run kubernetes
6+
#
7+
8+
set -e
9+
10+
helm repo add bitnami_legacy https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
11+
12+
kubectl apply -f ./secrets/mongodb.yaml
13+
helm dependency build mongodb
14+
helm install mongodb-orion mongodb
15+
16+
helm dependency build orion-ld
17+
helm install orion-ld orion-ld

kubernetes/orion-ld/Chart.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: v2
2+
name: orion-ld
3+
description: Chart holder for argo-cd
4+
5+
type: application
6+
version: 0.1.0
7+
appVersion: "1.0.1"
8+
9+
dependencies:
10+
- name: orion-ld
11+
version: 1.0.2
12+
repository: file://./charts/orion-ld
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
annotations:
2+
charts.openshift.io/name: orion-ld
3+
apiVersion: v2
4+
appVersion: 1.0.1
5+
description: A Helm chart for running the fiware orion-ld context broker on kubernetes.
6+
home: https://github.com/FIWARE/context.Orion-LD
7+
icon: https://fiware.github.io/catalogue/img/fiware.png
8+
keywords:
9+
- fiware
10+
- orion-ld
11+
kubeVersion: '>= 1.19'
12+
maintainers:
13+
- email: stefan.wiedemann@fiware.org
14+
name: wistefan
15+
name: orion-ld
16+
sources:
17+
- https://github.com/FIWARE/context.Orion-LD
18+
version: 1.0.2
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# orion-ld
2+
3+
![Version: 1.0.2](https://img.shields.io/badge/Version-1.0.2-informational?style=flat-square) ![AppVersion: 1.0.1](https://img.shields.io/badge/AppVersion-1.0.1-informational?style=flat-square)
4+
5+
A Helm chart for running the fiware orion-ld context broker on kubernetes.
6+
7+
**Homepage:** <https://github.com/FIWARE/context.Orion-LD>
8+
9+
## Maintainers
10+
11+
| Name | Email | Url |
12+
| ---- | ------ | --- |
13+
| wistefan | stefan.wiedemann@fiware.org | |
14+
15+
## Source Code
16+
17+
* <https://github.com/FIWARE/context.Orion-LD>
18+
19+
## Requirements
20+
21+
Kubernetes: `>= 1.19`
22+
23+
## Values
24+
25+
| Key | Type | Default | Description |
26+
|-----|------|---------|-------------|
27+
| autoscaling.enabled | bool | `false` | should autoscaling be enabled for the context broker |
28+
| autoscaling.maxReplicas | int | `10` | maximum number of running pods |
29+
| autoscaling.metrics | list | `[]` | metrics to react on |
30+
| autoscaling.minReplicas | int | `1` | minimum number of running pods |
31+
| broker.cachedContextFolder | string | `"/opt/orion/ldcontexts"` | |
32+
| broker.db.hosts | list | `[]` | configuration of the mongo-db hosts. if multiple hosts are inserted, its assumed that mongo is running as a replica set |
33+
| broker.db.name | string | `"orion"` | the db to use. if running in multiservice mode, its used as a prefix. |
34+
| broker.envPrefix | string | `"ORIONLD_"` | Prefix to be used for env-vars in orion. Must be ORION_ for orion and ORIONLD_ for orion-ld |
35+
| broker.ipv4enabled | bool | `false` | set to true if only ipv4 should be used, do not set both options to true |
36+
| broker.ipv6enabled | bool | `false` | set to true if only ipv6 should be used, do not set both options to true |
37+
| broker.logging.level | string | `"WARN"` | log level of the broker |
38+
| broker.metrics.enabled | string | `"false"` | enable or disable metrics gathering |
39+
| broker.noDevTrace | bool | `true` | should the extended development tracing be disabled? |
40+
| broker.port | int | `1026` | port that the broker is listening to |
41+
| broker.troe | object | `{"dbHost":"postgres","dbPassword":"password","dbPort":5432,"dbUser":"user","enabled":false}` | configuration of temporal entity representation |
42+
| broker.troe.dbHost | string | `"postgres"` | host of the postgres to be used |
43+
| broker.troe.dbPassword | string | `"password"` | password to authenticate with at postgres |
44+
| broker.troe.dbPort | int | `5432` | port of the postgres to be used |
45+
| broker.troe.dbUser | string | `"user"` | username to authenticate with at postgres |
46+
| broker.troe.enabled | bool | `false` | should temporal representation of entities be enabled |
47+
| deployment.additionalAnnotations | object | `{}` | additional annotations for the deployment, if required |
48+
| deployment.additionalLabels | object | `{}` | additional labels for the deployment, if required |
49+
| deployment.affinity | object | `{}` | affinity template ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity |
50+
| deployment.image.pullPolicy | string | `"IfNotPresent"` | specification of the image pull policy |
51+
| deployment.image.repository | string | `"quay.io/fiware/orion-ld"` | orion image name ref: https://hub.docker.com/r/fiware/orion/ ref: https://quay.io/repository/fiware/orion-ld |
52+
| deployment.image.tag | string | `"1.0.1"` | tag of the image to be used |
53+
| deployment.livenessProbe.initialDelaySeconds | int | `30` | |
54+
| deployment.livenessProbe.periodSeconds | int | `10` | |
55+
| deployment.livenessProbe.successThreshold | int | `1` | |
56+
| deployment.livenessProbe.timeoutSeconds | int | `30` | |
57+
| deployment.nodeSelector | object | `{}` | selector template ref: https://kubernetes.io/docs/user-guide/node-selection/ |
58+
| deployment.readinessProbe.initialDelaySeconds | int | `30` | |
59+
| deployment.readinessProbe.periodSeconds | int | `10` | |
60+
| deployment.readinessProbe.successThreshold | int | `1` | |
61+
| deployment.readinessProbe.timeoutSeconds | int | `30` | |
62+
| deployment.replicaCount | int | `1` | initial number of target replications, can be different if autoscaling is enabled |
63+
| deployment.revisionHistoryLimit | int | `3` | number of old replicas to be retained |
64+
| deployment.sidecars | list | `[]` | additional sidepods for the deployment, if required |
65+
| deployment.tolerations | list | `[]` | tolerations template ref: ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ |
66+
| deployment.updateStrategy.rollingUpdate | object | `{"maxSurge":1,"maxUnavailable":0}` | new pods will be added gradually |
67+
| deployment.updateStrategy.rollingUpdate.maxSurge | int | `1` | number of pods that can be created above the desired amount while updating |
68+
| deployment.updateStrategy.rollingUpdate.maxUnavailable | int | `0` | number of pods that can be unavailable while updating |
69+
| deployment.updateStrategy.type | string | `"RollingUpdate"` | type of the update |
70+
| deployment.volumes | list | `[]` | additional volumes for the deployment, if required |
71+
| fullnameOverride | string | `""` | option to override the fullname config in the _helpers.tpl |
72+
| ingress.annotations | object | `{}` | annotations to be added to the ingress |
73+
| ingress.enabled | bool | `false` | should there be an ingress to connect orion with the public internet |
74+
| ingress.hosts | list | `[]` | all hosts to be provided |
75+
| ingress.tls | list | `[]` | configure the ingress' tls |
76+
| mongo.enabled | bool | `true` | should mongodb be enabled |
77+
| mongo.image.pullPolicy | string | `"IfNotPresent"` | pull policy to be used for mongo |
78+
| mongo.image.repository | string | `"quay.io/opencloudio/ibm-mongodb"` | mongo image name |
79+
| mongo.image.tag | string | `"4.0.24"` | version of mongo |
80+
| mongo.port | int | `27017` | port to make mongo accessible at |
81+
| nameOverride | string | `""` | option to override the name config in the _helpers.tpl |
82+
| route.annotations | object | `{}` | annotations to be added to the route |
83+
| route.enabled | bool | `false` | |
84+
| route.tls | object | `{}` | tls configuration for the route |
85+
| service.annotations | object | `{}` | addtional annotations, if required |
86+
| service.port | int | `1026` | port to be used by the service |
87+
| service.type | string | `"ClusterIP"` | service type |
88+
| serviceAccount | object | `{"create":false}` | if a orion specific service account should be used, it can be configured here ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ |
89+
| serviceAccount.create | bool | `false` | specifies if the account should be created |
90+
91+
----------------------------------------------
92+
Autogenerated from chart metadata using [helm-docs v1.6.0](https://github.com/norwoodj/helm-docs/releases/v1.6.0)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Successfully deployed Orion-LD.
2+
3+
Connect at {{ include "orion.fullname" . }}.{{ .Release.Namespace }}:{{ .Values.service.port }}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
2+
{{/* vim: set filetype=mustache: */}}
3+
{{/*
4+
Expand the name of the chart.
5+
*/}}
6+
{{- define "orion.name" -}}
7+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
8+
{{- end -}}
9+
10+
{{/*
11+
Create a default fully qualified app name.
12+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
13+
If release name contains chart name it will be used as a full name.
14+
*/}}
15+
{{- define "orion.fullname" -}}
16+
{{- if .Values.fullnameOverride -}}
17+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
18+
{{- else -}}
19+
{{- $name := default .Chart.Name .Values.nameOverride -}}
20+
{{- if contains $name .Release.Name -}}
21+
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
22+
{{- else -}}
23+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
24+
{{- end -}}
25+
{{- end -}}
26+
{{- end -}}
27+
{{/*
28+
Create chart name and version as used by the chart label.
29+
*/}}
30+
{{- define "orion.chart" -}}
31+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
32+
{{- end -}}
33+
34+
{{/*
35+
Create the name of the service account to use
36+
*/}}
37+
{{- define "orion.serviceAccountName" -}}
38+
{{- if .Values.serviceAccount.create -}}
39+
{{ default (include "orion.fullname" .) .Values.serviceAccount.name }}
40+
{{- else -}}
41+
{{ default "default" .Values.serviceAccount.name }}
42+
{{- end -}}
43+
{{- end -}}
44+
45+
{{/*
46+
Common labels
47+
*/}}
48+
{{- define "orion.labels" -}}
49+
app.kubernetes.io/name: {{ include "orion.name" . }}
50+
helm.sh/chart: {{ include "orion.chart" . }}
51+
app.kubernetes.io/instance: {{ .Release.Name }}
52+
{{- if .Chart.AppVersion }}
53+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
54+
{{- end }}
55+
app.kubernetes.io/managed-by: {{ .Release.Service }}
56+
{{- end -}}

0 commit comments

Comments
 (0)