Skip to content

Commit

Permalink
[#558] Share example configuration files among deployment targets.
Browse files Browse the repository at this point in the history
Also removed now obsolete modules for dispatch router and artemis
broker.

Signed-off-by: Kai Hudalla <kai.hudalla@bosch-si.com>
  • Loading branch information
Kai Hudalla committed Apr 6, 2018
1 parent 52c50ec commit 833deba
Show file tree
Hide file tree
Showing 38 changed files with 250 additions and 274 deletions.
36 changes: 0 additions & 36 deletions broker/pom.xml

This file was deleted.

32 changes: 0 additions & 32 deletions broker/src/main/fabric8/deployment.yml

This file was deleted.

5 changes: 0 additions & 5 deletions broker/src/main/fabric8/service.yml

This file was deleted.

9 changes: 0 additions & 9 deletions dispatchrouter/.dockerignore

This file was deleted.

44 changes: 0 additions & 44 deletions dispatchrouter/pom.xml

This file was deleted.

29 changes: 0 additions & 29 deletions dispatchrouter/src/main/fabric8/deployment.yml

This file was deleted.

15 changes: 0 additions & 15 deletions dispatchrouter/src/main/fabric8/external-service.yml

This file was deleted.

7 changes: 0 additions & 7 deletions dispatchrouter/src/main/fabric8/internal-service.yml

This file was deleted.

8 changes: 0 additions & 8 deletions dispatchrouter/src/main/fabric8/route.yml

This file was deleted.

10 changes: 0 additions & 10 deletions dispatchrouter/src/main/qpid-dispatch/Dockerfile

This file was deleted.

18 changes: 0 additions & 18 deletions dispatchrouter/src/main/qpid-dispatch/build-qpid-dispatch-image.sh

This file was deleted.

14 changes: 1 addition & 13 deletions example/pom.xml
Expand Up @@ -70,15 +70,6 @@ Also contains scripts for deploying a Hono instance to a Docker Swarm, a Kuberne
<groupId>org.eclipse.hono</groupId>
<artifactId>hono-demo-certs</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.hono</groupId>
<artifactId>hono-artemis</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.hono</groupId>
<artifactId>hono-dispatch-router</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.hono</groupId>
<artifactId>hono-service-auth</artifactId>
Expand Down Expand Up @@ -157,15 +148,12 @@ Also contains scripts for deploying a Hono instance to a Docker Swarm, a Kuberne
<configuration>
<includeArtifactIds>
hono-demo-certs,
hono-dispatch-router,
hono-artemis,
hono-service-auth,
hono-service-messaging,
hono-service-device-registry,
hono-adapter-http-vertx,
hono-adapter-mqtt-vertx,
hono-adapter-kura,
hono-artemis
hono-adapter-kura
</includeArtifactIds>
<outputDirectory>${project.build.directory}/config</outputDirectory>
<includes>
Expand Down
61 changes: 61 additions & 0 deletions example/src/main/deploy/artemis-deployment.yml
@@ -0,0 +1,61 @@
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: AMQP_Messaging_Network
version: "${project.version}"
group: ${project.groupId}
name: hono-artemis
spec:
replicas: 1
selector:
matchLabels:
app: AMQP_Messaging_Network
role: broker
group: ${project.groupId}
template:
metadata:
labels:
app: AMQP_Messaging_Network
role: broker
version: "${project.version}"
group: ${project.groupId}
spec:
containers:
- command:
- /opt/artemis/bin/artemis
- run
- xml:/etc/hono/artemis-bootstrap.xml
env:
- name: ARTEMIS_CONFIGURATION
value: /etc/hono
- name: KUBERNETES_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: ${artemis.image.name}
imagePullPolicy: IfNotPresent
livenessProbe:
initialDelaySeconds: 20
periodSeconds: 9
tcpSocket:
port: 5671
timeoutSeconds: 1
name: eclipse-hono-artemis
readinessProbe:
initialDelaySeconds: 5
periodSeconds: 5
tcpSocket:
port: 5671
timeoutSeconds: 1
securityContext:
privileged: false
volumeMounts:
- mountPath: /etc/hono
name: config
readOnly: true
volumes:
- name: config
secret:
secretName: hono-artemis-conf
18 changes: 18 additions & 0 deletions example/src/main/deploy/artemis-svc.yml
@@ -0,0 +1,18 @@
---
apiVersion: v1
kind: Service
metadata:
labels:
app: AMQP_Messaging_Network
version: "${project.version}"
group: ${project.groupId}
name: hono-artemis
spec:
ports:
- port: 5671
protocol: TCP
targetPort: 5671
selector:
role: broker
app: AMQP_Messaging_Network
group: ${project.groupId}
6 changes: 2 additions & 4 deletions example/src/main/deploy/configure_grafana.sh
Expand Up @@ -12,8 +12,6 @@

# Absolute path this script is in
SCRIPTPATH="$(cd "$(dirname "$0")" && pwd -P)"
HONO_HOME=$SCRIPTPATH/../../..
CONFIG=$SCRIPTPATH/../config
HOST=${1:-localhost}
PORT=${2:-3000}

Expand All @@ -24,11 +22,11 @@ done;
echo .. Grafana is up, set its datasource and dashboard

# add the data source to grafana
curl -X POST -i -H 'Content-Type: application/json' --data-binary @$CONFIG/grafana_datasource.json \
curl -X POST -i -H 'Content-Type: application/json' --data-binary @$SCRIPTPATH/grafana_datasource.json \
http://admin:admin@${HOST}:${PORT}/api/datasources

# add the dashboard to grafana
# to use a changed dashboard (grafana_dashboard.json) from Grafana make a HTTP call to
# http://<host>:<port>/api/dashboards/db/hono and change the dashboard id in the resulting JSON to null
curl -X POST -i -H 'Content-Type: application/json' --data-binary @$CONFIG/grafana_dashboard.json \
curl -X POST -i -H 'Content-Type: application/json' --data-binary @$SCRIPTPATH/grafana_dashboard.json \
http://admin:admin@${HOST}:${PORT}/api/dashboards/db

0 comments on commit 833deba

Please sign in to comment.