diff --git a/homepage/_packages/cloud2edge/scripts/setCloud2EdgeEnv.sh b/homepage/_packages/cloud2edge/scripts/setCloud2EdgeEnv.sh index e339ced5..6ac60964 100755 --- a/homepage/_packages/cloud2edge/scripts/setCloud2EdgeEnv.sh +++ b/homepage/_packages/cloud2edge/scripts/setCloud2EdgeEnv.sh @@ -36,9 +36,16 @@ function getPorts { PORT=$(kubectl get service $SERVICENAME -n $NS -o jsonpath='{.spec.ports[?(@.name=='"'$NAME'"')].'$TYPE'}' 2> /dev/null) if [ $? -eq 0 ] && [ "$PORT" != '' ]; then NAME=${NAME/secure-mqtt/mqtts} + NAME=${NAME/query-http/http} UPPERCASE_PORT_NAME=$(echo $NAME | tr [a-z\-] [A-Z_]) echo "export ${ENV_VAR_PREFIX}_PORT_${UPPERCASE_PORT_NAME}=\"$PORT\"" - echo "export ${ENV_VAR_PREFIX}_BASE_URL=\"$NAME://$IP:$PORT\"" + if [ "$PORT" = '80' ]; then + echo "export ${ENV_VAR_PREFIX}_BASE_URL=\"$NAME://$IP\"" + declare -g ${ENV_VAR_PREFIX}_BASE_URL="$NAME://$IP" + else + echo "export ${ENV_VAR_PREFIX}_BASE_URL=\"$NAME://$IP:$PORT\"" + declare -g ${ENV_VAR_PREFIX}_BASE_URL="$NAME://$IP:$PORT" + fi fi done @@ -74,6 +81,11 @@ getService adapter-coap "coap coaps" COAP_ADAPTER getService adapter-http "http https" HTTP_ADAPTER getService adapter-mqtt "mqtt secure-mqtt" MQTT_ADAPTER getService ditto-nginx "http" DITTO_API +getService jaeger-query "query-http" JAEGER_QUERY + +DITTO_DEVOPS_PWD=$(kubectl --namespace ${NS} get secret ${RELEASE}-ditto-gateway-secret -o jsonpath="{.data.devops-password}" | base64 --decode) +echo "export DITTO_DEVOPS_PWD=\"$DITTO_DEVOPS_PWD\"" +echo "export DITTO_UI_ENV_JSON=\"{\\\"api_uri\\\":\\\"${DITTO_API_BASE_URL}\\\",\\\"defaultUsernamePassword\\\":\\\"ditto:ditto\\\",\\\"defaultDittoPreAuthenticatedUsername\\\":null,\\\"defaultUsernamePasswordDevOps\\\":\\\"devops:${DITTO_DEVOPS_PWD}\\\",\\\"mainAuth\\\":\\\"basic\\\",\\\"devopsAuth\\\":\\\"basic\\\"}\"" echo echo "# Run this command to populate environment variables" diff --git a/homepage/_packages/cloud2edge/tour.md b/homepage/_packages/cloud2edge/tour.md index 03153308..f75f9890 100644 --- a/homepage/_packages/cloud2edge/tour.md +++ b/homepage/_packages/cloud2edge/tour.md @@ -35,7 +35,8 @@ Download the [setCloud2EdgeEnv script](../scripts/setCloud2EdgeEnv.sh) and use i to set environment variables for the Cloud2Edge package's service endpoints. {% clipboard %} -curl https://www.eclipse.org/packages/packages/cloud2edge/scripts/setCloud2EdgeEnv.sh --output setCloud2EdgeEnv.sh +curl https://www.eclipse.org/packages/packages/cloud2edge/scripts/setCloud2EdgeEnv.sh \ + --output setCloud2EdgeEnv.sh chmod u+x setCloud2EdgeEnv.sh RELEASE=c2e @@ -56,6 +57,23 @@ HTTP_ADAPTER_PORT=443 {% endvariants %} +## Accessing the Ditto Explorer User Interface + +The browser based [Ditto Explorer UI](https://eclipse.dev/ditto/user-interface.html) shows Ditto things, policies and connections. +On Kubernetes, the above-mentioned `setCloud2EdgeEnv` script provides environment variables to access and configure it. +The command +{% clipboard %} +echo $DITTO_API_BASE_URL +{% endclipboard %} +prints out the URL where to access the Ditto UI and Ditto API documentation. + +In the Ditto UI, click on the `Environments` link at the top and then the `Environment JSON` tab. Clicking on "Edit" lets you enter an arbitrary Name (e.g. `default`) +and below a JSON value, to be taken from the output of the following command. +{% clipboard %} +echo $DITTO_UI_ENV_JSON +{% endclipboard %} +Clicking on `Create` and switching to the created environment in the top bar `Environment` dropdown completes the configuration. + ## Publishing telemetry data The Cloud2Edge package comes with a pre-provisioned example device that we will use to publish diff --git a/homepage/prereqs.md b/homepage/prereqs.md index 8aa7c4e2..e29bdf72 100644 --- a/homepage/prereqs.md +++ b/homepage/prereqs.md @@ -327,7 +327,7 @@ minikube start ... --addons ingress You will need an installation of Helm on the machine which is used to deploy the packages. You can find installation instructions for Helm in the Helm documentation under [Installing Helm](https://helm.sh/docs/using_helm/#installing-helm). -The required Helm version is 3.4 or later. +The required Helm version is 3.8 or later. ### Repository diff --git a/packages/cloud2edge/requirements.yaml b/packages/cloud2edge/requirements.yaml index b4bd3e8e..0726d75b 100644 --- a/packages/cloud2edge/requirements.yaml +++ b/packages/cloud2edge/requirements.yaml @@ -15,5 +15,5 @@ dependencies: version: ~2.4.0 repository: "https://eclipse.org/packages/charts/" - name: ditto - version: ~3.1.0 - repository: "https://eclipse.org/packages/charts/" + version: ~3.3.6 + repository: "oci://registry-1.docker.io/eclipse" diff --git a/packages/cloud2edge/values.yaml b/packages/cloud2edge/values.yaml index 97d86069..e0f88717 100644 --- a/packages/cloud2edge/values.yaml +++ b/packages/cloud2edge/values.yaml @@ -108,6 +108,12 @@ hono: # Configuration properties for Eclipse Ditto. ditto: + global: + basicAuthUsers: + ditto: + user: ditto + password: ditto + # do not set cpu limits for Ditto to avoid CFS scheduler limits # ref: https://doc.akka.io/docs/akka/snapshot/additional/deploy.html#in-kubernetes connectivity: