diff --git a/.azure-pipelines/docker-linux/community-ubuntu-server/hyperv.yml b/.azure-pipelines/docker-linux/community-ubuntu-server/hyperv.yml new file mode 100644 index 000000000..aa6e5d739 --- /dev/null +++ b/.azure-pipelines/docker-linux/community-ubuntu-server/hyperv.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: ubuntu-server.2204-lts.hyperv + +stages: + - template: ../../stages.yml + parameters: + sample: docker-linux + image: community-ubuntu-server + provider: hyperv diff --git a/.azure-pipelines/docker-linux/community-ubuntu-server/virtualbox.yml b/.azure-pipelines/docker-linux/community-ubuntu-server/virtualbox.yml new file mode 100644 index 000000000..3c57afe49 --- /dev/null +++ b/.azure-pipelines/docker-linux/community-ubuntu-server/virtualbox.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: ubuntu-server.2204-lts.virtualbox + +stages: + - template: ../../stages.yml + parameters: + sample: docker-linux + image: community-ubuntu-server + provider: virtualbox diff --git a/.azure-pipelines/docker-linux/community-ubuntu-server/vmware.yml b/.azure-pipelines/docker-linux/community-ubuntu-server/vmware.yml new file mode 100644 index 000000000..275a600b8 --- /dev/null +++ b/.azure-pipelines/docker-linux/community-ubuntu-server/vmware.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: ubuntu-server.2204-lts.vmware + +stages: + - template: ../../stages.yml + parameters: + sample: docker-linux + image: community-ubuntu-server + provider: vmware diff --git a/.azure-pipelines/docker-windows/community-windows-server-core/hyperv.yml b/.azure-pipelines/docker-windows/community-windows-server-core/hyperv.yml new file mode 100644 index 000000000..2d5c65880 --- /dev/null +++ b/.azure-pipelines/docker-windows/community-windows-server-core/hyperv.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-server.2022-standard-core.hyperv + +stages: + - template: ../../stages.yml + parameters: + sample: docker-windows + image: community-windows-server-core + provider: hyperv diff --git a/.azure-pipelines/docker-windows/community-windows-server-core/virtualbox.yml b/.azure-pipelines/docker-windows/community-windows-server-core/virtualbox.yml new file mode 100644 index 000000000..2f81f3497 --- /dev/null +++ b/.azure-pipelines/docker-windows/community-windows-server-core/virtualbox.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-server.2022-standard-core.virtualbox + +stages: + - template: ../../stages.yml + parameters: + sample: docker-windows + image: community-windows-server-core + provider: virtualbox diff --git a/.azure-pipelines/docker-windows/community-windows-server-core/vmware.yml b/.azure-pipelines/docker-windows/community-windows-server-core/vmware.yml new file mode 100644 index 000000000..1d95999c2 --- /dev/null +++ b/.azure-pipelines/docker-windows/community-windows-server-core/vmware.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-server.2022-standard-core.vmware + +stages: + - template: ../../stages.yml + parameters: + sample: docker-windows + image: community-windows-server-core + provider: vmware diff --git a/.azure-pipelines/docker-windows/community-windows-server/hyperv.yml b/.azure-pipelines/docker-windows/community-windows-server/hyperv.yml new file mode 100644 index 000000000..1ca8ddfa9 --- /dev/null +++ b/.azure-pipelines/docker-windows/community-windows-server/hyperv.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-server.2022-standard.hyperv + +stages: + - template: ../../stages.yml + parameters: + sample: docker-windows + image: community-windows-server + provider: hyperv diff --git a/.azure-pipelines/docker-windows/community-windows-server/virtualbox.yml b/.azure-pipelines/docker-windows/community-windows-server/virtualbox.yml new file mode 100644 index 000000000..c5fc53346 --- /dev/null +++ b/.azure-pipelines/docker-windows/community-windows-server/virtualbox.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-server.2022-standard.virtualbox + +stages: + - template: ../../stages.yml + parameters: + sample: docker-windows + image: community-windows-server + provider: virtualbox diff --git a/.azure-pipelines/docker-windows/community-windows-server/vmware.yml b/.azure-pipelines/docker-windows/community-windows-server/vmware.yml new file mode 100644 index 000000000..feac508bb --- /dev/null +++ b/.azure-pipelines/docker-windows/community-windows-server/vmware.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-server.2022-standard.vmware + +stages: + - template: ../../stages.yml + parameters: + sample: docker-windows + image: community-windows-server + provider: vmware diff --git a/.azure-pipelines/iis/windows-server-core/hyperv.yml b/.azure-pipelines/iis/windows-server-core/hyperv.yml new file mode 100644 index 000000000..ce796d476 --- /dev/null +++ b/.azure-pipelines/iis/windows-server-core/hyperv.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-server.2022-standard-core.hyperv + +stages: + - template: ../../stages.yml + parameters: + sample: iis + image: windows-server-core + provider: hyperv diff --git a/.azure-pipelines/iis/windows-server-core/virtualbox.yml b/.azure-pipelines/iis/windows-server-core/virtualbox.yml new file mode 100644 index 000000000..02682fa96 --- /dev/null +++ b/.azure-pipelines/iis/windows-server-core/virtualbox.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-server.2022-standard-core.virtualbox + +stages: + - template: ../../stages.yml + parameters: + sample: iis + image: windows-server-core + provider: virtualbox diff --git a/.azure-pipelines/iis/windows-server-core/vmware.yml b/.azure-pipelines/iis/windows-server-core/vmware.yml new file mode 100644 index 000000000..7806e6da9 --- /dev/null +++ b/.azure-pipelines/iis/windows-server-core/vmware.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-server.2022-standard-core.vmware + +stages: + - template: ../../stages.yml + parameters: + sample: iis + image: windows-server-core + provider: vmware diff --git a/.azure-pipelines/iis/windows-server/hyperv.yml b/.azure-pipelines/iis/windows-server/hyperv.yml new file mode 100644 index 000000000..2e4b24102 --- /dev/null +++ b/.azure-pipelines/iis/windows-server/hyperv.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-server.2022-standard.hyperv + +stages: + - template: ../../stages.yml + parameters: + sample: iis + image: windows-server + provider: hyperv diff --git a/.azure-pipelines/iis/windows-server/virtualbox.yml b/.azure-pipelines/iis/windows-server/virtualbox.yml new file mode 100644 index 000000000..6f78e30af --- /dev/null +++ b/.azure-pipelines/iis/windows-server/virtualbox.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-server.2022-standard.virtualbox + +stages: + - template: ../../stages.yml + parameters: + sample: iis + image: windows-server + provider: virtualbox diff --git a/.azure-pipelines/iis/windows-server/vmware.yml b/.azure-pipelines/iis/windows-server/vmware.yml new file mode 100644 index 000000000..6b0df8b16 --- /dev/null +++ b/.azure-pipelines/iis/windows-server/vmware.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-server.2022-standard.vmware + +stages: + - template: ../../stages.yml + parameters: + sample: iis + image: windows-server + provider: vmware diff --git a/.azure-pipelines/jobs.yml b/.azure-pipelines/jobs.yml new file mode 100644 index 000000000..cb7126d8f --- /dev/null +++ b/.azure-pipelines/jobs.yml @@ -0,0 +1,146 @@ +parameters: + sample: '' + image: '' + provider: '' + build: '' + +jobs: + - job: build + displayName: Build ${{ parameters.sample }}/${{ parameters.image }}/${{ parameters.provider }}/${{ parameters.build }} + + pool: + name: default + demands: + - VSTS_AGENT_CAP_VIRTUALIZATION_PROVIDER -equals ${{ parameters.provider }} + + workspace: + clean: all + + timeoutInMinutes: 150 + + variables: + sourcePipelineArtifactsPath: $[ replace(variables['resources.pipeline.source.pipelineName'], '.', '/') ] + + steps: + - checkout: self + submodules: recursive + + - script: | + dotnet --info + + dotnet tool restore + displayName: Initialize .NET + + - script: | + packer --version + displayName: Initialize Packer + + - script: | + vagrant --version + vagrant plugin list + + vagrant box list + vagrant global-status --prune + displayName: Initialize Vagrant + + - script: | + dotnet cake --configuration ${{ parameters.sample }}/${{ parameters.image }}/${{ parameters.provider }}/${{ parameters.build }} --target init + displayName: Init + + - script: | + dotnet cake --configuration ${{ parameters.sample }}/${{ parameters.image }}/${{ parameters.provider }}/${{ parameters.build }} --target restore --exclusive + displayName: Restore + + - ${{ if eq(parameters.build, 'native') }}: + - task: DownloadPipelineArtifact@2 + inputs: + source: specific + artifact: native-build + targetPath: ./artifacts/$(sourcePipelineArtifactsPath)/native + project: $(System.TeamProjectId) + pipeline: $(resources.pipeline.source.pipelineID) + runVersion: latestFromBranch + runBranch: $(Build.SourceBranch) + displayName: Download artifacts + condition: and(succeeded(), ne(variables['resources.pipeline.source.pipelineID'], '')) + + - ${{ if eq(parameters.build, 'vagrant') }}: + - task: DownloadPipelineArtifact@2 + inputs: + source: current + artifact: native-build + targetPath: ./artifacts/${{ parameters.sample }}/${{ parameters.image }}/${{ parameters.provider }}/native + displayName: Download artifacts + + - script: | + dotnet cake --configuration ${{ parameters.sample }}/${{ parameters.image }}/${{ parameters.provider }}/${{ parameters.build }} --target build --exclusive + displayName: Build + + - script: | + dotnet cake --configuration ${{ parameters.sample }}/${{ parameters.image }}/${{ parameters.provider }}/${{ parameters.build }} --target test --exclusive + displayName: Test + + - publish: ./artifacts/${{ parameters.sample }}/${{ parameters.image }}/${{ parameters.provider }}/${{ parameters.build }} + artifact: ${{ parameters.build }}-build + displayName: Publish artifacts + + - script: | + dotnet cake --configuration ${{ parameters.sample }}/${{ parameters.image }}/${{ parameters.provider }}/${{ parameters.build }} --target clean + displayName: Clean + condition: always() + + - ${{ if eq(parameters.build, 'vagrant') }}: + - job: publish + displayName: Publish ${{ parameters.sample }}/${{ parameters.image }}/${{ parameters.provider }}/${{ parameters.build }} + dependsOn: build + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) + + pool: + vmImage: ubuntu-22.04 + + variables: + - group: environment-vagrantcloud + + steps: + - checkout: self + submodules: recursive + + - script: | + df -h + + sudo rm -Rf /usr/local/lib/android + sudo rm -Rf /usr/local/lib/node_modules + df -h + displayName: Initialize agent + + - script: | + dotnet --info + + dotnet tool restore + displayName: Initialize .NET + + - script: | + packer --version + displayName: Initialize Packer + + - script: | + dotnet cake --configuration ${{ parameters.sample }}/${{ parameters.image }}/${{ parameters.provider }}/${{ parameters.build }} --target init + displayName: Init + + - task: DownloadPipelineArtifact@2 + inputs: + source: current + artifact: vagrant-build + targetPath: ./artifacts/${{ parameters.sample }}/${{ parameters.image }}/${{ parameters.provider }}/vagrant + displayName: Download artifacts + + - script: | + dotnet cake --configuration ${{ parameters.sample }}/${{ parameters.image }}/${{ parameters.provider }}/${{ parameters.build }} --target publish --exclusive + displayName: Publish + env: + VAGRANT_CLOUD_TOKEN: $(environment-vagrant-cloud-token) + + - script: | + dotnet cake --configuration ${{ parameters.sample }}/${{ parameters.image }}/${{ parameters.provider }}/${{ parameters.build }} --target clean + displayName: Clean + condition: always() diff --git a/.azure-pipelines/kitchen-ubuntu/2204/hyperv.yml b/.azure-pipelines/kitchen-ubuntu/2204/hyperv.yml new file mode 100644 index 000000000..047d6aab9 --- /dev/null +++ b/.azure-pipelines/kitchen-ubuntu/2204/hyperv.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: ubuntu-server.2204-lts.hyperv + +stages: + - template: ../../stages.yml + parameters: + sample: kitchen-ubuntu + image: "2204" + provider: hyperv diff --git a/.azure-pipelines/kitchen-ubuntu/2204/virtualbox.yml b/.azure-pipelines/kitchen-ubuntu/2204/virtualbox.yml new file mode 100644 index 000000000..835dee619 --- /dev/null +++ b/.azure-pipelines/kitchen-ubuntu/2204/virtualbox.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: ubuntu-server.2204-lts.virtualbox + +stages: + - template: ../../stages.yml + parameters: + sample: kitchen-ubuntu + image: "2204" + provider: virtualbox diff --git a/.azure-pipelines/kitchen-ubuntu/2204/vmware.yml b/.azure-pipelines/kitchen-ubuntu/2204/vmware.yml new file mode 100644 index 000000000..b6025901b --- /dev/null +++ b/.azure-pipelines/kitchen-ubuntu/2204/vmware.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: ubuntu-server.2204-lts.vmware + +stages: + - template: ../../stages.yml + parameters: + sample: kitchen-ubuntu + image: "2204" + provider: vmware diff --git a/.azure-pipelines/kitchen-windows/2022/hyperv.yml b/.azure-pipelines/kitchen-windows/2022/hyperv.yml new file mode 100644 index 000000000..099a0fbe4 --- /dev/null +++ b/.azure-pipelines/kitchen-windows/2022/hyperv.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-server.2022-standard-core.hyperv + +stages: + - template: ../../stages.yml + parameters: + sample: kitchen-windows + image: "2022" + provider: hyperv diff --git a/.azure-pipelines/kitchen-windows/2022/virtualbox.yml b/.azure-pipelines/kitchen-windows/2022/virtualbox.yml new file mode 100644 index 000000000..0617f0e7d --- /dev/null +++ b/.azure-pipelines/kitchen-windows/2022/virtualbox.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-server.2022-standard-core.virtualbox + +stages: + - template: ../../stages.yml + parameters: + sample: kitchen-windows + image: "2022" + provider: virtualbox diff --git a/.azure-pipelines/kitchen-windows/2022/vmware.yml b/.azure-pipelines/kitchen-windows/2022/vmware.yml new file mode 100644 index 000000000..08f1de588 --- /dev/null +++ b/.azure-pipelines/kitchen-windows/2022/vmware.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-server.2022-standard-core.vmware + +stages: + - template: ../../stages.yml + parameters: + sample: kitchen-windows + image: "2022" + provider: vmware diff --git a/.azure-pipelines/sql-server/2019-developer-windows-server-core/hyperv.yml b/.azure-pipelines/sql-server/2019-developer-windows-server-core/hyperv.yml new file mode 100644 index 000000000..4e55a7aa2 --- /dev/null +++ b/.azure-pipelines/sql-server/2019-developer-windows-server-core/hyperv.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-server.2022-standard-core.hyperv + +stages: + - template: ../../stages.yml + parameters: + sample: sql-server + image: 2019-developer-windows-server-core + provider: hyperv diff --git a/.azure-pipelines/sql-server/2019-developer-windows-server-core/virtualbox.yml b/.azure-pipelines/sql-server/2019-developer-windows-server-core/virtualbox.yml new file mode 100644 index 000000000..d3f8a652a --- /dev/null +++ b/.azure-pipelines/sql-server/2019-developer-windows-server-core/virtualbox.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-server.2022-standard-core.virtualbox + +stages: + - template: ../../stages.yml + parameters: + sample: sql-server + image: 2019-developer-windows-server-core + provider: virtualbox diff --git a/.azure-pipelines/sql-server/2019-developer-windows-server-core/vmware.yml b/.azure-pipelines/sql-server/2019-developer-windows-server-core/vmware.yml new file mode 100644 index 000000000..77ad5ffca --- /dev/null +++ b/.azure-pipelines/sql-server/2019-developer-windows-server-core/vmware.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-server.2022-standard-core.vmware + +stages: + - template: ../../stages.yml + parameters: + sample: sql-server + image: 2019-developer-windows-server-core + provider: vmware diff --git a/.azure-pipelines/sql-server/2019-developer-windows-server/hyperv.yml b/.azure-pipelines/sql-server/2019-developer-windows-server/hyperv.yml new file mode 100644 index 000000000..ffbe9c4b4 --- /dev/null +++ b/.azure-pipelines/sql-server/2019-developer-windows-server/hyperv.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-server.2022-standard.hyperv + +stages: + - template: ../../stages.yml + parameters: + sample: sql-server + image: 2019-developer-windows-server + provider: hyperv diff --git a/.azure-pipelines/sql-server/2019-developer-windows-server/virtualbox.yml b/.azure-pipelines/sql-server/2019-developer-windows-server/virtualbox.yml new file mode 100644 index 000000000..9fbd2d109 --- /dev/null +++ b/.azure-pipelines/sql-server/2019-developer-windows-server/virtualbox.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-server.2022-standard.virtualbox + +stages: + - template: ../../stages.yml + parameters: + sample: sql-server + image: 2019-developer-windows-server + provider: virtualbox diff --git a/.azure-pipelines/sql-server/2019-developer-windows-server/vmware.yml b/.azure-pipelines/sql-server/2019-developer-windows-server/vmware.yml new file mode 100644 index 000000000..fbb600a3a --- /dev/null +++ b/.azure-pipelines/sql-server/2019-developer-windows-server/vmware.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-server.2022-standard.vmware + +stages: + - template: ../../stages.yml + parameters: + sample: sql-server + image: 2019-developer-windows-server + provider: vmware diff --git a/.azure-pipelines/stages.yml b/.azure-pipelines/stages.yml new file mode 100644 index 000000000..ccd8d997d --- /dev/null +++ b/.azure-pipelines/stages.yml @@ -0,0 +1,27 @@ +parameters: + sample: '' + image: '' + provider: '' + +stages: + - stage: native + displayName: Native + + jobs: + - template: ./jobs.yml + parameters: + sample: ${{ parameters.sample }} + image: ${{ parameters.image }} + provider: ${{ parameters.provider }} + build: native + + - stage: vagrant + displayName: Vagrant + + jobs: + - template: ./jobs.yml + parameters: + sample: ${{ parameters.sample }} + image: ${{ parameters.image }} + provider: ${{ parameters.provider }} + build: vagrant diff --git a/.azure-pipelines/ubuntu-desktop/2004-lts-ubuntu/hyperv.yml b/.azure-pipelines/ubuntu-desktop/2004-lts-ubuntu/hyperv.yml new file mode 100644 index 000000000..ae66fe385 --- /dev/null +++ b/.azure-pipelines/ubuntu-desktop/2004-lts-ubuntu/hyperv.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: ubuntu-server.2004-lts.hyperv + +stages: + - template: ../../stages.yml + parameters: + sample: ubuntu-desktop + image: 2004-lts-ubuntu + provider: hyperv diff --git a/.azure-pipelines/ubuntu-desktop/2004-lts-ubuntu/virtualbox.yml b/.azure-pipelines/ubuntu-desktop/2004-lts-ubuntu/virtualbox.yml new file mode 100644 index 000000000..56954380a --- /dev/null +++ b/.azure-pipelines/ubuntu-desktop/2004-lts-ubuntu/virtualbox.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: ubuntu-server.2004-lts.virtualbox + +stages: + - template: ../../stages.yml + parameters: + sample: ubuntu-desktop + image: 2004-lts-ubuntu + provider: virtualbox diff --git a/.azure-pipelines/ubuntu-desktop/2004-lts-ubuntu/vmware.yml b/.azure-pipelines/ubuntu-desktop/2004-lts-ubuntu/vmware.yml new file mode 100644 index 000000000..0e6d01ac7 --- /dev/null +++ b/.azure-pipelines/ubuntu-desktop/2004-lts-ubuntu/vmware.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: ubuntu-server.2004-lts.vmware + +stages: + - template: ../../stages.yml + parameters: + sample: ubuntu-desktop + image: 2004-lts-ubuntu + provider: vmware diff --git a/.azure-pipelines/ubuntu-desktop/2004-lts-xubuntu/hyperv.yml b/.azure-pipelines/ubuntu-desktop/2004-lts-xubuntu/hyperv.yml new file mode 100644 index 000000000..d99e5c0af --- /dev/null +++ b/.azure-pipelines/ubuntu-desktop/2004-lts-xubuntu/hyperv.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: ubuntu-server.2004-lts.hyperv + +stages: + - template: ../../stages.yml + parameters: + sample: ubuntu-desktop + image: 2004-lts-xubuntu + provider: hyperv diff --git a/.azure-pipelines/ubuntu-desktop/2004-lts-xubuntu/virtualbox.yml b/.azure-pipelines/ubuntu-desktop/2004-lts-xubuntu/virtualbox.yml new file mode 100644 index 000000000..643adb9fc --- /dev/null +++ b/.azure-pipelines/ubuntu-desktop/2004-lts-xubuntu/virtualbox.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: ubuntu-server.2004-lts.virtualbox + +stages: + - template: ../../stages.yml + parameters: + sample: ubuntu-desktop + image: 2004-lts-xubuntu + provider: virtualbox diff --git a/.azure-pipelines/ubuntu-desktop/2004-lts-xubuntu/vmware.yml b/.azure-pipelines/ubuntu-desktop/2004-lts-xubuntu/vmware.yml new file mode 100644 index 000000000..c7023115e --- /dev/null +++ b/.azure-pipelines/ubuntu-desktop/2004-lts-xubuntu/vmware.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: ubuntu-server.2004-lts.vmware + +stages: + - template: ../../stages.yml + parameters: + sample: ubuntu-desktop + image: 2004-lts-xubuntu + provider: vmware diff --git a/.azure-pipelines/ubuntu-desktop/2204-lts-ubuntu/hyperv.yml b/.azure-pipelines/ubuntu-desktop/2204-lts-ubuntu/hyperv.yml new file mode 100644 index 000000000..32be35727 --- /dev/null +++ b/.azure-pipelines/ubuntu-desktop/2204-lts-ubuntu/hyperv.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: ubuntu-server.2204-lts.hyperv + +stages: + - template: ../../stages.yml + parameters: + sample: ubuntu-desktop + image: 2204-lts-ubuntu + provider: hyperv diff --git a/.azure-pipelines/ubuntu-desktop/2204-lts-ubuntu/virtualbox.yml b/.azure-pipelines/ubuntu-desktop/2204-lts-ubuntu/virtualbox.yml new file mode 100644 index 000000000..8ecdc44f3 --- /dev/null +++ b/.azure-pipelines/ubuntu-desktop/2204-lts-ubuntu/virtualbox.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: ubuntu-server.2204-lts.virtualbox + +stages: + - template: ../../stages.yml + parameters: + sample: ubuntu-desktop + image: 2204-lts-ubuntu + provider: virtualbox diff --git a/.azure-pipelines/ubuntu-desktop/2204-lts-ubuntu/vmware.yml b/.azure-pipelines/ubuntu-desktop/2204-lts-ubuntu/vmware.yml new file mode 100644 index 000000000..02b8a5f2c --- /dev/null +++ b/.azure-pipelines/ubuntu-desktop/2204-lts-ubuntu/vmware.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: ubuntu-server.2204-lts.vmware + +stages: + - template: ../../stages.yml + parameters: + sample: ubuntu-desktop + image: 2204-lts-ubuntu + provider: vmware diff --git a/.azure-pipelines/ubuntu-desktop/2204-lts-xubuntu/hyperv.yml b/.azure-pipelines/ubuntu-desktop/2204-lts-xubuntu/hyperv.yml new file mode 100644 index 000000000..6aebd72e2 --- /dev/null +++ b/.azure-pipelines/ubuntu-desktop/2204-lts-xubuntu/hyperv.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: ubuntu-server.2204-lts.hyperv + +stages: + - template: ../../stages.yml + parameters: + sample: ubuntu-desktop + image: 2204-lts-xubuntu + provider: hyperv diff --git a/.azure-pipelines/ubuntu-desktop/2204-lts-xubuntu/virtualbox.yml b/.azure-pipelines/ubuntu-desktop/2204-lts-xubuntu/virtualbox.yml new file mode 100644 index 000000000..8693d8162 --- /dev/null +++ b/.azure-pipelines/ubuntu-desktop/2204-lts-xubuntu/virtualbox.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: ubuntu-server.2204-lts.virtualbox + +stages: + - template: ../../stages.yml + parameters: + sample: ubuntu-desktop + image: 2204-lts-xubuntu + provider: virtualbox diff --git a/.azure-pipelines/ubuntu-desktop/2204-lts-xubuntu/vmware.yml b/.azure-pipelines/ubuntu-desktop/2204-lts-xubuntu/vmware.yml new file mode 100644 index 000000000..2a17098ce --- /dev/null +++ b/.azure-pipelines/ubuntu-desktop/2204-lts-xubuntu/vmware.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: ubuntu-server.2204-lts.vmware + +stages: + - template: ../../stages.yml + parameters: + sample: ubuntu-desktop + image: 2204-lts-xubuntu + provider: vmware diff --git a/.azure-pipelines/ubuntu-server/2004-lts/hyperv.yml b/.azure-pipelines/ubuntu-server/2004-lts/hyperv.yml new file mode 100644 index 000000000..7f49149e0 --- /dev/null +++ b/.azure-pipelines/ubuntu-server/2004-lts/hyperv.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: ubuntu-server + image: 2004-lts + provider: hyperv diff --git a/.azure-pipelines/ubuntu-server/2004-lts/virtualbox.yml b/.azure-pipelines/ubuntu-server/2004-lts/virtualbox.yml new file mode 100644 index 000000000..d3e13ebd0 --- /dev/null +++ b/.azure-pipelines/ubuntu-server/2004-lts/virtualbox.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: ubuntu-server + image: 2004-lts + provider: virtualbox diff --git a/.azure-pipelines/ubuntu-server/2004-lts/vmware.yml b/.azure-pipelines/ubuntu-server/2004-lts/vmware.yml new file mode 100644 index 000000000..f67abb408 --- /dev/null +++ b/.azure-pipelines/ubuntu-server/2004-lts/vmware.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: ubuntu-server + image: 2004-lts + provider: vmware diff --git a/.azure-pipelines/ubuntu-server/2204-lts/hyperv.yml b/.azure-pipelines/ubuntu-server/2204-lts/hyperv.yml new file mode 100644 index 000000000..5deeddb67 --- /dev/null +++ b/.azure-pipelines/ubuntu-server/2204-lts/hyperv.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: ubuntu-server + image: 2204-lts + provider: hyperv diff --git a/.azure-pipelines/ubuntu-server/2204-lts/virtualbox.yml b/.azure-pipelines/ubuntu-server/2204-lts/virtualbox.yml new file mode 100644 index 000000000..47588f7e2 --- /dev/null +++ b/.azure-pipelines/ubuntu-server/2204-lts/virtualbox.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: ubuntu-server + image: 2204-lts + provider: virtualbox diff --git a/.azure-pipelines/ubuntu-server/2204-lts/vmware.yml b/.azure-pipelines/ubuntu-server/2204-lts/vmware.yml new file mode 100644 index 000000000..21d78851b --- /dev/null +++ b/.azure-pipelines/ubuntu-server/2204-lts/vmware.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: ubuntu-server + image: 2204-lts + provider: vmware diff --git a/.azure-pipelines/visual-studio/2019-community-windows-10/hyperv.yml b/.azure-pipelines/visual-studio/2019-community-windows-10/hyperv.yml new file mode 100644 index 000000000..ce2aab161 --- /dev/null +++ b/.azure-pipelines/visual-studio/2019-community-windows-10/hyperv.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-10.22h2-enterprise.hyperv + +stages: + - template: ../../stages.yml + parameters: + sample: visual-studio + image: 2019-community-windows-10 + provider: hyperv diff --git a/.azure-pipelines/visual-studio/2019-community-windows-10/virtualbox.yml b/.azure-pipelines/visual-studio/2019-community-windows-10/virtualbox.yml new file mode 100644 index 000000000..4d4b2f245 --- /dev/null +++ b/.azure-pipelines/visual-studio/2019-community-windows-10/virtualbox.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-10.22h2-enterprise.virtualbox + +stages: + - template: ../../stages.yml + parameters: + sample: visual-studio + image: 2019-community-windows-10 + provider: virtualbox diff --git a/.azure-pipelines/visual-studio/2019-community-windows-10/vmware.yml b/.azure-pipelines/visual-studio/2019-community-windows-10/vmware.yml new file mode 100644 index 000000000..21a218466 --- /dev/null +++ b/.azure-pipelines/visual-studio/2019-community-windows-10/vmware.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-10.22h2-enterprise.vmware + +stages: + - template: ../../stages.yml + parameters: + sample: visual-studio + image: 2019-community-windows-10 + provider: vmware diff --git a/.azure-pipelines/visual-studio/2019-community-windows-11/hyperv.yml b/.azure-pipelines/visual-studio/2019-community-windows-11/hyperv.yml new file mode 100644 index 000000000..41f59d641 --- /dev/null +++ b/.azure-pipelines/visual-studio/2019-community-windows-11/hyperv.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-11.23h2-enterprise.hyperv + +stages: + - template: ../../stages.yml + parameters: + sample: visual-studio + image: 2019-community-windows-11 + provider: hyperv diff --git a/.azure-pipelines/visual-studio/2019-community-windows-11/virtualbox.yml b/.azure-pipelines/visual-studio/2019-community-windows-11/virtualbox.yml new file mode 100644 index 000000000..65470ec45 --- /dev/null +++ b/.azure-pipelines/visual-studio/2019-community-windows-11/virtualbox.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-11.23h2-enterprise.virtualbox + +stages: + - template: ../../stages.yml + parameters: + sample: visual-studio + image: 2019-community-windows-11 + provider: virtualbox diff --git a/.azure-pipelines/visual-studio/2019-community-windows-11/vmware.yml b/.azure-pipelines/visual-studio/2019-community-windows-11/vmware.yml new file mode 100644 index 000000000..62ecd5e00 --- /dev/null +++ b/.azure-pipelines/visual-studio/2019-community-windows-11/vmware.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-11.23h2-enterprise.vmware + +stages: + - template: ../../stages.yml + parameters: + sample: visual-studio + image: 2019-community-windows-11 + provider: vmware diff --git a/.azure-pipelines/visual-studio/2022-community-windows-10/hyperv.yml b/.azure-pipelines/visual-studio/2022-community-windows-10/hyperv.yml new file mode 100644 index 000000000..b7b724733 --- /dev/null +++ b/.azure-pipelines/visual-studio/2022-community-windows-10/hyperv.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-10.22h2-enterprise.hyperv + +stages: + - template: ../../stages.yml + parameters: + sample: visual-studio + image: 2022-community-windows-10 + provider: hyperv diff --git a/.azure-pipelines/visual-studio/2022-community-windows-10/virtualbox.yml b/.azure-pipelines/visual-studio/2022-community-windows-10/virtualbox.yml new file mode 100644 index 000000000..05b11bc57 --- /dev/null +++ b/.azure-pipelines/visual-studio/2022-community-windows-10/virtualbox.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-10.22h2-enterprise.virtualbox + +stages: + - template: ../../stages.yml + parameters: + sample: visual-studio + image: 2022-community-windows-10 + provider: virtualbox diff --git a/.azure-pipelines/visual-studio/2022-community-windows-10/vmware.yml b/.azure-pipelines/visual-studio/2022-community-windows-10/vmware.yml new file mode 100644 index 000000000..9a0c9c084 --- /dev/null +++ b/.azure-pipelines/visual-studio/2022-community-windows-10/vmware.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-10.22h2-enterprise.vmware + +stages: + - template: ../../stages.yml + parameters: + sample: visual-studio + image: 2022-community-windows-10 + provider: vmware diff --git a/.azure-pipelines/visual-studio/2022-community-windows-11/hyperv.yml b/.azure-pipelines/visual-studio/2022-community-windows-11/hyperv.yml new file mode 100644 index 000000000..1f9fbb611 --- /dev/null +++ b/.azure-pipelines/visual-studio/2022-community-windows-11/hyperv.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-11.23h2-enterprise.hyperv + +stages: + - template: ../../stages.yml + parameters: + sample: visual-studio + image: 2022-community-windows-11 + provider: hyperv diff --git a/.azure-pipelines/visual-studio/2022-community-windows-11/virtualbox.yml b/.azure-pipelines/visual-studio/2022-community-windows-11/virtualbox.yml new file mode 100644 index 000000000..3f562d3b4 --- /dev/null +++ b/.azure-pipelines/visual-studio/2022-community-windows-11/virtualbox.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-11.23h2-enterprise.virtualbox + +stages: + - template: ../../stages.yml + parameters: + sample: visual-studio + image: 2022-community-windows-11 + provider: virtualbox diff --git a/.azure-pipelines/visual-studio/2022-community-windows-11/vmware.yml b/.azure-pipelines/visual-studio/2022-community-windows-11/vmware.yml new file mode 100644 index 000000000..6f44c3fd3 --- /dev/null +++ b/.azure-pipelines/visual-studio/2022-community-windows-11/vmware.yml @@ -0,0 +1,14 @@ +trigger: none +pr: none + +resources: + pipelines: + - pipeline: source + source: windows-11.23h2-enterprise.vmware + +stages: + - template: ../../stages.yml + parameters: + sample: visual-studio + image: 2022-community-windows-11 + provider: vmware diff --git a/.azure-pipelines/windows-10/1809-enterprise-ltsc/hyperv.yml b/.azure-pipelines/windows-10/1809-enterprise-ltsc/hyperv.yml new file mode 100644 index 000000000..4490def73 --- /dev/null +++ b/.azure-pipelines/windows-10/1809-enterprise-ltsc/hyperv.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-10 + image: 1809-enterprise-ltsc + provider: hyperv diff --git a/.azure-pipelines/windows-10/1809-enterprise-ltsc/virtualbox.yml b/.azure-pipelines/windows-10/1809-enterprise-ltsc/virtualbox.yml new file mode 100644 index 000000000..2deba6b58 --- /dev/null +++ b/.azure-pipelines/windows-10/1809-enterprise-ltsc/virtualbox.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-10 + image: 1809-enterprise-ltsc + provider: virtualbox diff --git a/.azure-pipelines/windows-10/1809-enterprise-ltsc/vmware.yml b/.azure-pipelines/windows-10/1809-enterprise-ltsc/vmware.yml new file mode 100644 index 000000000..0fc057c6a --- /dev/null +++ b/.azure-pipelines/windows-10/1809-enterprise-ltsc/vmware.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-10 + image: 1809-enterprise-ltsc + provider: vmware diff --git a/.azure-pipelines/windows-10/21h2-enterprise-ltsc/hyperv.yml b/.azure-pipelines/windows-10/21h2-enterprise-ltsc/hyperv.yml new file mode 100644 index 000000000..e0ef8ee10 --- /dev/null +++ b/.azure-pipelines/windows-10/21h2-enterprise-ltsc/hyperv.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-10 + image: 21h2-enterprise-ltsc + provider: hyperv diff --git a/.azure-pipelines/windows-10/21h2-enterprise-ltsc/virtualbox.yml b/.azure-pipelines/windows-10/21h2-enterprise-ltsc/virtualbox.yml new file mode 100644 index 000000000..8f6d2f58e --- /dev/null +++ b/.azure-pipelines/windows-10/21h2-enterprise-ltsc/virtualbox.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-10 + image: 21h2-enterprise-ltsc + provider: virtualbox diff --git a/.azure-pipelines/windows-10/21h2-enterprise-ltsc/vmware.yml b/.azure-pipelines/windows-10/21h2-enterprise-ltsc/vmware.yml new file mode 100644 index 000000000..d6acc2c4d --- /dev/null +++ b/.azure-pipelines/windows-10/21h2-enterprise-ltsc/vmware.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-10 + image: 21h2-enterprise-ltsc + provider: vmware diff --git a/.azure-pipelines/windows-10/21h2-enterprise/hyperv.yml b/.azure-pipelines/windows-10/21h2-enterprise/hyperv.yml new file mode 100644 index 000000000..972b89dc0 --- /dev/null +++ b/.azure-pipelines/windows-10/21h2-enterprise/hyperv.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-10 + image: 21h2-enterprise + provider: hyperv diff --git a/.azure-pipelines/windows-10/21h2-enterprise/virtualbox.yml b/.azure-pipelines/windows-10/21h2-enterprise/virtualbox.yml new file mode 100644 index 000000000..fd9aa9b1d --- /dev/null +++ b/.azure-pipelines/windows-10/21h2-enterprise/virtualbox.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-10 + image: 21h2-enterprise + provider: virtualbox diff --git a/.azure-pipelines/windows-10/21h2-enterprise/vmware.yml b/.azure-pipelines/windows-10/21h2-enterprise/vmware.yml new file mode 100644 index 000000000..55c89853c --- /dev/null +++ b/.azure-pipelines/windows-10/21h2-enterprise/vmware.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-10 + image: 21h2-enterprise + provider: vmware diff --git a/.azure-pipelines/windows-10/22h2-enterprise/hyperv.yml b/.azure-pipelines/windows-10/22h2-enterprise/hyperv.yml new file mode 100644 index 000000000..60f923831 --- /dev/null +++ b/.azure-pipelines/windows-10/22h2-enterprise/hyperv.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-10 + image: 22h2-enterprise + provider: hyperv diff --git a/.azure-pipelines/windows-10/22h2-enterprise/virtualbox.yml b/.azure-pipelines/windows-10/22h2-enterprise/virtualbox.yml new file mode 100644 index 000000000..ef93f9a4a --- /dev/null +++ b/.azure-pipelines/windows-10/22h2-enterprise/virtualbox.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-10 + image: 22h2-enterprise + provider: virtualbox diff --git a/.azure-pipelines/windows-10/22h2-enterprise/vmware.yml b/.azure-pipelines/windows-10/22h2-enterprise/vmware.yml new file mode 100644 index 000000000..ed613b2f1 --- /dev/null +++ b/.azure-pipelines/windows-10/22h2-enterprise/vmware.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-10 + image: 22h2-enterprise + provider: vmware diff --git a/.azure-pipelines/windows-11/21h2-enterprise/hyperv.yml b/.azure-pipelines/windows-11/21h2-enterprise/hyperv.yml new file mode 100644 index 000000000..79eef0698 --- /dev/null +++ b/.azure-pipelines/windows-11/21h2-enterprise/hyperv.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-11 + image: 21h2-enterprise + provider: hyperv diff --git a/.azure-pipelines/windows-11/21h2-enterprise/virtualbox.yml b/.azure-pipelines/windows-11/21h2-enterprise/virtualbox.yml new file mode 100644 index 000000000..d9e112281 --- /dev/null +++ b/.azure-pipelines/windows-11/21h2-enterprise/virtualbox.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-11 + image: 21h2-enterprise + provider: virtualbox diff --git a/.azure-pipelines/windows-11/21h2-enterprise/vmware.yml b/.azure-pipelines/windows-11/21h2-enterprise/vmware.yml new file mode 100644 index 000000000..c85fbc3d5 --- /dev/null +++ b/.azure-pipelines/windows-11/21h2-enterprise/vmware.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-11 + image: 21h2-enterprise + provider: vmware diff --git a/.azure-pipelines/windows-11/22h2-enterprise/hyperv.yml b/.azure-pipelines/windows-11/22h2-enterprise/hyperv.yml new file mode 100644 index 000000000..58dabe54b --- /dev/null +++ b/.azure-pipelines/windows-11/22h2-enterprise/hyperv.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-11 + image: 22h2-enterprise + provider: hyperv diff --git a/.azure-pipelines/windows-11/22h2-enterprise/virtualbox.yml b/.azure-pipelines/windows-11/22h2-enterprise/virtualbox.yml new file mode 100644 index 000000000..12bc7fc28 --- /dev/null +++ b/.azure-pipelines/windows-11/22h2-enterprise/virtualbox.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-11 + image: 22h2-enterprise + provider: virtualbox diff --git a/.azure-pipelines/windows-11/22h2-enterprise/vmware.yml b/.azure-pipelines/windows-11/22h2-enterprise/vmware.yml new file mode 100644 index 000000000..52cd8a6ab --- /dev/null +++ b/.azure-pipelines/windows-11/22h2-enterprise/vmware.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-11 + image: 22h2-enterprise + provider: vmware diff --git a/.azure-pipelines/windows-11/23h2-enterprise/hyperv.yml b/.azure-pipelines/windows-11/23h2-enterprise/hyperv.yml new file mode 100644 index 000000000..8d1380549 --- /dev/null +++ b/.azure-pipelines/windows-11/23h2-enterprise/hyperv.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-11 + image: 23h2-enterprise + provider: hyperv diff --git a/.azure-pipelines/windows-11/23h2-enterprise/virtualbox.yml b/.azure-pipelines/windows-11/23h2-enterprise/virtualbox.yml new file mode 100644 index 000000000..665bcc3a1 --- /dev/null +++ b/.azure-pipelines/windows-11/23h2-enterprise/virtualbox.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-11 + image: 23h2-enterprise + provider: virtualbox diff --git a/.azure-pipelines/windows-11/23h2-enterprise/vmware.yml b/.azure-pipelines/windows-11/23h2-enterprise/vmware.yml new file mode 100644 index 000000000..2576a1b5c --- /dev/null +++ b/.azure-pipelines/windows-11/23h2-enterprise/vmware.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-11 + image: 23h2-enterprise + provider: vmware diff --git a/.azure-pipelines/windows-11/insider-preview-enterprise/hyperv.yml b/.azure-pipelines/windows-11/insider-preview-enterprise/hyperv.yml new file mode 100644 index 000000000..3f3dbb90c --- /dev/null +++ b/.azure-pipelines/windows-11/insider-preview-enterprise/hyperv.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-11 + image: insider-preview-enterprise + provider: hyperv diff --git a/.azure-pipelines/windows-11/insider-preview-enterprise/vmware.yml b/.azure-pipelines/windows-11/insider-preview-enterprise/vmware.yml new file mode 100644 index 000000000..0ebe4062b --- /dev/null +++ b/.azure-pipelines/windows-11/insider-preview-enterprise/vmware.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-11 + image: insider-preview-enterprise + provider: vmware diff --git a/.azure-pipelines/windows-server/2019-standard-core/hyperv.yml b/.azure-pipelines/windows-server/2019-standard-core/hyperv.yml new file mode 100644 index 000000000..6fe4f07e0 --- /dev/null +++ b/.azure-pipelines/windows-server/2019-standard-core/hyperv.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-server + image: 2019-standard-core + provider: hyperv diff --git a/.azure-pipelines/windows-server/2019-standard-core/virtualbox.yml b/.azure-pipelines/windows-server/2019-standard-core/virtualbox.yml new file mode 100644 index 000000000..bf581d84c --- /dev/null +++ b/.azure-pipelines/windows-server/2019-standard-core/virtualbox.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-server + image: 2019-standard-core + provider: virtualbox diff --git a/.azure-pipelines/windows-server/2019-standard-core/vmware.yml b/.azure-pipelines/windows-server/2019-standard-core/vmware.yml new file mode 100644 index 000000000..c8734ef42 --- /dev/null +++ b/.azure-pipelines/windows-server/2019-standard-core/vmware.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-server + image: 2019-standard-core + provider: vmware diff --git a/.azure-pipelines/windows-server/2019-standard/hyperv.yml b/.azure-pipelines/windows-server/2019-standard/hyperv.yml new file mode 100644 index 000000000..5a2baafe4 --- /dev/null +++ b/.azure-pipelines/windows-server/2019-standard/hyperv.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-server + image: 2019-standard + provider: hyperv diff --git a/.azure-pipelines/windows-server/2019-standard/virtualbox.yml b/.azure-pipelines/windows-server/2019-standard/virtualbox.yml new file mode 100644 index 000000000..b29fa6b3a --- /dev/null +++ b/.azure-pipelines/windows-server/2019-standard/virtualbox.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-server + image: 2019-standard + provider: virtualbox diff --git a/.azure-pipelines/windows-server/2019-standard/vmware.yml b/.azure-pipelines/windows-server/2019-standard/vmware.yml new file mode 100644 index 000000000..bd7a06665 --- /dev/null +++ b/.azure-pipelines/windows-server/2019-standard/vmware.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-server + image: 2019-standard + provider: vmware diff --git a/.azure-pipelines/windows-server/2022-standard-core/hyperv.yml b/.azure-pipelines/windows-server/2022-standard-core/hyperv.yml new file mode 100644 index 000000000..213d6dd1c --- /dev/null +++ b/.azure-pipelines/windows-server/2022-standard-core/hyperv.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-server + image: 2022-standard-core + provider: hyperv diff --git a/.azure-pipelines/windows-server/2022-standard-core/virtualbox.yml b/.azure-pipelines/windows-server/2022-standard-core/virtualbox.yml new file mode 100644 index 000000000..b90935c13 --- /dev/null +++ b/.azure-pipelines/windows-server/2022-standard-core/virtualbox.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-server + image: 2022-standard-core + provider: virtualbox diff --git a/.azure-pipelines/windows-server/2022-standard-core/vmware.yml b/.azure-pipelines/windows-server/2022-standard-core/vmware.yml new file mode 100644 index 000000000..fb76208c0 --- /dev/null +++ b/.azure-pipelines/windows-server/2022-standard-core/vmware.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-server + image: 2022-standard-core + provider: vmware diff --git a/.azure-pipelines/windows-server/2022-standard/hyperv.yml b/.azure-pipelines/windows-server/2022-standard/hyperv.yml new file mode 100644 index 000000000..570e59d7e --- /dev/null +++ b/.azure-pipelines/windows-server/2022-standard/hyperv.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-server + image: 2022-standard + provider: hyperv diff --git a/.azure-pipelines/windows-server/2022-standard/virtualbox.yml b/.azure-pipelines/windows-server/2022-standard/virtualbox.yml new file mode 100644 index 000000000..469bf6210 --- /dev/null +++ b/.azure-pipelines/windows-server/2022-standard/virtualbox.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-server + image: 2022-standard + provider: virtualbox diff --git a/.azure-pipelines/windows-server/2022-standard/vmware.yml b/.azure-pipelines/windows-server/2022-standard/vmware.yml new file mode 100644 index 000000000..97e06ffc1 --- /dev/null +++ b/.azure-pipelines/windows-server/2022-standard/vmware.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-server + image: 2022-standard + provider: vmware diff --git a/.azure-pipelines/windows-server/insider-preview-standard-core/hyperv.yml b/.azure-pipelines/windows-server/insider-preview-standard-core/hyperv.yml new file mode 100644 index 000000000..8fc92ad96 --- /dev/null +++ b/.azure-pipelines/windows-server/insider-preview-standard-core/hyperv.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-server + image: insider-preview-standard-core + provider: hyperv diff --git a/.azure-pipelines/windows-server/insider-preview-standard-core/vmware.yml b/.azure-pipelines/windows-server/insider-preview-standard-core/vmware.yml new file mode 100644 index 000000000..80cbd52e8 --- /dev/null +++ b/.azure-pipelines/windows-server/insider-preview-standard-core/vmware.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-server + image: insider-preview-standard-core + provider: vmware diff --git a/.azure-pipelines/windows-server/insider-preview-standard/hyperv.yml b/.azure-pipelines/windows-server/insider-preview-standard/hyperv.yml new file mode 100644 index 000000000..e94cda3e2 --- /dev/null +++ b/.azure-pipelines/windows-server/insider-preview-standard/hyperv.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-server + image: insider-preview-standard + provider: hyperv diff --git a/.azure-pipelines/windows-server/insider-preview-standard/vmware.yml b/.azure-pipelines/windows-server/insider-preview-standard/vmware.yml new file mode 100644 index 000000000..51c6245bb --- /dev/null +++ b/.azure-pipelines/windows-server/insider-preview-standard/vmware.yml @@ -0,0 +1,9 @@ +trigger: none +pr: none + +stages: + - template: ../../stages.yml + parameters: + sample: windows-server + image: insider-preview-standard + provider: vmware diff --git a/.gitattributes b/.gitattributes index 39e11bad0..91b7b21b1 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,6 @@ * text=auto *.sh text eol=lf +*.ps1 text eol=crlf + *.cfg text eol=lf diff --git a/.gitignore b/.gitignore index f5edd1d2f..16ea32ca8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,4 @@ -tools -build - -.vagrant -vagrant.*override*.yml - *.lock.json -.chef -Berksfile.lock - -**/.consul/ -**/.terraform/ +packer_cache +artifacts +.vagrant diff --git a/.rubocop.yml b/.rubocop.yml index 7c2778875..5b1b04db8 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,6 +1,6 @@ AllCops: Exclude: - - ./build/**/* + - ./artifacts/**/* - ./lib/**/* Layout/EndOfLine: diff --git a/README.md b/README.md index f547539cd..61d474a99 100644 --- a/README.md +++ b/README.md @@ -1,498 +1,69 @@ # Packer -**Contents** [TL;DR] | [Overview] | [Getting started] | [Usage] | [Next steps] | [Contributing] | [Resources] +[Overview] | [Usage] | [Contributing] | [Resources] -This repository contains [Packer] samples for [Docker], [IIS], [SQL Server] and [Visual Studio] on [Windows] and [Ubuntu], building virtual machine images and [Vagrant] boxes for [VirtualBox], [VMware] and [Hyper-V], provisioned with [Chef]. +This repository contains [Packer] templates for building Windows and Ubuntu images in various development scenarios. -## TL;DR +> [!IMPORTANT] +> The [templates have been upgraded][PackerJSONToHCL] from Packer's legacy JSON format to use the newer HCL format, resulting in breaking changes in the image build proces. +> +> To upgrade your fork or other customizations to the newer HCL format, please follow the documentation on [contributing]. Feature updates and bug fixes will be available only in this version in the future. +> +> To continue using the version based on the legacy JSON format, use the tag of the [2310.0.0][LastJSONRelease] release. Feature updates and bug fixes will not be backported to this version in the future. -- [Vagrant boxes] ready to use for virtualizing hosting and development scenarios. -- [Virtual workstations] for automating the configuration of your development environments. -- Blogs with an overview of the [why][BlogWhy], [how][BlogHow] and what of Packer. - -[TL;DR]: #tldr +[PackerJSONToHCL]: https://developer.hashicorp.com/packer/docs/templates/json_to_hcl +[LastJSONRelease]: https://github.com/gusztavvargadr/packer/tree/2310.0.0 ## Overview -**Contents** [Operating systems] | [Hosting] | [Development] - -> **Note** This section covers the details of the published [Vagrant boxes] this repository builds. See the [Getting started] section to build your own virtual machine images. See [virtual workstations] for samples of automating the configuration of your development environments using them and [these][BlogWhy] [blogs][BlogHow] for more background and motivation. - -This repository contains [Packer] sample templates for the following virtualization scenarios: - - - [Operating systems] for generic experiments with [Windows] and [Ubuntu]. - - [Hosting] using [Docker], [IIS] and [SQL Server]. - - [Development] using [Visual Studio]. - -The virtual machine images and [Vagrant] boxes are built for [VirtualBox], [VMware] and [Hyper-V], and are provisioned using [Chef]. +Ready-to-use [Vagrant] boxes built using this repository are published on [Vagrant Cloud][VagrantCloudBoxes]. -> **Note** All the components, including the core operating systems, share the following characteristics: -> -> * They are based on their publicly available versions. You might need to provide your own license(s) (for example, a valid Windows or Visual Studio license) to start or keep using them after their evaluation periods expire. -> * They are installed using their latest available versions. The latest patches (for example, all the Windows Updates) are applied as well. -> * Unless noted otherwise, they are installed using the default configuration options. +See the [documentation][DocumentationOverview] for more details on the available images. [Overview]: #overview -[Vagrant boxes]: https://app.vagrantup.com/gusztavvargadr/ -[Virtual workstations]: https://github.com/gusztavvargadr/workstations/ -[BlogWhy]: https://bit.ly/wdywttt5 -[BlogHow]: https://bit.ly/wdywttt7 - -[Packer]: https://packer.io -[Vagrant]: https://vagrantup.com -[VirtualBox]: https://virtualbox.org -[VMware]: https://www.vmware.com/products/workstation-pro.html -[Hyper-V]: https://en.wikipedia.org/wiki/Hyper-V -[Chef]: https://chef.io - -### Operating systems - -The following Vagrant boxes can be used for generic experiments on the respective platforms. They contain the core operating system with the minimum configuration required to make Vagrant work, and some of the commonly used tools installed and options configured for easier provisioning. All the other Vagrant boxes below are based on these configurations as well. - -[Operating systems]: #operating-systems - -#### Windows - -[Windows]: #windows - -##### Windows Server - -[Sample usage][windows-server-sample-usage] - -- [Windows Server][windows-server-default-box] -- [Windows Server **2022 Standard**][windows-server-2022-standard-box] -- [Windows Server **2022 Standard** No Configuration Management][windows-server-2022-standard-nocm-box] -- [Windows Server **2019 Standard**][windows-server-2019-standard-box] -- [Windows Server **Insider Preview Standard**][windows-server-insider-preview-standard-box] - -[windows-server-sample-usage]: ./samples/windows-server/ - -[windows-server-default-box]: https://app.vagrantup.com/gusztavvargadr/boxes/windows-server/ -[windows-server-2022-standard-box]: https://app.vagrantup.com/gusztavvargadr/boxes/windows-server-2022-standard/ -[windows-server-2022-standard-nocm-box]: https://app.vagrantup.com/gusztavvargadr/boxes/windows-server-2022-standard-nocm/ -[windows-server-2019-standard-box]: https://app.vagrantup.com/gusztavvargadr/boxes/windows-server-2019-standard/ -[windows-server-insider-preview-standard-box]: https://app.vagrantup.com/gusztavvargadr/boxes/windows-server-insider-preview-standard/ - -##### Windows Server Core - -[Sample usage][windows-server-core-sample-usage] - -- [Windows Server Core][windows-server-core-default-box] -- [Windows Server **2022 Standard** Core][windows-server-2022-standard-core-box] -- [Windows Server **2019 Standard** Core][windows-server-2019-standard-core-box] -- [Windows Server **Insider Preview Standard** Core][windows-server-insider-preview-standard-core-box] - -[windows-server-core-sample-usage]: ./samples/windows-server-core/ - -[windows-server-core-default-box]: https://app.vagrantup.com/gusztavvargadr/boxes/windows-server-core/ -[windows-server-2022-standard-core-box]: https://app.vagrantup.com/gusztavvargadr/boxes/windows-server-2022-standard-core/ -[windows-server-2019-standard-core-box]: https://app.vagrantup.com/gusztavvargadr/boxes/windows-server-2019-standard-core/ -[windows-server-insider-preview-standard-core-box]: https://app.vagrantup.com/gusztavvargadr/boxes/windows-server-insider-preview-standard-core/ - -##### Windows 11 - -[Sample usage][windows-11-sample-usage] - -- [Windows 11][windows-11-default-box] -- [Windows 11 **Version 22H2 Enterprise**][windows-11-22h2-enterprise-box] -- [Windows 11 **Version 21H2 Enterprise**][windows-11-21h2-enterprise-box] -- [Windows 11 **Insider Preview Enterprise**][windows-11-insider-preview-enterprise-box] - -[windows-11-sample-usage]: ./samples/windows-11/ - -[windows-11-default-box]: https://app.vagrantup.com/gusztavvargadr/boxes/windows-11/ -[windows-11-22h2-enterprise-box]: https://app.vagrantup.com/gusztavvargadr/boxes/windows-11-22h2-enterprise/ -[windows-11-21h2-enterprise-box]: https://app.vagrantup.com/gusztavvargadr/boxes/windows-11-21h2-enterprise/ -[windows-11-insider-preview-enterprise-box]: https://app.vagrantup.com/gusztavvargadr/boxes/windows-11-insider-preview-enterprise/ - -##### Windows 10 - -[Sample usage][windows-10-sample-usage] - -- [Windows 10][windows-10-default-box] -- [Windows 10 **Version 22H2 Enterprise**][windows-10-22h2-enterprise-box] -- [Windows 10 **Version 22H2 Enterprise** No Configuration Management][windows-10-22h2-enterprise-nocm-box] -- [Windows 10 **Version 21H2 Enterprise**][windows-10-21h2-enterprise-box] -- [Windows 10 **Version 21H2 Enterprise LTSC**][windows-10-21h2-enterprise-ltsc-box] -- [Windows 10 **Version 1809 Enterprise LTSC**][windows-10-1809-enterprise-ltsc-box] - -[windows-10-sample-usage]: ./samples/windows-10/ - -[windows-10-default-box]: https://app.vagrantup.com/gusztavvargadr/boxes/windows-10/ -[windows-10-22h2-enterprise-box]: https://app.vagrantup.com/gusztavvargadr/boxes/windows-10-22h2-enterprise/ -[windows-10-22h2-enterprise-nocm-box]: https://app.vagrantup.com/gusztavvargadr/boxes/windows-10-22h2-enterprise-nocm/ -[windows-10-21h2-enterprise-box]: https://app.vagrantup.com/gusztavvargadr/boxes/windows-10-21h2-enterprise/ -[windows-10-21h2-enterprise-ltsc-box]: https://app.vagrantup.com/gusztavvargadr/boxes/windows-10-21h2-enterprise-ltsc/ -[windows-10-1809-enterprise-ltsc-box]: https://app.vagrantup.com/gusztavvargadr/boxes/windows-10-1809-enterprise-ltsc/ - -#### Ubuntu - -[Ubuntu]: #ubuntu - -##### Ubuntu Server - -[Sample usage][ubuntu-server-sample-usage] - -- [Ubuntu Server][ubuntu-server-default-box] -- [Ubuntu Server **20.04 LTS**][ubuntu-server-2004-lts-box] - -[ubuntu-server-sample-usage]: ./samples/ubuntu-server/ - -[ubuntu-server-default-box]: https://app.vagrantup.com/gusztavvargadr/boxes/ubuntu-server/ -[ubuntu-server-2004-lts-box]: https://app.vagrantup.com/gusztavvargadr/boxes/ubuntu-server-2004-lts/ - -##### Ubuntu Desktop - -[Sample usage][ubuntu-desktop-sample-usage] - -- [Ubuntu Desktop][ubuntu-desktop-default-box] -- [Ubuntu Desktop **20.04 LTS with Xfce**][ubuntu-desktop-2004-lts-xfce-box] - -[ubuntu-desktop-sample-usage]: ./samples/ubuntu-desktop/ - -[ubuntu-desktop-default-box]: https://app.vagrantup.com/gusztavvargadr/boxes/ubuntu-desktop/ -[ubuntu-desktop-2004-lts-xfce-box]: https://app.vagrantup.com/gusztavvargadr/boxes/ubuntu-desktop-2004-lts-xfce/ - -### Hosting - -The following Vagrant boxes can be used for hosting scenarios. They contain the respective hosting tools with the default configuration are based on the core [operating systems]. - -[Hosting]: #hosting - -#### Docker - -[Docker]: #docker - -[Sample usage][docker-sample-usage] - -- [Docker Windows][docker-windows-default-box] -- [Docker **Community** on **Windows Server**][docker-community-windows-server-box] -- [Docker **Community** on **Windows Server Core**][docker-community-windows-server-core-box] -- [Docker Linux][docker-linux-default-box] -- [Docker **Community** on **Ubuntu Server**][docker-community-ubuntu-server-box] - -[docker-sample-usage]: ./samples/docker/ - -[docker-windows-default-box]: https://app.vagrantup.com/gusztavvargadr/boxes/docker-windows/ -[docker-community-windows-server-box]: https://app.vagrantup.com/gusztavvargadr/boxes/docker-community-windows-server/ -[docker-community-windows-server-core-box]: https://app.vagrantup.com/gusztavvargadr/boxes/docker-community-windows-server-core/ -[docker-linux-default-box]: https://app.vagrantup.com/gusztavvargadr/boxes/docker-linux/ -[docker-community-ubuntu-server-box]: https://app.vagrantup.com/gusztavvargadr/boxes/docker-community-ubuntu-server/ - -#### IIS - -[Sample usage][iis-sample-usage] - -- [IIS][iis-default-box] -- [IIS on **Windows Server**][iis-windows-server-box] -- [IIS on **Windows Server Core**][iis-windows-server-core-box] - -[IIS]: #iis - -[iis-sample-usage]: ./samples/iis/ - -[iis-default-box]: https://app.vagrantup.com/gusztavvargadr/boxes/iis/ -[iis-windows-server-box]: https://app.vagrantup.com/gusztavvargadr/boxes/iis-windows-server/ -[iis-windows-server-core-box]: https://app.vagrantup.com/gusztavvargadr/boxes/iis-windows-server-core/ - -#### SQL Server - -[Sample usage][sql-server-sample-usage] - -- [SQL Server][sql-server-default-box] -- [SQL Server **2019 Developer** on **Windows Server**][sql-server-2019-developer-windows-server-box] -- [SQL Server **2019 Developer** on **Windows Server Core**][sql-server-2019-developer-windows-server-core-box] - -[SQL Server]: #sql-server - -[sql-server-sample-usage]: ./samples/sql-server/ - -[sql-server-default-box]: https://app.vagrantup.com/gusztavvargadr/boxes/sql-server/ -[sql-server-2019-developer-windows-server-box]: https://app.vagrantup.com/gusztavvargadr/boxes/sql-server-2019-developer-windows-server/ -[sql-server-2019-developer-windows-server-core-box]: https://app.vagrantup.com/gusztavvargadr/boxes/sql-server-2019-developer-windows-server-core/ - -### Development - -The following Vagrant boxes can be used for development scenarios including setting up [virtual workstations]. They contain the respective development tools with the common configuration and are based on the core [operating systems]. - -[Development]: #development - -#### Visual Studio - -[Sample usage][visual-studio-sample-usage] - -- [Visual Studio][visual-studio-default-box] -- [Visual Studio **2022 Community** on **Windows 11**][visual-studio-2022-community-windows-11-box] -- [Visual Studio **2022 Community** on **Windows 10**][visual-studio-2022-community-windows-10-box] -- [Visual Studio **2019 Community** on **Windows 11**][visual-studio-2019-community-windows-11-box] -- [Visual Studio **2019 Community** on **Windows 10**][visual-studio-2019-community-windows-10-box] - -[Visual Studio]: #visual-studio - -[visual-studio-sample-usage]: ./samples/visual-studio/ - -[visual-studio-default-box]: https://app.vagrantup.com/gusztavvargadr/boxes/visual-studio/ -[visual-studio-2022-community-windows-11-box]: https://app.vagrantup.com/gusztavvargadr/boxes/visual-studio-2022-community-windows-11/ -[visual-studio-2022-community-windows-10-box]: https://app.vagrantup.com/gusztavvargadr/boxes/visual-studio-2022-community-windows-10/ -[visual-studio-2019-community-windows-11-box]: https://app.vagrantup.com/gusztavvargadr/boxes/visual-studio-2019-community-windows-11/ -[visual-studio-2019-community-windows-10-box]: https://app.vagrantup.com/gusztavvargadr/boxes/visual-studio-2019-community-windows-10/ +[VagrantCloudBoxes]: https://app.vagrantup.com/gusztavvargadr -## Getting started - -> **Note** The rest of this document covers the details of building virtual machine images and Vagrant boxes, and assumes that you are familiar with the basics of [Packer] and [Vagrant]. If that's not the case, it's recommended that you take a quick look at the [getting][PackerGettingStarted] [started][VagrantGettingStarted] guides. - -> **Note** Building the Packer templates have been tested on Windows hosts only, but they are supposed to run on any other platform as well, given that the actual virtualization provider (e.g. VirtualBox) supports it. [Let me know][Contributing] if you encounter any issues and I'm glad to help. - -Follow the steps below to install the required tools: - -1. Install the [.NET Core SDK][NETCoreSDKInstallation] with [Cake Build][CakeBuildInstallation]. -1. Install [Packer][PackerInstallation] and [Vagrant][VagrantInstallation]. -1. Install the tools for the virtualization provider you want to use. - - **VirtualBox** Install [VirtualBox][VirtualBoxInstallation]. - - **VMware** Install [VMware][VMwareInstallation]. - - **Hyper-V** Enable [Hyper-V][HyperVEnabling]. -1. Install [Chef Workstation][ChefWorkstationInstallation]. - -You are now ready to build a virtual machine image and a Vagrant box. - -> **Note** It is recommended to set up [caching for Packer][PackerCaching], so you can reuse the downloaded resources (e.g. OS ISOs) across different builds. Make sure you have a bunch of free disk space for the cache and the build artifacts. - -[Getting started]: #getting-started - -[PackerGettingStarted]: https://www.packer.io/intro/getting-started/install.html -[VagrantGettingStarted]: https://www.vagrantup.com/intro/getting-started/index.html - -[NETCoreSDKInstallation]: https://dotnet.microsoft.com/download -[CakeBuildInstallation]: https://www.nuget.org/packages/Cake.Tool/ -[PackerInstallation]: https://www.packer.io/docs/install/index.html -[VagrantInstallation]: https://www.vagrantup.com/docs/installation/ -[VirtualBoxInstallation]: https://www.virtualbox.org/wiki/Downloads/ -[VMwareInstallation]: https://kb.vmware.com/s/article/2057907 -[HyperVEnabling]: https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v -[ChefWorkstationInstallation]: https://downloads.chef.io/chef-workstation/ - -[PackerCaching]: https://www.packer.io/docs/other/environment-variables.html#packer_cache_dir +[DocumentationOverview]: https://github.com/gusztavvargadr/packer/wiki#overview ## Usage -**Contents** [Building base images] | [Building images for distribution] | [Chaining builds further] | [Testing] | [Cleaning up] +Simple [Vagrant] environments demonstrating the capabilities of the published boxes are available at the [samples][Samples]. -This repository uses some [custom wrapper scripts][SourceCoreCake] using [Cake] to generate the Packer templates and the related resources (e.g. the unattended install configuration) required to build the virtual machine images. Besides supporting easier automation, this approach helps with reusing parts of the templates and the -related resources, and makes chaining builds and creating new configurations quite easy. +See the [documentation][DocumentationUsage] for more details on using the images. [Usage]: #usage -[SourceCoreCake]: src/core/cake/ -[Cake]: http://cakebuild.net/ - -### Building base images - -Clone this repo [including the submodules][GitCloneRecursive], and navigate to the root directory of the clone in your shell. Type the following command to list all the available templates you can build: - -```shell -$ dotnet tool restore -$ dotnet cake [--target=info] -``` - -The output will be contain the section `info` with the list of the templates: - -``` -... -======================================== -info -======================================== -... -ws2022s-virtualbox-core: Info -ws2022s-virtualbox-vagrant: Info -ws2022s-vmware-core: Info -ws2022s-vmware-vagrant: Info -ws2022s-hyperv-core: Info -ws2022s-hyperv-vagrant: Info -... -w1022h2e-virtualbox-core: Info -w1022h2e-virtualbox-vagrant: Info -w1022h2e-vmware-core: Info -w1022h2e-vmware-vagrant: Info -w1022h2e-hyperv-core: Info -w1022h2e-hyperv-vagrant: Info -... -ws2022s-iis-virtualbox-core: Info -ws2022s-iis-virtualbox-vagrant: Info -ws2022s-iis-vmware-core: Info -ws2022s-iis-vmware-vagrant: Info -ws2022s-iis-hyperv-core: Info -ws2022s-iis-hyperv-vagrant: Info -... -``` - -You can filter this further to list only the templates for a given virtual machine image type. For example, to list the templates based on the `Windows Server 2022 Standard` image, invoke the `info` command with the `ws2022s` argument: - -```shell -$ dotnet cake [--target=info] --configuration=ws2022s -``` - -You can use this filtering with all the `dotnet cake` commands below as well. It selects all the templates which contain the specified argument as a substring, so you can filter for components (`ws2022s`, `w1022h2e`, `iis`, etc.) or providers (`virtualbox`, `vmware`, `hyperv`) easily. - -The output will contain only the matching templates: - -``` -... -======================================== -info -======================================== -ws2022s-virtualbox-core: Info -ws2022s-virtualbox-vagrant: Info -ws2022s-vmware-core: Info -ws2022s-vmware-vagrant: Info -ws2022s-hyperv-core: Info -ws2022s-hyperv-vagrant: Info -... -``` - -This means that this configuration supports building native base images (`virtualbox-core`, `vmware-core`, `hyperv-core`) mainly for reusing them in other configurations, and also, Vagrant boxes for distribution (`virtualbox-vagrant`, `vmware-vagrant`, `hyperv-vagrant`). Under the hood, the `vagrant` configurations will simply start from the output of the `core` ones, so build times can be reduced significantly. - -Now, invoke the `restore` command with the name of the template you want to build to create the resources required by Packer. For example, for VirtualBox, type the following command: - -```shell -$ dotnet cake --target=restore --configuration=ws2022s-virtualbox-core -``` - -This will create the folder `build/ws2022s/virtualbox-core` in the root of your clone with all the files required to invoke the Packer build. This setup is self-contained, so you can adjust the parameters manually in `template.json` or the other resources and / or even copy it to a different machine and simply invoke `packer build template.json` there. Most of the time though, you just simply want to build as it is, as the templates are already preconfigured with some reasonable defaults. This can be done of course with the build script as well: - -```shell -$ dotnet cake --target=build --configuration=ws2022s-virtualbox-core -``` - -This will trigger the Packer build process, which usually requires only patience. Depending on the selected configuration, a few minutes or hours later, the build output will be created, in this case in the `build/ws2022s/virtualbox-core/output` directory in the root of your clone. Virtual machine images like this can be directly used with the respective virtualization provider on the host machine. - -[Building base images]: #building-base-images - -[GitCloneRecursive]: https://stackoverflow.com/a/4438292 - -### Building images for distribution - -As mentioned above, based on Packer's support for starting builds from some virtualization providers' native image format, builds can reuse the output of a previous build. To build and image which can be distributed (e.g. after applying [Sysprep] as well), type the following command: - -```shell -$ dotnet cake --target=build --configuration=ws2022s-virtualbox-vagrant -``` - -Note that this will include restoring the build folder with the template and the related resources automatically, and then invoking the build process in a single step. It will also reuse the output of the `ws2022s-virtualbox-core` build, so it does not need to do the same steps for a Vagrant box the original build already included (e.g. the core OS installation itself, installing Windows updates, etc.). Once the build completes, the Vagrant box will be available in the `build/ws2022s/virtualbox-vagrant/output` folder. - -The same approach works for VMware and Hyper-V as well: - -```shell -$ dotnet cake --target=build --configuration=ws2022s-hyperv-core -$ dotnet cake --target=build --configuration=ws2022s-hyperv-vagrant -``` - -As you can expect, for these samples the build artifacts will be created in the `builds/ws2022s` folder as well, this time under the `hyperv-vagrant/output` subfolder. You can use the standard options to [distribute them][VagrantDistribute] to be consumed in Vagrant. - -[Building images for distribution]: #building-images-for-distribution - -[Sysprep]: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/sysprep--generalize--a-windows-installation -[VagrantDistribute]: https://www.vagrantup.com/docs/boxes/base.html#distributing-the-box +[DocumentationUsage]: https://github.com/gusztavvargadr/packer/wiki#usage -### Chaining builds further - -Similarly to the process above, you can use build chaining to build more complex boxes. For example, the configuration for `Windows Server 2022 Standard` with `IIS` can be built like this: - -```shell -$ dotnet cake --target=build --configuration=ws2022s-virtualbox-core -$ dotnet cake --target=build --configuration=ws2022s-iis-virtualbox-core -$ dotnet cake --target=build --configuration=ws2022s-iis-virtualbox-vagrant -``` - -As in the previous `ws2022s` sample, for this configuration the `ws2022s-iis-virtualbox-core` build will start from the output of `ws2022s-virtualbox-core` instead of starting with the core OS installation. Chanining builds like this has no limitations, so you can use this approach to build images with any number of components very effectively. - -Note that the script can invoke the build of the dependencies automatically, so for the previous example you can simply type: - -```shell -$ dotnet cake --target=build --configuration=ws2022s-iis-virtualbox-vagrant --recursive true -``` - -This will in turn invoke the `restore` and `build` stages for the `ws2022s-virtualbox-core` and `ws2022s-iis-virtualbox-core` images as well. By default, `restore` and `build` is skipped if the output from a previous build exists. You can force the build to run again using the `rebuild` command instead, which will `clean` the build directories first. - -Again, this works for VMware and Hyper-V as well: - -```shell -$ dotnet cake --target=build --configuration=ws2022s-iis-hyperv-vagrant --recursive true -``` - -Similarly, this will in turn build the `ws2022s-hyperv-core` and `ws2022s-iis-hyperv-core` images first if they are missing. - -[Chaining builds further]: #chaining-builds-further - -### Testing - -To help testing the build results, the reposiory contains a simple [Vagrantfile] to create virtual machines using directly the build outputs. You can play around with the [Vagrant CLI][VagrantCLI] yourself, or let the build script manage it for you. - -For example, to test the `ws2022s` configuration, from the root of your clone you can type the following command to use the box files in the `build\ws2022s` folder: - -```shell -$ dotnet cake --target=test --configuration=ws2022s-virtualbox-vagrant -``` - -This will import the locally built Vagrant box temporarily with the name `ws2022s-build` and will use that to spin up a new virtual machine. It also outputs some basic diagnostics information to help quickly checking the installations. - -[Testing]: #testing - -[Vagrantfile]: Vagrantfile -[VagrantCLI]: https://www.vagrantup.com/docs/cli/ - -### Cleaning up - -Though the `build` folders are excluded by default from the repository, they can consume significant disk space. You can manually delete the folders, but the build script provides support for this as well: - -```shell -$ dotnet cake --target=clean --configuration=ws2022s-iis-virtualbox-vagrant -``` - -Using the filtering, to clean up the artifacts of all the VirtualBox builds, you can type: - -```shell -$ dotnet cake --target=clean --configuration=virtualbox -``` - -Omitting this parameter will apply the command to all the templates, so the following command will clean up everything: - -```shell -$ dotnet cake --target=clean -``` - -> **Note** The `clean` command cleans up dependencies recursively, including the eventually imported Vagrant boxes and virtual machines created using the `test` command. - -[Cleaning up]: #cleaning-up - -## Next steps - -Take a look at the repository of [virtual workstations] to easily automate and share your development environment configurations using the Vagrant boxes above. +## Contributing -[Next steps]: #next-steps +Complete [Packer] templates used for building the published boxes are available at the [samples][Samples]. -## Contributing +See the [documentation][DocumentationContributing] for more details on building the images. -Feedback, [issues] or [pull requests] are welcome and are greatly appreciated. Check out the [milestones] for the list of planned releases. +To report bugs, propose changes, request new features or provide feedback in general, please take a look at the [discussions] or [issues] first. [Pull requests] are also welcome and are greatly appreciated. [Contributing]: #contributing -[Issues]: https://github.com/gusztavvargadr/packer/issues/ -[Pull requests]: https://github.com/gusztavvargadr/packer/pulls/ -[Milestones]: https://github.com/gusztavvargadr/packer/milestones/ +[DocumentationContributing]: https://github.com/gusztavvargadr/packer/wiki#contributing + +[Discussions]: https://github.com/gusztavvargadr/packer/discussions +[Issues]: https://github.com/gusztavvargadr/packer/issues +[Pull requests]: https://github.com/gusztavvargadr/packer/pulls ## Resources -This repository could not exist without the following great technologies: +This repository could not exist without the following excellent tools and technologies: - [Packer] - [Vagrant] +- [Hyper-V] - [VirtualBox] - [VMware] -- [Hyper-V] - [Chef] -This repository borrows awesome ideas and solutions from the following sources: +This repository builds on awesome ideas and solutions from the following authors and sources: - [Matt Wrock] - [Jacqueline] @@ -502,8 +73,17 @@ This repository borrows awesome ideas and solutions from the following sources: [Resources]: #resources -[Matt Wrock]: https://github.com/mwrock/packer-templates/ -[Jacqueline]: https://github.com/jacqinthebox/packer-templates/ -[Joe Fitzgerald]: https://github.com/joefitzgerald/packer-windows/ -[Boxcutter]: https://github.com/boxcutter/windows/ -[Bento]: https://github.com/chef/bento/ +[Packer]: https://www.packer.io +[Vagrant]: https://www.vagrantup.com +[Hyper-V]: https://learn.microsoft.com/en-us/virtualization/ +[VirtualBox]: https://www.virtualbox.org +[VMware]: https://www.vmware.com/products/workstation-pro.html +[Chef]: https://www.chef.io + +[Matt Wrock]: https://github.com/mwrock/packer-templates +[Jacqueline]: https://github.com/jacqinthebox/packer-templates +[Joe Fitzgerald]: https://github.com/joefitzgerald/packer-windows +[Boxcutter]: https://github.com/boxcutter/windows +[Bento]: https://github.com/chef/bento + +[Samples]: ./samples diff --git a/Vagrantfile b/Vagrantfile deleted file mode 100644 index 7a6d92634..000000000 --- a/Vagrantfile +++ /dev/null @@ -1,33 +0,0 @@ -Vagrant.configure('2') do |config| - vm_name = ENV['VAGRANT_VM_NAME'] || 'default' - box_name = ENV['VAGRANT_BOX_NAME'] || '' - box_url = ENV['VAGRANT_BOX_URL'] || '' - - config.vm.define vm_name - - config.vm.box = box_name - config.vm.box_url = box_url - - config.vm.synced_folder '.', '/vagrant', disabled: true - - config.vm.provider "hyperv" do |hyperv, override| - override.vm.network "private_network", bridge: "Default Switch" - end - - if vm_name.start_with?('w') - config.vm.provision 'shell', inline: <<-EOF - cmd /c ver - chef-client --version - Get-ComputerInfo - choco list -i - EOF - else - config.vm.provision 'shell', inline: <<-EOF - uname -a - lsb_release -a - chef-client --version - lshw - apt list --installed - EOF - end -end diff --git a/build.cake b/build.cake index 40d33ad33..478aeb3b1 100644 --- a/build.cake +++ b/build.cake @@ -1,239 +1,93 @@ -#load "src/core/cake/core.cake" - -var target = Argument("target", "default"); var configuration = Argument("configuration", string.Empty); -var recursive = Argument("recursive", false); -var version = "2310"; - -var buildDirectory = Argument("build-directory", "./build"); -PackerTemplate.BuildDirectory = buildDirectory; - -var ws2022s = PackerTemplates_CreateWindows( - "ws2022s", - "windows-server-2022-standard", - $"2102.0.{version}", - aliases: new [] { "windows-server" } -); -var ws2022s_nocm = PackerTemplates_CreateWindows( - "ws2022s-nocm", - "windows-server-2022-standard-nocm", - $"2102.0.{version}", - ws2022s -); -var ws2019s = PackerTemplates_CreateWindows( - "ws2019s", - "windows-server-2019-standard", - $"1809.0.{version}" -); -var wsips = PackerTemplates_CreateWindows( - "wsips", - "windows-server-insider-preview-standard", - $"2102.0.{version}" -); - -var ws2022sc = PackerTemplates_CreateWindows( - "ws2022sc", - "windows-server-2022-standard-core", - $"2102.0.{version}", - aliases: new [] { "windows-server-core" } -); -var ws2019sc = PackerTemplates_CreateWindows( - "ws2019sc", - "windows-server-2019-standard-core", - $"1809.0.{version}" -); -var wsipsc = PackerTemplates_CreateWindows( - "wsipsc", - "windows-server-insider-preview-standard-core", - $"2102.0.{version}" -); - -var w1122h2e = PackerTemplates_CreateWindows( - "w1122h2e", - "windows-11-22h2-enterprise", - $"2202.0.{version}", - aliases: new [] { "windows-11" } -); -var w1121h2e = PackerTemplates_CreateWindows( - "w1121h2e", - "windows-11-21h2-enterprise", - $"2102.0.{version}" -); -var w11ipe = PackerTemplates_CreateWindows( - "w11ipe", - "windows-11-insider-preview-enterprise", - $"2202.0.{version}" -); - -var w1022h2e = PackerTemplates_CreateWindows( - "w1022h2e", - "windows-10-22h2-enterprise", - $"2202.0.{version}", - aliases: new [] { "windows-10" } -); -var w1022h2e_nocm = PackerTemplates_CreateWindows( - "w1022h2e-nocm", - "windows-10-22h2-enterprise-nocm", - $"2202.0.{version}", - w1022h2e -); -var w1021h2e = PackerTemplates_CreateWindows( - "w1021h2e", - "windows-10-21h2-enterprise", - $"2102.0.{version}" -); -var w1021h2eltsc = PackerTemplates_CreateWindows( - "w1021h2eltsc", - "windows-10-21h2-enterprise-ltsc", - $"2102.0.{version}" -); -var w101809eltsc = PackerTemplates_CreateWindows( - "w101809eltsc", - "windows-10-1809-enterprise-ltsc", - $"1809.0.{version}" -); - -var u2004s = PackerTemplates_CreateLinux( - "u2004s", - "ubuntu-server-2004-lts", - $"2004.0.{version}", - aliases: new [] { "ubuntu-server" } -); - -var u2004d = PackerTemplates_CreateLinux( - "u2004d", - "ubuntu-desktop-2004-lts-xfce", - $"2004.0.{version}", - u2004s, - aliases: new [] { "ubuntu-desktop" } -); - -var ws2022s_dc = PackerTemplates_CreateWindows( - "ws2022s-dc", - "docker-community-windows-server", - $"2400.2102.{version}", - ws2022s, - aliases: new [] { "docker-windows" } -); -var ws2022sc_dc = PackerTemplates_CreateWindows( - "ws2022sc-dc", - "docker-community-windows-server-core", - $"2400.2102.{version}", - ws2022sc -); -var u2004s_dc = PackerTemplates_CreateLinux( - "u2004s-dc", - "docker-community-ubuntu-server", - $"2400.2004.{version}", - u2004s, - aliases: new [] { "docker-linux" } -); - -var ws2022s_iis = PackerTemplates_CreateWindows( - "ws2022s-iis", - "iis-windows-server", - $"10.2102.{version}", - ws2022s, - aliases: new [] { "iis" } -); -var ws2022sc_iis = PackerTemplates_CreateWindows( - "ws2022sc-iis", - "iis-windows-server-core", - $"10.2102.{version}", - ws2022sc -); - -var ws2022s_sql19d = PackerTemplates_CreateWindows( - "ws2022s-sql19d", - "sql-server-2019-developer-windows-server", - $"2019.2102.{version}", - ws2022s, - aliases: new [] { "sql-server" } -); -var ws2022sc_sql19d = PackerTemplates_CreateWindows( - "ws2022sc-sql19d", - "sql-server-2019-developer-windows-server-core", - $"2019.2102.{version}", - ws2022sc -); - -var w1122h2e_vs22c = PackerTemplates_CreateWindows( - "w1122h2e-vs22c", - "visual-studio-2022-community-windows-11", - $"2022.2202.{version}", - w1122h2e, - aliases: new [] { "visual-studio" } -); -var w1022h2e_vs22c = PackerTemplates_CreateWindows( - "w1022h2e-vs22c", - "visual-studio-2022-community-windows-10", - $"2022.2202.{version}", - w1022h2e -); -var w1122h2e_vs19c = PackerTemplates_CreateWindows( - "w1122h2e-vs19c", - "visual-studio-2019-community-windows-11", - $"2019.2202.{version}", - w1122h2e -); -var w1022h2e_vs19c = PackerTemplates_CreateWindows( - "w1022h2e-vs19c", - "visual-studio-2019-community-windows-10", - $"2019.2202.{version}", - w1022h2e -); +var target = Argument("target", "default"); -Task("default") - .IsDependentOn("info"); +var author = Argument("author", "gusztavvargadr"); +var version = Argument("version", "2401"); -Task("info") - .Does(() => { - PackerTemplates_ForEach(configuration, PackerTemplate_Info); - }); +var configurationParts = configuration.Split('/', StringSplitOptions.RemoveEmptyEntries); +var sample = configurationParts.ElementAtOrDefault(0) ?? Argument("sample"); +var image = configurationParts.ElementAtOrDefault(1) ?? Argument("image"); +var provider = configurationParts.ElementAtOrDefault(2) ?? Argument("provider"); +var build = configurationParts.ElementAtOrDefault(3) ?? Argument("build"); + +var platform = (sample.Contains("ubuntu") || sample.Contains("linux")) ? "ubuntu" : "windows"; -Task("version") +var sampleDirectory = Directory($"samples/{sample}"); +var platformDirectory = Directory($"../../src/{platform}"); +var artifactsDirectory = Directory($"artifacts"); + +Task("init") .Does(() => { - PackerTemplates_ForEach(configuration, PackerTemplate_Version); + PackerInit(); }); Task("restore") - .IsDependentOn("version") + .IsDependentOn("init") .Does(() => { - PackerTemplates_ForEach(configuration, PackerTemplate_Restore); + PackerBuild("restore"); }); Task("build") .IsDependentOn("restore") .Does(() => { - PackerTemplates_ForEach(configuration, PackerTemplate_Build); - }); - -Task("rebuild") - .IsDependentOn("clean") - .IsDependentOn("build") - .Does(() => { + PackerBuild("build"); }); Task("test") .IsDependentOn("build") .Does(() => { - PackerTemplates_ForEach(configuration, PackerTemplate_Test); + PackerBuild("test"); }); Task("publish") + .IsDependentOn("test") .Does(() => { - PackerTemplates_ForEach(configuration, PackerTemplate_Publish); - }); - -Task("download") - .Does(() => { - PackerTemplates_ForEach(configuration, PackerTemplate_Download); + PackerBuild("publish"); }); Task("clean") - .IsDependentOn("version") .Does(() => { - PackerTemplates_ForEach(configuration, PackerTemplate_Clean); + CleanDirectory(artifactsDirectory); }); +Task("default") + .IsDependentOn("test"); + RunTarget(target); + +void PackerInit() { + var arguments = new ProcessArgumentBuilder(); + + arguments.Append("init"); + arguments.Append(platformDirectory); + + Packer(arguments); +} + +void PackerBuild(string stage) { + var arguments = new ProcessArgumentBuilder(); + + arguments.Append("build"); + arguments.Append($"-var author=\"{author}\""); + arguments.Append($"-var version=\"{version}\""); + arguments.Append($"-var-file=\"images.pkrvars.hcl\""); + arguments.Append($"-var image=\"{image}\""); + arguments.Append($"-var provider=\"{provider}\""); + arguments.Append($"-var build=\"{build}\""); + arguments.Append($"-only \"{build}-{stage}.*\""); + arguments.Append("-force"); + arguments.Append(platformDirectory); + + Packer(arguments); +} + +void Packer(ProcessArgumentBuilder arguments) { + var result = StartProcess("packer", new ProcessSettings { + Arguments = arguments, + WorkingDirectory = sampleDirectory + }); + + if (result != 0) { + throw new Exception($"Packer failed with code {result} ."); + } +} diff --git a/lib/gusztavvargadr/chef b/lib/gusztavvargadr/chef index c231104f4..c026e80c7 160000 --- a/lib/gusztavvargadr/chef +++ b/lib/gusztavvargadr/chef @@ -1 +1 @@ -Subproject commit c231104f445c0e01b539c8ccedbd1b3d3486ec29 +Subproject commit c026e80c767a2df2c2cad8ef6c365d5b01244790 diff --git a/samples/README.md b/samples/README.md new file mode 100644 index 000000000..cb74a532e --- /dev/null +++ b/samples/README.md @@ -0,0 +1,5 @@ +# Packer - Samples + +See the [documentation] for more details. + +[Documentation]: https://github.com/gusztavvargadr/packer/wiki#overview diff --git a/samples/core.Vagrantfile b/samples/core.Vagrantfile new file mode 100644 index 000000000..424aff172 --- /dev/null +++ b/samples/core.Vagrantfile @@ -0,0 +1,40 @@ +Vagrant.configure("2") do |config| + hyperv_network_bridge = ENV["VAGRANT_HYPERV_NETWORK_BRIDGE"].to_s.strip || "Default Switch" + + config.vm.provider "virtualbox" do |provider, _override| + provider.linked_clone = false + end + + config.vm.provider "vmware_desktop" do |provider, _override| + provider.linked_clone = false + end + + config.vm.provider "hyperv" do |provider, override| + provider.linked_clone = false + + override.vm.network "private_network", bridge: hyperv_network_bridge + end + + config.vm.synced_folder ".", "/vagrant", disabled: true +end + +def config_vm_define(config, vm_name, box_name) + box_author = ENV["VAGRANT_BOX_AUTHOR"] || "gusztavvargadr" + box_author = box_author.to_s.strip + box_url = ENV["VAGRANT_BOX_URL"] + box_url = box_url.to_s.strip + + box = !box_url.empty? ? "#{box_author}-test/#{box_name}" : "#{box_author}/#{box_name}" + + config.vm.define vm_name, autostart: false do |config| + config.vm.box = box + config.vm.box_url = box_url unless box_url.empty? + + unless box_url.empty? + config.trigger.after :destroy do |trigger| + trigger.info = "Deleting box" + trigger.run = { inline: "vagrant box remove #{box}"} + end + end + end +end diff --git a/samples/docker-linux/Policyfile.rb b/samples/docker-linux/Policyfile.rb new file mode 100644 index 000000000..8112929fc --- /dev/null +++ b/samples/docker-linux/Policyfile.rb @@ -0,0 +1,18 @@ +require "#{File.dirname(__FILE__)}/../../src/ubuntu/chef/Policyfile" + +name 'gusztavvargadr_packer_docker_ubuntu' + +gusztavvargadr_packer_ubuntu_sources + +run_list( + 'recipe[gusztavvargadr_packer_ubuntu::initialize]', + 'recipe[gusztavvargadr_packer_ubuntu::apply]', + 'recipe[gusztavvargadr_docker::default]', + 'recipe[gusztavvargadr_packer_ubuntu::cleanup]' +) + +attributes( + [ + "#{File.dirname(__FILE__)}/Policyfile.yml", + ] +) diff --git a/samples/docker-linux/Policyfile.yml b/samples/docker-linux/Policyfile.yml new file mode 100644 index 000000000..f6f44ae19 --- /dev/null +++ b/samples/docker-linux/Policyfile.yml @@ -0,0 +1,3 @@ +gusztavvargadr_docker: + tools: + engine:latest-community: diff --git a/samples/docker-linux/Vagrantfile b/samples/docker-linux/Vagrantfile new file mode 100644 index 000000000..0f6fe8cb1 --- /dev/null +++ b/samples/docker-linux/Vagrantfile @@ -0,0 +1,20 @@ +load "#{File.dirname(__FILE__)}/../core.Vagrantfile" + +Vagrant.configure("2") do |config| + config_vm_define config, "latest", "docker-linux" + config_vm_define config, "community-ubuntu-server", "docker-community-ubuntu-server" + + config.vm.provision "shell", inline: <<-EOH + uname -a + lsb_release -a + + lshw -short + lscpu + lsmem + + apt list --installed + + docker version + docker compose version + EOH +end diff --git a/samples/docker-linux/images.pkrvars.hcl b/samples/docker-linux/images.pkrvars.hcl new file mode 100644 index 000000000..0d8e25f2d --- /dev/null +++ b/samples/docker-linux/images.pkrvars.hcl @@ -0,0 +1,17 @@ +images = { + "community-ubuntu-server" = { + core = { + image_description = "Docker Community on Ubuntu Server" + image_version = "2500.2204" + } + + native = { + source_image = "ubuntu-server/2204-lts" + } + + vagrant = { + box_name = "docker-community-ubuntu-server" + box_alias = "docker-linux" + } + } +} diff --git a/samples/docker-windows/Policyfile.rb b/samples/docker-windows/Policyfile.rb new file mode 100644 index 000000000..78545419b --- /dev/null +++ b/samples/docker-windows/Policyfile.rb @@ -0,0 +1,18 @@ +require "#{File.dirname(__FILE__)}/../../src/windows/chef/Policyfile" + +name 'gusztavvargadr_packer_docker_windows' + +gusztavvargadr_packer_windows_sources + +run_list( + 'recipe[gusztavvargadr_packer_windows::initialize]', + 'recipe[gusztavvargadr_packer_windows::apply]', + 'recipe[gusztavvargadr_docker::default]', + 'recipe[gusztavvargadr_packer_windows::cleanup]' +) + +attributes( + [ + "#{File.dirname(__FILE__)}/Policyfile.yml", + ] +) diff --git a/samples/docker-windows/Policyfile.yml b/samples/docker-windows/Policyfile.yml new file mode 100644 index 000000000..f6f44ae19 --- /dev/null +++ b/samples/docker-windows/Policyfile.yml @@ -0,0 +1,3 @@ +gusztavvargadr_docker: + tools: + engine:latest-community: diff --git a/samples/docker-windows/Vagrantfile b/samples/docker-windows/Vagrantfile new file mode 100644 index 000000000..27d614a35 --- /dev/null +++ b/samples/docker-windows/Vagrantfile @@ -0,0 +1,20 @@ +load "#{File.dirname(__FILE__)}/../core.Vagrantfile" + +Vagrant.configure("2") do |config| + config_vm_define config, "latest", "docker-windows" + config_vm_define config, "community-windows-server", "docker-community-windows-server" + config_vm_define config, "community-windows-server-core", "docker-community-windows-server-core" + + config.vm.provision "shell", inline: <<-EOH + cmd /c ver + + systeminfo + Get-ComputerInfo + + Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) + choco list -i + + docker version + docker compose version + EOH +end diff --git a/samples/docker-windows/images.pkrvars.hcl b/samples/docker-windows/images.pkrvars.hcl new file mode 100644 index 000000000..8fd37e08f --- /dev/null +++ b/samples/docker-windows/images.pkrvars.hcl @@ -0,0 +1,32 @@ +images = { + "community-windows-server" = { + core = { + image_description = "Docker Community on Windows Server" + image_version = "2500.2102" + } + + native = { + source_image = "windows-server/2022-standard" + } + + vagrant = { + box_name = "docker-community-windows-server" + box_alias = "docker-windows" + } + } + + "community-windows-server-core" = { + core = { + image_description = "Docker Community on Windows Server Core" + image_version = "2500.2102" + } + + native = { + source_image = "windows-server/2022-standard-core" + } + + vagrant = { + box_name = "docker-community-windows-server-core" + } + } +} diff --git a/samples/docker/Vagrantfile b/samples/docker/Vagrantfile deleted file mode 100644 index 263def168..000000000 --- a/samples/docker/Vagrantfile +++ /dev/null @@ -1,53 +0,0 @@ -Vagrant.configure("2") do |config| - config.vm.define "windows", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/docker-windows" - - config_vm.vm.provision "shell", inline: <<-EOH - cmd /c ver - systeminfo - EOH - end - - config.vm.define "community-windows-server", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/docker-community-windows-server" - - config_vm.vm.provision "shell", inline: <<-EOH - cmd /c ver - systeminfo - EOH - end - - config.vm.define "community-windows-server-core", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/docker-community-windows-server-core" - - config_vm.vm.provision "shell", inline: <<-EOH - cmd /c ver - systeminfo - EOH - end - - config.vm.define "linux", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/docker-linux" - - config_vm.vm.provision "shell", inline: <<-EOH - uname -a - lsb_release -a - lshw - EOH - end - - config.vm.define "community-ubuntu-server", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/docker-community-ubuntu-server" - - config_vm.vm.provision "shell", inline: <<-EOH - uname -a - lsb_release -a - lshw - EOH - end - - config.vm.provision "shell", inline: <<-EOH - docker version - docker compose version - EOH -end diff --git a/samples/iis/Policyfile.rb b/samples/iis/Policyfile.rb new file mode 100644 index 000000000..df82e80bd --- /dev/null +++ b/samples/iis/Policyfile.rb @@ -0,0 +1,18 @@ +require "#{File.dirname(__FILE__)}/../../src/windows/chef/Policyfile" + +name 'gusztavvargadr_packer_iis' + +gusztavvargadr_packer_windows_sources + +run_list( + 'recipe[gusztavvargadr_packer_windows::initialize]', + 'recipe[gusztavvargadr_packer_windows::apply]', + 'recipe[gusztavvargadr_iis::default]', + 'recipe[gusztavvargadr_packer_windows::cleanup]' +) + +attributes( + [ + "#{File.dirname(__FILE__)}/Policyfile.yml", + ] +) diff --git a/samples/iis/Policyfile.yml b/samples/iis/Policyfile.yml new file mode 100644 index 000000000..8e34f01b2 --- /dev/null +++ b/samples/iis/Policyfile.yml @@ -0,0 +1,3 @@ +gusztavvargadr_iis: + tools: + server:latest: diff --git a/samples/iis/Vagrantfile b/samples/iis/Vagrantfile index 4e27b37a6..a004c448b 100644 --- a/samples/iis/Vagrantfile +++ b/samples/iis/Vagrantfile @@ -1,19 +1,19 @@ -Vagrant.configure("2") do |config| - config.vm.define "default", primary: true do |config_vm| - config_vm.vm.box = "gusztavvargadr/iis" - end - - config.vm.define "windows-server", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/iis-windows-server" - end +load "#{File.dirname(__FILE__)}/../core.Vagrantfile" - config.vm.define "windows-server-core", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/iis-windows-server-core" - end +Vagrant.configure("2") do |config| + config_vm_define config, "latest", "iis" + config_vm_define config, "windows-server", "iis-windows-server" + config_vm_define config, "windows-server-core", "iis-windows-server-core" config.vm.provision "shell", inline: <<-EOH cmd /c ver + systeminfo + Get-ComputerInfo + + Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) + choco list -i + dotnet --info EOH end diff --git a/samples/iis/images.pkrvars.hcl b/samples/iis/images.pkrvars.hcl new file mode 100644 index 000000000..0d1c89742 --- /dev/null +++ b/samples/iis/images.pkrvars.hcl @@ -0,0 +1,34 @@ +images = { + "windows-server" = { + core = { + image_name = "iis/windows-server" + image_description = "IIS on Windows Server" + image_version = "2102.0" + } + + native = { + source_image = "windows-server/2022-standard" + } + + vagrant = { + ports = "3389,80" + box_alias = "iis" + } + } + + "windows-server-core" = { + core = { + image_name = "iis/windows-server-core" + image_description = "IIS on Windows Server Core" + image_version = "2102.0" + } + + native = { + source_image = "windows-server/2022-standard-core" + } + + vagrant = { + ports = "3389,80" + } + } +} diff --git a/samples/kitchen-ubuntu/Policyfile.rb b/samples/kitchen-ubuntu/Policyfile.rb new file mode 100644 index 000000000..e63c590d8 --- /dev/null +++ b/samples/kitchen-ubuntu/Policyfile.rb @@ -0,0 +1,9 @@ +require "#{File.dirname(__FILE__)}/../../src/ubuntu/chef/Policyfile" + +name 'gusztavvargadr_packer_kitchen_ubuntu' + +gusztavvargadr_packer_ubuntu_sources + +run_list( + 'recipe[gusztavvargadr_packer_ubuntu::default]', +) diff --git a/samples/kitchen-ubuntu/Vagrantfile b/samples/kitchen-ubuntu/Vagrantfile new file mode 100644 index 000000000..f72622d38 --- /dev/null +++ b/samples/kitchen-ubuntu/Vagrantfile @@ -0,0 +1,18 @@ +load "#{File.dirname(__FILE__)}/../core.Vagrantfile" + +Vagrant.configure("2") do |config| + config_vm_define config, "2204", "kitchen-ubuntu-2204" + + config.vm.provision "shell", inline: <<-EOH + uname -a + lsb_release -a + + lshw -short + lscpu + lsmem + + apt list --installed + + chef-client --version + EOH +end diff --git a/samples/kitchen-ubuntu/images.pkrvars.hcl b/samples/kitchen-ubuntu/images.pkrvars.hcl new file mode 100644 index 000000000..85bff0204 --- /dev/null +++ b/samples/kitchen-ubuntu/images.pkrvars.hcl @@ -0,0 +1,13 @@ +images = { + "2204" = { + core = { + image_description = "Test Kitchen target for ubuntu-2204" + image_version = "2204.0" + } + + native = { + source_image = "ubuntu-server/2204-lts" + chef_keep = "true" + } + } +} diff --git a/samples/kitchen-windows/Policyfile.rb b/samples/kitchen-windows/Policyfile.rb new file mode 100644 index 000000000..5fa8029bc --- /dev/null +++ b/samples/kitchen-windows/Policyfile.rb @@ -0,0 +1,9 @@ +require "#{File.dirname(__FILE__)}/../../src/windows/chef/Policyfile" + +name 'gusztavvargadr_packer_kitchen_windows' + +gusztavvargadr_packer_windows_sources + +run_list( + 'recipe[gusztavvargadr_packer_windows::default]', +) diff --git a/samples/kitchen-windows/Vagrantfile b/samples/kitchen-windows/Vagrantfile new file mode 100644 index 000000000..d210a3cfe --- /dev/null +++ b/samples/kitchen-windows/Vagrantfile @@ -0,0 +1,16 @@ +load "#{File.dirname(__FILE__)}/../core.Vagrantfile" + +Vagrant.configure("2") do |config| + config_vm_define config, "2022", "kitchen-windows-2022" + + config.vm.provision "shell", inline: <<-EOH + cmd /c ver + + systeminfo + Get-ComputerInfo + + choco list -i + + chef-client --version + EOH +end diff --git a/samples/kitchen-windows/images.pkrvars.hcl b/samples/kitchen-windows/images.pkrvars.hcl new file mode 100644 index 000000000..46dddc29b --- /dev/null +++ b/samples/kitchen-windows/images.pkrvars.hcl @@ -0,0 +1,13 @@ +images = { + "2022" = { + core = { + image_description = "Test Kitchen target for windows-2022" + image_version = "2102.0" + } + + native = { + source_image = "windows-server/2022-standard-core" + chef_keep = "true" + } + } +} diff --git a/samples/sql-server/Policyfile.rb b/samples/sql-server/Policyfile.rb new file mode 100644 index 000000000..d2476da34 --- /dev/null +++ b/samples/sql-server/Policyfile.rb @@ -0,0 +1,18 @@ +require "#{File.dirname(__FILE__)}/../../src/windows/chef/Policyfile" + +name 'gusztavvargadr_packer_sql_server' + +gusztavvargadr_packer_windows_sources + +run_list( + 'recipe[gusztavvargadr_packer_windows::initialize]', + 'recipe[gusztavvargadr_packer_windows::apply]', + 'recipe[gusztavvargadr_mssql::default]', + 'recipe[gusztavvargadr_packer_windows::cleanup]' +) + +attributes( + [ + "#{File.dirname(__FILE__)}/Policyfile.yml", + ] +) diff --git a/samples/sql-server/Policyfile.yml b/samples/sql-server/Policyfile.yml new file mode 100644 index 000000000..7ef35d7e2 --- /dev/null +++ b/samples/sql-server/Policyfile.yml @@ -0,0 +1,3 @@ +gusztavvargadr_mssql: + tools: + server:2019-developer: diff --git a/samples/sql-server/Vagrantfile b/samples/sql-server/Vagrantfile index 358f20589..56c801613 100644 --- a/samples/sql-server/Vagrantfile +++ b/samples/sql-server/Vagrantfile @@ -1,19 +1,19 @@ -Vagrant.configure("2") do |config| - config.vm.define "default", primary: true do |config_vm| - config_vm.vm.box = "gusztavvargadr/sql-server" - end - - config.vm.define "2019-developer-windows-server", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/sql-server-2019-developer-windows-server" - end +load "#{File.dirname(__FILE__)}/../core.Vagrantfile" - config.vm.define "2019-developer-windows-server-core", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/sql-server-2019-developer-windows-server-core" - end +Vagrant.configure("2") do |config| + config_vm_define config, "latest", "sql-server" + config_vm_define config, "2019-developer-windows-server", "sql-server-2019-developer-windows-server" + config_vm_define config, "2019-developer-windows-server-core", "sql-server-2019-developer-windows-server-core" config.vm.provision "shell", inline: <<-EOH cmd /c ver + systeminfo + Get-ComputerInfo + + Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) + choco list -i + sqlcmd -Q "SELECT @@VERSION" EOH end diff --git a/samples/sql-server/attributes.management-studio.json b/samples/sql-server/attributes.management-studio.json new file mode 100644 index 000000000..8d7e20b3c --- /dev/null +++ b/samples/sql-server/attributes.management-studio.json @@ -0,0 +1,8 @@ +{ + "gusztavvargadr_mssql": { + "tools": { + "management-studio:19": { + } + } + } +} diff --git a/samples/sql-server/images.pkrvars.hcl b/samples/sql-server/images.pkrvars.hcl new file mode 100644 index 000000000..e4b2aa5ab --- /dev/null +++ b/samples/sql-server/images.pkrvars.hcl @@ -0,0 +1,36 @@ +images = { + "2019-developer-windows-server" = { + core = { + image_name = "sql-server/2019-developer-windows-server" + image_description = "SQL Server 2019 Developer on Windows Server" + image_version = "2019.2102" + } + + native = { + source_image = "windows-server/2022-standard" + + chef_attributes = "management-studio" + } + + vagrant = { + ports = "3389,1433" + box_alias = "sql-server" + } + } + + "2019-developer-windows-server-core" = { + core = { + image_name = "sql-server/2019-developer-windows-server-core" + image_description = "SQL Server 2019 Developer on Windows Server Core" + image_version = "2019.2102" + } + + native = { + source_image = "windows-server/2022-standard-core" + } + + vagrant = { + ports = "3389,1433" + } + } +} diff --git a/samples/ubuntu-desktop/Policyfile.rb b/samples/ubuntu-desktop/Policyfile.rb new file mode 100644 index 000000000..63c3484cc --- /dev/null +++ b/samples/ubuntu-desktop/Policyfile.rb @@ -0,0 +1,12 @@ +require "#{File.dirname(__FILE__)}/../../src/ubuntu/chef/Policyfile" + +name 'gusztavvargadr_packer_ubuntu_desktop' + +gusztavvargadr_packer_ubuntu_sources + +run_list( + 'recipe[gusztavvargadr_packer_ubuntu::initialize]', + 'recipe[gusztavvargadr_packer_ubuntu::apply]', + 'recipe[gusztavvargadr_ubuntu::default]', + 'recipe[gusztavvargadr_packer_ubuntu::cleanup]' +) diff --git a/samples/ubuntu-desktop/Vagrantfile b/samples/ubuntu-desktop/Vagrantfile index f4f17f9dc..5d013fbb6 100644 --- a/samples/ubuntu-desktop/Vagrantfile +++ b/samples/ubuntu-desktop/Vagrantfile @@ -1,15 +1,20 @@ -Vagrant.configure("2") do |config| - config.vm.define "default", primary: true do |config_vm| - config_vm.vm.box = "gusztavvargadr/ubuntu-desktop" - end +load "#{File.dirname(__FILE__)}/../core.Vagrantfile" - config.vm.define "2004-lts-xfce", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/ubuntu-desktop-2004-lts-xfce" - end +Vagrant.configure("2") do |config| + config_vm_define config, "latest", "ubuntu-desktop" + config_vm_define config, "2204-lts-ubuntu", "ubuntu-desktop-2204-lts" + config_vm_define config, "2204-lts-xubuntu", "xubuntu-desktop-2204-lts" + config_vm_define config, "2004-lts-ubuntu", "ubuntu-desktop-2004-lts" + config_vm_define config, "2004-lts-xubuntu", "ubuntu-desktop-2004-lts-xfce" config.vm.provision "shell", inline: <<-EOH uname -a lsb_release -a - lshw + + lshw -short + lscpu + lsmem + + apt list --installed EOH end diff --git a/samples/ubuntu-desktop/attributes.ubuntu.json b/samples/ubuntu-desktop/attributes.ubuntu.json new file mode 100644 index 000000000..a467bdcd9 --- /dev/null +++ b/samples/ubuntu-desktop/attributes.ubuntu.json @@ -0,0 +1,8 @@ +{ + "gusztavvargadr_ubuntu": { + "tools": { + "desktop:ubuntu": { + } + } + } +} diff --git a/samples/ubuntu-desktop/attributes.xubuntu.json b/samples/ubuntu-desktop/attributes.xubuntu.json new file mode 100644 index 000000000..a65ac4e18 --- /dev/null +++ b/samples/ubuntu-desktop/attributes.xubuntu.json @@ -0,0 +1,8 @@ +{ + "gusztavvargadr_ubuntu": { + "tools": { + "desktop:xubuntu": { + } + } + } +} diff --git a/samples/ubuntu-desktop/images.pkrvars.hcl b/samples/ubuntu-desktop/images.pkrvars.hcl new file mode 100644 index 000000000..dfc8c45d6 --- /dev/null +++ b/samples/ubuntu-desktop/images.pkrvars.hcl @@ -0,0 +1,82 @@ +images = { + "2204-lts-ubuntu" = { + core = { + image_name = "ubuntu-desktop/2204-lts-ubuntu" + image_description = "Ubuntu Desktop 22.04 LTS" + image_version = "2204.0" + } + + native = { + source_image = "ubuntu-server/2204-lts" + + chef_attributes = "ubuntu" + } + + vagrant = { + memory = "4096" + ports = "3389" + box_name = "ubuntu-desktop-2204-lts" + box_alias = "ubuntu-desktop" + } + } + + "2204-lts-xubuntu" = { + core = { + image_name = "ubuntu-desktop/2204-lts-xubuntu" + image_description = "Xubuntu Desktop 22.04 LTS" + image_version = "2204.0" + } + + native = { + source_image = "ubuntu-server/2204-lts" + + chef_attributes = "xubuntu" + } + + vagrant = { + memory = "4096" + ports = "3389" + box_name = "xubuntu-desktop-2204-lts" + } + } + + "2004-lts-ubuntu" = { + core = { + image_name = "ubuntu-desktop/2004-lts-ubuntu" + image_description = "Ubuntu Desktop 20.04 LTS" + image_version = "2004.0" + } + + native = { + source_image = "ubuntu-server/2004-lts" + + chef_attributes = "ubuntu" + } + + vagrant = { + memory = "4096" + ports = "3389" + box_name = "ubuntu-desktop-2004-lts" + } + } + + "2004-lts-xubuntu" = { + core = { + image_name = "ubuntu-desktop/2004-lts-xubuntu" + image_description = "Xubuntu Desktop 20.04 LTS" + image_version = "2004.0" + } + + native = { + source_image = "ubuntu-server/2004-lts" + + chef_attributes = "xubuntu" + } + + vagrant = { + memory = "4096" + ports = "3389" + box_name = "ubuntu-desktop-2004-lts-xfce" + } + } +} diff --git a/samples/ubuntu-server/Policyfile.rb b/samples/ubuntu-server/Policyfile.rb new file mode 100644 index 000000000..5ab3543d1 --- /dev/null +++ b/samples/ubuntu-server/Policyfile.rb @@ -0,0 +1,9 @@ +require "#{File.dirname(__FILE__)}/../../src/ubuntu/chef/Policyfile" + +name 'gusztavvargadr_packer_ubuntu_server' + +gusztavvargadr_packer_ubuntu_sources + +run_list( + 'recipe[gusztavvargadr_packer_ubuntu::default]' +) diff --git a/samples/ubuntu-server/Vagrantfile b/samples/ubuntu-server/Vagrantfile index 0b13ba70c..bcd4380c2 100644 --- a/samples/ubuntu-server/Vagrantfile +++ b/samples/ubuntu-server/Vagrantfile @@ -1,15 +1,18 @@ -Vagrant.configure("2") do |config| - config.vm.define "default", primary: true do |config_vm| - config_vm.vm.box = "gusztavvargadr/ubuntu-server" - end +load "#{File.dirname(__FILE__)}/../core.Vagrantfile" - config.vm.define "2004-lts", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/ubuntu-server-2004-lts" - end +Vagrant.configure("2") do |config| + config_vm_define config, "latest", "ubuntu-server" + config_vm_define config, "2204-lts", "ubuntu-server-2204-lts" + config_vm_define config, "2004-lts", "ubuntu-server-2004-lts" config.vm.provision "shell", inline: <<-EOH uname -a lsb_release -a - lshw + + lshw -short + lscpu + lsmem + + apt list --installed EOH end diff --git a/samples/ubuntu-server/images.pkrvars.hcl b/samples/ubuntu-server/images.pkrvars.hcl new file mode 100644 index 000000000..656f033f7 --- /dev/null +++ b/samples/ubuntu-server/images.pkrvars.hcl @@ -0,0 +1,47 @@ +images = { + "2204-lts" = { + core = { + image_description = "Ubuntu Server 22.04 LTS" + image_version = "2204.0" + } + + native = { + source_iso_url_local = "ubuntu-22.04.3-live-server-amd64.iso" + source_iso_url_remote = "https://releases.ubuntu.com/22.04.3/ubuntu-22.04.3-live-server-amd64.iso" + source_iso_checksum = "sha256:a4acfda10b18da50e2ec50ccaf860d7f20b389df8765611142305c0e911d16fd" + } + + vagrant = { + box_alias = "ubuntu-server" + } + + virtualbox = { + guest_os_type = "Ubuntu_64" + } + + vmware = { + guest_os_type = "ubuntu-64" + } + } + + "2004-lts" = { + core = { + image_description = "Ubuntu Server 20.04 LTS" + image_version = "2004.0" + } + + native = { + source_iso_url_local = "ubuntu-20.04.4-live-server-amd64.iso" + source_iso_url_remote = "https://old-releases.ubuntu.com/releases/20.04/ubuntu-20.04.4-live-server-amd64.iso" + source_iso_checksum = "sha256:28ccdb56450e643bad03bb7bcf7507ce3d8d90e8bf09e38f6bd9ac298a98eaad" + } + + virtualbox = { + guest_os_type = "Ubuntu_64" + } + + vmware = { + guest_os_type = "ubuntu-64" + } + } +} diff --git a/samples/visual-studio/Policyfile.rb b/samples/visual-studio/Policyfile.rb new file mode 100644 index 000000000..b1d50082f --- /dev/null +++ b/samples/visual-studio/Policyfile.rb @@ -0,0 +1,12 @@ +require "#{File.dirname(__FILE__)}/../../src/windows/chef/Policyfile" + +name 'gusztavvargadr_packer_visualstudio' + +gusztavvargadr_packer_windows_sources + +run_list( + 'recipe[gusztavvargadr_packer_windows::initialize]', + 'recipe[gusztavvargadr_packer_windows::apply]', + 'recipe[gusztavvargadr_visualstudio::default]', + 'recipe[gusztavvargadr_packer_windows::cleanup]' +) diff --git a/samples/visual-studio/Vagrantfile b/samples/visual-studio/Vagrantfile index 864f825a5..e7a6c8221 100644 --- a/samples/visual-studio/Vagrantfile +++ b/samples/visual-studio/Vagrantfile @@ -1,27 +1,21 @@ -Vagrant.configure("2") do |config| - config.vm.define "default", primary: true do |config_vm| - config_vm.vm.box = "gusztavvargadr/visual-studio" - end - - config.vm.define "2022-community-windows-11", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/visual-studio-2022-community-windows-11" - end - - config.vm.define "2022-community-windows-10", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/visual-studio-2022-community-windows-10" - end - - config.vm.define "2019-community-windows-11", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/visual-studio-2019-community-windows-11" - end +load "#{File.dirname(__FILE__)}/../core.Vagrantfile" - config.vm.define "2019-community-windows-10", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/visual-studio-2019-community-windows-10" - end +Vagrant.configure("2") do |config| + config_vm_define config, "latest", "visual-studio" + config_vm_define config, "2022-community-windows-11", "visual-studio-2022-community-windows-11" + config_vm_define config, "2022-community-windows-10", "visual-studio-2022-community-windows-10" + config_vm_define config, "2019-community-windows-11", "visual-studio-2019-community-windows-11" + config_vm_define config, "2019-community-windows-10", "visual-studio-2019-community-windows-10" config.vm.provision "shell", inline: <<-EOH cmd /c ver + systeminfo + Get-ComputerInfo + + Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) + choco list -i + dotnet --info EOH end diff --git a/samples/visual-studio/attributes.2019-community.json b/samples/visual-studio/attributes.2019-community.json new file mode 100644 index 000000000..dcf2124cb --- /dev/null +++ b/samples/visual-studio/attributes.2019-community.json @@ -0,0 +1,8 @@ +{ + "gusztavvargadr_visualstudio": { + "tools": { + "ide:2019-community": { + } + } + } +} diff --git a/samples/visual-studio/attributes.2022-community.json b/samples/visual-studio/attributes.2022-community.json new file mode 100644 index 000000000..a561dbcf8 --- /dev/null +++ b/samples/visual-studio/attributes.2022-community.json @@ -0,0 +1,8 @@ +{ + "gusztavvargadr_visualstudio": { + "tools": { + "ide:2022-community": { + } + } + } +} diff --git a/samples/visual-studio/images.pkrvars.hcl b/samples/visual-studio/images.pkrvars.hcl new file mode 100644 index 000000000..637c71da3 --- /dev/null +++ b/samples/visual-studio/images.pkrvars.hcl @@ -0,0 +1,78 @@ +images = { + "2022-community-windows-11" = { + core = { + image_name = "visual-studio/2022-community-windows-11" + image_description = "Visual Studio 2022 Community on Windows 11" + image_version = "2022.2302" + } + + native = { + source_image = "windows-11/23h2-enterprise" + + chef_attributes = "2022-community" + } + + vagrant = { + cpus = "4" + memory = "8192" + box_alias = "visual-studio" + } + } + + "2022-community-windows-10" = { + core = { + image_name = "visual-studio/2022-community-windows-10" + image_description = "Visual Studio 2022 Community on Windows 10" + image_version = "2022.2202" + } + + native = { + source_image = "windows-10/22h2-enterprise" + + chef_attributes = "2022-community" + } + + vagrant = { + cpus = "4" + memory = "8192" + } + } + + "2019-community-windows-11" = { + core = { + image_name = "visual-studio/2019-community-windows-11" + image_description = "Visual Studio 2019 Community on Windows 11" + image_version = "2019.2302" + } + + native = { + source_image = "windows-11/23h2-enterprise" + + chef_attributes = "2019-community" + } + + vagrant = { + cpus = "4" + memory = "8192" + } + } + + "2019-community-windows-10" = { + core = { + image_name = "visual-studio/2019-community-windows-10" + image_description = "Visual Studio 2019 Community on Windows 10" + image_version = "2019.2202" + } + + native = { + source_image = "windows-10/22h2-enterprise" + + chef_attributes = "2019-community" + } + + vagrant = { + cpus = "4" + memory = "8192" + } + } +} diff --git a/samples/windows-10/Policyfile.rb b/samples/windows-10/Policyfile.rb new file mode 100644 index 000000000..c2f9f5759 --- /dev/null +++ b/samples/windows-10/Policyfile.rb @@ -0,0 +1,9 @@ +require "#{File.dirname(__FILE__)}/../../src/windows/chef/Policyfile" + +name 'gusztavvargadr_packer_windows_10' + +gusztavvargadr_packer_windows_sources + +run_list( + 'recipe[gusztavvargadr_packer_windows::default]' +) diff --git a/samples/windows-10/Vagrantfile b/samples/windows-10/Vagrantfile index 00f98c2db..f1dc3a6d2 100644 --- a/samples/windows-10/Vagrantfile +++ b/samples/windows-10/Vagrantfile @@ -1,30 +1,19 @@ -Vagrant.configure("2") do |config| - config.vm.define "default", primary: true do |config_vm| - config_vm.vm.box = "gusztavvargadr/windows-10" - end - - config.vm.define "22h2-enterprise", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/windows-10-22h2-enterprise" - end - - config.vm.define "22h2-enterprise-nocm", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/windows-10-22h2-enterprise-nocm" - end - - config.vm.define "21h2-enterprise", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/windows-10-21h2-enterprise" - end +load "#{File.dirname(__FILE__)}/../core.Vagrantfile" - config.vm.define "21h2-enterprise-ltsc", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/windows-10-21h2-enterprise-ltsc" - end - - config.vm.define "1809-enterprise-ltsc", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/windows-10-1809-enterprise-ltsc" - end +Vagrant.configure("2") do |config| + config_vm_define config, "latest", "windows-10" + config_vm_define config, "22h2-enterprise", "windows-10-22h2-enterprise" + config_vm_define config, "21h2-enterprise", "windows-10-21h2-enterprise" + config_vm_define config, "21h2-enterprise-ltsc", "windows-10-21h2-enterprise-ltsc" + config_vm_define config, "1809-enterprise-ltsc", "windows-10-1809-enterprise-ltsc" config.vm.provision "shell", inline: <<-EOH cmd /c ver + systeminfo + Get-ComputerInfo + + Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) + choco list -i EOH end diff --git a/samples/windows-10/images.pkrvars.hcl b/samples/windows-10/images.pkrvars.hcl new file mode 100644 index 000000000..5d6ff31f3 --- /dev/null +++ b/samples/windows-10/images.pkrvars.hcl @@ -0,0 +1,110 @@ +images = { + "22h2-enterprise" = { + core = { + image_name = "windows-10/22h2-enterprise" + image_description = "Windows 10 Version 22H2 Enterprise" + image_version = "2202.0" + } + + native = { + source_iso_url_local = "19045.2006.220908-0225.22h2_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso" + source_iso_url_remote = "https://software-static.download.prss.microsoft.com/dbazure/988969d5-f34g-4e03-ac9d-1f9786c66750/19045.2006.220908-0225.22h2_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso" + source_iso_checksum = "sha256:ef7312733a9f5d7d51cfa04ac497671995674ca5e1058d5164d6028f0938d668" + } + + vagrant = { + memory = "4096" + box_alias = "windows-10" + } + + virtualbox = { + guest_os_type = "Windows10_64" + } + + vmware = { + guest_os_type = "windows9-64" + } + } + + "21h2-enterprise" = { + core = { + image_name = "windows-10/21h2-enterprise" + image_description = "Windows 10 Version 21H2 Enterprise" + image_version = "2102.0" + } + + native = { + source_iso_url_local = "19044.1288.211006-0501.21h2_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso" + source_iso_url_remote = "https://software-download.microsoft.com/download/sg/444969d5-f34g-4e03-ac9d-1f9786c69161/19044.1288.211006-0501.21h2_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso" + source_iso_checksum = "sha256:69efac1df9ec8066341d8c9b62297ddece0e6b805533fdb6dd66bc8034fba27a" + } + + vagrant = { + memory = "4096" + } + + virtualbox = { + guest_os_type = "Windows10_64" + } + + vmware = { + guest_os_type = "windows9-64" + } + } + + "21h2-enterprise-ltsc" = { + core = { + image_name = "windows-10/21h2-enterprise-ltsc" + image_description = "Windows 10 Version 21H2 Enterprise LTSC" + image_version = "2102.0" + } + + native = { + source_iso_url_local = "19044.1288.211006-0501.21h2_release_svc_refresh_CLIENT_LTSC_EVAL_x64FRE_en-us.iso" + source_iso_url_remote = "https://software-download.microsoft.com/download/db/444969d5-f34g-4e03-ac9d-1f9786c69161/19044.1288.211006-0501.21h2_release_svc_refresh_CLIENT_LTSC_EVAL_x64FRE_en-us.iso" + source_iso_checksum = "sha256:e4ab2e3535be5748252a8d5d57539a6e59be8d6726345ee10e7afd2cb89fefb5" + + boot_image_name = "Windows 10 Enterprise LTSC 2021 Evaluation" + } + + vagrant = { + memory = "4096" + } + + virtualbox = { + guest_os_type = "Windows10_64" + } + + vmware = { + guest_os_type = "windows9-64" + } + } + + "1809-enterprise-ltsc" = { + core = { + image_name = "windows-10/1809-enterprise-ltsc" + image_description = "Windows 10 Version 1809 Enterprise LTSC" + image_version = "1809.0" + } + + native = { + source_iso_url_local = "17763.107.101029-1455.rs5_release_svc_refresh_CLIENT_LTSC_EVAL_x64FRE_en-us.iso" + source_iso_url_remote = "https://software-download.microsoft.com/download/sg/17763.107.101029-1455.rs5_release_svc_refresh_CLIENT_LTSC_EVAL_x64FRE_en-us.iso" + source_iso_checksum = "sha256:668fe1af70c2f7416328aee3a0bb066b12dc6bbd2576f40f812b95741e18bc3a" + + boot_chocolatey_version = "1.4.0" + } + + vagrant = { + memory = "4096" + } + + virtualbox = { + guest_os_type = "Windows10_64" + } + + vmware = { + guest_os_type = "windows9-64" + } + } +} diff --git a/samples/windows-11/Policyfile.rb b/samples/windows-11/Policyfile.rb new file mode 100644 index 000000000..72887cc17 --- /dev/null +++ b/samples/windows-11/Policyfile.rb @@ -0,0 +1,9 @@ +require "#{File.dirname(__FILE__)}/../../src/windows/chef/Policyfile" + +name 'gusztavvargadr_packer_windows_11' + +gusztavvargadr_packer_windows_sources + +run_list( + 'recipe[gusztavvargadr_packer_windows::default]' +) diff --git a/samples/windows-11/Vagrantfile b/samples/windows-11/Vagrantfile index 51b8bfd8e..6e950ff61 100644 --- a/samples/windows-11/Vagrantfile +++ b/samples/windows-11/Vagrantfile @@ -1,22 +1,19 @@ -Vagrant.configure("2") do |config| - config.vm.define "default", primary: true do |config_vm| - config_vm.vm.box = "gusztavvargadr/windows-11" - end - - config.vm.define "22h2-enterprise", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/windows-11-22h2-enterprise" - end - - config.vm.define "21h2-enterprise", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/windows-11-21h2-enterprise" - end +load "#{File.dirname(__FILE__)}/../core.Vagrantfile" - config.vm.define "insider-preview-enterprise", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/windows-11-insider-preview-enterprise" - end +Vagrant.configure("2") do |config| + config_vm_define config, "latest", "windows-11" + config_vm_define config, "23h2-enterprise", "windows-11-23h2-enterprise" + config_vm_define config, "22h2-enterprise", "windows-11-22h2-enterprise" + config_vm_define config, "21h2-enterprise", "windows-11-21h2-enterprise" + config_vm_define config, "insider-preview-enterprise", "windows-11-insider-preview-enterprise" config.vm.provision "shell", inline: <<-EOH cmd /c ver + systeminfo + Get-ComputerInfo + + Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) + choco list -i EOH end diff --git a/samples/windows-11/images.pkrvars.hcl b/samples/windows-11/images.pkrvars.hcl new file mode 100644 index 000000000..5264093d9 --- /dev/null +++ b/samples/windows-11/images.pkrvars.hcl @@ -0,0 +1,115 @@ +images = { + "23h2-enterprise" = { + core = { + image_name = "windows-11/23h2-enterprise" + image_description = "Windows 11 Version 23H2 Enterprise" + image_version = "2302.0" + } + + native = { + source_iso_url_local = "22631.2428.231001-0608.23H2_NI_RELEASE_SVC_REFRESH_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso" + source_iso_url_remote = "https://software-static.download.prss.microsoft.com/dbazure/888969d5-f34g-4e03-ac9d-1f9786c66749/22631.2428.231001-0608.23H2_NI_RELEASE_SVC_REFRESH_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso" + source_iso_checksum = "sha256:c8dbc96b61d04c8b01faf6ce0794fdf33965c7b350eaa3eb1e6697019902945c" + + boot_setup_script = "setup.cmd" + } + + vagrant = { + memory = "4096" + box_alias = "windows-11" + } + + virtualbox = { + guest_os_type = "Windows11_64" + } + + vmware = { + guest_os_type = "windows11-64" + } + } + + "22h2-enterprise" = { + core = { + image_name = "windows-11/22h2-enterprise" + image_description = "Windows 11 Version 22H2 Enterprise" + image_version = "2202.0" + } + + native = { + source_iso_url_local = "22621.525.220925-0207.ni_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso" + source_iso_url_remote = "https://software-static.download.prss.microsoft.com/dbazure/988969d5-f34g-4e03-ac9d-1f9786c66751/22621.525.220925-0207.ni_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso" + source_iso_checksum = "sha256:ebbc79106715f44f5020f77bd90721b17c5a877cbc15a3535b99155493a1bb3f" + + boot_setup_script = "setup.cmd" + } + + vagrant = { + memory = "4096" + } + + virtualbox = { + guest_os_type = "Windows11_64" + } + + vmware = { + guest_os_type = "windows11-64" + } + } + + "21h2-enterprise" = { + core = { + image_name = "windows-11/21h2-enterprise" + image_description = "Windows 11 Version 21H2 Enterprise" + image_version = "2102.0" + } + + native = { + source_iso_url_local = "22000.194.210913-1444.co_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso" + source_iso_url_remote = "https://software-download.microsoft.com/download/sg/22000.194.210913-1444.co_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso" + source_iso_checksum = "sha256:e8b1d2a1a85a09b4bf6154084a8be8e3c814894a15a7bcf3e8e63fcfa9a528cb" + + boot_setup_script = "setup.cmd" + } + + vagrant = { + memory = "4096" + } + + virtualbox = { + guest_os_type = "Windows11_64" + } + + vmware = { + guest_os_type = "windows11-64" + } + } + + "insider-preview-enterprise" = { + core = { + image_name = "windows-11/insider-preview-enterprise" + image_description = "Windows 11 Insider Preview Enterprise" + image_version = "2302.0" + } + + native = { + source_iso_url_local = "Windows11_InsiderPreview_EnterpriseVL_x64_en-us_26040.iso" + source_iso_url_remote = "https://app.vagrantup.com/gusztavvargadr-iso/boxes/windows-11-insider-preview/versions/2302.0.2401/providers/iso/amd64/vagrant.box" + source_iso_checksum = "sha256:1cbe4d3a7c8435c9c3d87631c12d33eff585f73d79519f802fb1d83763d5f700" + + boot_setup_script = "setup.cmd" + boot_image_name = "Windows 11 Enterprise" + } + + vagrant = { + memory = "4096" + } + + virtualbox = { + guest_os_type = "Windows11_64" + } + + vmware = { + guest_os_type = "windows11-64" + } + } +} diff --git a/src/w11/packer/builders/iso/floppy/setup.cmd b/samples/windows-11/setup.cmd similarity index 100% rename from src/w11/packer/builders/iso/floppy/setup.cmd rename to samples/windows-11/setup.cmd diff --git a/samples/windows-server-core/Vagrantfile b/samples/windows-server-core/Vagrantfile deleted file mode 100644 index 6bfb9cb81..000000000 --- a/samples/windows-server-core/Vagrantfile +++ /dev/null @@ -1,22 +0,0 @@ -Vagrant.configure("2") do |config| - config.vm.define "default", primary: true do |config_vm| - config_vm.vm.box = "gusztavvargadr/windows-server-core" - end - - config.vm.define "2022-standard", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/windows-server-2022-standard-core" - end - - config.vm.define "2019-standard", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/windows-server-2019-standard-core" - end - - config.vm.define "insider-preview-standard", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/windows-server-insider-preview-standard-core" - end - - config.vm.provision "shell", inline: <<-EOH - cmd /c ver - systeminfo - EOH -end diff --git a/samples/windows-server/Policyfile.rb b/samples/windows-server/Policyfile.rb new file mode 100644 index 000000000..b6fb76257 --- /dev/null +++ b/samples/windows-server/Policyfile.rb @@ -0,0 +1,9 @@ +require "#{File.dirname(__FILE__)}/../../src/windows/chef/Policyfile" + +name 'gusztavvargadr_packer_windows_server' + +gusztavvargadr_packer_windows_sources + +run_list( + 'recipe[gusztavvargadr_packer_windows::default]' +) diff --git a/samples/windows-server/Vagrantfile b/samples/windows-server/Vagrantfile index acbeb7129..df302da9c 100644 --- a/samples/windows-server/Vagrantfile +++ b/samples/windows-server/Vagrantfile @@ -1,26 +1,22 @@ -Vagrant.configure("2") do |config| - config.vm.define "default", primary: true do |config_vm| - config_vm.vm.box = "gusztavvargadr/windows-server" - end - - config.vm.define "2022-standard", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/windows-server-2022-standard" - end - - config.vm.define "2022-standard-nocm", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/windows-server-2022-standard-nocm" - end - - config.vm.define "2019-standard", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/windows-server-2019-standard" - end +load "#{File.dirname(__FILE__)}/../core.Vagrantfile" - config.vm.define "insider-preview-standard", autostart: false do |config_vm| - config_vm.vm.box = "gusztavvargadr/windows-server-insider-preview-standard" - end +Vagrant.configure("2") do |config| + config_vm_define config, "latest", "windows-server" + config_vm_define config, "latest-core", "windows-server-core" + config_vm_define config, "2022-standard", "windows-server-2022-standard" + config_vm_define config, "2022-standard-core", "windows-server-2022-standard-core" + config_vm_define config, "2019-standard", "windows-server-2019-standard" + config_vm_define config, "2019-standard-core", "windows-server-2019-standard-core" + config_vm_define config, "insider-preview-standard", "windows-server-insider-preview-standard" + config_vm_define config, "insider-preview-standard-core", "windows-server-insider-preview-standard-core" config.vm.provision "shell", inline: <<-EOH cmd /c ver + systeminfo + Get-ComputerInfo + + Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) + choco list -i EOH end diff --git a/samples/windows-server/images.pkrvars.hcl b/samples/windows-server/images.pkrvars.hcl new file mode 100644 index 000000000..c6725c94b --- /dev/null +++ b/samples/windows-server/images.pkrvars.hcl @@ -0,0 +1,151 @@ +images = { + "2022-standard" = { + core = { + image_description = "Windows Server 2022 Standard" + image_version = "2102.0" + } + + native = { + source_iso_url_local = "SERVER_EVAL_x64FRE_en-us.iso" + source_iso_url_remote = "https://software-static.download.prss.microsoft.com/sg/download/888969d5-f34g-4e03-ac9d-1f9786c66749/SERVER_EVAL_x64FRE_en-us.iso" + source_iso_checksum = "sha256:3e4fa6d8507b554856fc9ca6079cc402df11a8b79344871669f0251535255325" + + boot_image_name = "Windows Server 2022 SERVERSTANDARD" + } + + vagrant = { + box_alias = "windows-server" + } + + virtualbox = { + guest_os_type = "Windows2019_64" + } + + vmware = { + guest_os_type = "windows2019srvnext-64" + } + } + + "2022-standard-core" = { + core = { + image_description = "Windows Server 2022 Standard Core" + image_version = "2102.0" + } + + native = { + source_iso_url_local = "SERVER_EVAL_x64FRE_en-us.iso" + source_iso_url_remote = "https://software-static.download.prss.microsoft.com/sg/download/888969d5-f34g-4e03-ac9d-1f9786c66749/SERVER_EVAL_x64FRE_en-us.iso" + source_iso_checksum = "sha256:3e4fa6d8507b554856fc9ca6079cc402df11a8b79344871669f0251535255325" + + boot_image_name = "Windows Server 2022 SERVERSTANDARDCORE" + } + + vagrant = { + box_alias = "windows-server-core" + } + + virtualbox = { + guest_os_type = "Windows2019_64" + } + + vmware = { + guest_os_type = "windows2019srvnext-64" + } + } + + "2019-standard" = { + core = { + image_description = "Windows Server 2019 Standard" + image_version = "1809.0" + } + + native = { + source_iso_url_local = "17763.737.190906-2324.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us_1.iso" + source_iso_url_remote = "https://software-download.microsoft.com/download/pr/17763.737.190906-2324.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us_1.iso" + source_iso_checksum = "sha256:549bca46c055157291be6c22a3aaaed8330e78ef4382c99ee82c896426a1cee1" + + boot_image_name = "Windows Server 2019 SERVERSTANDARD" + boot_chocolatey_version = "1.4.0" + } + + virtualbox = { + guest_os_type = "Windows2019_64" + } + + vmware = { + guest_os_type = "windows2019srv-64" + } + } + + "2019-standard-core" = { + core = { + image_description = "Windows Server 2019 Standard Core" + image_version = "1809.0" + } + + native = { + source_iso_url_local = "17763.737.190906-2324.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us_1.iso" + source_iso_url_remote = "https://software-download.microsoft.com/download/pr/17763.737.190906-2324.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us_1.iso" + source_iso_checksum = "sha256:549bca46c055157291be6c22a3aaaed8330e78ef4382c99ee82c896426a1cee1" + + boot_image_name = "Windows Server 2019 SERVERSTANDARDCORE" + boot_chocolatey_version = "1.4.0" + } + + virtualbox = { + guest_os_type = "Windows2019_64" + } + + vmware = { + guest_os_type = "windows2019srv-64" + } + } + + "insider-preview-standard" = { + core = { + image_description = "Windows Server Insider Preview Standard" + image_version = "2302.0" + } + + native = { + source_iso_url_local = "Windows_InsiderPreview_Server_vNext_en-us_26040.iso" + source_iso_url_remote = "https://app.vagrantup.com/gusztavvargadr-iso/boxes/windows-server-insider-preview/versions/2302.0.2401/providers/iso/amd64/vagrant.box" + source_iso_checksum = "sha256:e7ad4dd7c4a5fcb8e2bfed3be05ca5346e44c3cc8d3a19987baf57b6052386d8" + + boot_image_name = "Windows Server 2022 SERVERSTANDARD" + boot_product_key = "MFY9F-XBN2F-TYFMP-CCV49-RMYVH" + } + + virtualbox = { + guest_os_type = "Windows2019_64" + } + + vmware = { + guest_os_type = "windows2019srvnext-64" + } + } + + "insider-preview-standard-core" = { + core = { + image_description = "Windows Server Insider Preview Standard Core" + image_version = "2302.0" + } + + native = { + source_iso_url_local = "Windows_InsiderPreview_Server_vNext_en-us_26040.iso" + source_iso_url_remote = "https://app.vagrantup.com/gusztavvargadr-iso/boxes/windows-server-insider-preview/versions/2302.0.2401/providers/iso/amd64/vagrant.box" + source_iso_checksum = "sha256:e7ad4dd7c4a5fcb8e2bfed3be05ca5346e44c3cc8d3a19987baf57b6052386d8" + + boot_image_name = "Windows Server 2022 SERVERSTANDARDCORE" + boot_product_key = "MFY9F-XBN2F-TYFMP-CCV49-RMYVH" + } + + virtualbox = { + guest_os_type = "Windows2019_64" + } + + vmware = { + guest_os_type = "windows2019srvnext-64" + } + } +} diff --git a/src/core/azp/cd-stages.yml b/src/core/azp/cd-stages.yml deleted file mode 100644 index 17a36c966..000000000 --- a/src/core/azp/cd-stages.yml +++ /dev/null @@ -1,102 +0,0 @@ -parameters: - image: '' - provider: '' - configuration: '' - -stages: - - stage: cd - displayName: CD - condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) - - jobs: - - job: publish - displayName: Publish ${{ parameters.image }}-${{ parameters.provider }}-${{ parameters.configuration }} - - pool: - vmImage: 'ubuntu-22.04' - - variables: - - group: environment-vagrantcloud - - steps: - - checkout: self - submodules: recursive - - - script: | - curl -Ls https://gist.github.com/gusztavvargadr/1f0d7dddc7f48549368eaaedf19bfe55/raw/deploy.sh | sudo POLICY_NAME="vagrant" bash -s - displayName: Initialize agent - - - script: | - dotnet --info - - dotnet tool restore - displayName: Initialize .NET - - - script: | - vagrant --version - vagrant plugin list - - vagrant box list - vagrant global-status --prune - displayName: Initialize Vagrant - - - task: DownloadPipelineArtifact@2 - inputs: - artifact: build - path: $(System.DefaultWorkingDirectory)/build/${{ parameters.image }}/${{ parameters.provider }}-${{ parameters.configuration }} - displayName: Artifacts - Download - - - script: | - dotnet cake build.cake --target=publish --configuration=${{ parameters.image }}-${{ parameters.provider }}-${{ parameters.configuration }} - displayName: Build - Publish - env: - VAGRANT_CLOUD_TOKEN: $(environment-vagrant-cloud-token) - - - script: | - dotnet cake build.cake --target=clean --configuration=${{ parameters.image }}-${{ parameters.provider }}-${{ parameters.configuration }} --recursive true - displayName: Build - Clean - condition: always() - - - job: download - displayName: Download ${{ parameters.image }}-${{ parameters.provider }}-${{ parameters.configuration }} - - pool: - vmImage: 'ubuntu-22.04' - - dependsOn: publish - - steps: - - checkout: self - submodules: recursive - - - script: | - df -h - sudo rm -Rf /usr/local/lib/android - sudo rm -Rf /usr/local/lib/node_modules - df -h - - curl -Ls https://gist.github.com/gusztavvargadr/1f0d7dddc7f48549368eaaedf19bfe55/raw/deploy.sh | sudo POLICY_NAME="vagrant" bash -s - displayName: Initialize agent - - - script: | - dotnet --info - - dotnet tool restore - displayName: Initialize .NET - - - script: | - vagrant --version - vagrant plugin list - - vagrant box list - vagrant global-status --prune - displayName: Initialize Vagrant - - - script: | - dotnet cake build.cake --target=download --configuration=${{ parameters.image }}-${{ parameters.provider }}-${{ parameters.configuration }} - displayName: Build - Download - - - script: | - dotnet cake build.cake --target=clean --configuration=${{ parameters.image }}-${{ parameters.provider }}-${{ parameters.configuration }} --recursive true - displayName: Build - Clean - condition: always() diff --git a/src/core/azp/ci-stages.yml b/src/core/azp/ci-stages.yml deleted file mode 100644 index 0e4126ba0..000000000 --- a/src/core/azp/ci-stages.yml +++ /dev/null @@ -1,87 +0,0 @@ -parameters: - image: '' - provider: '' - configuration: '' - parent: '' - -stages: - - stage: ci - displayName: CI - - jobs: - - job: build - displayName: Build ${{ parameters.image }}-${{ parameters.provider }}-${{ parameters.configuration }} - - pool: - name: default - demands: - - VSTS_AGENT_CAP_VIRTUALIZATION_PROVIDER -equals ${{ parameters.provider }} - - timeoutInMinutes: 150 - - steps: - - checkout: self - submodules: recursive - - - script: | - dotnet --info - - dotnet tool restore - displayName: Initialize .NET - - - script: | - packer --version - displayName: Initialize Packer - - - script: | - vagrant --version - vagrant plugin list - - vagrant box list - vagrant global-status --prune - displayName: Initialize Vagrant - - - ${{ if parameters.parent }}: - - task: DownloadPipelineArtifact@2 - inputs: - artifact: build - path: $(System.DefaultWorkingDirectory)/build/${{ parameters.parent }}/${{ parameters.provider }}-core - source: specific - project: $(System.TeamProjectId) - pipeline: $(resources.pipeline.parent.pipelineID) - runVersion: latestFromBranch - runBranch: $(Build.SourceBranch) - displayName: Artifacts - Download - condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) - - - task: DownloadPipelineArtifact@2 - inputs: - artifact: build - path: $(System.DefaultWorkingDirectory)/build/${{ parameters.parent }}/${{ parameters.provider }}-core - source: specific - project: $(System.TeamProjectId) - pipeline: $(resources.pipeline.parent.pipelineID) - runVersion: latest - displayName: Artifacts - Download - condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master')) - - - script: | - dotnet cake build.cake --target=restore --configuration=${{ parameters.image }}-${{ parameters.provider }}-${{ parameters.configuration }} - displayName: Build - Restore - - - script: | - dotnet cake build.cake --target=build --configuration=${{ parameters.image }}-${{ parameters.provider }}-${{ parameters.configuration }} - displayName: Build - Build - - - script: | - dotnet cake build.cake --target=test --configuration=${{ parameters.image }}-${{ parameters.provider }}-${{ parameters.configuration }} - displayName: Build - Test - - - publish: $(System.DefaultWorkingDirectory)/build/${{ parameters.image }}/${{ parameters.provider }}-${{ parameters.configuration }} - artifact: build - displayName: Artifacts - Publish - - - script: | - dotnet cake build.cake --target=clean --configuration=${{ parameters.image }}-${{ parameters.provider }}-${{ parameters.configuration }} --recursive true - displayName: Build - Clean - condition: always() diff --git a/src/core/azp/docker/community-ubuntu-server/hyperv-core.yml b/src/core/azp/docker/community-ubuntu-server/hyperv-core.yml deleted file mode 100644 index efc9b6159..000000000 --- a/src/core/azp/docker/community-ubuntu-server/hyperv-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: u2004s-hyperv-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: u2004s-dc - provider: hyperv - configuration: core - parent: u2004s diff --git a/src/core/azp/docker/community-ubuntu-server/hyperv-vagrant.yml b/src/core/azp/docker/community-ubuntu-server/hyperv-vagrant.yml deleted file mode 100644 index 4f63b4973..000000000 --- a/src/core/azp/docker/community-ubuntu-server/hyperv-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: u2004s-dc-hyperv-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: u2004s-dc - provider: hyperv - configuration: vagrant - parent: u2004s-dc - - - template: ../../cd-stages.yml - parameters: - image: u2004s-dc - provider: hyperv - configuration: vagrant diff --git a/src/core/azp/docker/community-ubuntu-server/virtualbox-core.yml b/src/core/azp/docker/community-ubuntu-server/virtualbox-core.yml deleted file mode 100644 index b2c75ec36..000000000 --- a/src/core/azp/docker/community-ubuntu-server/virtualbox-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: u2004s-virtualbox-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: u2004s-dc - provider: virtualbox - configuration: core - parent: u2004s diff --git a/src/core/azp/docker/community-ubuntu-server/virtualbox-vagrant.yml b/src/core/azp/docker/community-ubuntu-server/virtualbox-vagrant.yml deleted file mode 100644 index fc977c899..000000000 --- a/src/core/azp/docker/community-ubuntu-server/virtualbox-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: u2004s-dc-virtualbox-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: u2004s-dc - provider: virtualbox - configuration: vagrant - parent: u2004s-dc - - - template: ../../cd-stages.yml - parameters: - image: u2004s-dc - provider: virtualbox - configuration: vagrant diff --git a/src/core/azp/docker/community-ubuntu-server/vmware-core.yml b/src/core/azp/docker/community-ubuntu-server/vmware-core.yml deleted file mode 100644 index 28a411412..000000000 --- a/src/core/azp/docker/community-ubuntu-server/vmware-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: u2004s-vmware-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: u2004s-dc - provider: vmware - configuration: core - parent: u2004s diff --git a/src/core/azp/docker/community-ubuntu-server/vmware-vagrant.yml b/src/core/azp/docker/community-ubuntu-server/vmware-vagrant.yml deleted file mode 100644 index 65d9ddca3..000000000 --- a/src/core/azp/docker/community-ubuntu-server/vmware-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: u2004s-dc-vmware-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: u2004s-dc - provider: vmware - configuration: vagrant - parent: u2004s-dc - - - template: ../../cd-stages.yml - parameters: - image: u2004s-dc - provider: vmware - configuration: vagrant diff --git a/src/core/azp/docker/community-windows-server-core/hyperv-core.yml b/src/core/azp/docker/community-windows-server-core/hyperv-core.yml deleted file mode 100644 index 9e5d27702..000000000 --- a/src/core/azp/docker/community-windows-server-core/hyperv-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022sc-hyperv-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022sc-dc - provider: hyperv - configuration: core - parent: ws2022sc diff --git a/src/core/azp/docker/community-windows-server-core/hyperv-vagrant.yml b/src/core/azp/docker/community-windows-server-core/hyperv-vagrant.yml deleted file mode 100644 index c70029f18..000000000 --- a/src/core/azp/docker/community-windows-server-core/hyperv-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022sc-dc-hyperv-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022sc-dc - provider: hyperv - configuration: vagrant - parent: ws2022sc-dc - - - template: ../../cd-stages.yml - parameters: - image: ws2022sc-dc - provider: hyperv - configuration: vagrant diff --git a/src/core/azp/docker/community-windows-server-core/virtualbox-core.yml b/src/core/azp/docker/community-windows-server-core/virtualbox-core.yml deleted file mode 100644 index e47f2c733..000000000 --- a/src/core/azp/docker/community-windows-server-core/virtualbox-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022sc-virtualbox-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022sc-dc - provider: virtualbox - configuration: core - parent: ws2022sc diff --git a/src/core/azp/docker/community-windows-server-core/virtualbox-vagrant.yml b/src/core/azp/docker/community-windows-server-core/virtualbox-vagrant.yml deleted file mode 100644 index bae5194f2..000000000 --- a/src/core/azp/docker/community-windows-server-core/virtualbox-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022sc-dc-virtualbox-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022sc-dc - provider: virtualbox - configuration: vagrant - parent: ws2022sc-dc - - - template: ../../cd-stages.yml - parameters: - image: ws2022sc-dc - provider: virtualbox - configuration: vagrant diff --git a/src/core/azp/docker/community-windows-server/hyperv-core.yml b/src/core/azp/docker/community-windows-server/hyperv-core.yml deleted file mode 100644 index 3c96c7b05..000000000 --- a/src/core/azp/docker/community-windows-server/hyperv-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022s-hyperv-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022s-dc - provider: hyperv - configuration: core - parent: ws2022s diff --git a/src/core/azp/docker/community-windows-server/hyperv-vagrant.yml b/src/core/azp/docker/community-windows-server/hyperv-vagrant.yml deleted file mode 100644 index e21ca3241..000000000 --- a/src/core/azp/docker/community-windows-server/hyperv-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022s-dc-hyperv-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022s-dc - provider: hyperv - configuration: vagrant - parent: ws2022s-dc - - - template: ../../cd-stages.yml - parameters: - image: ws2022s-dc - provider: hyperv - configuration: vagrant diff --git a/src/core/azp/docker/community-windows-server/virtualbox-core.yml b/src/core/azp/docker/community-windows-server/virtualbox-core.yml deleted file mode 100644 index d88916188..000000000 --- a/src/core/azp/docker/community-windows-server/virtualbox-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022s-virtualbox-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022s-dc - provider: virtualbox - configuration: core - parent: ws2022s diff --git a/src/core/azp/docker/community-windows-server/virtualbox-vagrant.yml b/src/core/azp/docker/community-windows-server/virtualbox-vagrant.yml deleted file mode 100644 index f5384c487..000000000 --- a/src/core/azp/docker/community-windows-server/virtualbox-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022s-dc-virtualbox-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022s-dc - provider: virtualbox - configuration: vagrant - parent: ws2022s-dc - - - template: ../../cd-stages.yml - parameters: - image: ws2022s-dc - provider: virtualbox - configuration: vagrant diff --git a/src/core/azp/docker/community-windows-server/vmware-core.yml b/src/core/azp/docker/community-windows-server/vmware-core.yml deleted file mode 100644 index ad89bd7b0..000000000 --- a/src/core/azp/docker/community-windows-server/vmware-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022s-vmware-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022s-dc - provider: vmware - configuration: core - parent: ws2022s diff --git a/src/core/azp/docker/community-windows-server/vmware-vagrant.yml b/src/core/azp/docker/community-windows-server/vmware-vagrant.yml deleted file mode 100644 index 43e8bd0ef..000000000 --- a/src/core/azp/docker/community-windows-server/vmware-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022s-dc-vmware-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022s-dc - provider: vmware - configuration: vagrant - parent: ws2022s-dc - - - template: ../../cd-stages.yml - parameters: - image: ws2022s-dc - provider: vmware - configuration: vagrant diff --git a/src/core/azp/iis/windows-server-core/hyperv-core.yml b/src/core/azp/iis/windows-server-core/hyperv-core.yml deleted file mode 100644 index 82974f345..000000000 --- a/src/core/azp/iis/windows-server-core/hyperv-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022sc-hyperv-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022sc-iis - provider: hyperv - configuration: core - parent: ws2022sc diff --git a/src/core/azp/iis/windows-server-core/hyperv-vagrant.yml b/src/core/azp/iis/windows-server-core/hyperv-vagrant.yml deleted file mode 100644 index 2327e2343..000000000 --- a/src/core/azp/iis/windows-server-core/hyperv-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022sc-iis-hyperv-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022sc-iis - provider: hyperv - configuration: vagrant - parent: ws2022sc-iis - - - template: ../../cd-stages.yml - parameters: - image: ws2022sc-iis - provider: hyperv - configuration: vagrant diff --git a/src/core/azp/iis/windows-server-core/virtualbox-core.yml b/src/core/azp/iis/windows-server-core/virtualbox-core.yml deleted file mode 100644 index 965c57b7b..000000000 --- a/src/core/azp/iis/windows-server-core/virtualbox-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022sc-virtualbox-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022sc-iis - provider: virtualbox - configuration: core - parent: ws2022sc diff --git a/src/core/azp/iis/windows-server-core/virtualbox-vagrant.yml b/src/core/azp/iis/windows-server-core/virtualbox-vagrant.yml deleted file mode 100644 index c83e4f6c7..000000000 --- a/src/core/azp/iis/windows-server-core/virtualbox-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022sc-iis-virtualbox-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022sc-iis - provider: virtualbox - configuration: vagrant - parent: ws2022sc-iis - - - template: ../../cd-stages.yml - parameters: - image: ws2022sc-iis - provider: virtualbox - configuration: vagrant diff --git a/src/core/azp/iis/windows-server/hyperv-core.yml b/src/core/azp/iis/windows-server/hyperv-core.yml deleted file mode 100644 index 22104ef22..000000000 --- a/src/core/azp/iis/windows-server/hyperv-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022s-hyperv-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022s-iis - provider: hyperv - configuration: core - parent: ws2022s diff --git a/src/core/azp/iis/windows-server/hyperv-vagrant.yml b/src/core/azp/iis/windows-server/hyperv-vagrant.yml deleted file mode 100644 index 47bae7443..000000000 --- a/src/core/azp/iis/windows-server/hyperv-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022s-iis-hyperv-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022s-iis - provider: hyperv - configuration: vagrant - parent: ws2022s-iis - - - template: ../../cd-stages.yml - parameters: - image: ws2022s-iis - provider: hyperv - configuration: vagrant diff --git a/src/core/azp/iis/windows-server/virtualbox-core.yml b/src/core/azp/iis/windows-server/virtualbox-core.yml deleted file mode 100644 index 029e9b627..000000000 --- a/src/core/azp/iis/windows-server/virtualbox-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022s-virtualbox-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022s-iis - provider: virtualbox - configuration: core - parent: ws2022s diff --git a/src/core/azp/iis/windows-server/virtualbox-vagrant.yml b/src/core/azp/iis/windows-server/virtualbox-vagrant.yml deleted file mode 100644 index 1b1a44c85..000000000 --- a/src/core/azp/iis/windows-server/virtualbox-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022s-iis-virtualbox-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022s-iis - provider: virtualbox - configuration: vagrant - parent: ws2022s-iis - - - template: ../../cd-stages.yml - parameters: - image: ws2022s-iis - provider: virtualbox - configuration: vagrant diff --git a/src/core/azp/iis/windows-server/vmware-core.yml b/src/core/azp/iis/windows-server/vmware-core.yml deleted file mode 100644 index 2a202d94c..000000000 --- a/src/core/azp/iis/windows-server/vmware-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022s-vmware-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022s-iis - provider: vmware - configuration: core - parent: ws2022s diff --git a/src/core/azp/iis/windows-server/vmware-vagrant.yml b/src/core/azp/iis/windows-server/vmware-vagrant.yml deleted file mode 100644 index 627a38dcf..000000000 --- a/src/core/azp/iis/windows-server/vmware-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022s-iis-vmware-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022s-iis - provider: vmware - configuration: vagrant - parent: ws2022s-iis - - - template: ../../cd-stages.yml - parameters: - image: ws2022s-iis - provider: vmware - configuration: vagrant diff --git a/src/core/azp/sql-server/2019-developer-windows-server-core/hyperv-core.yml b/src/core/azp/sql-server/2019-developer-windows-server-core/hyperv-core.yml deleted file mode 100644 index c98063d85..000000000 --- a/src/core/azp/sql-server/2019-developer-windows-server-core/hyperv-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022sc-hyperv-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022sc-sql19d - provider: hyperv - configuration: core - parent: ws2022sc diff --git a/src/core/azp/sql-server/2019-developer-windows-server-core/hyperv-vagrant.yml b/src/core/azp/sql-server/2019-developer-windows-server-core/hyperv-vagrant.yml deleted file mode 100644 index 437e5fe4c..000000000 --- a/src/core/azp/sql-server/2019-developer-windows-server-core/hyperv-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022sc-sql19d-hyperv-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022sc-sql19d - provider: hyperv - configuration: vagrant - parent: ws2022sc-sql19d - - - template: ../../cd-stages.yml - parameters: - image: ws2022sc-sql19d - provider: hyperv - configuration: vagrant diff --git a/src/core/azp/sql-server/2019-developer-windows-server-core/virtualbox-core.yml b/src/core/azp/sql-server/2019-developer-windows-server-core/virtualbox-core.yml deleted file mode 100644 index d8cd96683..000000000 --- a/src/core/azp/sql-server/2019-developer-windows-server-core/virtualbox-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022sc-virtualbox-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022sc-sql19d - provider: virtualbox - configuration: core - parent: ws2022sc diff --git a/src/core/azp/sql-server/2019-developer-windows-server-core/virtualbox-vagrant.yml b/src/core/azp/sql-server/2019-developer-windows-server-core/virtualbox-vagrant.yml deleted file mode 100644 index 499d8ad1d..000000000 --- a/src/core/azp/sql-server/2019-developer-windows-server-core/virtualbox-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022sc-sql19d-virtualbox-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022sc-sql19d - provider: virtualbox - configuration: vagrant - parent: ws2022sc-sql19d - - - template: ../../cd-stages.yml - parameters: - image: ws2022sc-sql19d - provider: virtualbox - configuration: vagrant diff --git a/src/core/azp/sql-server/2019-developer-windows-server/hyperv-core.yml b/src/core/azp/sql-server/2019-developer-windows-server/hyperv-core.yml deleted file mode 100644 index a03dd3fe9..000000000 --- a/src/core/azp/sql-server/2019-developer-windows-server/hyperv-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022s-hyperv-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022s-sql19d - provider: hyperv - configuration: core - parent: ws2022s diff --git a/src/core/azp/sql-server/2019-developer-windows-server/hyperv-vagrant.yml b/src/core/azp/sql-server/2019-developer-windows-server/hyperv-vagrant.yml deleted file mode 100644 index 6300df179..000000000 --- a/src/core/azp/sql-server/2019-developer-windows-server/hyperv-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022s-sql19d-hyperv-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022s-sql19d - provider: hyperv - configuration: vagrant - parent: ws2022s-sql19d - - - template: ../../cd-stages.yml - parameters: - image: ws2022s-sql19d - provider: hyperv - configuration: vagrant diff --git a/src/core/azp/sql-server/2019-developer-windows-server/virtualbox-core.yml b/src/core/azp/sql-server/2019-developer-windows-server/virtualbox-core.yml deleted file mode 100644 index 05f99f17c..000000000 --- a/src/core/azp/sql-server/2019-developer-windows-server/virtualbox-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022s-virtualbox-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022s-sql19d - provider: virtualbox - configuration: core - parent: ws2022s diff --git a/src/core/azp/sql-server/2019-developer-windows-server/virtualbox-vagrant.yml b/src/core/azp/sql-server/2019-developer-windows-server/virtualbox-vagrant.yml deleted file mode 100644 index 19f0863b4..000000000 --- a/src/core/azp/sql-server/2019-developer-windows-server/virtualbox-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022s-sql19d-virtualbox-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022s-sql19d - provider: virtualbox - configuration: vagrant - parent: ws2022s-sql19d - - - template: ../../cd-stages.yml - parameters: - image: ws2022s-sql19d - provider: virtualbox - configuration: vagrant diff --git a/src/core/azp/sql-server/2019-developer-windows-server/vmware-core.yml b/src/core/azp/sql-server/2019-developer-windows-server/vmware-core.yml deleted file mode 100644 index c02b82504..000000000 --- a/src/core/azp/sql-server/2019-developer-windows-server/vmware-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022s-vmware-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022s-sql19d - provider: vmware - configuration: core - parent: ws2022s diff --git a/src/core/azp/sql-server/2019-developer-windows-server/vmware-vagrant.yml b/src/core/azp/sql-server/2019-developer-windows-server/vmware-vagrant.yml deleted file mode 100644 index 39f812e95..000000000 --- a/src/core/azp/sql-server/2019-developer-windows-server/vmware-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022s-sql19d-vmware-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022s-sql19d - provider: vmware - configuration: vagrant - parent: ws2022s-sql19d - - - template: ../../cd-stages.yml - parameters: - image: ws2022s-sql19d - provider: vmware - configuration: vagrant diff --git a/src/core/azp/ubuntu-desktop/2004-lts-xfce/hyperv-core.yml b/src/core/azp/ubuntu-desktop/2004-lts-xfce/hyperv-core.yml deleted file mode 100644 index 0e39e157a..000000000 --- a/src/core/azp/ubuntu-desktop/2004-lts-xfce/hyperv-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: u2004s-hyperv-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: u2004d - provider: hyperv - configuration: core - parent: u2004s diff --git a/src/core/azp/ubuntu-desktop/2004-lts-xfce/hyperv-vagrant.yml b/src/core/azp/ubuntu-desktop/2004-lts-xfce/hyperv-vagrant.yml deleted file mode 100644 index 8a11caee2..000000000 --- a/src/core/azp/ubuntu-desktop/2004-lts-xfce/hyperv-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: u2004d-hyperv-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: u2004d - provider: hyperv - configuration: vagrant - parent: u2004d - - - template: ../../cd-stages.yml - parameters: - image: u2004d - provider: hyperv - configuration: vagrant diff --git a/src/core/azp/ubuntu-desktop/2004-lts-xfce/virtualbox-core.yml b/src/core/azp/ubuntu-desktop/2004-lts-xfce/virtualbox-core.yml deleted file mode 100644 index bab932444..000000000 --- a/src/core/azp/ubuntu-desktop/2004-lts-xfce/virtualbox-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: u2004s-virtualbox-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: u2004d - provider: virtualbox - configuration: core - parent: u2004s diff --git a/src/core/azp/ubuntu-desktop/2004-lts-xfce/virtualbox-vagrant.yml b/src/core/azp/ubuntu-desktop/2004-lts-xfce/virtualbox-vagrant.yml deleted file mode 100644 index fcf6f9380..000000000 --- a/src/core/azp/ubuntu-desktop/2004-lts-xfce/virtualbox-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: u2004d-virtualbox-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: u2004d - provider: virtualbox - configuration: vagrant - parent: u2004d - - - template: ../../cd-stages.yml - parameters: - image: u2004d - provider: virtualbox - configuration: vagrant diff --git a/src/core/azp/ubuntu-desktop/2004-lts-xfce/vmware-core.yml b/src/core/azp/ubuntu-desktop/2004-lts-xfce/vmware-core.yml deleted file mode 100644 index dda229d3d..000000000 --- a/src/core/azp/ubuntu-desktop/2004-lts-xfce/vmware-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: u2004s-vmware-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: u2004d - provider: vmware - configuration: core - parent: u2004s diff --git a/src/core/azp/ubuntu-desktop/2004-lts-xfce/vmware-vagrant.yml b/src/core/azp/ubuntu-desktop/2004-lts-xfce/vmware-vagrant.yml deleted file mode 100644 index d24c36855..000000000 --- a/src/core/azp/ubuntu-desktop/2004-lts-xfce/vmware-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: u2004d-vmware-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: u2004d - provider: vmware - configuration: vagrant - parent: u2004d - - - template: ../../cd-stages.yml - parameters: - image: u2004d - provider: vmware - configuration: vagrant diff --git a/src/core/azp/ubuntu-server/2004-lts/hyperv-core.yml b/src/core/azp/ubuntu-server/2004-lts/hyperv-core.yml deleted file mode 100644 index 2d9150040..000000000 --- a/src/core/azp/ubuntu-server/2004-lts/hyperv-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: u2004s - provider: hyperv - configuration: core diff --git a/src/core/azp/ubuntu-server/2004-lts/hyperv-vagrant.yml b/src/core/azp/ubuntu-server/2004-lts/hyperv-vagrant.yml deleted file mode 100644 index e473f1740..000000000 --- a/src/core/azp/ubuntu-server/2004-lts/hyperv-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: u2004s-hyperv-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: u2004s - provider: hyperv - configuration: vagrant - parent: u2004s - - - template: ../../cd-stages.yml - parameters: - image: u2004s - provider: hyperv - configuration: vagrant diff --git a/src/core/azp/ubuntu-server/2004-lts/virtualbox-core.yml b/src/core/azp/ubuntu-server/2004-lts/virtualbox-core.yml deleted file mode 100644 index 5e8bf6bc1..000000000 --- a/src/core/azp/ubuntu-server/2004-lts/virtualbox-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: u2004s - provider: virtualbox - configuration: core diff --git a/src/core/azp/ubuntu-server/2004-lts/virtualbox-vagrant.yml b/src/core/azp/ubuntu-server/2004-lts/virtualbox-vagrant.yml deleted file mode 100644 index 463d6f556..000000000 --- a/src/core/azp/ubuntu-server/2004-lts/virtualbox-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: u2004s-virtualbox-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: u2004s - provider: virtualbox - configuration: vagrant - parent: u2004s - - - template: ../../cd-stages.yml - parameters: - image: u2004s - provider: virtualbox - configuration: vagrant diff --git a/src/core/azp/ubuntu-server/2004-lts/vmware-core.yml b/src/core/azp/ubuntu-server/2004-lts/vmware-core.yml deleted file mode 100644 index e76c2a55f..000000000 --- a/src/core/azp/ubuntu-server/2004-lts/vmware-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: u2004s - provider: vmware - configuration: core diff --git a/src/core/azp/ubuntu-server/2004-lts/vmware-vagrant.yml b/src/core/azp/ubuntu-server/2004-lts/vmware-vagrant.yml deleted file mode 100644 index ad098f4f9..000000000 --- a/src/core/azp/ubuntu-server/2004-lts/vmware-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: u2004s-vmware-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: u2004s - provider: vmware - configuration: vagrant - parent: u2004s - - - template: ../../cd-stages.yml - parameters: - image: u2004s - provider: vmware - configuration: vagrant diff --git a/src/core/azp/visual-studio/2019-community-windows-10/hyperv-core.yml b/src/core/azp/visual-studio/2019-community-windows-10/hyperv-core.yml deleted file mode 100644 index 5e6bb07d0..000000000 --- a/src/core/azp/visual-studio/2019-community-windows-10/hyperv-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1022h2e-hyperv-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1022h2e-vs19c - provider: hyperv - configuration: core - parent: w1022h2e diff --git a/src/core/azp/visual-studio/2019-community-windows-10/hyperv-vagrant.yml b/src/core/azp/visual-studio/2019-community-windows-10/hyperv-vagrant.yml deleted file mode 100644 index 94a6cddfa..000000000 --- a/src/core/azp/visual-studio/2019-community-windows-10/hyperv-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1022h2e-vs19c-hyperv-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1022h2e-vs19c - provider: hyperv - configuration: vagrant - parent: w1022h2e-vs19c - - - template: ../../cd-stages.yml - parameters: - image: w1022h2e-vs19c - provider: hyperv - configuration: vagrant diff --git a/src/core/azp/visual-studio/2019-community-windows-10/virtualbox-core.yml b/src/core/azp/visual-studio/2019-community-windows-10/virtualbox-core.yml deleted file mode 100644 index ee4f4b424..000000000 --- a/src/core/azp/visual-studio/2019-community-windows-10/virtualbox-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1022h2e-virtualbox-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1022h2e-vs19c - provider: virtualbox - configuration: core - parent: w1022h2e diff --git a/src/core/azp/visual-studio/2019-community-windows-10/virtualbox-vagrant.yml b/src/core/azp/visual-studio/2019-community-windows-10/virtualbox-vagrant.yml deleted file mode 100644 index 776808932..000000000 --- a/src/core/azp/visual-studio/2019-community-windows-10/virtualbox-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1022h2e-vs19c-virtualbox-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1022h2e-vs19c - provider: virtualbox - configuration: vagrant - parent: w1022h2e-vs19c - - - template: ../../cd-stages.yml - parameters: - image: w1022h2e-vs19c - provider: virtualbox - configuration: vagrant diff --git a/src/core/azp/visual-studio/2019-community-windows-11/hyperv-core.yml b/src/core/azp/visual-studio/2019-community-windows-11/hyperv-core.yml deleted file mode 100644 index 9d15ca695..000000000 --- a/src/core/azp/visual-studio/2019-community-windows-11/hyperv-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1122h2e-hyperv-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1122h2e-vs19c - provider: hyperv - configuration: core - parent: w1122h2e diff --git a/src/core/azp/visual-studio/2019-community-windows-11/hyperv-vagrant.yml b/src/core/azp/visual-studio/2019-community-windows-11/hyperv-vagrant.yml deleted file mode 100644 index ebb0e0167..000000000 --- a/src/core/azp/visual-studio/2019-community-windows-11/hyperv-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1122h2e-vs19c-hyperv-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1122h2e-vs19c - provider: hyperv - configuration: vagrant - parent: w1122h2e-vs19c - - - template: ../../cd-stages.yml - parameters: - image: w1122h2e-vs19c - provider: hyperv - configuration: vagrant diff --git a/src/core/azp/visual-studio/2019-community-windows-11/virtualbox-core.yml b/src/core/azp/visual-studio/2019-community-windows-11/virtualbox-core.yml deleted file mode 100644 index 34555773e..000000000 --- a/src/core/azp/visual-studio/2019-community-windows-11/virtualbox-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1122h2e-virtualbox-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1122h2e-vs19c - provider: virtualbox - configuration: core - parent: w1122h2e diff --git a/src/core/azp/visual-studio/2019-community-windows-11/virtualbox-vagrant.yml b/src/core/azp/visual-studio/2019-community-windows-11/virtualbox-vagrant.yml deleted file mode 100644 index e1ace44fc..000000000 --- a/src/core/azp/visual-studio/2019-community-windows-11/virtualbox-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1122h2e-vs19c-virtualbox-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1122h2e-vs19c - provider: virtualbox - configuration: vagrant - parent: w1122h2e-vs19c - - - template: ../../cd-stages.yml - parameters: - image: w1122h2e-vs19c - provider: virtualbox - configuration: vagrant diff --git a/src/core/azp/visual-studio/2022-community-windows-10/hyperv-core.yml b/src/core/azp/visual-studio/2022-community-windows-10/hyperv-core.yml deleted file mode 100644 index 65cb7c686..000000000 --- a/src/core/azp/visual-studio/2022-community-windows-10/hyperv-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1022h2e-hyperv-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1022h2e-vs22c - provider: hyperv - configuration: core - parent: w1022h2e diff --git a/src/core/azp/visual-studio/2022-community-windows-10/hyperv-vagrant.yml b/src/core/azp/visual-studio/2022-community-windows-10/hyperv-vagrant.yml deleted file mode 100644 index 9b2e7220f..000000000 --- a/src/core/azp/visual-studio/2022-community-windows-10/hyperv-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1022h2e-vs22c-hyperv-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1022h2e-vs22c - provider: hyperv - configuration: vagrant - parent: w1022h2e-vs22c - - - template: ../../cd-stages.yml - parameters: - image: w1022h2e-vs22c - provider: hyperv - configuration: vagrant diff --git a/src/core/azp/visual-studio/2022-community-windows-10/virtualbox-core.yml b/src/core/azp/visual-studio/2022-community-windows-10/virtualbox-core.yml deleted file mode 100644 index 3baaa8d5b..000000000 --- a/src/core/azp/visual-studio/2022-community-windows-10/virtualbox-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1022h2e-virtualbox-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1022h2e-vs22c - provider: virtualbox - configuration: core - parent: w1022h2e diff --git a/src/core/azp/visual-studio/2022-community-windows-10/virtualbox-vagrant.yml b/src/core/azp/visual-studio/2022-community-windows-10/virtualbox-vagrant.yml deleted file mode 100644 index 01eb9285d..000000000 --- a/src/core/azp/visual-studio/2022-community-windows-10/virtualbox-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1022h2e-vs22c-virtualbox-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1022h2e-vs22c - provider: virtualbox - configuration: vagrant - parent: w1022h2e-vs22c - - - template: ../../cd-stages.yml - parameters: - image: w1022h2e-vs22c - provider: virtualbox - configuration: vagrant diff --git a/src/core/azp/visual-studio/2022-community-windows-11/hyperv-core.yml b/src/core/azp/visual-studio/2022-community-windows-11/hyperv-core.yml deleted file mode 100644 index f9eb54a8b..000000000 --- a/src/core/azp/visual-studio/2022-community-windows-11/hyperv-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1122h2e-hyperv-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1122h2e-vs22c - provider: hyperv - configuration: core - parent: w1122h2e diff --git a/src/core/azp/visual-studio/2022-community-windows-11/hyperv-vagrant.yml b/src/core/azp/visual-studio/2022-community-windows-11/hyperv-vagrant.yml deleted file mode 100644 index a745126b5..000000000 --- a/src/core/azp/visual-studio/2022-community-windows-11/hyperv-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1122h2e-vs22c-hyperv-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1122h2e-vs22c - provider: hyperv - configuration: vagrant - parent: w1122h2e-vs22c - - - template: ../../cd-stages.yml - parameters: - image: w1122h2e-vs22c - provider: hyperv - configuration: vagrant diff --git a/src/core/azp/visual-studio/2022-community-windows-11/virtualbox-core.yml b/src/core/azp/visual-studio/2022-community-windows-11/virtualbox-core.yml deleted file mode 100644 index 40a85dd57..000000000 --- a/src/core/azp/visual-studio/2022-community-windows-11/virtualbox-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1122h2e-virtualbox-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1122h2e-vs22c - provider: virtualbox - configuration: core - parent: w1122h2e diff --git a/src/core/azp/visual-studio/2022-community-windows-11/virtualbox-vagrant.yml b/src/core/azp/visual-studio/2022-community-windows-11/virtualbox-vagrant.yml deleted file mode 100644 index 682e84518..000000000 --- a/src/core/azp/visual-studio/2022-community-windows-11/virtualbox-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1122h2e-vs22c-virtualbox-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1122h2e-vs22c - provider: virtualbox - configuration: vagrant - parent: w1122h2e-vs22c - - - template: ../../cd-stages.yml - parameters: - image: w1122h2e-vs22c - provider: virtualbox - configuration: vagrant diff --git a/src/core/azp/visual-studio/2022-community-windows-11/vmware-core.yml b/src/core/azp/visual-studio/2022-community-windows-11/vmware-core.yml deleted file mode 100644 index 8217ae259..000000000 --- a/src/core/azp/visual-studio/2022-community-windows-11/vmware-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1122h2e-vmware-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1122h2e-vs22c - provider: vmware - configuration: core - parent: w1122h2e diff --git a/src/core/azp/visual-studio/2022-community-windows-11/vmware-vagrant.yml b/src/core/azp/visual-studio/2022-community-windows-11/vmware-vagrant.yml deleted file mode 100644 index 5abb883a2..000000000 --- a/src/core/azp/visual-studio/2022-community-windows-11/vmware-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1122h2e-vs22c-vmware-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1122h2e-vs22c - provider: vmware - configuration: vagrant - parent: w1122h2e-vs22c - - - template: ../../cd-stages.yml - parameters: - image: w1122h2e-vs22c - provider: vmware - configuration: vagrant diff --git a/src/core/azp/windows-10/1809-enterprise-ltsc/hyperv-core.yml b/src/core/azp/windows-10/1809-enterprise-ltsc/hyperv-core.yml deleted file mode 100644 index 2549dac2b..000000000 --- a/src/core/azp/windows-10/1809-enterprise-ltsc/hyperv-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: w101809eltsc - provider: hyperv - configuration: core diff --git a/src/core/azp/windows-10/1809-enterprise-ltsc/hyperv-vagrant.yml b/src/core/azp/windows-10/1809-enterprise-ltsc/hyperv-vagrant.yml deleted file mode 100644 index 86d5c3762..000000000 --- a/src/core/azp/windows-10/1809-enterprise-ltsc/hyperv-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w101809eltsc-hyperv-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: w101809eltsc - provider: hyperv - configuration: vagrant - parent: w101809eltsc - - - template: ../../cd-stages.yml - parameters: - image: w101809eltsc - provider: hyperv - configuration: vagrant diff --git a/src/core/azp/windows-10/1809-enterprise-ltsc/virtualbox-core.yml b/src/core/azp/windows-10/1809-enterprise-ltsc/virtualbox-core.yml deleted file mode 100644 index ea6041c96..000000000 --- a/src/core/azp/windows-10/1809-enterprise-ltsc/virtualbox-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: w101809eltsc - provider: virtualbox - configuration: core diff --git a/src/core/azp/windows-10/1809-enterprise-ltsc/virtualbox-vagrant.yml b/src/core/azp/windows-10/1809-enterprise-ltsc/virtualbox-vagrant.yml deleted file mode 100644 index 3dedf205e..000000000 --- a/src/core/azp/windows-10/1809-enterprise-ltsc/virtualbox-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w101809eltsc-virtualbox-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: w101809eltsc - provider: virtualbox - configuration: vagrant - parent: w101809eltsc - - - template: ../../cd-stages.yml - parameters: - image: w101809eltsc - provider: virtualbox - configuration: vagrant diff --git a/src/core/azp/windows-10/21h2-enterprise-ltsc/hyperv-core.yml b/src/core/azp/windows-10/21h2-enterprise-ltsc/hyperv-core.yml deleted file mode 100644 index 84ef83f8c..000000000 --- a/src/core/azp/windows-10/21h2-enterprise-ltsc/hyperv-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1021h2eltsc - provider: hyperv - configuration: core diff --git a/src/core/azp/windows-10/21h2-enterprise-ltsc/hyperv-vagrant.yml b/src/core/azp/windows-10/21h2-enterprise-ltsc/hyperv-vagrant.yml deleted file mode 100644 index 07cb8c509..000000000 --- a/src/core/azp/windows-10/21h2-enterprise-ltsc/hyperv-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1021h2eltsc-hyperv-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1021h2eltsc - provider: hyperv - configuration: vagrant - parent: w1021h2eltsc - - - template: ../../cd-stages.yml - parameters: - image: w1021h2eltsc - provider: hyperv - configuration: vagrant diff --git a/src/core/azp/windows-10/21h2-enterprise-ltsc/virtualbox-core.yml b/src/core/azp/windows-10/21h2-enterprise-ltsc/virtualbox-core.yml deleted file mode 100644 index 81043afca..000000000 --- a/src/core/azp/windows-10/21h2-enterprise-ltsc/virtualbox-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1021h2eltsc - provider: virtualbox - configuration: core diff --git a/src/core/azp/windows-10/21h2-enterprise-ltsc/virtualbox-vagrant.yml b/src/core/azp/windows-10/21h2-enterprise-ltsc/virtualbox-vagrant.yml deleted file mode 100644 index 2f39093dd..000000000 --- a/src/core/azp/windows-10/21h2-enterprise-ltsc/virtualbox-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1021h2eltsc-virtualbox-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1021h2eltsc - provider: virtualbox - configuration: vagrant - parent: w1021h2eltsc - - - template: ../../cd-stages.yml - parameters: - image: w1021h2eltsc - provider: virtualbox - configuration: vagrant diff --git a/src/core/azp/windows-10/21h2-enterprise/hyperv-core.yml b/src/core/azp/windows-10/21h2-enterprise/hyperv-core.yml deleted file mode 100644 index e666f2a84..000000000 --- a/src/core/azp/windows-10/21h2-enterprise/hyperv-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1021h2e - provider: hyperv - configuration: core diff --git a/src/core/azp/windows-10/21h2-enterprise/hyperv-vagrant.yml b/src/core/azp/windows-10/21h2-enterprise/hyperv-vagrant.yml deleted file mode 100644 index c9ea9deb5..000000000 --- a/src/core/azp/windows-10/21h2-enterprise/hyperv-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1021h2e-hyperv-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1021h2e - provider: hyperv - configuration: vagrant - parent: w1021h2e - - - template: ../../cd-stages.yml - parameters: - image: w1021h2e - provider: hyperv - configuration: vagrant diff --git a/src/core/azp/windows-10/21h2-enterprise/virtualbox-core.yml b/src/core/azp/windows-10/21h2-enterprise/virtualbox-core.yml deleted file mode 100644 index 2e69fb248..000000000 --- a/src/core/azp/windows-10/21h2-enterprise/virtualbox-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1021h2e - provider: virtualbox - configuration: core diff --git a/src/core/azp/windows-10/21h2-enterprise/virtualbox-vagrant.yml b/src/core/azp/windows-10/21h2-enterprise/virtualbox-vagrant.yml deleted file mode 100644 index 686c4556b..000000000 --- a/src/core/azp/windows-10/21h2-enterprise/virtualbox-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1021h2e-virtualbox-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1021h2e - provider: virtualbox - configuration: vagrant - parent: w1021h2e - - - template: ../../cd-stages.yml - parameters: - image: w1021h2e - provider: virtualbox - configuration: vagrant diff --git a/src/core/azp/windows-10/22h2-enterprise-nocm/hyperv-core.yml b/src/core/azp/windows-10/22h2-enterprise-nocm/hyperv-core.yml deleted file mode 100644 index e4c0fde83..000000000 --- a/src/core/azp/windows-10/22h2-enterprise-nocm/hyperv-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1022h2e-hyperv-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1022h2e-nocm - provider: hyperv - configuration: core - parent: w1022h2e diff --git a/src/core/azp/windows-10/22h2-enterprise-nocm/hyperv-vagrant.yml b/src/core/azp/windows-10/22h2-enterprise-nocm/hyperv-vagrant.yml deleted file mode 100644 index c333ac529..000000000 --- a/src/core/azp/windows-10/22h2-enterprise-nocm/hyperv-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1022h2e-nocm-hyperv-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1022h2e-nocm - provider: hyperv - configuration: vagrant - parent: w1022h2e-nocm - - - template: ../../cd-stages.yml - parameters: - image: w1022h2e-nocm - provider: hyperv - configuration: vagrant diff --git a/src/core/azp/windows-10/22h2-enterprise-nocm/virtualbox-core.yml b/src/core/azp/windows-10/22h2-enterprise-nocm/virtualbox-core.yml deleted file mode 100644 index 773fd9e2c..000000000 --- a/src/core/azp/windows-10/22h2-enterprise-nocm/virtualbox-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1022h2e-virtualbox-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1022h2e-nocm - provider: virtualbox - configuration: core - parent: w1022h2e diff --git a/src/core/azp/windows-10/22h2-enterprise-nocm/virtualbox-vagrant.yml b/src/core/azp/windows-10/22h2-enterprise-nocm/virtualbox-vagrant.yml deleted file mode 100644 index c66706326..000000000 --- a/src/core/azp/windows-10/22h2-enterprise-nocm/virtualbox-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1022h2e-nocm-virtualbox-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1022h2e-nocm - provider: virtualbox - configuration: vagrant - parent: w1022h2e-nocm - - - template: ../../cd-stages.yml - parameters: - image: w1022h2e-nocm - provider: virtualbox - configuration: vagrant diff --git a/src/core/azp/windows-10/22h2-enterprise/hyperv-core.yml b/src/core/azp/windows-10/22h2-enterprise/hyperv-core.yml deleted file mode 100644 index 87ea957a9..000000000 --- a/src/core/azp/windows-10/22h2-enterprise/hyperv-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1022h2e - provider: hyperv - configuration: core diff --git a/src/core/azp/windows-10/22h2-enterprise/hyperv-vagrant.yml b/src/core/azp/windows-10/22h2-enterprise/hyperv-vagrant.yml deleted file mode 100644 index e55cf36da..000000000 --- a/src/core/azp/windows-10/22h2-enterprise/hyperv-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1022h2e-hyperv-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1022h2e - provider: hyperv - configuration: vagrant - parent: w1022h2e - - - template: ../../cd-stages.yml - parameters: - image: w1022h2e - provider: hyperv - configuration: vagrant diff --git a/src/core/azp/windows-10/22h2-enterprise/virtualbox-core.yml b/src/core/azp/windows-10/22h2-enterprise/virtualbox-core.yml deleted file mode 100644 index 1d743e835..000000000 --- a/src/core/azp/windows-10/22h2-enterprise/virtualbox-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1022h2e - provider: virtualbox - configuration: core diff --git a/src/core/azp/windows-10/22h2-enterprise/virtualbox-vagrant.yml b/src/core/azp/windows-10/22h2-enterprise/virtualbox-vagrant.yml deleted file mode 100644 index 719766c9b..000000000 --- a/src/core/azp/windows-10/22h2-enterprise/virtualbox-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1022h2e-virtualbox-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1022h2e - provider: virtualbox - configuration: vagrant - parent: w1022h2e - - - template: ../../cd-stages.yml - parameters: - image: w1022h2e - provider: virtualbox - configuration: vagrant diff --git a/src/core/azp/windows-10/22h2-enterprise/vmware-core.yml b/src/core/azp/windows-10/22h2-enterprise/vmware-core.yml deleted file mode 100644 index 70c115e52..000000000 --- a/src/core/azp/windows-10/22h2-enterprise/vmware-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1022h2e - provider: vmware - configuration: core diff --git a/src/core/azp/windows-10/22h2-enterprise/vmware-vagrant.yml b/src/core/azp/windows-10/22h2-enterprise/vmware-vagrant.yml deleted file mode 100644 index c716c8323..000000000 --- a/src/core/azp/windows-10/22h2-enterprise/vmware-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1022h2e-vmware-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1022h2e - provider: vmware - configuration: vagrant - parent: w1022h2e - - - template: ../../cd-stages.yml - parameters: - image: w1022h2e - provider: vmware - configuration: vagrant diff --git a/src/core/azp/windows-11/21h2-enterprise/hyperv-core.yml b/src/core/azp/windows-11/21h2-enterprise/hyperv-core.yml deleted file mode 100644 index 24cec4928..000000000 --- a/src/core/azp/windows-11/21h2-enterprise/hyperv-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1121h2e - provider: hyperv - configuration: core diff --git a/src/core/azp/windows-11/21h2-enterprise/hyperv-vagrant.yml b/src/core/azp/windows-11/21h2-enterprise/hyperv-vagrant.yml deleted file mode 100644 index 65c49c927..000000000 --- a/src/core/azp/windows-11/21h2-enterprise/hyperv-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1121h2e-hyperv-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1121h2e - provider: hyperv - configuration: vagrant - parent: w1121h2e - - - template: ../../cd-stages.yml - parameters: - image: w1121h2e - provider: hyperv - configuration: vagrant diff --git a/src/core/azp/windows-11/21h2-enterprise/virtualbox-core.yml b/src/core/azp/windows-11/21h2-enterprise/virtualbox-core.yml deleted file mode 100644 index ab2b6d949..000000000 --- a/src/core/azp/windows-11/21h2-enterprise/virtualbox-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1121h2e - provider: virtualbox - configuration: core diff --git a/src/core/azp/windows-11/21h2-enterprise/virtualbox-vagrant.yml b/src/core/azp/windows-11/21h2-enterprise/virtualbox-vagrant.yml deleted file mode 100644 index 78f9262cf..000000000 --- a/src/core/azp/windows-11/21h2-enterprise/virtualbox-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1121h2e-virtualbox-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1121h2e - provider: virtualbox - configuration: vagrant - parent: w1121h2e - - - template: ../../cd-stages.yml - parameters: - image: w1121h2e - provider: virtualbox - configuration: vagrant diff --git a/src/core/azp/windows-11/22h2-enterprise/hyperv-core.yml b/src/core/azp/windows-11/22h2-enterprise/hyperv-core.yml deleted file mode 100644 index 5f5978d74..000000000 --- a/src/core/azp/windows-11/22h2-enterprise/hyperv-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1122h2e - provider: hyperv - configuration: core diff --git a/src/core/azp/windows-11/22h2-enterprise/hyperv-vagrant.yml b/src/core/azp/windows-11/22h2-enterprise/hyperv-vagrant.yml deleted file mode 100644 index 5fe0c8a21..000000000 --- a/src/core/azp/windows-11/22h2-enterprise/hyperv-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1122h2e-hyperv-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1122h2e - provider: hyperv - configuration: vagrant - parent: w1122h2e - - - template: ../../cd-stages.yml - parameters: - image: w1122h2e - provider: hyperv - configuration: vagrant diff --git a/src/core/azp/windows-11/22h2-enterprise/virtualbox-core.yml b/src/core/azp/windows-11/22h2-enterprise/virtualbox-core.yml deleted file mode 100644 index 8dfad9f88..000000000 --- a/src/core/azp/windows-11/22h2-enterprise/virtualbox-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1122h2e - provider: virtualbox - configuration: core diff --git a/src/core/azp/windows-11/22h2-enterprise/virtualbox-vagrant.yml b/src/core/azp/windows-11/22h2-enterprise/virtualbox-vagrant.yml deleted file mode 100644 index 20b48a6b5..000000000 --- a/src/core/azp/windows-11/22h2-enterprise/virtualbox-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1122h2e-virtualbox-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1122h2e - provider: virtualbox - configuration: vagrant - parent: w1122h2e - - - template: ../../cd-stages.yml - parameters: - image: w1122h2e - provider: virtualbox - configuration: vagrant diff --git a/src/core/azp/windows-11/22h2-enterprise/vmware-core.yml b/src/core/azp/windows-11/22h2-enterprise/vmware-core.yml deleted file mode 100644 index 93e20ad4e..000000000 --- a/src/core/azp/windows-11/22h2-enterprise/vmware-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1122h2e - provider: vmware - configuration: core diff --git a/src/core/azp/windows-11/22h2-enterprise/vmware-vagrant.yml b/src/core/azp/windows-11/22h2-enterprise/vmware-vagrant.yml deleted file mode 100644 index f1f24f085..000000000 --- a/src/core/azp/windows-11/22h2-enterprise/vmware-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w1122h2e-vmware-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: w1122h2e - provider: vmware - configuration: vagrant - parent: w1122h2e - - - template: ../../cd-stages.yml - parameters: - image: w1122h2e - provider: vmware - configuration: vagrant diff --git a/src/core/azp/windows-11/insider-preview-enterprise/hyperv-core.yml b/src/core/azp/windows-11/insider-preview-enterprise/hyperv-core.yml deleted file mode 100644 index eb977f6e0..000000000 --- a/src/core/azp/windows-11/insider-preview-enterprise/hyperv-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: w11ipe - provider: hyperv - configuration: core diff --git a/src/core/azp/windows-11/insider-preview-enterprise/hyperv-vagrant.yml b/src/core/azp/windows-11/insider-preview-enterprise/hyperv-vagrant.yml deleted file mode 100644 index 67a32c73d..000000000 --- a/src/core/azp/windows-11/insider-preview-enterprise/hyperv-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w11ipe-hyperv-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: w11ipe - provider: hyperv - configuration: vagrant - parent: w11ipe - - - template: ../../cd-stages.yml - parameters: - image: w11ipe - provider: hyperv - configuration: vagrant diff --git a/src/core/azp/windows-11/insider-preview-enterprise/virtualbox-core.yml b/src/core/azp/windows-11/insider-preview-enterprise/virtualbox-core.yml deleted file mode 100644 index be5119bc1..000000000 --- a/src/core/azp/windows-11/insider-preview-enterprise/virtualbox-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: w11ipe - provider: virtualbox - configuration: core diff --git a/src/core/azp/windows-11/insider-preview-enterprise/virtualbox-vagrant.yml b/src/core/azp/windows-11/insider-preview-enterprise/virtualbox-vagrant.yml deleted file mode 100644 index 24e9d5b7e..000000000 --- a/src/core/azp/windows-11/insider-preview-enterprise/virtualbox-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: w11ipe-virtualbox-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: w11ipe - provider: virtualbox - configuration: vagrant - parent: w11ipe - - - template: ../../cd-stages.yml - parameters: - image: w11ipe - provider: virtualbox - configuration: vagrant diff --git a/src/core/azp/windows-server-core/2019-standard/hyperv-core.yml b/src/core/azp/windows-server-core/2019-standard/hyperv-core.yml deleted file mode 100644 index 6c576280f..000000000 --- a/src/core/azp/windows-server-core/2019-standard/hyperv-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2019sc - provider: hyperv - configuration: core diff --git a/src/core/azp/windows-server-core/2019-standard/hyperv-vagrant.yml b/src/core/azp/windows-server-core/2019-standard/hyperv-vagrant.yml deleted file mode 100644 index e5fbdc8d4..000000000 --- a/src/core/azp/windows-server-core/2019-standard/hyperv-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2019sc-hyperv-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2019sc - provider: hyperv - configuration: vagrant - parent: ws2019sc - - - template: ../../cd-stages.yml - parameters: - image: ws2019sc - provider: hyperv - configuration: vagrant diff --git a/src/core/azp/windows-server-core/2019-standard/virtualbox-core.yml b/src/core/azp/windows-server-core/2019-standard/virtualbox-core.yml deleted file mode 100644 index aa6c8c552..000000000 --- a/src/core/azp/windows-server-core/2019-standard/virtualbox-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2019sc - provider: virtualbox - configuration: core diff --git a/src/core/azp/windows-server-core/2019-standard/virtualbox-vagrant.yml b/src/core/azp/windows-server-core/2019-standard/virtualbox-vagrant.yml deleted file mode 100644 index 0cdfda90d..000000000 --- a/src/core/azp/windows-server-core/2019-standard/virtualbox-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2019sc-virtualbox-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2019sc - provider: virtualbox - configuration: vagrant - parent: ws2019sc - - - template: ../../cd-stages.yml - parameters: - image: ws2019sc - provider: virtualbox - configuration: vagrant diff --git a/src/core/azp/windows-server-core/2022-standard/hyperv-core.yml b/src/core/azp/windows-server-core/2022-standard/hyperv-core.yml deleted file mode 100644 index a61894d8d..000000000 --- a/src/core/azp/windows-server-core/2022-standard/hyperv-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022sc - provider: hyperv - configuration: core diff --git a/src/core/azp/windows-server-core/2022-standard/hyperv-vagrant.yml b/src/core/azp/windows-server-core/2022-standard/hyperv-vagrant.yml deleted file mode 100644 index 3482971ec..000000000 --- a/src/core/azp/windows-server-core/2022-standard/hyperv-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022sc-hyperv-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022sc - provider: hyperv - configuration: vagrant - parent: ws2022sc - - - template: ../../cd-stages.yml - parameters: - image: ws2022sc - provider: hyperv - configuration: vagrant diff --git a/src/core/azp/windows-server-core/2022-standard/virtualbox-core.yml b/src/core/azp/windows-server-core/2022-standard/virtualbox-core.yml deleted file mode 100644 index f07e12e14..000000000 --- a/src/core/azp/windows-server-core/2022-standard/virtualbox-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022sc - provider: virtualbox - configuration: core diff --git a/src/core/azp/windows-server-core/2022-standard/virtualbox-vagrant.yml b/src/core/azp/windows-server-core/2022-standard/virtualbox-vagrant.yml deleted file mode 100644 index c1177a122..000000000 --- a/src/core/azp/windows-server-core/2022-standard/virtualbox-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022sc-virtualbox-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022sc - provider: virtualbox - configuration: vagrant - parent: ws2022sc - - - template: ../../cd-stages.yml - parameters: - image: ws2022sc - provider: virtualbox - configuration: vagrant diff --git a/src/core/azp/windows-server-core/2022-standard/vmware-core.yml b/src/core/azp/windows-server-core/2022-standard/vmware-core.yml deleted file mode 100644 index 18e732471..000000000 --- a/src/core/azp/windows-server-core/2022-standard/vmware-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022sc - provider: vmware - configuration: core diff --git a/src/core/azp/windows-server-core/2022-standard/vmware-vagrant.yml b/src/core/azp/windows-server-core/2022-standard/vmware-vagrant.yml deleted file mode 100644 index b10f68fcb..000000000 --- a/src/core/azp/windows-server-core/2022-standard/vmware-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022sc-vmware-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022sc - provider: vmware - configuration: vagrant - parent: ws2022sc - - - template: ../../cd-stages.yml - parameters: - image: ws2022sc - provider: vmware - configuration: vagrant diff --git a/src/core/azp/windows-server-core/insider-preview-standard/hyperv-core.yml b/src/core/azp/windows-server-core/insider-preview-standard/hyperv-core.yml deleted file mode 100644 index db617a70d..000000000 --- a/src/core/azp/windows-server-core/insider-preview-standard/hyperv-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: wsipsc - provider: hyperv - configuration: core diff --git a/src/core/azp/windows-server-core/insider-preview-standard/hyperv-vagrant.yml b/src/core/azp/windows-server-core/insider-preview-standard/hyperv-vagrant.yml deleted file mode 100644 index fa01c743b..000000000 --- a/src/core/azp/windows-server-core/insider-preview-standard/hyperv-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: wsipsc-hyperv-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: wsipsc - provider: hyperv - configuration: vagrant - parent: wsipsc - - - template: ../../cd-stages.yml - parameters: - image: wsipsc - provider: hyperv - configuration: vagrant diff --git a/src/core/azp/windows-server-core/insider-preview-standard/virtualbox-core.yml b/src/core/azp/windows-server-core/insider-preview-standard/virtualbox-core.yml deleted file mode 100644 index 44d3fb42d..000000000 --- a/src/core/azp/windows-server-core/insider-preview-standard/virtualbox-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: wsipsc - provider: virtualbox - configuration: core diff --git a/src/core/azp/windows-server-core/insider-preview-standard/virtualbox-vagrant.yml b/src/core/azp/windows-server-core/insider-preview-standard/virtualbox-vagrant.yml deleted file mode 100644 index 80ac916e7..000000000 --- a/src/core/azp/windows-server-core/insider-preview-standard/virtualbox-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: wsipsc-virtualbox-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: wsipsc - provider: virtualbox - configuration: vagrant - parent: wsipsc - - - template: ../../cd-stages.yml - parameters: - image: wsipsc - provider: virtualbox - configuration: vagrant diff --git a/src/core/azp/windows-server/2019-standard/hyperv-core.yml b/src/core/azp/windows-server/2019-standard/hyperv-core.yml deleted file mode 100644 index 877aa8d75..000000000 --- a/src/core/azp/windows-server/2019-standard/hyperv-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2019s - provider: hyperv - configuration: core diff --git a/src/core/azp/windows-server/2019-standard/hyperv-vagrant.yml b/src/core/azp/windows-server/2019-standard/hyperv-vagrant.yml deleted file mode 100644 index 01a2a2703..000000000 --- a/src/core/azp/windows-server/2019-standard/hyperv-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2019s-hyperv-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2019s - provider: hyperv - configuration: vagrant - parent: ws2019s - - - template: ../../cd-stages.yml - parameters: - image: ws2019s - provider: hyperv - configuration: vagrant diff --git a/src/core/azp/windows-server/2019-standard/virtualbox-core.yml b/src/core/azp/windows-server/2019-standard/virtualbox-core.yml deleted file mode 100644 index 09d708cbe..000000000 --- a/src/core/azp/windows-server/2019-standard/virtualbox-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2019s - provider: virtualbox - configuration: core diff --git a/src/core/azp/windows-server/2019-standard/virtualbox-vagrant.yml b/src/core/azp/windows-server/2019-standard/virtualbox-vagrant.yml deleted file mode 100644 index 202aaf124..000000000 --- a/src/core/azp/windows-server/2019-standard/virtualbox-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2019s-virtualbox-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2019s - provider: virtualbox - configuration: vagrant - parent: ws2019s - - - template: ../../cd-stages.yml - parameters: - image: ws2019s - provider: virtualbox - configuration: vagrant diff --git a/src/core/azp/windows-server/2022-standard-nocm/hyperv-core.yml b/src/core/azp/windows-server/2022-standard-nocm/hyperv-core.yml deleted file mode 100644 index 16706bf35..000000000 --- a/src/core/azp/windows-server/2022-standard-nocm/hyperv-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022s-hyperv-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022s-nocm - provider: hyperv - configuration: core - parent: ws2022s diff --git a/src/core/azp/windows-server/2022-standard-nocm/hyperv-vagrant.yml b/src/core/azp/windows-server/2022-standard-nocm/hyperv-vagrant.yml deleted file mode 100644 index 4815f0e41..000000000 --- a/src/core/azp/windows-server/2022-standard-nocm/hyperv-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022s-nocm-hyperv-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022s-nocm - provider: hyperv - configuration: vagrant - parent: ws2022s-nocm - - - template: ../../cd-stages.yml - parameters: - image: ws2022s-nocm - provider: hyperv - configuration: vagrant diff --git a/src/core/azp/windows-server/2022-standard-nocm/virtualbox-core.yml b/src/core/azp/windows-server/2022-standard-nocm/virtualbox-core.yml deleted file mode 100644 index 898f1eab5..000000000 --- a/src/core/azp/windows-server/2022-standard-nocm/virtualbox-core.yml +++ /dev/null @@ -1,15 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022s-virtualbox-core - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022s-nocm - provider: virtualbox - configuration: core - parent: ws2022s diff --git a/src/core/azp/windows-server/2022-standard-nocm/virtualbox-vagrant.yml b/src/core/azp/windows-server/2022-standard-nocm/virtualbox-vagrant.yml deleted file mode 100644 index 935ad7138..000000000 --- a/src/core/azp/windows-server/2022-standard-nocm/virtualbox-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022s-nocm-virtualbox-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022s-nocm - provider: virtualbox - configuration: vagrant - parent: ws2022s-nocm - - - template: ../../cd-stages.yml - parameters: - image: ws2022s-nocm - provider: virtualbox - configuration: vagrant diff --git a/src/core/azp/windows-server/2022-standard/hyperv-core.yml b/src/core/azp/windows-server/2022-standard/hyperv-core.yml deleted file mode 100644 index fade94075..000000000 --- a/src/core/azp/windows-server/2022-standard/hyperv-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022s - provider: hyperv - configuration: core diff --git a/src/core/azp/windows-server/2022-standard/hyperv-vagrant.yml b/src/core/azp/windows-server/2022-standard/hyperv-vagrant.yml deleted file mode 100644 index e22c11829..000000000 --- a/src/core/azp/windows-server/2022-standard/hyperv-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022s-hyperv-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022s - provider: hyperv - configuration: vagrant - parent: ws2022s - - - template: ../../cd-stages.yml - parameters: - image: ws2022s - provider: hyperv - configuration: vagrant diff --git a/src/core/azp/windows-server/2022-standard/virtualbox-core.yml b/src/core/azp/windows-server/2022-standard/virtualbox-core.yml deleted file mode 100644 index 81954d662..000000000 --- a/src/core/azp/windows-server/2022-standard/virtualbox-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022s - provider: virtualbox - configuration: core diff --git a/src/core/azp/windows-server/2022-standard/virtualbox-vagrant.yml b/src/core/azp/windows-server/2022-standard/virtualbox-vagrant.yml deleted file mode 100644 index 93b9ed85b..000000000 --- a/src/core/azp/windows-server/2022-standard/virtualbox-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022s-virtualbox-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022s - provider: virtualbox - configuration: vagrant - parent: ws2022s - - - template: ../../cd-stages.yml - parameters: - image: ws2022s - provider: virtualbox - configuration: vagrant diff --git a/src/core/azp/windows-server/2022-standard/vmware-core.yml b/src/core/azp/windows-server/2022-standard/vmware-core.yml deleted file mode 100644 index c1e3d74b8..000000000 --- a/src/core/azp/windows-server/2022-standard/vmware-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022s - provider: vmware - configuration: core diff --git a/src/core/azp/windows-server/2022-standard/vmware-vagrant.yml b/src/core/azp/windows-server/2022-standard/vmware-vagrant.yml deleted file mode 100644 index 0b0155c41..000000000 --- a/src/core/azp/windows-server/2022-standard/vmware-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: ws2022s-vmware-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: ws2022s - provider: vmware - configuration: vagrant - parent: ws2022s - - - template: ../../cd-stages.yml - parameters: - image: ws2022s - provider: vmware - configuration: vagrant diff --git a/src/core/azp/windows-server/insider-preview-standard/hyperv-core.yml b/src/core/azp/windows-server/insider-preview-standard/hyperv-core.yml deleted file mode 100644 index dbf820cbc..000000000 --- a/src/core/azp/windows-server/insider-preview-standard/hyperv-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: wsips - provider: hyperv - configuration: core diff --git a/src/core/azp/windows-server/insider-preview-standard/hyperv-vagrant.yml b/src/core/azp/windows-server/insider-preview-standard/hyperv-vagrant.yml deleted file mode 100644 index c09aefa0c..000000000 --- a/src/core/azp/windows-server/insider-preview-standard/hyperv-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: wsips-hyperv-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: wsips - provider: hyperv - configuration: vagrant - parent: wsips - - - template: ../../cd-stages.yml - parameters: - image: wsips - provider: hyperv - configuration: vagrant diff --git a/src/core/azp/windows-server/insider-preview-standard/virtualbox-core.yml b/src/core/azp/windows-server/insider-preview-standard/virtualbox-core.yml deleted file mode 100644 index f5a8da9e3..000000000 --- a/src/core/azp/windows-server/insider-preview-standard/virtualbox-core.yml +++ /dev/null @@ -1,9 +0,0 @@ -trigger: none -pr: none - -stages: - - template: ../../ci-stages.yml - parameters: - image: wsips - provider: virtualbox - configuration: core diff --git a/src/core/azp/windows-server/insider-preview-standard/virtualbox-vagrant.yml b/src/core/azp/windows-server/insider-preview-standard/virtualbox-vagrant.yml deleted file mode 100644 index 8685f14b1..000000000 --- a/src/core/azp/windows-server/insider-preview-standard/virtualbox-vagrant.yml +++ /dev/null @@ -1,22 +0,0 @@ -trigger: none -pr: none - -resources: - pipelines: - - pipeline: parent - source: wsips-virtualbox-core - trigger: true - -stages: - - template: ../../ci-stages.yml - parameters: - image: wsips - provider: virtualbox - configuration: vagrant - parent: wsips - - - template: ../../cd-stages.yml - parameters: - image: wsips - provider: virtualbox - configuration: vagrant diff --git a/src/core/cake/builder.cake b/src/core/cake/builder.cake deleted file mode 100644 index 2fe23db52..000000000 --- a/src/core/cake/builder.cake +++ /dev/null @@ -1,15 +0,0 @@ -class PackerBuilder { - public string Name { get; set; } - - public bool IsMatching(string name) { - return Name.Contains(name); - } -} - -PackerBuilder PackerBuilder_Create( - string name -) { - return new PackerBuilder { - Name = name - }; -} diff --git a/src/core/cake/component.cake b/src/core/cake/component.cake deleted file mode 100644 index e2193a0ff..000000000 --- a/src/core/cake/component.cake +++ /dev/null @@ -1,11 +0,0 @@ -class Component { - public string Name { get; set; } - - public bool IsMatching(string name) { - return string.IsNullOrEmpty(name) || Name.Contains(name); - } -} - -Component Component_Create(string name) { - return new Component { Name = name }; -} diff --git a/src/core/cake/core.cake b/src/core/cake/core.cake deleted file mode 100644 index cf285883e..000000000 --- a/src/core/cake/core.cake +++ /dev/null @@ -1,187 +0,0 @@ -#load "./template.cake" - -#addin "nuget:?package=Cake.FileHelpers&version=6.1.3" -#addin "nuget:?package=Cake.Json&version=7.0.1" -#addin "nuget:?package=Newtonsoft.Json&version=13.0.1" - -var packerTemplates = new List(); - -IEnumerable PackerTemplates_CreateWindows(string name, string groupName = null, string groupVersion = null, IEnumerable parents = null, IEnumerable aliases = null) { - var items = new List(); - - var virtualBoxCore = PackerTemplate_Create( - name, - "virtualbox-core", - new [] { PackerBuilder_Create(parents == null ? "virtualbox-iso" : "virtualbox-ovf") }, - new [] { PackerProvisioner_Create("chef") }, - new [] { PackerPostProcessor_Create("manifest") }, - parents != null ? parents.First(item => item.IsMatching("virtualbox-core")) : null - ); - var virtualBoxVagrant = PackerTemplate_Create( - name, - "virtualbox-vagrant", - new [] { PackerBuilder_Create("virtualbox-ovf") }, - new [] { PackerProvisioner_Create("vagrant") }, - new [] { PackerPostProcessor_Create("vagrant-virtualbox") }, - virtualBoxCore, - groupName, - groupVersion, - aliases - ); - items.Add(virtualBoxCore); - items.Add(virtualBoxVagrant); - - var vmwareCore = PackerTemplate_Create( - name, - "vmware-core", - new [] { PackerBuilder_Create(parents == null ? "vmware-iso" : "vmware-vmx") }, - new [] { PackerProvisioner_Create("chef") }, - new [] { PackerPostProcessor_Create("manifest") }, - parents != null ? parents.First(item => item.IsMatching("vmware-core")) : null - ); - var vmwareVagrant = PackerTemplate_Create( - name, - "vmware-vagrant", - new [] { PackerBuilder_Create("vmware-vmx") }, - new [] { PackerProvisioner_Create("vagrant") }, - new [] { PackerPostProcessor_Create("vagrant-vmware") }, - vmwareCore, - groupName, - groupVersion, - aliases - ); - items.Add(vmwareCore); - items.Add(vmwareVagrant); - - var hyperVCore = PackerTemplate_Create( - name, - "hyperv-core", - new [] { PackerBuilder_Create(parents == null ? "hyperv-iso" : "hyperv-vmcx") }, - new [] { PackerProvisioner_Create("chef") }, - new [] { PackerPostProcessor_Create("manifest") }, - parents != null ? parents.First(item => item.IsMatching("hyperv-core")) : null - ); - var hyperVVagrant = PackerTemplate_Create( - name, - "hyperv-vagrant", - new [] { PackerBuilder_Create("hyperv-vmcx") }, - new [] { PackerProvisioner_Create("vagrant") }, - new [] { PackerPostProcessor_Create("vagrant-hyperv") }, - hyperVCore, - groupName, - groupVersion, - aliases - ); - items.Add(hyperVCore); - items.Add(hyperVVagrant); - - packerTemplates.AddRange(items); - - return items; -} - -IEnumerable PackerTemplates_CreateLinux(string name, string groupName = null, string groupVersion = null, IEnumerable parents = null, IEnumerable aliases = null, bool amazon = false, bool azure = false) { - var items = new List(); - - var virtualBoxCore = PackerTemplate_Create( - name, - "virtualbox-core", - new [] { PackerBuilder_Create(parents == null ? "virtualbox-iso" : "virtualbox-ovf") }, - new [] { PackerProvisioner_Create("shell-prepare"), PackerProvisioner_Create("shell-configure"), PackerProvisioner_Create("shell-install"), PackerProvisioner_Create("shell-cleanup") }, - new [] { PackerPostProcessor_Create("manifest") }, - parents != null ? parents.First(item => item.IsMatching("virtualbox-core")) : null - ); - var virtualBoxVagrant = PackerTemplate_Create( - name, - "virtualbox-vagrant", - new [] { PackerBuilder_Create("virtualbox-ovf") }, - new [] { PackerProvisioner_Create("shell-vagrant") }, - new [] { PackerPostProcessor_Create("vagrant-virtualbox") }, - virtualBoxCore, - groupName, - groupVersion, - aliases - ); - items.Add(virtualBoxCore); - items.Add(virtualBoxVagrant); - - var vmwareCore = PackerTemplate_Create( - name, - "vmware-core", - new [] { PackerBuilder_Create(parents == null ? "vmware-iso" : "vmware-vmx") }, - new [] { PackerProvisioner_Create("shell-prepare"), PackerProvisioner_Create("shell-configure"), PackerProvisioner_Create("shell-install"), PackerProvisioner_Create("shell-cleanup") }, - new [] { PackerPostProcessor_Create("manifest") }, - parents != null ? parents.First(item => item.IsMatching("vmware-core")) : null - ); - var vmwareVagrant = PackerTemplate_Create( - name, - "vmware-vagrant", - new [] { PackerBuilder_Create("vmware-vmx") }, - new [] { PackerProvisioner_Create("shell-vagrant") }, - new [] { PackerPostProcessor_Create("vagrant-vmware") }, - vmwareCore, - groupName, - groupVersion, - aliases - ); - items.Add(vmwareCore); - items.Add(vmwareVagrant); - - var hyperVCore = PackerTemplate_Create( - name, - "hyperv-core", - new [] { PackerBuilder_Create(parents == null ? "hyperv-iso" : "hyperv-vmcx") }, - new [] { PackerProvisioner_Create("shell-prepare"), PackerProvisioner_Create("shell-configure"), PackerProvisioner_Create("shell-install"), PackerProvisioner_Create("shell-cleanup") }, - new [] { PackerPostProcessor_Create("manifest") }, - parents != null ? parents.First(item => item.IsMatching("hyperv-core")) : null - ); - var hyperVVagrant = PackerTemplate_Create( - name, - "hyperv-vagrant", - new [] { PackerBuilder_Create("hyperv-vmcx") }, - new [] { PackerProvisioner_Create("shell-vagrant") }, - new [] { PackerPostProcessor_Create("vagrant-hyperv") }, - hyperVCore, - groupName, - groupVersion, - aliases - ); - items.Add(hyperVCore); - items.Add(hyperVVagrant); - - if (amazon) { - var amazonCore = PackerTemplate_Create( - name, - "amazon", - new [] { PackerBuilder_Create("amazon") }, - new [] { PackerProvisioner_Create("shell-prepare"), PackerProvisioner_Create("shell-configure"), PackerProvisioner_Create("shell-install"), PackerProvisioner_Create("shell-cleanup") }, - new [] { PackerPostProcessor_Create("manifest") }, - // new [] { PackerPostProcessor_Create("vagrant-amazon") }, - parents != null ? parents.First(item => item.IsMatching("amazon")) : null - ); - items.Add(amazonCore); - } - - if (azure) { - var azureCore = PackerTemplate_Create( - name, - "azure", - new [] { PackerBuilder_Create(parents == null ? "azure-marketplace" : "azure-custom") }, - new [] { PackerProvisioner_Create("shell-prepare"), PackerProvisioner_Create("shell-configure"), PackerProvisioner_Create("shell-install"), PackerProvisioner_Create("shell-cleanup") }, - new [] { PackerPostProcessor_Create("manifest") }, - parents != null ? parents.First(item => item.IsMatching("azure")) : null - ); - - items.Add(azureCore); - } - - packerTemplates.AddRange(items); - - return items; -} - -void PackerTemplates_ForEach(string template, Action action) { - foreach (var t in packerTemplates.Where(item => item.IsMatching(template))) { - action(t); - } -} diff --git a/src/core/cake/postprocessor.cake b/src/core/cake/postprocessor.cake deleted file mode 100644 index 352e11584..000000000 --- a/src/core/cake/postprocessor.cake +++ /dev/null @@ -1,15 +0,0 @@ -class PackerPostProcessor { - public string Name { get; set; } - - public bool IsMatching(string name) { - return Name.Contains(name); - } -} - -PackerPostProcessor PackerPostProcessor_Create( - string name -) { - return new PackerPostProcessor { - Name = name - }; -} diff --git a/src/core/cake/provisioner.cake b/src/core/cake/provisioner.cake deleted file mode 100644 index 490ffb8c5..000000000 --- a/src/core/cake/provisioner.cake +++ /dev/null @@ -1,15 +0,0 @@ -class PackerProvisioner { - public string Name { get; set; } - - public bool IsMatching(string name) { - return Name.Contains(name); - } -} - -PackerProvisioner PackerProvisioner_Create( - string name -) { - return new PackerProvisioner { - Name = name - }; -} diff --git a/src/core/cake/template.cake b/src/core/cake/template.cake deleted file mode 100644 index 8f010f4ab..000000000 --- a/src/core/cake/template.cake +++ /dev/null @@ -1,464 +0,0 @@ -#load "./component.cake" -#load "./builder.cake" -#load "./provisioner.cake" -#load "./postprocessor.cake" - -class PackerTemplate { - public static string BuildDirectory { get; set; } - - public string Name { get; set; } - public string Type { get; set; } - public string FullName { get { return Name + "-" + Type; } } - public IEnumerable Components { get; set; } - public IEnumerable Builders { get; set; } - public IEnumerable Provisioners { get; set; } - public IEnumerable PostProcessors { get; set; } - public PackerTemplate Parent { get; set; } - public string GroupName { get; set; } - public string GroupVersion { get; set; } - public IEnumerable Aliases { get; set; } - - public bool IsMatching(string name) { - return string.IsNullOrEmpty(name) || FullName.Contains(name); - } - - public string GetLogMessage(string message) { - return FullName + ": " + message; - } - - public string GetBuildDirectory() { - return BuildDirectory + "/" + Name + "/" + Type; - } -} - -PackerTemplate PackerTemplate_Create( - string name, - string type, - IEnumerable builders, - IEnumerable provisioners, - IEnumerable postprocessors, - PackerTemplate parent, - string groupName = null, - string groupVersion = null, - IEnumerable aliases = null -) { - var components = name.Split('-').Select(component => Component_Create(component)).ToList(); - - return new PackerTemplate { - Name = name, - Type = type, - Components = components, - Builders = builders, - Provisioners = provisioners, - PostProcessors = postprocessors, - Parent = parent, - GroupName = groupName, - GroupVersion = groupVersion, - Aliases = aliases - }; -} - -void PackerTemplate_Info(PackerTemplate template) { - PackerTemplate_Log(template, "Info"); -} - -void PackerTemplate_Version(PackerTemplate template) { - PackerTemplate_Log(template, "Version"); -} - -void PackerTemplate_Restore(PackerTemplate template) { - PackerTemplate_Log(template, "Restore"); - - if (FileExists(template.GetBuildDirectory() + "/template.json")) { - return; - } - - CleanDirectory(template.GetBuildDirectory()); - - if (recursive && template.Parent != null) { - PackerTemplate_Restore(template.Parent); - PackerTemplate_Build(template.Parent); - } - - PackerTemplate_MergeDirectories(template); - PackerTemplate_MergeJson(template); - - PackerTemplate_Packer(template, "validate template.json"); -} - -void PackerTemplate_Build(PackerTemplate template) { - PackerTemplate_Log(template, "Build"); - - if (FileExists(template.GetBuildDirectory() + "/output/build/manifest.json")) { - return; - } - - if (FileExists(template.GetBuildDirectory() + "/output/package/vagrant.box")) { - return; - } - - PackerTemplate_Packer(template, "build template.json"); -} - -void PackerTemplate_Test(PackerTemplate template) { - PackerTemplate_Log(template, "Test"); - - if (!template.Type.Contains("vagrant")) { - return; - } - - var provider = template.Type.Split('-')[0]; - if (provider == "vmware") { - provider = "vmware_desktop"; - } - var vmName = $"{template.Name}-test"; - var boxName = $"gusztavvargadr/{template.Name}-test"; - var boxUrl = $"file://{template.GetBuildDirectory()}/output/package/vagrant.box"; - - PackerTemplate_Vagrant(template, $"up {vmName} --provider {provider}", vmName, boxName, boxUrl); -} - -void PackerTemplate_Publish(PackerTemplate template) { - PackerTemplate_Log(template, "Publish"); - - if (!template.Type.Contains("vagrant")) { - return; - } - - var provider = template.Type.Split('-')[0]; - if (provider == "vmware") { - provider = "vmware_desktop"; - } - - var boxChecksum = string.Empty; - var checksumFile = $"{template.GetBuildDirectory()}/output/package/checksum.sha256"; - foreach (var checksumLine in FileReadLines(checksumFile)) { - var checksumParts = checksumLine.Split('\t'); - if (checksumParts[1] == "vagrant.box") { - boxChecksum = checksumParts[0]; - break; - } - } - - PackerTemplate_Vagrant(template, "cloud publish --force" - + $" --checksum-type sha256" - + $" --checksum {boxChecksum}" - + $" --release" - + $" gusztavvargadr/{template.GroupName}" - + $" {template.GroupVersion}" - + $" {provider}" - + $" {template.GetBuildDirectory()}/output/package/vagrant.box" - ); - - if (template.Aliases?.Any() == true) { - foreach (var alias in template.Aliases) { - var boxUrl = $"https://vagrantcloud.com/gusztavvargadr/boxes/{template.GroupName}/versions/{template.GroupVersion}/providers/{provider}.box"; - - PackerTemplate_Vagrant(template, "cloud publish --force" - + $" --checksum-type sha256" - + $" --checksum {boxChecksum}" - + $" --release" - + $" --url {boxUrl}" - + $" gusztavvargadr/{alias}" - + $" {template.GroupVersion}" - + $" {provider}" - ); - } - } -} - -void PackerTemplate_Download(PackerTemplate template) { - PackerTemplate_Log(template, "Download"); - - if (!template.Type.Contains("vagrant")) { - return; - } - - var provider = template.Type.Split('-')[0]; - if (provider == "vmware") { - provider = "vmware_desktop"; - } - - try { - PackerTemplate_Vagrant(template, $"box add gusztavvargadr/{template.GroupName} --box-version {template.GroupVersion} --provider {provider}"); - } finally { - try { - PackerTemplate_Vagrant(template, $"box remove gusztavvargadr/{template.GroupName} --box-version {template.GroupVersion} --provider {provider}"); - } catch (Exception ex) { - PackerTemplate_Log(template, $"Error cleaning up download: '{ex.Message}'."); - } - } - - if (template.Aliases?.Any() == true) { - foreach (var alias in template.Aliases) { - try { - PackerTemplate_Vagrant(template, $"box add gusztavvargadr/{alias} --box-version {template.GroupVersion} --provider {provider}"); - } finally { - try { - PackerTemplate_Vagrant(template, $"box remove gusztavvargadr/{alias} --box-version {template.GroupVersion} --provider {provider}"); - } catch (Exception ex) { - PackerTemplate_Log(template, $"Error cleaning up download: '{ex.Message}'."); - } - } - } - } -} - -void PackerTemplate_Clean(PackerTemplate template) { - PackerTemplate_Log(template, "Clean"); - - CleanDirectory(template.GetBuildDirectory()); - DeleteDirectory(template.GetBuildDirectory(), new DeleteDirectorySettings { Recursive = true, Force = true }); - - if (recursive && template.Parent != null) { - PackerTemplate_Clean(template.Parent); - } - - if (!template.Type.Contains("vagrant")) { - return; - } - - var provider = template.Type.Split('-')[0]; - if (provider == "vmware") { - provider = "vmware_desktop"; - } - - try { - var vmName = $"{template.Name}-test"; - var boxName = $"gusztavvargadr/{template.Name}-test"; - - PackerTemplate_Vagrant(template, $"destroy {vmName} --force", vmName, boxName); - PackerTemplate_Vagrant(template, $"box remove {boxName} --provider {provider}"); - } catch (Exception ex) { - PackerTemplate_Log(template, $"Error cleaning up test: '{ex.Message}'."); - } -} - -void PackerTemplate_Log(PackerTemplate template, string message) { - Information(template.GetLogMessage(message)); -} - -void PackerTemplate_MergeDirectories(PackerTemplate template) { - PackerTemplate_Log(template, "Merge Directories"); - - foreach (var component in template.Components) { - foreach (var sourceDirectory in PackerTemplate_GetDirectories("src/*")) { - var sourceDirectoryName = sourceDirectory.GetDirectoryName(); - if (!component.IsMatching(sourceDirectoryName)) { - continue; - } - - foreach (var builder in template.Builders) { - foreach (var builderDirectory in PackerTemplate_GetDirectories(sourceDirectory + "/packer/builders/*")) { - var builderDirectoryName = builderDirectory.GetDirectoryName(); - if (!builder.IsMatching(builderDirectoryName)) { - continue; - } - - var targetDirecory = template.GetBuildDirectory() + "/builders/" + builder.Name; - EnsureDirectoryExists(targetDirecory); - CopyDirectory(builderDirectory, targetDirecory); - } - } - - foreach (var provisioner in template.Provisioners) { - foreach (var provisionerDirectory in PackerTemplate_GetDirectories(sourceDirectory + "/packer/provisioners/*")) { - var provisionerDirectoryName = provisionerDirectory.GetDirectoryName(); - if (!provisioner.IsMatching(provisionerDirectoryName)) { - continue; - } - - var targetDirecory = template.GetBuildDirectory() + "/provisioners/" + provisioner.Name; - EnsureDirectoryExists(targetDirecory); - CopyDirectory(provisionerDirectory, targetDirecory); - } - } - - foreach (var postProcessor in template.PostProcessors) { - foreach (var postProcessorDirectory in PackerTemplate_GetDirectories(sourceDirectory + "/packer/postprocessors/*")) { - var postProcessorDirectoryName = postProcessorDirectory.GetDirectoryName(); - if (!postProcessor.IsMatching(postProcessorDirectoryName)) { - continue; - } - - var targetDirecory = template.GetBuildDirectory() + "/postprocessors/" + postProcessor.Name; - EnsureDirectoryExists(targetDirecory); - CopyDirectory(postProcessorDirectory, targetDirecory); - } - } - } - } - - DeleteFiles(template.GetBuildDirectory() + "/**/template.json"); - - var buildDirectory = MakeAbsolute(Directory("./")); - foreach (var policyFile in GetFiles(template.GetBuildDirectory() + "/**/Policyfile.rb")) { - var policyPath = "./" + buildDirectory.GetRelativePath(policyFile); - - PackerTemplate_Chef(template, "install " + policyPath); - PackerTemplate_Chef(template, "export " + File(policyPath).Path.GetDirectory() + "/Policyfile.lock.json " + File(policyPath).Path.GetDirectory() + "/upload"); - } -} - -void PackerTemplate_MergeJson(PackerTemplate template) { - var jsonFileName = "template.json"; - var jsonFile = template.GetBuildDirectory() + "/" + jsonFileName; - - PackerTemplate_Log(template, "Merge Json " + jsonFile); - - var json = new JObject(); - - var jsonTemplateVariables = new JObject(); - jsonTemplateVariables["name"] = template.Name; - var buildDirectory = MakeAbsolute(Directory(template.GetBuildDirectory())); - var parent = template.Parent; - if (parent != null) { - var parentBuildDirectory = MakeAbsolute(Directory(parent.GetBuildDirectory())); - var manifestFile = parentBuildDirectory + "/output/build/manifest.json"; - if (!FileExists(manifestFile)) { - throw new Exception("Manifest missing at '" + manifestFile + "'."); - } - - var manifest = ParseJsonFromFile(manifestFile); - if (template.Builders.Any(item => item.IsMatching("virtualbox"))) { - var parentBuildOutputFile = File(parentBuildDirectory + "/" + manifest["builds"][0]["files"][1]["name"].ToString()); - jsonTemplateVariables["virtualbox_source_path"] = buildDirectory.GetRelativePath(parentBuildOutputFile).ToString(); - } - if (template.Builders.Any(item => item.IsMatching("hyperv"))) { - var parentBuildOutputDirectory = parentBuildDirectory + "/output/build"; - jsonTemplateVariables["hyperv_clone_from_vmcx_path"] = parentBuildOutputDirectory; - } - if (template.Builders.Any(item => item.IsMatching("vmware"))) { - var parentBuildOutputFile = File(parentBuildDirectory + "/" + manifest["builds"][0]["files"][3]["name"].ToString()); - jsonTemplateVariables["vmware_source_path"] = buildDirectory.GetRelativePath(parentBuildOutputFile).ToString(); - } - if (template.Builders.Any(item => item.IsMatching("azure"))) { - var artifactId = manifest["builds"][0]["artifact_id"].ToString(); - jsonTemplateVariables["azure_image_name"] = artifactId.Split('/').Last(); - } - } - var descriptions = new List(); - var runList = new List(); - - foreach (var component in template.Components) { - if (parent == null || !parent.Components.Any(item => item.Name == component.Name)) { - runList.Add(component.Name); - } - - foreach (var sourceDirectory in PackerTemplate_GetDirectories("src/*")) { - var sourceDirectoryName = sourceDirectory.GetDirectoryName(); - if (!component.IsMatching(sourceDirectoryName)) { - continue; - } - - foreach (var file in GetFiles(sourceDirectory + "/packer/" + jsonFileName)) { - json.Merge(ParseJsonFromFile(file)); - } - var description = json["variables"]["description"].ToString(); - if (!string.IsNullOrEmpty(description)) { - descriptions.Add(description); - } - - foreach (var builder in template.Builders) { - foreach (var builderDirectory in PackerTemplate_GetDirectories(sourceDirectory + "/packer/builders/*")) { - var builderDirectoryName = builderDirectory.GetDirectoryName(); - if (!builder.IsMatching(builderDirectoryName)) { - continue; - } - - foreach (var file in GetFiles(builderDirectory + "/" + jsonFileName)) { - json.Merge(ParseJsonFromFile(file)); - } - } - } - - foreach (var provisioner in template.Provisioners) { - foreach (var provisionerDirectory in PackerTemplate_GetDirectories(sourceDirectory + "/packer/provisioners/*")) { - var provisionerDirectoryName = provisionerDirectory.GetDirectoryName(); - if (!provisioner.IsMatching(provisionerDirectoryName)) { - continue; - } - - foreach (var file in GetFiles(provisionerDirectory + "/" + jsonFileName)) { - json.Merge(ParseJsonFromFile(file)); - } - } - } - - foreach (var postProcessor in template.PostProcessors) { - foreach (var postProcessorDirectory in PackerTemplate_GetDirectories(sourceDirectory + "/packer/postprocessors/*")) { - var postProcessorDirectoryName = postProcessorDirectory.GetDirectoryName(); - if (!postProcessor.IsMatching(postProcessorDirectoryName)) { - continue; - } - - foreach (var file in GetFiles(postProcessorDirectory + "/" + jsonFileName)) { - json.Merge(ParseJsonFromFile(file)); - } - } - } - } - } - - jsonTemplateVariables["version"] = version + ".0.0"; - jsonTemplateVariables["description"] = string.Join(", ", descriptions); - - var environentVariableKeyPrefix = "PACKER_VAR_"; - foreach (var environmentVariable in EnvironmentVariables()) { - if (environmentVariable.Key.StartsWith(environentVariableKeyPrefix)) { - jsonTemplateVariables[environmentVariable.Key.Substring(environentVariableKeyPrefix.Length)] = environmentVariable.Value; - } - } - - var jsonTemplate = new JObject(); - jsonTemplate["variables"] = jsonTemplateVariables; - json.Merge(jsonTemplate); - - FileWriteText(jsonFile, json.ToString()); -} - -IEnumerable PackerTemplate_GetDirectories(GlobPattern pattern) { - return GetDirectories(pattern).OrderBy(item => item.GetDirectoryName()); -} - -void PackerTemplate_Packer(PackerTemplate template, string arguments) { - PackerTemplate_Log(template, "Packer " + arguments); - - var result = StartProcess("packer", new ProcessSettings { - Arguments = arguments, - WorkingDirectory = template.GetBuildDirectory() - }); - - if (result != 0) { - throw new Exception("Process exited with code " + result + "."); - } -} - -void PackerTemplate_Vagrant(PackerTemplate template, string arguments, string vmName = "", string boxName = "", string boxUrl = "") { - PackerTemplate_Log(template, "Vagrant " + arguments); - - var result = StartProcess("vagrant", new ProcessSettings { - Arguments = arguments, - EnvironmentVariables = new Dictionary { - { "VAGRANT_VM_NAME", vmName }, - { "VAGRANT_BOX_NAME", boxName }, - { "VAGRANT_BOX_URL", boxUrl }, - } - }); - - if (result != 0) { - throw new Exception("Process exited with code " + result + "."); - } -} - -void PackerTemplate_Chef(PackerTemplate template, string arguments) { - PackerTemplate_Log(template, "Chef " + arguments); - - var result = StartProcess("chef", new ProcessSettings { - Arguments = arguments - }); - - if (result != 0) { - throw new Exception("Process exited with code " + result + "."); - } -} diff --git a/src/dc/packer/provisioners/chef/Policyfile.rb b/src/dc/packer/provisioners/chef/Policyfile.rb deleted file mode 100644 index 2f1fa8e47..000000000 --- a/src/dc/packer/provisioners/chef/Policyfile.rb +++ /dev/null @@ -1,12 +0,0 @@ -directory = File.dirname(__FILE__) - -require "#{directory}/../../../../../lib/gusztavvargadr/chef/src/Policyfile" - -name 'gusztavvargadr_packer_dc' - -gusztavvargadr_chef_sources -default_source :chef_repo, "#{directory}/cookbooks" - -run_list( - 'recipe[gusztavvargadr_packer_dc::default]' -) diff --git a/src/dc/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_dc/metadata.rb b/src/dc/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_dc/metadata.rb deleted file mode 100644 index 61d687386..000000000 --- a/src/dc/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_dc/metadata.rb +++ /dev/null @@ -1,12 +0,0 @@ -name 'gusztavvargadr_packer_dc' -description 'Installs/Configures Packer Docker Community' -license 'Unlicense' -maintainer 'Gusztáv Varga' -maintainer_email 'mail@gusztavvargadr.me' - -version '0.0.0' -depends 'gusztavvargadr_packer_w' -depends 'gusztavvargadr_docker' - -chef_version '>= 16.0' -supports 'windows' diff --git a/src/dc/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_dc/recipes/cleanup.rb b/src/dc/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_dc/recipes/cleanup.rb deleted file mode 100644 index bd00039bb..000000000 --- a/src/dc/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_dc/recipes/cleanup.rb +++ /dev/null @@ -1 +0,0 @@ -include_recipe 'gusztavvargadr_packer_w::cleanup' diff --git a/src/dc/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_dc/recipes/default.rb b/src/dc/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_dc/recipes/default.rb deleted file mode 100644 index 9674ca59f..000000000 --- a/src/dc/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_dc/recipes/default.rb +++ /dev/null @@ -1,4 +0,0 @@ -include_recipe 'gusztavvargadr_packer_dc::prepare' -include_recipe 'gusztavvargadr_packer_dc::install' -include_recipe 'gusztavvargadr_packer_dc::patch' -include_recipe 'gusztavvargadr_packer_dc::cleanup' diff --git a/src/dc/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_dc/recipes/install.rb b/src/dc/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_dc/recipes/install.rb deleted file mode 100644 index c6ebffe06..000000000 --- a/src/dc/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_dc/recipes/install.rb +++ /dev/null @@ -1,6 +0,0 @@ -include_recipe 'gusztavvargadr_packer_w::install' - -gusztavvargadr_docker_tool 'engine:latest-community' do - action [:install, :configure] - not_if { reboot_pending? } -end diff --git a/src/dc/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_dc/recipes/patch.rb b/src/dc/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_dc/recipes/patch.rb deleted file mode 100644 index 7465201ec..000000000 --- a/src/dc/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_dc/recipes/patch.rb +++ /dev/null @@ -1 +0,0 @@ -include_recipe 'gusztavvargadr_packer_w::patch' diff --git a/src/dc/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_dc/recipes/prepare.rb b/src/dc/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_dc/recipes/prepare.rb deleted file mode 100644 index 5817809e8..000000000 --- a/src/dc/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_dc/recipes/prepare.rb +++ /dev/null @@ -1,6 +0,0 @@ -include_recipe 'gusztavvargadr_packer_w::prepare' - -gusztavvargadr_docker_tool 'engine:latest-community' do - action :initialize - not_if { reboot_pending? } -end diff --git a/src/dc/packer/provisioners/shell-install/scripts/custom.sh b/src/dc/packer/provisioners/shell-install/scripts/custom.sh deleted file mode 100644 index 23b4ab423..000000000 --- a/src/dc/packer/provisioners/shell-install/scripts/custom.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -eux - -export DEBIAN_FRONTEND=noninteractive - -apt-get -y update -apt-get -y install apt-transport-https ca-certificates curl software-properties-common - -curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - -apt-key fingerprint 0EBFCD88 -add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" - -apt-get -y update -apt-get -y install docker-ce - -curl -L https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose -chmod +x /usr/local/bin/docker-compose -curl -L https://raw.githubusercontent.com/docker/compose/1.29.2/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose diff --git a/src/dc/packer/provisioners/shell-install/template.json b/src/dc/packer/provisioners/shell-install/template.json deleted file mode 100644 index 2c63c0851..000000000 --- a/src/dc/packer/provisioners/shell-install/template.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} diff --git a/src/dc/packer/provisioners/shell-vagrant/scripts/custom.sh b/src/dc/packer/provisioners/shell-vagrant/scripts/custom.sh deleted file mode 100644 index af826cbf6..000000000 --- a/src/dc/packer/provisioners/shell-vagrant/scripts/custom.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -eux - -usermod -aG docker $SUDO_USER diff --git a/src/dc/packer/provisioners/shell-vagrant/template.json b/src/dc/packer/provisioners/shell-vagrant/template.json deleted file mode 100644 index 2c63c0851..000000000 --- a/src/dc/packer/provisioners/shell-vagrant/template.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} diff --git a/src/dc/packer/template.json b/src/dc/packer/template.json deleted file mode 100644 index 1631f2624..000000000 --- a/src/dc/packer/template.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variables": { - "name": "dc", - "description": "Docker Community" - } -} diff --git a/src/iis/packer/postprocessors/vagrant-virtualbox/Vagrantfile b/src/iis/packer/postprocessors/vagrant-virtualbox/Vagrantfile deleted file mode 100644 index b3b07bb04..000000000 --- a/src/iis/packer/postprocessors/vagrant-virtualbox/Vagrantfile +++ /dev/null @@ -1,15 +0,0 @@ -Vagrant.configure(2) do |config| - config.vm.guest = :windows - config.vm.boot_timeout = 600 - - config.vm.communicator = 'winrm' - config.winssh.shell = 'powershell' - - config.vm.provider 'virtualbox' do |vb| - vb.memory = 2048 - vb.cpus = 2 - end - - config.vm.network :forwarded_port, guest: 3389, host: 53389, auto_correct: true - config.vm.network :forwarded_port, guest: 80, host: 50080, auto_correct: true -end diff --git a/src/iis/packer/postprocessors/vagrant-vmware/Vagrantfile b/src/iis/packer/postprocessors/vagrant-vmware/Vagrantfile deleted file mode 100644 index 9462277ff..000000000 --- a/src/iis/packer/postprocessors/vagrant-vmware/Vagrantfile +++ /dev/null @@ -1,15 +0,0 @@ -Vagrant.configure(2) do |config| - config.vm.guest = :windows - config.vm.boot_timeout = 600 - - config.vm.communicator = 'winrm' - config.winssh.shell = 'powershell' - - config.vm.provider 'vmware_desktop' do |vb| - vb.memory = 2048 - vb.cpus = 2 - end - - config.vm.network :forwarded_port, guest: 3389, host: 53389, auto_correct: true - config.vm.network :forwarded_port, guest: 80, host: 50080, auto_correct: true -end diff --git a/src/iis/packer/provisioners/chef/Policyfile.rb b/src/iis/packer/provisioners/chef/Policyfile.rb deleted file mode 100644 index de1615da6..000000000 --- a/src/iis/packer/provisioners/chef/Policyfile.rb +++ /dev/null @@ -1,12 +0,0 @@ -directory = File.dirname(__FILE__) - -require "#{directory}/../../../../../lib/gusztavvargadr/chef/src/Policyfile" - -name 'gusztavvargadr_packer_iis' - -gusztavvargadr_chef_sources -default_source :chef_repo, "#{directory}/cookbooks" - -run_list( - 'recipe[gusztavvargadr_packer_iis::default]' -) diff --git a/src/iis/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_iis/metadata.rb b/src/iis/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_iis/metadata.rb deleted file mode 100644 index 1f050bf83..000000000 --- a/src/iis/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_iis/metadata.rb +++ /dev/null @@ -1,12 +0,0 @@ -name 'gusztavvargadr_packer_iis' -description 'Installs/Configures Packer IIS' -license 'Unlicense' -maintainer 'Gusztáv Varga' -maintainer_email 'mail@gusztavvargadr.me' - -version '0.0.0' -depends 'gusztavvargadr_packer_w' -depends 'gusztavvargadr_iis' - -chef_version '>= 16.0' -supports 'windows' diff --git a/src/iis/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_iis/recipes/cleanup.rb b/src/iis/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_iis/recipes/cleanup.rb deleted file mode 100644 index bd00039bb..000000000 --- a/src/iis/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_iis/recipes/cleanup.rb +++ /dev/null @@ -1 +0,0 @@ -include_recipe 'gusztavvargadr_packer_w::cleanup' diff --git a/src/iis/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_iis/recipes/default.rb b/src/iis/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_iis/recipes/default.rb deleted file mode 100644 index d177de201..000000000 --- a/src/iis/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_iis/recipes/default.rb +++ /dev/null @@ -1,4 +0,0 @@ -include_recipe 'gusztavvargadr_packer_iis::prepare' -include_recipe 'gusztavvargadr_packer_iis::install' -include_recipe 'gusztavvargadr_packer_iis::patch' -include_recipe 'gusztavvargadr_packer_iis::cleanup' diff --git a/src/iis/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_iis/recipes/install.rb b/src/iis/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_iis/recipes/install.rb deleted file mode 100644 index 96a0cd127..000000000 --- a/src/iis/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_iis/recipes/install.rb +++ /dev/null @@ -1,6 +0,0 @@ -include_recipe 'gusztavvargadr_packer_w::install' - -gusztavvargadr_iis_tool 'server:latest' do - action :install - not_if { reboot_pending? } -end diff --git a/src/iis/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_iis/recipes/patch.rb b/src/iis/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_iis/recipes/patch.rb deleted file mode 100644 index 7465201ec..000000000 --- a/src/iis/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_iis/recipes/patch.rb +++ /dev/null @@ -1 +0,0 @@ -include_recipe 'gusztavvargadr_packer_w::patch' diff --git a/src/iis/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_iis/recipes/prepare.rb b/src/iis/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_iis/recipes/prepare.rb deleted file mode 100644 index 682525ba9..000000000 --- a/src/iis/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_iis/recipes/prepare.rb +++ /dev/null @@ -1 +0,0 @@ -include_recipe 'gusztavvargadr_packer_w::prepare' diff --git a/src/iis/packer/template.json b/src/iis/packer/template.json deleted file mode 100644 index 955693ea4..000000000 --- a/src/iis/packer/template.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variables": { - "name": "iis", - "description": "IIS" - } -} diff --git a/src/nocm/packer/builders/hyperv/template.json b/src/nocm/packer/builders/hyperv/template.json deleted file mode 100644 index 9906523ea..000000000 --- a/src/nocm/packer/builders/hyperv/template.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "variables": { - "hyperv_communicator": "winrm" - } -} \ No newline at end of file diff --git a/src/nocm/packer/builders/virtualbox/template.json b/src/nocm/packer/builders/virtualbox/template.json deleted file mode 100644 index f10c5eeb1..000000000 --- a/src/nocm/packer/builders/virtualbox/template.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "variables": { - "virtualbox_communicator": "winrm" - } -} \ No newline at end of file diff --git a/src/nocm/packer/provisioners/chef/Policyfile.rb b/src/nocm/packer/provisioners/chef/Policyfile.rb deleted file mode 100644 index ac2eac0d4..000000000 --- a/src/nocm/packer/provisioners/chef/Policyfile.rb +++ /dev/null @@ -1,12 +0,0 @@ -directory = File.dirname(__FILE__) - -require "#{directory}/../../../../../lib/gusztavvargadr/chef/src/Policyfile" - -name 'gusztavvargadr_packer_nocm' - -gusztavvargadr_chef_sources -default_source :chef_repo, "#{directory}/cookbooks" - -run_list( - 'recipe[hello_world::default]' -) diff --git a/src/nocm/packer/provisioners/chef/scripts/cleanup.ps1 b/src/nocm/packer/provisioners/chef/scripts/cleanup.ps1 deleted file mode 100644 index d5f43ab0d..000000000 --- a/src/nocm/packer/provisioners/chef/scripts/cleanup.ps1 +++ /dev/null @@ -1,66 +0,0 @@ -Write-Host "Clean up" -Remove-Item -Recurse -Force C:/Windows/Temp/chef - -$app = Get-WmiObject -Class Win32_Product | Where-Object -Property Name -Match "Chef Infra Client" -$app.Uninstall() - -choco uninstall -y openssh --params "/SSHServerFeature" - -$userKey = [Microsoft.Win32.Registry]::CurrentUser.OpenSubKey('Environment',$true) -$userPath = $userKey.GetValue('PATH', [string]::Empty, 'DoNotExpandEnvironmentNames').ToString() - -$machineKey = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey('SYSTEM\ControlSet001\Control\Session Manager\Environment\',$true) -$machinePath = $machineKey.GetValue('PATH', [string]::Empty, 'DoNotExpandEnvironmentNames').ToString() - -$backupPATHs = @( - "User PATH: $userPath" - "Machine PATH: $machinePath" -) -$backupFile = "C:\PATH_backups_ChocolateyUninstall.txt" -$backupPATHs | Set-Content -Path $backupFile -Encoding UTF8 -Force - -if ($userPath -like "*$env:ChocolateyInstall*") { - Write-Verbose "Chocolatey Install location found in User Path. Removing..." - - $newUserPATH = @( - $userPath -split [System.IO.Path]::PathSeparator | - Where-Object { $_ -and $_ -ne "$env:ChocolateyInstall\bin" } - ) -join [System.IO.Path]::PathSeparator - - $userKey.SetValue('PATH', $newUserPATH, 'ExpandString') -} - -if ($machinePath -like "*$env:ChocolateyInstall*") { - Write-Verbose "Chocolatey Install location found in Machine Path. Removing..." - - $newMachinePATH = @( - $machinePath -split [System.IO.Path]::PathSeparator | - Where-Object { $_ -and $_ -ne "$env:ChocolateyInstall\bin" } - ) -join [System.IO.Path]::PathSeparator - - $machineKey.SetValue('PATH', $newMachinePATH, 'ExpandString') -} - -Remove-Item -Path $env:ChocolateyInstall -Recurse -Force - -'ChocolateyInstall', 'ChocolateyLastPathUpdate' | ForEach-Object { - foreach ($scope in 'User', 'Machine') { - [Environment]::SetEnvironmentVariable($_, [string]::Empty, $scope) - } -} - -$machineKey.Close() -$userKey.Close() - -if ($env:ChocolateyToolsLocation -and (Test-Path $env:ChocolateyToolsLocation)) { - Remove-Item -Path $env:ChocolateyToolsLocation -Recurse -Force -} - -foreach ($scope in 'User', 'Machine') { - [Environment]::SetEnvironmentVariable('ChocolateyToolsLocation', [string]::Empty, $scope) -} - -Optimize-Volume -DriveLetter C -Analyze -Defrag - -sdelete -accepteula -nobanner -z C: -rm -Force "${env:SystemRoot}\System32\sdelete.exe" diff --git a/src/nocm/packer/provisioners/vagrant/template.json b/src/nocm/packer/provisioners/vagrant/template.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/src/nocm/packer/provisioners/vagrant/template.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/src/nocm/packer/provisioners/vagrant/upload/Autounattend.ps1 b/src/nocm/packer/provisioners/vagrant/upload/Autounattend.ps1 deleted file mode 100644 index 6806537c3..000000000 --- a/src/nocm/packer/provisioners/vagrant/upload/Autounattend.ps1 +++ /dev/null @@ -1,4 +0,0 @@ -Set-LocalUser -Name vagrant -PasswordNeverExpires $true - -sc.exe config winrm start= auto -net start winrm diff --git a/src/nocm/packer/provisioners/vagrant/upload/shutdown.cmd b/src/nocm/packer/provisioners/vagrant/upload/shutdown.cmd deleted file mode 100644 index 3d1a2b5b1..000000000 --- a/src/nocm/packer/provisioners/vagrant/upload/shutdown.cmd +++ /dev/null @@ -1,3 +0,0 @@ -sc.exe config winrm start= disabled - -C:\Windows\System32\Sysprep\sysprep.exe /generalize /oobe /quiet /shutdown /unattend:C:\Windows\Temp\packer\Autounattend.xml diff --git a/src/nocm/packer/template.json b/src/nocm/packer/template.json deleted file mode 100644 index 46cc071be..000000000 --- a/src/nocm/packer/template.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variables": { - "name": "nocm", - "description": "No Configuration Management" - } -} \ No newline at end of file diff --git a/src/sql19d/packer/postprocessors/vagrant-virtualbox/Vagrantfile b/src/sql19d/packer/postprocessors/vagrant-virtualbox/Vagrantfile deleted file mode 100644 index aa4a8ce7a..000000000 --- a/src/sql19d/packer/postprocessors/vagrant-virtualbox/Vagrantfile +++ /dev/null @@ -1,15 +0,0 @@ -Vagrant.configure(2) do |config| - config.vm.guest = :windows - config.vm.boot_timeout = 600 - - config.vm.communicator = 'winrm' - config.winssh.shell = 'powershell' - - config.vm.provider 'virtualbox' do |vb| - vb.memory = 2048 - vb.cpus = 2 - end - - config.vm.network :forwarded_port, guest: 3389, host: 53389, auto_correct: true - config.vm.network :forwarded_port, guest: 1433, host: 51433, auto_correct: true -end diff --git a/src/sql19d/packer/postprocessors/vagrant-vmware/Vagrantfile b/src/sql19d/packer/postprocessors/vagrant-vmware/Vagrantfile deleted file mode 100644 index 69d0a6cb3..000000000 --- a/src/sql19d/packer/postprocessors/vagrant-vmware/Vagrantfile +++ /dev/null @@ -1,15 +0,0 @@ -Vagrant.configure(2) do |config| - config.vm.guest = :windows - config.vm.boot_timeout = 600 - - config.vm.communicator = 'winrm' - config.winssh.shell = 'powershell' - - config.vm.provider 'vmware_desktop' do |vb| - vb.memory = 2048 - vb.cpus = 2 - end - - config.vm.network :forwarded_port, guest: 3389, host: 53389, auto_correct: true - config.vm.network :forwarded_port, guest: 1433, host: 51433, auto_correct: true -end diff --git a/src/sql19d/packer/provisioners/chef/Policyfile.rb b/src/sql19d/packer/provisioners/chef/Policyfile.rb deleted file mode 100644 index b2b7ae44f..000000000 --- a/src/sql19d/packer/provisioners/chef/Policyfile.rb +++ /dev/null @@ -1,12 +0,0 @@ -directory = File.dirname(__FILE__) - -require "#{directory}/../../../../../lib/gusztavvargadr/chef/src/Policyfile" - -name 'gusztavvargadr_packer_sql19d' - -gusztavvargadr_chef_sources -default_source :chef_repo, "#{directory}/cookbooks" - -run_list( - 'recipe[gusztavvargadr_packer_sql19d::default]' -) diff --git a/src/sql19d/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_sql19d/metadata.rb b/src/sql19d/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_sql19d/metadata.rb deleted file mode 100644 index a8684868d..000000000 --- a/src/sql19d/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_sql19d/metadata.rb +++ /dev/null @@ -1,12 +0,0 @@ -name 'gusztavvargadr_packer_sql19d' -description 'Installs/Configures Packer SQL Server 2019 Developer' -license 'Unlicense' -maintainer 'Gusztáv Varga' -maintainer_email 'mail@gusztavvargadr.me' - -version '0.0.0' -depends 'gusztavvargadr_packer_w' -depends 'gusztavvargadr_mssql' - -chef_version '>= 16.0' -supports 'windows' diff --git a/src/sql19d/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_sql19d/recipes/cleanup.rb b/src/sql19d/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_sql19d/recipes/cleanup.rb deleted file mode 100644 index bd00039bb..000000000 --- a/src/sql19d/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_sql19d/recipes/cleanup.rb +++ /dev/null @@ -1 +0,0 @@ -include_recipe 'gusztavvargadr_packer_w::cleanup' diff --git a/src/sql19d/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_sql19d/recipes/default.rb b/src/sql19d/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_sql19d/recipes/default.rb deleted file mode 100644 index aed6dea93..000000000 --- a/src/sql19d/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_sql19d/recipes/default.rb +++ /dev/null @@ -1,4 +0,0 @@ -include_recipe 'gusztavvargadr_packer_sql19d::prepare' -include_recipe 'gusztavvargadr_packer_sql19d::install' -include_recipe 'gusztavvargadr_packer_sql19d::patch' -include_recipe 'gusztavvargadr_packer_sql19d::cleanup' diff --git a/src/sql19d/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_sql19d/recipes/install.rb b/src/sql19d/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_sql19d/recipes/install.rb deleted file mode 100644 index 3887abf8e..000000000 --- a/src/sql19d/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_sql19d/recipes/install.rb +++ /dev/null @@ -1,14 +0,0 @@ -include_recipe 'gusztavvargadr_packer_w::install' - -gusztavvargadr_mssql_tool 'server:2019-developer' do - action :install - not_if { reboot_pending? } -end - -installationType = powershell_out('Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name InstallationType').stdout.strip -unless installationType.include?('Server Core') - gusztavvargadr_mssql_tool 'management-studio:2019' do - action :install - not_if { reboot_pending? } - end -end diff --git a/src/sql19d/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_sql19d/recipes/patch.rb b/src/sql19d/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_sql19d/recipes/patch.rb deleted file mode 100644 index 7465201ec..000000000 --- a/src/sql19d/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_sql19d/recipes/patch.rb +++ /dev/null @@ -1 +0,0 @@ -include_recipe 'gusztavvargadr_packer_w::patch' diff --git a/src/sql19d/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_sql19d/recipes/prepare.rb b/src/sql19d/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_sql19d/recipes/prepare.rb deleted file mode 100644 index 682525ba9..000000000 --- a/src/sql19d/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_sql19d/recipes/prepare.rb +++ /dev/null @@ -1 +0,0 @@ -include_recipe 'gusztavvargadr_packer_w::prepare' diff --git a/src/sql19d/packer/template.json b/src/sql19d/packer/template.json deleted file mode 100644 index 79c53dbf0..000000000 --- a/src/sql19d/packer/template.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variables": { - "name": "sql19d", - "description": "SQL Server 2019 Developer" - } -} \ No newline at end of file diff --git a/src/u/packer/builders/amazon/template.json b/src/u/packer/builders/amazon/template.json deleted file mode 100644 index 760ec6bbe..000000000 --- a/src/u/packer/builders/amazon/template.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "variables": { - "amazon_region": "eu-west-1", - "amazon_ami_users": "", - "amazon_source_ami_filter_name": "", - - "amazon_source_ami_filter_owner": "", - - "amazon_instance_type": "t3.medium", - "amazon_user_data_file": "builders/amazon-ebs/userdata.sh", - "amazon_communicator": "ssh" - }, - "builders": [ - { - "type": "amazon-ebs", - "region": "{{user `amazon_region`}}", - "ami_name": "{{user `author`}}-{{user `name`}}-{{user `version`}}-{{timestamp}}", - "ami_description": "{{user `description`}}", - "ami_users": "{{user `amazon_ami_users`}}", - "source_ami_filter": { - "filters": { - "name": "{{user `amazon_source_ami_filter_name`}}" - }, - "owners": [ - "{{user `amazon_source_ami_filter_owner`}}" - ], - "most_recent": "{{user `amazon_source_ami_filter_most_recent`}}" - }, - "instance_type": "{{user `amazon_instance_type`}}", - "spot_price": "{{user `amazon_spot_price`}}", - "spot_price_auto_product": "{{user `amazon_spot_price_auto_product`}}", - "ebs_optimized": "{{user `amazon_ebs_optimized`}}", - "subnet_filter": { - "filters": { - "tag:Name": "{{user `amazon_subnet_filter_name`}}" - }, - "most_free": "{{user `amazon_subnet_filter_most_free`}}" - }, - "associate_public_ip_address": "{{user `amazon_associate_public_ip_address`}}", - "user_data_file": "{{user `amazon_user_data_file`}}", - "communicator": "{{user `amazon_communicator`}}", - "ssh_username": "{{user `amazon_username`}}", - "ssh_timeout": "{{user `amazon_timeout`}}", - "tags": { - "Name": "{{user `author`}}-{{user `name`}}-{{user `version`}}-{{timestamp}}" - }, - "run_tags": { - "Name": "{{user `author`}}-{{user `name`}}-{{user `version`}}-{{timestamp}}" - }, - "run_volume_tags": { - "Name": "{{user `author`}}-{{user `name`}}-{{user `version`}}-{{timestamp}}" - }, - "spot_tags": { - "Name": "{{user `author`}}-{{user `name`}}-{{user `version`}}-{{timestamp}}" - } - } - ] -} diff --git a/src/u/packer/builders/azure-custom/template.json b/src/u/packer/builders/azure-custom/template.json deleted file mode 100644 index 066d21b13..000000000 --- a/src/u/packer/builders/azure-custom/template.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "variables": { - "azure_client_id": "{{env `AZURE_CLIENT_ID`}}", - "azure_client_secret": "{{env `AZURE_CLIENT_SECRET`}}", - "azure_tenant_id": "{{env `AZURE_TENANT_ID`}}", - "azure_subscription_id": "{{env `AZURE_SUBSCRIPTION_ID`}}", - - "azure_resource_group": "packer", - "azure_location": "West Europe", - - "azure_image_name": "" - }, - "builders": [ - { - "type": "azure-arm", - - "client_id": "{{user `azure_client_id`}}", - "client_secret": "{{user `azure_client_secret`}}", - "tenant_id": "{{user `azure_tenant_id`}}", - "subscription_id": "{{user `azure_subscription_id`}}", - - "location": "{{user `azure_location`}}", - - "os_type": "Linux", - "custom_managed_image_resource_group_name": "{{user `azure_resource_group`}}", - "custom_managed_image_name": "{{user `azure_image_name`}}", - - "vm_size": "Standard_B2s", - - "communicator": "ssh", - - "managed_image_resource_group_name": "{{user `azure_resource_group`}}", - "managed_image_name": "{{user `author`}}-{{user `name`}}-{{user `version`}}-{{timestamp}}" - } - ] -} diff --git a/src/u/packer/builders/azure-marketplace/template.json b/src/u/packer/builders/azure-marketplace/template.json deleted file mode 100644 index 820270d4f..000000000 --- a/src/u/packer/builders/azure-marketplace/template.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "variables": { - "azure_client_id": "{{env `AZURE_CLIENT_ID`}}", - "azure_client_secret": "{{env `AZURE_CLIENT_SECRET`}}", - "azure_tenant_id": "{{env `AZURE_TENANT_ID`}}", - "azure_subscription_id": "{{env `AZURE_SUBSCRIPTION_ID`}}", - - "azure_resource_group": "packer", - "azure_location": "West Europe", - - "azure_image_publisher": "", - "azure_image_offer": "", - "azure_image_sku": "" - }, - "builders": [ - { - "type": "azure-arm", - - "client_id": "{{user `azure_client_id`}}", - "client_secret": "{{user `azure_client_secret`}}", - "tenant_id": "{{user `azure_tenant_id`}}", - "subscription_id": "{{user `azure_subscription_id`}}", - - "location": "{{user `azure_location`}}", - - "os_type": "Linux", - "image_publisher": "{{user `azure_image_publisher`}}", - "image_offer": "{{user `azure_image_offer`}}", - "image_sku": "{{user `azure_image_sku`}}", - - "vm_size": "Standard_B2s", - - "communicator": "ssh", - - "managed_image_resource_group_name": "{{user `azure_resource_group`}}", - "managed_image_name": "{{user `author`}}-{{user `name`}}-{{user `version`}}-{{timestamp}}" - } - ] -} diff --git a/src/u/packer/builders/hyperv-iso/http/preseed.cfg b/src/u/packer/builders/hyperv-iso/http/preseed.cfg deleted file mode 100644 index b900b947a..000000000 --- a/src/u/packer/builders/hyperv-iso/http/preseed.cfg +++ /dev/null @@ -1,37 +0,0 @@ -choose-mirror-bin mirror/http/proxy string -d-i base-installer/kernel/override-image string linux-server -d-i clock-setup/utc boolean true -d-i clock-setup/utc-auto boolean true -d-i finish-install/reboot_in_progress note -d-i grub-installer/only_debian boolean true -d-i grub-installer/with_other_os boolean true -d-i mirror/country string manual -d-i mirror/http/directory string /ubuntu/ -d-i mirror/http/hostname string archive.ubuntu.com -d-i mirror/http/proxy string -d-i partman-auto-lvm/guided_size string max -d-i partman-auto/choose_recipe select atomic -d-i partman-auto/method string lvm -d-i partman-lvm/confirm boolean true -d-i partman-lvm/confirm_nooverwrite boolean true -d-i partman-lvm/device_remove_lvm boolean true -d-i partman/choose_partition select finish -d-i partman/confirm boolean true -d-i partman/confirm_nooverwrite boolean true -d-i partman/confirm_write_new_label boolean true -d-i partman-partitioning/no_bootable_gpt_biosgrub boolean false -d-i partman-partitioning/no_bootable_gpt_efi boolean false -d-i partman-efi/non_efi_system boolean true -d-i passwd/user-fullname string vagrant -d-i passwd/user-uid string 1000 -d-i passwd/user-password password vagrant -d-i passwd/user-password-again password vagrant -d-i passwd/username string vagrant -d-i pkgsel/include string openssh-server net-tools apt-transport-https ntp rsync cifs-utils nfs-common perl software-properties-common ifupdown build-essential linux-tools-$(uname -r) linux-cloud-tools-$(uname -r) linux-cloud-tools-common -d-i pkgsel/install-language-support boolean false -d-i pkgsel/update-policy select none -d-i pkgsel/upgrade select full-upgrade -d-i time/zone string UTC -d-i user-setup/allow-password-weak boolean true -d-i user-setup/encrypt-home boolean false -tasksel tasksel/first multiselect standard, server diff --git a/src/u/packer/builders/hyperv-iso/template.json b/src/u/packer/builders/hyperv-iso/template.json deleted file mode 100644 index ee889ca99..000000000 --- a/src/u/packer/builders/hyperv-iso/template.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "variables": { - "hyperv_disk_size": "130048", - "hyperv_disk_block_size": "1", - "hyperv_boot_command": "set gfxpayload=1024x768linux /install/vmlinuz preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/builders/hyperv-iso/http/preseed.cfg debian-installer=en_US auto locale=en_US kbd-chooser/method=us hostname=vagrant fb=false debconf/frontend=noninteractive keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA keyboard-configuration/variant=USA console-setup/ask_detect=false initrd /install/initrd.gzboot" - }, - "builders": [ - { - "type": "hyperv-iso", - "vm_name": "{{user `author`}}-{{user `name`}}-{{user `version`}}-{{timestamp}}", - "iso_urls": [ - "{{user `iso_url_local`}}", - "{{user `iso_url_remote`}}" - ], - "iso_checksum": "{{user `iso_checksum`}}", - "headless": "{{user `hyperv_headless`}}", - "generation": "{{user `hyperv_generation`}}", - "configuration_version": "{{user `hyperv_configuration_version`}}", - "memory": "{{user `hyperv_memory`}}", - "enable_dynamic_memory": "{{user `hyperv_enable_dynamic_memory`}}", - "cpus": "{{user `hyperv_cpus`}}", - "enable_virtualization_extensions": "{{user `hyperv_enable_virtualization_extensions`}}", - "disk_size": "{{user `hyperv_disk_size`}}", - "disk_block_size": "{{user `hyperv_disk_block_size` }}", - "switch_name": "{{user `hyperv_switch_name`}}", - "enable_mac_spoofing": "{{user `hyperv_enable_mac_spoofing`}}", - "enable_secure_boot": "{{user `hyperv_enable_secure_boot`}}", - "boot_wait": "{{user `hyperv_boot_wait`}}", - "boot_command": [ "{{user `hyperv_boot_command`}}" ], - "http_directory": ".", - "communicator": "{{user `hyperv_communicator`}}", - "ssh_username": "{{user `hyperv_communicator_username`}}", - "ssh_password": "{{user `hyperv_communicator_password`}}", - "ssh_timeout": "{{user `hyperv_communicator_timeout`}}", - "guest_additions_mode": "{{user `hyperv_guest_additions_mode`}}", - "shutdown_command": "{{user `hyperv_shutdown_command`}}", - "output_directory": "{{user `output_directory`}}/build" - } - ] -} \ No newline at end of file diff --git a/src/u/packer/builders/hyperv-vmcx/template.json b/src/u/packer/builders/hyperv-vmcx/template.json deleted file mode 100644 index 0a027a23d..000000000 --- a/src/u/packer/builders/hyperv-vmcx/template.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "variables": { - "hyperv_clone_from_vmcx_path": "" - }, - "builders": [ - { - "type": "hyperv-vmcx", - "vm_name": "{{user `author`}}-{{user `name`}}-{{user `version`}}-{{timestamp}}", - "clone_from_vmcx_path": "{{user `hyperv_clone_from_vmcx_path`}}", - "headless": "{{user `hyperv_headless`}}", - "generation": "{{user `hyperv_generation`}}", - "configuration_version": "{{user `hyperv_configuration_version`}}", - "memory": "{{user `hyperv_memory`}}", - "enable_dynamic_memory": "{{user `hyperv_enable_dynamic_memory`}}", - "cpus": "{{user `hyperv_cpus`}}", - "enable_virtualization_extensions": "{{user `hyperv_enable_virtualization_extensions`}}", - "switch_name": "{{user `hyperv_switch_name`}}", - "enable_mac_spoofing": "{{user `hyperv_enable_mac_spoofing`}}", - "enable_secure_boot": "{{user `hyperv_enable_secure_boot`}}", - "boot_wait": "{{user `hyperv_boot_wait`}}", - "communicator": "{{user `hyperv_communicator`}}", - "ssh_username": "{{user `hyperv_communicator_username`}}", - "ssh_password": "{{user `hyperv_communicator_password`}}", - "ssh_timeout": "{{user `hyperv_communicator_timeout`}}", - "guest_additions_mode": "{{user `hyperv_guest_additions_mode`}}", - "shutdown_command": "{{user `hyperv_shutdown_command`}}", - "output_directory": "{{user `output_directory`}}/build" - } - ] -} \ No newline at end of file diff --git a/src/u/packer/builders/hyperv/template.json b/src/u/packer/builders/hyperv/template.json deleted file mode 100644 index 860074a94..000000000 --- a/src/u/packer/builders/hyperv/template.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "variables": { - "hyperv_headless": "true", - "hyperv_generation": "2", - "hyperv_configuration_version": "9.0", - "hyperv_memory": "8192", - "hyperv_enable_dynamic_memory": "false", - "hyperv_cpus": "4", - "hyperv_enable_virtualization_extensions": "false", - "hyperv_switch_name": "Default Switch", - "hyperv_enable_mac_spoofing": "true", - "hyperv_enable_secure_boot": "false", - "hyperv_boot_wait": "5s", - "hyperv_communicator": "ssh", - "hyperv_communicator_username": "vagrant", - "hyperv_communicator_password": "vagrant", - "hyperv_communicator_timeout": "15m", - "hyperv_guest_additions_mode": "disable", - "hyperv_shutdown_command": "echo 'vagrant' | sudo -S shutdown -P now" - } -} \ No newline at end of file diff --git a/src/u/packer/builders/iso/template.json b/src/u/packer/builders/iso/template.json deleted file mode 100644 index 31cb79083..000000000 --- a/src/u/packer/builders/iso/template.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variables": { - "iso_url_local": "", - "iso_url_remote": "", - "iso_checksum": "" - } -} \ No newline at end of file diff --git a/src/u/packer/builders/virtualbox-iso/http/preseed.cfg b/src/u/packer/builders/virtualbox-iso/http/preseed.cfg deleted file mode 100644 index 83a43f6ca..000000000 --- a/src/u/packer/builders/virtualbox-iso/http/preseed.cfg +++ /dev/null @@ -1,37 +0,0 @@ -choose-mirror-bin mirror/http/proxy string -d-i base-installer/kernel/override-image string linux-server -d-i clock-setup/utc boolean true -d-i clock-setup/utc-auto boolean true -d-i finish-install/reboot_in_progress note -d-i grub-installer/only_debian boolean true -d-i grub-installer/with_other_os boolean true -d-i mirror/country string manual -d-i mirror/http/directory string /ubuntu/ -d-i mirror/http/hostname string archive.ubuntu.com -d-i mirror/http/proxy string -d-i partman-auto-lvm/guided_size string max -d-i partman-auto/choose_recipe select atomic -d-i partman-auto/method string lvm -d-i partman-lvm/confirm boolean true -d-i partman-lvm/confirm_nooverwrite boolean true -d-i partman-lvm/device_remove_lvm boolean true -d-i partman/choose_partition select finish -d-i partman/confirm boolean true -d-i partman/confirm_nooverwrite boolean true -d-i partman/confirm_write_new_label boolean true -d-i partman-partitioning/no_bootable_gpt_biosgrub boolean false -d-i partman-partitioning/no_bootable_gpt_efi boolean false -d-i partman-efi/non_efi_system boolean true -d-i passwd/user-fullname string vagrant -d-i passwd/user-uid string 1000 -d-i passwd/user-password password vagrant -d-i passwd/user-password-again password vagrant -d-i passwd/username string vagrant -d-i pkgsel/include string openssh-server net-tools apt-transport-https ntp rsync cifs-utils nfs-common perl software-properties-common ifupdown build-essential cryptsetup libssl-dev libreadline-dev zlib1g-dev linux-source dkms linux-headers-$(uname -r) -d-i pkgsel/install-language-support boolean false -d-i pkgsel/update-policy select none -d-i pkgsel/upgrade select full-upgrade -d-i time/zone string UTC -d-i user-setup/allow-password-weak boolean true -d-i user-setup/encrypt-home boolean false -tasksel tasksel/first multiselect standard, server diff --git a/src/u/packer/builders/virtualbox-iso/template.json b/src/u/packer/builders/virtualbox-iso/template.json deleted file mode 100644 index d86f90a08..000000000 --- a/src/u/packer/builders/virtualbox-iso/template.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "variables": { - "virtualbox_guest_os_type": "Ubuntu_64", - "virtualbox_disk_size": "130048", - "virtualbox_boot_command": "set gfxpayload=1024x768linux /install/vmlinuz preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/builders/virtualbox-iso/http/preseed.cfg debian-installer=en_US auto locale=en_US kbd-chooser/method=us hostname=vagrant fb=false debconf/frontend=noninteractive keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA keyboard-configuration/variant=USA console-setup/ask_detect=false initrd /install/initrd.gzboot" - }, - "builders": [ - { - "type": "virtualbox-iso", - "vm_name": "{{user `author`}}-{{user `name`}}-{{user `version`}}-{{timestamp}}", - "guest_os_type": "{{user `virtualbox_guest_os_type`}}", - "iso_urls": [ - "{{user `iso_url_local`}}", - "{{user `iso_url_remote`}}" - ], - "iso_checksum": "{{user `iso_checksum`}}", - "headless": "{{user `virtualbox_headless`}}", - "vboxmanage": [ - [ - "modifyvm", - "{{.Name}}", - "--memory", - "{{user `virtualbox_memory`}}" - ], - [ - "modifyvm", - "{{.Name}}", - "--cpus", - "{{user `virtualbox_cpus`}}" - ] - ], - "disk_size": "{{user `virtualbox_disk_size`}}", - "boot_wait": "{{user `virtualbox_boot_wait`}}", - "boot_command": [ "{{user `virtualbox_boot_command`}}" ], - "http_directory": ".", - "communicator": "{{user `virtualbox_communicator`}}", - "ssh_username": "{{user `virtualbox_communicator_username`}}", - "ssh_password": "{{user `virtualbox_communicator_password`}}", - "ssh_timeout": "{{user `virtualbox_communicator_timeout`}}", - "guest_additions_mode": "{{user `virtualbox_guest_additions_mode`}}", - "shutdown_command": "{{user `virtualbox_shutdown_command`}}", - "output_directory": "{{user `output_directory`}}/build", - "firmware": "efi", - "nested_virt": "false", - "gfx_controller": "vmsvga", - "gfx_vram_size": 64, - "hard_drive_interface": "sata" - } - ] -} \ No newline at end of file diff --git a/src/u/packer/builders/virtualbox-ovf/template.json b/src/u/packer/builders/virtualbox-ovf/template.json deleted file mode 100644 index 69fe61bda..000000000 --- a/src/u/packer/builders/virtualbox-ovf/template.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "variables": { - "virtualbox_source_path": "" - }, - "builders": [ - { - "type": "virtualbox-ovf", - "vm_name": "{{user `author`}}-{{user `name`}}-{{user `version`}}-{{timestamp}}", - "source_path": "{{user `virtualbox_source_path`}}", - "headless": "{{user `virtualbox_headless`}}", - "vboxmanage": [ - [ - "modifyvm", - "{{.Name}}", - "--memory", - "{{user `virtualbox_memory`}}" - ], - [ - "modifyvm", - "{{.Name}}", - "--cpus", - "{{user `virtualbox_cpus`}}" - ] - ], - "boot_wait": "{{user `virtualbox_boot_wait`}}", - "communicator": "{{user `virtualbox_communicator`}}", - "ssh_username": "{{user `virtualbox_communicator_username`}}", - "ssh_password": "{{user `virtualbox_communicator_password`}}", - "ssh_timeout": "{{user `virtualbox_communicator_timeout`}}", - "guest_additions_mode": "{{user `virtualbox_guest_additions_mode`}}", - "shutdown_command": "{{user `virtualbox_shutdown_command`}}", - "output_directory": "{{user `output_directory`}}/build" - } - ] -} diff --git a/src/u/packer/builders/virtualbox/template.json b/src/u/packer/builders/virtualbox/template.json deleted file mode 100644 index a2a845a0d..000000000 --- a/src/u/packer/builders/virtualbox/template.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "variables": { - "virtualbox_headless": "true", - "virtualbox_memory": "8192", - "virtualbox_cpus": "4", - "virtualbox_boot_wait": "5s", - "virtualbox_communicator": "ssh", - "virtualbox_communicator_username": "vagrant", - "virtualbox_communicator_password": "vagrant", - "virtualbox_communicator_timeout": "15m", - "virtualbox_guest_additions_mode": "disable", - "virtualbox_shutdown_command": "echo 'vagrant' | sudo -S shutdown -P now" - } -} \ No newline at end of file diff --git a/src/u/packer/builders/vmware-iso/http/preseed.cfg b/src/u/packer/builders/vmware-iso/http/preseed.cfg deleted file mode 100644 index 3da9a0ebb..000000000 --- a/src/u/packer/builders/vmware-iso/http/preseed.cfg +++ /dev/null @@ -1,37 +0,0 @@ -choose-mirror-bin mirror/http/proxy string -d-i base-installer/kernel/override-image string linux-server -d-i clock-setup/utc boolean true -d-i clock-setup/utc-auto boolean true -d-i finish-install/reboot_in_progress note -d-i grub-installer/only_debian boolean true -d-i grub-installer/with_other_os boolean true -d-i mirror/country string manual -d-i mirror/http/directory string /ubuntu/ -d-i mirror/http/hostname string archive.ubuntu.com -d-i mirror/http/proxy string -d-i partman-auto-lvm/guided_size string max -d-i partman-auto/choose_recipe select atomic -d-i partman-auto/method string lvm -d-i partman-lvm/confirm boolean true -d-i partman-lvm/confirm_nooverwrite boolean true -d-i partman-lvm/device_remove_lvm boolean true -d-i partman/choose_partition select finish -d-i partman/confirm boolean true -d-i partman/confirm_nooverwrite boolean true -d-i partman/confirm_write_new_label boolean true -d-i partman-partitioning/no_bootable_gpt_biosgrub boolean false -d-i partman-partitioning/no_bootable_gpt_efi boolean false -d-i partman-efi/non_efi_system boolean true -d-i passwd/user-fullname string vagrant -d-i passwd/user-uid string 1000 -d-i passwd/user-password password vagrant -d-i passwd/user-password-again password vagrant -d-i passwd/username string vagrant -d-i pkgsel/include string openssh-server net-tools apt-transport-https ntp rsync cifs-utils nfs-common perl software-properties-common ifupdown build-essential open-vm-tools -d-i pkgsel/install-language-support boolean false -d-i pkgsel/update-policy select none -d-i pkgsel/upgrade select full-upgrade -d-i time/zone string UTC -d-i user-setup/allow-password-weak boolean true -d-i user-setup/encrypt-home boolean false -tasksel tasksel/first multiselect standard, server diff --git a/src/u/packer/builders/vmware-iso/template.json b/src/u/packer/builders/vmware-iso/template.json deleted file mode 100644 index 5745b9dc8..000000000 --- a/src/u/packer/builders/vmware-iso/template.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "variables": { - "vmware_guest_os_type": "ubuntu-64", - "vmware_disk_size": "130048", - "vmware_boot_command": "set gfxpayload=1024x768linux /install/vmlinuz preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/builders/vmware-iso/http/preseed.cfg debian-installer=en_US auto locale=en_US kbd-chooser/method=us hostname=vagrant fb=false debconf/frontend=noninteractive keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA keyboard-configuration/variant=USA console-setup/ask_detect=false initrd /install/initrd.gzboot" - }, - "builders": [ - { - "type": "vmware-iso", - "vm_name": "{{user `author`}}-{{user `name`}}-{{user `version`}}-{{timestamp}}", - "guest_os_type": "{{user `vmware_guest_os_type`}}", - "iso_urls": [ - "{{user `iso_url_local`}}", - "{{user `iso_url_remote`}}" - ], - "iso_checksum": "{{user `iso_checksum`}}", - "headless": "{{user `vmware_headless`}}", - "vmx_data": { - "firmware": "efi", - "vhv.enable": "FALSE" - }, - "version": "16", - "disk_type_id": 0, - "disk_adapter_type": "nvme", - "memory": "{{user `vmware_memory`}}", - "cpus": "{{user `vmware_cpus`}}", - "disk_size": "{{user `vmware_disk_size`}}", - "boot_wait": "{{user `vmware_boot_wait`}}", - "boot_command": [ "{{user `vmware_boot_command`}}" ], - "http_directory": ".", - "communicator": "{{user `vmware_communicator`}}", - "ssh_username": "{{user `vmware_communicator_username`}}", - "ssh_password": "{{user `vmware_communicator_password`}}", - "ssh_timeout": "{{user `vmware_communicator_timeout`}}", - "shutdown_command": "{{user `vmware_shutdown_command`}}", - "output_directory": "{{user `output_directory`}}/build" - } - ] -} \ No newline at end of file diff --git a/src/u/packer/builders/vmware-vmx/template.json b/src/u/packer/builders/vmware-vmx/template.json deleted file mode 100644 index f08ef6d59..000000000 --- a/src/u/packer/builders/vmware-vmx/template.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "variables": { - "vmware_source_path": "", - "vmware_vmx_remove_ethernet_interfaces": "false" - }, - "builders": [ - { - "type": "vmware-vmx", - "vm_name": "{{user `author`}}-{{user `name`}}-{{user `version`}}-{{timestamp}}", - "source_path": "{{user `vmware_source_path`}}", - "headless": "{{user `vmware_headless`}}", - "vmx_remove_ethernet_interfaces": "{{user `vmware_vmx_remove_ethernet_interfaces`}}", - "boot_wait": "{{user `vmware_boot_wait`}}", - "communicator": "{{user `vmware_communicator`}}", - "ssh_username": "{{user `vmware_communicator_username`}}", - "ssh_password": "{{user `vmware_communicator_password`}}", - "ssh_timeout": "{{user `vmware_communicator_timeout`}}", - "shutdown_command": "{{user `vmware_shutdown_command`}}", - "output_directory": "{{user `output_directory`}}/build" - } - ] -} diff --git a/src/u/packer/builders/vmware/template.json b/src/u/packer/builders/vmware/template.json deleted file mode 100644 index 05432102f..000000000 --- a/src/u/packer/builders/vmware/template.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "variables": { - "vmware_headless": "true", - "vmware_memory": "8192", - "vmware_cpus": "4", - "vmware_boot_wait": "5s", - "vmware_communicator": "ssh", - "vmware_communicator_username": "vagrant", - "vmware_communicator_password": "vagrant", - "vmware_communicator_timeout": "15m", - "vmware_shutdown_command": "echo 'vagrant' | sudo -S shutdown -P now" - } -} \ No newline at end of file diff --git a/src/u/packer/postprocessors/manifest/template.json b/src/u/packer/postprocessors/manifest/template.json deleted file mode 100644 index d82060097..000000000 --- a/src/u/packer/postprocessors/manifest/template.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "post-processors": [ - { - "type": "manifest", - "output": "{{user `output_directory`}}/build/manifest.json" - }, - { - "type": "checksum", - "checksum_types": [ - "sha256" - ], - "output": "{{user `output_directory`}}/build/checksum.{{.ChecksumType}}" - } - ] -} \ No newline at end of file diff --git a/src/u/packer/postprocessors/vagrant-hyperv/Vagrantfile b/src/u/packer/postprocessors/vagrant-hyperv/Vagrantfile deleted file mode 100644 index d8e03654b..000000000 --- a/src/u/packer/postprocessors/vagrant-hyperv/Vagrantfile +++ /dev/null @@ -1,6 +0,0 @@ -Vagrant.configure(2) do |config| - config.vm.provider 'hyperv' do |h| - h.cpus = 2 - h.memory = 2048 - end -end diff --git a/src/u/packer/postprocessors/vagrant-hyperv/template.json b/src/u/packer/postprocessors/vagrant-hyperv/template.json deleted file mode 100644 index 59baab521..000000000 --- a/src/u/packer/postprocessors/vagrant-hyperv/template.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "variables": { - "vagrant_vagrantfile_template": "postprocessors/vagrant-hyperv/Vagrantfile" - } -} \ No newline at end of file diff --git a/src/u/packer/postprocessors/vagrant-virtualbox/Vagrantfile b/src/u/packer/postprocessors/vagrant-virtualbox/Vagrantfile deleted file mode 100644 index 00939a5d3..000000000 --- a/src/u/packer/postprocessors/vagrant-virtualbox/Vagrantfile +++ /dev/null @@ -1,6 +0,0 @@ -Vagrant.configure(2) do |config| - config.vm.provider 'virtualbox' do |vb| - vb.cpus = 2 - vb.memory = 2048 - end -end diff --git a/src/u/packer/postprocessors/vagrant-virtualbox/template.json b/src/u/packer/postprocessors/vagrant-virtualbox/template.json deleted file mode 100644 index 637151484..000000000 --- a/src/u/packer/postprocessors/vagrant-virtualbox/template.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "variables": { - "vagrant_vagrantfile_template": "postprocessors/vagrant-virtualbox/Vagrantfile" - } -} \ No newline at end of file diff --git a/src/u/packer/postprocessors/vagrant-vmware/Vagrantfile b/src/u/packer/postprocessors/vagrant-vmware/Vagrantfile deleted file mode 100644 index b49c558d7..000000000 --- a/src/u/packer/postprocessors/vagrant-vmware/Vagrantfile +++ /dev/null @@ -1,6 +0,0 @@ -Vagrant.configure(2) do |config| - config.vm.provider 'vmware_desktop' do |provider| - provider.cpus = 2 - provider.memory = 2048 - end -end diff --git a/src/u/packer/postprocessors/vagrant-vmware/template.json b/src/u/packer/postprocessors/vagrant-vmware/template.json deleted file mode 100644 index 98f2ef56a..000000000 --- a/src/u/packer/postprocessors/vagrant-vmware/template.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variables": { - "vagrant_vagrantfile_template": "postprocessors/vagrant-vmware/Vagrantfile", - "vmware_vmx_remove_ethernet_interfaces": "true" - } -} \ No newline at end of file diff --git a/src/u/packer/postprocessors/vagrant/template.json b/src/u/packer/postprocessors/vagrant/template.json deleted file mode 100644 index 2d7918ad8..000000000 --- a/src/u/packer/postprocessors/vagrant/template.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "variables": { - "vagrant_vagrantfile_template": "" - }, - "post-processors": [ - [ - { - "type": "vagrant", - "vagrantfile_template": "{{user `vagrant_vagrantfile_template`}}", - "output": "{{user `output_directory`}}/package/vagrant.box" - }, - { - "type": "checksum", - "checksum_types": [ - "sha256" - ], - "output": "{{user `output_directory`}}/package/checksum.{{.ChecksumType}}" - } - ] - ] -} \ No newline at end of file diff --git a/src/u/packer/provisioners/shell-cleanup/scripts/azure-arm.sh b/src/u/packer/provisioners/shell-cleanup/scripts/azure-arm.sh deleted file mode 100644 index 0c4c32f7d..000000000 --- a/src/u/packer/provisioners/shell-cleanup/scripts/azure-arm.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -eux - -case "$PACKER_BUILDER_TYPE" in -azure-arm) - /usr/sbin/waagent -force -deprovision+user && export HISTSIZE=0 && sync -esac diff --git a/src/u/packer/provisioners/shell-cleanup/scripts/cleanup.sh b/src/u/packer/provisioners/shell-cleanup/scripts/cleanup.sh deleted file mode 100644 index 05ab1c2cb..000000000 --- a/src/u/packer/provisioners/shell-cleanup/scripts/cleanup.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -eux - -# Remove specific Linux kernels, such as linux-image-3.11.0-15-generic but -# keeps the current kernel and does not touch the virtual packages, -# e.g. 'linux-image-generic', etc. -dpkg --list \ - | awk '{ print $2 }' \ - | grep 'linux-image-.*-generic' \ - | grep -v `uname -r` \ - | xargs apt-get -y purge; - -# Delete Linux source -dpkg --list \ - | awk '{ print $2 }' \ - | grep linux-source \ - | xargs apt-get -y purge; - -# Delete development packages -dpkg --list \ - | awk '{ print $2 }' \ - | grep -- '-dev\(:[a-z0-9]\+\)\?$' \ - | xargs apt-get -y purge; - -# delete docs packages -dpkg --list \ - | awk '{ print $2 }' \ - | grep -- '-doc$' \ - | xargs apt-get -y purge; - -apt-get -y autoremove; -apt-get -y clean; - -# Remove caches -find /var/cache -type f -exec rm -rf {} \; - -# delete any logs that have built up during the install -find /var/log -type f -exec truncate --size=0 {} \; diff --git a/src/u/packer/provisioners/shell-cleanup/scripts/minimize.sh b/src/u/packer/provisioners/shell-cleanup/scripts/minimize.sh deleted file mode 100644 index a7ba61e29..000000000 --- a/src/u/packer/provisioners/shell-cleanup/scripts/minimize.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -eux - -case "$PACKER_BUILDER_TYPE" in - qemu|azure-arm) exit 0 ;; -esac - -# Whiteout root -count=$(df --sync -kP / | tail -n1 | awk -F ' ' '{print $4}') -count=$(($count-1)) -dd if=/dev/zero of=/tmp/whitespace bs=1M count=$count || echo "dd exit code $? is suppressed"; -rm /tmp/whitespace - -# Whiteout /boot -count=$(df --sync -kP /boot | tail -n1 | awk -F ' ' '{print $4}') -count=$(($count-1)) -dd if=/dev/zero of=/boot/whitespace bs=1M count=$count || echo "dd exit code $? is suppressed"; -rm /boot/whitespace - -set +e -swapuuid="`/sbin/blkid -o value -l -s UUID -t TYPE=swap`"; -case "$?" in - 2|0) ;; - *) exit 1 ;; -esac -set -e - -if [ "x${swapuuid}" != "x" ]; then - # Whiteout the swap partition to reduce box size - # Swap is disabled till reboot - swappart="`readlink -f /dev/disk/by-uuid/$swapuuid`"; - /sbin/swapoff "$swappart"; - dd if=/dev/zero of="$swappart" bs=1M || echo "dd exit code $? is suppressed"; - /sbin/mkswap -U "$swapuuid" "$swappart"; -fi - -sync; diff --git a/src/u/packer/provisioners/shell-cleanup/template.json b/src/u/packer/provisioners/shell-cleanup/template.json deleted file mode 100644 index f19798c3b..000000000 --- a/src/u/packer/provisioners/shell-cleanup/template.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "provisioners": [ - { - "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E sh -eux '{{.Path}}'", - "expect_disconnect": true, - "scripts": [ - "provisioners/shell-cleanup/scripts/cleanup.sh", - "provisioners/shell-cleanup/scripts/minimize.sh", - "provisioners/shell-cleanup/scripts/azure-arm.sh" - ], - "type": "shell" - } - ] -} diff --git a/src/u/packer/provisioners/shell-configure/scripts/networking.sh b/src/u/packer/provisioners/shell-configure/scripts/networking.sh deleted file mode 100644 index 1fd868f81..000000000 --- a/src/u/packer/provisioners/shell-configure/scripts/networking.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -eux - -case "$PACKER_BUILDER_TYPE" in -virtualbox-iso|hyperv-iso|vmware-iso) - ubuntu_version="`lsb_release -r | awk '{print $2}'`"; - major_version="`echo $ubuntu_version | awk -F. '{print $1}'`"; - - if [ "$ubuntu_version" = '17.10' ] || [ "$major_version" -ge "18" ]; then - echo "Create netplan config for eth0" - cat </etc/netplan/01-netcfg.yaml; - network: - version: 2 - ethernets: - eth0: - dhcp4: true -EOF - else - # Adding a 2 sec delay to the interface up, to make the dhclient happy - echo "pre-up sleep 2" >> /etc/network/interfaces; - fi - - if [ "$major_version" -ge "16" ]; then - # Disable Predictable Network Interface names and use eth0 - sed -i 's/en[[:alnum:]]*/eth0/g' /etc/network/interfaces; - sed -i 's/GRUB_CMDLINE_LINUX="\(.*\)"/GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0 \1"/g' /etc/default/grub; - sed -i "/recordfail_broken=/{s/1/0/}" /etc/grub.d/00_header; - update-grub; - fi - - if [ "$major_version" -le "16" ]; then - cat </boot/efi/startup.nsh; -FS0: -\EFI\ubuntu\grubx64.efi -EOF - fi - - reboot -esac diff --git a/src/u/packer/provisioners/shell-configure/scripts/sshd.sh b/src/u/packer/provisioners/shell-configure/scripts/sshd.sh deleted file mode 100644 index 9a1a9ae2e..000000000 --- a/src/u/packer/provisioners/shell-configure/scripts/sshd.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -eux - -case "$PACKER_BUILDER_TYPE" in -virtualbox-iso|hyperv-iso|vmware-iso) - SSHD_CONFIG="/etc/ssh/sshd_config" - - # ensure that there is a trailing newline before attempting to concatenate - sed -i -e '$a\' "$SSHD_CONFIG" - - USEDNS="UseDNS no" - if grep -q -E "^[[:space:]]*UseDNS" "$SSHD_CONFIG"; then - sed -i "s/^\s*UseDNS.*/${USEDNS}/" "$SSHD_CONFIG" - else - echo "$USEDNS" >>"$SSHD_CONFIG" - fi - - GSSAPI="GSSAPIAuthentication no" - if grep -q -E "^[[:space:]]*GSSAPIAuthentication" "$SSHD_CONFIG"; then - sed -i "s/^\s*GSSAPIAuthentication.*/${GSSAPI}/" "$SSHD_CONFIG" - else - echo "$GSSAPI" >>"$SSHD_CONFIG" - fi -esac diff --git a/src/u/packer/provisioners/shell-configure/template.json b/src/u/packer/provisioners/shell-configure/template.json deleted file mode 100644 index c9cc8d172..000000000 --- a/src/u/packer/provisioners/shell-configure/template.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "provisioners": [ - { - "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E sh -eux '{{.Path}}'", - "expect_disconnect": true, - "scripts": [ - "provisioners/shell-configure/scripts/sshd.sh", - "provisioners/shell-configure/scripts/networking.sh" - ], - "type": "shell" - } - ] -} diff --git a/src/u/packer/provisioners/shell-install/scripts/custom.sh b/src/u/packer/provisioners/shell-install/scripts/custom.sh deleted file mode 100644 index cfa200f60..000000000 --- a/src/u/packer/provisioners/shell-install/scripts/custom.sh +++ /dev/null @@ -1 +0,0 @@ -#!/bin/sh -eux diff --git a/src/u/packer/provisioners/shell-install/template.json b/src/u/packer/provisioners/shell-install/template.json deleted file mode 100644 index 065a16a54..000000000 --- a/src/u/packer/provisioners/shell-install/template.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "provisioners": [ - { - "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E sh -eux '{{.Path}}'", - "expect_disconnect": true, - "scripts": [ - "provisioners/shell-install/scripts/custom.sh" - ], - "type": "shell" - } - ] -} diff --git a/src/u/packer/provisioners/shell-prepare/scripts/chef.sh b/src/u/packer/provisioners/shell-prepare/scripts/chef.sh deleted file mode 100644 index 33a5e31c9..000000000 --- a/src/u/packer/provisioners/shell-prepare/scripts/chef.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -eux - -case "$PACKER_BUILDER_TYPE" in -virtualbox-iso|hyperv-iso|vmware-iso|azure-arm) - curl -L https://omnitruck.chef.io/install.sh | bash -s -- -P chef -v 18.3.0 - echo "CHEF_LICENSE=accept-silent" >> /etc/environment -esac diff --git a/src/u/packer/provisioners/shell-prepare/scripts/hyperv.sh b/src/u/packer/provisioners/shell-prepare/scripts/hyperv.sh deleted file mode 100644 index 38b8ef3b5..000000000 --- a/src/u/packer/provisioners/shell-prepare/scripts/hyperv.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -eux -ubuntu_version="`lsb_release -r | awk '{print $2}'`"; -major_version="`echo $ubuntu_version | awk -F. '{print $1}'`"; - -case "$PACKER_BUILDER_TYPE" in -hyperv-iso) - apt-get -y update; - - apt-get -y install linux-image-virtual linux-tools-virtual linux-cloud-tools-virtual; - - reboot -esac diff --git a/src/u/packer/provisioners/shell-prepare/scripts/update.sh b/src/u/packer/provisioners/shell-prepare/scripts/update.sh deleted file mode 100644 index 604f78bac..000000000 --- a/src/u/packer/provisioners/shell-prepare/scripts/update.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -eux -export DEBIAN_FRONTEND=noninteractive - -case "$PACKER_BUILDER_TYPE" in -virtualbox-iso|hyperv-iso|vmware-iso|azure-arm) - # Disable release-upgrades - sed -i.bak 's/^Prompt=.*$/Prompt=never/' /etc/update-manager/release-upgrades; - - # Disable systemd apt timers/services - systemctl stop apt-daily.timer; - systemctl stop apt-daily-upgrade.timer; - systemctl disable apt-daily.timer; - systemctl disable apt-daily-upgrade.timer; - systemctl mask apt-daily.service; - systemctl mask apt-daily-upgrade.service; - systemctl daemon-reload; - - # Disable periodic activities of apt to be safe - cat </etc/apt/apt.conf.d/10periodic; - APT::Periodic::Enable "0"; - APT::Periodic::Update-Package-Lists "0"; - APT::Periodic::Download-Upgradeable-Packages "0"; - APT::Periodic::AutocleanInterval "0"; - APT::Periodic::Unattended-Upgrade "0"; -EOF - - # Clean and nuke the package from orbit - rm -rf /var/log/unattended-upgrades; - apt-get -y purge unattended-upgrades ubuntu-release-upgrader-core; - - echo "update the package list" - apt-get -y update; - - # Upgrade all installed packages incl. kernel and kernel headers - apt-get -y dist-upgrade -o Dpkg::Options::="--force-confnew"; -esac diff --git a/src/u/packer/provisioners/shell-prepare/scripts/virtualbox.sh b/src/u/packer/provisioners/shell-prepare/scripts/virtualbox.sh deleted file mode 100644 index e0f47d07b..000000000 --- a/src/u/packer/provisioners/shell-prepare/scripts/virtualbox.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -eux - -# set a default HOME_DIR environment variable if not set -HOME_DIR="${HOME_DIR:-/home/vagrant}"; - -case "$PACKER_BUILDER_TYPE" in -virtualbox-iso) - apt-get -y update; - - VER="`cat $HOME_DIR/.vbox_version`"; - ISO="VBoxGuestAdditions_$VER.iso"; - wget http://download.virtualbox.org/virtualbox/$VER/$ISO - mkdir -p /tmp/vbox; - mount -o loop $HOME_DIR/$ISO /tmp/vbox; - sh /tmp/vbox/VBoxLinuxAdditions.run \ - || echo "VBoxLinuxAdditions.run exited $? and is suppressed." \ - "For more read https://www.virtualbox.org/ticket/12479"; - umount /tmp/vbox; - rm -rf /tmp/vbox; - rm -f $HOME_DIR/*.iso; - - reboot -esac diff --git a/src/u/packer/provisioners/shell-prepare/scripts/vmware.sh b/src/u/packer/provisioners/shell-prepare/scripts/vmware.sh deleted file mode 100644 index 236a4e568..000000000 --- a/src/u/packer/provisioners/shell-prepare/scripts/vmware.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -eux -ubuntu_version="`lsb_release -r | awk '{print $2}'`"; -major_version="`echo $ubuntu_version | awk -F. '{print $1}'`"; - -case "$PACKER_BUILDER_TYPE" in -vmware-iso) - # apt-get -y update; - - # apt-get -y install open-vm-tools; - - # reboot -esac diff --git a/src/u/packer/provisioners/shell-prepare/template.json b/src/u/packer/provisioners/shell-prepare/template.json deleted file mode 100644 index 19d4d8b64..000000000 --- a/src/u/packer/provisioners/shell-prepare/template.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "provisioners": [ - { - "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E sh -eux '{{.Path}}'", - "expect_disconnect": true, - "scripts": [ - "provisioners/shell-prepare/scripts/virtualbox.sh", - "provisioners/shell-prepare/scripts/hyperv.sh", - "provisioners/shell-prepare/scripts/vmware.sh", - "provisioners/shell-prepare/scripts/update.sh", - "provisioners/shell-prepare/scripts/chef.sh" - ], - "type": "shell" - } - ] -} \ No newline at end of file diff --git a/src/u/packer/provisioners/shell-vagrant/scripts/custom.sh b/src/u/packer/provisioners/shell-vagrant/scripts/custom.sh deleted file mode 100644 index 53fd6514c..000000000 --- a/src/u/packer/provisioners/shell-vagrant/scripts/custom.sh +++ /dev/null @@ -1 +0,0 @@ -#!/bin/bash -eux diff --git a/src/u/packer/provisioners/shell-vagrant/scripts/sudoers.sh b/src/u/packer/provisioners/shell-vagrant/scripts/sudoers.sh deleted file mode 100644 index 786e3b03d..000000000 --- a/src/u/packer/provisioners/shell-vagrant/scripts/sudoers.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -eux - -case "$PACKER_BUILDER_TYPE" in -virtualbox-ovf|hyperv-vmcx|vmware-vmx) - sed -i -e '/Defaults\s\+env_reset/a Defaults\texempt_group=sudo' /etc/sudoers; - - # Set up password-less sudo for the vagrant user - echo 'vagrant ALL=(ALL) NOPASSWD:ALL' >/etc/sudoers.d/99_vagrant; - chmod 440 /etc/sudoers.d/99_vagrant; -esac diff --git a/src/u/packer/provisioners/shell-vagrant/template.json b/src/u/packer/provisioners/shell-vagrant/template.json deleted file mode 100644 index 261515f1b..000000000 --- a/src/u/packer/provisioners/shell-vagrant/template.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "provisioners": [ - { - "environment_vars": [ - "HOME_DIR=/home/vagrant" - ], - "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E sh -eux '{{.Path}}'", - "expect_disconnect": true, - "scripts": [ - "provisioners/shell-vagrant/scripts/sudoers.sh", - "provisioners/shell-vagrant/scripts/vagrant.sh", - "provisioners/shell-vagrant/scripts/custom.sh" - ], - "type": "shell" - } - ] -} diff --git a/src/u/packer/template.json b/src/u/packer/template.json deleted file mode 100644 index b3ee82cc9..000000000 --- a/src/u/packer/template.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "min_packer_version": "1.6.0", - "variables": { - "name": "", - "description": "", - "version": "", - "author": "gusztavvargadr", - "output_directory": "output", - "download_directory": "{{env `HOME`}}/Downloads" - }, - "description": "{{user `description`}}", - "builders": [], - "provisioners": [], - "post-processors": [] -} \ No newline at end of file diff --git a/src/u2004/packer/builders/azure-marketplace/template.json b/src/u2004/packer/builders/azure-marketplace/template.json deleted file mode 100644 index 230b6864d..000000000 --- a/src/u2004/packer/builders/azure-marketplace/template.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variables": { - "azure_image_publisher": "Canonical", - "azure_image_offer": "UbuntuServer", - "azure_image_sku": "20.04-LTS" - } -} \ No newline at end of file diff --git a/src/u2004/packer/builders/iso/template.json b/src/u2004/packer/builders/iso/template.json deleted file mode 100644 index 9a3b3e3d4..000000000 --- a/src/u2004/packer/builders/iso/template.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variables": { - "iso_url_local": "{{user `download_directory`}}/ubuntu-20.04.1-legacy-server-amd64.iso", - "iso_url_remote": "https://cdimage.ubuntu.com/ubuntu-legacy-server/releases/20.04/release/ubuntu-20.04.1-legacy-server-amd64.iso", - "iso_checksum": "sha256:f11bda2f2caed8f420802b59f382c25160b114ccc665dbac9c5046e7fceaced2" - } -} \ No newline at end of file diff --git a/src/u2004/packer/template.json b/src/u2004/packer/template.json deleted file mode 100644 index 2c63c0851..000000000 --- a/src/u2004/packer/template.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} diff --git a/src/u2004d/packer/postprocessors/vagrant-hyperv/Vagrantfile b/src/u2004d/packer/postprocessors/vagrant-hyperv/Vagrantfile deleted file mode 100644 index f35958207..000000000 --- a/src/u2004d/packer/postprocessors/vagrant-hyperv/Vagrantfile +++ /dev/null @@ -1,6 +0,0 @@ -Vagrant.configure(2) do |config| - config.vm.provider 'hyperv' do |h| - h.cpus = 2 - h.memory = 4096 - end -end diff --git a/src/u2004d/packer/postprocessors/vagrant-virtualbox/Vagrantfile b/src/u2004d/packer/postprocessors/vagrant-virtualbox/Vagrantfile deleted file mode 100644 index 11704d3ce..000000000 --- a/src/u2004d/packer/postprocessors/vagrant-virtualbox/Vagrantfile +++ /dev/null @@ -1,8 +0,0 @@ -Vagrant.configure(2) do |config| - config.vm.provider 'virtualbox' do |vb| - vb.cpus = 2 - vb.memory = 4096 - end - - config.vm.network :forwarded_port, guest: 3389, host: 53389, auto_correct: true -end diff --git a/src/u2004d/packer/postprocessors/vagrant-vmware/Vagrantfile b/src/u2004d/packer/postprocessors/vagrant-vmware/Vagrantfile deleted file mode 100644 index 5cf6da05e..000000000 --- a/src/u2004d/packer/postprocessors/vagrant-vmware/Vagrantfile +++ /dev/null @@ -1,8 +0,0 @@ -Vagrant.configure(2) do |config| - config.vm.provider 'vmware_desktop' do |provider| - provider.cpus = 2 - provider.memory = 4096 - end - - config.vm.network :forwarded_port, guest: 3389, host: 53389, auto_correct: true -end diff --git a/src/u2004d/packer/provisioners/shell-install/scripts/custom.sh b/src/u2004d/packer/provisioners/shell-install/scripts/custom.sh deleted file mode 100644 index 3d68e6371..000000000 --- a/src/u2004d/packer/provisioners/shell-install/scripts/custom.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -eux - -DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get install -y xubuntu-desktop -echo /usr/sbin/lightdm > /etc/X11/default-display-manager -DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true dpkg-reconfigure lightdm - -apt-get install -y xrdp -systemctl enable xrdp -usermod -aG ssl-cert xrdp - -case "$PACKER_BUILDER_TYPE" in -vmware-iso) - apt-get -y install open-vm-tools-desktop; - - reboot -esac diff --git a/src/u2004d/packer/provisioners/shell-install/template.json b/src/u2004d/packer/provisioners/shell-install/template.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/src/u2004d/packer/provisioners/shell-install/template.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/src/u2004d/packer/provisioners/shell-vagrant/scripts/custom.sh b/src/u2004d/packer/provisioners/shell-vagrant/scripts/custom.sh deleted file mode 100644 index c32572342..000000000 --- a/src/u2004d/packer/provisioners/shell-vagrant/scripts/custom.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -eux - -echo "xfce4-session" > /home/vagrant/.xsession -chown vagrant:vagrant /home/vagrant/.xsession diff --git a/src/u2004d/packer/provisioners/shell-vagrant/template.json b/src/u2004d/packer/provisioners/shell-vagrant/template.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/src/u2004d/packer/provisioners/shell-vagrant/template.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/src/u2004d/packer/template.json b/src/u2004d/packer/template.json deleted file mode 100644 index f2eb0e06d..000000000 --- a/src/u2004d/packer/template.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variables": { - "name": "u2004d", - "description": "Ubuntu Desktop 20.04 LTS with Xfce" - } -} \ No newline at end of file diff --git a/src/u2004s/packer/template.json b/src/u2004s/packer/template.json deleted file mode 100644 index af4fec4a6..000000000 --- a/src/u2004s/packer/template.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variables": { - "name": "u2004s", - "description": "Ubuntu Server 20.04 LTS" - } -} \ No newline at end of file diff --git a/src/u/packer/builders/amazon/userdata.sh b/src/ubuntu/boot/hyperv/meta-data similarity index 100% rename from src/u/packer/builders/amazon/userdata.sh rename to src/ubuntu/boot/hyperv/meta-data diff --git a/src/ubuntu/boot/hyperv/user-data b/src/ubuntu/boot/hyperv/user-data new file mode 100644 index 000000000..236e00b73 --- /dev/null +++ b/src/ubuntu/boot/hyperv/user-data @@ -0,0 +1,27 @@ +#cloud-config +autoinstall: + version: 1 + storage: + layout: + name: lvm + sizing-policy: all + apt: + geoip: false + packages: + - linux-image-virtual + - linux-tools-virtual + - linux-cloud-tools-virtual + timezone: UTC + identity: + hostname: vagrant + realname: vagrant + username: vagrant + password: "$6$vagrant$aYdZwu4306HGdE39rROOrbSnB8G1Jser5zc9VMESSr8PouIZdgoO.OYQsFTOHXRXSYzB1oCD7571llAG6WR15." + ssh: + install-server: true + user-data: + users: + - name: vagrant + shell: /bin/bash + groups: sudo + sudo: ALL=(ALL) NOPASSWD:ALL diff --git a/src/w/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_w/recipes/install.rb b/src/ubuntu/boot/virtualbox/meta-data similarity index 100% rename from src/w/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_w/recipes/install.rb rename to src/ubuntu/boot/virtualbox/meta-data diff --git a/src/ubuntu/boot/virtualbox/user-data b/src/ubuntu/boot/virtualbox/user-data new file mode 100644 index 000000000..5f0802376 --- /dev/null +++ b/src/ubuntu/boot/virtualbox/user-data @@ -0,0 +1,23 @@ +#cloud-config +autoinstall: + version: 1 + storage: + layout: + name: lvm + sizing-policy: all + apt: + geoip: false + timezone: UTC + identity: + hostname: vagrant + realname: vagrant + username: vagrant + password: "$6$vagrant$aYdZwu4306HGdE39rROOrbSnB8G1Jser5zc9VMESSr8PouIZdgoO.OYQsFTOHXRXSYzB1oCD7571llAG6WR15." + ssh: + install-server: true + user-data: + users: + - name: vagrant + shell: /bin/bash + groups: sudo + sudo: ALL=(ALL) NOPASSWD:ALL diff --git a/src/ubuntu/boot/vmware/meta-data b/src/ubuntu/boot/vmware/meta-data new file mode 100644 index 000000000..e69de29bb diff --git a/src/ubuntu/boot/vmware/user-data b/src/ubuntu/boot/vmware/user-data new file mode 100644 index 000000000..a732b5791 --- /dev/null +++ b/src/ubuntu/boot/vmware/user-data @@ -0,0 +1,26 @@ +#cloud-config +autoinstall: + version: 1 + storage: + layout: + name: lvm + sizing-policy: all + apt: + geoip: false + packages: + - open-vm-tools + - open-vm-tools-desktop + timezone: UTC + identity: + hostname: vagrant + realname: vagrant + username: vagrant + password: "$6$vagrant$aYdZwu4306HGdE39rROOrbSnB8G1Jser5zc9VMESSr8PouIZdgoO.OYQsFTOHXRXSYzB1oCD7571llAG6WR15." + ssh: + install-server: true + user-data: + users: + - name: vagrant + shell: /bin/bash + groups: sudo + sudo: ALL=(ALL) NOPASSWD:ALL diff --git a/src/ubuntu/build.native.pkr.hcl b/src/ubuntu/build.native.pkr.hcl new file mode 100644 index 000000000..c4245d4b5 --- /dev/null +++ b/src/ubuntu/build.native.pkr.hcl @@ -0,0 +1,129 @@ +variable "userprofile_directory" { + type = string + default = env("USERPROFILE") +} + +variable "home_directory" { + type = string + default = env("HOME") +} + +locals { + native_iso_sources = { + virtualbox = "virtualbox-iso.core" + vmware = "vmware-iso.core" + hyperv = "hyperv-iso.core" + } + + native_import_sources = { + virtualbox = "virtualbox-ovf.core" + vmware = "vmware-vmx.core" + hyperv = "hyperv-vmcx.core" + } + + native_iso = contains(keys(local.image_options.native), "source_iso_checksum") + downloads_directory = "${coalesce(var.userprofile_directory, var.home_directory)}/Downloads" + + source_options_native = { + iso_urls = local.native_iso ? [ + "${local.downloads_directory}/${local.image_options.native.source_iso_url_local}", + local.image_options.native.source_iso_url_remote + ] : [] + iso_checksum = local.native_iso ? local.image_options.native.source_iso_checksum : "" + http_directory = "${path.root}/boot" + + import_directory = local.native_build ? "${path.cwd}/../../artifacts/${lookup(local.image_options.native, "source_image", "")}/${local.image_provider}/native" : "" + + boot_command = local.native_iso ? [ + "c", + "set gfxpayload=keep", + "linux /casper/vmlinuz quiet autoinstall 'ds=nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/${local.image_provider}/'", + "initrd /casper/initrd", + "bootwait>", + ] : [] + shutdown_command = "sudo -S shutdown -P now" + } +} + +build { + name = "native-restore" + + sources = ["null.core"] + + provisioner "shell-local" { + inline = [ + "chef install --chef-license accept-silent", + "chef update --attributes", + "chef export ${local.artifacts_directory}/chef --force" + ] + } +} + +locals { + chef_destination = "/var/tmp/packer-build/chef/" + chef_max_retries = 10 + chef_start_retry_timeout = "30m" + chef_attributes = lookup(local.image_options.native, "chef_attributes", "") + chef_keep = lookup(local.image_options.native, "chef_keep", "false") +} + +build { + name = "native-build" + + sources = local.native_build ? (local.native_iso ? compact([lookup(local.native_iso_sources, local.image_provider, "")]) : compact([lookup(local.native_import_sources, local.image_provider, "")])) : ["null.core"] + + provisioner "shell" { + script = "${path.root}/chef/initialize.sh" + } + + provisioner "file" { + source = "${local.artifacts_directory}/chef/" + destination = local.chef_destination + } + + provisioner "file" { + sources = fileset(path.cwd, "attributes.*.json") + destination = local.chef_destination + } + + provisioner "shell" { + script = "${path.root}/chef/apply.sh" + max_retries = local.chef_max_retries + pause_before = "90s" + start_retry_timeout = local.chef_start_retry_timeout + + env = { + CHEF_ATTRIBUTES = local.chef_attributes + } + } + + provisioner "shell" { + script = "${path.root}/chef/cleanup.sh" + expect_disconnect = true + + env = { + CHEF_KEEP = local.chef_keep + } + } + + post-processor "manifest" { + output = "${local.artifacts_directory}/manifest.json" + } + + post-processor "checksum" { + checksum_types = ["sha256"] + output = "${local.artifacts_directory}/checksum.{{ .ChecksumType }}" + } +} + +build { + name = "native-test" + + sources = ["null.core"] +} + +build { + name = "native-publish" + + sources = ["null.core"] +} diff --git a/src/ubuntu/build.vagrant.pkr.hcl b/src/ubuntu/build.vagrant.pkr.hcl new file mode 100644 index 000000000..654c1a1bd --- /dev/null +++ b/src/ubuntu/build.vagrant.pkr.hcl @@ -0,0 +1,169 @@ +packer { + required_plugins { + vagrant = { + version = "~> 1.1" + source = "github.com/hashicorp/vagrant" + } + } +} + +locals { + vagrant_import_sources = { + virtualbox = "virtualbox-ovf.core" + vmware = "vmware-vmx.core" + hyperv = "hyperv-vmcx.core" + } + + source_options_vagrant = { + iso_urls = [] + iso_checksum = "" + http_directory = "" + + import_directory = local.vagrant_build ? "${local.artifacts_directory}/../native" : "" + + boot_command = compact([]) + shutdown_command = "sudo -S shutdown -P now" + } + + vagrant_providers = { + virtualbox = "virtualbox" + vmware = "vmware_desktop" + hyperv = "hyperv" + } +} + +locals { + vagrant_options_core = { + cpus = "2" + memory = "2048" + ports = "" + architecture = "amd64" + } + vagrant_options_image = lookup(local.image_options, "vagrant", {}) + vagrant_options = merge(local.vagrant_options_core, local.vagrant_options_image) +} + +source "file" "Vagrantfile" { + content = templatefile("${path.root}/vagrant/template.Vagrantfile", { options = local.vagrant_options }) + target = "${local.artifacts_directory}/Vagrantfile" +} + +build { + name = "vagrant-restore" + + sources = ["file.Vagrantfile"] +} + +build { + name = "vagrant-build" + + sources = local.vagrant_build ? compact([lookup(local.vagrant_import_sources, local.image_provider, "")]) : ["null.core"] + + provisioner "shell" { + environment_vars = [ + "HOME_DIR=/home/vagrant" + ] + execute_command = "{{.Vars}} sudo -S -E bash -eux '{{.Path}}'" + expect_disconnect = true + scripts = [ + "${path.root}/vagrant/vagrant.sh" + ] + } + + post-processors { + post-processor "vagrant" { + vagrantfile_template = "${local.artifacts_directory}/Vagrantfile" + output = "${local.artifacts_directory}/vagrant/vagrant.box" + } + + post-processor "manifest" { + output = "${local.artifacts_directory}/manifest.json" + } + + post-processor "checksum" { + checksum_types = ["sha256"] + output = "${local.artifacts_directory}/checksum.{{ .ChecksumType }}" + } + } +} + +build { + name = "vagrant-test" + + sources = ["null.core"] + + provisioner "shell-local" { + inline = [ + "vagrant destroy -f ${var.image}", + ] + + valid_exit_codes = [0, 1] + + env = { + VAGRANT_BOX_URL = "${local.artifacts_directory}/vagrant/vagrant.box" + } + } + + provisioner "shell-local" { + inline = [ + "vagrant up ${var.image} --provider ${lookup(local.vagrant_providers, local.image_provider, "")}", + ] + + max_retries = 1 + + env = { + VAGRANT_BOX_URL = "${local.artifacts_directory}/vagrant/vagrant.box" + } + } + + provisioner "shell-local" { + inline = [ + "vagrant destroy -f ${var.image}", + ] + + valid_exit_codes = [0, 1] + + env = { + VAGRANT_BOX_URL = "${local.artifacts_directory}/vagrant/vagrant.box" + } + } +} + +build { + name = "vagrant-publish" + + sources = ["null.core"] + + post-processors { + post-processor "artifice" { + files = ["${local.artifacts_directory}/vagrant/vagrant.box"] + } + + post-processor "vagrant-cloud" { + box_tag = "${local.image_author}/${lookup(local.vagrant_options, "box_name", replace(local.image_name, "/", "-"))}" + version = local.image_version + box_checksum = "sha256:${split("\t", file("${local.artifacts_directory}/checksum.sha256"))[0]}" + architecture = local.vagrant_options.architecture + default_architecture = local.vagrant_options.architecture + } + } + + dynamic "post-processors" { + for_each = compact([lookup(local.vagrant_options, "box_alias", "")]) + + content { + post-processor "artifice" { + files = ["${local.artifacts_directory}/vagrant/vagrant.box"] + } + + post-processor "vagrant-cloud" { + box_tag = "${local.image_author}/${post-processors.value}" + version = local.image_version + box_download_url = "https://app.vagrantup.com/${local.image_author}/boxes/${lookup(local.vagrant_options, "box_name", replace(local.image_name, "/", "-"))}/versions/${local.image_version}/providers/${lookup(local.vagrant_providers, local.image_provider, "")}/${local.vagrant_options.architecture}/vagrant.box" + box_checksum = "sha256:${split("\t", file("${local.artifacts_directory}/checksum.sha256"))[0]}" + architecture = local.vagrant_options.architecture + default_architecture = local.vagrant_options.architecture + } + } + } +} diff --git a/src/ubuntu/chef/Policyfile.rb b/src/ubuntu/chef/Policyfile.rb new file mode 100644 index 000000000..3dcde83c2 --- /dev/null +++ b/src/ubuntu/chef/Policyfile.rb @@ -0,0 +1,6 @@ +require "#{File.dirname(__FILE__)}/../../../lib/gusztavvargadr/chef/src/Policyfile" + +def gusztavvargadr_packer_ubuntu_sources + gusztavvargadr_chef_sources + default_source :chef_repo, "#{File.dirname(__FILE__)}/cookbooks" +end diff --git a/src/ubuntu/chef/apply.sh b/src/ubuntu/chef/apply.sh new file mode 100644 index 000000000..cd3b7ae0c --- /dev/null +++ b/src/ubuntu/chef/apply.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -euo pipefail + +cd /var/tmp/packer-build/chef + +RUN_OPTIONS="--local-mode" +if ! [ -z ${CHEF_ATTRIBUTES} ]; then + RUN_OPTIONS="${RUN_OPTIONS} --json-attributes attributes.${CHEF_ATTRIBUTES}.json" +fi + +sudo CHEF_LICENSE="accept-silent" chef-client ${RUN_OPTIONS} diff --git a/src/ubuntu/chef/cleanup.sh b/src/ubuntu/chef/cleanup.sh new file mode 100644 index 000000000..c2a35b783 --- /dev/null +++ b/src/ubuntu/chef/cleanup.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash + +set -eux + +dpkg --list \ + | awk '{ print $2 }' \ + | grep 'linux-image-.*-generic' \ + | grep -v `uname -r` \ + | sudo xargs apt-get -y purge; + +# Delete Linux source +dpkg --list \ + | awk '{ print $2 }' \ + | grep linux-source \ + | sudo xargs apt-get -y purge; + +# Delete development packages +dpkg --list \ + | awk '{ print $2 }' \ + | grep -- '-dev\(:[a-z0-9]\+\)\?$' \ + | sudo xargs apt-get -y purge; + +# delete docs packages +dpkg --list \ + | awk '{ print $2 }' \ + | grep -- '-doc$' \ + | sudo xargs apt-get -y purge; + +if [ "${CHEF_KEEP}" != "true" ]; then + sudo apt-mark unhold chef + sudo apt-get -y purge chef +fi + +sudo apt-get -y autoremove; +sudo apt-get -y clean; + +# Remove caches +sudo find /var/cache -type f -exec rm -rf {} \; + +# delete any logs that have built up during the install +sudo find /var/log -type f -exec truncate --size=0 {} \; + +# Whiteout root +count=$(df --sync -kP / | tail -n1 | awk -F ' ' '{print $4}') +count=$(($count-1)) +sudo dd if=/dev/zero of=/tmp/whitespace bs=1M count=$count || echo "dd exit code $? is suppressed"; +sudo rm /tmp/whitespace + +# Whiteout /boot +count=$(df --sync -kP /boot | tail -n1 | awk -F ' ' '{print $4}') +count=$(($count-1)) +sudo dd if=/dev/zero of=/boot/whitespace bs=1M count=$count || echo "dd exit code $? is suppressed"; +sudo rm /boot/whitespace + +set +e +swapuuid="`/sbin/blkid -o value -l -s UUID -t TYPE=swap`"; +case "$?" in + 2|0) ;; + *) exit 1 ;; +esac +set -e + +if [ "x${swapuuid}" != "x" ]; then + # Whiteout the swap partition to reduce box size + # Swap is disabled till reboot + swappart="`readlink -f /dev/disk/by-uuid/$swapuuid`"; + sudo /sbin/swapoff "$swappart"; + sudo dd if=/dev/zero of="$swappart" bs=1M || echo "dd exit code $? is suppressed"; + sudo /sbin/mkswap -U "$swapuuid" "$swappart"; +fi + +sudo sync; diff --git a/src/ubuntu/chef/cookbooks/gusztavvargadr_packer_ubuntu/metadata.rb b/src/ubuntu/chef/cookbooks/gusztavvargadr_packer_ubuntu/metadata.rb new file mode 100644 index 000000000..0b3dd7ab4 --- /dev/null +++ b/src/ubuntu/chef/cookbooks/gusztavvargadr_packer_ubuntu/metadata.rb @@ -0,0 +1,11 @@ +name 'gusztavvargadr_packer_ubuntu' +description 'Installs/Configures Packer Ubuntu' +license 'Unlicense' +maintainer 'Gusztáv Varga' +maintainer_email 'mail@gusztavvargadr.me' + +version '0.0.0' +depends 'gusztavvargadr_ubuntu' + +chef_version '>= 18.0' +supports 'ubuntu' diff --git a/src/ubuntu/chef/cookbooks/gusztavvargadr_packer_ubuntu/recipes/apply.rb b/src/ubuntu/chef/cookbooks/gusztavvargadr_packer_ubuntu/recipes/apply.rb new file mode 100644 index 000000000..907ce4c73 --- /dev/null +++ b/src/ubuntu/chef/cookbooks/gusztavvargadr_packer_ubuntu/recipes/apply.rb @@ -0,0 +1,47 @@ +bash 'update' do + code <<-EOH +export DEBIAN_FRONTEND=noninteractive + +# Disable release-upgrades +sed -i.bak 's/^Prompt=.*$/Prompt=never/' /etc/update-manager/release-upgrades; + +# Disable systemd apt timers/services +systemctl stop apt-daily.timer; +systemctl stop apt-daily-upgrade.timer; +systemctl disable apt-daily.timer; +systemctl disable apt-daily-upgrade.timer; +systemctl mask apt-daily.service; +systemctl mask apt-daily-upgrade.service; +systemctl daemon-reload; + +# Disable periodic activities of apt to be safe +cat </etc/apt/apt.conf.d/10periodic; + APT::Periodic::Enable "0"; + APT::Periodic::Update-Package-Lists "0"; + APT::Periodic::Download-Upgradeable-Packages "0"; + APT::Periodic::AutocleanInterval "0"; + APT::Periodic::Unattended-Upgrade "0"; +EOF + +# Clean and nuke the package from orbit +rm -rf /var/log/unattended-upgrades; +apt-get -y purge unattended-upgrades ubuntu-release-upgrader-core; + +echo "update the package list" +apt-get -y update; + +# Upgrade all installed packages incl. kernel and kernel headers +apt-get -y dist-upgrade -o Dpkg::Options::="--force-confnew"; +EOH + action :run +end + +apt_package [ 'net-tools', 'apt-transport-https', 'ntp', 'rsync', 'cifs-utils', 'nfs-common', 'perl', 'software-properties-common', 'ifupdown', 'build-essential' ] do + action :upgrade +end + +reboot 'gusztavvargadr_packer_ubuntu::apply' do + delay_mins 1 + action :reboot_now + only_if { reboot_pending? } +end diff --git a/src/ubuntu/chef/cookbooks/gusztavvargadr_packer_ubuntu/recipes/cleanup.rb b/src/ubuntu/chef/cookbooks/gusztavvargadr_packer_ubuntu/recipes/cleanup.rb new file mode 100644 index 000000000..22c2c429b --- /dev/null +++ b/src/ubuntu/chef/cookbooks/gusztavvargadr_packer_ubuntu/recipes/cleanup.rb @@ -0,0 +1,5 @@ +reboot 'gusztavvargadr_packer_ubuntu::cleanup' do + delay_mins 1 + action :reboot_now + only_if { reboot_pending? } +end diff --git a/src/ubuntu/chef/cookbooks/gusztavvargadr_packer_ubuntu/recipes/default.rb b/src/ubuntu/chef/cookbooks/gusztavvargadr_packer_ubuntu/recipes/default.rb new file mode 100644 index 000000000..d0273db82 --- /dev/null +++ b/src/ubuntu/chef/cookbooks/gusztavvargadr_packer_ubuntu/recipes/default.rb @@ -0,0 +1,3 @@ +include_recipe 'gusztavvargadr_packer_ubuntu::initialize' +include_recipe 'gusztavvargadr_packer_ubuntu::apply' +include_recipe 'gusztavvargadr_packer_ubuntu::cleanup' diff --git a/src/ubuntu/chef/cookbooks/gusztavvargadr_packer_ubuntu/recipes/initialize.rb b/src/ubuntu/chef/cookbooks/gusztavvargadr_packer_ubuntu/recipes/initialize.rb new file mode 100644 index 000000000..45c153629 --- /dev/null +++ b/src/ubuntu/chef/cookbooks/gusztavvargadr_packer_ubuntu/recipes/initialize.rb @@ -0,0 +1,111 @@ +apt_update '' do + action :update +end + +if vbox? + vbox_version = (shell_out('VBoxControl -v').stdout rescue '').strip + + unless vbox_version.include?('6.') + apt_package [ 'build-essential', 'cryptsetup', 'libssl-dev', 'libreadline-dev', 'zlib1g-dev', 'linux-source', 'dkms', 'linux-headers-generic' ] do + action :upgrade + notifies :run, 'bash[guest-additions]', :immediately + notifies :request_reboot, 'reboot[gusztavvargadr_packer_ubuntu]', :immediately + end + + bash 'guest-additions' do + code <<-EOH + VER="`cat /home/vagrant/.vbox_version`"; + ISO="VBoxGuestAdditions_$VER.iso"; + wget http://download.virtualbox.org/virtualbox/$VER/$ISO + mkdir -p /tmp/vbox; + mount -o loop $ISO /tmp/vbox; + sh /tmp/vbox/VBoxLinuxAdditions.run \ + || echo "VBoxLinuxAdditions.run exited $? and is suppressed." \ + "For more read https://www.virtualbox.org/ticket/12479"; + umount /tmp/vbox; + rm -rf /tmp/vbox; + rm -f *.iso; +EOH + action :nothing + end + end +end + +if vmware? + vmware_version = (shell_out('vmware-toolbox-cmd -v').stdout rescue '').strip + + unless vmware_version.include?('12.') + apt_package [ 'open-vm-tools', 'open-vm-tools-desktop' ] do + action :upgrade + notifies :request_reboot, 'reboot[gusztavvargadr_packer_ubuntu]', :immediately + end + end +end + +if !vbox? && !vmware? + apt_package [ 'linux-image-virtual', 'linux-tools-virtual', 'linux-cloud-tools-virtual' ] do + action :upgrade + notifies :request_reboot, 'reboot[gusztavvargadr_packer_ubuntu]', :immediately + end + + apt_package [ 'linux-tools-generic', 'linux-cloud-tools-generic' ] do + action :upgrade + end +end + +bash 'sshd' do + code <<-EOH + SSHD_CONFIG="/etc/ssh/sshd_config" + + # ensure that there is a trailing newline before attempting to concatenate + sed -i -e '$a\' "$SSHD_CONFIG" + + USEDNS="UseDNS no" + if grep -q -E "^[[:space:]]*UseDNS" "$SSHD_CONFIG"; then + sed -i "s/^\s*UseDNS.*/${USEDNS}/" "$SSHD_CONFIG" + else + echo "$USEDNS" >>"$SSHD_CONFIG" + fi + + GSSAPI="GSSAPIAuthentication no" + if grep -q -E "^[[:space:]]*GSSAPIAuthentication" "$SSHD_CONFIG"; then + sed -i "s/^\s*GSSAPIAuthentication.*/${GSSAPI}/" "$SSHD_CONFIG" + else + echo "$GSSAPI" >>"$SSHD_CONFIG" + fi +EOH + action :run +end + + +file '/etc/netplan/01-netcfg.yaml' do + content <<-EOH + network: + version: 2 + ethernets: + eth0: + dhcp4: true +EOH + action :create + notifies :run, 'bash[netcfg]', :immediately +end + +bash 'netcfg' do + code <<-EOH + sed -i 's/GRUB_CMDLINE_LINUX="\\(.*\\)"/GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0 \\1"/g' /etc/default/grub + sed -i "/recordfail_broken=/{s/1/0/}" /etc/grub.d/00_header + update-grub +EOH + action :nothing + notifies :request_reboot, 'reboot[gusztavvargadr_packer_ubuntu]', :immediately +end + +reboot 'gusztavvargadr_packer_ubuntu' do + action :nothing +end + +reboot 'gusztavvargadr_packer_ubuntu::initialize' do + delay_mins 1 + action :reboot_now + only_if { reboot_pending? } +end diff --git a/src/ubuntu/chef/initialize.sh b/src/ubuntu/chef/initialize.sh new file mode 100644 index 000000000..522eed826 --- /dev/null +++ b/src/ubuntu/chef/initialize.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +set -euo pipefail + +mkdir -p /var/tmp/packer-build/chef + +if ! [ -x "$(command -v chef-client)" ]; then + curl -Ls https://omnitruck.chef.io/install.sh | sudo bash -s -- -P chef -v 18.3.0 + sudo apt-mark hold chef +fi +chef-client --version + +sudo lvextend -l +100%FREE -r /dev/mapper/ubuntu--vg-ubuntu--lv + +sudo shutdown --reboot +1 diff --git a/src/ubuntu/core.pkr.hcl b/src/ubuntu/core.pkr.hcl new file mode 100644 index 000000000..2971b7158 --- /dev/null +++ b/src/ubuntu/core.pkr.hcl @@ -0,0 +1,40 @@ +packer { + required_version = "~> 1.9" +} + +variable "author" { + type = string +} + +variable "version" { + type = string +} + +variable "images" { + type = map(map(map(string))) +} + +variable "image" { + type = string +} + +variable "provider" { + type = string +} + +variable "build" { + type = string +} + +locals { + image_options = var.images[var.image] + + image_author = var.author + image_name = "${basename(path.cwd)}/${var.image}" + image_description = local.image_options.core.image_description + image_version = "${local.image_options.core.image_version}.${var.version}" + image_provider = var.provider + image_build = var.build + + artifacts_directory = "${path.cwd}/../../artifacts/${local.image_name}/${local.image_provider}/${var.build}" +} diff --git a/src/ubuntu/source.amazon-ebs.pkr.hcl b/src/ubuntu/source.amazon-ebs.pkr.hcl new file mode 100644 index 000000000..80241c4e8 --- /dev/null +++ b/src/ubuntu/source.amazon-ebs.pkr.hcl @@ -0,0 +1,58 @@ +packer { + required_plugins { + amazon = { + version = "~> 1.2" + source = "github.com/hashicorp/amazon" + } + } +} + +source "amazon-ebs" "core" { + ami_name = local.vm_name + + spot_price = "auto" + spot_instance_types = ["t3.xlarge"] + + ebs_optimized = true + + launch_block_device_mappings { + device_name = "/dev/sda1" + volume_size = "31" + volume_type = "gp3" + delete_on_termination = true + } + + source_ami_filter { + filters = { + // name = "Windows_Server-2022-English-Full-Base-*" + virtualization-type = "hvm" + root-device-type = "ebs" + } + + owners = ["amazon"] + + most_recent = true + } + + // user_data = "\r\n${file("${path.root}/boot/autounattend-first-logon.ps1")}\r\n" + + tags = { + "Name" = local.vm_name + "packer" = "" + } + + run_tags = { + "Name" = local.vm_name + "packer" = "" + } + + spot_tags = { + "Name" = local.vm_name + "packer" = "" + } + + communicator = local.communicator.type + ssh_username = local.communicator.username + ssh_password = local.communicator.password + ssh_timeout = local.communicator.timeout +} diff --git a/src/ubuntu/source.core.pkr.hcl b/src/ubuntu/source.core.pkr.hcl new file mode 100644 index 000000000..a178f4b90 --- /dev/null +++ b/src/ubuntu/source.core.pkr.hcl @@ -0,0 +1,34 @@ +locals { + timestamp = "${formatdate("YYYYMMDD'-'hhmmss", timestamp())}" + + source_options_core = { + vm_name = "packer-${local.timestamp}" + headless = true + output_directory = "${local.artifacts_directory}/image" + + cpus = 4 + memory = 8192 + disk_size = 130048 + + boot_wait = "2s" + shutdown_timeout = "5m" + } + + communicator = { + type = "ssh" + username = "vagrant" + password = "vagrant" + timeout = "15m" + } + + native_build = local.image_build == "native" + vagrant_build = local.image_build == "vagrant" +} + +locals { + source_options_build = merge(local.source_options_core, local.native_build ? local.source_options_native : local.source_options_vagrant) +} + +source "null" "core" { + communicator = "none" +} diff --git a/src/ubuntu/source.hyperv.pkr.hcl b/src/ubuntu/source.hyperv.pkr.hcl new file mode 100644 index 000000000..494ef5705 --- /dev/null +++ b/src/ubuntu/source.hyperv.pkr.hcl @@ -0,0 +1,97 @@ +packer { + required_plugins { + hyperv = { + version = "~> 1.1" + source = "github.com/hashicorp/hyperv" + } + } +} + +variable "hyperv_switch" { + type = string + default = "Default Switch" +} + +locals { + hyperv_source_options = { + generation = 2 + configuration_version = "9.0" + enable_virtualization_extensions = false + enable_dynamic_memory = false + enable_secure_boot = false + switch_name = var.hyperv_switch + enable_mac_spoofing = true + disk_block_size = "1" + guest_additions_mode = "disable" + } +} + +locals { + hyperv_iso_source_options = merge(local.source_options_build, local.hyperv_source_options, lookup(local.image_options, "hyperv", {})) +} + +source "hyperv-iso" "core" { + vm_name = local.hyperv_iso_source_options.vm_name + headless = local.hyperv_iso_source_options.headless + output_directory = local.hyperv_iso_source_options.output_directory + + cpus = local.hyperv_iso_source_options.cpus + memory = local.hyperv_iso_source_options.memory + disk_size = local.hyperv_iso_source_options.disk_size + iso_urls = local.hyperv_iso_source_options.iso_urls + iso_checksum = local.hyperv_iso_source_options.iso_checksum + http_directory = local.hyperv_iso_source_options.http_directory + + generation = local.hyperv_iso_source_options.generation + configuration_version = local.hyperv_iso_source_options.configuration_version + enable_virtualization_extensions = local.hyperv_iso_source_options.enable_virtualization_extensions + enable_dynamic_memory = local.hyperv_iso_source_options.enable_dynamic_memory + enable_secure_boot = local.hyperv_iso_source_options.enable_secure_boot + switch_name = local.hyperv_iso_source_options.switch_name + enable_mac_spoofing = local.hyperv_iso_source_options.enable_mac_spoofing + disk_block_size = local.hyperv_iso_source_options.disk_block_size + guest_additions_mode = local.hyperv_iso_source_options.guest_additions_mode + + boot_command = local.hyperv_iso_source_options.boot_command + boot_wait = local.hyperv_iso_source_options.boot_wait + shutdown_command = local.hyperv_iso_source_options.shutdown_command + shutdown_timeout = local.hyperv_iso_source_options.shutdown_timeout + + communicator = local.communicator.type + ssh_username = local.communicator.username + ssh_password = local.communicator.password + ssh_timeout = local.communicator.timeout +} + +locals { + hyperv_vmcx_source_options = merge(local.source_options_build, local.hyperv_source_options, lookup(local.image_options, "hyperv", {})) +} + +source "hyperv-vmcx" "core" { + vm_name = local.hyperv_vmcx_source_options.vm_name + headless = local.hyperv_vmcx_source_options.headless + output_directory = local.hyperv_vmcx_source_options.output_directory + + cpus = local.hyperv_vmcx_source_options.cpus + memory = local.hyperv_vmcx_source_options.memory + clone_from_vmcx_path = "${local.hyperv_vmcx_source_options.import_directory}/${join("", fileset(local.hyperv_vmcx_source_options.import_directory, "**/*.vmcx"))}" + + generation = local.hyperv_vmcx_source_options.generation + configuration_version = local.hyperv_vmcx_source_options.configuration_version + enable_virtualization_extensions = local.hyperv_vmcx_source_options.enable_virtualization_extensions + enable_dynamic_memory = local.hyperv_vmcx_source_options.enable_dynamic_memory + enable_secure_boot = local.hyperv_vmcx_source_options.enable_secure_boot + switch_name = local.hyperv_vmcx_source_options.switch_name + enable_mac_spoofing = local.hyperv_vmcx_source_options.enable_mac_spoofing + guest_additions_mode = local.hyperv_iso_source_options.guest_additions_mode + + boot_command = local.hyperv_vmcx_source_options.boot_command + boot_wait = local.hyperv_vmcx_source_options.boot_wait + shutdown_command = local.hyperv_vmcx_source_options.shutdown_command + shutdown_timeout = local.hyperv_vmcx_source_options.shutdown_timeout + + communicator = local.communicator.type + ssh_username = local.communicator.username + ssh_password = local.communicator.password + ssh_timeout = local.communicator.timeout +} diff --git a/src/ubuntu/source.virtualbox.pkr.hcl b/src/ubuntu/source.virtualbox.pkr.hcl new file mode 100644 index 000000000..2d7d4d83a --- /dev/null +++ b/src/ubuntu/source.virtualbox.pkr.hcl @@ -0,0 +1,79 @@ +packer { + required_plugins { + virtualbox = { + version = "~> 1.0" + source = "github.com/hashicorp/virtualbox" + } + } +} + +locals { + virtualbox_source_options = { + guest_additions_mode = "disable" + firmware = "efi" + nested_virt = false + hard_drive_interface = "sata" + gfx_controller = "vmsvga" + gfx_vram_size = 64 + post_shutdown_delay = "5s" + } +} + +locals { + virtualbox_iso_source_options = merge(local.source_options_build, local.virtualbox_source_options, lookup(local.image_options, "virtualbox", {})) +} + +source "virtualbox-iso" "core" { + vm_name = local.virtualbox_iso_source_options.vm_name + headless = local.virtualbox_iso_source_options.headless + output_directory = local.virtualbox_iso_source_options.output_directory + + cpus = local.virtualbox_iso_source_options.cpus + memory = local.virtualbox_iso_source_options.memory + disk_size = local.virtualbox_iso_source_options.disk_size + iso_urls = local.virtualbox_iso_source_options.iso_urls + iso_checksum = local.virtualbox_iso_source_options.iso_checksum + http_directory = local.virtualbox_iso_source_options.http_directory + + guest_os_type = local.virtualbox_iso_source_options.guest_os_type + guest_additions_mode = local.virtualbox_iso_source_options.guest_additions_mode + firmware = local.virtualbox_iso_source_options.firmware + nested_virt = local.virtualbox_iso_source_options.nested_virt + hard_drive_interface = local.virtualbox_iso_source_options.hard_drive_interface + gfx_controller = local.virtualbox_iso_source_options.gfx_controller + gfx_vram_size = local.virtualbox_iso_source_options.gfx_vram_size + + boot_command = local.virtualbox_iso_source_options.boot_command + boot_wait = local.virtualbox_iso_source_options.boot_wait + shutdown_command = local.virtualbox_iso_source_options.shutdown_command + shutdown_timeout = local.virtualbox_iso_source_options.shutdown_timeout + + communicator = local.communicator.type + ssh_username = local.communicator.username + ssh_password = local.communicator.password + ssh_timeout = local.communicator.timeout +} + +locals { + virtualbox_ovf_source_options = merge(local.source_options_build, local.virtualbox_source_options, lookup(local.image_options, "virtualbox", {})) +} + +source "virtualbox-ovf" "core" { + vm_name = local.virtualbox_ovf_source_options.vm_name + headless = local.virtualbox_ovf_source_options.headless + output_directory = local.virtualbox_ovf_source_options.output_directory + + source_path = "${local.virtualbox_ovf_source_options.import_directory}/${join("", fileset(local.virtualbox_ovf_source_options.import_directory, "**/*.ovf"))}" + + guest_additions_mode = local.virtualbox_ovf_source_options.guest_additions_mode + + boot_command = local.virtualbox_ovf_source_options.boot_command + boot_wait = local.virtualbox_ovf_source_options.boot_wait + shutdown_command = local.virtualbox_ovf_source_options.shutdown_command + shutdown_timeout = local.virtualbox_ovf_source_options.shutdown_timeout + + communicator = local.communicator.type + ssh_username = local.communicator.username + ssh_password = local.communicator.password + ssh_timeout = local.communicator.timeout +} diff --git a/src/ubuntu/source.vmware.pkr.hcl b/src/ubuntu/source.vmware.pkr.hcl new file mode 100644 index 000000000..855a0854c --- /dev/null +++ b/src/ubuntu/source.vmware.pkr.hcl @@ -0,0 +1,79 @@ +packer { + required_plugins { + vmware = { + version = "~> 1.0" + source = "github.com/hashicorp/vmware" + } + } +} + +locals { + vmware_source_options = { + version = 20 + disk_type_id = 0 + disk_adapter_type = "nvme" + vmx_data = { + firmware = "efi" + "vhv.enable" = "FALSE" + } + vmx_remove_ethernet_interfaces = local.native_build ? false : true + } +} + +locals { + vmware_iso_source_options = merge(local.source_options_build, local.vmware_source_options, lookup(local.image_options, "vmware", {})) +} + +source "vmware-iso" "core" { + vm_name = local.vmware_iso_source_options.vm_name + headless = local.vmware_iso_source_options.headless + output_directory = local.vmware_iso_source_options.output_directory + + cpus = local.vmware_iso_source_options.cpus + memory = local.vmware_iso_source_options.memory + disk_size = local.vmware_iso_source_options.disk_size + iso_urls = local.vmware_iso_source_options.iso_urls + iso_checksum = local.vmware_iso_source_options.iso_checksum + http_directory = local.vmware_iso_source_options.http_directory + + version = local.vmware_iso_source_options.version + guest_os_type = local.vmware_iso_source_options.guest_os_type + disk_type_id = local.vmware_iso_source_options.disk_type_id + disk_adapter_type = local.vmware_iso_source_options.disk_adapter_type + vmx_data = local.vmware_iso_source_options.vmx_data + vmx_remove_ethernet_interfaces = local.vmware_iso_source_options.vmx_remove_ethernet_interfaces + + boot_command = local.vmware_iso_source_options.boot_command + boot_wait = local.vmware_iso_source_options.boot_wait + shutdown_command = local.vmware_iso_source_options.shutdown_command + shutdown_timeout = local.vmware_iso_source_options.shutdown_timeout + + communicator = local.communicator.type + ssh_username = local.communicator.username + ssh_password = local.communicator.password + ssh_timeout = local.communicator.timeout +} + +locals { + vmware_vmx_source_options = merge(local.source_options_build, local.vmware_source_options, lookup(local.image_options, "vmware", {})) +} + +source "vmware-vmx" "core" { + vm_name = local.vmware_vmx_source_options.vm_name + headless = local.vmware_vmx_source_options.headless + output_directory = local.vmware_vmx_source_options.output_directory + + source_path = "${local.vmware_vmx_source_options.import_directory}/${join("", fileset(local.vmware_vmx_source_options.import_directory, "**/*.vmx"))}" + + vmx_remove_ethernet_interfaces = local.vmware_vmx_source_options.vmx_remove_ethernet_interfaces + + boot_command = local.vmware_vmx_source_options.boot_command + boot_wait = local.vmware_vmx_source_options.boot_wait + shutdown_command = local.vmware_vmx_source_options.shutdown_command + shutdown_timeout = local.vmware_vmx_source_options.shutdown_timeout + + communicator = local.communicator.type + ssh_username = local.communicator.username + ssh_password = local.communicator.password + ssh_timeout = local.communicator.timeout +} diff --git a/src/ubuntu/vagrant/template.Vagrantfile b/src/ubuntu/vagrant/template.Vagrantfile new file mode 100644 index 000000000..dbe08f0e2 --- /dev/null +++ b/src/ubuntu/vagrant/template.Vagrantfile @@ -0,0 +1,24 @@ +Vagrant.configure(2) do |config| + config.vm.provider 'virtualbox' do |provider, override| + provider.cpus = ${options.cpus} + provider.memory = ${options.memory} + +%{ for port in compact(split(",", options.ports)) ~} + override.vm.network :forwarded_port, guest: ${port}, host: ${50000 + port}, auto_correct: true +%{ endfor ~} + end + + config.vm.provider 'vmware_desktop' do |provider, override| + provider.cpus = ${options.cpus} + provider.memory = ${options.memory} + +%{ for port in compact(split(",", options.ports)) ~} + override.vm.network :forwarded_port, guest: ${port}, host: ${50000 + port}, auto_correct: true +%{ endfor ~} + end + + config.vm.provider 'hyperv' do |provider, _override| + provider.cpus = ${options.cpus} + provider.memory = ${options.memory} + end +end diff --git a/src/u/packer/provisioners/shell-vagrant/scripts/vagrant.sh b/src/ubuntu/vagrant/vagrant.sh similarity index 89% rename from src/u/packer/provisioners/shell-vagrant/scripts/vagrant.sh rename to src/ubuntu/vagrant/vagrant.sh index f5f217564..0862357e5 100644 --- a/src/u/packer/provisioners/shell-vagrant/scripts/vagrant.sh +++ b/src/ubuntu/vagrant/vagrant.sh @@ -2,7 +2,7 @@ case "$PACKER_BUILDER_TYPE" in virtualbox-ovf|hyperv-vmcx|vmware-vmx) - pubkey_url="https://raw.githubusercontent.com/hashicorp/vagrant/master/keys/vagrant.pub"; + pubkey_url="https://raw.githubusercontent.com/hashicorp/vagrant/main/keys/vagrant.pub"; mkdir -p $HOME_DIR/.ssh; if command -v wget >/dev/null 2>&1; then wget --no-check-certificate "$pubkey_url" -O $HOME_DIR/.ssh/authorized_keys; @@ -18,8 +18,8 @@ virtualbox-ovf|hyperv-vmcx|vmware-vmx) echo "blank netplan machine-id (DUID) so machines get unique ID generated on boot" truncate -s 0 /etc/machine-id - echo "remove the contents of /tmp and /var/tmp" - rm -rf /tmp/* /var/tmp/* + echo "remove the contents of /tmp" + rm -rf /tmp/* echo "force a new random seed to be generated" rm -f /var/lib/systemd/random-seed diff --git a/src/vs19c/packer/postprocessors/vagrant-hyperv/Vagrantfile b/src/vs19c/packer/postprocessors/vagrant-hyperv/Vagrantfile deleted file mode 100644 index 5aaea7997..000000000 --- a/src/vs19c/packer/postprocessors/vagrant-hyperv/Vagrantfile +++ /dev/null @@ -1,14 +0,0 @@ -Vagrant.configure(2) do |config| - config.vm.guest = :windows - config.vm.boot_timeout = 600 - - config.vm.communicator = 'winrm' - config.winssh.shell = 'powershell' - - config.vm.provider 'hyperv' do |h| - h.cpus = 4 - h.memory = 8192 - h.ip_address_timeout = 600 - h.enable_virtualization_extensions = true - end -end diff --git a/src/vs19c/packer/postprocessors/vagrant-virtualbox/Vagrantfile b/src/vs19c/packer/postprocessors/vagrant-virtualbox/Vagrantfile deleted file mode 100644 index ff5d7dce3..000000000 --- a/src/vs19c/packer/postprocessors/vagrant-virtualbox/Vagrantfile +++ /dev/null @@ -1,15 +0,0 @@ -Vagrant.configure(2) do |config| - config.vm.guest = :windows - config.vm.boot_timeout = 600 - - config.vm.communicator = 'winrm' - config.winssh.shell = 'powershell' - - config.vm.provider 'virtualbox' do |vb| - vb.cpus = 4 - vb.memory = 8192 - vb.customize [ "modifyvm", :id, "--nested-hw-virt", "on" ] - end - - config.vm.network :forwarded_port, guest: 3389, host: 53389, auto_correct: true -end diff --git a/src/vs19c/packer/provisioners/chef/Policyfile.rb b/src/vs19c/packer/provisioners/chef/Policyfile.rb deleted file mode 100644 index fd46dda31..000000000 --- a/src/vs19c/packer/provisioners/chef/Policyfile.rb +++ /dev/null @@ -1,12 +0,0 @@ -directory = File.dirname(__FILE__) - -require "#{directory}/../../../../../lib/gusztavvargadr/chef/src/Policyfile" - -name 'gusztavvargadr_packer_vs19c' - -gusztavvargadr_chef_sources -default_source :chef_repo, "#{directory}/cookbooks" - -run_list( - 'recipe[gusztavvargadr_packer_vs19c::default]' -) diff --git a/src/vs19c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs19c/metadata.rb b/src/vs19c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs19c/metadata.rb deleted file mode 100644 index b305f351f..000000000 --- a/src/vs19c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs19c/metadata.rb +++ /dev/null @@ -1,12 +0,0 @@ -name 'gusztavvargadr_packer_vs19c' -description 'Installs/Configures Packer Visual Studio 2019 Community' -license 'Unlicense' -maintainer 'Gusztáv Varga' -maintainer_email 'mail@gusztavvargadr.me' - -version '0.0.0' -depends 'gusztavvargadr_packer_w' -depends 'gusztavvargadr_visualstudio' - -chef_version '>= 16.0' -supports 'windows' diff --git a/src/vs19c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs19c/recipes/cleanup.rb b/src/vs19c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs19c/recipes/cleanup.rb deleted file mode 100644 index bd00039bb..000000000 --- a/src/vs19c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs19c/recipes/cleanup.rb +++ /dev/null @@ -1 +0,0 @@ -include_recipe 'gusztavvargadr_packer_w::cleanup' diff --git a/src/vs19c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs19c/recipes/default.rb b/src/vs19c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs19c/recipes/default.rb deleted file mode 100644 index 9d65d75c8..000000000 --- a/src/vs19c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs19c/recipes/default.rb +++ /dev/null @@ -1,4 +0,0 @@ -include_recipe 'gusztavvargadr_packer_vs19c::prepare' -include_recipe 'gusztavvargadr_packer_vs19c::install' -include_recipe 'gusztavvargadr_packer_vs19c::patch' -include_recipe 'gusztavvargadr_packer_vs19c::cleanup' diff --git a/src/vs19c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs19c/recipes/install.rb b/src/vs19c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs19c/recipes/install.rb deleted file mode 100644 index 3adb7f3e7..000000000 --- a/src/vs19c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs19c/recipes/install.rb +++ /dev/null @@ -1,6 +0,0 @@ -include_recipe 'gusztavvargadr_packer_w::install' - -gusztavvargadr_visualstudio_tool 'ide:2019-community' do - action :install - not_if { reboot_pending? } -end diff --git a/src/vs19c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs19c/recipes/patch.rb b/src/vs19c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs19c/recipes/patch.rb deleted file mode 100644 index 7465201ec..000000000 --- a/src/vs19c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs19c/recipes/patch.rb +++ /dev/null @@ -1 +0,0 @@ -include_recipe 'gusztavvargadr_packer_w::patch' diff --git a/src/vs19c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs19c/recipes/prepare.rb b/src/vs19c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs19c/recipes/prepare.rb deleted file mode 100644 index 161d80a6b..000000000 --- a/src/vs19c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs19c/recipes/prepare.rb +++ /dev/null @@ -1,5 +0,0 @@ -include_recipe 'gusztavvargadr_packer_w::prepare' - -gusztavvargadr_visualstudio_tool 'ide:2019-community' do - action :initialize -end diff --git a/src/vs19c/packer/template.json b/src/vs19c/packer/template.json deleted file mode 100644 index 95e15aa4f..000000000 --- a/src/vs19c/packer/template.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variables": { - "name": "vs19c", - "description": "Visual Studio 2019 Community" - } -} diff --git a/src/vs22c/packer/postprocessors/vagrant-hyperv/Vagrantfile b/src/vs22c/packer/postprocessors/vagrant-hyperv/Vagrantfile deleted file mode 100644 index 3f4cf5618..000000000 --- a/src/vs22c/packer/postprocessors/vagrant-hyperv/Vagrantfile +++ /dev/null @@ -1,13 +0,0 @@ -Vagrant.configure(2) do |config| - config.vm.guest = :windows - config.vm.boot_timeout = 600 - - config.vm.communicator = 'winrm' - config.winssh.shell = 'powershell' - - config.vm.provider 'hyperv' do |h| - h.cpus = 4 - h.memory = 8192 - h.ip_address_timeout = 600 - end -end diff --git a/src/vs22c/packer/postprocessors/vagrant-virtualbox/Vagrantfile b/src/vs22c/packer/postprocessors/vagrant-virtualbox/Vagrantfile deleted file mode 100644 index dca22b291..000000000 --- a/src/vs22c/packer/postprocessors/vagrant-virtualbox/Vagrantfile +++ /dev/null @@ -1,14 +0,0 @@ -Vagrant.configure(2) do |config| - config.vm.guest = :windows - config.vm.boot_timeout = 600 - - config.vm.communicator = 'winrm' - config.winssh.shell = 'powershell' - - config.vm.provider 'virtualbox' do |vb| - vb.cpus = 4 - vb.memory = 8192 - end - - config.vm.network :forwarded_port, guest: 3389, host: 53389, auto_correct: true -end diff --git a/src/vs22c/packer/postprocessors/vagrant-vmware/Vagrantfile b/src/vs22c/packer/postprocessors/vagrant-vmware/Vagrantfile deleted file mode 100644 index 2a1b806e4..000000000 --- a/src/vs22c/packer/postprocessors/vagrant-vmware/Vagrantfile +++ /dev/null @@ -1,14 +0,0 @@ -Vagrant.configure(2) do |config| - config.vm.guest = :windows - config.vm.boot_timeout = 600 - - config.vm.communicator = 'winrm' - config.winssh.shell = 'powershell' - - config.vm.provider 'vmware_desktop' do |vb| - vb.cpus = 4 - vb.memory = 8192 - end - - config.vm.network :forwarded_port, guest: 3389, host: 53389, auto_correct: true -end diff --git a/src/vs22c/packer/provisioners/chef/Policyfile.rb b/src/vs22c/packer/provisioners/chef/Policyfile.rb deleted file mode 100644 index d2a5557c6..000000000 --- a/src/vs22c/packer/provisioners/chef/Policyfile.rb +++ /dev/null @@ -1,12 +0,0 @@ -directory = File.dirname(__FILE__) - -require "#{directory}/../../../../../lib/gusztavvargadr/chef/src/Policyfile" - -name 'gusztavvargadr_packer_vs22c' - -gusztavvargadr_chef_sources -default_source :chef_repo, "#{directory}/cookbooks" - -run_list( - 'recipe[gusztavvargadr_packer_vs22c::default]' -) diff --git a/src/vs22c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs22c/metadata.rb b/src/vs22c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs22c/metadata.rb deleted file mode 100644 index 9a2defe87..000000000 --- a/src/vs22c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs22c/metadata.rb +++ /dev/null @@ -1,12 +0,0 @@ -name 'gusztavvargadr_packer_vs22c' -description 'Installs/Configures Packer Visual Studio 2022 Community' -license 'Unlicense' -maintainer 'Gusztáv Varga' -maintainer_email 'mail@gusztavvargadr.me' - -version '0.0.0' -depends 'gusztavvargadr_packer_w' -depends 'gusztavvargadr_visualstudio' - -chef_version '>= 16.0' -supports 'windows' diff --git a/src/vs22c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs22c/recipes/cleanup.rb b/src/vs22c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs22c/recipes/cleanup.rb deleted file mode 100644 index bd00039bb..000000000 --- a/src/vs22c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs22c/recipes/cleanup.rb +++ /dev/null @@ -1 +0,0 @@ -include_recipe 'gusztavvargadr_packer_w::cleanup' diff --git a/src/vs22c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs22c/recipes/default.rb b/src/vs22c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs22c/recipes/default.rb deleted file mode 100644 index a43e9cda2..000000000 --- a/src/vs22c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs22c/recipes/default.rb +++ /dev/null @@ -1,4 +0,0 @@ -include_recipe 'gusztavvargadr_packer_vs22c::prepare' -include_recipe 'gusztavvargadr_packer_vs22c::install' -include_recipe 'gusztavvargadr_packer_vs22c::patch' -include_recipe 'gusztavvargadr_packer_vs22c::cleanup' diff --git a/src/vs22c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs22c/recipes/install.rb b/src/vs22c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs22c/recipes/install.rb deleted file mode 100644 index 13e321325..000000000 --- a/src/vs22c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs22c/recipes/install.rb +++ /dev/null @@ -1,6 +0,0 @@ -include_recipe 'gusztavvargadr_packer_w::install' - -gusztavvargadr_visualstudio_tool 'ide:2022-community' do - action :install - not_if { reboot_pending? } -end diff --git a/src/vs22c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs22c/recipes/patch.rb b/src/vs22c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs22c/recipes/patch.rb deleted file mode 100644 index 7465201ec..000000000 --- a/src/vs22c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs22c/recipes/patch.rb +++ /dev/null @@ -1 +0,0 @@ -include_recipe 'gusztavvargadr_packer_w::patch' diff --git a/src/vs22c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs22c/recipes/prepare.rb b/src/vs22c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs22c/recipes/prepare.rb deleted file mode 100644 index c5261dcad..000000000 --- a/src/vs22c/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_vs22c/recipes/prepare.rb +++ /dev/null @@ -1,5 +0,0 @@ -include_recipe 'gusztavvargadr_packer_w::prepare' - -gusztavvargadr_visualstudio_tool 'ide:2022-community' do - action :initialize -end diff --git a/src/vs22c/packer/template.json b/src/vs22c/packer/template.json deleted file mode 100644 index 6cf1477f2..000000000 --- a/src/vs22c/packer/template.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variables": { - "name": "vs22c", - "description": "Visual Studio 2022 Community" - } -} diff --git a/src/w/packer/builders/amazon/template.json b/src/w/packer/builders/amazon/template.json deleted file mode 100644 index 62dbcb977..000000000 --- a/src/w/packer/builders/amazon/template.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "variables": { - "amazon_region": "eu-west-1", - "amazon_source_ami_filter_name": "", - "amazon_instance_type": "t3.medium", - "amazon_volume_size": "127", - "amazon_user_data_file": "builders/amazon-ebs/userdata.ps1", - "amazon_communicator": "ssh", - "amazon_ssh_username": "Administrator", - "amazon_ssh_timeout": "30m" - }, - "builders": [ - { - "type": "amazon-ebs", - "region": "{{user `amazon_region`}}", - "source_ami_filter": { - "filters": { - "name": "{{user `amazon_source_ami_filter_name`}}" - }, - "most_recent": true - }, - "ami_name": "{{user `author`}}-{{user `name`}}-{{user `version`}}-{{timestamp}}", - "ami_description": "{{user `description`}}", - "instance_type": "{{user `amazon_instance_type`}}", - "spot_price": "auto", - "spot_price_auto_product": "Windows (Amazon VPC)", - "launch_block_device_mappings": [ - { - "device_name": "/dev/sda1", - "volume_size": "{{user `amazon_volume_size`}}", - "volume_type": "gp2", - "delete_on_termination": true - } - ], - "ebs_optimized": "true", - "tags": { - "Name": "{{user `author`}}-{{user `name`}}-{{user `version`}}-{{timestamp}}", - "packer": "" - }, - "run_tags": { - "Name": "{{user `author`}}-{{user `name`}}-{{user `version`}}-{{timestamp}}", - "packer": "" - }, - "user_data_file": "{{user `amazon_user_data_file`}}", - "communicator": "{{user `amazon_communicator`}}", - "ssh_username": "{{user `amazon_ssh_username`}}", - "ssh_timeout": "{{user `amazon_ssh_timeout`}}" - } - ] -} diff --git a/src/w/packer/builders/amazon/userdata.ps1 b/src/w/packer/builders/amazon/userdata.ps1 deleted file mode 100644 index a1d5757b1..000000000 --- a/src/w/packer/builders/amazon/userdata.ps1 +++ /dev/null @@ -1,45 +0,0 @@ - - -Write-Host "Configure PowerShell" -Set-ExecutionPolicy RemoteSigned -Force -$ProgressPreference = 'SilentlyContinue' -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -Write-Host "Install Chocolatey" -$env:chocolateyVersion = '2.2.2' -Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-WebRequest https://chocolatey.org/install.ps1 -UseBasicParsing | Invoke-Expression - -Write-Host "Install OpenSSH" -netsh advfirewall firewall add rule name="OpenSSH-Install" dir=in localport=22 protocol=TCP action=block -choco install openssh -y --version 8.0.0.1 -params '"/SSHServerFeature"' # /PathSpecsToProbeForShellEXEString:$env:windir\system32\windowspowershell\v1.0\powershell.exe"' -net stop sshd -netsh advfirewall firewall delete rule name="OpenSSH-Install" - -Write-Host "Configure OpenSSH" -$sshd_config = "$($env:ProgramData)\ssh\sshd_config" -(Get-Content $sshd_config).Replace("Match Group administrators", "# Match Group administrators") | Set-Content $sshd_config -(Get-Content $sshd_config).Replace("AuthorizedKeysFile", "# AuthorizedKeysFile") | Set-Content $sshd_config -net start sshd - -Write-Host "Configure AWS" -mkdir -Force C:/Users/Administrator/.ssh -Invoke-WebRequest -Uri http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key -OutFile C:/Users/Administrator/.ssh/authorized_keys - -Write-Host "Install WinRM" -netsh advfirewall firewall add rule name="WinRM-Install" dir=in localport=5985 protocol=TCP action=block -Get-NetConnectionProfile | ForEach-Object { Set-NetConnectionProfile -InterfaceIndex $_.InterfaceIndex -NetworkCategory Private } -winrm quickconfig -q -winrm quickconfig -transport:http -winrm set winrm/config '@{MaxTimeoutms="1800000"}' -winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="800"}' -winrm set winrm/config/service '@{AllowUnencrypted="true"}' -winrm set winrm/config/service/auth '@{Basic="true"}' -winrm set winrm/config/client/auth '@{Basic="true"}' -net stop winrm -netsh advfirewall firewall delete rule name="WinRM-Install" - -Write-Host "Configure WinRM" -netsh advfirewall firewall add rule name="WinRM-HTTP" dir=in localport=5985 protocol=TCP action=allow -net start winrm - - diff --git a/src/w/packer/builders/hyperv-iso/template.json b/src/w/packer/builders/hyperv-iso/template.json deleted file mode 100644 index 75d233841..000000000 --- a/src/w/packer/builders/hyperv-iso/template.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "variables": { - "hyperv_disk_size": "130048", - "hyperv_cd_files": "builders/hyperv-iso/floppy/*", - "hyperv_boot_command": "" - }, - "builders": [ - { - "type": "hyperv-iso", - "vm_name": "{{user `author`}}-{{user `name`}}-{{user `version`}}-{{timestamp}}", - "iso_urls": [ - "{{user `iso_url_local`}}", - "{{user `iso_url_remote`}}" - ], - "iso_checksum": "{{user `iso_checksum`}}", - "headless": "{{user `hyperv_headless`}}", - "generation": "{{user `hyperv_generation`}}", - "configuration_version": "{{user `hyperv_configuration_version`}}", - "memory": "{{user `hyperv_memory`}}", - "enable_dynamic_memory": "{{user `hyperv_enable_dynamic_memory`}}", - "cpus": "{{user `hyperv_cpus`}}", - "enable_virtualization_extensions": "{{user `hyperv_enable_virtualization_extensions`}}", - "disk_size": "{{user `hyperv_disk_size`}}", - "cd_files": [ - "{{ user `hyperv_cd_files` }}" - ], - "switch_name": "{{user `hyperv_switch_name`}}", - "enable_mac_spoofing": "{{user `hyperv_enable_mac_spoofing`}}", - "enable_secure_boot": "{{user `hyperv_enable_secure_boot`}}", - "secure_boot_template": "{{user `hyperv_secure_boot_template`}}", - "boot_wait": "{{user `hyperv_boot_wait`}}", - "boot_command": [ "{{ user `hyperv_boot_command` }}" ], - "communicator": "{{user `hyperv_communicator`}}", - "ssh_username": "{{user `hyperv_communicator_username`}}", - "ssh_password": "{{user `hyperv_communicator_password`}}", - "ssh_timeout": "{{user `hyperv_communicator_timeout`}}", - "winrm_username": "{{user `hyperv_communicator_username`}}", - "winrm_password": "{{user `hyperv_communicator_password`}}", - "winrm_timeout": "{{user `hyperv_communicator_timeout`}}", - "shutdown_command": "{{user `hyperv_shutdown_command`}}", - "shutdown_timeout": "{{user `hyperv_shutdown_timeout`}}", - "output_directory": "{{user `output_directory`}}/build" - } - ] -} \ No newline at end of file diff --git a/src/w/packer/builders/hyperv-vmcx/template.json b/src/w/packer/builders/hyperv-vmcx/template.json deleted file mode 100644 index 7d7132a34..000000000 --- a/src/w/packer/builders/hyperv-vmcx/template.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "variables": { - "hyperv_clone_from_vmcx_path": "" - }, - "builders": [ - { - "type": "hyperv-vmcx", - "vm_name": "{{user `author`}}-{{user `name`}}-{{user `version`}}-{{timestamp}}", - "clone_from_vmcx_path": "{{user `hyperv_clone_from_vmcx_path`}}", - "headless": "{{user `hyperv_headless`}}", - "generation": "{{user `hyperv_generation`}}", - "configuration_version": "{{user `hyperv_configuration_version`}}", - "memory": "{{user `hyperv_memory`}}", - "enable_dynamic_memory": "{{user `hyperv_enable_dynamic_memory`}}", - "cpus": "{{user `hyperv_cpus`}}", - "enable_virtualization_extensions": "{{user `hyperv_enable_virtualization_extensions`}}", - "switch_name": "{{user `hyperv_switch_name`}}", - "enable_mac_spoofing": "{{user `hyperv_enable_mac_spoofing`}}", - "enable_secure_boot": "{{user `hyperv_enable_secure_boot`}}", - "secure_boot_template": "{{user `hyperv_secure_boot_template`}}", - "boot_wait": "{{user `hyperv_boot_wait`}}", - "communicator": "{{user `hyperv_communicator`}}", - "ssh_username": "{{user `hyperv_communicator_username`}}", - "ssh_password": "{{user `hyperv_communicator_password`}}", - "ssh_timeout": "{{user `hyperv_communicator_timeout`}}", - "winrm_username": "{{user `hyperv_communicator_username`}}", - "winrm_password": "{{user `hyperv_communicator_password`}}", - "winrm_timeout": "{{user `hyperv_communicator_timeout`}}", - "shutdown_command": "{{user `hyperv_shutdown_command`}}", - "shutdown_timeout": "{{user `hyperv_shutdown_timeout`}}", - "output_directory": "{{user `output_directory`}}/build" - } - ] -} \ No newline at end of file diff --git a/src/w/packer/builders/hyperv/scripts/prepare.ps1 b/src/w/packer/builders/hyperv/scripts/prepare.ps1 deleted file mode 100644 index a4dbb708a..000000000 --- a/src/w/packer/builders/hyperv/scripts/prepare.ps1 +++ /dev/null @@ -1 +0,0 @@ -mkdir -Force C:/Windows/Temp/packer diff --git a/src/w/packer/builders/hyperv/template.json b/src/w/packer/builders/hyperv/template.json deleted file mode 100644 index e2e8ccc86..000000000 --- a/src/w/packer/builders/hyperv/template.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "variables": { - "builder_source": "builders", - "builder_destination": "C:/Windows/Temp/packer", - "elevated_user": "Administrator", - "elevated_password": "Packer42-", - "hyperv_headless": "true", - "hyperv_generation": "2", - "hyperv_configuration_version": "9.0", - "hyperv_memory": "8192", - "hyperv_enable_dynamic_memory": "false", - "hyperv_cpus": "4", - "hyperv_enable_virtualization_extensions": "false", - "hyperv_switch_name": "Default Switch", - "hyperv_enable_mac_spoofing": "true", - "hyperv_enable_secure_boot": "true", - "hyperv_secure_boot_template": "MicrosoftWindows", - "hyperv_boot_wait": "-1s", - "hyperv_communicator": "ssh", - "hyperv_communicator_username": "Administrator", - "hyperv_communicator_password": "Packer42-", - "hyperv_communicator_timeout": "30m", - "hyperv_shutdown_command": "C:/Windows/Temp/packer/shutdown.cmd", - "hyperv_shutdown_timeout": "10m" - }, - "provisioners": [ - { - "type": "powershell", - "script": "{{user `builder_source`}}/{{build_type}}/scripts/prepare.ps1" - }, - { - "type": "file", - "source": "{{user `builder_source`}}/{{build_type}}/upload/", - "destination": "{{user `builder_destination`}}" - } - ] -} \ No newline at end of file diff --git a/src/w/packer/builders/hyperv/upload/shutdown.cmd b/src/w/packer/builders/hyperv/upload/shutdown.cmd deleted file mode 100644 index 5d0c8bb62..000000000 --- a/src/w/packer/builders/hyperv/upload/shutdown.cmd +++ /dev/null @@ -1 +0,0 @@ -shutdown /s /t 10 diff --git a/src/w/packer/builders/iso/floppy/Autounattend.ps1 b/src/w/packer/builders/iso/floppy/Autounattend.ps1 deleted file mode 100644 index 06e316df5..000000000 --- a/src/w/packer/builders/iso/floppy/Autounattend.ps1 +++ /dev/null @@ -1,37 +0,0 @@ -Write-Host "Configure PowerShell" -Set-ExecutionPolicy RemoteSigned -Force -$ProgressPreference = 'SilentlyContinue' -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -Write-Host "Install Chocolatey" -$env:chocolateyVersion = '2.2.2' -Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-WebRequest https://chocolatey.org/install.ps1 -UseBasicParsing | Invoke-Expression - -Write-Host "Install OpenSSH" -netsh advfirewall firewall add rule name="OpenSSH-Install" dir=in localport=22 protocol=TCP action=block -choco install openssh -y --version 8.0.0.1 -params '"/SSHServerFeature"' # /PathSpecsToProbeForShellEXEString:$env:windir\system32\windowspowershell\v1.0\powershell.exe"' -net stop sshd -netsh advfirewall firewall delete rule name="OpenSSH-Install" - -Write-Host "Configure OpenSSH" -$sshd_config = "$($env:ProgramData)\ssh\sshd_config" -(Get-Content $sshd_config).Replace("Match Group administrators", "# Match Group administrators") | Set-Content $sshd_config -(Get-Content $sshd_config).Replace("AuthorizedKeysFile", "# AuthorizedKeysFile") | Set-Content $sshd_config -net start sshd - -Write-Host "Install WinRM" -netsh advfirewall firewall add rule name="WinRM-Install" dir=in localport=5985 protocol=TCP action=block -Get-NetConnectionProfile | ForEach-Object { Set-NetConnectionProfile -InterfaceIndex $_.InterfaceIndex -NetworkCategory Private } -winrm quickconfig -q -winrm quickconfig -transport:http -winrm set winrm/config '@{MaxTimeoutms="1800000"}' -winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="800"}' -winrm set winrm/config/service '@{AllowUnencrypted="true"}' -winrm set winrm/config/service/auth '@{Basic="true"}' -winrm set winrm/config/client/auth '@{Basic="true"}' -net stop winrm -netsh advfirewall firewall delete rule name="WinRM-Install" - -Write-Host "Configure WinRM" -netsh advfirewall firewall add rule name="WinRM-HTTP" dir=in localport=5985 protocol=TCP action=allow -net start winrm diff --git a/src/w/packer/builders/iso/template.json b/src/w/packer/builders/iso/template.json deleted file mode 100644 index 31cb79083..000000000 --- a/src/w/packer/builders/iso/template.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variables": { - "iso_url_local": "", - "iso_url_remote": "", - "iso_checksum": "" - } -} \ No newline at end of file diff --git a/src/w/packer/builders/virtualbox-iso/template.json b/src/w/packer/builders/virtualbox-iso/template.json deleted file mode 100644 index 8ef9cfcd3..000000000 --- a/src/w/packer/builders/virtualbox-iso/template.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "variables": { - "virtualbox_guest_os_type": "", - "virtualbox_disk_size": "130048", - "virtualbox_cd_files": "builders/virtualbox-iso/floppy/*", - "virtualbox_boot_command": "" - }, - "builders": [ - { - "type": "virtualbox-iso", - "vm_name": "{{user `author`}}-{{user `name`}}-{{user `version`}}-{{timestamp}}", - "guest_os_type": "{{user `virtualbox_guest_os_type`}}", - "iso_urls": [ - "{{user `iso_url_local`}}", - "{{user `iso_url_remote`}}" - ], - "iso_checksum": "{{user `iso_checksum`}}", - "headless": "{{user `virtualbox_headless`}}", - "vboxmanage": [ - [ - "modifyvm", - "{{.Name}}", - "--memory", - "{{user `virtualbox_memory`}}" - ], - [ - "modifyvm", - "{{.Name}}", - "--cpus", - "{{user `virtualbox_cpus`}}" - ] - ], - "disk_size": "{{user `virtualbox_disk_size`}}", - "cd_files": [ - "{{user `virtualbox_cd_files`}}" - ], - "boot_wait": "{{user `virtualbox_boot_wait`}}", - "boot_command": [ "{{ user `virtualbox_boot_command` }}" ], - "communicator": "{{user `virtualbox_communicator`}}", - "ssh_username": "{{user `virtualbox_communicator_username`}}", - "ssh_password": "{{user `virtualbox_communicator_password`}}", - "ssh_timeout": "{{user `virtualbox_communicator_timeout`}}", - "winrm_username": "{{user `virtualbox_communicator_username`}}", - "winrm_password": "{{user `virtualbox_communicator_password`}}", - "winrm_timeout": "{{user `virtualbox_communicator_timeout`}}", - "guest_additions_mode": "{{user `virtualbox_guest_additions_mode`}}", - "shutdown_command": "{{user `virtualbox_shutdown_command`}}", - "shutdown_timeout": "{{user `virtualbox_shutdown_timeout`}}", - "post_shutdown_delay": "{{user `virtualbox_post_shutdown_delay`}}", - "output_directory": "{{user `output_directory`}}/build", - "firmware": "efi", - "nested_virt": "false", - "gfx_controller": "vboxsvga", - "gfx_vram_size": 64, - "hard_drive_interface": "sata" - } - ] -} \ No newline at end of file diff --git a/src/w/packer/builders/virtualbox-ovf/template.json b/src/w/packer/builders/virtualbox-ovf/template.json deleted file mode 100644 index c20153490..000000000 --- a/src/w/packer/builders/virtualbox-ovf/template.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "variables": { - "virtualbox_source_path": "" - }, - "builders": [ - { - "type": "virtualbox-ovf", - "vm_name": "{{user `author`}}-{{user `name`}}-{{user `version`}}-{{timestamp}}", - "source_path": "{{user `virtualbox_source_path`}}", - "headless": "{{user `virtualbox_headless`}}", - "vboxmanage": [ - [ - "modifyvm", - "{{.Name}}", - "--memory", - "{{user `virtualbox_memory`}}" - ], - [ - "modifyvm", - "{{.Name}}", - "--cpus", - "{{user `virtualbox_cpus`}}" - ] - ], - "boot_wait": "{{user `virtualbox_boot_wait`}}", - "communicator": "{{user `virtualbox_communicator`}}", - "ssh_username": "{{user `virtualbox_communicator_username`}}", - "ssh_password": "{{user `virtualbox_communicator_password`}}", - "ssh_timeout": "{{user `virtualbox_communicator_timeout`}}", - "winrm_username": "{{user `virtualbox_communicator_username`}}", - "winrm_password": "{{user `virtualbox_communicator_password`}}", - "winrm_timeout": "{{user `virtualbox_communicator_timeout`}}", - "guest_additions_mode": "{{user `virtualbox_guest_additions_mode`}}", - "shutdown_command": "{{user `virtualbox_shutdown_command`}}", - "shutdown_timeout": "{{user `virtualbox_shutdown_timeout`}}", - "post_shutdown_delay": "{{user `virtualbox_post_shutdown_delay`}}", - "output_directory": "{{user `output_directory`}}/build" - } - ] -} \ No newline at end of file diff --git a/src/w/packer/builders/virtualbox/scripts/prepare.ps1 b/src/w/packer/builders/virtualbox/scripts/prepare.ps1 deleted file mode 100644 index a4dbb708a..000000000 --- a/src/w/packer/builders/virtualbox/scripts/prepare.ps1 +++ /dev/null @@ -1 +0,0 @@ -mkdir -Force C:/Windows/Temp/packer diff --git a/src/w/packer/builders/virtualbox/template.json b/src/w/packer/builders/virtualbox/template.json deleted file mode 100644 index 5496cdabb..000000000 --- a/src/w/packer/builders/virtualbox/template.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "variables": { - "builder_source": "builders", - "builder_destination": "C:/Windows/Temp/packer", - "elevated_user": "Administrator", - "elevated_password": "Packer42-", - "virtualbox_headless": "true", - "virtualbox_memory": "8192", - "virtualbox_cpus": "4", - "virtualbox_boot_wait": "1s", - "virtualbox_communicator": "ssh", - "virtualbox_communicator_username": "Administrator", - "virtualbox_communicator_password": "Packer42-", - "virtualbox_communicator_timeout": "30m", - "virtualbox_guest_additions_mode": "disable", - "virtualbox_shutdown_command": "C:/Windows/Temp/packer/shutdown.cmd", - "virtualbox_shutdown_timeout": "10m", - "virtualbox_post_shutdown_delay": "5s" - }, - "provisioners": [ - { - "type": "powershell", - "script": "{{user `builder_source`}}/{{build_type}}/scripts/prepare.ps1" - }, - { - "type": "file", - "source": "{{user `builder_source`}}/{{build_type}}/upload/", - "destination": "{{user `builder_destination`}}" - } - ] -} \ No newline at end of file diff --git a/src/w/packer/builders/virtualbox/upload/shutdown.cmd b/src/w/packer/builders/virtualbox/upload/shutdown.cmd deleted file mode 100644 index 5d0c8bb62..000000000 --- a/src/w/packer/builders/virtualbox/upload/shutdown.cmd +++ /dev/null @@ -1 +0,0 @@ -shutdown /s /t 10 diff --git a/src/w/packer/builders/vmware-iso/template.json b/src/w/packer/builders/vmware-iso/template.json deleted file mode 100644 index 9d2876350..000000000 --- a/src/w/packer/builders/vmware-iso/template.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "variables": { - "vmware_guest_os_type": "", - "vmware_disk_size": "130048", - "vmware_floppy_files": "builders/vmware-iso/floppy/*", - "vmware_boot_command": "" - }, - "builders": [ - { - "type": "vmware-iso", - "vm_name": "{{user `author`}}-{{user `name`}}-{{user `version`}}-{{timestamp}}", - "guest_os_type": "{{user `vmware_guest_os_type`}}", - "iso_urls": [ - "{{user `iso_url_local`}}", - "{{user `iso_url_remote`}}" - ], - "iso_checksum": "{{user `iso_checksum`}}", - "headless": "{{user `vmware_headless`}}", - "vmx_data": { - "firmware": "efi", - "vhv.enable": "FALSE" - }, - "version": "16", - "disk_type_id": 0, - "disk_adapter_type": "nvme", - "memory": "{{user `vmware_memory`}}", - "cpus": "{{user `vmware_cpus`}}", - "disk_size": "{{user `vmware_disk_size`}}", - "floppy_files": [ - "{{user `vmware_floppy_files`}}" - ], - "boot_wait": "{{user `vmware_boot_wait`}}", - "boot_command": [ "{{ user `vmware_boot_command` }}" ], - "boot_keygroup_interval": "1s", - "communicator": "{{user `vmware_communicator`}}", - "ssh_username": "{{user `vmware_communicator_username`}}", - "ssh_password": "{{user `vmware_communicator_password`}}", - "ssh_timeout": "{{user `vmware_communicator_timeout`}}", - "winrm_username": "{{user `vmware_communicator_username`}}", - "winrm_password": "{{user `vmware_communicator_password`}}", - "winrm_timeout": "{{user `vmware_communicator_timeout`}}", - "shutdown_command": "{{user `vmware_shutdown_command`}}", - "shutdown_timeout": "{{user `vmware_shutdown_timeout`}}", - "output_directory": "{{user `output_directory`}}/build" - } - ] -} \ No newline at end of file diff --git a/src/w/packer/builders/vmware-vmx/template.json b/src/w/packer/builders/vmware-vmx/template.json deleted file mode 100644 index 7a540e90c..000000000 --- a/src/w/packer/builders/vmware-vmx/template.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "variables": { - "vmware_source_path": "", - "vmware_vmx_remove_ethernet_interfaces": "false" - }, - "builders": [ - { - "type": "vmware-vmx", - "vm_name": "{{user `author`}}-{{user `name`}}-{{user `version`}}-{{timestamp}}", - "source_path": "{{user `vmware_source_path`}}", - "headless": "{{user `vmware_headless`}}", - "vmx_remove_ethernet_interfaces": "{{user `vmware_vmx_remove_ethernet_interfaces`}}", - "boot_wait": "{{user `vmware_boot_wait`}}", - "communicator": "{{user `vmware_communicator`}}", - "ssh_username": "{{user `vmware_communicator_username`}}", - "ssh_password": "{{user `vmware_communicator_password`}}", - "ssh_timeout": "{{user `vmware_communicator_timeout`}}", - "winrm_username": "{{user `vmware_communicator_username`}}", - "winrm_password": "{{user `vmware_communicator_password`}}", - "winrm_timeout": "{{user `vmware_communicator_timeout`}}", - "shutdown_command": "{{user `vmware_shutdown_command`}}", - "shutdown_timeout": "{{user `vmware_shutdown_timeout`}}", - "output_directory": "{{user `output_directory`}}/build" - } - ] -} \ No newline at end of file diff --git a/src/w/packer/builders/vmware/scripts/prepare.ps1 b/src/w/packer/builders/vmware/scripts/prepare.ps1 deleted file mode 100644 index a4dbb708a..000000000 --- a/src/w/packer/builders/vmware/scripts/prepare.ps1 +++ /dev/null @@ -1 +0,0 @@ -mkdir -Force C:/Windows/Temp/packer diff --git a/src/w/packer/builders/vmware/template.json b/src/w/packer/builders/vmware/template.json deleted file mode 100644 index 07fb9cf99..000000000 --- a/src/w/packer/builders/vmware/template.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "variables": { - "builder_source": "builders", - "builder_destination": "C:/Windows/Temp/packer", - "elevated_user": "Administrator", - "elevated_password": "Packer42-", - "vmware_headless": "true", - "vmware_memory": "8192", - "vmware_cpus": "4", - "vmware_boot_wait": "1s", - "vmware_communicator": "ssh", - "vmware_communicator_username": "Administrator", - "vmware_communicator_password": "Packer42-", - "vmware_communicator_timeout": "30m", - "vmware_shutdown_command": "C:/Windows/Temp/packer/shutdown.cmd", - "vmware_shutdown_timeout": "10m" - }, - "provisioners": [ - { - "type": "powershell", - "script": "{{user `builder_source`}}/{{build_type}}/scripts/prepare.ps1" - }, - { - "type": "file", - "source": "{{user `builder_source`}}/{{build_type}}/upload/", - "destination": "{{user `builder_destination`}}" - } - ] -} \ No newline at end of file diff --git a/src/w/packer/builders/vmware/upload/shutdown.cmd b/src/w/packer/builders/vmware/upload/shutdown.cmd deleted file mode 100644 index 5d0c8bb62..000000000 --- a/src/w/packer/builders/vmware/upload/shutdown.cmd +++ /dev/null @@ -1 +0,0 @@ -shutdown /s /t 10 diff --git a/src/w/packer/postprocessors/manifest/template.json b/src/w/packer/postprocessors/manifest/template.json deleted file mode 100644 index d82060097..000000000 --- a/src/w/packer/postprocessors/manifest/template.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "post-processors": [ - { - "type": "manifest", - "output": "{{user `output_directory`}}/build/manifest.json" - }, - { - "type": "checksum", - "checksum_types": [ - "sha256" - ], - "output": "{{user `output_directory`}}/build/checksum.{{.ChecksumType}}" - } - ] -} \ No newline at end of file diff --git a/src/w/packer/postprocessors/vagrant-hyperv/Vagrantfile b/src/w/packer/postprocessors/vagrant-hyperv/Vagrantfile deleted file mode 100644 index 904c9ac20..000000000 --- a/src/w/packer/postprocessors/vagrant-hyperv/Vagrantfile +++ /dev/null @@ -1,13 +0,0 @@ -Vagrant.configure(2) do |config| - config.vm.guest = :windows - config.vm.boot_timeout = 600 - - config.vm.communicator = 'winrm' - config.winssh.shell = 'powershell' - - config.vm.provider 'hyperv' do |h| - h.cpus = 2 - h.memory = 2048 - h.ip_address_timeout = 600 - end -end diff --git a/src/w/packer/postprocessors/vagrant-hyperv/template.json b/src/w/packer/postprocessors/vagrant-hyperv/template.json deleted file mode 100644 index 59baab521..000000000 --- a/src/w/packer/postprocessors/vagrant-hyperv/template.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "variables": { - "vagrant_vagrantfile_template": "postprocessors/vagrant-hyperv/Vagrantfile" - } -} \ No newline at end of file diff --git a/src/w/packer/postprocessors/vagrant-virtualbox/Vagrantfile b/src/w/packer/postprocessors/vagrant-virtualbox/Vagrantfile deleted file mode 100644 index ca998729c..000000000 --- a/src/w/packer/postprocessors/vagrant-virtualbox/Vagrantfile +++ /dev/null @@ -1,14 +0,0 @@ -Vagrant.configure(2) do |config| - config.vm.guest = :windows - config.vm.boot_timeout = 600 - - config.vm.communicator = 'winrm' - config.winssh.shell = 'powershell' - - config.vm.provider 'virtualbox' do |vb| - vb.cpus = 2 - vb.memory = 2048 - end - - config.vm.network :forwarded_port, guest: 3389, host: 53389, auto_correct: true -end diff --git a/src/w/packer/postprocessors/vagrant-virtualbox/template.json b/src/w/packer/postprocessors/vagrant-virtualbox/template.json deleted file mode 100644 index 637151484..000000000 --- a/src/w/packer/postprocessors/vagrant-virtualbox/template.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "variables": { - "vagrant_vagrantfile_template": "postprocessors/vagrant-virtualbox/Vagrantfile" - } -} \ No newline at end of file diff --git a/src/w/packer/postprocessors/vagrant-vmware/Vagrantfile b/src/w/packer/postprocessors/vagrant-vmware/Vagrantfile deleted file mode 100644 index 9429900e9..000000000 --- a/src/w/packer/postprocessors/vagrant-vmware/Vagrantfile +++ /dev/null @@ -1,14 +0,0 @@ -Vagrant.configure(2) do |config| - config.vm.guest = :windows - config.vm.boot_timeout = 600 - - config.vm.communicator = 'winrm' - config.winssh.shell = 'powershell' - - config.vm.provider 'vmware_desktop' do |vw| - vw.cpus = 2 - vw.memory = 2048 - end - - config.vm.network :forwarded_port, guest: 3389, host: 53389, auto_correct: true -end diff --git a/src/w/packer/postprocessors/vagrant-vmware/template.json b/src/w/packer/postprocessors/vagrant-vmware/template.json deleted file mode 100644 index 98f2ef56a..000000000 --- a/src/w/packer/postprocessors/vagrant-vmware/template.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variables": { - "vagrant_vagrantfile_template": "postprocessors/vagrant-vmware/Vagrantfile", - "vmware_vmx_remove_ethernet_interfaces": "true" - } -} \ No newline at end of file diff --git a/src/w/packer/postprocessors/vagrant/template.json b/src/w/packer/postprocessors/vagrant/template.json deleted file mode 100644 index 2d7918ad8..000000000 --- a/src/w/packer/postprocessors/vagrant/template.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "variables": { - "vagrant_vagrantfile_template": "" - }, - "post-processors": [ - [ - { - "type": "vagrant", - "vagrantfile_template": "{{user `vagrant_vagrantfile_template`}}", - "output": "{{user `output_directory`}}/package/vagrant.box" - }, - { - "type": "checksum", - "checksum_types": [ - "sha256" - ], - "output": "{{user `output_directory`}}/package/checksum.{{.ChecksumType}}" - } - ] - ] -} \ No newline at end of file diff --git a/src/w/packer/provisioners/amazon-shutdown/template.json b/src/w/packer/provisioners/amazon-shutdown/template.json deleted file mode 100644 index 19b33c7dc..000000000 --- a/src/w/packer/provisioners/amazon-shutdown/template.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "variables": { - "amazon_shutdown_source": "provisioners/amazon-shutdown", - "amazon_shutdown_destination": "C:/ProgramData/Amazon/EC2-Windows/Launch/Sysprep" - }, - "provisioners": [ - { - "type": "file", - "source": "{{user `amazon_shutdown_source`}}/upload/", - "destination": "{{user `amazon_shutdown_destination`}}" - }, - { - "type": "powershell", - "inline": [ - "{{user `amazon_shutdown_destination`}}/shutdown.ps1" - ], - "valid_exit_codes": [ - 0, - 1 - ] - } - ] -} \ No newline at end of file diff --git a/src/w/packer/provisioners/amazon-shutdown/upload/BeforeSysprep.cmd b/src/w/packer/provisioners/amazon-shutdown/upload/BeforeSysprep.cmd deleted file mode 100644 index ba48701be..000000000 --- a/src/w/packer/provisioners/amazon-shutdown/upload/BeforeSysprep.cmd +++ /dev/null @@ -1,2 +0,0 @@ -sc.exe config winrm start= disabled -sc.exe config sshd start= disabled diff --git a/src/w/packer/provisioners/amazon-shutdown/upload/SysprepSpecialize.cmd b/src/w/packer/provisioners/amazon-shutdown/upload/SysprepSpecialize.cmd deleted file mode 100644 index 1a5f863bb..000000000 --- a/src/w/packer/provisioners/amazon-shutdown/upload/SysprepSpecialize.cmd +++ /dev/null @@ -1,9 +0,0 @@ -sc.exe config winrm start= auto -net start winrm - -mkdir -Force C:/Users/Administrator/.ssh -rm -Force C:/Users/Administrator/.ssh/authorized_keys -Invoke-WebRequest -Uri http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key -OutFile C:/Users/Administrator/.ssh/authorized_keys - -sc.exe config sshd start= auto -net start sshd diff --git a/src/w/packer/provisioners/amazon-shutdown/upload/shutdown.ps1 b/src/w/packer/provisioners/amazon-shutdown/upload/shutdown.ps1 deleted file mode 100644 index 4955993a3..000000000 --- a/src/w/packer/provisioners/amazon-shutdown/upload/shutdown.ps1 +++ /dev/null @@ -1,3 +0,0 @@ -cd C:\ProgramData\Amazon\EC2-Windows\Launch\Scripts -.\InitializeInstance.ps1 -Schedule -.\SysprepInstance.ps1 -NoShutdown diff --git a/src/w/packer/provisioners/chef/Policyfile.rb b/src/w/packer/provisioners/chef/Policyfile.rb deleted file mode 100644 index a6ca9fad0..000000000 --- a/src/w/packer/provisioners/chef/Policyfile.rb +++ /dev/null @@ -1,12 +0,0 @@ -directory = File.dirname(__FILE__) - -require "#{directory}/../../../../../lib/gusztavvargadr/chef/src/Policyfile" - -name 'gusztavvargadr_packer_w' - -gusztavvargadr_chef_sources -default_source :chef_repo, "#{directory}/cookbooks" - -run_list( - 'recipe[gusztavvargadr_packer_w::default]' -) diff --git a/src/w/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_w/recipes/cleanup.rb b/src/w/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_w/recipes/cleanup.rb deleted file mode 100644 index 83d4829d7..000000000 --- a/src/w/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_w/recipes/cleanup.rb +++ /dev/null @@ -1,52 +0,0 @@ -# powershell_script 'Execute NGen' do -# code <<-EOH -# Get-ChildItem $env:SystemRoot\\Microsoft.net\\NGen.exe -recurse | %{ & $_ executeQueuedItems } -# EOH -# action :run -# end - -powershell_script 'Clearing temporary files' do - code <<-EOH - @( - "$env:localappdata\\temp\\*", - "$env:windir\\logs", - "$env:windir\\panther", - "$env:programdata\\Microsoft\\Windows Defender\\Scans\\*" - ) | % { - Write-Host "Removing $_" - try { - Takeown /d Y /R /f $_ - Icacls $_ /GRANT:r administrators:F /T /c /q 2>&1 | Out-Null - Remove-Item $_ -Recurse -Force | Out-Null - } catch { $global:error.RemoveAt(0) } - } - EOH - action :run - not_if { reboot_pending? } -end - -gusztavvargadr_windows_updates '' do - action :cleanup - not_if { reboot_pending? } -end - -powershell_script 'Optimizing volume' do - code <<-EOH - Optimize-Volume -DriveLetter C -Analyze -Defrag - EOH - action :run - not_if { reboot_pending? } -end - -powershell_script 'Zeroing volume' do - code <<-EOH - sdelete -accepteula -nobanner -z C: - EOH - action :run - not_if { reboot_pending? } -end - -reboot 'cleanup' do - action :request_reboot - only_if { reboot_pending? } -end diff --git a/src/w/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_w/recipes/default.rb b/src/w/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_w/recipes/default.rb deleted file mode 100644 index 886080f33..000000000 --- a/src/w/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_w/recipes/default.rb +++ /dev/null @@ -1,4 +0,0 @@ -include_recipe 'gusztavvargadr_packer_w::prepare' -include_recipe 'gusztavvargadr_packer_w::install' -include_recipe 'gusztavvargadr_packer_w::patch' -include_recipe 'gusztavvargadr_packer_w::cleanup' diff --git a/src/w/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_w/recipes/patch.rb b/src/w/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_w/recipes/patch.rb deleted file mode 100644 index 3b02383bf..000000000 --- a/src/w/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_w/recipes/patch.rb +++ /dev/null @@ -1,3 +0,0 @@ -gusztavvargadr_windows_updates '' do - action :install -end diff --git a/src/w/packer/provisioners/chef/scripts/cleanup.ps1 b/src/w/packer/provisioners/chef/scripts/cleanup.ps1 deleted file mode 100644 index c05dc299b..000000000 --- a/src/w/packer/provisioners/chef/scripts/cleanup.ps1 +++ /dev/null @@ -1,2 +0,0 @@ -Write-Host "Clean up" -Remove-Item -Recurse -Force C:/Windows/Temp/chef diff --git a/src/w/packer/provisioners/chef/scripts/prepare.ps1 b/src/w/packer/provisioners/chef/scripts/prepare.ps1 deleted file mode 100644 index 8e48569e7..000000000 --- a/src/w/packer/provisioners/chef/scripts/prepare.ps1 +++ /dev/null @@ -1,9 +0,0 @@ -mkdir -Force C:/Windows/Temp/chef - -If ((Get-Command "chef-client" -ErrorAction Ignore).Count -gt 0) { - Return -} - -Write-Host "Install Chef Client" -. { iwr -useb https://omnitruck.chef.io/install.ps1 } | iex; install -project chef -version 18.3.0 -[Environment]::SetEnvironmentVariable("CHEF_LICENSE", "accept-silent", "Machine") diff --git a/src/w/packer/provisioners/chef/template.json b/src/w/packer/provisioners/chef/template.json deleted file mode 100644 index c3cfea967..000000000 --- a/src/w/packer/provisioners/chef/template.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "variables": { - "chef_source": "provisioners/chef", - "chef_destination": "C:/Windows/Temp/chef", - "chef_start_retry_timeout": "30m", - "chef_max_retries": "10" - }, - "provisioners": [ - { - "type": "powershell", - "script": "{{user `chef_source`}}/scripts/prepare.ps1", - "elevated_user": "{{user `elevated_user`}}", - "elevated_password": "{{user `elevated_password`}}" - }, - { - "type": "file", - "source": "{{user `chef_source`}}/upload/", - "destination": "{{user `chef_destination`}}" - }, - { - "type": "powershell", - "inline": [ - "cd {{user `chef_destination`}}; chef-client --local-mode" - ], - "elevated_user": "{{user `elevated_user`}}", - "elevated_password": "{{user `elevated_password`}}", - "pause_before": "1m", - "start_retry_timeout": "{{user `chef_start_retry_timeout`}}", - "max_retries": "{{user `chef_max_retries`}}" - }, - { - "type": "powershell", - "script": "{{user `chef_source`}}/scripts/cleanup.ps1", - "elevated_user": "{{user `elevated_user`}}", - "elevated_password": "{{user `elevated_password`}}" - } - ] -} \ No newline at end of file diff --git a/src/w/packer/provisioners/vagrant/scripts/cleanup.ps1 b/src/w/packer/provisioners/vagrant/scripts/cleanup.ps1 deleted file mode 100644 index fc29ccc76..000000000 --- a/src/w/packer/provisioners/vagrant/scripts/cleanup.ps1 +++ /dev/null @@ -1 +0,0 @@ -Get-AppxPackage -Name "*OneDriveSync*" | Remove-AppxPackage diff --git a/src/w/packer/provisioners/vagrant/template.json b/src/w/packer/provisioners/vagrant/template.json deleted file mode 100644 index 4f9878697..000000000 --- a/src/w/packer/provisioners/vagrant/template.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "variables": { - "vagrant_source": "provisioners/vagrant" - }, - "provisioners": [ - { - "type": "file", - "source": "{{user `vagrant_source`}}/upload/", - "destination": "{{user `builder_destination`}}" - }, - { - "type": "powershell", - "script": "{{user `vagrant_source`}}/scripts/cleanup.ps1", - "elevated_user": "{{user `elevated_user`}}", - "elevated_password": "{{user `elevated_password`}}" - } - ] -} \ No newline at end of file diff --git a/src/w/packer/template.json b/src/w/packer/template.json deleted file mode 100644 index b3ee82cc9..000000000 --- a/src/w/packer/template.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "min_packer_version": "1.6.0", - "variables": { - "name": "", - "description": "", - "version": "", - "author": "gusztavvargadr", - "output_directory": "output", - "download_directory": "{{env `HOME`}}/Downloads" - }, - "description": "{{user `description`}}", - "builders": [], - "provisioners": [], - "post-processors": [] -} \ No newline at end of file diff --git a/src/w10/packer/builders/iso/floppy/Autounattend.xml b/src/w10/packer/builders/iso/floppy/Autounattend.xml deleted file mode 100644 index dec08cb44..000000000 --- a/src/w10/packer/builders/iso/floppy/Autounattend.xml +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - en-US - - en-US - en-US - en-US - en-US - en-US - - - - - - - 1 - 500 - EFI - - - 2 - 128 - MSR - - - 3 - true - Primary - - - 0 - true - - - - - - 0 - 3 - - - - - - Never - - true - Administrator - gusztavvargadr - - - - - - false - - - - - - false - - - UTC - - - - true - - - false - false - - - true - - - true - - - - - - true - true - true - true - true - Home - 3 - - - - Packer42- - true</PlainText> - </AdministratorPassword> - </UserAccounts> - <RegisteredOwner/> - <AutoLogon> - <Password> - <Value>Packer42-</Value> - <PlainText>true</PlainText> - </Password> - <Enabled>true</Enabled> - <Username>Administrator</Username> - <LogonCount>2</LogonCount> - </AutoLogon> - <FirstLogonCommands> - <SynchronousCommand wcm:action="add"> - <CommandLine>C:\Windows\System32\WindowsPowershell\v1.0\powershell.exe -Command "Set-ExecutionPolicy Bypass -Force; A:\Autounattend.ps1; E:\Autounattend.ps1"</CommandLine> - <Description>Autounattend.ps1</Description> - <Order>1</Order> - <RequiresUserInput>true</RequiresUserInput> - </SynchronousCommand> - </FirstLogonCommands> - </component> - <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <InputLocale>en-US</InputLocale> - <SystemLocale>en-US</SystemLocale> - <UILanguage>en-US</UILanguage> - <UILanguageFallback>en-US</UILanguageFallback> - <UserLocale>en-US</UserLocale> - </component> - </settings> -</unattend> diff --git a/src/w10/packer/builders/iso/template.json b/src/w10/packer/builders/iso/template.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/src/w10/packer/builders/iso/template.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/src/w10/packer/builders/virtualbox-iso/template.json b/src/w10/packer/builders/virtualbox-iso/template.json deleted file mode 100644 index 77af496f9..000000000 --- a/src/w10/packer/builders/virtualbox-iso/template.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "variables": { - "virtualbox_guest_os_type": "Windows10_64" - } -} \ No newline at end of file diff --git a/src/w10/packer/builders/vmware-iso/template.json b/src/w10/packer/builders/vmware-iso/template.json deleted file mode 100644 index b8ce9d21a..000000000 --- a/src/w10/packer/builders/vmware-iso/template.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "variables": { - "vmware_guest_os_type": "windows9-64" - } -} \ No newline at end of file diff --git a/src/w10/packer/postprocessors/vagrant-hyperv/Vagrantfile b/src/w10/packer/postprocessors/vagrant-hyperv/Vagrantfile deleted file mode 100644 index a28ad285c..000000000 --- a/src/w10/packer/postprocessors/vagrant-hyperv/Vagrantfile +++ /dev/null @@ -1,13 +0,0 @@ -Vagrant.configure(2) do |config| - config.vm.guest = :windows - config.vm.boot_timeout = 600 - - config.vm.communicator = 'winrm' - config.winssh.shell = 'powershell' - - config.vm.provider 'hyperv' do |h| - h.cpus = 2 - h.memory = 4096 - h.ip_address_timeout = 600 - end -end diff --git a/src/w10/packer/postprocessors/vagrant-virtualbox/Vagrantfile b/src/w10/packer/postprocessors/vagrant-virtualbox/Vagrantfile deleted file mode 100644 index 8c2da128b..000000000 --- a/src/w10/packer/postprocessors/vagrant-virtualbox/Vagrantfile +++ /dev/null @@ -1,14 +0,0 @@ -Vagrant.configure(2) do |config| - config.vm.guest = :windows - config.vm.boot_timeout = 600 - - config.vm.communicator = 'winrm' - config.winssh.shell = 'powershell' - - config.vm.provider 'virtualbox' do |vb| - vb.cpus = 2 - vb.memory = 4096 - end - - config.vm.network :forwarded_port, guest: 3389, host: 53389, auto_correct: true -end diff --git a/src/w10/packer/postprocessors/vagrant-vmware/Vagrantfile b/src/w10/packer/postprocessors/vagrant-vmware/Vagrantfile deleted file mode 100644 index b978d6f97..000000000 --- a/src/w10/packer/postprocessors/vagrant-vmware/Vagrantfile +++ /dev/null @@ -1,14 +0,0 @@ -Vagrant.configure(2) do |config| - config.vm.guest = :windows - config.vm.boot_timeout = 600 - - config.vm.communicator = 'winrm' - config.winssh.shell = 'powershell' - - config.vm.provider 'vmware_desktop' do |vw| - vw.cpus = 2 - vw.memory = 4096 - end - - config.vm.network :forwarded_port, guest: 3389, host: 53389, auto_correct: true -end diff --git a/src/w10/packer/template.json b/src/w10/packer/template.json deleted file mode 100644 index 72e833c6b..000000000 --- a/src/w10/packer/template.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variables": { - "name": "w10", - "description": "Windows 10" - } -} \ No newline at end of file diff --git a/src/w101809eltsc/packer/builders/iso/floppy/Autounattend.ps1 b/src/w101809eltsc/packer/builders/iso/floppy/Autounattend.ps1 deleted file mode 100644 index 7b7e79521..000000000 --- a/src/w101809eltsc/packer/builders/iso/floppy/Autounattend.ps1 +++ /dev/null @@ -1,37 +0,0 @@ -Write-Host "Configure PowerShell" -Set-ExecutionPolicy RemoteSigned -Force -$ProgressPreference = 'SilentlyContinue' -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -Write-Host "Install Chocolatey" -$env:chocolateyVersion = '1.4.0' -Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-WebRequest https://chocolatey.org/install.ps1 -UseBasicParsing | Invoke-Expression - -Write-Host "Install OpenSSH" -netsh advfirewall firewall add rule name="OpenSSH-Install" dir=in localport=22 protocol=TCP action=block -choco install openssh -y --version 8.0.0.1 -params '"/SSHServerFeature"' # /PathSpecsToProbeForShellEXEString:$env:windir\system32\windowspowershell\v1.0\powershell.exe"' -net stop sshd -netsh advfirewall firewall delete rule name="OpenSSH-Install" - -Write-Host "Configure OpenSSH" -$sshd_config = "$($env:ProgramData)\ssh\sshd_config" -(Get-Content $sshd_config).Replace("Match Group administrators", "# Match Group administrators") | Set-Content $sshd_config -(Get-Content $sshd_config).Replace("AuthorizedKeysFile", "# AuthorizedKeysFile") | Set-Content $sshd_config -net start sshd - -Write-Host "Install WinRM" -netsh advfirewall firewall add rule name="WinRM-Install" dir=in localport=5985 protocol=TCP action=block -Get-NetConnectionProfile | ForEach-Object { Set-NetConnectionProfile -InterfaceIndex $_.InterfaceIndex -NetworkCategory Private } -winrm quickconfig -q -winrm quickconfig -transport:http -winrm set winrm/config '@{MaxTimeoutms="1800000"}' -winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="800"}' -winrm set winrm/config/service '@{AllowUnencrypted="true"}' -winrm set winrm/config/service/auth '@{Basic="true"}' -winrm set winrm/config/client/auth '@{Basic="true"}' -net stop winrm -netsh advfirewall firewall delete rule name="WinRM-Install" - -Write-Host "Configure WinRM" -netsh advfirewall firewall add rule name="WinRM-HTTP" dir=in localport=5985 protocol=TCP action=allow -net start winrm diff --git a/src/w101809eltsc/packer/builders/iso/template.json b/src/w101809eltsc/packer/builders/iso/template.json deleted file mode 100644 index dae800ddf..000000000 --- a/src/w101809eltsc/packer/builders/iso/template.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variables": { - "iso_url_local": "{{user `download_directory`}}/17763.107.101029-1455.rs5_release_svc_refresh_CLIENT_LTSC_EVAL_x64FRE_en-us.iso", - "iso_url_remote": "https://software-download.microsoft.com/download/sg/17763.107.101029-1455.rs5_release_svc_refresh_CLIENT_LTSC_EVAL_x64FRE_en-us.iso", - "iso_checksum": "sha256:668fe1af70c2f7416328aee3a0bb066b12dc6bbd2576f40f812b95741e18bc3a" - } -} \ No newline at end of file diff --git a/src/w101809eltsc/packer/template.json b/src/w101809eltsc/packer/template.json deleted file mode 100644 index 5dda3d3f7..000000000 --- a/src/w101809eltsc/packer/template.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variables": { - "name": "w101809eltsc", - "description": "Windows 10 Version 1809 Enterprise LTSC" - } -} \ No newline at end of file diff --git a/src/w1021h2e/packer/builders/iso/template.json b/src/w1021h2e/packer/builders/iso/template.json deleted file mode 100644 index 5b43ca168..000000000 --- a/src/w1021h2e/packer/builders/iso/template.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variables": { - "iso_url_local": "{{user `download_directory`}}/19044.1288.211006-0501.21h2_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso", - "iso_url_remote": "https://software-download.microsoft.com/download/sg/444969d5-f34g-4e03-ac9d-1f9786c69161/19044.1288.211006-0501.21h2_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso", - "iso_checksum": "sha256:69efac1df9ec8066341d8c9b62297ddece0e6b805533fdb6dd66bc8034fba27a" - } -} \ No newline at end of file diff --git a/src/w1021h2e/packer/template.json b/src/w1021h2e/packer/template.json deleted file mode 100644 index cb160869a..000000000 --- a/src/w1021h2e/packer/template.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variables": { - "name": "w1021h2e", - "description": "Windows 10 Version 21H2 Enterprise" - } -} \ No newline at end of file diff --git a/src/w1021h2eltsc/packer/builders/iso/floppy/Autounattend.xml b/src/w1021h2eltsc/packer/builders/iso/floppy/Autounattend.xml deleted file mode 100644 index a981c94d6..000000000 --- a/src/w1021h2eltsc/packer/builders/iso/floppy/Autounattend.xml +++ /dev/null @@ -1,134 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<unattend xmlns="urn:schemas-microsoft-com:unattend"> - <settings pass="windowsPE"> - <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <SetupUILanguage> - <UILanguage>en-US</UILanguage> - </SetupUILanguage> - <InputLocale>en-US</InputLocale> - <SystemLocale>en-US</SystemLocale> - <UILanguage>en-US</UILanguage> - <UILanguageFallback>en-US</UILanguageFallback> - <UserLocale>en-US</UserLocale> - </component> - <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <DiskConfiguration> - <Disk wcm:action="add"> - <CreatePartitions> - <CreatePartition wcm:action="add"> - <Order>1</Order> - <Size>500</Size> - <Type>EFI</Type> - </CreatePartition> - <CreatePartition wcm:action="add"> - <Order>2</Order> - <Size>128</Size> - <Type>MSR</Type> - </CreatePartition> - <CreatePartition wcm:action="add"> - <Order>3</Order> - <Extend>true</Extend> - <Type>Primary</Type> - </CreatePartition> - </CreatePartitions> - <DiskID>0</DiskID> - <WillWipeDisk>true</WillWipeDisk> - </Disk> - </DiskConfiguration> - <ImageInstall> - <OSImage> - <InstallFrom> - <MetaData wcm:action="add"> - <Key>/IMAGE/NAME </Key> - <Value>Windows 10 Enterprise LTSC 2021 Evaluation</Value> - </MetaData> - </InstallFrom> - <InstallTo> - <DiskID>0</DiskID> - <PartitionID>3</PartitionID> - </InstallTo> - </OSImage> - </ImageInstall> - <UserData> - <ProductKey> - <WillShowUI>Never</WillShowUI> - </ProductKey> - <AcceptEula>true</AcceptEula> - <FullName>Administrator</FullName> - <Organization>gusztavvargadr</Organization> - </UserData> - </component> - </settings> - <settings pass="offlineServicing"> - <component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <EnableLUA>false</EnableLUA> - </component> - </settings> - <settings pass="specialize"> - <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <OEMInformation> - <HelpCustomized>false</HelpCustomized> - </OEMInformation> - <ComputerName/> - <TimeZone>UTC</TimeZone> - <RegisteredOwner/> - </component> - <component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon> - </component> - <component name="Microsoft-Windows-IE-ESC" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <IEHardenAdmin>false</IEHardenAdmin> - <IEHardenUser>false</IEHardenUser> - </component> - <component name="Microsoft-Windows-OutOfBoxExperience" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <DoNotOpenInitialConfigurationTasksAtLogon>true</DoNotOpenInitialConfigurationTasksAtLogon> - </component> - <component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <SkipAutoActivation>true</SkipAutoActivation> - </component> - </settings> - <settings pass="oobeSystem"> - <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <OOBE> - <HideEULAPage>true</HideEULAPage> - <HideLocalAccountScreen>true</HideLocalAccountScreen> - <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> - <HideOnlineAccountScreens>true</HideOnlineAccountScreens> - <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> - <NetworkLocation>Home</NetworkLocation> - <ProtectYourPC>3</ProtectYourPC> - </OOBE> - <UserAccounts> - <AdministratorPassword> - <Value>Packer42-</Value> - <PlainText>true</PlainText> - </AdministratorPassword> - </UserAccounts> - <RegisteredOwner/> - <AutoLogon> - <Password> - <Value>Packer42-</Value> - <PlainText>true</PlainText> - </Password> - <Enabled>true</Enabled> - <Username>Administrator</Username> - <LogonCount>2</LogonCount> - </AutoLogon> - <FirstLogonCommands> - <SynchronousCommand wcm:action="add"> - <CommandLine>C:\Windows\System32\WindowsPowershell\v1.0\powershell.exe -Command "Set-ExecutionPolicy Bypass -Force; A:\Autounattend.ps1; E:\Autounattend.ps1"</CommandLine> - <Description>Autounattend.ps1</Description> - <Order>1</Order> - <RequiresUserInput>true</RequiresUserInput> - </SynchronousCommand> - </FirstLogonCommands> - </component> - <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <InputLocale>en-US</InputLocale> - <SystemLocale>en-US</SystemLocale> - <UILanguage>en-US</UILanguage> - <UILanguageFallback>en-US</UILanguageFallback> - <UserLocale>en-US</UserLocale> - </component> - </settings> -</unattend> diff --git a/src/w1021h2eltsc/packer/builders/iso/template.json b/src/w1021h2eltsc/packer/builders/iso/template.json deleted file mode 100644 index f38aaf306..000000000 --- a/src/w1021h2eltsc/packer/builders/iso/template.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variables": { - "iso_url_local": "{{user `download_directory`}}/19044.1288.211006-0501.21h2_release_svc_refresh_CLIENT_LTSC_EVAL_x64FRE_en-us.iso", - "iso_url_remote": "https://software-download.microsoft.com/download/db/444969d5-f34g-4e03-ac9d-1f9786c69161/19044.1288.211006-0501.21h2_release_svc_refresh_CLIENT_LTSC_EVAL_x64FRE_en-us.iso", - "iso_checksum": "sha256:e4ab2e3535be5748252a8d5d57539a6e59be8d6726345ee10e7afd2cb89fefb5" - } -} \ No newline at end of file diff --git a/src/w1021h2eltsc/packer/template.json b/src/w1021h2eltsc/packer/template.json deleted file mode 100644 index d3ed3d174..000000000 --- a/src/w1021h2eltsc/packer/template.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variables": { - "name": "w1021h2eltsc", - "description": "Windows 10 Version 21H2 Enterprise LTSC" - } -} \ No newline at end of file diff --git a/src/w1022h2e/packer/builders/iso/template.json b/src/w1022h2e/packer/builders/iso/template.json deleted file mode 100644 index 55e7458de..000000000 --- a/src/w1022h2e/packer/builders/iso/template.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variables": { - "iso_url_local": "{{user `download_directory`}}/19045.2006.220908-0225.22h2_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso", - "iso_url_remote": "https://software-static.download.prss.microsoft.com/dbazure/988969d5-f34g-4e03-ac9d-1f9786c66750/19045.2006.220908-0225.22h2_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso", - "iso_checksum": "sha256:ef7312733a9f5d7d51cfa04ac497671995674ca5e1058d5164d6028f0938d668" - } -} \ No newline at end of file diff --git a/src/w1022h2e/packer/template.json b/src/w1022h2e/packer/template.json deleted file mode 100644 index 8466864b1..000000000 --- a/src/w1022h2e/packer/template.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variables": { - "name": "w1022h2e", - "description": "Windows 10 Version 22H2 Enterprise" - } -} \ No newline at end of file diff --git a/src/w11/packer/builders/iso/floppy/Autounattend.xml b/src/w11/packer/builders/iso/floppy/Autounattend.xml deleted file mode 100644 index 397552816..000000000 --- a/src/w11/packer/builders/iso/floppy/Autounattend.xml +++ /dev/null @@ -1,135 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<unattend xmlns="urn:schemas-microsoft-com:unattend"> - <settings pass="windowsPE"> - <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <SetupUILanguage> - <UILanguage>en-US</UILanguage> - </SetupUILanguage> - <InputLocale>en-US</InputLocale> - <SystemLocale>en-US</SystemLocale> - <UILanguage>en-US</UILanguage> - <UILanguageFallback>en-US</UILanguageFallback> - <UserLocale>en-US</UserLocale> - </component> - <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <RunSynchronous> - <RunSynchronousCommand wcm:action="add"> - <Order>1</Order> - <Description>Disable Windows 11 checks</Description> - <Path>E:\setup.cmd</Path> - </RunSynchronousCommand> - </RunSynchronous> - <DiskConfiguration> - <Disk wcm:action="add"> - <CreatePartitions> - <CreatePartition wcm:action="add"> - <Order>1</Order> - <Size>500</Size> - <Type>EFI</Type> - </CreatePartition> - <CreatePartition wcm:action="add"> - <Order>2</Order> - <Size>128</Size> - <Type>MSR</Type> - </CreatePartition> - <CreatePartition wcm:action="add"> - <Order>3</Order> - <Extend>true</Extend> - <Type>Primary</Type> - </CreatePartition> - </CreatePartitions> - <DiskID>0</DiskID> - <WillWipeDisk>true</WillWipeDisk> - </Disk> - </DiskConfiguration> - <ImageInstall> - <OSImage> - <InstallTo> - <DiskID>0</DiskID> - <PartitionID>3</PartitionID> - </InstallTo> - </OSImage> - </ImageInstall> - <UserData> - <ProductKey> - <WillShowUI>Never</WillShowUI> - </ProductKey> - <AcceptEula>true</AcceptEula> - <FullName>Administrator</FullName> - <Organization>gusztavvargadr</Organization> - </UserData> - </component> - </settings> - <settings pass="offlineServicing"> - <component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <EnableLUA>false</EnableLUA> - </component> - </settings> - <settings pass="specialize"> - <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <OEMInformation> - <HelpCustomized>false</HelpCustomized> - </OEMInformation> - <ComputerName/> - <TimeZone>UTC</TimeZone> - <RegisteredOwner/> - </component> - <component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon> - </component> - <component name="Microsoft-Windows-IE-ESC" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <IEHardenAdmin>false</IEHardenAdmin> - <IEHardenUser>false</IEHardenUser> - </component> - <component name="Microsoft-Windows-OutOfBoxExperience" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <DoNotOpenInitialConfigurationTasksAtLogon>true</DoNotOpenInitialConfigurationTasksAtLogon> - </component> - <component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <SkipAutoActivation>true</SkipAutoActivation> - </component> - </settings> - <settings pass="oobeSystem"> - <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <OOBE> - <HideEULAPage>true</HideEULAPage> - <HideLocalAccountScreen>true</HideLocalAccountScreen> - <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> - <HideOnlineAccountScreens>true</HideOnlineAccountScreens> - <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> - <NetworkLocation>Home</NetworkLocation> - <ProtectYourPC>3</ProtectYourPC> - </OOBE> - <UserAccounts> - <AdministratorPassword> - <Value>Packer42-</Value> - <PlainText>true</PlainText> - </AdministratorPassword> - </UserAccounts> - <RegisteredOwner/> - <AutoLogon> - <Password> - <Value>Packer42-</Value> - <PlainText>true</PlainText> - </Password> - <Enabled>true</Enabled> - <Username>Administrator</Username> - <LogonCount>2</LogonCount> - </AutoLogon> - <FirstLogonCommands> - <SynchronousCommand wcm:action="add"> - <CommandLine>C:\Windows\System32\WindowsPowershell\v1.0\powershell.exe -Command "Set-ExecutionPolicy Bypass -Force; A:\Autounattend.ps1; E:\Autounattend.ps1"</CommandLine> - <Description>Autounattend.ps1</Description> - <Order>1</Order> - <RequiresUserInput>true</RequiresUserInput> - </SynchronousCommand> - </FirstLogonCommands> - </component> - <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <InputLocale>en-US</InputLocale> - <SystemLocale>en-US</SystemLocale> - <UILanguage>en-US</UILanguage> - <UILanguageFallback>en-US</UILanguageFallback> - <UserLocale>en-US</UserLocale> - </component> - </settings> -</unattend> diff --git a/src/w11/packer/builders/iso/template.json b/src/w11/packer/builders/iso/template.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/src/w11/packer/builders/iso/template.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/src/w11/packer/builders/virtualbox-iso/template.json b/src/w11/packer/builders/virtualbox-iso/template.json deleted file mode 100644 index 72cc6bc13..000000000 --- a/src/w11/packer/builders/virtualbox-iso/template.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "variables": { - "virtualbox_guest_os_type": "Windows10_64" - } -} diff --git a/src/w11/packer/builders/vmware-iso/floppy/Autounattend.xml b/src/w11/packer/builders/vmware-iso/floppy/Autounattend.xml deleted file mode 100644 index 1d0732e80..000000000 --- a/src/w11/packer/builders/vmware-iso/floppy/Autounattend.xml +++ /dev/null @@ -1,135 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<unattend xmlns="urn:schemas-microsoft-com:unattend"> - <settings pass="windowsPE"> - <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <SetupUILanguage> - <UILanguage>en-US</UILanguage> - </SetupUILanguage> - <InputLocale>en-US</InputLocale> - <SystemLocale>en-US</SystemLocale> - <UILanguage>en-US</UILanguage> - <UILanguageFallback>en-US</UILanguageFallback> - <UserLocale>en-US</UserLocale> - </component> - <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <RunSynchronous> - <RunSynchronousCommand wcm:action="add"> - <Order>1</Order> - <Description>Disable Windows 11 checks</Description> - <Path>A:\setup.cmd</Path> - </RunSynchronousCommand> - </RunSynchronous> - <DiskConfiguration> - <Disk wcm:action="add"> - <CreatePartitions> - <CreatePartition wcm:action="add"> - <Order>1</Order> - <Size>500</Size> - <Type>EFI</Type> - </CreatePartition> - <CreatePartition wcm:action="add"> - <Order>2</Order> - <Size>128</Size> - <Type>MSR</Type> - </CreatePartition> - <CreatePartition wcm:action="add"> - <Order>3</Order> - <Extend>true</Extend> - <Type>Primary</Type> - </CreatePartition> - </CreatePartitions> - <DiskID>0</DiskID> - <WillWipeDisk>true</WillWipeDisk> - </Disk> - </DiskConfiguration> - <ImageInstall> - <OSImage> - <InstallTo> - <DiskID>0</DiskID> - <PartitionID>3</PartitionID> - </InstallTo> - </OSImage> - </ImageInstall> - <UserData> - <ProductKey> - <WillShowUI>Never</WillShowUI> - </ProductKey> - <AcceptEula>true</AcceptEula> - <FullName>Administrator</FullName> - <Organization>gusztavvargadr</Organization> - </UserData> - </component> - </settings> - <settings pass="offlineServicing"> - <component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <EnableLUA>false</EnableLUA> - </component> - </settings> - <settings pass="specialize"> - <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <OEMInformation> - <HelpCustomized>false</HelpCustomized> - </OEMInformation> - <ComputerName/> - <TimeZone>UTC</TimeZone> - <RegisteredOwner/> - </component> - <component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon> - </component> - <component name="Microsoft-Windows-IE-ESC" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <IEHardenAdmin>false</IEHardenAdmin> - <IEHardenUser>false</IEHardenUser> - </component> - <component name="Microsoft-Windows-OutOfBoxExperience" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <DoNotOpenInitialConfigurationTasksAtLogon>true</DoNotOpenInitialConfigurationTasksAtLogon> - </component> - <component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <SkipAutoActivation>true</SkipAutoActivation> - </component> - </settings> - <settings pass="oobeSystem"> - <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <OOBE> - <HideEULAPage>true</HideEULAPage> - <HideLocalAccountScreen>true</HideLocalAccountScreen> - <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> - <HideOnlineAccountScreens>true</HideOnlineAccountScreens> - <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> - <NetworkLocation>Home</NetworkLocation> - <ProtectYourPC>3</ProtectYourPC> - </OOBE> - <UserAccounts> - <AdministratorPassword> - <Value>Packer42-</Value> - <PlainText>true</PlainText> - </AdministratorPassword> - </UserAccounts> - <RegisteredOwner/> - <AutoLogon> - <Password> - <Value>Packer42-</Value> - <PlainText>true</PlainText> - </Password> - <Enabled>true</Enabled> - <Username>Administrator</Username> - <LogonCount>2</LogonCount> - </AutoLogon> - <FirstLogonCommands> - <SynchronousCommand wcm:action="add"> - <CommandLine>C:\Windows\System32\WindowsPowershell\v1.0\powershell.exe -Command "Set-ExecutionPolicy Bypass -Force; A:\Autounattend.ps1; E:\Autounattend.ps1"</CommandLine> - <Description>Autounattend.ps1</Description> - <Order>1</Order> - <RequiresUserInput>true</RequiresUserInput> - </SynchronousCommand> - </FirstLogonCommands> - </component> - <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <InputLocale>en-US</InputLocale> - <SystemLocale>en-US</SystemLocale> - <UILanguage>en-US</UILanguage> - <UILanguageFallback>en-US</UILanguageFallback> - <UserLocale>en-US</UserLocale> - </component> - </settings> -</unattend> diff --git a/src/w11/packer/builders/vmware-iso/template.json b/src/w11/packer/builders/vmware-iso/template.json deleted file mode 100644 index b8ce9d21a..000000000 --- a/src/w11/packer/builders/vmware-iso/template.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "variables": { - "vmware_guest_os_type": "windows9-64" - } -} \ No newline at end of file diff --git a/src/w11/packer/postprocessors/vagrant-hyperv/Vagrantfile b/src/w11/packer/postprocessors/vagrant-hyperv/Vagrantfile deleted file mode 100644 index a28ad285c..000000000 --- a/src/w11/packer/postprocessors/vagrant-hyperv/Vagrantfile +++ /dev/null @@ -1,13 +0,0 @@ -Vagrant.configure(2) do |config| - config.vm.guest = :windows - config.vm.boot_timeout = 600 - - config.vm.communicator = 'winrm' - config.winssh.shell = 'powershell' - - config.vm.provider 'hyperv' do |h| - h.cpus = 2 - h.memory = 4096 - h.ip_address_timeout = 600 - end -end diff --git a/src/w11/packer/postprocessors/vagrant-virtualbox/Vagrantfile b/src/w11/packer/postprocessors/vagrant-virtualbox/Vagrantfile deleted file mode 100644 index 8c2da128b..000000000 --- a/src/w11/packer/postprocessors/vagrant-virtualbox/Vagrantfile +++ /dev/null @@ -1,14 +0,0 @@ -Vagrant.configure(2) do |config| - config.vm.guest = :windows - config.vm.boot_timeout = 600 - - config.vm.communicator = 'winrm' - config.winssh.shell = 'powershell' - - config.vm.provider 'virtualbox' do |vb| - vb.cpus = 2 - vb.memory = 4096 - end - - config.vm.network :forwarded_port, guest: 3389, host: 53389, auto_correct: true -end diff --git a/src/w11/packer/postprocessors/vagrant-vmware/Vagrantfile b/src/w11/packer/postprocessors/vagrant-vmware/Vagrantfile deleted file mode 100644 index b978d6f97..000000000 --- a/src/w11/packer/postprocessors/vagrant-vmware/Vagrantfile +++ /dev/null @@ -1,14 +0,0 @@ -Vagrant.configure(2) do |config| - config.vm.guest = :windows - config.vm.boot_timeout = 600 - - config.vm.communicator = 'winrm' - config.winssh.shell = 'powershell' - - config.vm.provider 'vmware_desktop' do |vw| - vw.cpus = 2 - vw.memory = 4096 - end - - config.vm.network :forwarded_port, guest: 3389, host: 53389, auto_correct: true -end diff --git a/src/w11/packer/template.json b/src/w11/packer/template.json deleted file mode 100644 index 7a44c993a..000000000 --- a/src/w11/packer/template.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variables": { - "name": "w11", - "description": "Windows 11" - } -} \ No newline at end of file diff --git a/src/w1121h2e/packer/builders/iso/template.json b/src/w1121h2e/packer/builders/iso/template.json deleted file mode 100644 index 1de659e90..000000000 --- a/src/w1121h2e/packer/builders/iso/template.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variables": { - "iso_url_local": "{{user `download_directory`}}/22000.194.210913-1444.co_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso", - "iso_url_remote": "https://software-download.microsoft.com/download/sg/22000.194.210913-1444.co_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso", - "iso_checksum": "sha256:e8b1d2a1a85a09b4bf6154084a8be8e3c814894a15a7bcf3e8e63fcfa9a528cb" - } -} \ No newline at end of file diff --git a/src/w1121h2e/packer/template.json b/src/w1121h2e/packer/template.json deleted file mode 100644 index ff56c8479..000000000 --- a/src/w1121h2e/packer/template.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variables": { - "name": "w1121h2e", - "description": "Windows 11 Version 21H2 Enterprise" - } -} \ No newline at end of file diff --git a/src/w1122h2e/packer/builders/iso/template.json b/src/w1122h2e/packer/builders/iso/template.json deleted file mode 100644 index b829c35ea..000000000 --- a/src/w1122h2e/packer/builders/iso/template.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variables": { - "iso_url_local": "{{user `download_directory`}}/22621.525.220925-0207.ni_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso", - "iso_url_remote": "https://software-static.download.prss.microsoft.com/dbazure/988969d5-f34g-4e03-ac9d-1f9786c66751/22621.525.220925-0207.ni_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso", - "iso_checksum": "sha256:ebbc79106715f44f5020f77bd90721b17c5a877cbc15a3535b99155493a1bb3f" - } -} \ No newline at end of file diff --git a/src/w1122h2e/packer/template.json b/src/w1122h2e/packer/template.json deleted file mode 100644 index 1c0d5bff8..000000000 --- a/src/w1122h2e/packer/template.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variables": { - "name": "w1122h2e", - "description": "Windows 11 Version 22H2 Enterprise" - } -} \ No newline at end of file diff --git a/src/w11ipe/packer/builders/iso/template.json b/src/w11ipe/packer/builders/iso/template.json deleted file mode 100644 index 2ac1a8b3f..000000000 --- a/src/w11ipe/packer/builders/iso/template.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variables": { - "iso_url_local": "{{user `download_directory`}}/Windows11_InsiderPreview_EnterpriseVL_x64_en-us_25951.iso", - "iso_url_remote": "https://app.vagrantup.com/gusztavvargadr-iso/boxes/windows-11-insider-preview/versions/2202.0.2310/providers/iso-hosted/amd64/vagrant.box", - "iso_checksum": "sha256:e771769bc27aec3361bae30ef86addc1f9934553270fea83a38f33d54475dc73" - } -} \ No newline at end of file diff --git a/src/w11ipe/packer/builders/vmware-iso/floppy/Autounattend.xml b/src/w11ipe/packer/builders/vmware-iso/floppy/Autounattend.xml deleted file mode 100644 index 65e7948fe..000000000 --- a/src/w11ipe/packer/builders/vmware-iso/floppy/Autounattend.xml +++ /dev/null @@ -1,141 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<unattend xmlns="urn:schemas-microsoft-com:unattend"> - <settings pass="windowsPE"> - <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <SetupUILanguage> - <UILanguage>en-US</UILanguage> - </SetupUILanguage> - <InputLocale>en-US</InputLocale> - <SystemLocale>en-US</SystemLocale> - <UILanguage>en-US</UILanguage> - <UILanguageFallback>en-US</UILanguageFallback> - <UserLocale>en-US</UserLocale> - </component> - <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <RunSynchronous> - <RunSynchronousCommand wcm:action="add"> - <Order>1</Order> - <Description>Disable Windows 11 checks</Description> - <Path>A:\setup.cmd</Path> - </RunSynchronousCommand> - </RunSynchronous> - <DiskConfiguration> - <Disk wcm:action="add"> - <CreatePartitions> - <CreatePartition wcm:action="add"> - <Order>1</Order> - <Size>500</Size> - <Type>EFI</Type> - </CreatePartition> - <CreatePartition wcm:action="add"> - <Order>2</Order> - <Size>128</Size> - <Type>MSR</Type> - </CreatePartition> - <CreatePartition wcm:action="add"> - <Order>3</Order> - <Extend>true</Extend> - <Type>Primary</Type> - </CreatePartition> - </CreatePartitions> - <DiskID>0</DiskID> - <WillWipeDisk>true</WillWipeDisk> - </Disk> - </DiskConfiguration> - <ImageInstall> - <OSImage> - <InstallFrom> - <MetaData wcm:action="add"> - <Key>/IMAGE/NAME </Key> - <Value>Windows 11 Enterprise</Value> - </MetaData> - </InstallFrom> - <InstallTo> - <DiskID>0</DiskID> - <PartitionID>3</PartitionID> - </InstallTo> - </OSImage> - </ImageInstall> - <UserData> - <ProductKey> - <WillShowUI>Never</WillShowUI> - </ProductKey> - <AcceptEula>true</AcceptEula> - <FullName>Administrator</FullName> - <Organization>gusztavvargadr</Organization> - </UserData> - </component> - </settings> - <settings pass="offlineServicing"> - <component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <EnableLUA>false</EnableLUA> - </component> - </settings> - <settings pass="specialize"> - <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <OEMInformation> - <HelpCustomized>false</HelpCustomized> - </OEMInformation> - <ComputerName/> - <TimeZone>UTC</TimeZone> - <RegisteredOwner/> - </component> - <component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon> - </component> - <component name="Microsoft-Windows-IE-ESC" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <IEHardenAdmin>false</IEHardenAdmin> - <IEHardenUser>false</IEHardenUser> - </component> - <component name="Microsoft-Windows-OutOfBoxExperience" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <DoNotOpenInitialConfigurationTasksAtLogon>true</DoNotOpenInitialConfigurationTasksAtLogon> - </component> - <component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <SkipAutoActivation>true</SkipAutoActivation> - </component> - </settings> - <settings pass="oobeSystem"> - <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <OOBE> - <HideEULAPage>true</HideEULAPage> - <HideLocalAccountScreen>true</HideLocalAccountScreen> - <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> - <HideOnlineAccountScreens>true</HideOnlineAccountScreens> - <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> - <NetworkLocation>Home</NetworkLocation> - <ProtectYourPC>3</ProtectYourPC> - </OOBE> - <UserAccounts> - <AdministratorPassword> - <Value>Packer42-</Value> - <PlainText>true</PlainText> - </AdministratorPassword> - </UserAccounts> - <RegisteredOwner/> - <AutoLogon> - <Password> - <Value>Packer42-</Value> - <PlainText>true</PlainText> - </Password> - <Enabled>true</Enabled> - <Username>Administrator</Username> - <LogonCount>2</LogonCount> - </AutoLogon> - <FirstLogonCommands> - <SynchronousCommand wcm:action="add"> - <CommandLine>C:\Windows\System32\WindowsPowershell\v1.0\powershell.exe -Command "Set-ExecutionPolicy Bypass -Force; A:\Autounattend.ps1; E:\Autounattend.ps1"</CommandLine> - <Description>Autounattend.ps1</Description> - <Order>1</Order> - <RequiresUserInput>true</RequiresUserInput> - </SynchronousCommand> - </FirstLogonCommands> - </component> - <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <InputLocale>en-US</InputLocale> - <SystemLocale>en-US</SystemLocale> - <UILanguage>en-US</UILanguage> - <UILanguageFallback>en-US</UILanguageFallback> - <UserLocale>en-US</UserLocale> - </component> - </settings> -</unattend> diff --git a/src/w11ipe/packer/builders/vmware-iso/template.json b/src/w11ipe/packer/builders/vmware-iso/template.json deleted file mode 100644 index 7a73a41bf..000000000 --- a/src/w11ipe/packer/builders/vmware-iso/template.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/src/w11ipe/packer/template.json b/src/w11ipe/packer/template.json deleted file mode 100644 index 16d1a87c6..000000000 --- a/src/w11ipe/packer/template.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variables": { - "name": "w11ipe", - "description": "Windows 11 Insider Preview Enterprise" - } -} \ No newline at end of file diff --git a/src/ws2019s/packer/builders/iso/floppy/Autounattend.ps1 b/src/windows/boot/autounattend-first-logon.ps1 similarity index 92% rename from src/ws2019s/packer/builders/iso/floppy/Autounattend.ps1 rename to src/windows/boot/autounattend-first-logon.ps1 index 7b7e79521..973513cfa 100644 --- a/src/ws2019s/packer/builders/iso/floppy/Autounattend.ps1 +++ b/src/windows/boot/autounattend-first-logon.ps1 @@ -1,10 +1,11 @@ Write-Host "Configure PowerShell" -Set-ExecutionPolicy RemoteSigned -Force $ProgressPreference = 'SilentlyContinue' [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Write-Host "Install Chocolatey" -$env:chocolateyVersion = '1.4.0' +%{ for chocolatey_version in compact([lookup(boot, "boot_chocolatey_version", "2.2.2")]) ~} +$env:chocolateyVersion = '${chocolatey_version}' +%{ endfor ~} Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-WebRequest https://chocolatey.org/install.ps1 -UseBasicParsing | Invoke-Expression Write-Host "Install OpenSSH" diff --git a/src/w11ipe/packer/builders/iso/floppy/Autounattend.xml b/src/windows/boot/autounattend.xml similarity index 93% rename from src/w11ipe/packer/builders/iso/floppy/Autounattend.xml rename to src/windows/boot/autounattend.xml index a981d9eae..44758034f 100644 --- a/src/w11ipe/packer/builders/iso/floppy/Autounattend.xml +++ b/src/windows/boot/autounattend.xml @@ -12,13 +12,15 @@ <UserLocale>en-US</UserLocale> </component> <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> +%{ for setup_script in compact([lookup(boot, "boot_setup_script", "")]) ~} <RunSynchronous> <RunSynchronousCommand wcm:action="add"> <Order>1</Order> - <Description>Disable Windows 11 checks</Description> - <Path>E:\setup.cmd</Path> + <Description>Setup</Description> + <Path>E:\${setup_script}</Path> </RunSynchronousCommand> </RunSynchronous> +%{ endfor ~} <DiskConfiguration> <Disk wcm:action="add"> <CreatePartitions> @@ -44,12 +46,14 @@ </DiskConfiguration> <ImageInstall> <OSImage> +%{ for image_name in compact([lookup(boot, "boot_image_name", "")]) ~} <InstallFrom> <MetaData wcm:action="add"> <Key>/IMAGE/NAME </Key> - <Value>Windows 11 Enterprise</Value> + <Value>${image_name}</Value> </MetaData> </InstallFrom> +%{ endfor ~} <InstallTo> <DiskID>0</DiskID> <PartitionID>3</PartitionID> @@ -59,6 +63,9 @@ <UserData> <ProductKey> <WillShowUI>Never</WillShowUI> +%{ for product_key in compact([lookup(boot, "boot_product_key", "")]) ~} + <Key>${product_key}</Key> +%{ endfor ~} </ProductKey> <AcceptEula>true</AcceptEula> <FullName>Administrator</FullName> @@ -123,8 +130,8 @@ </AutoLogon> <FirstLogonCommands> <SynchronousCommand wcm:action="add"> - <CommandLine>C:\Windows\System32\WindowsPowershell\v1.0\powershell.exe -Command "Set-ExecutionPolicy Bypass -Force; A:\Autounattend.ps1; E:\Autounattend.ps1"</CommandLine> - <Description>Autounattend.ps1</Description> + <CommandLine>C:\Windows\System32\WindowsPowershell\v1.0\powershell.exe -Command "Set-ExecutionPolicy Bypass -Force; E:\autounattend-first-logon.ps1"</CommandLine> + <Description>First Logon</Description> <Order>1</Order> <RequiresUserInput>true</RequiresUserInput> </SynchronousCommand> diff --git a/src/windows/build.native.pkr.hcl b/src/windows/build.native.pkr.hcl new file mode 100644 index 000000000..a4a30e0a2 --- /dev/null +++ b/src/windows/build.native.pkr.hcl @@ -0,0 +1,138 @@ +variable "userprofile_directory" { + type = string + default = env("USERPROFILE") +} + +variable "home_directory" { + type = string + default = env("HOME") +} + +locals { + native_iso_sources = { + virtualbox = "virtualbox-iso.core" + vmware = "vmware-iso.core" + hyperv = "hyperv-iso.core" + } + + native_import_sources = { + virtualbox = "virtualbox-ovf.core" + vmware = "vmware-vmx.core" + hyperv = "hyperv-vmcx.core" + } + + native_iso = contains(keys(local.image_options.native), "source_iso_checksum") + downloads_directory = "${coalesce(var.userprofile_directory, var.home_directory)}/Downloads" + + source_options_native = { + iso_urls = local.native_iso ? [ + "${local.downloads_directory}/${local.image_options.native.source_iso_url_local}", + local.image_options.native.source_iso_url_remote + ] : [] + iso_checksum = local.native_iso ? local.image_options.native.source_iso_checksum : "" + cd_content = merge({ + "autounattend.xml" = templatefile("${path.root}/boot/autounattend.xml", { boot = local.image_options.native }) + "autounattend-first-logon.ps1" = templatefile("${path.root}/boot/autounattend-first-logon.ps1", { boot = local.image_options.native }) + }, { + for setup_script in compact([lookup(local.image_options.native, "boot_setup_script", "")]) : setup_script => file("${path.cwd}/${setup_script}") + }) + + import_directory = local.native_build ? "${path.cwd}/../../artifacts/${lookup(local.image_options.native, "source_image", "")}/${local.image_provider}/native" : "" + + boot_command = local.native_iso ? [ + "<enter><wait><enter><wait><enter>" + ] : [] + shutdown_command = "shutdown /s /t 10" + } +} + +build { + name = "native-restore" + + sources = ["null.core"] + + provisioner "shell-local" { + inline = [ + "chef install --chef-license accept-silent", + "chef update --attributes", + "chef export ${local.artifacts_directory}/chef --force" + ] + } +} + +locals { + chef_destination = "C:/Windows/Temp/chef/" + chef_max_retries = 10 + chef_start_retry_timeout = "30m" + chef_attributes = lookup(local.image_options.native, "chef_attributes", "") + chef_keep = lookup(local.image_options.native, "chef_keep", "false") +} + +build { + name = "native-build" + + sources = local.native_build ? (local.native_iso ? compact([lookup(local.native_iso_sources, local.image_provider, "")]) : compact([lookup(local.native_import_sources, local.image_provider, "")])) : ["null.core"] + + provisioner "powershell" { + script = "${path.root}/chef/initialize.ps1" + + elevated_user = local.communicator.username + elevated_password = local.communicator.password + } + + provisioner "file" { + source = "${local.artifacts_directory}/chef/" + destination = local.chef_destination + } + + provisioner "file" { + sources = fileset(path.cwd, "attributes.*.json") + destination = local.chef_destination + } + + provisioner "powershell" { + script = "${path.root}/chef/apply.ps1" + max_retries = local.chef_max_retries + pause_before = "60s" + start_retry_timeout = local.chef_start_retry_timeout + + env = { + CHEF_ATTRIBUTES = local.chef_attributes + } + + elevated_user = local.communicator.username + elevated_password = local.communicator.password + } + + provisioner "powershell" { + script = "${path.root}/chef/cleanup.ps1" + + env = { + CHEF_KEEP = local.chef_keep + } + + elevated_user = local.communicator.username + elevated_password = local.communicator.password + } + + post-processor "manifest" { + output = "${local.artifacts_directory}/manifest.json" + } + + post-processor "checksum" { + checksum_types = ["sha256"] + output = "${local.artifacts_directory}/checksum.{{ .ChecksumType }}" + } +} + +build { + name = "native-test" + + sources = ["null.core"] +} + +build { + name = "native-publish" + + sources = ["null.core"] +} diff --git a/src/windows/build.vagrant.pkr.hcl b/src/windows/build.vagrant.pkr.hcl new file mode 100644 index 000000000..6d7afd415 --- /dev/null +++ b/src/windows/build.vagrant.pkr.hcl @@ -0,0 +1,178 @@ +packer { + required_plugins { + vagrant = { + version = "~> 1.1" + source = "github.com/hashicorp/vagrant" + } + } +} + +locals { + vagrant_import_sources = { + virtualbox = "virtualbox-ovf.core" + vmware = "vmware-vmx.core" + hyperv = "hyperv-vmcx.core" + } + + source_options_vagrant = { + iso_urls = [] + iso_checksum = "" + cd_content = {} + + import_directory = local.vagrant_build ? "${local.artifacts_directory}/../native" : "" + + boot_command = compact([]) + shutdown_command = "C:/Windows/Temp/packer/shutdown.cmd" + } + + vagrant_providers = { + virtualbox = "virtualbox" + vmware = "vmware_desktop" + hyperv = "hyperv" + } +} + +locals { + vagrant_options_core = { + cpus = "2" + memory = "2048" + ports = "3389" + architecture = "amd64" + } + vagrant_options_image = lookup(local.image_options, "vagrant", {}) + vagrant_options = merge(local.vagrant_options_core, local.vagrant_options_image) +} + +source "file" "Vagrantfile" { + content = templatefile("${path.root}/vagrant/template.Vagrantfile", { options = local.vagrant_options }) + target = "${local.artifacts_directory}/Vagrantfile" +} + +build { + name = "vagrant-restore" + + sources = ["file.Vagrantfile"] +} + +locals { + packer_destination = "C:/Windows/Temp/packer/" +} + +build { + name = "vagrant-build" + + sources = local.vagrant_build ? compact([lookup(local.vagrant_import_sources, local.image_provider, "")]) : ["null.core"] + + provisioner "powershell" { + inline = ["mkdir -Force ${local.packer_destination}"] + } + + provisioner "file" { + source = "${path.root}/vagrant/" + destination = local.packer_destination + } + + provisioner "powershell" { + script = "${path.root}/vagrant/cleanup.ps1" + + elevated_user = local.communicator.username + elevated_password = local.communicator.password + } + + post-processors { + post-processor "vagrant" { + vagrantfile_template = "${local.artifacts_directory}/Vagrantfile" + output = "${local.artifacts_directory}/vagrant/vagrant.box" + } + + post-processor "manifest" { + output = "${local.artifacts_directory}/manifest.json" + } + + post-processor "checksum" { + checksum_types = ["sha256"] + output = "${local.artifacts_directory}/checksum.{{ .ChecksumType }}" + } + } +} + +build { + name = "vagrant-test" + + sources = ["null.core"] + + provisioner "shell-local" { + inline = [ + "vagrant destroy -f ${var.image}", + ] + + valid_exit_codes = [0, 1] + + env = { + VAGRANT_BOX_URL = "${local.artifacts_directory}/vagrant/vagrant.box" + } + } + + provisioner "shell-local" { + inline = [ + "vagrant up ${var.image} --provider ${lookup(local.vagrant_providers, local.image_provider, "")}", + ] + + max_retries = 1 + + env = { + VAGRANT_BOX_URL = "${local.artifacts_directory}/vagrant/vagrant.box" + } + } + + provisioner "shell-local" { + inline = [ + "vagrant destroy -f ${var.image}", + ] + + valid_exit_codes = [0, 1] + + env = { + VAGRANT_BOX_URL = "${local.artifacts_directory}/vagrant/vagrant.box" + } + } +} + +build { + name = "vagrant-publish" + + sources = ["null.core"] + + post-processors { + post-processor "artifice" { + files = ["${local.artifacts_directory}/vagrant/vagrant.box"] + } + + post-processor "vagrant-cloud" { + box_tag = "${local.image_author}/${lookup(local.vagrant_options, "box_name", replace(local.image_name, "/", "-"))}" + version = local.image_version + box_checksum = "sha256:${split("\t", file("${local.artifacts_directory}/checksum.sha256"))[0]}" + architecture = local.vagrant_options.architecture + default_architecture = local.vagrant_options.architecture + } + } + + dynamic "post-processors" { + for_each = compact([lookup(local.vagrant_options, "box_alias", "")]) + + content { + post-processor "artifice" { + files = ["${local.artifacts_directory}/vagrant/vagrant.box"] + } + + post-processor "vagrant-cloud" { + box_tag = "${local.image_author}/${post-processors.value}" + version = local.image_version + box_download_url = "https://app.vagrantup.com/${local.image_author}/boxes/${lookup(local.vagrant_options, "box_name", replace(local.image_name, "/", "-"))}/versions/${local.image_version}/providers/${lookup(local.vagrant_providers, local.image_provider, "")}/${local.vagrant_options.architecture}/vagrant.box" + box_checksum = "sha256:${split("\t", file("${local.artifacts_directory}/checksum.sha256"))[0]}" + architecture = local.vagrant_options.architecture + default_architecture = local.vagrant_options.architecture + } + } + } +} diff --git a/src/windows/chef/Policyfile.rb b/src/windows/chef/Policyfile.rb new file mode 100644 index 000000000..da9805fa4 --- /dev/null +++ b/src/windows/chef/Policyfile.rb @@ -0,0 +1,6 @@ +require "#{File.dirname(__FILE__)}/../../../lib/gusztavvargadr/chef/src/Policyfile" + +def gusztavvargadr_packer_windows_sources + gusztavvargadr_chef_sources + default_source :chef_repo, "#{File.dirname(__FILE__)}/cookbooks" +end diff --git a/src/windows/chef/apply.ps1 b/src/windows/chef/apply.ps1 new file mode 100644 index 000000000..76a928663 --- /dev/null +++ b/src/windows/chef/apply.ps1 @@ -0,0 +1,13 @@ +$ErrorActionPreference = 'Stop' +$ProgressPreference = 'SilentlyContinue' + +cd C:/Windows/Temp/chef + +$runOptions = "--local-mode" + +if (![string]::IsNullOrEmpty($env:CHEF_ATTRIBUTES)) { + $runOptions = "$($runOptions) --json-attributes attributes.$($env:CHEF_ATTRIBUTES).json" +} + +$env:CHEF_LICENSE = "accept-silent" +Invoke-Expression "C:/opscode/chef/bin/chef-client.bat $($runOptions)" diff --git a/src/windows/chef/cleanup.ps1 b/src/windows/chef/cleanup.ps1 new file mode 100644 index 000000000..8849ff63e --- /dev/null +++ b/src/windows/chef/cleanup.ps1 @@ -0,0 +1,59 @@ +$ErrorActionPreference = 'Stop' +$ProgressPreference = 'SilentlyContinue' + +if ($env:CHEF_KEEP -ne "true") { + $app = Get-WmiObject -Class Win32_Product | Where-Object -Property Name -Match "Chef Infra Client" + $app.Uninstall() + + $userKey = [Microsoft.Win32.Registry]::CurrentUser.OpenSubKey('Environment',$true) + $userPath = $userKey.GetValue('PATH', [string]::Empty, 'DoNotExpandEnvironmentNames').ToString() + + $machineKey = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey('SYSTEM\ControlSet001\Control\Session Manager\Environment\',$true) + $machinePath = $machineKey.GetValue('PATH', [string]::Empty, 'DoNotExpandEnvironmentNames').ToString() + + if ($userPath -like "*$env:ChocolateyInstall*") { + $newUserPATH = @( + $userPath -split [System.IO.Path]::PathSeparator | + Where-Object { $_ -and $_ -ne "$env:ChocolateyInstall\bin" } + ) -join [System.IO.Path]::PathSeparator + + $userKey.SetValue('PATH', $newUserPATH, 'ExpandString') + } + + if ($machinePath -like "*$env:ChocolateyInstall*") { + $newMachinePATH = @( + $machinePath -split [System.IO.Path]::PathSeparator | + Where-Object { $_ -and $_ -ne "$env:ChocolateyInstall\bin" } + ) -join [System.IO.Path]::PathSeparator + + $machineKey.SetValue('PATH', $newMachinePATH, 'ExpandString') + } + + $agentService = Get-Service -Name chocolatey-agent -ErrorAction SilentlyContinue + if ($agentService -and $agentService.Status -eq 'Running') { + $agentService.Stop() + } + + Remove-Item -Path $env:ChocolateyInstall -Recurse -Force + + 'ChocolateyInstall', 'ChocolateyLastPathUpdate' | ForEach-Object { + foreach ($scope in 'User', 'Machine') { + [Environment]::SetEnvironmentVariable($_, [string]::Empty, $scope) + } + } + + $machineKey.Close() + $userKey.Close() + + if ($env:ChocolateyToolsLocation -and (Test-Path $env:ChocolateyToolsLocation)) { + Remove-Item -Path $env:ChocolateyToolsLocation -Recurse -Force + } + + foreach ($scope in 'User', 'Machine') { + [Environment]::SetEnvironmentVariable('ChocolateyToolsLocation', [string]::Empty, $scope) + } +} + +Optimize-Volume -DriveLetter C -Analyze -Defrag + +sdelete -accepteula -nobanner -q -z C: diff --git a/src/w/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_w/metadata.rb b/src/windows/chef/cookbooks/gusztavvargadr_packer_windows/metadata.rb similarity index 77% rename from src/w/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_w/metadata.rb rename to src/windows/chef/cookbooks/gusztavvargadr_packer_windows/metadata.rb index 51644c767..17a98ef58 100644 --- a/src/w/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_w/metadata.rb +++ b/src/windows/chef/cookbooks/gusztavvargadr_packer_windows/metadata.rb @@ -1,4 +1,4 @@ -name 'gusztavvargadr_packer_w' +name 'gusztavvargadr_packer_windows' description 'Installs/Configures Packer Windows' license 'Unlicense' maintainer 'Gusztáv Varga' @@ -7,5 +7,5 @@ version '0.0.0' depends 'gusztavvargadr_windows' -chef_version '>= 16.0' +chef_version '>= 18.0' supports 'windows' diff --git a/src/windows/chef/cookbooks/gusztavvargadr_packer_windows/recipes/apply.rb b/src/windows/chef/cookbooks/gusztavvargadr_packer_windows/recipes/apply.rb new file mode 100644 index 000000000..3a7fc0e8b --- /dev/null +++ b/src/windows/chef/cookbooks/gusztavvargadr_packer_windows/recipes/apply.rb @@ -0,0 +1,12 @@ +gusztavvargadr_windows_update '' do + action :install +end + +chocolatey_package 'chocolatey' do + action :upgrade +end + +reboot 'gusztavvargadr_packer_windows::apply' do + action :reboot_now + only_if { reboot_pending? } +end diff --git a/src/windows/chef/cookbooks/gusztavvargadr_packer_windows/recipes/cleanup.rb b/src/windows/chef/cookbooks/gusztavvargadr_packer_windows/recipes/cleanup.rb new file mode 100644 index 000000000..0bf373dc3 --- /dev/null +++ b/src/windows/chef/cookbooks/gusztavvargadr_packer_windows/recipes/cleanup.rb @@ -0,0 +1,32 @@ +reboot 'gusztavvargadr_packer_windows::cleanup' do + action :reboot_now + only_if { reboot_pending? } +end + +powershell_script 'Clearing temporary files' do + code <<-EOH + @( + "$env:localappdata\\temp\\*", + "$env:windir\\logs", + "$env:windir\\panther", + "$env:programdata\\Microsoft\\Windows Defender\\Scans\\*" + ) | % { + Write-Host "Removing $_" + try { + Takeown /d Y /R /f $_ + Icacls $_ /GRANT:r administrators:F /T /c /q 2>&1 | Out-Null + Remove-Item $_ -Recurse -Force | Out-Null + } catch { $global:error.RemoveAt(0) } + } + EOH + action :run +end + +gusztavvargadr_windows_update '' do + action :cleanup +end + +reboot 'gusztavvargadr_packer_windows::cleanup' do + action :reboot_now + only_if { reboot_pending? } +end diff --git a/src/windows/chef/cookbooks/gusztavvargadr_packer_windows/recipes/default.rb b/src/windows/chef/cookbooks/gusztavvargadr_packer_windows/recipes/default.rb new file mode 100644 index 000000000..5caa7a492 --- /dev/null +++ b/src/windows/chef/cookbooks/gusztavvargadr_packer_windows/recipes/default.rb @@ -0,0 +1,3 @@ +include_recipe 'gusztavvargadr_packer_windows::initialize' +include_recipe 'gusztavvargadr_packer_windows::apply' +include_recipe 'gusztavvargadr_packer_windows::cleanup' diff --git a/src/w/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_w/recipes/prepare.rb b/src/windows/chef/cookbooks/gusztavvargadr_packer_windows/recipes/initialize.rb similarity index 76% rename from src/w/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_w/recipes/prepare.rb rename to src/windows/chef/cookbooks/gusztavvargadr_packer_windows/recipes/initialize.rb index f514feb93..04b8c1dc8 100644 --- a/src/w/packer/provisioners/chef/cookbooks/gusztavvargadr_packer_w/recipes/prepare.rb +++ b/src/windows/chef/cookbooks/gusztavvargadr_packer_windows/recipes/initialize.rb @@ -3,14 +3,10 @@ action :add end -reboot 'windows-uac' do - action :nothing -end - windows_uac '' do enable_uac false action :configure - notifies :request_reboot, 'reboot[windows-uac]' + notifies :request_reboot, 'reboot[gusztavvargadr_packer_windows]', :immediately end registry_key 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System' do @@ -23,8 +19,8 @@ action :create end -gusztavvargadr_windows_updates '' do - action [:initialize] +gusztavvargadr_windows_update '' do + action :initialize end registry_key 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Schedule\\Maintenance' do @@ -77,12 +73,9 @@ end if vbox? - vbox_guest_additions_installed = powershell_out('choco list -i').stdout.downcase.include? 'virtualbox' - unless vbox_guest_additions_installed - reboot 'vbox' do - action :nothing - end + vbox_version = (powershell_out('& "C:/Program Files/Oracle/VirtualBox Guest Additions/VBoxControl.exe" -v').stdout rescue '').strip + unless vbox_version.include?('6.') vbox_version = powershell_out('cat $env:HOME/.vbox_version').stdout.strip vbox_guest_additions_path = "#{Chef::Config['file_cache_path']}/VBoxGuestAdditions.iso" vbox_guest_additions_source = "https://download.virtualbox.org/virtualbox/#{vbox_version}/VBoxGuestAdditions_#{vbox_version}.iso" @@ -112,9 +105,9 @@ EOH cwd 'Z:' action :run - notifies :request_reboot, 'reboot[vbox]' + notifies :request_reboot, 'reboot[gusztavvargadr_packer_windows]', :immediately end - + gusztavvargadr_windows_iso '' do iso_path vbox_guest_additions_path iso_drive_letter 'Z' @@ -124,13 +117,22 @@ end if vmware? - reboot 'vmware' do - action :nothing - end + vmware_version = (powershell_out('& "C:/Program Files/VMware/VMware Tools/VMwareToolboxCmd.exe" -v').stdout rescue '').strip - chocolatey_package 'vmware-tools' do - returns [0, 2, 3010] - action :install - notifies :request_reboot, 'reboot[vmware]' + unless vmware_version.include?('12.') + chocolatey_package 'vmware-tools' do + returns [0, 2, 3010] + action :install + notifies :request_reboot, 'reboot[gusztavvargadr_packer_windows]', :immediately + end end end + +reboot 'gusztavvargadr_packer_windows' do + action :nothing +end + +reboot 'gusztavvargadr_packer_windows::initialize' do + action :reboot_now + only_if { reboot_pending? } +end diff --git a/src/windows/chef/initialize.ps1 b/src/windows/chef/initialize.ps1 new file mode 100644 index 000000000..b8e4fd2ec --- /dev/null +++ b/src/windows/chef/initialize.ps1 @@ -0,0 +1,16 @@ +$ErrorActionPreference = 'Stop' +$ProgressPreference = 'SilentlyContinue' + +mkdir -Force C:/Windows/Temp/chef + +If ((Get-Command "C:/opscode/chef/bin/chef-client.bat" -ErrorAction Ignore).Count -eq 0) { + . { iwr -useb https://omnitruck.chef.io/install.ps1 } | iex; install -project chef -version 18.3.0 +} +C:/opscode/chef/bin/chef-client.bat --version + +If ((Get-Command "choco" -ErrorAction Ignore).Count -eq 0) { + Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) +} +choco --version + +shutdown /r /t 10 diff --git a/src/windows/core.pkr.hcl b/src/windows/core.pkr.hcl new file mode 100644 index 000000000..2971b7158 --- /dev/null +++ b/src/windows/core.pkr.hcl @@ -0,0 +1,40 @@ +packer { + required_version = "~> 1.9" +} + +variable "author" { + type = string +} + +variable "version" { + type = string +} + +variable "images" { + type = map(map(map(string))) +} + +variable "image" { + type = string +} + +variable "provider" { + type = string +} + +variable "build" { + type = string +} + +locals { + image_options = var.images[var.image] + + image_author = var.author + image_name = "${basename(path.cwd)}/${var.image}" + image_description = local.image_options.core.image_description + image_version = "${local.image_options.core.image_version}.${var.version}" + image_provider = var.provider + image_build = var.build + + artifacts_directory = "${path.cwd}/../../artifacts/${local.image_name}/${local.image_provider}/${var.build}" +} diff --git a/src/windows/source.amazon-ebs.pkr.hcl b/src/windows/source.amazon-ebs.pkr.hcl new file mode 100644 index 000000000..80241c4e8 --- /dev/null +++ b/src/windows/source.amazon-ebs.pkr.hcl @@ -0,0 +1,58 @@ +packer { + required_plugins { + amazon = { + version = "~> 1.2" + source = "github.com/hashicorp/amazon" + } + } +} + +source "amazon-ebs" "core" { + ami_name = local.vm_name + + spot_price = "auto" + spot_instance_types = ["t3.xlarge"] + + ebs_optimized = true + + launch_block_device_mappings { + device_name = "/dev/sda1" + volume_size = "31" + volume_type = "gp3" + delete_on_termination = true + } + + source_ami_filter { + filters = { + // name = "Windows_Server-2022-English-Full-Base-*" + virtualization-type = "hvm" + root-device-type = "ebs" + } + + owners = ["amazon"] + + most_recent = true + } + + // user_data = "<powershell>\r\n${file("${path.root}/boot/autounattend-first-logon.ps1")}\r\n</powershell>" + + tags = { + "Name" = local.vm_name + "packer" = "" + } + + run_tags = { + "Name" = local.vm_name + "packer" = "" + } + + spot_tags = { + "Name" = local.vm_name + "packer" = "" + } + + communicator = local.communicator.type + ssh_username = local.communicator.username + ssh_password = local.communicator.password + ssh_timeout = local.communicator.timeout +} diff --git a/src/windows/source.core.pkr.hcl b/src/windows/source.core.pkr.hcl new file mode 100644 index 000000000..7ce03ed26 --- /dev/null +++ b/src/windows/source.core.pkr.hcl @@ -0,0 +1,34 @@ +locals { + timestamp = "${formatdate("YYYYMMDD'-'hhmmss", timestamp())}" + + source_options_core = { + vm_name = "packer-${local.timestamp}" + headless = true + output_directory = "${local.artifacts_directory}/image" + + cpus = 4 + memory = 8192 + disk_size = 130048 + + boot_wait = "1s" + shutdown_timeout = "5m" + } + + communicator = { + type = "ssh" + username = "Administrator" + password = "Packer42-" + timeout = "15m" + } + + native_build = local.image_build == "native" + vagrant_build = local.image_build == "vagrant" +} + +locals { + source_options_build = merge(local.source_options_core, local.native_build ? local.source_options_native : local.source_options_vagrant) +} + +source "null" "core" { + communicator = "none" +} diff --git a/src/windows/source.hyperv.pkr.hcl b/src/windows/source.hyperv.pkr.hcl new file mode 100644 index 000000000..3c6c8ab9d --- /dev/null +++ b/src/windows/source.hyperv.pkr.hcl @@ -0,0 +1,97 @@ +packer { + required_plugins { + hyperv = { + version = "~> 1.1" + source = "github.com/hashicorp/hyperv" + } + } +} + +variable "hyperv_switch" { + type = string + default = "Default Switch" +} + +locals { + hyperv_source_options = { + generation = 2 + configuration_version = "9.0" + enable_virtualization_extensions = false + enable_dynamic_memory = false + enable_secure_boot = true + secure_boot_template = "MicrosoftWindows" + switch_name = var.hyperv_switch + enable_mac_spoofing = true + + boot_wait = "-1s" + } +} + +locals { + hyperv_iso_source_options = merge(local.source_options_build, local.hyperv_source_options, lookup(local.image_options, "hyperv", {})) +} + +source "hyperv-iso" "core" { + vm_name = local.hyperv_iso_source_options.vm_name + headless = local.hyperv_iso_source_options.headless + output_directory = local.hyperv_iso_source_options.output_directory + + cpus = local.hyperv_iso_source_options.cpus + memory = local.hyperv_iso_source_options.memory + disk_size = local.hyperv_iso_source_options.disk_size + iso_urls = local.hyperv_iso_source_options.iso_urls + iso_checksum = local.hyperv_iso_source_options.iso_checksum + cd_content = local.hyperv_iso_source_options.cd_content + + generation = local.hyperv_iso_source_options.generation + configuration_version = local.hyperv_iso_source_options.configuration_version + enable_virtualization_extensions = local.hyperv_iso_source_options.enable_virtualization_extensions + enable_dynamic_memory = local.hyperv_iso_source_options.enable_dynamic_memory + enable_secure_boot = local.hyperv_iso_source_options.enable_secure_boot + secure_boot_template = local.hyperv_iso_source_options.secure_boot_template + switch_name = local.hyperv_iso_source_options.switch_name + enable_mac_spoofing = local.hyperv_iso_source_options.enable_mac_spoofing + + boot_command = local.hyperv_iso_source_options.boot_command + boot_wait = local.hyperv_iso_source_options.boot_wait + shutdown_command = local.hyperv_iso_source_options.shutdown_command + shutdown_timeout = local.hyperv_iso_source_options.shutdown_timeout + + communicator = local.communicator.type + ssh_username = local.communicator.username + ssh_password = local.communicator.password + ssh_timeout = local.communicator.timeout +} + +locals { + hyperv_vmcx_source_options = merge(local.source_options_build, local.hyperv_source_options, lookup(local.image_options, "hyperv", {})) +} + +source "hyperv-vmcx" "core" { + vm_name = local.hyperv_vmcx_source_options.vm_name + headless = local.hyperv_vmcx_source_options.headless + output_directory = local.hyperv_vmcx_source_options.output_directory + + cpus = local.hyperv_vmcx_source_options.cpus + memory = local.hyperv_vmcx_source_options.memory + clone_from_vmcx_path = "${local.hyperv_vmcx_source_options.import_directory}/${join("", fileset(local.hyperv_vmcx_source_options.import_directory, "**/*.vmcx"))}" + + generation = local.hyperv_vmcx_source_options.generation + configuration_version = local.hyperv_vmcx_source_options.configuration_version + enable_virtualization_extensions = local.hyperv_vmcx_source_options.enable_virtualization_extensions + enable_dynamic_memory = local.hyperv_vmcx_source_options.enable_dynamic_memory + enable_secure_boot = local.hyperv_vmcx_source_options.enable_secure_boot + secure_boot_template = local.hyperv_vmcx_source_options.secure_boot_template + switch_name = local.hyperv_vmcx_source_options.switch_name + enable_mac_spoofing = local.hyperv_vmcx_source_options.enable_mac_spoofing + + boot_command = local.hyperv_vmcx_source_options.boot_command + boot_wait = local.hyperv_vmcx_source_options.boot_wait + shutdown_command = local.hyperv_vmcx_source_options.shutdown_command + shutdown_timeout = local.hyperv_vmcx_source_options.shutdown_timeout + + communicator = local.communicator.type + ssh_username = local.communicator.username + ssh_password = local.communicator.password + ssh_timeout = local.communicator.timeout +} diff --git a/src/windows/source.virtualbox.pkr.hcl b/src/windows/source.virtualbox.pkr.hcl new file mode 100644 index 000000000..392b82fab --- /dev/null +++ b/src/windows/source.virtualbox.pkr.hcl @@ -0,0 +1,81 @@ +packer { + required_plugins { + virtualbox = { + version = "~> 1.0" + source = "github.com/hashicorp/virtualbox" + } + } +} + +locals { + virtualbox_source_options = { + guest_additions_mode = "disable" + firmware = "efi" + nested_virt = false + hard_drive_interface = "sata" + gfx_controller = "vboxsvga" + gfx_vram_size = 64 + post_shutdown_delay = "5s" + } +} + +locals { + virtualbox_iso_source_options = merge(local.source_options_build, local.virtualbox_source_options, lookup(local.image_options, "virtualbox", {})) +} + +source "virtualbox-iso" "core" { + vm_name = local.virtualbox_iso_source_options.vm_name + headless = local.virtualbox_iso_source_options.headless + output_directory = local.virtualbox_iso_source_options.output_directory + + cpus = local.virtualbox_iso_source_options.cpus + memory = local.virtualbox_iso_source_options.memory + disk_size = local.virtualbox_iso_source_options.disk_size + iso_urls = local.virtualbox_iso_source_options.iso_urls + iso_checksum = local.virtualbox_iso_source_options.iso_checksum + cd_content = local.virtualbox_iso_source_options.cd_content + + guest_os_type = local.virtualbox_iso_source_options.guest_os_type + guest_additions_mode = local.virtualbox_iso_source_options.guest_additions_mode + firmware = local.virtualbox_iso_source_options.firmware + nested_virt = local.virtualbox_iso_source_options.nested_virt + hard_drive_interface = local.virtualbox_iso_source_options.hard_drive_interface + gfx_controller = local.virtualbox_iso_source_options.gfx_controller + gfx_vram_size = local.virtualbox_iso_source_options.gfx_vram_size + post_shutdown_delay = local.virtualbox_iso_source_options.post_shutdown_delay + + boot_command = local.virtualbox_iso_source_options.boot_command + boot_wait = local.virtualbox_iso_source_options.boot_wait + shutdown_command = local.virtualbox_iso_source_options.shutdown_command + shutdown_timeout = local.virtualbox_iso_source_options.shutdown_timeout + + communicator = local.communicator.type + ssh_username = local.communicator.username + ssh_password = local.communicator.password + ssh_timeout = local.communicator.timeout +} + +locals { + virtualbox_ovf_source_options = merge(local.source_options_build, local.virtualbox_source_options, lookup(local.image_options, "virtualbox", {})) +} + +source "virtualbox-ovf" "core" { + vm_name = local.virtualbox_ovf_source_options.vm_name + headless = local.virtualbox_ovf_source_options.headless + output_directory = local.virtualbox_ovf_source_options.output_directory + + source_path = "${local.virtualbox_ovf_source_options.import_directory}/${join("", fileset(local.virtualbox_ovf_source_options.import_directory, "**/*.ovf"))}" + + guest_additions_mode = local.virtualbox_ovf_source_options.guest_additions_mode + post_shutdown_delay = local.virtualbox_ovf_source_options.post_shutdown_delay + + boot_command = local.virtualbox_ovf_source_options.boot_command + boot_wait = local.virtualbox_ovf_source_options.boot_wait + shutdown_command = local.virtualbox_ovf_source_options.shutdown_command + shutdown_timeout = local.virtualbox_ovf_source_options.shutdown_timeout + + communicator = local.communicator.type + ssh_username = local.communicator.username + ssh_password = local.communicator.password + ssh_timeout = local.communicator.timeout +} diff --git a/src/windows/source.vmware.pkr.hcl b/src/windows/source.vmware.pkr.hcl new file mode 100644 index 000000000..b6d7ab079 --- /dev/null +++ b/src/windows/source.vmware.pkr.hcl @@ -0,0 +1,80 @@ +packer { + required_plugins { + vmware = { + version = "~> 1.0" + source = "github.com/hashicorp/vmware" + } + } +} + +locals { + vmware_source_options = { + version = 20 + disk_type_id = 0 + disk_adapter_type = "nvme" + vmx_data = { + firmware = "efi" + "vhv.enable" = "FALSE" + "sata1.present" = "TRUE" + } + vmx_remove_ethernet_interfaces = local.native_build ? false : true + } +} + +locals { + vmware_iso_source_options = merge(local.source_options_build, local.vmware_source_options, lookup(local.image_options, "vmware", {})) +} + +source "vmware-iso" "core" { + vm_name = local.vmware_iso_source_options.vm_name + headless = local.vmware_iso_source_options.headless + output_directory = local.vmware_iso_source_options.output_directory + + cpus = local.vmware_iso_source_options.cpus + memory = local.vmware_iso_source_options.memory + disk_size = local.vmware_iso_source_options.disk_size + iso_urls = local.vmware_iso_source_options.iso_urls + iso_checksum = local.vmware_iso_source_options.iso_checksum + cd_content = local.vmware_iso_source_options.cd_content + + version = local.vmware_iso_source_options.version + guest_os_type = local.vmware_iso_source_options.guest_os_type + disk_type_id = local.vmware_iso_source_options.disk_type_id + disk_adapter_type = local.vmware_iso_source_options.disk_adapter_type + vmx_data = local.vmware_iso_source_options.vmx_data + vmx_remove_ethernet_interfaces = local.vmware_iso_source_options.vmx_remove_ethernet_interfaces + + boot_command = local.vmware_iso_source_options.boot_command + boot_wait = local.vmware_iso_source_options.boot_wait + shutdown_command = local.vmware_iso_source_options.shutdown_command + shutdown_timeout = local.vmware_iso_source_options.shutdown_timeout + + communicator = local.communicator.type + ssh_username = local.communicator.username + ssh_password = local.communicator.password + ssh_timeout = local.communicator.timeout +} + +locals { + vmware_vmx_source_options = merge(local.source_options_build, local.vmware_source_options, lookup(local.image_options, "vmware", {})) +} + +source "vmware-vmx" "core" { + vm_name = local.vmware_vmx_source_options.vm_name + headless = local.vmware_vmx_source_options.headless + output_directory = local.vmware_vmx_source_options.output_directory + + source_path = "${local.vmware_vmx_source_options.import_directory}/${join("", fileset(local.vmware_vmx_source_options.import_directory, "**/*.vmx"))}" + + vmx_remove_ethernet_interfaces = local.vmware_vmx_source_options.vmx_remove_ethernet_interfaces + + boot_command = local.vmware_vmx_source_options.boot_command + boot_wait = local.vmware_vmx_source_options.boot_wait + shutdown_command = local.vmware_vmx_source_options.shutdown_command + shutdown_timeout = local.vmware_vmx_source_options.shutdown_timeout + + communicator = local.communicator.type + ssh_username = local.communicator.username + ssh_password = local.communicator.password + ssh_timeout = local.communicator.timeout +} diff --git a/src/w/packer/provisioners/vagrant/upload/Autounattend.ps1 b/src/windows/vagrant/Autounattend.ps1 similarity index 100% rename from src/w/packer/provisioners/vagrant/upload/Autounattend.ps1 rename to src/windows/vagrant/Autounattend.ps1 diff --git a/src/w/packer/provisioners/vagrant/upload/Autounattend.xml b/src/windows/vagrant/Autounattend.xml similarity index 100% rename from src/w/packer/provisioners/vagrant/upload/Autounattend.xml rename to src/windows/vagrant/Autounattend.xml diff --git a/src/windows/vagrant/cleanup.ps1 b/src/windows/vagrant/cleanup.ps1 new file mode 100644 index 000000000..2f6458036 --- /dev/null +++ b/src/windows/vagrant/cleanup.ps1 @@ -0,0 +1,2 @@ +Get-AppxPackage -Name "*OneDriveSync*" | Remove-AppxPackage +Get-AppxPackage -Name "*MicrosoftEdge*" | Remove-AppxPackage diff --git a/src/w/packer/provisioners/vagrant/upload/shutdown.cmd b/src/windows/vagrant/shutdown.cmd similarity index 100% rename from src/w/packer/provisioners/vagrant/upload/shutdown.cmd rename to src/windows/vagrant/shutdown.cmd diff --git a/src/windows/vagrant/template.Vagrantfile b/src/windows/vagrant/template.Vagrantfile new file mode 100644 index 000000000..90b4a2d3f --- /dev/null +++ b/src/windows/vagrant/template.Vagrantfile @@ -0,0 +1,28 @@ +Vagrant.configure(2) do |config| + config.vm.guest = :windows + config.vm.communicator = 'winrm' + config.winssh.shell = 'powershell' + + config.vm.provider 'virtualbox' do |provider, override| + provider.cpus = ${options.cpus} + provider.memory = ${options.memory} + +%{ for port in compact(split(",", options.ports)) ~} + override.vm.network :forwarded_port, guest: ${port}, host: ${50000 + port}, auto_correct: true +%{ endfor ~} + end + + config.vm.provider 'vmware_desktop' do |provider, override| + provider.cpus = ${options.cpus} + provider.memory = ${options.memory} + +%{ for port in compact(split(",", options.ports)) ~} + override.vm.network :forwarded_port, guest: ${port}, host: ${50000 + port}, auto_correct: true +%{ endfor ~} + end + + config.vm.provider 'hyperv' do |provider, _override| + provider.cpus = ${options.cpus} + provider.memory = ${options.memory} + end +end diff --git a/src/w/packer/provisioners/vagrant/upload/vagrant.pub b/src/windows/vagrant/vagrant.pub similarity index 78% rename from src/w/packer/provisioners/vagrant/upload/vagrant.pub rename to src/windows/vagrant/vagrant.pub index 18a9c00fd..78a8ccf51 100644 --- a/src/w/packer/provisioners/vagrant/upload/vagrant.pub +++ b/src/windows/vagrant/vagrant.pub @@ -1 +1,2 @@ ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN1YdxBpNlzxDqfJyw/QKow1F+wvG9hXGoqiysfJOn5Y vagrant insecure public key diff --git a/src/ws2019s/packer/builders/iso/floppy/Autounattend.xml b/src/ws2019s/packer/builders/iso/floppy/Autounattend.xml deleted file mode 100644 index 5e266120c..000000000 --- a/src/ws2019s/packer/builders/iso/floppy/Autounattend.xml +++ /dev/null @@ -1,127 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<unattend xmlns="urn:schemas-microsoft-com:unattend"> - <settings pass="windowsPE"> - <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <SetupUILanguage> - <UILanguage>en-US</UILanguage> - </SetupUILanguage> - <InputLocale>en-US</InputLocale> - <SystemLocale>en-US</SystemLocale> - <UILanguage>en-US</UILanguage> - <UILanguageFallback>en-US</UILanguageFallback> - <UserLocale>en-US</UserLocale> - </component> - <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <DiskConfiguration> - <Disk wcm:action="add"> - <CreatePartitions> - <CreatePartition wcm:action="add"> - <Order>1</Order> - <Size>500</Size> - <Type>EFI</Type> - </CreatePartition> - <CreatePartition wcm:action="add"> - <Order>2</Order> - <Size>128</Size> - <Type>MSR</Type> - </CreatePartition> - <CreatePartition wcm:action="add"> - <Order>3</Order> - <Extend>true</Extend> - <Type>Primary</Type> - </CreatePartition> - </CreatePartitions> - <DiskID>0</DiskID> - <WillWipeDisk>true</WillWipeDisk> - </Disk> - </DiskConfiguration> - <ImageInstall> - <OSImage> - <InstallFrom> - <MetaData wcm:action="add"> - <Key>/IMAGE/NAME </Key> - <Value>Windows Server 2019 SERVERSTANDARD</Value> - </MetaData> - </InstallFrom> - <InstallTo> - <DiskID>0</DiskID> - <PartitionID>3</PartitionID> - </InstallTo> - </OSImage> - </ImageInstall> - <UserData> - <ProductKey> - <WillShowUI>Never</WillShowUI> - </ProductKey> - <AcceptEula>true</AcceptEula> - <FullName>Administrator</FullName> - <Organization>gusztavvargadr</Organization> - </UserData> - </component> - </settings> - <settings pass="offlineServicing"> - <component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <EnableLUA>false</EnableLUA> - </component> - </settings> - <settings pass="specialize"> - <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <OEMInformation> - <HelpCustomized>false</HelpCustomized> - </OEMInformation> - <ComputerName/> - <TimeZone>UTC</TimeZone> - <RegisteredOwner/> - </component> - <component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon> - </component> - <component name="Microsoft-Windows-IE-ESC" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <IEHardenAdmin>false</IEHardenAdmin> - <IEHardenUser>false</IEHardenUser> - </component> - <component name="Microsoft-Windows-OutOfBoxExperience" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <DoNotOpenInitialConfigurationTasksAtLogon>true</DoNotOpenInitialConfigurationTasksAtLogon> - </component> - <component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <SkipAutoActivation>true</SkipAutoActivation> - </component> - </settings> - <settings pass="oobeSystem"> - <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <OOBE> - <HideEULAPage>true</HideEULAPage> - <HideLocalAccountScreen>true</HideLocalAccountScreen> - <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> - <HideOnlineAccountScreens>true</HideOnlineAccountScreens> - <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> - <NetworkLocation>Home</NetworkLocation> - <ProtectYourPC>3</ProtectYourPC> - </OOBE> - <UserAccounts> - <AdministratorPassword> - <Value>Packer42-</Value> - <PlainText>true</PlainText> - </AdministratorPassword> - </UserAccounts> - <RegisteredOwner/> - <AutoLogon> - <Password> - <Value>Packer42-</Value> - <PlainText>true</PlainText> - </Password> - <Enabled>true</Enabled> - <Username>Administrator</Username> - <LogonCount>2</LogonCount> - </AutoLogon> - <FirstLogonCommands> - <SynchronousCommand wcm:action="add"> - <CommandLine>C:\Windows\System32\WindowsPowershell\v1.0\powershell.exe -Command "Set-ExecutionPolicy Bypass -Force; A:\Autounattend.ps1; E:\Autounattend.ps1"</CommandLine> - <Description>Autounattend.ps1</Description> - <Order>1</Order> - <RequiresUserInput>true</RequiresUserInput> - </SynchronousCommand> - </FirstLogonCommands> - </component> - </settings> -</unattend> diff --git a/src/ws2019s/packer/builders/iso/template.json b/src/ws2019s/packer/builders/iso/template.json deleted file mode 100644 index 30a4fef1e..000000000 --- a/src/ws2019s/packer/builders/iso/template.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variables": { - "iso_url_local": "{{user `download_directory`}}/17763.737.190906-2324.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us_1.iso", - "iso_url_remote": "https://software-download.microsoft.com/download/pr/17763.737.190906-2324.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us_1.iso", - "iso_checksum": "sha256:549bca46c055157291be6c22a3aaaed8330e78ef4382c99ee82c896426a1cee1" - } -} \ No newline at end of file diff --git a/src/ws2019s/packer/builders/virtualbox-iso/template.json b/src/ws2019s/packer/builders/virtualbox-iso/template.json deleted file mode 100644 index 8f3eee7f8..000000000 --- a/src/ws2019s/packer/builders/virtualbox-iso/template.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "variables": { - "virtualbox_guest_os_type": "Windows2019_64" - } -} \ No newline at end of file diff --git a/src/ws2019s/packer/builders/vmware-iso/template.json b/src/ws2019s/packer/builders/vmware-iso/template.json deleted file mode 100644 index 1ef90d670..000000000 --- a/src/ws2019s/packer/builders/vmware-iso/template.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "variables": { - "vmware_guest_os_type": "windows2019srv-64" - } -} \ No newline at end of file diff --git a/src/ws2019s/packer/template.json b/src/ws2019s/packer/template.json deleted file mode 100644 index cf9d1185e..000000000 --- a/src/ws2019s/packer/template.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variables": { - "name": "ws2019s", - "description": "Windows Server 2019 Standard" - } -} \ No newline at end of file diff --git a/src/ws2019sc/packer/builders/iso/floppy/Autounattend.xml b/src/ws2019sc/packer/builders/iso/floppy/Autounattend.xml deleted file mode 100644 index e92529e02..000000000 --- a/src/ws2019sc/packer/builders/iso/floppy/Autounattend.xml +++ /dev/null @@ -1,127 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<unattend xmlns="urn:schemas-microsoft-com:unattend"> - <settings pass="windowsPE"> - <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <SetupUILanguage> - <UILanguage>en-US</UILanguage> - </SetupUILanguage> - <InputLocale>en-US</InputLocale> - <SystemLocale>en-US</SystemLocale> - <UILanguage>en-US</UILanguage> - <UILanguageFallback>en-US</UILanguageFallback> - <UserLocale>en-US</UserLocale> - </component> - <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <DiskConfiguration> - <Disk wcm:action="add"> - <CreatePartitions> - <CreatePartition wcm:action="add"> - <Order>1</Order> - <Size>500</Size> - <Type>EFI</Type> - </CreatePartition> - <CreatePartition wcm:action="add"> - <Order>2</Order> - <Size>128</Size> - <Type>MSR</Type> - </CreatePartition> - <CreatePartition wcm:action="add"> - <Order>3</Order> - <Extend>true</Extend> - <Type>Primary</Type> - </CreatePartition> - </CreatePartitions> - <DiskID>0</DiskID> - <WillWipeDisk>true</WillWipeDisk> - </Disk> - </DiskConfiguration> - <ImageInstall> - <OSImage> - <InstallFrom> - <MetaData wcm:action="add"> - <Key>/IMAGE/NAME </Key> - <Value>Windows Server 2019 SERVERSTANDARDCORE</Value> - </MetaData> - </InstallFrom> - <InstallTo> - <DiskID>0</DiskID> - <PartitionID>3</PartitionID> - </InstallTo> - </OSImage> - </ImageInstall> - <UserData> - <ProductKey> - <WillShowUI>Never</WillShowUI> - </ProductKey> - <AcceptEula>true</AcceptEula> - <FullName>Administrator</FullName> - <Organization>gusztavvargadr</Organization> - </UserData> - </component> - </settings> - <settings pass="offlineServicing"> - <component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <EnableLUA>false</EnableLUA> - </component> - </settings> - <settings pass="specialize"> - <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <OEMInformation> - <HelpCustomized>false</HelpCustomized> - </OEMInformation> - <ComputerName/> - <TimeZone>UTC</TimeZone> - <RegisteredOwner/> - </component> - <component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon> - </component> - <component name="Microsoft-Windows-IE-ESC" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <IEHardenAdmin>false</IEHardenAdmin> - <IEHardenUser>false</IEHardenUser> - </component> - <component name="Microsoft-Windows-OutOfBoxExperience" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <DoNotOpenInitialConfigurationTasksAtLogon>true</DoNotOpenInitialConfigurationTasksAtLogon> - </component> - <component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <SkipAutoActivation>true</SkipAutoActivation> - </component> - </settings> - <settings pass="oobeSystem"> - <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <OOBE> - <HideEULAPage>true</HideEULAPage> - <HideLocalAccountScreen>true</HideLocalAccountScreen> - <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> - <HideOnlineAccountScreens>true</HideOnlineAccountScreens> - <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> - <NetworkLocation>Home</NetworkLocation> - <ProtectYourPC>3</ProtectYourPC> - </OOBE> - <UserAccounts> - <AdministratorPassword> - <Value>Packer42-</Value> - <PlainText>true</PlainText> - </AdministratorPassword> - </UserAccounts> - <RegisteredOwner/> - <AutoLogon> - <Password> - <Value>Packer42-</Value> - <PlainText>true</PlainText> - </Password> - <Enabled>true</Enabled> - <Username>Administrator</Username> - <LogonCount>2</LogonCount> - </AutoLogon> - <FirstLogonCommands> - <SynchronousCommand wcm:action="add"> - <CommandLine>C:\Windows\System32\WindowsPowershell\v1.0\powershell.exe -Command "Set-ExecutionPolicy Bypass -Force; A:\Autounattend.ps1; E:\Autounattend.ps1"</CommandLine> - <Description>Autounattend.ps1</Description> - <Order>1</Order> - <RequiresUserInput>true</RequiresUserInput> - </SynchronousCommand> - </FirstLogonCommands> - </component> - </settings> -</unattend> diff --git a/src/ws2019sc/packer/builders/iso/template.json b/src/ws2019sc/packer/builders/iso/template.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/src/ws2019sc/packer/builders/iso/template.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/src/ws2019sc/packer/template.json b/src/ws2019sc/packer/template.json deleted file mode 100644 index fb77677cb..000000000 --- a/src/ws2019sc/packer/template.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variables": { - "name": "ws2019sc", - "description": "Windows Server 2019 Standard Core" - } -} diff --git a/src/ws2022s/packer/builders/iso/floppy/Autounattend.xml b/src/ws2022s/packer/builders/iso/floppy/Autounattend.xml deleted file mode 100644 index 8e25f0b3a..000000000 --- a/src/ws2022s/packer/builders/iso/floppy/Autounattend.xml +++ /dev/null @@ -1,127 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<unattend xmlns="urn:schemas-microsoft-com:unattend"> - <settings pass="windowsPE"> - <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <SetupUILanguage> - <UILanguage>en-US</UILanguage> - </SetupUILanguage> - <InputLocale>en-US</InputLocale> - <SystemLocale>en-US</SystemLocale> - <UILanguage>en-US</UILanguage> - <UILanguageFallback>en-US</UILanguageFallback> - <UserLocale>en-US</UserLocale> - </component> - <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <DiskConfiguration> - <Disk wcm:action="add"> - <CreatePartitions> - <CreatePartition wcm:action="add"> - <Order>1</Order> - <Size>500</Size> - <Type>EFI</Type> - </CreatePartition> - <CreatePartition wcm:action="add"> - <Order>2</Order> - <Size>128</Size> - <Type>MSR</Type> - </CreatePartition> - <CreatePartition wcm:action="add"> - <Order>3</Order> - <Extend>true</Extend> - <Type>Primary</Type> - </CreatePartition> - </CreatePartitions> - <DiskID>0</DiskID> - <WillWipeDisk>true</WillWipeDisk> - </Disk> - </DiskConfiguration> - <ImageInstall> - <OSImage> - <InstallFrom> - <MetaData wcm:action="add"> - <Key>/IMAGE/NAME </Key> - <Value>Windows Server 2022 SERVERSTANDARD</Value> - </MetaData> - </InstallFrom> - <InstallTo> - <DiskID>0</DiskID> - <PartitionID>3</PartitionID> - </InstallTo> - </OSImage> - </ImageInstall> - <UserData> - <ProductKey> - <WillShowUI>Never</WillShowUI> - </ProductKey> - <AcceptEula>true</AcceptEula> - <FullName>Administrator</FullName> - <Organization>gusztavvargadr</Organization> - </UserData> - </component> - </settings> - <settings pass="offlineServicing"> - <component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <EnableLUA>false</EnableLUA> - </component> - </settings> - <settings pass="specialize"> - <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <OEMInformation> - <HelpCustomized>false</HelpCustomized> - </OEMInformation> - <ComputerName/> - <TimeZone>UTC</TimeZone> - <RegisteredOwner/> - </component> - <component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon> - </component> - <component name="Microsoft-Windows-IE-ESC" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <IEHardenAdmin>false</IEHardenAdmin> - <IEHardenUser>false</IEHardenUser> - </component> - <component name="Microsoft-Windows-OutOfBoxExperience" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <DoNotOpenInitialConfigurationTasksAtLogon>true</DoNotOpenInitialConfigurationTasksAtLogon> - </component> - <component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <SkipAutoActivation>true</SkipAutoActivation> - </component> - </settings> - <settings pass="oobeSystem"> - <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <OOBE> - <HideEULAPage>true</HideEULAPage> - <HideLocalAccountScreen>true</HideLocalAccountScreen> - <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> - <HideOnlineAccountScreens>true</HideOnlineAccountScreens> - <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> - <NetworkLocation>Home</NetworkLocation> - <ProtectYourPC>3</ProtectYourPC> - </OOBE> - <UserAccounts> - <AdministratorPassword> - <Value>Packer42-</Value> - <PlainText>true</PlainText> - </AdministratorPassword> - </UserAccounts> - <RegisteredOwner/> - <AutoLogon> - <Password> - <Value>Packer42-</Value> - <PlainText>true</PlainText> - </Password> - <Enabled>true</Enabled> - <Username>Administrator</Username> - <LogonCount>2</LogonCount> - </AutoLogon> - <FirstLogonCommands> - <SynchronousCommand wcm:action="add"> - <CommandLine>C:\Windows\System32\WindowsPowershell\v1.0\powershell.exe -Command "Set-ExecutionPolicy Bypass -Force; A:\Autounattend.ps1; E:\Autounattend.ps1"</CommandLine> - <Description>Autounattend.ps1</Description> - <Order>1</Order> - <RequiresUserInput>true</RequiresUserInput> - </SynchronousCommand> - </FirstLogonCommands> - </component> - </settings> -</unattend> diff --git a/src/ws2022s/packer/builders/iso/template.json b/src/ws2022s/packer/builders/iso/template.json deleted file mode 100644 index 84a482fda..000000000 --- a/src/ws2022s/packer/builders/iso/template.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variables": { - "iso_url_local": "{{user `download_directory`}}/SERVER_EVAL_x64FRE_en-us.iso", - "iso_url_remote": "https://software-static.download.prss.microsoft.com/sg/download/888969d5-f34g-4e03-ac9d-1f9786c66749/SERVER_EVAL_x64FRE_en-us.iso", - "iso_checksum": "sha256:3e4fa6d8507b554856fc9ca6079cc402df11a8b79344871669f0251535255325" - } -} \ No newline at end of file diff --git a/src/ws2022s/packer/builders/virtualbox-iso/template.json b/src/ws2022s/packer/builders/virtualbox-iso/template.json deleted file mode 100644 index 8f3eee7f8..000000000 --- a/src/ws2022s/packer/builders/virtualbox-iso/template.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "variables": { - "virtualbox_guest_os_type": "Windows2019_64" - } -} \ No newline at end of file diff --git a/src/ws2022s/packer/builders/vmware-iso/template.json b/src/ws2022s/packer/builders/vmware-iso/template.json deleted file mode 100644 index 1ef90d670..000000000 --- a/src/ws2022s/packer/builders/vmware-iso/template.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "variables": { - "vmware_guest_os_type": "windows2019srv-64" - } -} \ No newline at end of file diff --git a/src/ws2022s/packer/template.json b/src/ws2022s/packer/template.json deleted file mode 100644 index b0d5c8066..000000000 --- a/src/ws2022s/packer/template.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variables": { - "name": "ws2022s", - "description": "Windows Server 2022 Standard" - } -} \ No newline at end of file diff --git a/src/ws2022sc/packer/builders/iso/floppy/Autounattend.xml b/src/ws2022sc/packer/builders/iso/floppy/Autounattend.xml deleted file mode 100644 index b57e97005..000000000 --- a/src/ws2022sc/packer/builders/iso/floppy/Autounattend.xml +++ /dev/null @@ -1,127 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<unattend xmlns="urn:schemas-microsoft-com:unattend"> - <settings pass="windowsPE"> - <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <SetupUILanguage> - <UILanguage>en-US</UILanguage> - </SetupUILanguage> - <InputLocale>en-US</InputLocale> - <SystemLocale>en-US</SystemLocale> - <UILanguage>en-US</UILanguage> - <UILanguageFallback>en-US</UILanguageFallback> - <UserLocale>en-US</UserLocale> - </component> - <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <DiskConfiguration> - <Disk wcm:action="add"> - <CreatePartitions> - <CreatePartition wcm:action="add"> - <Order>1</Order> - <Size>500</Size> - <Type>EFI</Type> - </CreatePartition> - <CreatePartition wcm:action="add"> - <Order>2</Order> - <Size>128</Size> - <Type>MSR</Type> - </CreatePartition> - <CreatePartition wcm:action="add"> - <Order>3</Order> - <Extend>true</Extend> - <Type>Primary</Type> - </CreatePartition> - </CreatePartitions> - <DiskID>0</DiskID> - <WillWipeDisk>true</WillWipeDisk> - </Disk> - </DiskConfiguration> - <ImageInstall> - <OSImage> - <InstallFrom> - <MetaData wcm:action="add"> - <Key>/IMAGE/NAME </Key> - <Value>Windows Server 2022 SERVERSTANDARDCORE</Value> - </MetaData> - </InstallFrom> - <InstallTo> - <DiskID>0</DiskID> - <PartitionID>3</PartitionID> - </InstallTo> - </OSImage> - </ImageInstall> - <UserData> - <ProductKey> - <WillShowUI>Never</WillShowUI> - </ProductKey> - <AcceptEula>true</AcceptEula> - <FullName>Administrator</FullName> - <Organization>gusztavvargadr</Organization> - </UserData> - </component> - </settings> - <settings pass="offlineServicing"> - <component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <EnableLUA>false</EnableLUA> - </component> - </settings> - <settings pass="specialize"> - <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <OEMInformation> - <HelpCustomized>false</HelpCustomized> - </OEMInformation> - <ComputerName/> - <TimeZone>UTC</TimeZone> - <RegisteredOwner/> - </component> - <component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon> - </component> - <component name="Microsoft-Windows-IE-ESC" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <IEHardenAdmin>false</IEHardenAdmin> - <IEHardenUser>false</IEHardenUser> - </component> - <component name="Microsoft-Windows-OutOfBoxExperience" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <DoNotOpenInitialConfigurationTasksAtLogon>true</DoNotOpenInitialConfigurationTasksAtLogon> - </component> - <component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <SkipAutoActivation>true</SkipAutoActivation> - </component> - </settings> - <settings pass="oobeSystem"> - <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <OOBE> - <HideEULAPage>true</HideEULAPage> - <HideLocalAccountScreen>true</HideLocalAccountScreen> - <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> - <HideOnlineAccountScreens>true</HideOnlineAccountScreens> - <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> - <NetworkLocation>Home</NetworkLocation> - <ProtectYourPC>3</ProtectYourPC> - </OOBE> - <UserAccounts> - <AdministratorPassword> - <Value>Packer42-</Value> - <PlainText>true</PlainText> - </AdministratorPassword> - </UserAccounts> - <RegisteredOwner/> - <AutoLogon> - <Password> - <Value>Packer42-</Value> - <PlainText>true</PlainText> - </Password> - <Enabled>true</Enabled> - <Username>Administrator</Username> - <LogonCount>2</LogonCount> - </AutoLogon> - <FirstLogonCommands> - <SynchronousCommand wcm:action="add"> - <CommandLine>C:\Windows\System32\WindowsPowershell\v1.0\powershell.exe -Command "Set-ExecutionPolicy Bypass -Force; A:\Autounattend.ps1; E:\Autounattend.ps1"</CommandLine> - <Description>Autounattend.ps1</Description> - <Order>1</Order> - <RequiresUserInput>true</RequiresUserInput> - </SynchronousCommand> - </FirstLogonCommands> - </component> - </settings> -</unattend> diff --git a/src/ws2022sc/packer/builders/iso/template.json b/src/ws2022sc/packer/builders/iso/template.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/src/ws2022sc/packer/builders/iso/template.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/src/ws2022sc/packer/template.json b/src/ws2022sc/packer/template.json deleted file mode 100644 index a70218559..000000000 --- a/src/ws2022sc/packer/template.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variables": { - "name": "ws2022sc", - "description": "Windows Server 2022 Standard Core" - } -} \ No newline at end of file diff --git a/src/wsips/packer/builders/iso/floppy/Autounattend.xml b/src/wsips/packer/builders/iso/floppy/Autounattend.xml deleted file mode 100644 index 2cf995e4c..000000000 --- a/src/wsips/packer/builders/iso/floppy/Autounattend.xml +++ /dev/null @@ -1,128 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<unattend xmlns="urn:schemas-microsoft-com:unattend"> - <settings pass="windowsPE"> - <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <SetupUILanguage> - <UILanguage>en-US</UILanguage> - </SetupUILanguage> - <InputLocale>en-US</InputLocale> - <SystemLocale>en-US</SystemLocale> - <UILanguage>en-US</UILanguage> - <UILanguageFallback>en-US</UILanguageFallback> - <UserLocale>en-US</UserLocale> - </component> - <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <DiskConfiguration> - <Disk wcm:action="add"> - <CreatePartitions> - <CreatePartition wcm:action="add"> - <Order>1</Order> - <Size>500</Size> - <Type>EFI</Type> - </CreatePartition> - <CreatePartition wcm:action="add"> - <Order>2</Order> - <Size>128</Size> - <Type>MSR</Type> - </CreatePartition> - <CreatePartition wcm:action="add"> - <Order>3</Order> - <Extend>true</Extend> - <Type>Primary</Type> - </CreatePartition> - </CreatePartitions> - <DiskID>0</DiskID> - <WillWipeDisk>true</WillWipeDisk> - </Disk> - </DiskConfiguration> - <ImageInstall> - <OSImage> - <InstallFrom> - <MetaData wcm:action="add"> - <Key>/IMAGE/NAME </Key> - <Value>Windows Server 2022 SERVERSTANDARD</Value> - </MetaData> - </InstallFrom> - <InstallTo> - <DiskID>0</DiskID> - <PartitionID>3</PartitionID> - </InstallTo> - </OSImage> - </ImageInstall> - <UserData> - <ProductKey> - <WillShowUI>Never</WillShowUI> - <Key>MFY9F-XBN2F-TYFMP-CCV49-RMYVH</Key> - </ProductKey> - <AcceptEula>true</AcceptEula> - <FullName>Administrator</FullName> - <Organization>gusztavvargadr</Organization> - </UserData> - </component> - </settings> - <settings pass="offlineServicing"> - <component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <EnableLUA>false</EnableLUA> - </component> - </settings> - <settings pass="specialize"> - <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <OEMInformation> - <HelpCustomized>false</HelpCustomized> - </OEMInformation> - <ComputerName/> - <TimeZone>UTC</TimeZone> - <RegisteredOwner/> - </component> - <component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon> - </component> - <component name="Microsoft-Windows-IE-ESC" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <IEHardenAdmin>false</IEHardenAdmin> - <IEHardenUser>false</IEHardenUser> - </component> - <component name="Microsoft-Windows-OutOfBoxExperience" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <DoNotOpenInitialConfigurationTasksAtLogon>true</DoNotOpenInitialConfigurationTasksAtLogon> - </component> - <component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <SkipAutoActivation>true</SkipAutoActivation> - </component> - </settings> - <settings pass="oobeSystem"> - <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <OOBE> - <HideEULAPage>true</HideEULAPage> - <HideLocalAccountScreen>true</HideLocalAccountScreen> - <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> - <HideOnlineAccountScreens>true</HideOnlineAccountScreens> - <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> - <NetworkLocation>Home</NetworkLocation> - <ProtectYourPC>3</ProtectYourPC> - </OOBE> - <UserAccounts> - <AdministratorPassword> - <Value>Packer42-</Value> - <PlainText>true</PlainText> - </AdministratorPassword> - </UserAccounts> - <RegisteredOwner/> - <AutoLogon> - <Password> - <Value>Packer42-</Value> - <PlainText>true</PlainText> - </Password> - <Enabled>true</Enabled> - <Username>Administrator</Username> - <LogonCount>2</LogonCount> - </AutoLogon> - <FirstLogonCommands> - <SynchronousCommand wcm:action="add"> - <CommandLine>C:\Windows\System32\WindowsPowershell\v1.0\powershell.exe -Command "Set-ExecutionPolicy Bypass -Force; A:\Autounattend.ps1; E:\Autounattend.ps1"</CommandLine> - <Description>Autounattend.ps1</Description> - <Order>1</Order> - <RequiresUserInput>true</RequiresUserInput> - </SynchronousCommand> - </FirstLogonCommands> - </component> - </settings> -</unattend> diff --git a/src/wsips/packer/builders/iso/template.json b/src/wsips/packer/builders/iso/template.json deleted file mode 100644 index b7aad4caf..000000000 --- a/src/wsips/packer/builders/iso/template.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "variables": { - "iso_url_local": "{{user `download_directory`}}/Windows_InsiderPreview_Server_vNext_en-us_25967.iso", - "iso_url_remote": "https://app.vagrantup.com/gusztavvargadr-iso/boxes/windows-server-insider-preview/versions/2102.0.2310/providers/iso-hosted/amd64/vagrant.box", - "iso_checksum": "sha256:e20547ac8bcca26866b2882dcbee3616851a134b0387225bebabfb87bbf1b003" - } -} \ No newline at end of file diff --git a/src/wsips/packer/builders/virtualbox-iso/template.json b/src/wsips/packer/builders/virtualbox-iso/template.json deleted file mode 100644 index 8f3eee7f8..000000000 --- a/src/wsips/packer/builders/virtualbox-iso/template.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "variables": { - "virtualbox_guest_os_type": "Windows2019_64" - } -} \ No newline at end of file diff --git a/src/wsips/packer/template.json b/src/wsips/packer/template.json deleted file mode 100644 index 19959dc88..000000000 --- a/src/wsips/packer/template.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variables": { - "name": "wsipsc", - "description": "Windows Server Insider Preview Standard" - } -} \ No newline at end of file diff --git a/src/wsipsc/packer/builders/iso/floppy/Autounattend.xml b/src/wsipsc/packer/builders/iso/floppy/Autounattend.xml deleted file mode 100644 index 60643a859..000000000 --- a/src/wsipsc/packer/builders/iso/floppy/Autounattend.xml +++ /dev/null @@ -1,128 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<unattend xmlns="urn:schemas-microsoft-com:unattend"> - <settings pass="windowsPE"> - <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <SetupUILanguage> - <UILanguage>en-US</UILanguage> - </SetupUILanguage> - <InputLocale>en-US</InputLocale> - <SystemLocale>en-US</SystemLocale> - <UILanguage>en-US</UILanguage> - <UILanguageFallback>en-US</UILanguageFallback> - <UserLocale>en-US</UserLocale> - </component> - <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <DiskConfiguration> - <Disk wcm:action="add"> - <CreatePartitions> - <CreatePartition wcm:action="add"> - <Order>1</Order> - <Size>500</Size> - <Type>EFI</Type> - </CreatePartition> - <CreatePartition wcm:action="add"> - <Order>2</Order> - <Size>128</Size> - <Type>MSR</Type> - </CreatePartition> - <CreatePartition wcm:action="add"> - <Order>3</Order> - <Extend>true</Extend> - <Type>Primary</Type> - </CreatePartition> - </CreatePartitions> - <DiskID>0</DiskID> - <WillWipeDisk>true</WillWipeDisk> - </Disk> - </DiskConfiguration> - <ImageInstall> - <OSImage> - <InstallFrom> - <MetaData wcm:action="add"> - <Key>/IMAGE/NAME </Key> - <Value>Windows Server 2022 SERVERSTANDARDCORE</Value> - </MetaData> - </InstallFrom> - <InstallTo> - <DiskID>0</DiskID> - <PartitionID>3</PartitionID> - </InstallTo> - </OSImage> - </ImageInstall> - <UserData> - <ProductKey> - <WillShowUI>Never</WillShowUI> - <Key>MFY9F-XBN2F-TYFMP-CCV49-RMYVH</Key> - </ProductKey> - <AcceptEula>true</AcceptEula> - <FullName>Administrator</FullName> - <Organization>gusztavvargadr</Organization> - </UserData> - </component> - </settings> - <settings pass="offlineServicing"> - <component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <EnableLUA>false</EnableLUA> - </component> - </settings> - <settings pass="specialize"> - <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <OEMInformation> - <HelpCustomized>false</HelpCustomized> - </OEMInformation> - <ComputerName/> - <TimeZone>UTC</TimeZone> - <RegisteredOwner/> - </component> - <component name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon> - </component> - <component name="Microsoft-Windows-IE-ESC" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <IEHardenAdmin>false</IEHardenAdmin> - <IEHardenUser>false</IEHardenUser> - </component> - <component name="Microsoft-Windows-OutOfBoxExperience" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <DoNotOpenInitialConfigurationTasksAtLogon>true</DoNotOpenInitialConfigurationTasksAtLogon> - </component> - <component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <SkipAutoActivation>true</SkipAutoActivation> - </component> - </settings> - <settings pass="oobeSystem"> - <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <OOBE> - <HideEULAPage>true</HideEULAPage> - <HideLocalAccountScreen>true</HideLocalAccountScreen> - <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> - <HideOnlineAccountScreens>true</HideOnlineAccountScreens> - <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> - <NetworkLocation>Home</NetworkLocation> - <ProtectYourPC>3</ProtectYourPC> - </OOBE> - <UserAccounts> - <AdministratorPassword> - <Value>Packer42-</Value> - <PlainText>true</PlainText> - </AdministratorPassword> - </UserAccounts> - <RegisteredOwner/> - <AutoLogon> - <Password> - <Value>Packer42-</Value> - <PlainText>true</PlainText> - </Password> - <Enabled>true</Enabled> - <Username>Administrator</Username> - <LogonCount>2</LogonCount> - </AutoLogon> - <FirstLogonCommands> - <SynchronousCommand wcm:action="add"> - <CommandLine>C:\Windows\System32\WindowsPowershell\v1.0\powershell.exe -Command "Set-ExecutionPolicy Bypass -Force; A:\Autounattend.ps1; E:\Autounattend.ps1"</CommandLine> - <Description>Autounattend.ps1</Description> - <Order>1</Order> - <RequiresUserInput>true</RequiresUserInput> - </SynchronousCommand> - </FirstLogonCommands> - </component> - </settings> -</unattend> diff --git a/src/wsipsc/packer/builders/iso/template.json b/src/wsipsc/packer/builders/iso/template.json deleted file mode 100644 index 9e26dfeeb..000000000 --- a/src/wsipsc/packer/builders/iso/template.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/src/wsipsc/packer/template.json b/src/wsipsc/packer/template.json deleted file mode 100644 index 11e29a452..000000000 --- a/src/wsipsc/packer/template.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "variables": { - "name": "wsipsc", - "description": "Windows Server Insider Preview Standard Core" - } -} \ No newline at end of file