Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NOISSUE - Update Kubernetes setup (#322)
* Add InfluxDB writer services setup to k8s Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com> * Remove commented NginX config Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
- Loading branch information
1 parent
426f59d
commit 993398b
Showing
5 changed files
with
145 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
apiVersion: apps/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: mainflux-grafana | ||
labels: | ||
component: mainflux-grafana | ||
spec: | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
component: mainflux-grafana | ||
spec: | ||
containers: | ||
- name: mainflux-grafana | ||
image: grafana/grafana:5.1.3 | ||
imagePullPolicy: Always | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: mainflux-grafana | ||
labels: | ||
component: mainflux-grafana | ||
spec: | ||
selector: | ||
component: mainflux-grafana | ||
ports: | ||
- port: 3001 | ||
targetPort: 3000 | ||
type: LoadBalancer | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolume | ||
metadata: | ||
name: mainflux-influxdb-data-disk | ||
labels: | ||
name: mainflux-influxdb-data-disk | ||
spec: | ||
capacity: | ||
storage: 10Gi | ||
accessModes: | ||
- ReadWriteOnce | ||
hostPath: | ||
path: /tmp/data/influxdb-0 | ||
persistentVolumeReclaimPolicy: Recycle | ||
--- | ||
kind: PersistentVolumeClaim | ||
apiVersion: v1 | ||
metadata: | ||
name: mainflux-influxdb-data-claim | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 10Gi | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: mainflux-influxdb | ||
labels: | ||
name: mainflux-influxdb | ||
spec: | ||
containers: | ||
- name: mainflux-influxdb | ||
image: influxdb:1.5.2-alpine | ||
env: | ||
- name: INFLUXDB_DB | ||
value: "mainflux" | ||
- name: INFLUXDB_ADMIN_USER | ||
value: "mainflux" | ||
- name: INFLUXDB_ADMIN_PASSWORD | ||
value: "mainflux" | ||
ports: | ||
- containerPort: 8086 | ||
volumeMounts: | ||
- mountPath: /var/lib/influxdb | ||
name: mainflux-influxdb-data | ||
volumes: | ||
- name: mainflux-influxdb-data | ||
persistentVolumeClaim: | ||
claimName: mainflux-influxdb-data-claim | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: mainflux-influxdb | ||
labels: | ||
name: mainflux-influxdb | ||
spec: | ||
ports: | ||
- port: 8086 | ||
selector: | ||
name: mainflux-influxdb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
apiVersion: apps/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: influxdb-writer | ||
labels: | ||
component: influxdb-writer | ||
spec: | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
component: influxdb-writer | ||
spec: | ||
containers: | ||
- name: mainflux-influxdb | ||
image: mainflux/influxdb:latest | ||
imagePullPolicy: Always | ||
ports: | ||
- containerPort: 8900 | ||
env: | ||
- name: MF_NATS_URL | ||
value: "nats://nats:4222" | ||
- name: MF_INFLUX_WRITER_PORT | ||
value: "8900" | ||
- name: MF_INFLUX_WRITER_DB_NAME | ||
value: "mainflux" | ||
- name: MF_INFLUX_WRITER_DB_HOST | ||
value: "mainflux-influxdb" | ||
- name: MF_INFLUX_WRITER_DB_PORT | ||
value: "8086" | ||
- name: MF_INFLUX_WRITER_DB_USER | ||
value: "mainflux" | ||
- name: MF_INFLUX_WRITER_DB_PASS | ||
value: "mainflux" | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: influxdb-writer | ||
labels: | ||
component: influxdb-writer | ||
spec: | ||
selector: | ||
component: influxdb-writer | ||
ports: | ||
- port: 8900 | ||
type: LoadBalancer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters