diff --git a/examples/protocol-gateway-example/README.md b/examples/protocol-gateway-example/README.md index 9f04cd87f2..e960bcd2ee 100644 --- a/examples/protocol-gateway-example/README.md +++ b/examples/protocol-gateway-example/README.md @@ -17,8 +17,8 @@ However, it can also be configured to connect to a local instance. By default, the gateway listens on port `6666` on the loopback device (`127.0.0.1`). This can be changed in the `application.yml` file or by means of corresponding command line arguments. In the same way the connection to the AMQP -adapter can be configured. By default, the gateway connects to the Hono Sandbox' AMQP adapter using `gw@DEFAULT_TENANT` -as the username. +adapter can be configured. By default, the gateway connects to the AMQP adapter of the Hono Sandbox using +`gw@DEFAULT_TENANT` as the username. ## Starting the Gateway diff --git a/examples/protocol-gateway-example/scripts/create_hono_device.sh b/examples/protocol-gateway-example/scripts/create_hono_device.sh deleted file mode 100755 index 54d233fcaf..0000000000 --- a/examples/protocol-gateway-example/scripts/create_hono_device.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -#******************************************************************************* -# Copyright (c) 2020, 2022 Contributors to the Eclipse Foundation -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Eclipse Public License 2.0 which is available at -# http://www.eclipse.org/legal/epl-2.0 -# -# SPDX-License-Identifier: EPL-2.0 -#******************************************************************************* - -# A simple shell script to get IP addresses for hono-service-device-registry-ext, hono-dispatch-router-ext and hono-adapter-amqp and creates a device id and password - -# prior: setup hono in kubernetes namespace "hono" -REGISTRY_IP=$(kubectl -n hono get service hono-service-device-registry-ext --output='jsonpath={.status.loadBalancer.ingress[0].ip}') -echo "REGISTRY_IP=${REGISTRY_IP}" -export REGISTRY_IP -AMQP_NETWORK_IP=$(kubectl -n hono get service hono-dispatch-router-ext --output='jsonpath={.status.loadBalancer.ingress[0].ip}') -echo "AMQP_NETWORK_IP=${AMQP_NETWORK_IP}" -export AMQP_NETWORK_IP -AMQP_ADAPTER_PORT=$(kubectl -n hono get service hono-adapter-amqp --output='jsonpath={.status.loadBalancer.ingress[0].port}') -echo "AMQP_ADAPTER_IP=${AMQP_ADAPTER_IP}" -export AMQP_ADAPTER_PORT - -# Get example tenant or -export MY_TENANT="DEFAULT_TENANT" -# register new tenant -# export MY_TENANT=$(curl -X POST http://$REGISTRY_IP:28080/v1/tenants 2>/dev/null | jq -r .id) - -echo "MY_TENANT=\"${MY_TENANT}\"" - -# register new device -MY_DEVICE=$(curl -X POST "http://${REGISTRY_IP}:28080/v1/devices/${MY_TENANT}" 2>/dev/null | jq -r .id) -echo "MY_DEVICE=\"${MY_DEVICE}\"" -export MY_DEVICE - -# set credential secret for device -export MY_PWD="dummyDevicePassword" -echo "MY_PWD=\"${MY_PWD}\"" -curl -i -X PUT -H "content-type: application/json" --data-binary "[{ - \"type\": \"hashed-password\", - \"auth-id\": \"${MY_DEVICE}\", - \"secrets\": [{ \"pwd-plain\": \"${MY_PWD}\" }] -}]" "http://${REGISTRY_IP}:28080/v1/credentials/${MY_TENANT}/${MY_DEVICE}" diff --git a/examples/protocol-gateway-example/src/main/resources/application.yml b/examples/protocol-gateway-example/src/main/resources/application.yml index eb90d553c7..2ea52d84fe 100644 --- a/examples/protocol-gateway-example/src/main/resources/application.yml +++ b/examples/protocol-gateway-example/src/main/resources/application.yml @@ -4,7 +4,8 @@ gateway: insecurePortBindAddress: "127.0.0.1" amqp: host: hono.eclipseprojects.io - port: 5672 + port: 5671 + tlsEnabled: true username: gw@DEFAULT_TENANT password: gw-secret serverRole: AMQP adapter