Skip to content

Generate 2004 image

Pedro Pombeiro requested to merge 30-install-docker into master

This MR adds the 2004 Windows image and additionally installs Docker since the GCP base image does not contain it. I've split the docker-compose installation into a separate Ruby file so that we are sure to install it after Docker has been installed.

Required for gitlab-org/gitlab-runner#26420 (closed)

Current situation

Using the windows-server-2004-dc-core-v20201110 base image we can see that docker is not present:

image

How to test

  1. Create VM in GCP based on image generated by this MR: runners-windows-2004-core-containers-dev-29-mr

    gcloud beta compute --project=group-verify-df9383 instances create ${USER}-mr-29-test --zone=europe-west6-a --machine-type=e2-medium --subnet=default --network-tier=PREMIUM --maintenance-policy=MIGRATE --service-account=795226299063-compute@developer.gserviceaccount.com --scopes=https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/service.management.readonly,https://www.googleapis.com/auth/trace.append --image=runners-windows-2004-core-containers-dev-29-mr --image-project=group-verify-df9383 --boot-disk-size=50GB --boot-disk-type=pd-ssd --boot-disk-device-name=${USER}-mr-29-test --no-shielded-secure-boot --shielded-vtpm --shielded-integrity-monitoring --reservation-affinity=any
  2. Create Windows password for VM

    gcloud beta compute --project "group-verify-df9383" reset-windows-password "$USER-mr-29-test" --zone "europe-west6-a" --quiet
  3. Open RDP session using the generated password

    1. Type docker info in the console:

      image

    2. Confirm that we're able to run a 2004 Windows Docker image in it:

      docker run -ti --rm mcr.microsoft.com/windows/servercore:2004 wmic os get version

      image

  4. Non-2004 builds should not try to run the Powershell resources that install Docker in cookbooks/preinstalled-software/recipes/docker.rb.

Closes #30 (closed)

Edited by Pedro Pombeiro

Merge request reports