Skip to content

Commit

Permalink
Use Ditto 3.4.0, Hono 2.5.6 in c2e chart.
Browse files Browse the repository at this point in the history
Also apply minor fix in post-install.sh, using the
appropriate protocol for registering the default
tenant and device.
  • Loading branch information
calohmn committed Nov 3, 2023
1 parent e55012a commit f4511ba
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
10 changes: 5 additions & 5 deletions packages/cloud2edge/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
#
# SPDX-License-Identifier: EPL-2.0
#
apiVersion: v1
version: 0.7.0
appVersion: 0.7.0
apiVersion: v2
version: 0.8.0
appVersion: 0.8.0
name: cloud2edge
description: |
Eclipse IoT Cloud2Edge (C2E) is an integrated suite of services developers can use to build IoT applications
Expand All @@ -33,8 +33,8 @@ maintainers:
email: [email protected]
dependencies:
- name: hono
version: ~2.5.5
version: ~2.5.6
repository: "https://eclipse.org/packages/charts/"
- name: ditto
version: ~3.3.7
version: ~3.4.0
repository: "oci://registry-1.docker.io/eclipse"
7 changes: 7 additions & 0 deletions packages/cloud2edge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ These profiles can be applied using the `-f` parameter when installing the packa

## Release Notes

### 0.8.0

- Use Ditto 3.4.0 chart version.
Note that updating to this version requires a migration step. A rolling update is not supported.
Refer to the Ditto migration notes for details: https://eclipse.dev/ditto/release_notes_340.html#migration-notes
- Use Hono 2.5.6 chart version.

### 0.7.0

- [#505] Use Hono chart version 2.5.5.
Expand Down
10 changes: 6 additions & 4 deletions packages/cloud2edge/post-install/post-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
#*******************************************************************************

DITTO_DEVOPS_USER_PW="devops:$(cat /var/run/c2e/ditto-gw-users/devops-password)"
DEVICE_REGISTRY_BASE_URL="http://{{ include "c2e.hono.fullname" . }}-service-device-registry:8080/v1"
DEVICE_REGISTRY_URL_SCHEME="{{- if ( eq .Values.hono.deviceRegistryExample.hono.registry.http.insecurePortEnabled true ) }}http{{ else }}https{{ end }}"
DEVICE_REGISTRY_PORT=$([ "${DEVICE_REGISTRY_URL_SCHEME}" = "http" ] && echo "8080" || echo "8443")
DEVICE_REGISTRY_BASE_URL="${DEVICE_REGISTRY_URL_SCHEME}://{{ include "c2e.hono.fullname" . }}-service-device-registry:${DEVICE_REGISTRY_PORT}/v1"
DITTO_CONNECTIONS_BASE_URL="http://{{ include "c2e.ditto.fullname" . }}-nginx:8080/api/2/connections"
DITTO_THINGS_BASE_URL="http://{{ include "c2e.ditto.fullname" . }}-nginx:8080/api/2/things"

Expand Down Expand Up @@ -47,7 +49,7 @@ add_hono_tenant(){
http_request_body="$2"

echo "Adding tenant [$tenant_id]"
response_body_and_status=$(curl --silent --write-out "\n%{http_code}" \
response_body_and_status=$(curl --silent --write-out "\n%{http_code}" -k \
-X POST --header 'Content-Type: application/json' \
--data-raw "$http_request_body" "$DEVICE_REGISTRY_BASE_URL/tenants/$tenant_id")
check_status $? "$response_body_and_status"
Expand All @@ -59,7 +61,7 @@ register_hono_device(){
http_request_body="$3"

echo "Registering device [tenant: $tenant_id, device: $device_id]"
response_body_and_status=$(curl --silent --write-out "\n%{http_code}" \
response_body_and_status=$(curl --silent --write-out "\n%{http_code}" -k \
-X POST --header 'Content-Type: application/json' \
--data-raw "$http_request_body" "$DEVICE_REGISTRY_BASE_URL/devices/$tenant_id/$device_id")
check_status $? "$response_body_and_status"
Expand All @@ -71,7 +73,7 @@ add_hono_device_credentials(){
http_request_body_file="$3"

echo "Adding credentials [tenant: $tenant_id, device: $device_id]"
response_body_and_status=$(curl --silent --write-out "\n%{http_code}" \
response_body_and_status=$(curl --silent --write-out "\n%{http_code}" -k \
-X PUT --header 'Content-Type: application/json' \
--data-binary "@$http_request_body_file" "$DEVICE_REGISTRY_BASE_URL/credentials/$tenant_id/$device_id")
check_status $? "$response_body_and_status"
Expand Down
1 change: 1 addition & 0 deletions packages/cloud2edge/profileTracing-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ ditto:
global:
tracing:
enabled: true
otelTraceReporterEnabled: true
otelExporterOtlpEndpoint: 'http://{{ .Release.Name }}-hono-jaeger-collector:4317'
## the tracing sampler to use, one of: always, never, random, adaptive
sampler: always
Expand Down

0 comments on commit f4511ba

Please sign in to comment.