diff --git a/.env.backup b/.env.backup deleted file mode 100644 index faabaa1..0000000 --- a/.env.backup +++ /dev/null @@ -1,90 +0,0 @@ -# -# CONNECTION STRINGS -# - -IOTHUB_CONNECTION_STRING="" - -DEVICE_CONNECTION_STRING="" - -# -# CONTAINER REGISTRY -# - # Settings for your default container registry. - # - Local Registry: Set CONTAINER_REGISTRY_SERVER to "localhost:5000" - USERNAME/PASSWORD are not required. - # - Azure Container Registry: Set CONTAINER_REGISTRY_SERVER to "myregistry.azurecr.io". USERNAME/PASSWORD are required. - # - Docker Hub: Set CONTAINER_REGISTRY_SERVER and CONTAINER_REGISTRY_USERNAME to your Docker Hub username. Set CONTAINER_REGISTRY_PASSWORD to your Docker Hub password. - -CONTAINER_REGISTRY_SERVER="localhost:5000" -CONTAINER_REGISTRY_USERNAME="" -CONTAINER_REGISTRY_PASSWORD="" - - # To specify additional container registries ensure the prefix is CONTAINER_REGISTRY_SERVER_, CONTAINER_REGISTRY_USERNAME_, CONTAINER_REGISTRY_PASSWORD_ - # And the token following the prefix uniquely associates the SERVER/USERNAME/PASSWORD - # Token can be any string of alphanumeric characters - -# CONTAINER_REGISTRY_SERVER_2="" -# CONTAINER_REGISTRY_USERNAME_2="" -# CONTAINER_REGISTRY_PASSWORD_2="" - -# -# HOST -# - -RUNTIME_TAG="1.0" - -# -# MODULES -# - -BYPASS_MODULES="" - # "" - to build all modules - # "*" - to bypass all modules - # "filtermodule, module1" - Comma delimited list of modules to bypass when building - -ACTIVE_DOCKER_PLATFORMS="" - # "" - to only build platforms specified in DEPLOYMENT_CONFIG_TEMPLATE_FILE - # "*" - to build all platforms - # "amd64,amd64.debug" - Comma delimited list of platforms to build - -CONTAINER_TAG="" - -# -# SOLUTION SETTINGS -# - -CONFIG_OUTPUT_DIR="config" -DEPLOYMENT_CONFIG_TEMPLATE_FILE="deployment.template.json" -DEPLOYMENT_CONFIG_DEBUG_TEMPLATE_FILE="deployment.debug.template.json" -DEFAULT_PLATFORM="amd64" -MODULES_PATH="modules" - -LOGS_PATH="logs" - -# -# DOCKER LOGS COMMAND -# -# Command used when calling iotedgedev docker --logs or --show-logs - -LOGS_CMD="start /B start cmd.exe @cmd /k docker logs {0} -f" - # "start /B start cmd.exe @cmd /k docker logs {0} -f" - for CMD - # "docker logs {0} -f -new_console:sV" - for ConEmu - -# -# AZURE SETTINGS -# -# These settings will override parameters to the `iotedgedev azure --setup` command. -# CREDENTIALS="username password" -# SERVICE_PRINCIPAL="username password tenant" -# RESOURCE_GROUP_LOCATION="australiaeast|australiasoutheast|brazilsouth|canadacentral|canadaeast|centralindia|centralus|eastasia|eastus|eastus2|japanwest|japaneast|northeurope|northcentralus|southindia|uksouth|ukwest|westus|westeurope|southcentralus|westcentralus|westus2" -# IOTHUB_SKU="F1|S1|S2|S3" -# UPDATE_DOTENV="True|False" - -SUBSCRIPTION_ID="" -RESOURCE_GROUP_NAME="" -RESOURCE_GROUP_LOCATION="" -IOTHUB_NAME="" -IOTHUB_SKU="" -EDGE_DEVICE_ID="" -CREDENTIALS="" -SERVICE_PRINCIPAL="" -UPDATE_DOTENV="" diff --git a/.env.tmp b/.env.tmp index faabaa1..4e7027d 100644 --- a/.env.tmp +++ b/.env.tmp @@ -30,7 +30,7 @@ CONTAINER_REGISTRY_PASSWORD="" # HOST # -RUNTIME_TAG="1.0" +RUNTIME_TAG="1.1" # # MODULES diff --git a/docker/runtime/Dockerfile b/docker/runtime/Dockerfile index 5a57c67..09ba398 100644 --- a/docker/runtime/Dockerfile +++ b/docker/runtime/Dockerfile @@ -5,6 +5,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ curl \ iproute2 \ iputils-ping \ + gnupg2 \ systemd && \ rm -rf /var/lib/apt/lists/* RUN curl https://packages.microsoft.com/config/ubuntu/18.04/multiarch/prod.list > ./microsoft-prod.list && \ @@ -21,4 +22,4 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ COPY rund.sh rund.sh RUN sed -i 's/\r//' ./rund.sh && \ chmod u+x rund.sh -ENTRYPOINT [ "./rund.sh" ] \ No newline at end of file +ENTRYPOINT [ "./rund.sh" ] diff --git a/docker/runtime/arm/Dockerfile b/docker/runtime/arm/Dockerfile index 208421f..071df21 100644 --- a/docker/runtime/arm/Dockerfile +++ b/docker/runtime/arm/Dockerfile @@ -8,8 +8,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ iproute2 \ libcurl3 \ libffi-dev \ - libssl1.0.0=1.0.2g-1ubuntu4.13 \ - libssl-dev=1.0.2g-1ubuntu4.13 \ + libssl1.0.0=1.0.2g-1ubuntu5.6 \ + libssl-dev=1.0.2g-1ubuntu5.6 \ systemd && \ rm -rf /var/lib/apt/lists/* diff --git a/docker/runtime/arm/rund.arm32v7.sh b/docker/runtime/arm/rund.arm32v7.sh index a9fd587..b1054e7 100644 --- a/docker/runtime/arm/rund.arm32v7.sh +++ b/docker/runtime/arm/rund.arm32v7.sh @@ -3,7 +3,7 @@ echo '=> detecting IP' export IP=$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1) export IOT_DEVICE_HOSTNAME="$IP" -export AGENT_IMAGE="mcr.microsoft.com/azureiotedge-agent:1.0@sha256:3fdb80a6dfe1fbcbf11cfcea56dda79d1d779490c66d394a2b3f388d74ab0c26" +export AGENT_IMAGE="mcr.microsoft.com/azureiotedge-agent:1.1@sha256:84d81e0527799e903fca9602c56efcbc43ce6f90eaeb7316fddc7d663d40d1b1" #export IOTEDGE_LOG=edgelet=debug echo '=> creating config.yaml' diff --git a/iotedgedev/template/.env.tmp b/iotedgedev/template/.env.tmp index c989aea..399655b 100644 --- a/iotedgedev/template/.env.tmp +++ b/iotedgedev/template/.env.tmp @@ -30,7 +30,7 @@ CONTAINER_REGISTRY_PASSWORD="" # HOST # -RUNTIME_TAG="1.0" +RUNTIME_TAG="1.1" # # MODULES diff --git a/tests/assets/deployment.manifest_invalid.json b/tests/assets/deployment.manifest_invalid.json index 67b6c2e..6b5d3eb 100644 --- a/tests/assets/deployment.manifest_invalid.json +++ b/tests/assets/deployment.manifest_invalid.json @@ -25,7 +25,7 @@ "edgeAgent": { "type": "docker", "settings": { - "image": "mcr.microsoft.com/azureiotedge-agent:1.0" + "image": "mcr.microsoft.com/azureiotedge-agent:${RUNTIME_TAG}" } }, "edgeHub": { @@ -33,7 +33,7 @@ "status": "running", "restartPolicy": "always", "settings": { - "image": "mcr.microsoft.com/azureiotedge-hub:1.0", + "image": "mcr.microsoft.com/azureiotedge-hub:${RUNTIME_TAG}", "createOptions": "{\"HostConfig\":{\"PortBindings\":{\"5671/tcp\":[{\"HostPort\":\"5671\"}],\"8883/tcp\":[{\"HostPort\":\"8883\"}],\"443/tcp\":[{\"HostPort\":\"443\"}]}}}" } } @@ -45,7 +45,7 @@ "status": "running", "restartPolicy": "always", "settings": { - "image": "mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:1.0", + "image": "mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:${RUNTIME_TAG}", "createOptions": "{\"Env\":[\"abcdefghij0=00\",\"abcdefghij1=01\",\"abcdefghij2=02\",\"abcdefghij3=03\",\"abcdefghij4=04\",\"abcdefghij5=05\",\"abcdefghij6=06\",\"abcdefghij7=07\",\"abcdefghij8=08\",\"abcdefghij9=09\",\"abcdefghij10=10\",\"abcdefghij11=11\",\"abcdefghij12=12\",\"abcdefghij13=13\",\"abcdefghij14=14\",\"abcdefghij15=15\",\"abcdefghij16=16\",\"abcdefghij17=17\",\"abcdefghij18=18\",\"abcdefghij19=19\",\"abcdefghij20=20\",\"abcdefghij22=21\",\"abcdefghij22=22\",\"abcdefghij23=23\",\"abcdefghij24=24\",\"abcdefghij25=25\",\"abcdefghij26=26\",\"abcdefghij27=27\",\"abcdefghi", "createOptions01": "j28=28\",\"abcdefghij29=29\",\"abcdefghij30=30\",\"abcdefghij31=31\",\"abcdefghij32=32\",\"abcdefghij33=33\",\"abcdefghij34=34\",\"abcdefghij35=35\",\"abcdefghij36=36\",\"abcdefghij37=37\",\"abcdefghij38=38\",\"abcdefghij39=39\",\"abcdefghij40=40\",\"abcdefghij41=41\",\"abcdefghij42=42\",\"abcdefghij43=43\",\"abcdefghij44=44\",\"abcdefghij45=45\",\"abcdefghij46=46\",\"abcdefghij47=47\",\"abcdefghij48=48\",\"abcdefghij49=49\",\"abcdefghij50=50\",\"abcdefghij51=51\",\"abcdefghij52=52\",\"abcdefghij53=53\",\"abcdefghij54=54\",\"abcdefghij55=55\",\"abcdefghij56abcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefgh=56\",", "createOptions02": "\"abcdefghij56abcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefgh=57\",\"abcdefghij58=58\",\"abcdefghij59=59\"]}" diff --git a/tests/assets/deployment.manifest_invalid_createoptions.json b/tests/assets/deployment.manifest_invalid_createoptions.json index 9fc8f00..fb5db9b 100644 --- a/tests/assets/deployment.manifest_invalid_createoptions.json +++ b/tests/assets/deployment.manifest_invalid_createoptions.json @@ -21,7 +21,7 @@ "edgeAgent": { "type": "docker", "settings": { - "image": "mcr.microsoft.com/azureiotedge-agent:1.0" + "image": "mcr.microsoft.com/azureiotedge-agent:${RUNTIME_TAG}" } }, "edgeHub": { @@ -29,7 +29,7 @@ "status": "running", "restartPolicy": "always", "settings": { - "image": "mcr.microsoft.com/azureiotedge-hub:1.0", + "image": "mcr.microsoft.com/azureiotedge-hub:${RUNTIME_TAG}", "createOptions": "{\"HostConfig\":{\"PortBindings\":{\"5671/tcp\":[{\"HostPort\":\"5671\"}],\"8883/tcp\":[{\"HostPort\":\"8883\"}],\"443/tcp\":[{\"HostPort\":\"443\"}]}}}" } } @@ -41,7 +41,7 @@ "status": "running", "restartPolicy": "always", "settings": { - "image": "mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:1.0", + "image": "mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:${RUNTIME_TAG}", "createOptions": "{\"Env\":[\"abcdefghij0=00\",\"abcdefghij1=01\",\"abcdefghij2=02\",\"abcdefghij3=03\",\"abcdefghij4=04\",\"abcdefghij5=05\",\"abcdefghij6=06\",\"abcdefghij7=07\",\"abcdefghij8=08\",\"abcdefghij9=09\",\"abcdefghij10=10\",\"abcdefghij11=11\",\"abcdefghij12=12\",\"abcdefghij13=13\",\"abcdefghij14=14\",\"abcdefghij15=15\",\"abcdefghij16=16\",\"abcdefghij17=17\",\"abcdefghij18=18\",\"abcdefghij19=19\",\"abcdefghij20=20\",\"abcdefghij22=21\",\"abcdefghij22=22\",\"abcdefghij23=23\",\"abcdefghij24=24\",\"abcdefghij25=25\",\"abcdefghij26=26\",\"abcdefghij27=27\",\"abcdefghi", "createOptions01": "j28=28\",\"abcdefghij29=29\",\"abcdefghij30=30\",\"abcdefghij31=31\",\"abcdefghij32=32\",\"abcdefghij33=33\",\"abcdefghij34=34\",\"abcdefghij35=35\",\"abcdefghij36=36\",\"abcdefghij37=37\",\"abcdefghij38=38\",\"abcdefghij39=39\",\"abcdefghij40=40\",\"abcdefghij41=41\",\"abcdefghij42=42\",\"abcdefghij43=43\",\"abcdefghij44=44\",\"abcdefghij45=45\",\"abcdefghij46=46\",\"abcdefghij47=47\",\"abcdefghij48=48\",\"abcdefghij49=49\",\"abcdefghij50=50\",\"abcdefghij51=51\",\"abcdefghij52=52\",\"abcdefghij53=53\",\"abcdefghij54=54\",\"abcdefghij55=55\",\"abcdefghij56abcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefgh=56\",", "createOptions02": "\"abcdefghij56abcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefghabcdefgh=57\",\"abcdefghij58=58\",\"abcdefghij59=59\"]}" diff --git a/tests/assets/deployment.manifest_invalid_schema.json b/tests/assets/deployment.manifest_invalid_schema.json index 5f4a8ad..63b0790 100644 --- a/tests/assets/deployment.manifest_invalid_schema.json +++ b/tests/assets/deployment.manifest_invalid_schema.json @@ -25,7 +25,7 @@ "edgeAgent": { "type": "docker", "settings": { - "image": "mcr.microsoft.com/azureiotedge-agent:1.0" + "image": "mcr.microsoft.com/azureiotedge-agent:${RUNTIME_TAG}" } }, "edgeHub": { @@ -33,7 +33,7 @@ "status": "running", "restartPolicy": "always", "settings": { - "image": "mcr.microsoft.com/azureiotedge-hub:1.0", + "image": "mcr.microsoft.com/azureiotedge-hub:${RUNTIME_TAG}", "createOptions": "{\"HostConfig\":{\"PortBindings\":{\"5671/tcp\":[{\"HostPort\":\"5671\"}],\"8883/tcp\":[{\"HostPort\":\"8883\"}],\"443/tcp\":[{\"HostPort\":\"443\"}]}}}" } } @@ -45,7 +45,7 @@ "status": "running", "restartPolicy": "always", "settings": { - "image": "mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:1.0", + "image": "mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:${RUNTIME_TAG}", "createOptions": "{}" } } diff --git a/tests/assets/deployment.template_1.json b/tests/assets/deployment.template_1.json index 44c51bc..b7c662b 100644 --- a/tests/assets/deployment.template_1.json +++ b/tests/assets/deployment.template_1.json @@ -15,7 +15,7 @@ "edgeAgent": { "type": "docker", "settings": { - "image": "mcr.microsoft.com/azureiotedge-agent:1.0", + "image": "mcr.microsoft.com/azureiotedge-agent:${RUNTIME_TAG}", "createOptions": "" } }, @@ -24,7 +24,7 @@ "status": "running", "restartPolicy": "always", "settings": { - "image": "mcr.microsoft.com/azureiotedge-hub:1.0", + "image": "mcr.microsoft.com/azureiotedge-hub:${RUNTIME_TAG}", "createOptions": { "HostConfig": { "PortBindings": { @@ -56,7 +56,7 @@ "status": "running", "restartPolicy": "always", "settings": { - "image": "mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:1.0", + "image": "mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:${RUNTIME_TAG}", "createOptions": { "Env": [ "abcdefghij0=00", diff --git a/tests/assets/deployment.template_2.json b/tests/assets/deployment.template_2.json index 32f8862..24663c8 100644 --- a/tests/assets/deployment.template_2.json +++ b/tests/assets/deployment.template_2.json @@ -15,7 +15,7 @@ "edgeAgent": { "type": "docker", "settings": { - "image": "mcr.microsoft.com/azureiotedge-agent:1.0", + "image": "mcr.microsoft.com/azureiotedge-agent:${RUNTIME_TAG}", "createOptions": "" } }, @@ -24,7 +24,7 @@ "status": "running", "restartPolicy": "always", "settings": { - "image": "mcr.microsoft.com/azureiotedge-hub:1.0", + "image": "mcr.microsoft.com/azureiotedge-hub:${RUNTIME_TAG}", "createOptions": { "HostConfig": { "PortBindings": { @@ -56,7 +56,7 @@ "status": "running", "restartPolicy": "always", "settings": { - "image": "mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:1.0", + "image": "mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:${RUNTIME_TAG}", "createOptions": { "Env": [ "abcdefghij0=00", diff --git a/tests/assets/deployment.template_3.json b/tests/assets/deployment.template_3.json index 24b737f..71d3667 100644 --- a/tests/assets/deployment.template_3.json +++ b/tests/assets/deployment.template_3.json @@ -15,7 +15,7 @@ "edgeAgent": { "type": "docker", "settings": { - "image": "mcr.microsoft.com/azureiotedge-agent:1.0", + "image": "mcr.microsoft.com/azureiotedge-agent:${RUNTIME_TAG}", "createOptions": "" } }, @@ -24,7 +24,7 @@ "status": "running", "restartPolicy": "always", "settings": { - "image": "mcr.microsoft.com/azureiotedge-hub:1.0", + "image": "mcr.microsoft.com/azureiotedge-hub:${RUNTIME_TAG}", "createOptions": { "HostConfig": { "PortBindings": { @@ -56,7 +56,7 @@ "status": "running", "restartPolicy": "always", "settings": { - "image": "mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:1.0", + "image": "mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:${RUNTIME_TAG}", "createOptions": { "Env": [ "abcdefghij0=00", diff --git a/tests/assets/deployment.template_invalidresult.json b/tests/assets/deployment.template_invalidresult.json index 2a916f5..f00abbe 100644 --- a/tests/assets/deployment.template_invalidresult.json +++ b/tests/assets/deployment.template_invalidresult.json @@ -25,7 +25,7 @@ "edgeAgent": { "type": "docker", "settings": { - "image": "mcr.microsoft.com/azureiotedge-agent:1.0", + "image": "mcr.microsoft.com/azureiotedge-agent:${RUNTIME_TAG}", "createOptions": "" } }, @@ -34,7 +34,7 @@ "status": "running", "restartPolicy": "always", "settings": { - "image": "mcr.microsoft.com/azureiotedge-hub:1.0", + "image": "mcr.microsoft.com/azureiotedge-hub:${RUNTIME_TAG}", "createOptions": { "HostConfig": { "PortBindings": { @@ -66,7 +66,7 @@ "status": "running", "restartPolicy": "always", "settings": { - "image": "mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:1.0", + "image": "mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:${RUNTIME_TAG}", "createOptions": { "Env": [ "abcdefghij0=00", diff --git a/tests/assets/deployment.template_without_schema_template.json b/tests/assets/deployment.template_without_schema_template.json index f9ff79b..ad9ee39 100644 --- a/tests/assets/deployment.template_without_schema_template.json +++ b/tests/assets/deployment.template_without_schema_template.json @@ -15,7 +15,7 @@ "edgeAgent": { "type": "docker", "settings": { - "image": "mcr.microsoft.com/azureiotedge-agent:1.0", + "image": "mcr.microsoft.com/azureiotedge-agent:${RUNTIME_TAG}", "createOptions": {} } }, @@ -24,7 +24,7 @@ "status": "running", "restartPolicy": "always", "settings": { - "image": "mcr.microsoft.com/azureiotedge-hub:1.0", + "image": "mcr.microsoft.com/azureiotedge-hub:${RUNTIME_TAG}", "createOptions": { "HostConfig": { "PortBindings": { @@ -56,7 +56,7 @@ "status": "running", "restartPolicy": "always", "settings": { - "image": "mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:1.0", + "image": "mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:${RUNTIME_TAG}", "createOptions": {} } }, diff --git a/tests/assets/test_solution_shared_lib/deployment.debug.template.json b/tests/assets/test_solution_shared_lib/deployment.debug.template.json index 8a20819..1d3d2cf 100644 --- a/tests/assets/test_solution_shared_lib/deployment.debug.template.json +++ b/tests/assets/test_solution_shared_lib/deployment.debug.template.json @@ -16,7 +16,7 @@ "edgeAgent": { "type": "docker", "settings": { - "image": "mcr.microsoft.com/azureiotedge-agent:1.0", + "image": "mcr.microsoft.com/azureiotedge-agent:${RUNTIME_TAG}", "createOptions": {} } }, @@ -25,7 +25,7 @@ "status": "running", "restartPolicy": "always", "settings": { - "image": "mcr.microsoft.com/azureiotedge-hub:1.0", + "image": "mcr.microsoft.com/azureiotedge-hub:${RUNTIME_TAG}", "createOptions": { "HostConfig": { "PortBindings": { @@ -57,7 +57,7 @@ "status": "running", "restartPolicy": "always", "settings": { - "image": "mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:1.0", + "image": "mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:${RUNTIME_TAG}", "createOptions": {} } }, diff --git a/tests/assets/test_solution_shared_lib/deployment.escapedpath.template.json b/tests/assets/test_solution_shared_lib/deployment.escapedpath.template.json index 59ae73c..1b8d791 100644 --- a/tests/assets/test_solution_shared_lib/deployment.escapedpath.template.json +++ b/tests/assets/test_solution_shared_lib/deployment.escapedpath.template.json @@ -16,7 +16,7 @@ "edgeAgent": { "type": "docker", "settings": { - "image": "mcr.microsoft.com/azureiotedge-agent:1.0", + "image": "mcr.microsoft.com/azureiotedge-agent:${RUNTIME_TAG}", "createOptions": {} } }, @@ -25,7 +25,7 @@ "status": "running", "restartPolicy": "always", "settings": { - "image": "mcr.microsoft.com/azureiotedge-hub:1.0", + "image": "mcr.microsoft.com/azureiotedge-hub:${RUNTIME_TAG}", "createOptions": { "HostConfig": { "PortBindings": { @@ -57,7 +57,7 @@ "status": "running", "restartPolicy": "always", "settings": { - "image": "mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:1.0", + "image": "mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:${RUNTIME_TAG}", "createOptions": {} } }, diff --git a/tests/assets/test_solution_shared_lib/deployment.template.json b/tests/assets/test_solution_shared_lib/deployment.template.json index 5ad9c54..a3f24de 100644 --- a/tests/assets/test_solution_shared_lib/deployment.template.json +++ b/tests/assets/test_solution_shared_lib/deployment.template.json @@ -22,7 +22,7 @@ "edgeAgent": { "type": "docker", "settings": { - "image": "mcr.microsoft.com/azureiotedge-agent:1.0", + "image": "mcr.microsoft.com/azureiotedge-agent:${RUNTIME_TAG}", "createOptions": {} } }, @@ -31,7 +31,7 @@ "status": "running", "restartPolicy": "always", "settings": { - "image": "mcr.microsoft.com/azureiotedge-hub:1.0", + "image": "mcr.microsoft.com/azureiotedge-hub:${RUNTIME_TAG}", "createOptions": { "HostConfig": { "PortBindings": { @@ -63,7 +63,7 @@ "status": "running", "restartPolicy": "always", "settings": { - "image": "mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:1.0", + "image": "mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:${RUNTIME_TAG}", "createOptions": {} } }, diff --git a/tests/assets/test_solution_shared_lib/modules/SampleModule/.dockerignore b/tests/assets/test_solution_shared_lib/modules/SampleModule/.dockerignore deleted file mode 100644 index a43e842..0000000 --- a/tests/assets/test_solution_shared_lib/modules/SampleModule/.dockerignore +++ /dev/null @@ -1,2 +0,0 @@ -[b|B]in -[O|o]bj \ No newline at end of file diff --git a/tests/assets/test_solution_shared_lib/modules/SampleModule/.gitignore b/tests/assets/test_solution_shared_lib/modules/SampleModule/.gitignore deleted file mode 100644 index 1074c05..0000000 --- a/tests/assets/test_solution_shared_lib/modules/SampleModule/.gitignore +++ /dev/null @@ -1,34 +0,0 @@ -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ -**/Properties/launchSettings.json - -*_i.c -*_p.c -*_i.h -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc -.vs - -[Bb]in/ -[Oo]bj/ \ No newline at end of file diff --git a/tests/assets/test_solution_shared_lib/modules/SampleModule/Dockerfile.amd64 b/tests/assets/test_solution_shared_lib/modules/SampleModule/Dockerfile.amd64 deleted file mode 100644 index 7bcf4a1..0000000 --- a/tests/assets/test_solution_shared_lib/modules/SampleModule/Dockerfile.amd64 +++ /dev/null @@ -1,17 +0,0 @@ -FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build-env -WORKDIR /app - -COPY *.csproj ./ -RUN dotnet restore - -COPY . ./ -RUN dotnet publish -c Release -o out - -FROM mcr.microsoft.com/dotnet/core/runtime:3.1-buster-slim -WORKDIR /app -COPY --from=build-env /app/out ./ - -RUN useradd -ms /bin/bash moduleuser -USER moduleuser - -ENTRYPOINT ["dotnet", "SampleModule.dll"] \ No newline at end of file diff --git a/tests/assets/test_solution_shared_lib/modules/SampleModule/Dockerfile.amd64.debug b/tests/assets/test_solution_shared_lib/modules/SampleModule/Dockerfile.amd64.debug deleted file mode 100644 index da0bddf..0000000 --- a/tests/assets/test_solution_shared_lib/modules/SampleModule/Dockerfile.amd64.debug +++ /dev/null @@ -1,24 +0,0 @@ -FROM mcr.microsoft.com/dotnet/core/runtime:3.1-buster-slim AS base - -RUN apt-get update && \ - apt-get install -y --no-install-recommends unzip procps && \ - rm -rf /var/lib/apt/lists/* - -RUN useradd -ms /bin/bash moduleuser -USER moduleuser -RUN curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v latest -l ~/vsdbg - -FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build-env -WORKDIR /app - -COPY *.csproj ./ -RUN dotnet restore - -COPY . ./ -RUN dotnet publish -c Debug -o out - -FROM base -WORKDIR /app -COPY --from=build-env /app/out ./ - -ENTRYPOINT ["dotnet", "SampleModule.dll"] \ No newline at end of file diff --git a/tests/assets/test_solution_shared_lib/modules/SampleModule/Dockerfile.arm32v7 b/tests/assets/test_solution_shared_lib/modules/SampleModule/Dockerfile.arm32v7 deleted file mode 100644 index 7a63414..0000000 --- a/tests/assets/test_solution_shared_lib/modules/SampleModule/Dockerfile.arm32v7 +++ /dev/null @@ -1,17 +0,0 @@ -FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster-arm32v7 AS build-env -WORKDIR /app - -COPY *.csproj ./ -RUN dotnet restore - -COPY . ./ -RUN dotnet publish -c Release -o out - -FROM mcr.microsoft.com/dotnet/core/runtime:3.1-buster-slim-arm32v7 -WORKDIR /app -COPY --from=build-env /app/out ./ - -RUN useradd -ms /bin/bash moduleuser -USER moduleuser - -ENTRYPOINT ["dotnet", "SampleModule.dll"] \ No newline at end of file diff --git a/tests/assets/test_solution_shared_lib/modules/SampleModule/Dockerfile.arm32v7.debug b/tests/assets/test_solution_shared_lib/modules/SampleModule/Dockerfile.arm32v7.debug deleted file mode 100644 index 9ea88fc..0000000 --- a/tests/assets/test_solution_shared_lib/modules/SampleModule/Dockerfile.arm32v7.debug +++ /dev/null @@ -1,24 +0,0 @@ -FROM mcr.microsoft.com/dotnet/core/runtime:3.1-buster-slim-arm32v7 AS base - -RUN apt-get update && \ - apt-get install -y --no-install-recommends unzip procps && \ - rm -rf /var/lib/apt/lists/* - -RUN useradd -ms /bin/bash moduleuser -USER moduleuser -RUN curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v latest -l ~/vsdbg - -FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster-arm32v7 AS build-env -WORKDIR /app - -COPY *.csproj ./ -RUN dotnet restore - -COPY . ./ -RUN dotnet publish -c Debug -o out - -FROM base -WORKDIR /app -COPY --from=build-env /app/out ./ - -ENTRYPOINT ["dotnet", "SampleModule.dll"] \ No newline at end of file diff --git a/tests/assets/test_solution_shared_lib/modules/SampleModule/Dockerfile.arm64v8 b/tests/assets/test_solution_shared_lib/modules/SampleModule/Dockerfile.arm64v8 deleted file mode 100644 index 7b36f1c..0000000 --- a/tests/assets/test_solution_shared_lib/modules/SampleModule/Dockerfile.arm64v8 +++ /dev/null @@ -1,17 +0,0 @@ -FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster-arm64v8 AS build-env -WORKDIR /app - -COPY *.csproj ./ -RUN dotnet restore - -COPY . ./ -RUN dotnet publish -c Release -o out - -FROM mcr.microsoft.com/dotnet/core/runtime:3.1-buster-slim-arm64v8 -WORKDIR /app -COPY --from=build-env /app/out ./ - -RUN useradd -ms /bin/bash moduleuser -USER moduleuser - -ENTRYPOINT ["dotnet", "SampleModule.dll"] \ No newline at end of file diff --git a/tests/assets/test_solution_shared_lib/modules/SampleModule/Dockerfile.arm64v8.debug b/tests/assets/test_solution_shared_lib/modules/SampleModule/Dockerfile.arm64v8.debug deleted file mode 100644 index 1276629..0000000 --- a/tests/assets/test_solution_shared_lib/modules/SampleModule/Dockerfile.arm64v8.debug +++ /dev/null @@ -1,24 +0,0 @@ -FROM mcr.microsoft.com/dotnet/core/runtime:3.1-buster-slim-arm64v8 AS base - -RUN apt-get update && \ - apt-get install -y --no-install-recommends unzip procps && \ - rm -rf /var/lib/apt/lists/* - -RUN useradd -ms /bin/bash moduleuser -USER moduleuser -RUN curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v latest -l ~/vsdbg - -FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster-arm64v8 AS build-env -WORKDIR /app - -COPY *.csproj ./ -RUN dotnet restore - -COPY . ./ -RUN dotnet publish -c Debug -o out - -FROM base -WORKDIR /app -COPY --from=build-env /app/out ./ - -ENTRYPOINT ["dotnet", "SampleModule.dll"] \ No newline at end of file diff --git a/tests/assets/test_solution_shared_lib/modules/SampleModule/Dockerfile.windows-amd64 b/tests/assets/test_solution_shared_lib/modules/SampleModule/Dockerfile.windows-amd64 deleted file mode 100644 index b87de4c..0000000 --- a/tests/assets/test_solution_shared_lib/modules/SampleModule/Dockerfile.windows-amd64 +++ /dev/null @@ -1,13 +0,0 @@ -FROM mcr.microsoft.com/dotnet/core/sdk:3.1-nanoserver-1809 AS build-env -WORKDIR /app - -COPY *.csproj ./ -RUN dotnet restore - -COPY . ./ -RUN dotnet publish -c Release -o out - -FROM mcr.microsoft.com/dotnet/core/runtime:3.1-nanoserver-1809 -WORKDIR /app -COPY --from=build-env /app/out ./ -ENTRYPOINT ["dotnet", "SampleModule.dll"] \ No newline at end of file diff --git a/tests/assets/test_solution_shared_lib/modules/SampleModule/Program.cs b/tests/assets/test_solution_shared_lib/modules/SampleModule/Program.cs deleted file mode 100644 index 592dc36..0000000 --- a/tests/assets/test_solution_shared_lib/modules/SampleModule/Program.cs +++ /dev/null @@ -1,92 +0,0 @@ -namespace SampleModule -{ - using System; - using System.IO; - using System.Runtime.InteropServices; - using System.Runtime.Loader; - using System.Security.Cryptography.X509Certificates; - using System.Text; - using System.Threading; - using System.Threading.Tasks; - using Microsoft.Azure.Devices.Client; - using Microsoft.Azure.Devices.Client.Transport.Mqtt; - - class Program - { - static int counter; - - static void Main(string[] args) - { - Init().Wait(); - - // Wait until the app unloads or is cancelled - var cts = new CancellationTokenSource(); - AssemblyLoadContext.Default.Unloading += (ctx) => cts.Cancel(); - Console.CancelKeyPress += (sender, cpe) => cts.Cancel(); - WhenCancelled(cts.Token).Wait(); - } - - /// - /// Handles cleanup operations when app is cancelled or unloads - /// - public static Task WhenCancelled(CancellationToken cancellationToken) - { - var tcs = new TaskCompletionSource(); - cancellationToken.Register(s => ((TaskCompletionSource)s).SetResult(true), tcs); - return tcs.Task; - } - - /// - /// Initializes the ModuleClient and sets up the callback to receive - /// messages containing temperature information - /// - static async Task Init() - { - MqttTransportSettings mqttSetting = new MqttTransportSettings(TransportType.Mqtt_Tcp_Only); - ITransportSettings[] settings = { mqttSetting }; - - // Open a connection to the Edge runtime - ModuleClient ioTHubModuleClient = await ModuleClient.CreateFromEnvironmentAsync(settings); - await ioTHubModuleClient.OpenAsync(); - Console.WriteLine("IoT Hub module client initialized."); - - // Register callback to be called when a message is received by the module - await ioTHubModuleClient.SetInputMessageHandlerAsync("input1", PipeMessage, ioTHubModuleClient); - } - - /// - /// This method is called whenever the module is sent a message from the EdgeHub. - /// It just pipe the messages without any change. - /// It prints all the incoming messages. - /// - static async Task PipeMessage(Message message, object userContext) - { - int counterValue = Interlocked.Increment(ref counter); - - var moduleClient = userContext as ModuleClient; - if (moduleClient == null) - { - throw new InvalidOperationException("UserContext doesn't contain " + "expected values"); - } - - byte[] messageBytes = message.GetBytes(); - string messageString = Encoding.UTF8.GetString(messageBytes); - Console.WriteLine($"Received message: {counterValue}, Body: [{messageString}]"); - - if (!string.IsNullOrEmpty(messageString)) - { - using (var pipeMessage = new Message(messageBytes)) - { - foreach (var prop in message.Properties) - { - pipeMessage.Properties.Add(prop.Key, prop.Value); - } - await moduleClient.SendEventAsync("output1", pipeMessage); - - Console.WriteLine("Received message sent"); - } - } - return MessageResponse.Completed; - } - } -} diff --git a/tests/assets/test_solution_shared_lib/modules/SampleModule/SampleModule.csproj b/tests/assets/test_solution_shared_lib/modules/SampleModule/SampleModule.csproj deleted file mode 100644 index 6eedbff..0000000 --- a/tests/assets/test_solution_shared_lib/modules/SampleModule/SampleModule.csproj +++ /dev/null @@ -1,26 +0,0 @@ - - - Exe - netcoreapp3.1 - - - - True - - - - - - - - - - - - - - - - - - diff --git a/tests/assets/test_solution_shared_lib/modules/SampleModule/module.json b/tests/assets/test_solution_shared_lib/modules/SampleModule/module.json deleted file mode 100644 index 7692e28..0000000 --- a/tests/assets/test_solution_shared_lib/modules/SampleModule/module.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema-version": "0.0.1", - "description": "", - "image": { - "repository": "localhost:5000/samplemodule", - "tag": { - "version": "0.0.1", - "platforms": { - "amd64": "./Dockerfile.amd64", - "amd64.debug": "./Dockerfile.amd64.debug", - "arm32v7": "./Dockerfile.arm32v7", - "arm32v7.debug": "./Dockerfile.arm32v7.debug", - "arm64v8": "./Dockerfile.arm64v8", - "arm64v8.debug": "./Dockerfile.arm64v8.debug", - "windows-amd64": "./Dockerfile.windows-amd64" - } - }, - "buildOptions": [], - "contextPath": "./" - }, - "language": "csharp" -}