Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 11 additions & 25 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -803,24 +803,8 @@ starter-configuration:
@echo "\033[33mCreated \033[36m$(TRIDENT_CONFIG)\033[33m. Please review and modify as needed! :)"
@echo "\033[33mDon't forget to add your SSH public key to the Host Configuration!"

MIC_PACKAGE_NAME ?= imagecustomizer
MIC_PACKAGE_VERSION ?= *
artifacts/imagecustomizer:
@mkdir -p artifacts
@az artifacts universal download \
--organization "https://dev.azure.com/mariner-org/" \
--project "36d030d6-1d99-4ebd-878b-09af1f4f722f" \
--scope project \
--feed "AzureLinuxArtifacts" \
--name '$(MIC_PACKAGE_NAME)' \
--version '$(MIC_PACKAGE_VERSION)' \
--path artifacts/
@chmod +x artifacts/imagecustomizer
@touch artifacts/imagecustomizer

bin/trident-mos.iso: \
artifacts/baremetal.vhdx \
artifacts/imagecustomizer \
packaging/systemd/trident-install.service \
tests/images/trident-mos/iso.yaml \
tests/images/trident-mos/files/* \
Expand All @@ -830,15 +814,17 @@ bin/trident-mos.iso: \
bin/rcp-agent
@echo "Rebuilding Trident MOS ISO: $@ from $< because of: $?"
@mkdir -p bin
BUILD_DIR=`mktemp -d` && \
trap 'sudo rm -rf $$BUILD_DIR' EXIT; \
sudo ./artifacts/imagecustomizer \
--log-level=debug \
--build-dir $$BUILD_DIR \
--image-file $< \
--output-image-file $@ \
--config-file tests/images/trident-mos/iso.yaml \
--output-image-format iso
docker run --rm \
--privileged \
-v ".:/repo:z" \
-v "/dev:/dev" \
${MIC_CONTAINER_IMAGE} \
--log-level=debug \
--build-dir /build \
--image-file /repo/$< \
--output-image-file /repo/$@ \
--config-file /repo/tests/images/trident-mos/iso.yaml \
--output-image-format iso

.PHONY: recreate-verity-image
recreate-verity-image: bin/trident-rpms.tar.gz
Expand Down
15 changes: 1 addition & 14 deletions docs/Development/Testing/E2E-Tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,20 +164,7 @@ mv artifacts/test-image/trident-usrverity-testimage_1.cosi artifacts/test-image/
The images use the Image Customizer container from
`mcr.microsoft.com/azurelinux/imagecustomizer:latest`.

### 8. Extract Image Customizer

The MOS ISO build uses the Image Customizer binary directly (not the
container). Extract it from the container image:

```bash
mkdir -p artifacts
id=$(docker create mcr.microsoft.com/azurelinux/imagecustomizer:latest)
docker cp "$id:/usr/bin/imagecustomizer" artifacts/imagecustomizer
docker rm "$id"
chmod +x artifacts/imagecustomizer
```

### 9. Build the Installer ISO
### 8. Build the Installer ISO

The management OS ISO is used by `netlaunch` to boot the VM and run Trident:

Expand Down
Loading