Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to all porter bundles to build docker images for amd64 platform from arm64 machines locally #3827

Merged
merged 11 commits into from
Jan 23, 2024
1 change: 1 addition & 0 deletions .github/linters/.hadolint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ ignored:
# sometimes pinned versions are removed from the package source so we decided to ignore this rule.
- DL3008
- DL3018
- DL3029
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ ENHANCEMENTS:
* Extend PowerShell auto start script to start core VMs ([#3811](https://github.com/microsoft/AzureTRE/issues/3811))
* Use managed identity for API connection to CosmosDB ([#345](https://github.com/microsoft/AzureTRE/issues/345))
* Switch to Structured Firewall Logs ([#3816](https://github.com/microsoft/AzureTRE/pull/3816))
* Support for building core and workspace service bundles on arm64 platforms ([#3823](https://github.com/microsoft/AzureTRE/issues/3823))

BUG FIXES:
* Fix issue with workspace menu not working correctly([#3819](https://github.com/microsoft/AzureTRE/issues/3819))
Expand Down
2 changes: 1 addition & 1 deletion api_app/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.18.1"
__version__ = "0.18.2"
4 changes: 2 additions & 2 deletions api_app/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ azure-mgmt-compute==30.3.0
azure-mgmt-cosmosdb==9.3.0
azure-mgmt-costmanagement==4.0.1
azure-mgmt-resource==23.0.1
azure-monitor-opentelemetry==1.1.0
azure-monitor-opentelemetry==1.1.1
azure-servicebus==7.11.3
azure-storage-blob==12.19.0
fastapi==0.104.0
fastapi-utils==0.2.1
gunicorn==21.2.0
jsonschema[format_nongpl]==4.19.1
msal==1.22.0
opentelemetry.instrumentation.logging==0.41b0
opentelemetry.instrumentation.logging==0.43b0
pandas==2.0.3
PyJWT==2.8.0
pytz==2022.7
Expand Down
1 change: 1 addition & 0 deletions core/terraform/api-webapp.tf
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ resource "azurerm_linux_web_app" "api" {
STORAGE_ENDPOINT_SUFFIX = module.terraform_azurerm_environment_configuration.storage_suffix
LOGGING_LEVEL = var.logging_level
OTEL_RESOURCE_ATTRIBUTES = "service.name=api,service.version=${local.version}"
OTEL_EXPERIMENTAL_RESOURCE_DETECTORS = "azure_app_service"
}

identity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ write_files:
AAD_AUTHORITY_URL=${aad_authority_url}
MICROSOFT_GRAPH_FQDN=${microsoft_graph_fqdn}
OTEL_RESOURCE_ATTRIBUTES=service.name=resource_processor,service.version=${resource_processor_vmss_porter_image_tag}
OTEL_EXPERIMENTAL_RESOURCE_DETECTORS=azure_vm
LOGGING_LEVEL=${logging_level}
${rp_bundle_values}
- path: /etc/cron.hourly/docker-prune
Expand Down
2 changes: 1 addition & 1 deletion core/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.9.4"
__version__ = "0.9.5"
10 changes: 9 additions & 1 deletion devops/scripts/bundle_runtime_image_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,15 @@ if [ -n "${CI_CACHE_ACR_NAME:-}" ]; then
docker_cache+=("--cache-from" "${CI_CACHE_ACR_NAME}${acr_domain_suffix}/${IMAGE_NAME_PREFIX}/${image_name}:${version}")
fi

docker build --build-arg BUILDKIT_INLINE_CACHE=1 \
ARCHITECTURE=$(docker info --format "{{ .Architecture }}" )
m1p1h marked this conversation as resolved.
Show resolved Hide resolved

if [ "${ARCHITECTURE}" == "aarch64" ]; then
DOCKER_BUILD_COMMAND="docker buildx build --platform linux/amd64"
else
DOCKER_BUILD_COMMAND="docker build"
fi

${DOCKER_BUILD_COMMAND} --build-arg BUILDKIT_INLINE_CACHE=1 \
-t "${FULL_IMAGE_NAME_PREFIX}/${image_name}:${version}" \
"${docker_cache[@]}" -f "${docker_file}" "${docker_context}"

2 changes: 1 addition & 1 deletion resource_processor/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.8.1"
__version__ = "0.8.2"
4 changes: 2 additions & 2 deletions resource_processor/vmss_porter/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
aiohttp==3.9.0
azure-cli-core==2.50.0
azure-identity==1.14.1
azure-monitor-opentelemetry==1.1.0
azure-monitor-opentelemetry==1.1.1
azure-servicebus==7.11.3
opentelemetry.instrumentation.logging==0.41b0
opentelemetry.instrumentation.logging==0.43b0
2 changes: 1 addition & 1 deletion templates/shared_services/admin-vm/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/shared_services/airlock_notifier/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/shared_services/certs/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM python:3.8-slim-bullseye
FROM --platform=linux/amd64 python:3.8-slim-bullseye

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/shared_services/cyclecloud/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/shared_services/databricks-auth/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/shared_services/firewall/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/shared_services/gitea/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/workspace_services/azureml/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/workspace_services/databricks/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/workspace_services/gitea/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/workspace_services/guacamole/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/workspace_services/innereye/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/workspace_services/mlflow/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/workspace_services/mysql/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/workspace_services/ohdsi/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/workspaces/airlock-import-review/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/workspaces/base/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
2 changes: 1 addition & 1 deletion templates/workspaces/unrestricted/Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile-upstream:1.4.0
FROM debian:bullseye-slim
FROM --platform=linux/amd64 debian:bullseye-slim

# PORTER_INIT

Expand Down
Loading