From 04f005f4d0833c6d76b01b15a486f6f13a6ca868 Mon Sep 17 00:00:00 2001 From: Damon Barry Date: Fri, 19 Feb 2021 12:34:30 -0800 Subject: [PATCH] Upgrade hosted Ubuntu agents to 18.04 (#4431) Replace some remaining references to Ubuntu 16.04 with 18.04. Note our release pipeline for docker images (`images-release.yaml`) calls `install.sh` with the `--package-arm` argument, which hasn't been updated for 18.04. That's a bigger effort that would need to be resolved before this can be merged (or handled in a separate PR). --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- builds/checkin/api-proxy.yaml | 4 +-- builds/checkin/dotnet.yaml | 4 +-- builds/checkin/edgelet.yaml | 12 ++++---- builds/checkin/mqtt.yaml | 6 ++-- builds/checkin/rust-test-modules.yaml | 4 +-- builds/checkin/watchdog.yaml | 4 +-- builds/ci/dotnet.yaml | 2 +- builds/ci/edgelet.yaml | 6 ++-- builds/ci/mqtt.yaml | 4 +-- builds/e2e/stresstest.yaml | 2 +- builds/misc/images-release.yaml | 4 +-- builds/misc/images.yaml | 4 +-- builds/service/service-deployment.yaml | 2 +- doc/EdgeRuntimeConfigSpec.md | 4 +-- edgelet/doc/devguide.md | 2 +- scripts/docker-build/README.md | 30 -------------------- scripts/docker-build/linux/amd64/Dockerfile | 31 --------------------- scripts/linux/NestTestHelper.sh | 2 +- scripts/linux/generic-rust/install.sh | 11 ++++---- scripts/linux/runE2ETest.sh | 2 +- 21 files changed, 41 insertions(+), 101 deletions(-) delete mode 100644 scripts/docker-build/README.md delete mode 100644 scripts/docker-build/linux/amd64/Dockerfile diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 6c7c79f804a..10987a2526a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -48,7 +48,7 @@ Provide a detailed set of steps to reproduce the bug. ### Device Information -* Host OS [e.g. Ubuntu 16.04, Ubuntu 18.04, Windows IoT Core]: +* Host OS [e.g. Ubuntu 18.04, Windows Server IoT 2019]: * Architecture [e.g. amd64, arm32, arm64]: * Container OS [e.g. Linux containers, Windows containers]: diff --git a/builds/checkin/api-proxy.yaml b/builds/checkin/api-proxy.yaml index a513e984baa..c7393a3d3ee 100644 --- a/builds/checkin/api-proxy.yaml +++ b/builds/checkin/api-proxy.yaml @@ -11,7 +11,7 @@ jobs: ################################################################################ displayName: Check pipeline preconditions (changes ARE in builds or edge-modules/api-proxy-module or mqtt/edgelet-client) pool: - vmImage: "ubuntu-16.04" + vmImage: "ubuntu-18.04" steps: - bash: | git log -m -1 --name-only --first-parent --pretty="" | egrep -i '^(builds|edge-modules/api-proxy-module|mqtt/edgelet-client)' @@ -29,7 +29,7 @@ jobs: dependsOn: check_run_pipeline condition: eq(dependencies.check_run_pipeline.outputs['check_files.RUN_PIPELINE'], 'true') pool: - vmImage: "ubuntu-16.04" + vmImage: "ubuntu-18.04" steps: - script: echo "##vso[task.setvariable variable=NO_VALGRIND;]true" displayName: Set env variables diff --git a/builds/checkin/dotnet.yaml b/builds/checkin/dotnet.yaml index 8ed8e4e3ee8..cb59f2bf64e 100644 --- a/builds/checkin/dotnet.yaml +++ b/builds/checkin/dotnet.yaml @@ -13,7 +13,7 @@ jobs: ################################################################################ displayName: Check pipeline preconditions (changes ARE NOT in either edgelet, docs, or mqtt folder) pool: - vmImage: "ubuntu-16.04" + vmImage: "ubuntu-18.04" steps: - bash: | git log -m -1 --name-only --first-parent --pretty="" | egrep -i -v '^(edgelet|doc|mqtt)' @@ -31,7 +31,7 @@ jobs: dependsOn: check_run_pipeline condition: eq(dependencies.check_run_pipeline.outputs['check_files.RUN_PIPELINE'], 'true') pool: - vmImage: "ubuntu-16.04" + vmImage: "ubuntu-18.04" steps: - template: ../templates/install-dotnet2.yaml - template: ../templates/install-dotnet3.yaml diff --git a/builds/checkin/edgelet.yaml b/builds/checkin/edgelet.yaml index 61a73d145f9..33506daeeaa 100644 --- a/builds/checkin/edgelet.yaml +++ b/builds/checkin/edgelet.yaml @@ -13,7 +13,7 @@ jobs: ################################################################################ displayName: Check pipeline preconditions (changes ARE in builds or edgelet) pool: - vmImage: "ubuntu-16.04" + vmImage: "ubuntu-18.04" steps: - bash: | git log -m -1 --name-only --first-parent --pretty="" | egrep -i '^(builds|edgelet)' @@ -31,7 +31,7 @@ jobs: dependsOn: check_run_pipeline condition: eq(dependencies.check_run_pipeline.outputs['check_files.RUN_PIPELINE'], 'true') pool: - vmImage: "ubuntu-16.04" + vmImage: "ubuntu-18.04" steps: - script: echo "##vso[task.setvariable variable=NO_VALGRIND;]true" displayName: Set env variables @@ -51,7 +51,7 @@ jobs: dependsOn: check_run_pipeline condition: eq(dependencies.check_run_pipeline.outputs['check_files.RUN_PIPELINE'], 'true') pool: - vmImage: "ubuntu-16.04" + vmImage: "ubuntu-18.04" variables: IOTEDGE_HOMEDIR: /tmp steps: @@ -80,7 +80,7 @@ jobs: dependsOn: check_run_pipeline condition: eq(dependencies.check_run_pipeline.outputs['check_files.RUN_PIPELINE'], 'true') pool: - vmImage: "ubuntu-16.04" + vmImage: "ubuntu-18.04" variables: IOTEDGE_HOMEDIR: /tmp steps: @@ -109,7 +109,7 @@ jobs: dependsOn: check_run_pipeline condition: eq(dependencies.check_run_pipeline.outputs['check_files.RUN_PIPELINE'], 'true') pool: - vmImage: "ubuntu-16.04" + vmImage: "ubuntu-18.04" steps: - script: echo "##vso[task.setvariable variable=NO_VALGRIND;]true" displayName: Set env variables @@ -137,7 +137,7 @@ jobs: # coverage.goal: 68 # rust.toolchain: nightly-2020-04-10 # pool: -# vmImage: "ubuntu-16.04" +# vmImage: "ubuntu-18.04" # steps: # - script: | # echo "##vso[task.setvariable variable=NO_VALGRIND;]true" diff --git a/builds/checkin/mqtt.yaml b/builds/checkin/mqtt.yaml index ac9700b8271..76ac71b269a 100644 --- a/builds/checkin/mqtt.yaml +++ b/builds/checkin/mqtt.yaml @@ -11,7 +11,7 @@ jobs: ################################################################################ displayName: Check pipeline preconditions (changes ARE in builds or mqtt) pool: - vmImage: "ubuntu-16.04" + vmImage: "ubuntu-18.04" steps: - checkout: self submodules: false @@ -32,7 +32,7 @@ jobs: dependsOn: check_run_pipeline condition: eq(dependencies.check_run_pipeline.outputs['check_files.RUN_PIPELINE'], 'true') pool: - vmImage: "ubuntu-16.04" + vmImage: "ubuntu-18.04" steps: - checkout: self submodules: false # mqtt broker does not use submodules @@ -62,7 +62,7 @@ jobs: dependsOn: check_run_pipeline condition: eq(dependencies.check_run_pipeline.outputs['check_files.RUN_PIPELINE'], 'true') pool: - vmImage: "ubuntu-16.04" + vmImage: "ubuntu-18.04" steps: - checkout: self submodules: false # mqtt broker does not use submodules diff --git a/builds/checkin/rust-test-modules.yaml b/builds/checkin/rust-test-modules.yaml index c00fd2f38ed..39f8c2a7d22 100644 --- a/builds/checkin/rust-test-modules.yaml +++ b/builds/checkin/rust-test-modules.yaml @@ -10,7 +10,7 @@ jobs: ################################################################################ displayName: Check pipeline preconditions (changes ARE in builds or test modules) pool: - vmImage: "ubuntu-16.04" + vmImage: "ubuntu-18.04" steps: - checkout: self submodules: false @@ -31,7 +31,7 @@ jobs: dependsOn: check_run_pipeline condition: eq(dependencies.check_run_pipeline.outputs['check_files.RUN_PIPELINE'], 'true') pool: - vmImage: "ubuntu-16.04" + vmImage: "ubuntu-18.04" steps: - checkout: self submodules: false diff --git a/builds/checkin/watchdog.yaml b/builds/checkin/watchdog.yaml index 2a3e77ab638..0fefe8142c3 100644 --- a/builds/checkin/watchdog.yaml +++ b/builds/checkin/watchdog.yaml @@ -11,7 +11,7 @@ jobs: ################################################################################ displayName: Check pipeline preconditions (changes ARE in builds or watchdog) pool: - vmImage: "ubuntu-16.04" + vmImage: "ubuntu-18.04" steps: - bash: | git log -m -1 --name-only --first-parent --pretty="" | egrep -i '^(builds|edge-hub/watchdog)' @@ -29,7 +29,7 @@ jobs: dependsOn: check_run_pipeline condition: eq(dependencies.check_run_pipeline.outputs['check_files.RUN_PIPELINE'], 'true') pool: - vmImage: "ubuntu-16.04" + vmImage: "ubuntu-18.04" steps: - script: echo "##vso[task.setvariable variable=RUST_BACKTRACE;]1" displayName: Set env variables diff --git a/builds/ci/dotnet.yaml b/builds/ci/dotnet.yaml index b4924512f91..71a79706109 100644 --- a/builds/ci/dotnet.yaml +++ b/builds/ci/dotnet.yaml @@ -16,7 +16,7 @@ jobs: displayName: Linux timeoutInMinutes: 120 pool: - vmImage: ubuntu-16.04 + vmImage: ubuntu-18.04 variables: testEnvironment: linux steps: diff --git a/builds/ci/edgelet.yaml b/builds/ci/edgelet.yaml index fb704f4a8b2..77c7d3b4ea8 100644 --- a/builds/ci/edgelet.yaml +++ b/builds/ci/edgelet.yaml @@ -18,7 +18,7 @@ jobs: ################################################################################ displayName: Linux amd64 pool: - vmImage: 'ubuntu-16.04' + vmImage: 'ubuntu-18.04' steps: - script: echo "##vso[task.setvariable variable=NO_VALGRIND;]true" displayName: Set env variables @@ -47,7 +47,7 @@ jobs: displayName: Linux arm32v7 timeoutInMinutes: 90 pool: - vmImage: 'ubuntu-16.04' + vmImage: 'ubuntu-18.04' steps: - script: | echo "##vso[task.setvariable variable=RUSTUP_HOME;]$VSTS_WORK/rustup" @@ -77,7 +77,7 @@ jobs: ################################################################################ displayName: Style Check pool: - vmImage: 'ubuntu-16.04' + vmImage: 'ubuntu-18.04' steps: - script: | echo "##vso[task.setvariable variable=NO_VALGRIND;]true" diff --git a/builds/ci/mqtt.yaml b/builds/ci/mqtt.yaml index 30574029fa0..953bc894709 100644 --- a/builds/ci/mqtt.yaml +++ b/builds/ci/mqtt.yaml @@ -19,7 +19,7 @@ jobs: ################################################################################ displayName: Linux amd64 pool: - vmImage: 'ubuntu-16.04' + vmImage: 'ubuntu-18.04' steps: - checkout: self submodules: false # mqtt broker does not use submodules @@ -57,7 +57,7 @@ jobs: ################################################################################ displayName: Linux arm32v7 pool: - vmImage: 'ubuntu-16.04' + vmImage: 'ubuntu-18.04' steps: - checkout: self submodules: false # mqtt broker does not use submodules diff --git a/builds/e2e/stresstest.yaml b/builds/e2e/stresstest.yaml index 1a112cdbc3e..18b608d5475 100644 --- a/builds/e2e/stresstest.yaml +++ b/builds/e2e/stresstest.yaml @@ -45,7 +45,7 @@ jobs: - Agent.OSArchitecture -equals X64 - run-stress -equals true variables: - edgelet.artifact.name: 'iotedged-ubuntu16.04-amd64' + edgelet.artifact.name: 'iotedged-ubuntu18.04-amd64' steps: - checkout: none - task: AzureKeyVault@1 diff --git a/builds/misc/images-release.yaml b/builds/misc/images-release.yaml index ef50cbe7204..333bfd4914f 100644 --- a/builds/misc/images-release.yaml +++ b/builds/misc/images-release.yaml @@ -10,7 +10,7 @@ jobs: timeoutInMinutes: 180 displayName: LinuxDotnet pool: - name: "Hosted Ubuntu 1604" + vmImage: ubuntu-18.04 steps: # Setup dependencies - bash: | @@ -331,7 +331,7 @@ jobs: ################################################################################ displayName: Publish Manifest Images pool: - vmImage: 'ubuntu-16.04' + vmImage: 'ubuntu-18.04' dependsOn: - linux_dotnet_projects steps: diff --git a/builds/misc/images.yaml b/builds/misc/images.yaml index 1b7679bc194..cd0ac506c39 100644 --- a/builds/misc/images.yaml +++ b/builds/misc/images.yaml @@ -16,7 +16,7 @@ jobs: timeoutInMinutes: 180 displayName: LinuxDotnet pool: - vmImage: 'ubuntu-16.04' + vmImage: 'ubuntu-18.04' steps: - template: ../templates/install-dotnet2.yaml - template: ../templates/install-dotnet3.yaml @@ -232,7 +232,7 @@ jobs: ################################################################################ displayName: Manifest pool: - vmImage: 'ubuntu-16.04' + vmImage: 'ubuntu-18.04' dependsOn: - linux_dotnet_projects - linux_API_proxy_module diff --git a/builds/service/service-deployment.yaml b/builds/service/service-deployment.yaml index 4a433cc3ff6..879b481fe3f 100644 --- a/builds/service/service-deployment.yaml +++ b/builds/service/service-deployment.yaml @@ -11,7 +11,7 @@ schedules: always: true pool: - vmImage: ubuntu-16.04 + vmImage: ubuntu-18.04 steps: - checkout: self diff --git a/doc/EdgeRuntimeConfigSpec.md b/doc/EdgeRuntimeConfigSpec.md index 26b3431fed2..0ac01baebaf 100644 --- a/doc/EdgeRuntimeConfigSpec.md +++ b/doc/EdgeRuntimeConfigSpec.md @@ -26,7 +26,7 @@ of values that these KV pairs can take. | ----------:|:----------:|:---------------------------- | | platform | string | "Windows", "Linux" | | osName | string | "Windows", "Ubuntu", "CentOS"| -| osVersion | string | "10.0.15063", "16.04" | +| osVersion | string | "10.0.15063", "18.04" | >### Edge Hub @@ -57,7 +57,7 @@ The following is a cumulative JSON representation of the data using sample data: "platform": "Linux", "os": { "name": "Ubuntu", - "version: "16.04" + "version: "18.04" } } } diff --git a/edgelet/doc/devguide.md b/edgelet/doc/devguide.md index b007c53df64..f80cb72f097 100644 --- a/edgelet/doc/devguide.md +++ b/edgelet/doc/devguide.md @@ -81,7 +81,7 @@ yum install \ libcurl-devel libuuid-devel openssl-devel ``` -#### Debian 8-10, Ubuntu 16.04, Ubuntu 18.04 +#### Debian 8-10, Ubuntu 18.04 ```sh apt-get update diff --git a/scripts/docker-build/README.md b/scripts/docker-build/README.md deleted file mode 100644 index edfac600568..00000000000 --- a/scripts/docker-build/README.md +++ /dev/null @@ -1,30 +0,0 @@ -Containerized Build Environment -=============================== - -This Dockerfile creates an environment based on the VSTS "Hosted Linux Preview" build agent. - -Image Creation --------------- - -``` -docker build -t edge-build-env . -``` - -Use Cases ---------- - -### Local VSTS Agent - - Launch a local VSTS agent, test your build configuration and interact with it through VSTS. - - ``` - docker run -it -e "VSTS_TOKEN=" --net host -v /var/run/docker.sock:/var/run/docker.sock edge-build-env - ``` - -### Temporary Build Environment - - Enter the environment made available to the VSTS agent, validate dependencies and test your scripts. - - ``` - docker run -it -e "VSTS_TOKEN=" --net host -v /var/run/docker.sock:/var/run/docker.sock edge-build-env /bin/bash - ``` diff --git a/scripts/docker-build/linux/amd64/Dockerfile b/scripts/docker-build/linux/amd64/Dockerfile deleted file mode 100644 index 8b6298a9000..00000000000 --- a/scripts/docker-build/linux/amd64/Dockerfile +++ /dev/null @@ -1,31 +0,0 @@ -######### -# This container is used to create a local instance -# of the "Hosted Linux Preview" VSTS build agent. -# -# It will be used to define the agent used to run -# our BVT test suite against the Raspberry Pi. -######### -FROM microsoft/vsts-agent:ubuntu-16.04-tfs-2017-docker-17.03.0-ce-standard - -ARG AGENT_VERSION="2.120.1" - -WORKDIR /vsts - -# Install VSTS-Agent -RUN curl \ - -SL https://github.com/Microsoft/vsts-agent/releases/download/v$AGENT_VERSION/vsts-agent-ubuntu.16.04-x64-$AGENT_VERSION.tar.gz \ - --output /vsts/vsts-agent-ubuntu.16.04-x64-$AGENT_VERSION.tar.gz \ - && tar xzf /vsts/vsts-agent-ubuntu.16.04-x64-$AGENT_VERSION.tar.gz \ - && rm /vsts/vsts-agent-ubuntu.16.04-x64-$AGENT_VERSION.tar.gz - -# Launch VSTS-Agent -CMD /vsts/bin/Agent.Listener configure \ - --unattended \ - --agent "${VSTS_AGENT:-$(hostname)}" \ - --url "https://${VSTS_ACCOUNT:-msazure}.visualstudio.com" \ - --auth PAT \ - --token "${VSTS_TOKEN}" \ - --pool "${VSTS_POOL:-Azure-IoT-Edge-Core}" \ - --work "${VSTS_WORK:-_work}" \ - --replace \ - && /vsts/bin/Agent.Listener run diff --git a/scripts/linux/NestTestHelper.sh b/scripts/linux/NestTestHelper.sh index 01b3cab7438..107b837b4c4 100644 --- a/scripts/linux/NestTestHelper.sh +++ b/scripts/linux/NestTestHelper.sh @@ -57,7 +57,7 @@ function get_iotedged_artifact_folder() { local path if [ "$image_architecture_label" = 'amd64' ]; then - path="$testDir/artifacts/iotedged-ubuntu16.04-amd64" + path="$testDir/artifacts/iotedged-ubuntu18.04-amd64" elif [ "$image_architecture_label" = 'arm64v8' ]; then path="$testDir/artifacts/iotedged-ubuntu18.04-aarch64" else diff --git a/scripts/linux/generic-rust/install.sh b/scripts/linux/generic-rust/install.sh index 2e903d0de82..5e5b0d8c9d1 100755 --- a/scripts/linux/generic-rust/install.sh +++ b/scripts/linux/generic-rust/install.sh @@ -77,26 +77,27 @@ process_args "$@" install_rust -# Add trusty repo to get older version of libc6-armhf-cross -sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ trusty main universe" - # Install OpenSSL, curl and uuid and valgrind sudo apt-get update || : sudo apt-get install -y \ pkg-config \ uuid-dev curl \ libcurl4-openssl-dev \ + libssl-dev \ debhelper \ dh-systemd \ valgrind -sudo apt-get remove --yes libssl-dev -sudo apt-get install --yes --target-release xenial-updates libssl-dev +# TODO: Update ARM_PACKAGE block for Ubuntu 18.04 if [[ -n "$ARM_PACKAGE" ]]; then # armhf cross tools for packaging # These packages need to be pinned to a specific version to make # the package dependent on the lowest version of glibc possible + # Add trusty repo to get older version of libc6-armhf-cross + sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ trusty main universe" + + sudo apt-get update || : sudo apt-get install -y \ binutils-arm-linux-gnueabihf=2.24-2ubuntu3cross1.98 \ libsfasan0-armhf-cross=4.8.2-16ubuntu4cross0.11 \ diff --git a/scripts/linux/runE2ETest.sh b/scripts/linux/runE2ETest.sh index c5e30c99e18..714cc04f9e2 100755 --- a/scripts/linux/runE2ETest.sh +++ b/scripts/linux/runE2ETest.sh @@ -72,7 +72,7 @@ function get_iotedge_quickstart_artifact_file() { function get_iotedged_artifact_folder() { local path if [ "$image_architecture_label" = 'amd64' ]; then - path="$E2E_TEST_DIR/artifacts/iotedged-ubuntu16.04-amd64" + path="$E2E_TEST_DIR/artifacts/iotedged-ubuntu18.04-amd64" elif [ "$image_architecture_label" = 'arm64v8' ]; then path="$E2E_TEST_DIR/artifacts/iotedged-ubuntu18.04-aarch64" else