diff --git a/.pipelines/templates/e2e-arm64-template.yml b/.pipelines/templates/e2e-arm64-template.yml index 4f649437a..3f5f3724c 100644 --- a/.pipelines/templates/e2e-arm64-template.yml +++ b/.pipelines/templates/e2e-arm64-template.yml @@ -37,10 +37,6 @@ parameters: - forceBuild - prebuilt - - name: osModifierBranch - type: string - default: "main" - - name: baseImageArtifactStage type: string default: "" @@ -67,7 +63,6 @@ stages: tridentArtifactName: trident-binaries codeCoverage: false tridentBuildOptions: ${{ parameters.tridentBuildOptions }} - osModifierBranch: ${{ parameters.osModifierBranch }} dependsOnStage: ${{ parameters.baseImageArtifactStage }} targetArchitecture: arm64 diff --git a/.pipelines/templates/e2e-template.yml b/.pipelines/templates/e2e-template.yml index 6c041711f..a0654303a 100644 --- a/.pipelines/templates/e2e-template.yml +++ b/.pipelines/templates/e2e-template.yml @@ -77,10 +77,6 @@ parameters: type: number default: 3 - - name: osModifierBranch - type: string - default: "main" - - name: baremetalTestsEnabled type: boolean default: true @@ -109,7 +105,6 @@ stages: tridentArtifactName: trident-binaries codeCoverage: false tridentBuildOptions: ${{ parameters.tridentBuildOptions }} - osModifierBranch: ${{ parameters.osModifierBranch }} dependsOnStage: ${{ parameters.baseImageArtifactStage }} targetArchitecture: amd64 @@ -129,7 +124,6 @@ stages: - ${{ if eq(parameters.stageType, 'ci') }}: - template: stages/validate_makefile/dev-build.yml parameters: - osModifierBranch: ${{ parameters.osModifierBranch }} ${{ if eq(parameters.stageType, 'ci') }}: # Run CodeQL for this in CI only runCodeql: true @@ -370,7 +364,6 @@ stages: - template: stages/testing_functional/functional-testing.yml parameters: downloadPrebuiltImage: false - osModifierBranch: ${{ parameters.osModifierBranch }} dependsOnStage: ${{ parameters.baseImageArtifactStage }} # VM Testing (host, post_merge) diff --git a/.pipelines/templates/stages/common_tasks/download-osmodifier.yml b/.pipelines/templates/stages/common_tasks/download-osmodifier.yml deleted file mode 100644 index 0a6be3ced..000000000 --- a/.pipelines/templates/stages/common_tasks/download-osmodifier.yml +++ /dev/null @@ -1,48 +0,0 @@ -parameters: - - name: tridentSourceDirectory - type: string - - - name: osModifierBuildType - displayName: OSModifier build type to download from osmodifier pipelines - type: string - values: - - dev - - preview - default: preview - - - name: targetArchitecture - type: string - values: - - amd64 - - arm64 - - - name: osModifierBranch - displayName: OSModifier branch to use for dev build type - type: string - default: "main" - -steps: - - ${{ if eq(parameters.osModifierBuildType, 'dev') }}: - - bash: | - set -ex - rm -rf azure-linux-image-tools - git clone --branch ${{ parameters.osModifierBranch }} https://github.com/microsoft/azure-linux-image-tools azure-linux-image-tools - - mkdir -p artifacts - make artifacts/osmodifier - displayName: "Build OSModifier from ${{ parameters.osModifierBranch }}" - workingDirectory: ${{ parameters.tridentSourceDirectory }} - retryCountOnTaskFailure: 3 - - - ${{ if eq(parameters.osModifierBuildType, 'preview') }}: - - task: UniversalPackages@0 - displayName: "Download OSModifier (preview - pinned version)" - inputs: - command: download - vstsFeed: polar/PolarCoreArtifacts - ${{ if eq(parameters.targetArchitecture, 'amd64') }}: - vstsFeedPackage: osmodifier_amd64_preview - ${{ if eq(parameters.targetArchitecture, 'arm64') }}: - vstsFeedPackage: osmodifier_arm64_preview - vstsPackageVersion: "1.1.0-preview.939023" - downloadDirectory: "${{ parameters.tridentSourceDirectory }}/artifacts" diff --git a/.pipelines/templates/stages/testing_functional/functional-testing.yml b/.pipelines/templates/stages/testing_functional/functional-testing.yml index 2c847909b..651e13afd 100644 --- a/.pipelines/templates/stages/testing_functional/functional-testing.yml +++ b/.pipelines/templates/stages/testing_functional/functional-testing.yml @@ -18,10 +18,6 @@ parameters: default: 5067 # [GITHUB]-trident-ci displayName: Where to download prebuilt image from - - name: osModifierBranch - type: string - default: "main" - - name: dependsOnStage type: string default: "" diff --git a/.pipelines/templates/stages/trident_rpms/build-source.yml b/.pipelines/templates/stages/trident_rpms/build-source.yml index f8e2e407b..9f565f4c7 100644 --- a/.pipelines/templates/stages/trident_rpms/build-source.yml +++ b/.pipelines/templates/stages/trident_rpms/build-source.yml @@ -6,10 +6,6 @@ parameters: type: boolean default: true - - name: osModifierBranch - type: string - default: "main" - - name: dependsOnStage type: string default: "" @@ -20,14 +16,6 @@ parameters: - amd64 - arm64 - - name: osModifierBuildType - displayName: OSModifier build type to download from osmodifier pipelines - type: string - values: - - dev - - preview - default: preview - - name: runCodeql type: boolean default: false diff --git a/.pipelines/templates/stages/trident_rpms/trident-stage.yml b/.pipelines/templates/stages/trident_rpms/trident-stage.yml index 92e7465ab..a311cb51d 100644 --- a/.pipelines/templates/stages/trident_rpms/trident-stage.yml +++ b/.pipelines/templates/stages/trident_rpms/trident-stage.yml @@ -32,10 +32,6 @@ parameters: - forceBuild - prebuilt - - name: osModifierBranch - type: string - default: "main" - - name: dependsOnStage type: string default: "" @@ -56,14 +52,8 @@ stages: parameters: tridentArtifactName: ${{ parameters.tridentArtifactName }} codeCoverage: ${{ parameters.codeCoverage }} - osModifierBranch: ${{ parameters.osModifierBranch }} dependsOnStage: ${{ parameters.dependsOnStage }} targetArchitecture: ${{ parameters.targetArchitecture }} - # trident-cicd-for-prism should run against the latest main build of osmodifier. - ${{ if eq(parameters.stageType, 'ci') }}: - osModifierBuildType: dev - ${{ else }}: - osModifierBuildType: preview ${{ if eq(parameters.stageType, 'ci') }}: # Run CodeQL for this in CI only runCodeql: true diff --git a/.pipelines/templates/stages/validate_makefile/dev-build.yml b/.pipelines/templates/stages/validate_makefile/dev-build.yml index 21420c9bb..9076475fa 100644 --- a/.pipelines/templates/stages/validate_makefile/dev-build.yml +++ b/.pipelines/templates/stages/validate_makefile/dev-build.yml @@ -1,8 +1,4 @@ parameters: - - name: osModifierBranch - type: string - default: "main" - - name: dependsOnStage type: string default: "" diff --git a/.pipelines/templates/trident-platform-cicd-for-prism-template.yml b/.pipelines/templates/trident-platform-cicd-for-prism-template.yml index 461afe453..67a6f854e 100644 --- a/.pipelines/templates/trident-platform-cicd-for-prism-template.yml +++ b/.pipelines/templates/trident-platform-cicd-for-prism-template.yml @@ -18,11 +18,6 @@ parameters: type: string default: "*.*.*" - - name: osModifierBranch - displayName: OSModifier branch to build from (if not main) - type: string - default: "main" - stages: - template: stages/base_image_config/create-base-image-config-artifact.yml - template: e2e-template.yml @@ -32,13 +27,11 @@ stages: tridentBuildOptions: forceBuild micBuildType: ${{ parameters.micBuildType }} micVersion: ${{ parameters.micVersion }} - osModifierBranch: ${{ parameters.osModifierBranch }} baseImageArtifactStage: CreateBaseImageConfig - template: e2e-arm64-template.yml parameters: stageType: ci tridentBuildOptions: forceBuild - osModifierBranch: ${{ parameters.osModifierBranch }} baseImageArtifactStage: CreateBaseImageConfig micBuildType: ${{ parameters.micBuildType }} micVersion: ${{ parameters.micVersion }} diff --git a/.pipelines/trident-cicd-for-prism.yml b/.pipelines/trident-cicd-for-prism.yml index 21bbfe387..cbd5e964d 100644 --- a/.pipelines/trident-cicd-for-prism.yml +++ b/.pipelines/trident-cicd-for-prism.yml @@ -13,11 +13,6 @@ parameters: type: string default: "*.*.*" - - name: osModifierBranch - displayName: OSModifier branch to use for dev build type - type: string - default: "main" - schedules: - cron: "0 9 * * *" # avoid trident-prerelease time displayName: Daily build @@ -57,4 +52,3 @@ extends: parameters: micBuildType: ${{ parameters.micBuildType }} micVersion: ${{ parameters.micVersion }} - osModifierBranch: ${{ parameters.osModifierBranch }} diff --git a/crates/trident_api/src/error.rs b/crates/trident_api/src/error.rs index 138606786..57aa13b16 100644 --- a/crates/trident_api/src/error.rs +++ b/crates/trident_api/src/error.rs @@ -30,10 +30,6 @@ pub enum ExecutionEnvironmentMisconfigurationError { #[error("Failed to run due to missing root privileges")] CheckRootPrivileges, - #[error("Failed to find OS Modifier binary at '{binary_path}' required by '{config}'")] - #[serde(rename = "find-os-modifier-binary")] - FindOSModifierBinary { binary_path: String, config: String }, - #[error("Failed to find required binary '{binary}'")] MissingBinary { binary: &'static str }, diff --git a/docs/Development/Building/Building.md b/docs/Development/Building/Building.md index 7ec639809..dd4fc3563 100644 --- a/docs/Development/Building/Building.md +++ b/docs/Development/Building/Building.md @@ -38,52 +38,6 @@ make build The binary will be placed at `target/release/trident`. -## Building OS Modifier - -Trident depends on `osmodifier`, a tool coming from the -[Azure Linux Image Tools](https://github.com/microsoft/azure-linux-image-tools) -repository, to perform OS image modifications. - -To build `osmodifier` locally, run: - -```bash -# Clone the Azure Linux Image Tools repository -git clone https://github.com/microsoft/azure-linux-image-tools.git - -# Run the osmodifier make target -make -C ./azure-linux-image-tools/toolkit go-osmodifier - -# Copy the built binary to the artifacts directory -cp ./azure-linux-image-tools/toolkit/out/tools/osmodifier artifacts/osmodifier - -# Clean up -rm -rf ./azure-linux-image-tools -``` - -Alternatively, you can build `osmodifier` on Azure Linux 3 using Docker: - -```bash -# Clone the Azure Linux Image Tools repository -git clone https://github.com/microsoft/azure-linux-image-tools.git - -# Build osmodifier inside an Azure Linux 3 container -docker build -t trident/osmodifier-build:latest \ - -f packaging/docker/Dockerfile-osmodifier.azl3 \ - . -mkdir -p artifacts -ID=$(docker create trident/osmodifier-build:latest) -docker cp -q $ID:/work/azure-linux-image-tools/toolkit/out/tools/osmodifier artifacts/osmodifier -docker rm -v $ID -``` - -:::info - -`osmodifier` is a portable Golang binary, so you can build it on any Linux -distribution and use it on Azure Linux 3, but it is still recommended to build it -on the same OS to avoid any potential compatibility issues. - -::: - ## Building RPMs for Azure Linux ```bash diff --git a/docs/Development/Building/Dependencies.md b/docs/Development/Building/Dependencies.md index d1fc9d00a..a36ad1ea9 100644 --- a/docs/Development/Building/Dependencies.md +++ b/docs/Development/Building/Dependencies.md @@ -11,7 +11,7 @@ Trident's dependencies. ### Compilers - Rust: latest stable -- Go: 1.25+ (for osmodifier) +- Go: 1.25+ ### Packages diff --git a/docs/Development/Testing/E2E-Tests.md b/docs/Development/Testing/E2E-Tests.md index 4c5a5c537..4debdf097 100644 --- a/docs/Development/Testing/E2E-Tests.md +++ b/docs/Development/Testing/E2E-Tests.md @@ -94,12 +94,6 @@ make bin/isopatch # Injects files into ISOs make bin/rcp-agent # Remote control plane agent ``` -### 3. Build osmodifier - -```bash -make artifacts/osmodifier -``` - ### 4. Build Trident RPMs The test images include Trident packages built from your local tree. This step @@ -111,7 +105,7 @@ make bin/trident-rpms.tar.gz ``` This requires Docker and uses the Trident packaging Dockerfile to produce -RPMs from your compiled binary and osmodifier. +RPMs from your compiled binary. ### 5. Generate SSH Keys diff --git a/docs/Development/Testing/Functional-Tests.md b/docs/Development/Testing/Functional-Tests.md index f024155e9..2a4d79b99 100644 --- a/docs/Development/Testing/Functional-Tests.md +++ b/docs/Development/Testing/Functional-Tests.md @@ -69,9 +69,6 @@ can build them individually if needed: # Build virtdeploy (VM management tool) make bin/virtdeploy -# Build osmodifier -make artifacts/osmodifier - # Build the functional test binaries with code coverage instrumentation make build-functional-test-cc diff --git a/packaging/docker/Dockerfile-osmodifier.azl3 b/packaging/docker/Dockerfile-osmodifier.azl3 deleted file mode 100644 index 40d5e2011..000000000 --- a/packaging/docker/Dockerfile-osmodifier.azl3 +++ /dev/null @@ -1,20 +0,0 @@ -### This file is primarily used to build Trident RPMs for local testing. - -FROM mcr.microsoft.com/azurelinux/base/core:3.0 -ARG GOLANG_VERSION=1.25.1 -ARG IMAGE_TOOLS_BRANCH=main - -RUN tdnf install -y make awk util-linux git python3 ca-certificates - -WORKDIR /work - -RUN \ - tdnf list golang && \ - tdnf install golang-$(tdnf list golang | grep $GOLANG_VERSION | awk '{print $2}' | tail -n 1) -y - -RUN \ - git clone --depth 1 --branch $IMAGE_TOOLS_BRANCH https://github.com/microsoft/azure-linux-image-tools && \ - mkdir -p ./azure-linux-image-tools/artifacts && \ - mkdir -p ./azure-linux-image-tools/SPECS && \ - rm $(find ./azure-linux-image-tools -name '*_test.go') && \ - make -C ./azure-linux-image-tools/toolkit go-osmodifier REBUILD_TOOLS=y SKIP_LICENSE_SCAN=y GOEXPERIMENT=nosystemcrypto diff --git a/tools/cmd/netlaunch/main.go b/tools/cmd/netlaunch/main.go index 3a6513577..a3df2ff7f 100644 --- a/tools/cmd/netlaunch/main.go +++ b/tools/cmd/netlaunch/main.go @@ -18,25 +18,24 @@ import ( ) var ( - netlaunchConfigFile string - tridentConfigFile string - iso string - logstream bool - listenPort uint16 - remoteAddressFile string - serveFolder string - maxFailures uint - traceFile string - forceColor bool - waitForProvisioned bool - onlyPrintExitCode bool - secureBoot bool - signingCert string - rcpMode string - tridentBinaryPath string - launcherBinaryPath string - osmodifierBinaryPath string - streamImage bool + netlaunchConfigFile string + tridentConfigFile string + iso string + logstream bool + listenPort uint16 + remoteAddressFile string + serveFolder string + maxFailures uint + traceFile string + forceColor bool + waitForProvisioned bool + onlyPrintExitCode bool + secureBoot bool + signingCert string + rcpMode string + tridentBinaryPath string + launcherBinaryPath string + streamImage bool ) const ( @@ -82,9 +81,6 @@ var rootCmd = &cobra.Command{ if tridentBinaryPath != "" { log.Fatal("Trident binary path specified without RCP mode") } - if osmodifierBinaryPath != "" { - log.Fatal("Osmodifier binary path specified without RCP mode") - } if streamImage { log.Fatal("Stream image specified without RCP mode") } @@ -131,10 +127,6 @@ var rootCmd = &cobra.Command{ config.Rcp.LocalLauncherPath = &launcherBinaryPath } - if osmodifierBinaryPath != "" { - config.Rcp.LocalOsmodifierPath = &osmodifierBinaryPath - } - config.Rcp.UseStreamImage = streamImage } @@ -174,7 +166,6 @@ func init() { rootCmd.PersistentFlags().StringVarP(&rcpMode, "rcp-agent-mode", "", "", "RCP agent mode to use (grpc|cli). If not specified, the rcp-agent is not used.") rootCmd.PersistentFlags().StringVarP(&tridentBinaryPath, "trident-binary", "", "", "Optional path to Trident binary to be copied into the VM, requires RCP mode.") rootCmd.PersistentFlags().StringVarP(&launcherBinaryPath, "launcher-binary", "", "", "Optional path to Launcher binary to be copied into the VM, requires RCP mode.") - rootCmd.PersistentFlags().StringVarP(&osmodifierBinaryPath, "osmodifier-binary", "", "", "Optional path to Osmodifier binary to be copied into the VM, requires RCP mode.") rootCmd.PersistentFlags().BoolVarP(&streamImage, "stream-image", "", false, "Use stream image for installation instead of the default method, requires RCP mode.") rootCmd.Flags().StringVarP(&iso, "iso", "i", "", "ISO for Netlaunch testing") rootCmd.MarkFlagRequired("iso-template") diff --git a/tools/pkg/netlaunch/config.go b/tools/pkg/netlaunch/config.go index fa4cf9e48..45089cbd0 100644 --- a/tools/pkg/netlaunch/config.go +++ b/tools/pkg/netlaunch/config.go @@ -84,10 +84,6 @@ type RcpConfiguration struct { // If not specified, no Trident binary will be copied. LocalTridentPath *string `yaml:"localTridentPath,omitempty"` - // An optional path to a local osmodifier binary to copy into the remote host. - // If not specified, no Osmodifier binary will be copied. - LocalOsmodifierPath *string `yaml:"localOsmodifierPath,omitempty"` - // An optional path to a local launcher binary to copy into the remote host. // If not specified, no launcher binary will be copied. LocalLauncherPath *string `yaml:"localLauncherPath,omitempty"` diff --git a/tools/pkg/netlaunch/netlaunch.go b/tools/pkg/netlaunch/netlaunch.go index b926e65eb..7e6ad0173 100644 --- a/tools/pkg/netlaunch/netlaunch.go +++ b/tools/pkg/netlaunch/netlaunch.go @@ -398,9 +398,6 @@ func injectRcpAgentConfig( if err := registerNamedRcpFile(rcpAgentConfBuilder, "trident", "/usr/bin/trident", localRcpConf.LocalTridentPath); err != nil { return err } - if err := registerNamedRcpFile(rcpAgentConfBuilder, "osmodifier", "/usr/bin/osmodifier", localRcpConf.LocalOsmodifierPath); err != nil { - return err - } if err := registerNamedRcpFile(rcpAgentConfBuilder, "launcher", "/usr/bin/launcher", localRcpConf.LocalLauncherPath); err != nil { return err }