Loading examples/demo7/README.md +14 −0 Original line number Diff line number Diff line Loading @@ -2,3 +2,17 @@ Demo7 showcases the V2X capabilities of the platform. It is a C-V2X OBU simulator taht can be used as MEC application ## How to build demo7 ```bash $ cd ./examples/demo7/ $ ./dockerize.sh ``` ## How to use it ### During network scenario deployment ### In command line examples/demo7/entrypoint.sh +9 −19 Original line number Diff line number Diff line Loading @@ -25,28 +25,18 @@ echo "MEEP_SANDBOX_NAME: ${MEEP_SANDBOX_NAME}" echo "MEEP_MEP_NAME: ${MEEP_MEP_NAME}" echo "Waiting for MEC plateform started and stable..." sleep 20 # Wait for MEC plateform started and stable sleep 10 # Wait for MEC plateform started and stable SERVICE_NAME="meep-mosquitto" NAMESPACE=$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace) echo "NAMESPACE: ${NAMESPACE}" TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token) echo "TOKEN: ${TOKEN}" MOSQUITTO_NODE_PORT=$(curl -sSk \ -H "Authorization: Bearer $TOKEN" \ https://kubernetes.default.svc/api/v1/namespaces/$NAMESPACE/services/$SERVICE_NAME \ | jq -r '.spec.ports[0].nodePort') echo "External NodePort exposed for service [$SERVICE_NAME] in namespace [$NAMESPACE] is: $MOSQUITTO_NODE_PORT" MOSQUITTO_NODE_IP=$(curl -sSk \ -H "Authorization: Bearer $TOKEN" \ https://kubernetes.default.svc/api/v1/namespaces/$NAMESPACE/services/$SERVICE_NAME \ | jq -r '.spec.clusterIP') echo "External IP exposed for service [$SERVICE_NAME] in namespace [$NAMESPACE] is: $MOSQUITTO_NODE_IP" UU_IFACE="--brocker-address $MOSQUITTO_NODE_IP --brocker-port $MOSQUITTO_NODE_PORT" MQTT_ENABLE=${MQTT_ENABLE:-true} MQTT_HOST=${MOSQUITTO_NODE_IP_ADDRESS:-"meep-mosquitto"} MQTT_PORT=${MOSQUITTO_NODE_PORT:-80} #UU_IFACE="--brocker-address $MEEP_HOST_URL/$MEEP_SANDBOX_NAME/$MQTT_HOST --brocker-port $MQTT_PORT --use-ws" UU_IFACE="--brocker-address $MEEP_HOST_URL/$MEEP_SANDBOX_NAME/$MEEP_MEP_NAME/$MQTT_HOST --brocker-port 443 --use-ws --wss-root-ca fullchain.pem --wss-cert chain.pem --wss-key privkey.pem" echo "Environment variables set:" echo "MQTT_ENABLE: ${MQTT_ENABLE}" echo "MQTT_HOST: ${MQTT_HOST}" echo "MQTT_PORT: ${MQTT_PORT}" echo "COMM: ${IFACE}" echo "MODE: ${MODE}" echo "UU_IFACE: ${UU_IFACE}" Loading examples/demo7/fsmsggen +32.1 KiB (3.15 MiB) File changed.No diff preview for this file type. View original file View changed file go-apps/meep-mosquitto/listener.conf +8 −1 Original line number Diff line number Diff line # Raw TCP MQTT listener listener 9001 protocol mqtt allow_anonymous true # WebSocket listener (plaintext) listener 1883 protocol websockets allow_anonymous true go-apps/meep-mosquitto/mosquitto.conf +1 −1 Original line number Diff line number Diff line Loading @@ -4,6 +4,6 @@ persistence true persistence_location /mosquitto/data/ log_dest file /mosquitto/log/mosquitto.log #log_type log_type all include_dir /mosquitto/config/conf.d Loading
examples/demo7/README.md +14 −0 Original line number Diff line number Diff line Loading @@ -2,3 +2,17 @@ Demo7 showcases the V2X capabilities of the platform. It is a C-V2X OBU simulator taht can be used as MEC application ## How to build demo7 ```bash $ cd ./examples/demo7/ $ ./dockerize.sh ``` ## How to use it ### During network scenario deployment ### In command line
examples/demo7/entrypoint.sh +9 −19 Original line number Diff line number Diff line Loading @@ -25,28 +25,18 @@ echo "MEEP_SANDBOX_NAME: ${MEEP_SANDBOX_NAME}" echo "MEEP_MEP_NAME: ${MEEP_MEP_NAME}" echo "Waiting for MEC plateform started and stable..." sleep 20 # Wait for MEC plateform started and stable sleep 10 # Wait for MEC plateform started and stable SERVICE_NAME="meep-mosquitto" NAMESPACE=$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace) echo "NAMESPACE: ${NAMESPACE}" TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token) echo "TOKEN: ${TOKEN}" MOSQUITTO_NODE_PORT=$(curl -sSk \ -H "Authorization: Bearer $TOKEN" \ https://kubernetes.default.svc/api/v1/namespaces/$NAMESPACE/services/$SERVICE_NAME \ | jq -r '.spec.ports[0].nodePort') echo "External NodePort exposed for service [$SERVICE_NAME] in namespace [$NAMESPACE] is: $MOSQUITTO_NODE_PORT" MOSQUITTO_NODE_IP=$(curl -sSk \ -H "Authorization: Bearer $TOKEN" \ https://kubernetes.default.svc/api/v1/namespaces/$NAMESPACE/services/$SERVICE_NAME \ | jq -r '.spec.clusterIP') echo "External IP exposed for service [$SERVICE_NAME] in namespace [$NAMESPACE] is: $MOSQUITTO_NODE_IP" UU_IFACE="--brocker-address $MOSQUITTO_NODE_IP --brocker-port $MOSQUITTO_NODE_PORT" MQTT_ENABLE=${MQTT_ENABLE:-true} MQTT_HOST=${MOSQUITTO_NODE_IP_ADDRESS:-"meep-mosquitto"} MQTT_PORT=${MOSQUITTO_NODE_PORT:-80} #UU_IFACE="--brocker-address $MEEP_HOST_URL/$MEEP_SANDBOX_NAME/$MQTT_HOST --brocker-port $MQTT_PORT --use-ws" UU_IFACE="--brocker-address $MEEP_HOST_URL/$MEEP_SANDBOX_NAME/$MEEP_MEP_NAME/$MQTT_HOST --brocker-port 443 --use-ws --wss-root-ca fullchain.pem --wss-cert chain.pem --wss-key privkey.pem" echo "Environment variables set:" echo "MQTT_ENABLE: ${MQTT_ENABLE}" echo "MQTT_HOST: ${MQTT_HOST}" echo "MQTT_PORT: ${MQTT_PORT}" echo "COMM: ${IFACE}" echo "MODE: ${MODE}" echo "UU_IFACE: ${UU_IFACE}" Loading
examples/demo7/fsmsggen +32.1 KiB (3.15 MiB) File changed.No diff preview for this file type. View original file View changed file
go-apps/meep-mosquitto/listener.conf +8 −1 Original line number Diff line number Diff line # Raw TCP MQTT listener listener 9001 protocol mqtt allow_anonymous true # WebSocket listener (plaintext) listener 1883 protocol websockets allow_anonymous true
go-apps/meep-mosquitto/mosquitto.conf +1 −1 Original line number Diff line number Diff line Loading @@ -4,6 +4,6 @@ persistence true persistence_location /mosquitto/data/ log_dest file /mosquitto/log/mosquitto.log #log_type log_type all include_dir /mosquitto/config/conf.d