Merge branch 'master' into v7.0
Change-Id: Iec1f1db2b2d4953e560c8e8b7be2f6ddca86edd1
Signed-off-by: beierlm <mark.beierl@canonical.com>
diff --git a/installers/docker/docker-compose.yaml b/installers/docker/docker-compose.yaml
index 104de48..3fdfbc1 100644
--- a/installers/docker/docker-compose.yaml
+++ b/installers/docker/docker-compose.yaml
@@ -88,8 +88,11 @@
ports:
- "${OSM_PROM_PORTS:-9091:9090}"
volumes:
- - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
+ - ./prometheus/:/etc/prometheus/
- prom_db:/prometheus
+ command:
+ - '--config.file=/etc/prometheus/prometheus.yml'
+ - '--web.enable-lifecycle'
networks:
- netOSM
logging:
diff --git a/installers/docker/files/dashboards-osm.yml b/installers/docker/grafana/dashboards-osm.yml
similarity index 100%
rename from installers/docker/files/dashboards-osm.yml
rename to installers/docker/grafana/dashboards-osm.yml
diff --git a/installers/docker/files/datasource-prometheus.yml b/installers/docker/grafana/datasource-prometheus.yml
similarity index 100%
rename from installers/docker/files/datasource-prometheus.yml
rename to installers/docker/grafana/datasource-prometheus.yml
diff --git a/installers/docker/files/osm-sample-dashboard.json b/installers/docker/grafana/osm-sample-dashboard.json
similarity index 100%
rename from installers/docker/files/osm-sample-dashboard.json
rename to installers/docker/grafana/osm-sample-dashboard.json
diff --git a/installers/docker/files/osm-system-dashboard.json b/installers/docker/grafana/osm-system-dashboard.json
similarity index 100%
rename from installers/docker/files/osm-system-dashboard.json
rename to installers/docker/grafana/osm-system-dashboard.json
diff --git a/installers/docker/osm_pla/docker-compose.yaml b/installers/docker/osm_pla/docker-compose.yaml
new file mode 100644
index 0000000..93699ef
--- /dev/null
+++ b/installers/docker/osm_pla/docker-compose.yaml
@@ -0,0 +1,29 @@
+##
+# Copyright 2019 ETSI
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+##
+
+########################################################################
+
+version: '3'
+services:
+ pla:
+ image: ${DOCKER_USER:-opensourcemano}/pla:${TAG:-7}
+ networks:
+ - netOSM
+ logging:
+ driver: "json-file"
+ options:
+ max-file: 5
+ max-size: 10m
diff --git a/installers/docker/osm_pla/pla.yaml b/installers/docker/osm_pla/pla.yaml
new file mode 100644
index 0000000..c5bdd50
--- /dev/null
+++ b/installers/docker/osm_pla/pla.yaml
@@ -0,0 +1,50 @@
+# Copyright 2020 Arctos Labs Scandinavia AB
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: pla
+ labels:
+ app: pla
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: pla
+ template:
+ metadata:
+ labels:
+ app: pla
+ spec:
+ initContainers:
+ - name: kafka-mongo-test
+ image: alpine:latest
+ command: ["sh", "-c", "until (nc -zvw1 kafka 9092 && nc -zvw1 mongo 27017 ); do sleep 3; done; exit 0"]
+ containers:
+ - name: pla
+ image: opensourcemano/pla:7
+ env:
+ - name: OSMPLA_DATABASE_HOST
+ value: mongo
+ - name: OSMPLA_MESSAGE_HOST
+ value: kafka
+ volumeMounts:
+ - name: osm-packages
+ mountPath: /app/storage
+ volumes:
+ - name: osm-packages
+ hostPath:
+ path: /var/lib/osm/osm_osm_packages/_data
diff --git a/installers/docker/osm_pods/keystone.yaml b/installers/docker/osm_pods/keystone.yaml
index 7152059..1d1dc91 100644
--- a/installers/docker/osm_pods/keystone.yaml
+++ b/installers/docker/osm_pods/keystone.yaml
@@ -19,6 +19,7 @@
metadata:
name: keystone
spec:
+ clusterIP: None
ports:
- port: 5000
protocol: TCP
diff --git a/installers/docker/osm_pods/prometheus.yaml b/installers/docker/osm_pods/prometheus.yaml
index cdfd94d..b6ab986 100644
--- a/installers/docker/osm_pods/prometheus.yaml
+++ b/installers/docker/osm_pods/prometheus.yaml
@@ -53,7 +53,7 @@
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- - job_name: 'prometheus'
+ - job_name: 'mon_exporter'
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
@@ -84,6 +84,9 @@
containers:
- name: prometheus
image: prom/prometheus:v2.4.3
+ args:
+ - --config.file=/etc/prometheus/prometheus.yml
+ - --web.enable-lifecycle
ports:
- containerPort: 9090
protocol: TCP
diff --git a/installers/docker/files/prometheus.yml b/installers/docker/prometheus/prometheus.yml
similarity index 97%
rename from installers/docker/files/prometheus.yml
rename to installers/docker/prometheus/prometheus.yml
index a36a241..8d37837 100644
--- a/installers/docker/files/prometheus.yml
+++ b/installers/docker/prometheus/prometheus.yml
@@ -36,7 +36,7 @@
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- - job_name: 'prometheus'
+ - job_name: 'mon_exporter'
static_configs:
- targets: ['mon:8000']
- job_name: 'node_exporter'
diff --git a/installers/docker/files/node_exporter.service b/installers/docker/prometheus_exporters/node_exporter.service
similarity index 100%
rename from installers/docker/files/node_exporter.service
rename to installers/docker/prometheus_exporters/node_exporter.service