Skip to content

Commit

Permalink
Add ARM32 Agent to Compatibility CI Pipeline (#6300)
Browse files Browse the repository at this point in the history
* Enhance Docker Check

* Debian 11 CI Compatibility

* Set Path

* Set Path

* Set Path

* Set Path

* Set BashEnv Value

* Set BashEnv Value

* Test 1

* Test 1

* Test 2

* Test 3

* Test 4

* Test 5

* uuid

* Update Numbers

* Update Numbers
  • Loading branch information
nimanch authored Apr 22, 2022
1 parent 1e7f6ef commit 35dd6a9
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 3 deletions.
70 changes: 70 additions & 0 deletions builds/e2e/compare-compatibility.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,76 @@ jobs:
ArtifactName: compatibility-logs-amd64
condition: always()

################################################################################
- job: debian_11_arm32v7
################################################################################
displayName: Debian 11 arm32v7
pool:
name: $(pool.custom.name)
demands: compatibility-ci

variables:
os: linux
arch: arm32v7
artifactName: iotedged-debian11-arm32v7
identityServiceArtifactName: packages_debian-11-slim_arm32v7
identityServicePackageFilter: aziot-identity-service_*_armhf.deb
# skip notary installation as it is not supported for ARM platforms
skip_notary: true

timeoutInMinutes: 180

steps:
- template: templates/e2e-clean-directory.yaml
- template: templates/e2e-setup.yaml
- template: templates/e2e-clear-docker-cached-images.yaml
- task: AzureKeyVault@1
displayName: 'Get Secret'
inputs:
azureSubscription: $(az.subscription)
KeyVaultName: $(az.keyvault)
SecretsFilter: >-
edgebuild-service-principal-secret,
- bash: |
set -e
export PATH=~/azure-cli-env/bin/:$PATH
az login --service-principal -p $(edgebuild-service-principal-secret) -u $(servicePrincipal.clientId) --tenant $(servicePrincipal.tenantId)
contextPath=$(Build.SourcesDirectory)/test/Microsoft.Azure.Devices.Edge.Test/bin/Debug/net6.0/context.json
mkdir -p $(Build.ArtifactStagingDirectory)/compat
edgeAgentImage="$(cat $contextPath | jq '.edgeAgentImage' | tr -d '"')"
edgeHubImage="$(cat $contextPath | jq '.edgeHubImage' | tr -d '"')"
tempSensorImage="$(cat $contextPath | jq '.tempSensorImage' | tr -d '"')"
az extension add --name azure-iot
sudo --preserve-env $(Build.SourcesDirectory)/platform-validation/scripts/check-for-updates.sh \
-f $(Build.SourcesDirectory)/platform-validation/deployment/platform-compatibility.json \
-u $(Build.SourcesDirectory)/platform-validation/scripts/analyzeSystemStats.sh \
-c $(Build.SourcesDirectory)/platform-validation/scripts/aziot-compatibility.sh \
-b $(System.ArtifactsDirectory)/$(artifactName) \
-t $(TIME_TO_RUN_SECONDS) \
--edge-agent-image $edgeAgentImage \
--edge-hub-image $edgeHubImage \
--temp-sensor-image $tempSensorImage \
-o "$(Build.ArtifactStagingDirectory)/compat" \
--config-toml-path $(Build.SourcesDirectory)/platform-validation/deployment/template.toml
displayName: Check Usage
name: check_usage
env:
IOTHUB_NAME: $(IOT_HUB_NAME)
REGISTRY_ADDRESS: $(cr.address)
REGISTRY_USERNAME: $(cr.username)
REGISTRY_PASSWORD: $(cr.password)
- task: PublishBuildArtifacts@1
displayName: Publish logs
inputs:
PathtoPublish: $(Build.ArtifactStagingDirectory)/compat
ArtifactName: compatibility-logs-amd64
condition: always()
- bash: |
sudo rm -rf $(Build.ArtifactStagingDirectory)/compat || true
displayName: Cleanup
name: cleanup
condition: always()
# TODO : Current 1ES Image for ARM64 requires some additional installation, We should add these to our 1ES Base Image
################################################################################
- job: ubuntu_2004_arm64v8
Expand Down
4 changes: 2 additions & 2 deletions platform-validation/scripts/aziot-compatibility.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ SHARED_LIB_LIBSSSL_1_0="libssl.so.1.0"
#TODO : Update these numbers after Automated Run. The goal is that for every release, we would update these numbers
armv7l_iotedge_binaries_size=36.68
armv7l_iotedge_binaries_avg_memory=35.51
armv7l_iotedge_container_size=322.98
armv7l_iotedge_container_size=269
armv7l_iotedge_container_memory=164.53
x86_64_iotedge_binaries_size=42.39
x86_64_iotedge_binaries_avg_memory=54.24
x86_64_iotedge_container_size=254.96
x86_64_iotedge_container_size=195
x86_64_iotedge_container_memory=175
aarch64_iotedge_binaries_size=36.68
aarch64_iotedge_binaries_avg_memory=26.62
Expand Down
5 changes: 4 additions & 1 deletion platform-validation/scripts/check-for-updates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ function provision_edge_device() {

function create_edge_deployment() {
sudo apt-get install -y uuid
DEPLOYMENT_ID=iotedge-benchmarking-$(uuidgen)
DEPLOYMENT_ID=iotedge-benchmarking-$(uuid)
cp "$DEPLOYMENT_FILE_NAME" $TEMP_DEPLOYMENT_FILE
sed -i -e "s@<CR.Address>@$REGISTRY_ADDRESS@g" "$TEMP_DEPLOYMENT_FILE"
sed -i -e "s@<CR.UserName>@$REGISTRY_USERNAME@g" "$TEMP_DEPLOYMENT_FILE"
Expand Down Expand Up @@ -318,6 +318,9 @@ process_args "$@"
exit 1
}

# On ARM32 Agents, we need to specify path to azure cli since it runs in a python Environment
# due to issues with azure-cli running on ARM. On other platforms, the following line will be a no-op
export PATH=~/azure-cli-env/bin/:$PATH
cleanup_files
BENCHMARK_OUTPUT_DIR="$OUTPUT_PATH/memory-usage-results"
#Start the Memory Usage Script so that we can capture startup memory usage
Expand Down

0 comments on commit 35dd6a9

Please sign in to comment.