diff --git a/imagesets/README.md b/imagesets/README.md new file mode 100644 index 00000000..69e68678 --- /dev/null +++ b/imagesets/README.md @@ -0,0 +1,10 @@ +### Building an image set + +To build an image set: + + * AWS only: Sign in with 2FA and export env vars `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_SESSION_TOKEN` + * GCP only: `export GCP_PROJECT=` + * Run `./imageset.sh (aws|gcp) (delete|update) IMAGE_SET` + +This will update/delete the image set `IMAGE_SET` whose definition is in the +subdirectory ``. diff --git a/worker_types/ami-test-win2012r2/aws_filters b/imagesets/deepspeech-win2012r2/aws_filters similarity index 100% rename from worker_types/ami-test-win2012r2/aws_filters rename to imagesets/deepspeech-win2012r2/aws_filters diff --git a/worker_types/ami-test-win2012r2/aws_owners b/imagesets/deepspeech-win2012r2/aws_owners similarity index 100% rename from worker_types/ami-test-win2012r2/aws_owners rename to imagesets/deepspeech-win2012r2/aws_owners diff --git a/worker_types/deepspeech-win-b/bootstrap.ps1 b/imagesets/deepspeech-win2012r2/bootstrap.ps1 similarity index 100% rename from worker_types/deepspeech-win-b/bootstrap.ps1 rename to imagesets/deepspeech-win2012r2/bootstrap.ps1 diff --git a/worker_types/ami-test-win2012r2/gcp_filters b/imagesets/deepspeech-win2012r2/gcp_filters similarity index 100% rename from worker_types/ami-test-win2012r2/gcp_filters rename to imagesets/deepspeech-win2012r2/gcp_filters diff --git a/worker_types/firefoxreality-1-win10-64/aws_filters b/imagesets/firefoxreality-1-win10-64/aws_filters similarity index 100% rename from worker_types/firefoxreality-1-win10-64/aws_filters rename to imagesets/firefoxreality-1-win10-64/aws_filters diff --git a/worker_types/ami-test-win7sp1/aws_owners b/imagesets/firefoxreality-1-win10-64/aws_owners similarity index 100% rename from worker_types/ami-test-win7sp1/aws_owners rename to imagesets/firefoxreality-1-win10-64/aws_owners diff --git a/worker_types/firefoxreality-1-win10-64/bootstrap.ps1 b/imagesets/firefoxreality-1-win10-64/bootstrap.ps1 similarity index 100% rename from worker_types/firefoxreality-1-win10-64/bootstrap.ps1 rename to imagesets/firefoxreality-1-win10-64/bootstrap.ps1 diff --git a/worker_types/fp-gecko-1-gw-linux/aws_filters b/imagesets/generic-worker-ubuntu-18-04-staging/aws_filters similarity index 100% rename from worker_types/fp-gecko-1-gw-linux/aws_filters rename to imagesets/generic-worker-ubuntu-18-04-staging/aws_filters diff --git a/worker_types/fp-gecko-1-gw-linux/aws_owners b/imagesets/generic-worker-ubuntu-18-04-staging/aws_owners similarity index 100% rename from worker_types/fp-gecko-1-gw-linux/aws_owners rename to imagesets/generic-worker-ubuntu-18-04-staging/aws_owners diff --git a/worker_types/gwci-linux-beta/bootstrap.sh b/imagesets/generic-worker-ubuntu-18-04-staging/bootstrap.sh similarity index 100% rename from worker_types/gwci-linux-beta/bootstrap.sh rename to imagesets/generic-worker-ubuntu-18-04-staging/bootstrap.sh diff --git a/worker_types/gwci-linux-beta/gcp_filters b/imagesets/generic-worker-ubuntu-18-04-staging/gcp_filters similarity index 100% rename from worker_types/gwci-linux-beta/gcp_filters rename to imagesets/generic-worker-ubuntu-18-04-staging/gcp_filters diff --git a/worker_types/gwci-linux-beta/aws_filters b/imagesets/generic-worker-ubuntu-18-04/aws_filters similarity index 100% rename from worker_types/gwci-linux-beta/aws_filters rename to imagesets/generic-worker-ubuntu-18-04/aws_filters diff --git a/worker_types/gwci-linux-beta/aws_owners b/imagesets/generic-worker-ubuntu-18-04/aws_owners similarity index 100% rename from worker_types/gwci-linux-beta/aws_owners rename to imagesets/generic-worker-ubuntu-18-04/aws_owners diff --git a/worker_types/gwci-linux/bootstrap.sh b/imagesets/generic-worker-ubuntu-18-04/bootstrap.sh similarity index 100% rename from worker_types/gwci-linux/bootstrap.sh rename to imagesets/generic-worker-ubuntu-18-04/bootstrap.sh diff --git a/worker_types/fp-gecko-1-gw-linux/gcp_filters b/imagesets/generic-worker-ubuntu-18-04/gcp_filters similarity index 100% rename from worker_types/fp-gecko-1-gw-linux/gcp_filters rename to imagesets/generic-worker-ubuntu-18-04/gcp_filters diff --git a/worker_types/deepspeech-win-b/aws_filters b/imagesets/generic-worker-win2012r2-staging/aws_filters similarity index 100% rename from worker_types/deepspeech-win-b/aws_filters rename to imagesets/generic-worker-win2012r2-staging/aws_filters diff --git a/worker_types/deepspeech-win-b/aws_owners b/imagesets/generic-worker-win2012r2-staging/aws_owners similarity index 100% rename from worker_types/deepspeech-win-b/aws_owners rename to imagesets/generic-worker-win2012r2-staging/aws_owners diff --git a/worker_types/win2012r2/bootstrap.ps1 b/imagesets/generic-worker-win2012r2-staging/bootstrap.ps1 similarity index 100% rename from worker_types/win2012r2/bootstrap.ps1 rename to imagesets/generic-worker-win2012r2-staging/bootstrap.ps1 diff --git a/worker_types/deepspeech-win-b/gcp_filters b/imagesets/generic-worker-win2012r2-staging/gcp_filters similarity index 100% rename from worker_types/deepspeech-win-b/gcp_filters rename to imagesets/generic-worker-win2012r2-staging/gcp_filters diff --git a/worker_types/deepspeech-win/aws_filters b/imagesets/generic-worker-win2012r2/aws_filters similarity index 100% rename from worker_types/deepspeech-win/aws_filters rename to imagesets/generic-worker-win2012r2/aws_filters diff --git a/worker_types/deepspeech-win/aws_owners b/imagesets/generic-worker-win2012r2/aws_owners similarity index 100% rename from worker_types/deepspeech-win/aws_owners rename to imagesets/generic-worker-win2012r2/aws_owners diff --git a/worker_types/win2012r2-cu/bootstrap.ps1 b/imagesets/generic-worker-win2012r2/bootstrap.ps1 similarity index 97% rename from worker_types/win2012r2-cu/bootstrap.ps1 rename to imagesets/generic-worker-win2012r2/bootstrap.ps1 index 68ca9f39..da729c03 100644 --- a/worker_types/win2012r2-cu/bootstrap.ps1 +++ b/imagesets/generic-worker-win2012r2/bootstrap.ps1 @@ -35,7 +35,7 @@ $client.DownloadFile("http://download.microsoft.com/download/A/E/7/AE743F1F-632B Install-WindowsFeature NET-Framework-Core # now run DirectX SDK installer -Start-Process C:\DXSDK_Jun10.exe -ArgumentList "/U" -wait -NoNewWindow -PassThru -RedirectStandardOutput C:\directx_sdk_install.log -RedirectStandardError C:\directx_sdk_install.err +Start-Process C:\DXSDK_Jun10.exe -ArgumentList "/U" -Wait -NoNewWindow -PassThru -RedirectStandardOutput C:\directx_sdk_install.log -RedirectStandardError C:\directx_sdk_install.err # install rustc dependencies (32 bit) $client.DownloadFile("http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe", "C:\vcredist_x86-vs2013.exe") @@ -97,7 +97,6 @@ Set-Content -Path "C:\Windows\System32\drivers\etc\hosts" -Value $HostsFile_Cont # install generic-worker Start-Process C:\generic-worker\generic-worker.exe -ArgumentList "install service --configure-for-%MY_CLOUD% --nssm C:\nssm-2.24\win64\nssm.exe --config C:\generic-worker\generic-worker.config" -Wait -NoNewWindow -PassThru -RedirectStandardOutput C:\generic-worker\install.log -RedirectStandardError C:\generic-worker\install.err -# Start-Process C:\generic-worker\generic-worker.exe -ArgumentList "install startup --config C:\generic-worker\generic-worker.config" -Wait -NoNewWindow -PassThru -RedirectStandardOutput C:\generic-worker\install.log -RedirectStandardError C:\generic-worker\install.err # initial clone of mozilla-central # Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "C:\mozilla-build\python\Scripts\hg clone -u null https://hg.mozilla.org/mozilla-central C:\gecko" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\hg_initial_clone.log" -RedirectStandardError "C:\hg_initial_clone.err" diff --git a/worker_types/deepspeech-win/gcp_filters b/imagesets/generic-worker-win2012r2/gcp_filters similarity index 100% rename from worker_types/deepspeech-win/gcp_filters rename to imagesets/generic-worker-win2012r2/gcp_filters diff --git a/worker_types/win2016/aws_filters b/imagesets/generic-worker-win2016/aws_filters similarity index 100% rename from worker_types/win2016/aws_filters rename to imagesets/generic-worker-win2016/aws_filters diff --git a/worker_types/firefoxreality-1-win10-64/aws_owners b/imagesets/generic-worker-win2016/aws_owners similarity index 100% rename from worker_types/firefoxreality-1-win10-64/aws_owners rename to imagesets/generic-worker-win2016/aws_owners diff --git a/worker_types/win2016/bootstrap.ps1 b/imagesets/generic-worker-win2016/bootstrap.ps1 similarity index 100% rename from worker_types/win2016/bootstrap.ps1 rename to imagesets/generic-worker-win2016/bootstrap.ps1 diff --git a/imagesets/imageset.sh b/imagesets/imageset.sh new file mode 100755 index 00000000..6540067f --- /dev/null +++ b/imagesets/imageset.sh @@ -0,0 +1,341 @@ +#!/bin/bash -e + +function log { + if [ -n "${REGION}" ]; then + echo -e "\x1B[38;5;${COLOUR}m$(basename "${0}"): $(date): ${CLOUD}: ${IMAGE_SET}: ${REGION}: ${@}\x1B[0m" + else + echo -e "\x1B[38;5;188m$(basename "${0}"): $(date): ${@}\x1B[0m" + fi +} + +function deploy { + log "Checking inputs..." + + if [ "${#}" -ne 3 ]; then + log "Please specify a cloud (aws/gcp), action (delete|update), and image set (e.g. generic-worker-win2012r2) e.g. ${0} aws update generic-worker-win2012r2" >&2 + exit 64 + fi + + export CLOUD="${1}" + if [ "${CLOUD}" != "aws" ] && [ "${CLOUD}" != "gcp" ]; then + log "provider must be 'aws' or 'gcp' but '${CLOUD}' was specified" >&2 + exit 65 + fi + + ACTION="${2}" + if [ "${ACTION}" != "update" ] && [ "${ACTION}" != "delete" ]; then + log "action must be 'delete' or 'update' but '${ACTION}' was specified" >&2 + exit 66 + fi + + export IMAGE_SET="${3}" + + log 'Starting!' + + export IMAGE_SET_COMMIT_SHA="$(git rev-parse HEAD)" + + # UUID is 20 random chars of [a-z0-9] + UUID="$(LC_CTYPE=C &2 + exit 67 + fi + echo us-central1-a 118 | xargs -P1 -n2 "${0}" process-region "${CLOUD}_${ACTION}" + ;; + esac + + log 'Deployment of image sets successful!' +} + +################## AWS ################## + +function aws_delete { + aws_find_old_objects + aws_delete_found +} + +function aws_find_old_objects { + # query old instances + log "Querying old instances..." + OLD_INSTANCES="$(aws --region "${REGION}" ec2 describe-instances --filters "Name=tag:ImageSet,Values=${IMAGE_SET}" --query 'Reservations[*].Instances[*].InstanceId' --output text)" + + # find old amis + log "Querying previous AMI..." + OLD_SNAPSHOTS="$(aws --region "${REGION}" ec2 describe-images --owners self --filters "Name=name,Values=${IMAGE_SET} *" --query 'Images[*].BlockDeviceMappings[*].Ebs.SnapshotId' --output text)" + + # find old snapshots + log "Querying snapshot used in this previous AMI..." + OLD_AMIS="$(aws --region "${REGION}" ec2 describe-images --owners self --filters "Name=name,Values=${IMAGE_SET} *" --query 'Images[*].ImageId' --output text)" +} + +function aws_delete_found { + # terminate old instances + if [ -n "${OLD_INSTANCES}" ]; then + log "Now terminating instances" ${OLD_INSTANCES}... + aws --region "${REGION}" ec2 terminate-instances --instance-ids ${OLD_INSTANCES} >/dev/null 2>&1 + else + log "No previous instances to terminate." + fi + + # deregister old AMIs + if [ -n "${OLD_AMIS}" ]; then + log "Deregistering the old AMI(s) ("${OLD_AMIS}")..." + # note this can fail if it is already in process of being deregistered, so allow to fail... + for image in ${OLD_AMIS}; do + aws --region "${REGION}" ec2 deregister-image --image-id "${image}" 2>/dev/null || true + done + else + log "No old AMI to deregister." + fi + + # delete old snapshots + if [ -n "${OLD_SNAPSHOTS}" ]; then + log "Deleting the old snapshot(s) ("${OLD_SNAPSHOTS}")..." + for snapshot in ${OLD_SNAPSHOTS}; do + aws --region "${REGION}" ec2 delete-snapshot --snapshot-id ${snapshot} + done + else + log "No old snapshot to delete." + fi +} + +function aws_update { + + log "Generating new ssh key..." + rm -rf "${CLOUD}.${REGION}.id_rsa" + aws --region "${REGION}" ec2 delete-key-pair --key-name "${IMAGE_SET}_${REGION}" || true + aws --region "${REGION}" ec2 create-key-pair --key-name "${IMAGE_SET}_${REGION}" --query 'KeyMaterial' --output text > "${CLOUD}.${REGION}.id_rsa" + chmod 400 "${CLOUD}.${REGION}.id_rsa" + + # search for latest base AMI to use + AMI_METADATA="$(aws --region "${REGION}" ec2 describe-images --owners $(cat aws_owners) --filters $(cat aws_filters) --query 'Images[*].{A:CreationDate,B:ImageId,C:Name}' --output text | sort -u | tail -1 | cut -f2,3)" + + AMI="$(echo $AMI_METADATA | sed 's/ .*//')" + AMI_NAME="$(echo $AMI_METADATA | sed 's/.* //')" + log "Base AMI is: ${AMI} ('${AMI_NAME}')" + + aws_find_old_objects + + TEMP_SETUP_SCRIPT="$(mktemp -t ${UNIQUE_NAME}.XXXXXXXXXX)" + + if [ -f "bootstrap.ps1" ]; then + echo '' >> "${TEMP_SETUP_SCRIPT}" + cat bootstrap.ps1 | sed 's/%MY_CLOUD%/aws/g' >> "${TEMP_SETUP_SCRIPT}" + echo '' >> "${TEMP_SETUP_SCRIPT}" + IMAGE_OS=windows + else + cat bootstrap.sh | sed 's/%MY_CLOUD%/aws/g' >> "${TEMP_SETUP_SCRIPT}" + IMAGE_OS=linux + fi + + # Make sure we have an ssh security group in this region note if we *try* to + # create a security group that already exists (regardless of whether it is + # successful or not), there will be a cloudwatch alarm, so avoid this by + # checking first. + echo 'ssh-only 22 SSH only + rdp-only 3389 RDP only' | while read group_name port description; do + if ! aws --region "${REGION}" ec2 describe-security-groups --group-names "${group_name}" >/dev/null 2>&1; then + SECURITY_GROUP="$(aws --region "${REGION}" ec2 create-security-group --group-name "${group_name}" --description "${description}" --output text 2>/dev/null || true)" + aws --region "${REGION}" ec2 authorize-security-group-ingress --group-id "${SECURITY_GROUP}" --ip-permissions '[{"IpProtocol": "tcp", "FromPort": '"${port}"', "ToPort": '"${port}"', "IpRanges": [{"CidrIp": "0.0.0.0/0"}]}]' + fi + done + + # Create new base AMI, and apply user-data filter output, to get instance ID. + INSTANCE_ID="$(aws --region "${REGION}" ec2 run-instances --image-id "${AMI}" --key-name "${IMAGE_SET}_${REGION}" --security-groups "rdp-only" "ssh-only" --user-data "$(cat "${TEMP_SETUP_SCRIPT}")" --instance-type c4.2xlarge --block-device-mappings DeviceName=/dev/sda1,Ebs='{VolumeSize=75,DeleteOnTermination=true,VolumeType=gp2}' --instance-initiated-shutdown-behavior stop --client-token "${UNIQUE_NAME}" --query 'Instances[*].InstanceId' --output text)" + + log "I've triggered the creation of instance ${INSTANCE_ID} - it can take a \x1B[4mVery Long Time™\x1B[24m for it to be created and bootstrapped..." + aws --region "${REGION}" ec2 create-tags --resources "${INSTANCE_ID}" --tags "Key=ImageSet,Value=${IMAGE_SET}" "Key=Name,Value=${IMAGE_SET} base instance ${IMAGE_SET_COMMIT_SHA}" "Key=TC-Windows-Base,Value=true" + log "I've tagged it with \"ImageSet\": \"${IMAGE_SET}\"" + + sleep 1 + + # grab public IP before it shuts down and loses it! + PUBLIC_IP="$(aws --region "${REGION}" ec2 describe-instances --instance-id "${INSTANCE_ID}" --query 'Reservations[*].Instances[*].NetworkInterfaces[*].Association.PublicIp' --output text)" + + if [ "${IMAGE_OS}" == "windows" ]; then + until [ -n "${PASSWORD}" ]; do + log " Waiting for Windows Password from ${INSTANCE_ID} (IP ${PUBLIC_IP})..." + sleep 10 + PASSWORD="$(aws --region "${REGION}" ec2 get-password-data --instance-id "${INSTANCE_ID}" --priv-launch-key ${CLOUD}.${REGION}.id_rsa --output text --query PasswordData 2>/dev/null || true)" + done + fi + + log "To connect to the template instance (please don't do so until AMI creation process is completed"'!'"):" + log '' + + if [ "${IMAGE_OS}" == "windows" ]; then + log " Public IP: ${PUBLIC_IP}" + log " Username: Administrator" + log " Password: ${PASSWORD}" + else + # linux + log " ssh -i '$(pwd)/${CLOUD}.${REGION}.id_rsa' ubuntu@${PUBLIC_IP}" + fi + + # poll for a stopped state + until aws --region "${REGION}" ec2 wait instance-stopped --instance-ids "${INSTANCE_ID}" >/dev/null 2>&1; do + log " Waiting for instance ${INSTANCE_ID} (IP ${PUBLIC_IP}) to shut down..." + sleep 30 + done + + rm "${TEMP_SETUP_SCRIPT}" + + log "Now snapshotting the instance to create an AMI..." + # now capture the AMI + IMAGE_ID="$(aws --region "${REGION}" ec2 create-image --instance-id "${INSTANCE_ID}" --name "${IMAGE_SET} version ${IMAGE_SET_COMMIT_SHA}" --description "${IMAGE_SET} version ${IMAGE_SET_COMMIT_SHA}" --output text)" + + log "The AMI is currently being created: ${IMAGE_ID}" + + log '' + log "To monitor the AMI creation process, see:" + log '' + log " https://${REGION}.console.aws.amazon.com/ec2/v2/home?region=${REGION}#Images:visibility=owned-by-me;search=${IMAGE_ID};sort=desc:platform" + + log "I've triggered the snapshot of instance ${INSTANCE_ID} as ${IMAGE_ID} - but now we will need to wait a \x1B[4mVery Long Time™\x1B[24m for it to be created..." + + until aws --region "${REGION}" ec2 wait image-available --image-ids "${IMAGE_ID}" >/dev/null 2>&1; do + log " Waiting for ${IMAGE_ID} availability..." + sleep 30 + done + + touch "${REGION}.${IMAGE_ID}.latest-image" + + { + echo "Instance: ${INSTANCE_ID}" + echo "Public IP: ${PUBLIC_IP}" + [ -n "${PASSWORD}" ] && echo "Password: ${PASSWORD}" + echo "AMI: ${IMAGE_ID}" + } > "${REGION}.secrets" + + aws_delete_found +} + + +################## GCP ################## + +function gcp_delete { + gcp_find_old_objects + gcp_delete_found +} + +function gcp_find_old_objects { + log "Querying old instances..." + OLD_INSTANCES="$(gcloud compute instances list --project="${GCP_PROJECT}" --filter="labels.image-set=${IMAGE_SET} AND zone:${REGION}" --format='table[no-heading](name)')" + if [ -n "${OLD_INSTANCES}" ]; then + log "Found old instances:" $OLD_INSTANCES + else + log "WARNING: No old instances found" + fi + + log "Querying previous images..." + OLD_IMAGES="$(gcloud compute images list --project="${GCP_PROJECT}" --filter="labels.image-set=${IMAGE_SET}" --format='table[no-heading](name)')" + if [ -n "${OLD_IMAGES}" ]; then + log "Found old images:" $OLD_IMAGES + else + log "WARNING: No old images found" + fi +} + +function gcp_delete_found { + # terminate old instances + if [ -n "${OLD_INSTANCES}" ]; then + log "Now terminating instances" ${OLD_INSTANCES}... + gcloud compute instances delete ${OLD_INSTANCES} --zone="${REGION}" --delete-disks=all + else + log "No previous instances to terminate." + fi + + # delete old images + if [ -n "${OLD_IMAGES}" ]; then + log "Deleting the old image(s) ("${OLD_IMAGES}")..." + gcloud compute images delete ${OLD_IMAGES} + else + log "No old snapshot to delete." + fi +} + +function gcp_update { + + # NOTE: to grant permission for community-tc worker manager to use images in your GCP project, run: + # gcloud projects add-iam-policy-binding "${GCP_PROJECT}" --member serviceAccount:taskcluster-worker-manager@taskcluster-temp-workers.iam.gserviceaccount.com --role roles/compute.imageUser + + # Prefer no shh keys, see: https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys + + gcp_find_old_objects + + TEMP_SETUP_SCRIPT="$(mktemp -t ${UNIQUE_NAME}.XXXXXXXXXX)" + + if [ -f "bootstrap.ps1" ]; then + PLATFORM=windows + echo '&{' >> "${TEMP_SETUP_SCRIPT}" + cat bootstrap.ps1 | sed 's/%MY_CLOUD%/gcp/g' >> "${TEMP_SETUP_SCRIPT}" + echo '} 5>&1 4>&1 3>&1 2>&1 > C:\update_gcp.log' >> "${TEMP_SETUP_SCRIPT}" + STARTUP_KEY=windows-startup-script-ps1 + else + PLATFORM=linux + cat bootstrap.sh | sed 's/%MY_CLOUD%/gcp/g' >> "${TEMP_SETUP_SCRIPT}" + STARTUP_KEY=startup-script + fi + + gcloud beta compute --project="${GCP_PROJECT}" instances create "${UNIQUE_NAME}" --description="instance for image set ${IMAGE_SET}" --zone="${REGION}" --machine-type=n1-standard-4 --subnet=default --network-tier=PREMIUM --metadata-from-file="${STARTUP_KEY}=${TEMP_SETUP_SCRIPT}" --no-restart-on-failure --maintenance-policy=MIGRATE --service-account=593123400364-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 $(cat gcp_filters) --boot-disk-device-name="${UNIQUE_NAME}" --labels="image-set=${IMAGE_SET}" --reservation-affinity=any --enable-display-device + + log "I've triggered the creation of instance ${UNIQUE_NAME} - it can take a \x1B[4mVery Long Time™\x1B[24m for it to be created and bootstrapped..." + + log "To connect to the template instance:" + log '' + log " gcloud compute ssh ${UNIQUE_NAME} --project='${GCP_PROJECT}' --zone=${REGION}" + log '' + + if [ "${PLATFORM}" == "windows" ]; then + until gcloud compute reset-windows-password "${UNIQUE_NAME}" --zone "${REGION}"; do + sleep 15 + done + fi + + # poll for a stopped state + + until [ "$(gcloud compute --project="${GCP_PROJECT}" instances describe --zone="${REGION}" "${UNIQUE_NAME}" --format='table[no-heading](status)')" == 'TERMINATED' ]; do + log " Waiting for instance ${UNIQUE_NAME} to shut down..." + sleep 15 + done + + rm "${TEMP_SETUP_SCRIPT}" + + log "Now creating an image from the terminated instance..." + # gcloud compute disks snapshot "${UNIQUE_NAME}" --project="${GCP_PROJECT}" --description="my description" --labels="key1=value1" --snapshot-names="${UNIQUE_NAME}" --zone="${REGION}" --storage-location=us + gcloud compute images create "${UNIQUE_NAME}" --source-disk="${UNIQUE_NAME}" --source-disk-zone="${REGION}" --labels="image-set=${IMAGE_SET}" + + log '' + log "The image is being created here:" + log '' + log " https://console.cloud.google.com/compute/imagesDetail/projects/${GCP_PROJECT}/global/images/${UNIQUE_NAME}?project=${GCP_PROJECT}&authuser=1&supportedpurview=project" + + until [ "$(gcloud compute --project="${GCP_PROJECT}" images describe "${UNIQUE_NAME}" --format='table[no-heading](status)')" == 'READY' ]; do + log " Waiting for image ${UNIQUE_NAME} to be created..." + sleep 15 + done + + gcp_delete_found +} + + + +################## Entry point ################## + +if [ "${1}" == "process-region" ]; then + # Step into directory containing image set definition. + cd "$(dirname "${0}")/${IMAGE_SET}" + REGION="${3}" + COLOUR="${4}" + "${2}" + exit 0 +fi + +deploy "${@}" diff --git a/worker_types/server-logs/README.md b/server-logs/README.md similarity index 100% rename from worker_types/server-logs/README.md rename to server-logs/README.md diff --git a/worker_types/server-logs/main.go b/server-logs/main.go similarity index 100% rename from worker_types/server-logs/main.go rename to server-logs/main.go diff --git a/worker_types/README.md b/worker_types/README.md index 40f96bc9..5301292a 100644 --- a/worker_types/README.md +++ b/worker_types/README.md @@ -1,29 +1 @@ -Setting up a new Windows worker type -==================================== - -1. Create a subdirectory here, named the same as the worker type. -2. Inside the directory create a file called `bootstrap.ps1` which contains the powershell for setting up the environment. -3. Optional: place any other files related to the worker type in this directory, for example you may wish to copy the worker type definition into a file here, or include other information such as an example task. -4. Create either: - a) the worker type in the AWS Provisioner, making sure to include an (arbitrary existing) AMI for all the provisioner supported regions (currently us-east-1, us-west-1, us-west-2) - b) a worker pool definition with the 'google' provider, making sure to include an arbitrary image name -5. Run [`./worker_type.sh`](https://github.com/taskcluster/generic-worker/blob/master/worker_types/worker_type.sh)` [aws|gcp] update` -6. Create a task in the Task Creator to check whether everything is working ok. - -Updating an existing worker type with a new generic worker and/or new bootstrapping code -======================================================================================== - -1. Make sure there is a frozen release of the generic worker to use (to make a release, follow release instructions in [README.md](https://github.com/taskcluster/generic-worker/blob/master/README.md)). -2. Update the `bootstrap.ps1` or `bootstrap.sh` for the worker type or worker pool to use the new release number, if changed. -3. Update the bootstrap script with any other setup changes, if required. -4. Run [`./worker_type.sh`](https://github.com/taskcluster/generic-worker/blob/master/worker_types/worker_type.sh)` [aws|gcp] update` -5. Create a task in the Task Creator to check whether everything is working ok. - -Video Guide to setting up windows worker types -============================================== - -This is a bit old-school - but to see the process performed manually, see -https://www.youtube.com/watch?t=800&v=B1MAyJpUya8 for a walkthrough. These days -things are a bit simpler, as you just need to update the bootstrap script and run -the worker_type.sh script, as documented above - but the video will give you an -insight into what takes place in the case of deploying using AWS Provisioner. +Please see the /imagesets directory instead. diff --git a/worker_types/all-worker-types/main.go b/worker_types/all-worker-types/main.go deleted file mode 100644 index 4d81b51f..00000000 --- a/worker_types/all-worker-types/main.go +++ /dev/null @@ -1,128 +0,0 @@ -package main - -import ( - "fmt" - "io" - "net/http" - "net/url" - "os" - "path/filepath" - "sync" - "time" - - "github.com/taskcluster/httpbackoff" - "github.com/taskcluster/taskcluster-client-go/tcawsprovisioner" -) - -type WorkerTypeFetcher struct { - Provisioner *tcawsprovisioner.AwsProvisioner - RequestChannel <-chan string - DownloadDirectory string - ProcessedChannel chan<- string -} - -type WorkerPool struct { - Workers []*WorkerTypeFetcher - WaitGroup sync.WaitGroup -} - -// This program is a simple command line utility. When you run it, it will -// spawn 20 go routines to download worker type defintions for -// aws-provisioner-v1 in parallel. It will put them in a sub-directory called -// worker_type_definitions, creating it if necessary, with each file named as -// the workerType. I use this in combination with a cron job that runs -// https://github.com/petemoore/myscrapbook/blob/master/sync-worker-type-definitions.sh -// every 5 mins, in order to maintain a git history of worker type definitions -// locally. I don't publish the git repository anywhere, since the worker type -// definitions currently contain secrets (we have bugs open to remove the -// secrets at some point). -func main() { - prov := tcawsprovisioner.NewFromEnv() - downloadDirectory := "worker_type_definitions" - requestChannel := make(chan string) - processedChannel := make(chan string) - _ = NewWorkerPool(20, requestChannel, processedChannel, prov, downloadDirectory) - allWorkerTypes, err := prov.ListWorkerTypes() - if err != nil { - panic(err) - } - err = os.MkdirAll(downloadDirectory, 0755) - if err != nil { - panic(err) - } - go func() { - defer close(requestChannel) - for _, workerType := range *allWorkerTypes { - requestChannel <- workerType - } - }() - for completedWorkerType := range processedChannel { - fmt.Println(completedWorkerType) - } -} - -func NewWorkerPool(capacity int, requestChannel <-chan string, processedChannel chan<- string, prov *tcawsprovisioner.AwsProvisioner, downloadDirectory string) *WorkerPool { - wp := &WorkerPool{} - wp.WaitGroup.Add(capacity) - wp.Workers = make([]*WorkerTypeFetcher, capacity, capacity) - for i := 0; i < capacity; i++ { - wp.Workers[i] = &WorkerTypeFetcher{ - Provisioner: prov, - RequestChannel: requestChannel, - DownloadDirectory: downloadDirectory, - ProcessedChannel: processedChannel, - } - go func(i int) { - wp.Workers[i].FetchUntilDone(&wp.WaitGroup) - }(i) - } - go func() { - wp.WaitGroup.Wait() - close(processedChannel) - }() - return wp -} - -func (wtf *WorkerTypeFetcher) FetchUntilDone(wg *sync.WaitGroup) { - for workerType := range wtf.RequestChannel { - err := wtf.fetch(workerType) - if err != nil { - panic(err) - } - } - wg.Done() -} - -func (wtf *WorkerTypeFetcher) fetch(workerType string) (err error) { - var u *url.URL - u, err = wtf.Provisioner.WorkerType_SignedURL(workerType, time.Minute) - if err != nil { - return - } - var resp *http.Response - resp, _, err = httpbackoff.Get(u.String()) - if err != nil { - return - } - defer func() { - err2 := resp.Body.Close() - if err == nil { - err = err2 - } - }() - var file *os.File - file, err = os.Create(filepath.Join(wtf.DownloadDirectory, workerType)) - if err != nil { - return - } - defer func() { - if err == nil { - err = file.Close() - } else { - file.Close() - } - }() - io.Copy(file, resp.Body) - wtf.ProcessedChannel <- workerType - return -} diff --git a/worker_types/ami-test-win2012r2/bootstrap.ps1 b/worker_types/ami-test-win2012r2/bootstrap.ps1 deleted file mode 100644 index 345037c0..00000000 --- a/worker_types/ami-test-win2012r2/bootstrap.ps1 +++ /dev/null @@ -1,194 +0,0 @@ -# use TLS 1.2 (see bug 1443595) -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -# capture env -Get-ChildItem Env: | Out-File "C:\install_env.txt" - -# needed for making http requests -$client = New-Object system.net.WebClient -$shell = new-object -com shell.application - -# utility function to download a zip file and extract it -function Expand-ZIPFile($file, $destination, $url) -{ - $client.DownloadFile($url, $file) - $zip = $shell.NameSpace($file) - foreach($item in $zip.items()) - { - $shell.Namespace($destination).copyhere($item) - } -} - -# allow powershell scripts to run -Set-ExecutionPolicy Unrestricted -Force -Scope Process - -# install chocolatey package manager -Invoke-Expression ($client.DownloadString('https://chocolatey.org/install.ps1')) - -# install Windows SDK 8.1 -choco install -y windows-sdk-8.1 - -# install June 2010 DirectX SDK for compatibility with Win XP -$client.DownloadFile("http://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe", "C:\DXSDK_Jun10.exe") - -# prerequisite for June 2010 DirectX SDK is to install ".NET Framework 3.5 (includes .NET 2.0 and 3.0)" -Install-WindowsFeature NET-Framework-Core - -# now run DirectX SDK installer -Start-Process C:\DXSDK_Jun10.exe -ArgumentList "/U" -wait -NoNewWindow -PassThru -RedirectStandardOutput C:\directx_sdk_install.log -RedirectStandardError C:\directx_sdk_install.err - -# install rustc dependencies (32 bit) -$client.DownloadFile("http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe", "C:\vcredist_x86-vs2013.exe") -Start-Process "C:\vcredist_x86-vs2013.exe" -ArgumentList "/install /passive /norestart /log C:\vcredist_x86-vs2013-install.log" -Wait -PassThru - -# install rustc dependencies (64 bit) -$client.DownloadFile("http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe", "C:\vcredist_x64-vs2013.exe") -Start-Process "C:\vcredist_x64-vs2013.exe" -ArgumentList "/install /passive /norestart /log C:\vcredist_x64-vs2013-install.log" -Wait -PassThru - -# install more rustc dependencies (32 bit) -$client.DownloadFile("http://download.microsoft.com/download/f/3/9/f39b30ec-f8ef-4ba3-8cb4-e301fcf0e0aa/vc_redist.x86.exe", "C:\vcredist_x86-vs2015.exe") -Start-Process "C:\vcredist_x86-vs2015.exe" -ArgumentList "/install /passive /norestart /log C:\vcredist_x86-vs2015-install.log" -Wait -PassThru - -# install more rustc dependencies (64 bit) -$client.DownloadFile("http://download.microsoft.com/download/4/c/b/4cbd5757-0dd4-43a7-bac0-2a492cedbacb/vc_redist.x64.exe", "C:\vcredist_x64-vs2015.exe") -Start-Process "C:\vcredist_x64-vs2015.exe" -ArgumentList "/install /passive /norestart /log C:\vcredist_x64-vs2015-install.log" -Wait -PassThru - -# install mozilla-build yasm dependencies (32 bit) -$client.DownloadFile("http://download.microsoft.com/download/C/6/D/C6D0FD4E-9E53-4897-9B91-836EBA2AACD3/vcredist_x86.exe", "C:\vcredist_x86-vs2010.exe") -Start-Process "C:\vcredist_x86-vs2010.exe" -ArgumentList "/install /passive /norestart /log C:\vcredist_x86-vs2010-install.log" -Wait -PassThru - -# install mozilla-build yasm dependencies (64 bit) -$client.DownloadFile("http://download.microsoft.com/download/A/8/0/A80747C3-41BD-45DF-B505-E9710D2744E0/vcredist_x64.exe", "C:\vcredist_x64-vs2010.exe") -Start-Process "C:\vcredist_x64-vs2010.exe" -ArgumentList "/install /passive /norestart /log C:\vcredist_x64-vs2010-install.log" -Wait -PassThru - -# download mozilla-build installer -$client.DownloadFile("https://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe", "C:\MozillaBuildSetup.exe") - -# run mozilla-build installer in silent (/S) mode -Start-Process "C:\MozillaBuildSetup.exe" -ArgumentList "/S" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\MozillaBuild_install.log" -RedirectStandardError "C:\MozillaBuild_install.err" - -# Create C:\builds and give full access to all users (for hg-shared, tooltool_cache, etc) -md "C:\builds" -$acl = Get-Acl -Path "C:\builds" -$ace = New-Object System.Security.AccessControl.FileSystemAccessRule("Everyone","Full","ContainerInherit,ObjectInherit","None","Allow") -$acl.AddAccessRule($ace) -Set-Acl "C:\builds" $acl - -# download tooltool -$client.DownloadFile("https://raw.githubusercontent.com/mozilla/release-services/master/src/tooltool/client/tooltool.py", "C:\builds\tooltool.py") - -# install nssm -Expand-ZIPFile -File "C:\nssm-2.24.zip" -Destination "C:\" -Url "http://www.nssm.cc/release/nssm-2.24.zip" - -# initial clone of mozilla-central -# Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "C:\mozilla-build\python\Scripts\hg clone -u null https://hg.mozilla.org/mozilla-central C:\gecko" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\hg_initial_clone.log" -RedirectStandardError "C:\hg_initial_clone.err" - -# download Windows Server 2003 Resource Kit Tools -$client.DownloadFile("https://download.microsoft.com/download/8/e/c/8ec3a7d8-05b4-440a-a71e-ca3ee25fe057/rktools.exe", "C:\rktools.exe") - -# download gvim -$client.DownloadFile("http://artfiles.org/vim.org/pc/gvim80-069.exe", "C:\gvim80-069.exe") - -# https://bugzil.la/1274844 download BinScope -$client.DownloadFile("https://download.microsoft.com/download/2/6/A/26AAA1DE-D060-4246-93B5-7D7C877E4F8F/BinScopeSetup.msi", "C:\BinScopeSetup.msi") - -# install BinScope -Start-Process "msiexec" -ArgumentList "/i C:\BinScopeSetup.msi /quiet" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\binscope-install.log" -RedirectStandardError "C:\binscope-install.err" - -# open up firewall for livelog (both PUT and GET interfaces) -New-NetFirewallRule -DisplayName "Allow livelog PUT requests" -Direction Inbound -LocalPort 60022 -Protocol TCP -Action Allow -New-NetFirewallRule -DisplayName "Allow livelog GET requests" -Direction Inbound -LocalPort 60023 -Protocol TCP -Action Allow - -# install go -md "C:\gopath" -Expand-ZIPFile -File "C:\go1.11.5.windows-amd64.zip" -Destination "C:\" -Url "https://storage.googleapis.com/golang/go1.11.5.windows-amd64.zip" - -# install PSTools -# md "C:\PSTools" -# Expand-ZIPFile -File "C:\PSTools\PSTools.zip" -Destination "C:\PSTools" -Url "https://download.sysinternals.com/files/PSTools.zip" - -# install git -$client.DownloadFile("https://github.com/git-for-windows/git/releases/download/v2.16.2.windows.1/Git-2.16.2-64-bit.exe", "C:\Git-2.16.2-64-bit.exe") -Start-Process "C:\Git-2.16.2-64-bit.exe" -ArgumentList "/VERYSILENT /LOG=C:\git_install.log /NORESTART /SUPPRESSMSGBOXES" -Wait -NoNewWindow - -# install node -$client.DownloadFile("https://nodejs.org/dist/v6.6.0/node-v6.6.0-x64.msi", "C:\NodeSetup.msi") -Start-Process "msiexec" -ArgumentList "/i C:\NodeSetup.msi /quiet" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\node-install.log" -RedirectStandardError "C:\node-install.err" - -# set permanent env vars -[Environment]::SetEnvironmentVariable("GOROOT", "C:\go", "Machine") -[Environment]::SetEnvironmentVariable("PATH", $Env:Path + ";C:\Program Files\Vim\vim80;C:\go\bin;C:\gopath\bin;C:\mozilla-build\python;C:\mozilla-build\python\Scripts;C:\Program Files\Git\cmd;C:\Program Files\nodejs", "Machine") -[Environment]::SetEnvironmentVariable("GOPATH", "C:\gopath", "Machine") - -# upgrade python libraries -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade pip==8.1.1 setuptools==20.7.0 virtualenv==15.0.3 wheel==0.29.0 pypiwin32==219 requests==2.9.1 psutil==4.1.0" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\python_package_upgrades.log" -RedirectStandardError "C:\python_package_upgrades.err" - -# set env vars for the currently running process -$env:GOROOT = "C:\go" -$env:GOPATH = "C:\gopath" -$env:PATH = $env:PATH + ";C:\go\bin;C:\gopath\bin;C:\mozilla-build\python;C:\mozilla-build\python\Scripts;C:\Program Files\Git\cmd" - -# build generic-worker and livelog source code -md C:\generic-worker -Start-Process "go" -ArgumentList "get -t github.com/taskcluster/generic-worker github.com/taskcluster/livelog" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\generic-worker\go-get_install.log" -RedirectStandardError "C:\generic-worker\go-get_install.err" - -# install livelog -Copy-Item C:\gopath\bin\livelog.exe C:\generic-worker - -# install generic-worker -Copy-Item C:\gopath\bin\generic-worker.exe C:\generic-worker -# Start-Process C:\generic-worker\generic-worker.exe -ArgumentList "install service --configure-for-%MY_CLOUD% --nssm C:\nssm-2.24\win64\nssm.exe --config C:\generic-worker\generic-worker.config" -Wait -NoNewWindow -PassThru -RedirectStandardOutput C:\generic-worker\install.log -RedirectStandardError C:\generic-worker\install.err -Start-Process C:\generic-worker\generic-worker.exe -ArgumentList "install startup --config C:\generic-worker\generic-worker.config" -Wait -NoNewWindow -PassThru -RedirectStandardOutput C:\generic-worker\install.log -RedirectStandardError C:\generic-worker\install.err - -# patch generic worker startup script to rebuild generic worker -$client.DownloadFile("https://raw.githubusercontent.com/petemoore/myscrapbook/master/run-generic-worker.bat", "C:\generic-worker\run-generic-worker.bat") - -# generate ed25519 key -Start-Process C:\generic-worker\generic-worker.exe -ArgumentList "new-ed25519-keypair --file C:\generic-worker\generic-worker-ed25519-signing-key.key" -Wait -NoNewWindow -PassThru -RedirectStandardOutput C:\generic-worker\generate-signing-key.log -RedirectStandardError C:\generic-worker\generate-signing-key.err - -# download cygwin (not required, but useful) -$client.DownloadFile("https://www.cygwin.com/setup-x86_64.exe", "C:\cygwin-setup-x86_64.exe") - -# install cygwin -# complete package list: https://cygwin.com/packages/package_list.html -Start-Process "C:\cygwin-setup-x86_64.exe" -ArgumentList "--quiet-mode --wait --root C:\cygwin --site http://cygwin.mirror.constant.com --packages openssh,vim,curl,tar,wget,zip,unzip,diffutils,bzr" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\cygwin_install.log" -RedirectStandardError "C:\cygwin_install.err" - -# open up firewall for ssh daemon -New-NetFirewallRule -DisplayName "Allow SSH inbound" -Direction Inbound -LocalPort 22 -Protocol TCP -Action Allow - -# workaround for https://www.cygwin.com/ml/cygwin/2015-10/msg00036.html -# see: -# 1) https://www.cygwin.com/ml/cygwin/2015-10/msg00038.html -# 2) https://cygwin.com/git/gitweb.cgi?p=cygwin-csih.git;a=blob;f=cygwin-service-installation-helper.sh;h=10ab4fb6d47803c9ffabdde51923fc2c3f0496bb;hb=7ca191bebb52ae414bb2a2e37ef22d94f2658dc7#l2884 -$env:LOGONSERVER = "\\" + $env:COMPUTERNAME - -# configure sshd (not required, but useful) -Start-Process "C:\cygwin\bin\bash.exe" -ArgumentList "--login -c `"ssh-host-config -y -c 'ntsec mintty' -u 'cygwinsshd' -w 'qwe123QWE!@#'`"" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\cygrunsrv.log" -RedirectStandardError "C:\cygrunsrv.err" - -# start sshd -Start-Process "net" -ArgumentList "start sshd" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\net_start_sshd.log" -RedirectStandardError "C:\net_start_sshd.err" - -# download bash setup script -$client.DownloadFile("https://raw.githubusercontent.com/petemoore/myscrapbook/master/setup.sh", "C:\cygwin\home\Administrator\setup.sh") - -# run bash setup script -Start-Process "C:\cygwin\bin\bash.exe" -ArgumentList "--login -c 'chmod a+x setup.sh; ./setup.sh'" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\Administrator_cygwin_setup.log" -RedirectStandardError "C:\Administrator_cygwin_setup.err" - -# install dependencywalker (useful utility for troubleshooting, not required) -md "C:\DependencyWalker" -Expand-ZIPFile -File "C:\depends22_x64.zip" -Destination "C:\DependencyWalker" -Url "http://dependencywalker.com/depends22_x64.zip" - -# install ProcessExplorer (useful utility for troubleshooting, not required) -md "C:\ProcessExplorer" -Expand-ZIPFile -File "C:\ProcessExplorer.zip" -Destination "C:\ProcessExplorer" -Url "https://download.sysinternals.com/files/ProcessExplorer.zip" - -# install ProcessMonitor (useful utility for troubleshooting, not required) -md "C:\ProcessMonitor" -Expand-ZIPFile -File "C:\ProcessMonitor.zip" -Destination "C:\ProcessMonitor" -Url "https://download.sysinternals.com/files/ProcessMonitor.zip" - -# now shutdown, in preparation for creating an image -# Stop-Computer isn't working, also not when specifying -AsJob, so reverting to using `shutdown` command instead -# * https://www.reddit.com/r/PowerShell/comments/65250s/windows_10_creators_update_stopcomputer_not/dgfofug/?st=j1o3oa29&sh=e0c29c6d -# * https://support.microsoft.com/en-in/help/4014551/description-of-the-security-and-quality-rollup-for-the-net-framework-4 -# * https://support.microsoft.com/en-us/help/4020459 -shutdown -s diff --git a/worker_types/ami-test-win7sp1/aws_filters b/worker_types/ami-test-win7sp1/aws_filters deleted file mode 100644 index 9ff0c060..00000000 --- a/worker_types/ami-test-win7sp1/aws_filters +++ /dev/null @@ -1,2 +0,0 @@ -Name=platform,Values=windows -Name=name,Values=gecko-t-win7-32-base-* diff --git a/worker_types/ami-test-win7sp1/bootstrap.ps1 b/worker_types/ami-test-win7sp1/bootstrap.ps1 deleted file mode 100644 index 5eeec33f..00000000 --- a/worker_types/ami-test-win7sp1/bootstrap.ps1 +++ /dev/null @@ -1,194 +0,0 @@ -# use TLS 1.2 (see bug 1443595) -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -# capture env -Get-ChildItem Env: | Out-File "C:\install_env.txt" - -# needed for making http requests -$client = New-Object system.net.WebClient -$shell = new-object -com shell.application - -# utility function to download a zip file and extract it -function Expand-ZIPFile($file, $destination, $url) -{ - $client.DownloadFile($url, $file) - $zip = $shell.NameSpace($file) - foreach($item in $zip.items()) - { - $shell.Namespace($destination).copyhere($item) - } -} - -# allow powershell scripts to run -Set-ExecutionPolicy Unrestricted -Force -Scope Process - -# install chocolatey package manager -# Invoke-Expression ($client.DownloadString('https://chocolatey.org/install.ps1')) - -# install Windows SDK 8.1 -# choco install -y windows-sdk-8.1 - -# install June 2010 DirectX SDK for compatibility with Win XP -# $client.DownloadFile("http://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe", "C:\DXSDK_Jun10.exe") - -# prerequisite for June 2010 DirectX SDK is to install ".NET Framework 3.5 (includes .NET 2.0 and 3.0)" -Install-WindowsFeature NET-Framework-Core - -# now run DirectX SDK installer -# Start-Process C:\DXSDK_Jun10.exe -ArgumentList "/U" -wait -NoNewWindow -PassThru -RedirectStandardOutput C:\directx_sdk_install.log -RedirectStandardError C:\directx_sdk_install.err - -# install rustc dependencies (32 bit) -# $client.DownloadFile("http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe", "C:\vcredist_x86-vs2013.exe") -Start-Process "C:\vcredist_x86-vs2013.exe" -ArgumentList "/install /passive /norestart /log C:\vcredist_x86-vs2013-install.log" -Wait -PassThru - -# install rustc dependencies (64 bit) -# $client.DownloadFile("http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe", "C:\vcredist_x64-vs2013.exe") -# Start-Process "C:\vcredist_x64-vs2013.exe" -ArgumentList "/install /passive /norestart /log C:\vcredist_x64-vs2013-install.log" -Wait -PassThru - -# install more rustc dependencies (32 bit) -# $client.DownloadFile("http://download.microsoft.com/download/f/3/9/f39b30ec-f8ef-4ba3-8cb4-e301fcf0e0aa/vc_redist.x86.exe", "C:\vcredist_x86-vs2015.exe") -# Start-Process "C:\vcredist_x86-vs2015.exe" -ArgumentList "/install /passive /norestart /log C:\vcredist_x86-vs2015-install.log" -Wait -PassThru - -# install more rustc dependencies (64 bit) -# $client.DownloadFile("http://download.microsoft.com/download/4/c/b/4cbd5757-0dd4-43a7-bac0-2a492cedbacb/vc_redist.x64.exe", "C:\vcredist_x64-vs2015.exe") -# Start-Process "C:\vcredist_x64-vs2015.exe" -ArgumentList "/install /passive /norestart /log C:\vcredist_x64-vs2015-install.log" -Wait -PassThru - -# install mozilla-build yasm dependencies (32 bit) -# $client.DownloadFile("http://download.microsoft.com/download/C/6/D/C6D0FD4E-9E53-4897-9B91-836EBA2AACD3/vcredist_x86.exe", "C:\vcredist_x86-vs2010.exe") -# Start-Process "C:\vcredist_x86-vs2010.exe" -ArgumentList "/install /passive /norestart /log C:\vcredist_x86-vs2010-install.log" -Wait -PassThru - -# install mozilla-build yasm dependencies (64 bit) -# $client.DownloadFile("http://download.microsoft.com/download/A/8/0/A80747C3-41BD-45DF-B505-E9710D2744E0/vcredist_x64.exe", "C:\vcredist_x64-vs2010.exe") -# Start-Process "C:\vcredist_x64-vs2010.exe" -ArgumentList "/install /passive /norestart /log C:\vcredist_x64-vs2010-install.log" -Wait -PassThru - -# download mozilla-build installer -$client.DownloadFile("https://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe", "C:\MozillaBuildSetup.exe") - -# run mozilla-build installer in silent (/S) mode -Start-Process "C:\MozillaBuildSetup.exe" -ArgumentList "/S" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\MozillaBuild_install.log" -RedirectStandardError "C:\MozillaBuild_install.err" - -# Create C:\builds and give full access to all users (for hg-shared, tooltool_cache, etc) -# md "C:\builds" -# $acl = Get-Acl -Path "C:\builds" -# $ace = New-Object System.Security.AccessControl.FileSystemAccessRule("Everyone","Full","ContainerInherit,ObjectInherit","None","Allow") -# $acl.AddAccessRule($ace) -# Set-Acl "C:\builds" $acl - -# download tooltool -$client.DownloadFile("https://raw.githubusercontent.com/mozilla/release-services/master/src/tooltool/client/tooltool.py", "C:\builds\tooltool.py") - -# install nssm -# Expand-ZIPFile -File "C:\nssm-2.24.zip" -Destination "C:\" -Url "http://www.nssm.cc/release/nssm-2.24.zip" - -# initial clone of mozilla-central -# Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "C:\mozilla-build\python\Scripts\hg clone -u null https://hg.mozilla.org/mozilla-central C:\gecko" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\hg_initial_clone.log" -RedirectStandardError "C:\hg_initial_clone.err" - -# download Windows Server 2003 Resource Kit Tools -# $client.DownloadFile("https://download.microsoft.com/download/8/e/c/8ec3a7d8-05b4-440a-a71e-ca3ee25fe057/rktools.exe", "C:\rktools.exe") - -# download gvim -$client.DownloadFile("http://artfiles.org/vim.org/pc/gvim80-069.exe", "C:\gvim80-069.exe") - -# https://bugzil.la/1274844 download BinScope -# $client.DownloadFile("https://download.microsoft.com/download/2/6/A/26AAA1DE-D060-4246-93B5-7D7C877E4F8F/BinScopeSetup.msi", "C:\BinScopeSetup.msi") - -# install BinScope -# Start-Process "msiexec" -ArgumentList "/i C:\BinScopeSetup.msi /quiet" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\binscope-install.log" -RedirectStandardError "C:\binscope-install.err" - -# open up firewall for livelog (both PUT and GET interfaces) -# New-NetFirewallRule -DisplayName "Allow livelog PUT requests" -Direction Inbound -LocalPort 60022 -Protocol TCP -Action Allow -# New-NetFirewallRule -DisplayName "Allow livelog GET requests" -Direction Inbound -LocalPort 60023 -Protocol TCP -Action Allow - -# install go -md "C:\gopath" -Expand-ZIPFile -File "C:\go1.11.5.windows-386.zip" -Destination "C:\" -Url "https://storage.googleapis.com/golang/go1.11.5.windows-386.zip" - -# install PSTools -# md "C:\PSTools" -# Expand-ZIPFile -File "C:\PSTools\PSTools.zip" -Destination "C:\PSTools" -Url "https://download.sysinternals.com/files/PSTools.zip" - -# install git -# $client.DownloadFile("https://github.com/git-for-windows/git/releases/download/v2.16.2.windows.1/Git-2.16.2-32-bit.exe", "C:\Git-2.16.2-32-bit.exe") -# Start-Process "C:\Git-2.16.2-64-bit.exe" -ArgumentList "/VERYSILENT /LOG=C:\git_install.log /NORESTART /SUPPRESSMSGBOXES" -Wait -NoNewWindow - -# install node -# $client.DownloadFile("https://nodejs.org/dist/v6.6.0/node-v6.6.0-x64.msi", "C:\NodeSetup.msi") -# Start-Process "msiexec" -ArgumentList "/i C:\NodeSetup.msi /quiet" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\node-install.log" -RedirectStandardError "C:\node-install.err" - -# set permanent env vars -[Environment]::SetEnvironmentVariable("GOROOT", "C:\go", "Machine") -[Environment]::SetEnvironmentVariable("PATH", $Env:Path + ";C:\Program Files\Vim\vim80;C:\go\bin;C:\gopath\bin;C:\mozilla-build\python;C:\mozilla-build\python\Scripts;C:\Program Files (x86)\Git\cmd;C:\Program Files\nodejs", "Machine") -[Environment]::SetEnvironmentVariable("GOPATH", "C:\gopath", "Machine") - -# upgrade python libraries -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade pip==8.1.1 setuptools==20.7.0 virtualenv==15.0.3 wheel==0.29.0 pypiwin32==219 requests==2.9.1 psutil==4.1.0" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\python_package_upgrades.log" -RedirectStandardError "C:\python_package_upgrades.err" - -# set env vars for the currently running process -$env:GOROOT = "C:\go" -$env:GOPATH = "C:\gopath" -$env:PATH = $env:PATH + ";C:\go\bin;C:\gopath\bin;C:\mozilla-build\python;C:\mozilla-build\python\Scripts;C:\Program Files (x86)\Git\cmd" - -# build generic-worker and livelog source code -md C:\generic-worker -Start-Process "go" -ArgumentList "get -t github.com/taskcluster/generic-worker github.com/taskcluster/livelog" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\generic-worker\go-get_install.log" -RedirectStandardError "C:\generic-worker\go-get_install.err" - -# install livelog -Copy-Item C:\gopath\bin\livelog.exe C:\generic-worker - -# install generic-worker -Copy-Item C:\gopath\bin\generic-worker.exe C:\generic-worker -# Start-Process C:\generic-worker\generic-worker.exe -ArgumentList "install service --configure-for-%MY_CLOUD% --nssm C:\nssm-2.24\win64\nssm.exe --config C:\generic-worker\generic-worker.config" -Wait -NoNewWindow -PassThru -RedirectStandardOutput C:\generic-worker\install.log -RedirectStandardError C:\generic-worker\install.err -Start-Process C:\generic-worker\generic-worker.exe -ArgumentList "install startup --config C:\generic-worker\generic-worker.config" -Wait -NoNewWindow -PassThru -RedirectStandardOutput C:\generic-worker\install.log -RedirectStandardError C:\generic-worker\install.err - -# patch generic worker startup script to rebuild generic worker -$client.DownloadFile("https://raw.githubusercontent.com/petemoore/myscrapbook/master/run-generic-worker.bat", "C:\generic-worker\run-generic-worker.bat") - -# generate ed25519 key -Start-Process C:\generic-worker\generic-worker.exe -ArgumentList "new-ed25519-keypair --file C:\generic-worker\generic-worker-ed25519-signing-key.key" -Wait -NoNewWindow -PassThru -RedirectStandardOutput C:\generic-worker\generate-signing-key.log -RedirectStandardError C:\generic-worker\generate-signing-key.err - -# download cygwin (not required, but useful) -# $client.DownloadFile("https://www.cygwin.com/setup-x86_64.exe", "C:\cygwin-setup-x86_64.exe") - -# install cygwin -# complete package list: https://cygwin.com/packages/package_list.html -# Start-Process "C:\cygwin-setup-x86_64.exe" -ArgumentList "--quiet-mode --wait --root C:\cygwin --site http://cygwin.mirror.constant.com --packages openssh,vim,curl,tar,wget,zip,unzip,diffutils,bzr" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\cygwin_install.log" -RedirectStandardError "C:\cygwin_install.err" - -# open up firewall for ssh daemon -# New-NetFirewallRule -DisplayName "Allow SSH inbound" -Direction Inbound -LocalPort 22 -Protocol TCP -Action Allow - -# workaround for https://www.cygwin.com/ml/cygwin/2015-10/msg00036.html -# see: -# 1) https://www.cygwin.com/ml/cygwin/2015-10/msg00038.html -# 2) https://cygwin.com/git/gitweb.cgi?p=cygwin-csih.git;a=blob;f=cygwin-service-installation-helper.sh;h=10ab4fb6d47803c9ffabdde51923fc2c3f0496bb;hb=7ca191bebb52ae414bb2a2e37ef22d94f2658dc7#l2884 -# $env:LOGONSERVER = "\\" + $env:COMPUTERNAME - -# configure sshd (not required, but useful) -# Start-Process "C:\cygwin\bin\bash.exe" -ArgumentList "--login -c `"ssh-host-config -y -c 'ntsec mintty' -u 'cygwinsshd' -w 'qwe123QWE!@#'`"" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\cygrunsrv.log" -RedirectStandardError "C:\cygrunsrv.err" - -# start sshd -# Start-Process "net" -ArgumentList "start sshd" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\net_start_sshd.log" -RedirectStandardError "C:\net_start_sshd.err" - -# download bash setup script -# $client.DownloadFile("https://raw.githubusercontent.com/petemoore/myscrapbook/master/setup.sh", "C:\cygwin\home\Administrator\setup.sh") - -# run bash setup script -# Start-Process "C:\cygwin\bin\bash.exe" -ArgumentList "--login -c 'chmod a+x setup.sh; ./setup.sh'" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\Administrator_cygwin_setup.log" -RedirectStandardError "C:\Administrator_cygwin_setup.err" - -# install dependencywalker (useful utility for troubleshooting, not required) -# md "C:\DependencyWalker" -# Expand-ZIPFile -File "C:\depends22_x64.zip" -Destination "C:\DependencyWalker" -Url "http://dependencywalker.com/depends22_x64.zip" - -# install ProcessExplorer (useful utility for troubleshooting, not required) -# md "C:\ProcessExplorer" -# Expand-ZIPFile -File "C:\ProcessExplorer.zip" -Destination "C:\ProcessExplorer" -Url "https://download.sysinternals.com/files/ProcessExplorer.zip" - -# install ProcessMonitor (useful utility for troubleshooting, not required) -# md "C:\ProcessMonitor" -# Expand-ZIPFile -File "C:\ProcessMonitor.zip" -Destination "C:\ProcessMonitor" -Url "https://download.sysinternals.com/files/ProcessMonitor.zip" - -# now shutdown, in preparation for creating an image -# Stop-Computer isn't working, also not when specifying -AsJob, so reverting to using `shutdown` command instead -# * https://www.reddit.com/r/PowerShell/comments/65250s/windows_10_creators_update_stopcomputer_not/dgfofug/?st=j1o3oa29&sh=e0c29c6d -# * https://support.microsoft.com/en-in/help/4014551/description-of-the-security-and-quality-rollup-for-the-net-framework-4 -# * https://support.microsoft.com/en-us/help/4020459 -shutdown -s diff --git a/worker_types/cleanup_ec2.sh b/worker_types/cleanup_ec2.sh deleted file mode 100755 index 68f7363c..00000000 --- a/worker_types/cleanup_ec2.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -cd "$(dirname "${0}")" - -go run all-worker-types/main.go -ALL_REFERENCED_AMIS="$(cat worker_type_definitions/* | sed -n 's/^[[:space:]]*"ImageId": "//p' | sed -n 's/".*//p' | sort -u)" -rm -r worker_type_definitions -echo "All referenced amis: ${ALL_REFERENCED_AMIS}" diff --git a/worker_types/deepspeech-win/bootstrap.ps1 b/worker_types/deepspeech-win/bootstrap.ps1 deleted file mode 100644 index eb773105..00000000 --- a/worker_types/deepspeech-win/bootstrap.ps1 +++ /dev/null @@ -1,195 +0,0 @@ -# use TLS 1.2 (see bug 1443595) -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -# capture env -Get-ChildItem Env: | Out-File "C:\install_env.txt" - -# needed for making http requests -$client = New-Object system.net.WebClient -$shell = new-object -com shell.application - -# utility function to download a zip file and extract it -function Expand-ZIPFile($file, $destination, $url) -{ - $client.DownloadFile($url, $file) - $zip = $shell.NameSpace($file) - foreach($item in $zip.items()) - { - $shell.Namespace($destination).copyhere($item) - } -} - -# allow powershell scripts to run -Set-ExecutionPolicy Unrestricted -Force -Scope Process - -# Disable AV for IO speed -Set-Service "WinDefend" -StartupType Disabled -Status Stopped - -# Disable disk indexing -Set-Service "WSearch" -StartupType Disabled -Status Stopped - -# install chocolatey package manager -Invoke-Expression ($client.DownloadString('https://chocolatey.org/install.ps1')) - -# install Windows 10 SDK -choco install -y windows-sdk-10.0 - -# install NodeJS v8 -choco install -y nodejs --version 8.15.0 - -# install git -choco install -y git --version 2.21.0 - -# install python2 as well for node-gyp later -choco install -y python2 --version 2.7.16 - -# install python3.6 -choco install -y python --version 3.6.8 - -# install 7zip, since msys2 p7zip behaves erratically -choco install -y 7zip --version 19.0 - -# install VisualStudio 2017 Community -choco install -y visualstudio2017community --version 15.9.7.0 --package-parameters "--add Microsoft.VisualStudio.Workload.MSBuildTools;Microsoft.VisualStudio.Component.VC.140 --passive --locale en-US" -choco install -y visualstudio2017buildtools --version 15.9.7.0 --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools;includeRecommended --add Microsoft.VisualStudio.Component.VC.140 --add Microsoft.VisualStudio.Component.NuGet.BuildTools --add Microsoft.Net.Component.4.5.TargetingPack --add Microsoft.Net.Component.4.6.TargetingPack --add Microsoft.Net.Component.4.7.TargetingPack --passive --locale en-US" - -# vcredist140 required at least for bazel -choco install -y vcredist140 --version 14.16.27027.1 - -# .Net Framework v4.5.2 -choco install -y netfx-4.5.2-devpack --version 4.5.5165101.20180721 - -# .Net Framework v4.6.2 -choco install -y netfx-4.6.2-devpack --version 4.6.01590.20170129 - -# .Net Framework v4.7.2 -choco install -y netfx-4.7.2-devpack --version 4.7.2.20190225 - -# NuGet -choco install -y nuget.commandline --version 4.9.3 - -# Carbon for later -choco install -y carbon --version 2.5.0 - -# Prepare CUDA v9.0 -#$client.DownloadFile("https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_win10-exe", "C:\cuda_9.0.176_win10.exe") -#Start-Process -FilePath "C:\cuda_9.0.176_win10.exe" -ArgumentList "-s compiler_9.0 command_line_tools_9.0 cublas_dev_9.0 cudart_9.0 cufft_dev_9.0 curand_dev_9.0 cusolver_dev_9.0 cusparse_dev_9.0" -Wait -NoNewWindow -$client.DownloadFile("https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_windows-exe", "C:\cuda_9.0.176_windows.exe") -Start-Process -FilePath "C:\cuda_9.0.176_windows.exe" -ArgumentList "-s compiler_9.0 command_line_tools_9.0 cublas_dev_9.0 cudart_9.0 cufft_dev_9.0 curand_dev_9.0 cusolver_dev_9.0 cusparse_dev_9.0" -Wait -NoNewWindow - -# CuDNN v7.3.1 for CUDA 9.0 -#Expand-ZIPFile -File "C:\cudnn-9.0-windows10-x64-v7.3.1.20.zip" -Destination "C:\CUDNN-9.0\" -Url "http://developer.download.nvidia.com/compute/redist/cudnn/v7.3.1/cudnn-9.0-windows10-x64-v7.3.1.20.zip" -md "C:\CUDNN-9.0" -Expand-ZIPFile -File "C:\cudnn-9.0-windows7-x64-v7.3.1.20.zip" -Destination "C:\CUDNN-9.0\" -Url "http://developer.download.nvidia.com/compute/redist/cudnn/v7.3.1/cudnn-9.0-windows7-x64-v7.3.1.20.zip" -cp "C:\CUDNN-9.0\cuda\include\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\include\" -cp "C:\CUDNN-9.0\cuda\lib\x64\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\lib\x64\" -cp "C:\CUDNN-9.0\cuda\bin\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin\" - -# Prepare CUDA v10.0 -#$client.DownloadFile("https://developer.nvidia.com/compute/cuda/10.0/Prod/local_installers/cuda_10.0.130_411.31_win10", "C:\cuda_10.0.130_411.31_win10.exe") -#Start-Process -FilePath "C:\cuda_10.0.130_411.31_win10.exe" -ArgumentList "-s nvcc_10.0 cublas_dev_10.0 cudart_10.0 cufft_dev_10.0 curand_dev_10.0 cusolver_dev_10.0 cusparse_dev_10.0" -Wait -NoNewWindow -$client.DownloadFile("https://developer.nvidia.com/compute/cuda/10.0/Prod/local_installers/cuda_10.0.130_411.31_windows", "C:\cuda_10.0.130_411.31_windows.exe") -Start-Process -FilePath "C:\cuda_10.0.130_411.31_windows.exe" -ArgumentList "-s nvcc_10.0 nvprune_10.0 cupti_10.0 gpu_library_advisor_10.0 memcheck_10.0 cublas_dev_10.0 cudart_10.0 cufft_dev_10.0 curand_dev_10.0 cusolver_dev_10.0 cusparse_dev_10.0" -Wait -NoNewWindow - -# Install CUDA v10.1 as well so we can patch v10.0 cudafe++.exe -# https://github.com/tensorflow/tensorflow/issues/27576#issuecomment-504703397 -$client.DownloadFile("https://developer.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.168_425.25_win10.exe", "C:\cuda_10.1.168_425.25_win10.exe") -Start-Process -FilePath "C:\cuda_10.1.168_425.25_win10.exe" -ArgumentList "-s nvcc_10.1 nvprune_10.1 cupti_10.1 gpu_library_advisor_10.1 memcheck_10.1 cublas_dev_10.1 cudart_10.1 cufft_dev_10.1 curand_dev_10.1 cusolver_dev_10.1 cusparse_dev_10.1" -Wait -NoNewWindow -mv "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin\cudafe++.exe" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin\cudafe++.exe.v10.0" -cp "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\cudafe++.exe" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin\cudafe++.exe" - -# CuDNN v7.5.0 for CUDA 10.0 -#Expand-ZIPFile -File "C:\cudnn-10.0-windows10-x64-v7.5.0.56.zip" -Destination "C:\CUDNN-10.0\" -Url "http://developer.download.nvidia.com/compute/redist/cudnn/v7.5.0/cudnn-10.0-windows10-x64-v7.5.0.56.zip" -md "C:\CUDNN-10.0" -Expand-ZIPFile -File "C:\cudnn-10.0-windows7-x64-v7.5.0.56.zip" -Destination "C:\CUDNN-10.0\" -Url "http://developer.download.nvidia.com/compute/redist/cudnn/v7.5.0/cudnn-10.0-windows7-x64-v7.5.0.56.zip" -cp "C:\CUDNN-10.0\cuda\include\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\include\" -cp "C:\CUDNN-10.0\cuda\lib\x64\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\lib\x64\" -cp "C:\CUDNN-10.0\cuda\bin\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin\" - -# Create C:\builds and give full access to all users (for hg-shared, tooltool_cache, etc) -md "C:\builds" -$acl = Get-Acl -Path "C:\builds" -$ace = New-Object System.Security.AccessControl.FileSystemAccessRule("Everyone","Full","ContainerInherit,ObjectInherit","None","Allow") -$acl.AddAccessRule($ace) -Set-Acl "C:\builds" $acl - -# GrantEveryoneSeCreateSymbolicLinkPrivilege -Start-Process "powershell" -ArgumentList "-command `"& {&'Import-Module' Carbon}`"; `"& {&'Grant-Privilege' -Identity Everyone -Privilege SeCreateSymbolicLinkPrivilege}`"" -Wait -NoNewWindow - -# Ensure proper PATH setup -[Environment]::SetEnvironmentVariable("PATH", $Env:Path + ";C:\tools\msys64\usr\bin;C:\Python36;C:\Program Files\Git\bin", "Machine") - -# install nssm, neded for generic-worker -Expand-ZIPFile -File "C:\nssm-2.24.zip" -Destination "C:\" -Url "http://www.nssm.cc/release/nssm-2.24.zip" - -# download generic-worker -md C:\generic-worker -$client.DownloadFile("https://github.com/taskcluster/generic-worker/releases/download/v16.5.5/generic-worker-multiuser-windows-amd64.exe", "C:\generic-worker\generic-worker.exe") - -# download livelog -$client.DownloadFile("https://github.com/taskcluster/livelog/releases/download/v1.1.0/livelog-windows-amd64.exe", "C:\generic-worker\livelog.exe") - -# download taskcluster-proxy -$client.DownloadFile("https://github.com/taskcluster/taskcluster-proxy/releases/download/v5.1.0/taskcluster-proxy-windows-amd64.exe", "C:\generic-worker\taskcluster-proxy.exe") - -# configure hosts file for taskcluster-proxy access via http://taskcluster -$HostsFile_Base64 = "IyBDb3B5cmlnaHQgKGMpIDE5OTMtMjAwOSBNaWNyb3NvZnQgQ29ycC4NCiMNCiMgVGhpcyBpcyBhIHNhbXBsZSBIT1NUUyBmaWxlIHVzZWQgYnkgTWljcm9zb2Z0IFRDUC9JUCBmb3IgV2luZG93cy4NCiMNCiMgVGhpcyBmaWxlIGNvbnRhaW5zIHRoZSBtYXBwaW5ncyBvZiBJUCBhZGRyZXNzZXMgdG8gaG9zdCBuYW1lcy4gRWFjaA0KIyBlbnRyeSBzaG91bGQgYmUga2VwdCBvbiBhbiBpbmRpdmlkdWFsIGxpbmUuIFRoZSBJUCBhZGRyZXNzIHNob3VsZA0KIyBiZSBwbGFjZWQgaW4gdGhlIGZpcnN0IGNvbHVtbiBmb2xsb3dlZCBieSB0aGUgY29ycmVzcG9uZGluZyBob3N0IG5hbWUuDQojIFRoZSBJUCBhZGRyZXNzIGFuZCB0aGUgaG9zdCBuYW1lIHNob3VsZCBiZSBzZXBhcmF0ZWQgYnkgYXQgbGVhc3Qgb25lDQojIHNwYWNlLg0KIw0KIyBBZGRpdGlvbmFsbHksIGNvbW1lbnRzIChzdWNoIGFzIHRoZXNlKSBtYXkgYmUgaW5zZXJ0ZWQgb24gaW5kaXZpZHVhbA0KIyBsaW5lcyBvciBmb2xsb3dpbmcgdGhlIG1hY2hpbmUgbmFtZSBkZW5vdGVkIGJ5IGEgJyMnIHN5bWJvbC4NCiMNCiMgRm9yIGV4YW1wbGU6DQojDQojICAgICAgMTAyLjU0Ljk0Ljk3ICAgICByaGluby5hY21lLmNvbSAgICAgICAgICAjIHNvdXJjZSBzZXJ2ZXINCiMgICAgICAgMzguMjUuNjMuMTAgICAgIHguYWNtZS5jb20gICAgICAgICAgICAgICMgeCBjbGllbnQgaG9zdA0KDQojIGxvY2FsaG9zdCBuYW1lIHJlc29sdXRpb24gaXMgaGFuZGxlZCB3aXRoaW4gRE5TIGl0c2VsZi4NCiMJMTI3LjAuMC4xICAgICAgIGxvY2FsaG9zdA0KIwk6OjEgICAgICAgICAgICAgbG9jYWxob3N0DQoNCiMgVXNlZnVsIGZvciBnZW5lcmljLXdvcmtlciB0YXNrY2x1c3Rlci1wcm94eSBpbnRlZ3JhdGlvbg0KIyBTZWUgaHR0cHM6Ly9idWd6aWxsYS5tb3ppbGxhLm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MTQ0OTk4MSNjNg0KMTI3LjAuMC4xICAgICAgICB0YXNrY2x1c3RlciAgICANCg==" -$HostsFile_Content = [System.Convert]::FromBase64String($HostsFile_Base64) -Set-Content -Path "C:\Windows\System32\drivers\etc\hosts" -Value $HostsFile_Content -Encoding Byte - -# install generic-worker -Start-Process C:\generic-worker\generic-worker.exe -ArgumentList "install service --configure-for-%MY_CLOUD% --nssm C:\nssm-2.24\win64\nssm.exe --config C:\generic-worker\generic-worker.config" -Wait -NoNewWindow -PassThru -RedirectStandardOutput C:\generic-worker\install.log -RedirectStandardError C:\generic-worker\install.err -# Start-Process C:\generic-worker\generic-worker.exe -ArgumentList "install startup --config C:\generic-worker\generic-worker.config" -Wait -NoNewWindow -PassThru -RedirectStandardOutput C:\generic-worker\install.log -RedirectStandardError C:\generic-worker\install.err - -# download Windows Server 2003 Resource Kit Tools -$client.DownloadFile("https://download.microsoft.com/download/8/e/c/8ec3a7d8-05b4-440a-a71e-ca3ee25fe057/rktools.exe", "C:\rktools.exe") - -# open up firewall for livelog (both PUT and GET interfaces) -New-NetFirewallRule -DisplayName "Allow livelog PUT requests" -Direction Inbound -LocalPort 60022 -Protocol TCP -Action Allow -New-NetFirewallRule -DisplayName "Allow livelog GET requests" -Direction Inbound -LocalPort 60023 -Protocol TCP -Action Allow - -# install PSTools -# md "C:\PSTools" -# Expand-ZIPFile -File "C:\PSTools\PSTools.zip" -Destination "C:\PSTools" -Url "https://download.sysinternals.com/files/PSTools.zip" - -# generate OpenPGP key -Start-Process C:\generic-worker\generic-worker.exe -ArgumentList "new-openpgp-keypair --file C:\generic-worker\generic-worker-gpg-signing-key.key" -Wait -NoNewWindow -PassThru -RedirectStandardOutput C:\generic-worker\generate-gpg-signing-key.log -RedirectStandardError C:\generic-worker\generate-gpg-signing-key.err - -# generate ed25519 key -Start-Process C:\generic-worker\generic-worker.exe -ArgumentList "new-ed25519-keypair --file C:\generic-worker\generic-worker-ed25519-signing-key.key" -Wait -NoNewWindow -PassThru -RedirectStandardOutput C:\generic-worker\generate-signing-key.log -RedirectStandardError C:\generic-worker\generate-signing-key.err - -# install dependencywalker (useful utility for troubleshooting, not required) -md "C:\DependencyWalker" -Expand-ZIPFile -File "C:\depends22_x64.zip" -Destination "C:\DependencyWalker" -Url "http://dependencywalker.com/depends22_x64.zip" - -# install ProcessExplorer (useful utility for troubleshooting, not required) -md "C:\ProcessExplorer" -Expand-ZIPFile -File "C:\ProcessExplorer.zip" -Destination "C:\ProcessExplorer" -Url "https://download.sysinternals.com/files/ProcessExplorer.zip" - -# install ProcessMonitor (useful utility for troubleshooting, not required) -md "C:\ProcessMonitor" -Expand-ZIPFile -File "C:\ProcessMonitor.zip" -Destination "C:\ProcessMonitor" -Url "https://download.sysinternals.com/files/ProcessMonitor.zip" - -# install handle -md "C:\Handle" -Expand-ZIPFile -File "C:\Handle.zip" -Destination "C:\Handle" -Url "https://download.sysinternals.com/files/Handle.zip" - -# Free some space -Start-Process "cmd.exe" -ArgumentList "/c del C:\cuda_*" -Wait -NoNewWindow -Start-Process "cmd.exe" -ArgumentList "/c del C:\cudnn*" -Wait -NoNewWindow -Start-Process "cmd.exe" -ArgumentList "/c del C:\CUDNN*" -Wait -NoNewWindow - -$computersys = Get-WmiObject Win32_ComputerSystem -EnableAllPrivileges; -$computersys.AutomaticManagedPagefile = $False; -$computersys.Put(); -$pagefile = Get-WmiObject -Query "Select * From Win32_PageFileSetting Where Name like '%pagefile.sys'"; -$pagefile.InitialSize = 512; -$pagefile.MaximumSize = 2048; -$pagefile.Put(); - -# now shutdown, in preparation for creating an image -# Stop-Computer isn't working, also not when specifying -AsJob, so reverting to using `shutdown` command instead -# * https://www.reddit.com/r/PowerShell/comments/65250s/windows_10_creators_update_stopcomputer_not/dgfofug/?st=j1o3oa29&sh=e0c29c6d -# * https://support.microsoft.com/en-in/help/4014551/description-of-the-security-and-quality-rollup-for-the-net-framework-4 -# * https://support.microsoft.com/en-us/help/4020459 -shutdown -s diff --git a/worker_types/delete_aws.sh b/worker_types/delete_aws.sh deleted file mode 100755 index 1b405552..00000000 --- a/worker_types/delete_aws.sh +++ /dev/null @@ -1,28 +0,0 @@ -# terminate old instances -if [ -n "${OLD_INSTANCES}" ]; then - log "Now terminating instances" ${OLD_INSTANCES}... - aws --region "${REGION}" ec2 terminate-instances --instance-ids ${OLD_INSTANCES} >/dev/null 2>&1 -else - log "No previous instances to terminate." -fi - -# deregister old AMIs -if [ -n "${OLD_AMIS}" ]; then - log "Deregistering the old AMI(s) ("${OLD_AMIS}")..." - # note this can fail if it is already in process of being deregistered, so allow to fail... - for image in ${OLD_AMIS}; do - aws --region "${REGION}" ec2 deregister-image --image-id "${image}" 2>/dev/null || true - done -else - log "No old AMI to deregister." -fi - -# delete old snapshots -if [ -n "${OLD_SNAPSHOTS}" ]; then - log "Deleting the old snapshot(s) ("${OLD_SNAPSHOTS}")..." - for snapshot in ${OLD_SNAPSHOTS}; do - aws --region "${REGION}" ec2 delete-snapshot --snapshot-id ${snapshot} - done -else - log "No old snapshot to delete." -fi diff --git a/worker_types/delete_gcp.sh b/worker_types/delete_gcp.sh deleted file mode 100755 index 06e0264a..00000000 --- a/worker_types/delete_gcp.sh +++ /dev/null @@ -1,15 +0,0 @@ -# terminate old instances -if [ -n "${OLD_INSTANCES}" ]; then - log "Now terminating instances" ${OLD_INSTANCES}... - gcloud compute instances delete ${OLD_INSTANCES} --zone="${REGION}" --delete-disks=all -else - log "No previous instances to terminate." -fi - -# delete old images -if [ -n "${OLD_IMAGES}" ]; then - log "Deleting the old image(s) ("${OLD_IMAGES}")..." - gcloud compute images delete ${OLD_IMAGES} -else - log "No old snapshot to delete." -fi diff --git a/worker_types/find_old_aws_objects.sh b/worker_types/find_old_aws_objects.sh deleted file mode 100755 index a51536db..00000000 --- a/worker_types/find_old_aws_objects.sh +++ /dev/null @@ -1,11 +0,0 @@ -# query old instances -log "Querying old instances..." -OLD_INSTANCES="$(aws --region "${REGION}" ec2 describe-instances --filters "Name=tag:WorkerType,Values=${WORKER_POOL}" --query 'Reservations[*].Instances[*].InstanceId' --output text)" - -# find old amis -log "Querying previous AMI..." -OLD_SNAPSHOTS="$(aws --region "${REGION}" ec2 describe-images --owners self amazon --filters "Name=name,Values=${WORKER_TYPE} generic-worker version*" --query 'Images[*].BlockDeviceMappings[*].Ebs.SnapshotId' --output text)" - -# find old snapshots -log "Querying snapshot used in this previous AMI..." -OLD_AMIS="$(aws --region "${REGION}" ec2 describe-images --owners self amazon --filters "Name=name,Values=${WORKER_TYPE} generic-worker version*" --query 'Images[*].ImageId' --output text)" diff --git a/worker_types/find_old_gcp_objects.sh b/worker_types/find_old_gcp_objects.sh deleted file mode 100755 index 23928e6e..00000000 --- a/worker_types/find_old_gcp_objects.sh +++ /dev/null @@ -1,15 +0,0 @@ -log "Querying old instances..." -OLD_INSTANCES="$(gcloud compute instances list --project="${GCP_PROJECT}" --filter="labels.worker-type=${WORKER_TYPE} AND labels.worker-implementation=generic-worker AND zone:${REGION}" --format='table[no-heading](name)')" -if [ -n "${OLD_INSTANCES}" ]; then - log "Found old instances:" $OLD_INSTANCES -else - log "WARNING: No old instances found" -fi - -log "Querying previous images..." -OLD_IMAGES="$(gcloud compute images list --project="${GCP_PROJECT}" --filter="labels.worker-type=${WORKER_TYPE} AND labels.worker-implementation=generic-worker" --format='table[no-heading](name)')" -if [ -n "${OLD_IMAGES}" ]; then - log "Found old images:" $OLD_IMAGES -else - log "WARNING: No old images found" -fi diff --git a/worker_types/fp-gecko-1-gw-linux/bootstrap.sh b/worker_types/fp-gecko-1-gw-linux/bootstrap.sh deleted file mode 100644 index 6a594f36..00000000 --- a/worker_types/fp-gecko-1-gw-linux/bootstrap.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash - -set -exv -exec &> /var/log/bootstrap.log - -# Version numbers #################### -GENERIC_WORKER_VERSION='v16.5.0' -LIVELOG_VERSION='v1.1.0' -TASKCLUSTER_PROXY_VERSION='v5.1.0' -###################################### - -function retry { - set +e - local n=0 - local max=10 - while true; do - "$@" && break || { - if [[ $n -lt $max ]]; then - ((n++)) - echo "Command failed" >&2 - sleep_time=$((2 ** n)) - echo "Sleeping $sleep_time seconds..." >&2 - sleep $sleep_time - echo "Attempt $n/$max:" >&2 - else - echo "Failed after $n attempts." >&2 - exit 1 - fi - } - done - set -e -} - -start_time="$(date '+%s')" - -retry apt update -DEBIAN_FRONTEND=noninteractive apt upgrade -yq -retry apt install -y apt-transport-https ca-certificates curl software-properties-common gzip - -# install docker -retry curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - -add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" -retry apt update -apt-cache policy docker-ce | grep -qF download.docker.com -retry apt install -y docker-ce -sleep 5 -systemctl status docker | grep "Started Docker Application Container Engine" -usermod -aG docker ubuntu - -cd /usr/local/bin -retry curl -L "https://github.com/taskcluster/generic-worker/releases/download/${GENERIC_WORKER_VERSION}/generic-worker-multiuser-linux-amd64" > generic-worker -retry curl -L "https://github.com/taskcluster/livelog/releases/download/${LIVELOG_VERSION}/livelog-linux-amd64" > livelog -retry curl -L "https://github.com/taskcluster/taskcluster-proxy/releases/download/${TASKCLUSTER_PROXY_VERSION}/taskcluster-proxy-linux-amd64" > taskcluster-proxy -chmod a+x generic-worker taskcluster-proxy livelog - -mkdir -p /etc/generic-worker -mkdir -p /var/local/generic-worker -./generic-worker --version -./generic-worker new-ed25519-keypair --file /etc/generic-worker/ed25519_key - -# ensure host 'taskcluster' resolves to localhost -echo 127.0.1.1 taskcluster >> /etc/hosts -# configure generic-worker to run on boot -echo '@reboot cd /var/local/generic-worker && PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /usr/local/bin/generic-worker run --configure-for-%MY_CLOUD% --config /etc/generic-worker/config >> /var/log/generic-worker.log 2>&1' | crontab - - -retry apt install -y ubuntu-desktop ubuntu-gnome-desktop - -# See -# * https://console.aws.amazon.com/support/cases#/6410417131/en -# * https://bugzilla.mozilla.org/show_bug.cgi?id=1499054#c12 -cat > /etc/cloud/cloud.cfg.d/01_network_renderer_policy.cfg << EOF -system_info: - network: - renderers: [ 'netplan', 'eni', 'sysconfig' ] -EOF - -end_time="$(date '+%s')" -echo "UserData execution took: $(($end_time-$start_time)) seconds" - -# shutdown so that instance can be snapshotted -shutdown now diff --git a/worker_types/gecko-1-b-win2012-beta/aws_filters b/worker_types/gecko-1-b-win2012-beta/aws_filters deleted file mode 100644 index 985e2cb1..00000000 --- a/worker_types/gecko-1-b-win2012-beta/aws_filters +++ /dev/null @@ -1,2 +0,0 @@ -Name=platform,Values=windows -Name=name,Values=gecko-b-win2012-base-* diff --git a/worker_types/gecko-1-b-win2012-beta/aws_owners b/worker_types/gecko-1-b-win2012-beta/aws_owners deleted file mode 100644 index 38631e52..00000000 --- a/worker_types/gecko-1-b-win2012-beta/aws_owners +++ /dev/null @@ -1,2 +0,0 @@ -self -amazon diff --git a/worker_types/gecko-1-b-win2012-beta/bootstrap.ps1 b/worker_types/gecko-1-b-win2012-beta/bootstrap.ps1 deleted file mode 100644 index ca015a88..00000000 --- a/worker_types/gecko-1-b-win2012-beta/bootstrap.ps1 +++ /dev/null @@ -1,363 +0,0 @@ -################################################################################### -# Note, this powershell script is an *APPROXIMATION ONLY* to the steps that are run -# to build the AMIs for aws-provisioner-v1/gecko-1-b-win2012-beta. -# -# The authoratative host definition can be found at: -# -# * https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Manifest/gecko-1-b-win2012-beta.json -# -################################################################################### - -# use TLS 1.2 (see bug 1443595) -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -# capture env -Get-ChildItem Env: | Out-File "C:\install_env.txt" - -# needed for making http requests -$client = New-Object system.net.WebClient -$shell = new-object -com shell.application - -# utility function to download a zip file and extract it -function Extract-ZIPFile($file, $destination, $url) -{ - $client.DownloadFile($url, $file) - $zip = $shell.NameSpace($file) - foreach($item in $zip.items()) - { - $shell.Namespace($destination).copyhere($item) - } -} - -md C:\logs -md C:\binaries - -# LogDirectory: Required by OpenCloudConfig for DSC logging -md "C:\log" - -# StackdriverLogging: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://dl.google.com/cloudagents/windows/StackdriverLogging-v1-9.exe", "C:\binaries\StackdriverLogging-v1-9.exe") -Start-Process "C:\binaries\StackdriverLogging-v1-9.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# fluentd_gw_exe: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.exe.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.exe.conf") - -# fluentd_gw_service: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.service.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.service.conf") - -# fluentd_gw_wrapper: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.wrapper.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.wrapper.conf") - -# fluentd_occ: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/occ.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\occ.conf") - -# fluentd_redact: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/redact.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\redact.conf") - -# NxLog: Maintenance Toolchain - forwards event logs to papertrail -$client.DownloadFile("https://nxlog.co/system/files/products/files/348/nxlog-ce-2.10.2150.msi", "C:\binaries\nxlog-ce-2.10.2150.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\nxlog-ce-2.10.2150.msi /quiet" -Wait -NoNewWindow - -# PaperTrailEncryptionCertificate: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/papertrail-bundle.pem", "C:\Program Files (x86)\nxlog\cert\papertrail-bundle.pem") - -# NxLogPaperTrailConfiguration: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/win2012.conf", "C:\Program Files (x86)\nxlog\conf\nxlog.conf") - -# Start_nxlog: Maintenance Toolchain - not essential for building firefox -Set-Service "nxlog" -StartupType Automatic -Status Running - -# DisableIndexing: Disable indexing on all disk volumes (for performance) -Get-WmiObject Win32_Volume -Filter "IndexingEnabled=$true" | Set-WmiInstance -Arguments @{IndexingEnabled=$false} - -# ProcessExplorer: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessExplorer" -Extract-ZIPFile -File "C:\binaries\ProcessExplorer.zip" -Destination "C:\ProcessExplorer" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessExplorer/ProcessExplorer.zip" - -# ProcessMonitor: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessMonitor" -Extract-ZIPFile -File "C:\binaries\ProcessMonitor.zip" -Destination "C:\ProcessMonitor" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessMonitor/ProcessMonitor.zip" - -# GpgForWin: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://files.gpg4win.org/gpg4win-2.3.0.exe", "C:\binaries\gpg4win-2.3.0.exe") -Start-Process "C:\binaries\gpg4win-2.3.0.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SevenZip: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://7-zip.org/a/7z1514-x64.exe", "C:\binaries\7z1514-x64.exe") -Start-Process "C:\binaries\7z1514-x64.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SublimeText3: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://download.sublimetext.com/Sublime%20Text%20Build%203114%20x64%20Setup.exe", "C:\binaries\Sublime Text Build 3114 x64 Setup.exe") -Start-Process "C:\binaries\Sublime Text Build 3114 x64 Setup.exe" -ArgumentList "/VERYSILENT /NORESTART /TASKS=`"contextentry`"" -Wait -NoNewWindow - -# SublimeText3_PackagesFolder: Maintenance Toolchain - not essential for building firefox -md "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages" - -# SublimeText3_PackageControl: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://sublime.wbond.net/Package%20Control.sublime-package", "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\Package Control.sublime-package") - -# SystemPowerShellProfile: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Microsoft.PowerShell_profile.ps1", "C:\Windows\System32\WindowsPowerShell\v1.0\Microsoft.PowerShell_profile.ps1") - -# FsutilDisable8Dot3: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disable8dot3 1" -Wait -NoNewWindow - -# FsutilDisableLastAccess: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disablelastaccess 1" -Wait -NoNewWindow - -# home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\home" "C:\Users" - -# Start_wuauserv: Required by NET-Framework-Core -Set-Service "wuauserv" -StartupType Manual -Status Running - -# NET_Framework_Core: Required by DXSDK_Jun10 -Install-WindowsFeature NET-Framework-Core - -# VisualC2010RedistributablePackageX86Uninstall: Required by DXSDK_Jun10 (https://blogs.msdn.microsoft.com/chuckw/2011/12/09/known-issue-directx-sdk-june-2010-setup-and-the-s1023-error) -Start-Process "msiexec.exe" -ArgumentList "/passive /uninstall {F0C3E5D1-1ADE-321E-8167-68EF0DE699A5}" -Wait -NoNewWindow - -# VisualC2010RedistributablePackageX86_64Uninstall: Required by DXSDK_Jun10 (https://blogs.msdn.microsoft.com/chuckw/2011/12/09/known-issue-directx-sdk-june-2010-setup-and-the-s1023-error) -Start-Process "msiexec.exe" -ArgumentList "/passive /uninstall {1D8E6291-B0D5-35EC-8441-6616F567A0F7}" -Wait -NoNewWindow - -# DXSDK_Jun10: Provides D3D compilers required by 32 bit builds -$client.DownloadFile("http://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe", "C:\binaries\DXSDK_Jun10.exe") -Start-Process "C:\binaries\DXSDK_Jun10.exe" -ArgumentList "/U" -Wait -NoNewWindow - -# vcredist_vs2010_x86: Required by yasm (c:/mozilla-build/yasm/yasm.exe) -$client.DownloadFile("http://download.microsoft.com/download/C/6/D/C6D0FD4E-9E53-4897-9B91-836EBA2AACD3/vcredist_x86.exe", "C:\binaries\vcredist_x86.exe") -Start-Process "C:\binaries\vcredist_x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2010_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2010_x64: Required by yasm (c:/mozilla-build/yasm/yasm.exe) -$client.DownloadFile("http://download.microsoft.com/download/A/8/0/A80747C3-41BD-45DF-B505-E9710D2744E0/vcredist_x64.exe", "C:\binaries\vcredist_x64.exe") -Start-Process "C:\binaries\vcredist_x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2010_x64-install.log" -Wait -NoNewWindow - -# vcredist_vs2013_x86: Required by rustc (tooltool artefact) -$client.DownloadFile("http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe", "C:\binaries\vcredist_x86.exe") -Start-Process "C:\binaries\vcredist_x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2013_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2013_x64: Required by rustc (tooltool artefact) -$client.DownloadFile("http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe", "C:\binaries\vcredist_x64.exe") -Start-Process "C:\binaries\vcredist_x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2013_x64-install.log" -Wait -NoNewWindow - -# vcredist_vs2015_x86: Required by rustc (tooltool artefact) -$client.DownloadFile("http://download.microsoft.com/download/f/3/9/f39b30ec-f8ef-4ba3-8cb4-e301fcf0e0aa/vc_redist.x86.exe", "C:\binaries\vc_redist.x86.exe") -Start-Process "C:\binaries\vc_redist.x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2015_x64: Required by rustc (tooltool artefact) -$client.DownloadFile("http://download.microsoft.com/download/4/c/b/4cbd5757-0dd4-43a7-bac0-2a492cedbacb/vc_redist.x64.exe", "C:\binaries\vc_redist.x64.exe") -Start-Process "C:\binaries\vc_redist.x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x64-install.log" -Wait -NoNewWindow - -# WindowsSDK10Setup -$client.DownloadFile("https://go.microsoft.com/fwlink/p/?LinkID=698771", "C:\binaries\sdksetup.exe") -Start-Process "C:\binaries\sdksetup.exe" -ArgumentList "/features + /quiet /norestart /ceip off /log C:\log\windowssdk10setup.log" -Wait -NoNewWindow - -# BinScope: https://dxr.mozilla.org/mozilla-central/search?q=BinScope&redirect=false&case=false -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/binscope/BinScope_x64.msi", "C:\binaries\BinScope_x64.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\BinScope_x64.msi /quiet" -Wait -NoNewWindow - -# MozillaBuildSetup: https://bugzilla.mozilla.org/show_bug.cgi?id=1461340 -$client.DownloadFile("http://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-3.2.exe", "C:\binaries\MozillaBuildSetup-3.2.exe") -Start-Process "C:\binaries\MozillaBuildSetup-3.2.exe" -ArgumentList "/S /D=C:\mozilla-build" -Wait -NoNewWindow - -# DeleteMozillaBuildPython3PythonExe -Start-Process "cmd.exe" -ArgumentList "/c del /F /Q C:\mozilla-build\python3\python.exe" -Wait -NoNewWindow - -# msys_home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\mozilla-build\msys\home" "C:\Users" - -# DeleteMozillaBuildMercurial -Start-Process "cmd.exe" -ArgumentList "/c del C:\mozilla-build\python\Scripts\hg*" -Wait -NoNewWindow - -# Mercurial: https://bugzilla.mozilla.org/show_bug.cgi?id=1490703 -$client.DownloadFile("https://www.mercurial-scm.org/release/windows/mercurial-4.7.1-x64.msi", "C:\binaries\mercurial-4.7.1-x64.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\mercurial-4.7.1-x64.msi /quiet" -Wait -NoNewWindow - -# MercurialConfig: Required by clonebundle and share hg extensions -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/mercurial.ini", "C:\Program Files\Mercurial\Mercurial.ini") - -# robustcheckout: Required by robustcheckout hg extension -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/FirefoxBuildResources/robustcheckout.py", "C:\mozilla-build\robustcheckout.py") - -# MercurialCerts -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/cacert.pem", "C:\mozilla-build\msys\etc\cacert.pem") - -# env_MOZILLABUILD: Absolutely required for mozharness builds. Python will fall in a heap, throwing misleading exceptions without this. :) -[Environment]::SetEnvironmentVariable("MOZILLABUILD", "C:\mozilla-build", "Machine") - -# pip_upgrade_pip -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade pip==19.2.3" -Wait -NoNewWindow - -# pip_upgrade_setuptools -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade setuptools==20.7.0" -Wait -NoNewWindow - -# pip_upgrade_virtualenv -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade virtualenv==15.0.1" -Wait -NoNewWindow - -# pip_upgrade_wheel -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade wheel==0.29.0" -Wait -NoNewWindow - -# pip_upgrade_pypiwin32 -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade pypiwin32==219" -Wait -NoNewWindow - -# pip_upgrade_requests -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade requests==2.8.1" -Wait -NoNewWindow - -# pip_upgrade_psutil -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade psutil==4.1.0" -Wait -NoNewWindow - -# pip3_upgrade_pip -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade pip==19.2.3" -Wait -NoNewWindow - -# pip3_upgrade_zstandard -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade zstandard==0.11.1" -Wait -NoNewWindow - -# pip3_upgrade_certifi -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade certifi" -Wait -NoNewWindow - -# ToolToolInstall -$client.DownloadFile("https://raw.githubusercontent.com/mozilla/release-services/master/src/tooltool/client/tooltool.py", "C:\mozilla-build\tooltool.py") - -# dir_TOOLTOOL_CACHE -md "Y:\tooltool_cache" - -# env_TOOLTOOL_CACHE: Tells the build system where to find the local tooltool cache -[Environment]::SetEnvironmentVariable("TOOLTOOL_CACHE", "Y:\tooltool_cache", "Machine") - -# link_TOOLTOOL_CACHE: Provides backwards compatibility to hardcoded cache paths -cmd /c mklink "C:\builds\tooltool_cache" "Y:\tooltool_cache" - -# ToolToolCacheAccessRights: https://bugzilla.mozilla.org/show_bug.cgi?id=1421114 -Start-Process "icacls.exe" -ArgumentList "Y:\tooltool_cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_PATH -[Environment]::SetEnvironmentVariable("PATH", "C:\Program Files\Mercurial;C:\mozilla-build\bin;C:\mozilla-build\kdiff3;C:\mozilla-build\moztools-x64\bin;C:\mozilla-build\mozmake;C:\mozilla-build\msys\bin;C:\mozilla-build\msys\local\bin;C:\mozilla-build\nsis-3.01;C:\mozilla-build\python;C:\mozilla-build\python\Scripts;C:\mozilla-build\python3;%PATH%", "Machine") - -# reg_WindowsErrorReportingLocalDumps: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-Item -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Force - -# reg_WindowsErrorReportingDontShowUI: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "DontShowUI" -Value "0x00000001" -PropertyType Dword -Force - -# env_DXSDK_DIR -[Environment]::SetEnvironmentVariable("DXSDK_DIR", "C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)", "Machine") - -# GenericWorkerDirectory -md "C:\generic-worker" - -# GenericWorkerDownload -$client.DownloadFile("https://github.com/taskcluster/generic-worker/releases/download/v16.5.5/generic-worker-multiuser-windows-amd64.exe", "C:\generic-worker\generic-worker.exe") - -# LiveLogDownload -$client.DownloadFile("https://github.com/taskcluster/livelog/releases/download/v1.1.0/livelog-windows-amd64.exe", "C:\generic-worker\livelog.exe") - -# TaskClusterProxyDownload -$client.DownloadFile("https://github.com/taskcluster/taskcluster-proxy/releases/download/v5.1.0/taskcluster-proxy-windows-amd64.exe", "C:\generic-worker\taskcluster-proxy.exe") - -# NSSMDownload -$client.DownloadFile("https://nssm.cc/ci/nssm-2.24-103-gdee49fc.zip", "C:\Windows\Temp\NSSMInstall.zip") - -# NSSMInstall: NSSM is required to install Generic Worker as a service. Currently ZipInstall fails, so using 7z instead. -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -oC:\ C:\Windows\Temp\NSSMInstall.zip" -Wait -NoNewWindow - -# GenericWorkerInstall -Start-Process "C:\generic-worker\generic-worker.exe" -ArgumentList "install service --nssm C:\nssm-2.24-103-gdee49fc\win64\nssm.exe --config C:\generic-worker\generic-worker.config --configure-for-%MY_CLOUD%" -Wait -NoNewWindow - -# GenericWorkerStateWait -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/run-generic-worker-and-reboot.bat", "C:\generic-worker\run-generic-worker.bat") - -# TaskUserInitScript: Bug 1433851 - wait for user registry to initialise before running a task -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/task-user-init-win2012.cmd", "C:\generic-worker\task-user-init.cmd") - -# HgShared: allows builds to use `hg robustcheckout ...` -md "y:\hg-shared" - -# HgSharedAccessRights: allows builds to use `hg robustcheckout ...` -Start-Process "icacls.exe" -ArgumentList "y:\hg-shared /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# LegacyHgShared: allows builds to use `hg share ...` -md "c:\builds\hg-shared" - -# LegacyHgSharedAccessRights: allows builds to use `hg share ...` -Start-Process "icacls.exe" -ArgumentList "c:\builds\hg-shared /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# CarbonClone: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "clone --insecure https://bitbucket.org/splatteredbits/carbon C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonUpdate: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "update 2.4.0 -R C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonInstall: Bug 1316329 - support creation of symlinks by task users -Start-Process "xcopy" -ArgumentList "C:\Windows\Temp\carbon\Carbon C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Carbon /e /i /y" -Wait -NoNewWindow - -# GrantEveryoneSeCreateSymbolicLinkPrivilege: Bug 1316329 - support creation of symlinks by task users -Start-Process "powershell" -ArgumentList "-command `"& {&'Import-Module' Carbon}`"; `"& {&'Grant-Privilege' -Identity Everyone -Privilege SeCreateSymbolicLinkPrivilege}`"" -Wait -NoNewWindow - -# ZDriveAccessRights: allows task users full access to the task drive -Start-Process "icacls.exe" -ArgumentList "z:\ /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# KmsIn -New-NetFirewallRule -DisplayName "KmsIn (TCP 1688 Inbound): Allow" -Direction Inbound -LocalPort 1688 -Protocol TCP -Action Allow - -# KmsOut -New-NetFirewallRule -DisplayName "KmsOut (TCP 1688 Outbound): Allow" -Direction Outbound -LocalPort 1688 -Protocol TCP -Action Allow - -# reg_Power_PreferredPlan_HighPerformance: https://bugzilla.mozilla.org/show_bug.cgi?id=1362613 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\ControlPanel\NameSpace\{025A5937-A6BE-4686-A844-36FE4BEC8B6D}" -Name "PreferredPlan" -Value "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c" -PropertyType String -Force - -# OpenSshDownload: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://github.com/PowerShell/Win32-OpenSSH/releases/download/v7.6.1.0p1-Beta/OpenSSH-Win64.zip", "C:\Windows\Temp\OpenSSH-Win64.zip") - -# OpenSshUnzip: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -o`"C:\Program Files`" C:\Windows\Temp\OpenSSH-Win64.zip" -Wait -NoNewWindow - -# SshIn -New-NetFirewallRule -DisplayName "SshIn (TCP 22 Inbound): Allow" -Direction Inbound -LocalPort 22 -Protocol TCP -Action Allow - -# InstallOpenSSH: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "powershell.exe" -ArgumentList "-ExecutionPolicy Bypass -File `"C:\Program Files\OpenSSH-Win64\install-sshd.ps1`"" -Wait -NoNewWindow - -# reg_OpenSSH_DefaultShell: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShell" -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force - -# reg_OpenSSH_DefaultShellCommandOption: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShellCommandOption" -Value "/c" -PropertyType String -Force - -# AdministratorSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\Users\Administrator\.ssh" - -# AdministratorSshAuthorisedKeys: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/authorized_keys", "C:\Users\Administrator\.ssh\authorized_keys") - -# ProgramDataSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\ProgramData\ssh" - -# sshd_config: https://bugzilla.mozilla.org/show_bug.cgi?id=1464343 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/sshd_config", "C:\ProgramData\ssh\sshd_config") - -# Start_sshd: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "sshd" -StartupType Automatic -Status Running - -# Start_sshagent: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "ssh-agent" -StartupType Automatic -Status Running - -# HostsFile: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/etc/hosts", "C:\Windows\System32\drivers\etc\hosts") - -# SetHostsFileContent: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 - -# env_TASKCLUSTER_ROOT_URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1551789 -[Environment]::SetEnvironmentVariable("TASKCLUSTER_ROOT_URL", "https://firefox-ci-tc.services.mozilla.com", "Machine") - -# programdata_google_auth: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -md "C:\ProgramData\Google\Auth" - -# stackdriver_key: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -cmd /c mklink "C:\ProgramData\Google\Auth\application_default_credentials.json" "C:\builds\taskcluster-worker-ec2@aws-stackdriver-log-1571127027.json" - -# now shutdown, in preparation for creating an image -# Stop-Computer isn't working, also not when specifying -AsJob, so reverting to using `shutdown` command instead -# * https://www.reddit.com/r/PowerShell/comments/65250s/windows_10_creators_update_stopcomputer_not/dgfofug/?st=j1o3oa29&sh=e0c29c6d -# * https://support.microsoft.com/en-in/help/4014551/description-of-the-security-and-quality-rollup-for-the-net-framework-4 -# * https://support.microsoft.com/en-us/help/4020459 -shutdown -s diff --git a/worker_types/gecko-1-b-win2012-xlarge/bootstrap.ps1 b/worker_types/gecko-1-b-win2012-xlarge/bootstrap.ps1 deleted file mode 100644 index 8d44c189..00000000 --- a/worker_types/gecko-1-b-win2012-xlarge/bootstrap.ps1 +++ /dev/null @@ -1,363 +0,0 @@ -################################################################################### -# Note, this powershell script is an *APPROXIMATION ONLY* to the steps that are run -# to build the AMIs for aws-provisioner-v1/gecko-1-b-win2012-xlarge. -# -# The authoratative host definition can be found at: -# -# * https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Manifest/gecko-1-b-win2012-xlarge.json -# -################################################################################### - -# use TLS 1.2 (see bug 1443595) -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -# capture env -Get-ChildItem Env: | Out-File "C:\install_env.txt" - -# needed for making http requests -$client = New-Object system.net.WebClient -$shell = new-object -com shell.application - -# utility function to download a zip file and extract it -function Extract-ZIPFile($file, $destination, $url) -{ - $client.DownloadFile($url, $file) - $zip = $shell.NameSpace($file) - foreach($item in $zip.items()) - { - $shell.Namespace($destination).copyhere($item) - } -} - -md C:\logs -md C:\binaries - -# LogDirectory: Required by OpenCloudConfig for DSC logging -md "C:\log" - -# StackdriverLogging: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://dl.google.com/cloudagents/windows/StackdriverLogging-v1-9.exe", "C:\binaries\StackdriverLogging-v1-9.exe") -Start-Process "C:\binaries\StackdriverLogging-v1-9.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# fluentd_gw_exe: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.exe.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.exe.conf") - -# fluentd_gw_service: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.service.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.service.conf") - -# fluentd_gw_wrapper: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.wrapper.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.wrapper.conf") - -# fluentd_occ: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/occ.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\occ.conf") - -# fluentd_redact: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/redact.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\redact.conf") - -# NxLog: Maintenance Toolchain - forwards event logs to papertrail -$client.DownloadFile("https://nxlog.co/system/files/products/files/348/nxlog-ce-2.10.2150.msi", "C:\binaries\nxlog-ce-2.10.2150.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\nxlog-ce-2.10.2150.msi /quiet" -Wait -NoNewWindow - -# PaperTrailEncryptionCertificate: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/papertrail-bundle.pem", "C:\Program Files (x86)\nxlog\cert\papertrail-bundle.pem") - -# NxLogPaperTrailConfiguration: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/win2012.conf", "C:\Program Files (x86)\nxlog\conf\nxlog.conf") - -# Start_nxlog: Maintenance Toolchain - not essential for building firefox -Set-Service "nxlog" -StartupType Automatic -Status Running - -# DisableIndexing: Disable indexing on all disk volumes (for performance) -Get-WmiObject Win32_Volume -Filter "IndexingEnabled=$true" | Set-WmiInstance -Arguments @{IndexingEnabled=$false} - -# ProcessExplorer: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessExplorer" -Extract-ZIPFile -File "C:\binaries\ProcessExplorer.zip" -Destination "C:\ProcessExplorer" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessExplorer/ProcessExplorer.zip" - -# ProcessMonitor: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessMonitor" -Extract-ZIPFile -File "C:\binaries\ProcessMonitor.zip" -Destination "C:\ProcessMonitor" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessMonitor/ProcessMonitor.zip" - -# GpgForWin: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://files.gpg4win.org/gpg4win-2.3.0.exe", "C:\binaries\gpg4win-2.3.0.exe") -Start-Process "C:\binaries\gpg4win-2.3.0.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SevenZip: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://7-zip.org/a/7z1514-x64.exe", "C:\binaries\7z1514-x64.exe") -Start-Process "C:\binaries\7z1514-x64.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SublimeText3: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://download.sublimetext.com/Sublime%20Text%20Build%203114%20x64%20Setup.exe", "C:\binaries\Sublime Text Build 3114 x64 Setup.exe") -Start-Process "C:\binaries\Sublime Text Build 3114 x64 Setup.exe" -ArgumentList "/VERYSILENT /NORESTART /TASKS=`"contextentry`"" -Wait -NoNewWindow - -# SublimeText3_PackagesFolder: Maintenance Toolchain - not essential for building firefox -md "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages" - -# SublimeText3_PackageControl: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://sublime.wbond.net/Package%20Control.sublime-package", "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\Package Control.sublime-package") - -# SystemPowerShellProfile: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Microsoft.PowerShell_profile.ps1", "C:\Windows\System32\WindowsPowerShell\v1.0\Microsoft.PowerShell_profile.ps1") - -# FsutilDisable8Dot3: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disable8dot3 1" -Wait -NoNewWindow - -# FsutilDisableLastAccess: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disablelastaccess 1" -Wait -NoNewWindow - -# home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\home" "C:\Users" - -# Start_wuauserv: Required by NET-Framework-Core -Set-Service "wuauserv" -StartupType Manual -Status Running - -# NET_Framework_Core: Required by DXSDK_Jun10 -Install-WindowsFeature NET-Framework-Core - -# VisualC2010RedistributablePackageX86Uninstall: Required by DXSDK_Jun10 (https://blogs.msdn.microsoft.com/chuckw/2011/12/09/known-issue-directx-sdk-june-2010-setup-and-the-s1023-error) -Start-Process "msiexec.exe" -ArgumentList "/passive /uninstall {F0C3E5D1-1ADE-321E-8167-68EF0DE699A5}" -Wait -NoNewWindow - -# VisualC2010RedistributablePackageX86_64Uninstall: Required by DXSDK_Jun10 (https://blogs.msdn.microsoft.com/chuckw/2011/12/09/known-issue-directx-sdk-june-2010-setup-and-the-s1023-error) -Start-Process "msiexec.exe" -ArgumentList "/passive /uninstall {1D8E6291-B0D5-35EC-8441-6616F567A0F7}" -Wait -NoNewWindow - -# DXSDK_Jun10: Provides D3D compilers required by 32 bit builds -$client.DownloadFile("http://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe", "C:\binaries\DXSDK_Jun10.exe") -Start-Process "C:\binaries\DXSDK_Jun10.exe" -ArgumentList "/U" -Wait -NoNewWindow - -# vcredist_vs2010_x86: Required by yasm (c:/mozilla-build/yasm/yasm.exe) -$client.DownloadFile("http://download.microsoft.com/download/C/6/D/C6D0FD4E-9E53-4897-9B91-836EBA2AACD3/vcredist_x86.exe", "C:\binaries\vcredist_x86.exe") -Start-Process "C:\binaries\vcredist_x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2010_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2010_x64: Required by yasm (c:/mozilla-build/yasm/yasm.exe) -$client.DownloadFile("http://download.microsoft.com/download/A/8/0/A80747C3-41BD-45DF-B505-E9710D2744E0/vcredist_x64.exe", "C:\binaries\vcredist_x64.exe") -Start-Process "C:\binaries\vcredist_x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2010_x64-install.log" -Wait -NoNewWindow - -# vcredist_vs2013_x86: Required by rustc (tooltool artefact) -$client.DownloadFile("http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe", "C:\binaries\vcredist_x86.exe") -Start-Process "C:\binaries\vcredist_x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2013_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2013_x64: Required by rustc (tooltool artefact) -$client.DownloadFile("http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe", "C:\binaries\vcredist_x64.exe") -Start-Process "C:\binaries\vcredist_x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2013_x64-install.log" -Wait -NoNewWindow - -# vcredist_vs2015_x86: Required by rustc (tooltool artefact) -$client.DownloadFile("http://download.microsoft.com/download/f/3/9/f39b30ec-f8ef-4ba3-8cb4-e301fcf0e0aa/vc_redist.x86.exe", "C:\binaries\vc_redist.x86.exe") -Start-Process "C:\binaries\vc_redist.x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2015_x64: Required by rustc (tooltool artefact) -$client.DownloadFile("http://download.microsoft.com/download/4/c/b/4cbd5757-0dd4-43a7-bac0-2a492cedbacb/vc_redist.x64.exe", "C:\binaries\vc_redist.x64.exe") -Start-Process "C:\binaries\vc_redist.x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x64-install.log" -Wait -NoNewWindow - -# WindowsSDK10Setup -$client.DownloadFile("https://go.microsoft.com/fwlink/p/?LinkID=698771", "C:\binaries\sdksetup.exe") -Start-Process "C:\binaries\sdksetup.exe" -ArgumentList "/features + /quiet /norestart /ceip off /log C:\log\windowssdk10setup.log" -Wait -NoNewWindow - -# BinScope: https://dxr.mozilla.org/mozilla-central/search?q=BinScope&redirect=false&case=false -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/binscope/BinScope_x64.msi", "C:\binaries\BinScope_x64.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\BinScope_x64.msi /quiet" -Wait -NoNewWindow - -# MozillaBuildSetup: https://bugzilla.mozilla.org/show_bug.cgi?id=1461340 -$client.DownloadFile("http://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-3.2.exe", "C:\binaries\MozillaBuildSetup-3.2.exe") -Start-Process "C:\binaries\MozillaBuildSetup-3.2.exe" -ArgumentList "/S /D=C:\mozilla-build" -Wait -NoNewWindow - -# DeleteMozillaBuildPython3PythonExe -Start-Process "cmd.exe" -ArgumentList "/c del /F /Q C:\mozilla-build\python3\python.exe" -Wait -NoNewWindow - -# msys_home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\mozilla-build\msys\home" "C:\Users" - -# DeleteMozillaBuildMercurial -Start-Process "cmd.exe" -ArgumentList "/c del C:\mozilla-build\python\Scripts\hg*" -Wait -NoNewWindow - -# Mercurial: https://bugzilla.mozilla.org/show_bug.cgi?id=1490703 -$client.DownloadFile("https://www.mercurial-scm.org/release/windows/mercurial-4.7.1-x64.msi", "C:\binaries\mercurial-4.7.1-x64.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\mercurial-4.7.1-x64.msi /quiet" -Wait -NoNewWindow - -# MercurialConfig: Required by clonebundle and share hg extensions -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/mercurial.ini", "C:\Program Files\Mercurial\Mercurial.ini") - -# robustcheckout: Required by robustcheckout hg extension -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/FirefoxBuildResources/robustcheckout.py", "C:\mozilla-build\robustcheckout.py") - -# MercurialCerts -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/cacert.pem", "C:\mozilla-build\msys\etc\cacert.pem") - -# env_MOZILLABUILD: Absolutely required for mozharness builds. Python will fall in a heap, throwing misleading exceptions without this. :) -[Environment]::SetEnvironmentVariable("MOZILLABUILD", "C:\mozilla-build", "Machine") - -# pip_upgrade_pip -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade pip==19.2.3" -Wait -NoNewWindow - -# pip_upgrade_setuptools -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade setuptools==20.7.0" -Wait -NoNewWindow - -# pip_upgrade_virtualenv -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade virtualenv==15.0.1" -Wait -NoNewWindow - -# pip_upgrade_wheel -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade wheel==0.29.0" -Wait -NoNewWindow - -# pip_upgrade_pypiwin32 -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade pypiwin32==219" -Wait -NoNewWindow - -# pip_upgrade_requests -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade requests==2.8.1" -Wait -NoNewWindow - -# pip_upgrade_psutil -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade psutil==4.1.0" -Wait -NoNewWindow - -# pip3_upgrade_pip -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade pip==19.2.3" -Wait -NoNewWindow - -# pip3_upgrade_zstandard -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade zstandard==0.11.1" -Wait -NoNewWindow - -# pip3_upgrade_certifi -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade certifi" -Wait -NoNewWindow - -# ToolToolInstall -$client.DownloadFile("https://raw.githubusercontent.com/mozilla/release-services/master/src/tooltool/client/tooltool.py", "C:\mozilla-build\tooltool.py") - -# dir_TOOLTOOL_CACHE -md "Y:\tooltool_cache" - -# env_TOOLTOOL_CACHE: Tells the build system where to find the local tooltool cache -[Environment]::SetEnvironmentVariable("TOOLTOOL_CACHE", "Y:\tooltool_cache", "Machine") - -# link_TOOLTOOL_CACHE: Provides backwards compatibility to hardcoded cache paths -cmd /c mklink "C:\builds\tooltool_cache" "Y:\tooltool_cache" - -# ToolToolCacheAccessRights: https://bugzilla.mozilla.org/show_bug.cgi?id=1421114 -Start-Process "icacls.exe" -ArgumentList "Y:\tooltool_cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_PATH -[Environment]::SetEnvironmentVariable("PATH", "C:\Program Files\Mercurial;C:\mozilla-build\bin;C:\mozilla-build\kdiff3;C:\mozilla-build\moztools-x64\bin;C:\mozilla-build\mozmake;C:\mozilla-build\msys\bin;C:\mozilla-build\msys\local\bin;C:\mozilla-build\nsis-3.01;C:\mozilla-build\python;C:\mozilla-build\python\Scripts;C:\mozilla-build\python3;%PATH%", "Machine") - -# reg_WindowsErrorReportingLocalDumps: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-Item -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Force - -# reg_WindowsErrorReportingDontShowUI: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "DontShowUI" -Value "0x00000001" -PropertyType Dword -Force - -# env_DXSDK_DIR -[Environment]::SetEnvironmentVariable("DXSDK_DIR", "C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)", "Machine") - -# GenericWorkerDirectory -md "C:\generic-worker" - -# GenericWorkerDownload -$client.DownloadFile("https://github.com/taskcluster/generic-worker/releases/download/v16.5.1/generic-worker-multiuser-windows-amd64.exe", "C:\generic-worker\generic-worker.exe") - -# LiveLogDownload -$client.DownloadFile("https://github.com/taskcluster/livelog/releases/download/v1.1.0/livelog-windows-amd64.exe", "C:\generic-worker\livelog.exe") - -# TaskClusterProxyDownload -$client.DownloadFile("https://github.com/taskcluster/taskcluster-proxy/releases/download/v5.1.0/taskcluster-proxy-windows-amd64.exe", "C:\generic-worker\taskcluster-proxy.exe") - -# NSSMDownload -$client.DownloadFile("https://nssm.cc/ci/nssm-2.24-103-gdee49fc.zip", "C:\Windows\Temp\NSSMInstall.zip") - -# NSSMInstall: NSSM is required to install Generic Worker as a service. Currently ZipInstall fails, so using 7z instead. -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -oC:\ C:\Windows\Temp\NSSMInstall.zip" -Wait -NoNewWindow - -# GenericWorkerInstall -Start-Process "C:\generic-worker\generic-worker.exe" -ArgumentList "install service --nssm C:\nssm-2.24-103-gdee49fc\win64\nssm.exe --config C:\generic-worker\generic-worker.config --configure-for-%MY_CLOUD%" -Wait -NoNewWindow - -# GenericWorkerStateWait -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/run-generic-worker-and-reboot.bat", "C:\generic-worker\run-generic-worker.bat") - -# TaskUserInitScript: Bug 1433851 - wait for user registry to initialise before running a task -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/task-user-init-win2012.cmd", "C:\generic-worker\task-user-init.cmd") - -# HgShared: allows builds to use `hg robustcheckout ...` -md "y:\hg-shared" - -# HgSharedAccessRights: allows builds to use `hg robustcheckout ...` -Start-Process "icacls.exe" -ArgumentList "y:\hg-shared /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# LegacyHgShared: allows builds to use `hg share ...` -md "c:\builds\hg-shared" - -# LegacyHgSharedAccessRights: allows builds to use `hg share ...` -Start-Process "icacls.exe" -ArgumentList "c:\builds\hg-shared /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# CarbonClone: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "clone --insecure https://bitbucket.org/splatteredbits/carbon C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonUpdate: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "update 2.4.0 -R C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonInstall: Bug 1316329 - support creation of symlinks by task users -Start-Process "xcopy" -ArgumentList "C:\Windows\Temp\carbon\Carbon C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Carbon /e /i /y" -Wait -NoNewWindow - -# GrantEveryoneSeCreateSymbolicLinkPrivilege: Bug 1316329 - support creation of symlinks by task users -Start-Process "powershell" -ArgumentList "-command `"& {&'Import-Module' Carbon}`"; `"& {&'Grant-Privilege' -Identity Everyone -Privilege SeCreateSymbolicLinkPrivilege}`"" -Wait -NoNewWindow - -# ZDriveAccessRights: allows task users full access to the task drive -Start-Process "icacls.exe" -ArgumentList "z:\ /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# KmsIn -New-NetFirewallRule -DisplayName "KmsIn (TCP 1688 Inbound): Allow" -Direction Inbound -LocalPort 1688 -Protocol TCP -Action Allow - -# KmsOut -New-NetFirewallRule -DisplayName "KmsOut (TCP 1688 Outbound): Allow" -Direction Outbound -LocalPort 1688 -Protocol TCP -Action Allow - -# reg_Power_PreferredPlan_HighPerformance: https://bugzilla.mozilla.org/show_bug.cgi?id=1362613 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\ControlPanel\NameSpace\{025A5937-A6BE-4686-A844-36FE4BEC8B6D}" -Name "PreferredPlan" -Value "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c" -PropertyType String -Force - -# OpenSshDownload: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://github.com/PowerShell/Win32-OpenSSH/releases/download/v7.6.1.0p1-Beta/OpenSSH-Win64.zip", "C:\Windows\Temp\OpenSSH-Win64.zip") - -# OpenSshUnzip: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -o`"C:\Program Files`" C:\Windows\Temp\OpenSSH-Win64.zip" -Wait -NoNewWindow - -# SshIn -New-NetFirewallRule -DisplayName "SshIn (TCP 22 Inbound): Allow" -Direction Inbound -LocalPort 22 -Protocol TCP -Action Allow - -# InstallOpenSSH: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "powershell.exe" -ArgumentList "-ExecutionPolicy Bypass -File `"C:\Program Files\OpenSSH-Win64\install-sshd.ps1`"" -Wait -NoNewWindow - -# reg_OpenSSH_DefaultShell: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShell" -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force - -# reg_OpenSSH_DefaultShellCommandOption: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShellCommandOption" -Value "/c" -PropertyType String -Force - -# AdministratorSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\Users\Administrator\.ssh" - -# AdministratorSshAuthorisedKeys: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/authorized_keys", "C:\Users\Administrator\.ssh\authorized_keys") - -# ProgramDataSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\ProgramData\ssh" - -# sshd_config: https://bugzilla.mozilla.org/show_bug.cgi?id=1464343 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/sshd_config", "C:\ProgramData\ssh\sshd_config") - -# Start_sshd: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "sshd" -StartupType Automatic -Status Running - -# Start_sshagent: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "ssh-agent" -StartupType Automatic -Status Running - -# HostsFile: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/etc/hosts", "C:\Windows\System32\drivers\etc\hosts") - -# SetHostsFileContent: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 - -# env_TASKCLUSTER_ROOT_URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1551789 -[Environment]::SetEnvironmentVariable("TASKCLUSTER_ROOT_URL", "https://firefox-ci-tc.services.mozilla.com", "Machine") - -# programdata_google_auth: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -md "C:\ProgramData\Google\Auth" - -# stackdriver_key: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -cmd /c mklink "C:\ProgramData\Google\Auth\application_default_credentials.json" "C:\builds\taskcluster-worker-ec2@aws-stackdriver-log-1571127027.json" - -# now shutdown, in preparation for creating an image -# Stop-Computer isn't working, also not when specifying -AsJob, so reverting to using `shutdown` command instead -# * https://www.reddit.com/r/PowerShell/comments/65250s/windows_10_creators_update_stopcomputer_not/dgfofug/?st=j1o3oa29&sh=e0c29c6d -# * https://support.microsoft.com/en-in/help/4014551/description-of-the-security-and-quality-rollup-for-the-net-framework-4 -# * https://support.microsoft.com/en-us/help/4020459 -shutdown -s diff --git a/worker_types/gecko-1-b-win2012/aws_filters b/worker_types/gecko-1-b-win2012/aws_filters deleted file mode 100644 index 985e2cb1..00000000 --- a/worker_types/gecko-1-b-win2012/aws_filters +++ /dev/null @@ -1,2 +0,0 @@ -Name=platform,Values=windows -Name=name,Values=gecko-b-win2012-base-* diff --git a/worker_types/gecko-1-b-win2012/aws_owners b/worker_types/gecko-1-b-win2012/aws_owners deleted file mode 100644 index 38631e52..00000000 --- a/worker_types/gecko-1-b-win2012/aws_owners +++ /dev/null @@ -1,2 +0,0 @@ -self -amazon diff --git a/worker_types/gecko-1-b-win2012/bootstrap.ps1 b/worker_types/gecko-1-b-win2012/bootstrap.ps1 deleted file mode 100644 index b08adf78..00000000 --- a/worker_types/gecko-1-b-win2012/bootstrap.ps1 +++ /dev/null @@ -1,363 +0,0 @@ -################################################################################### -# Note, this powershell script is an *APPROXIMATION ONLY* to the steps that are run -# to build the AMIs for aws-provisioner-v1/gecko-1-b-win2012. -# -# The authoratative host definition can be found at: -# -# * https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Manifest/gecko-1-b-win2012.json -# -################################################################################### - -# use TLS 1.2 (see bug 1443595) -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -# capture env -Get-ChildItem Env: | Out-File "C:\install_env.txt" - -# needed for making http requests -$client = New-Object system.net.WebClient -$shell = new-object -com shell.application - -# utility function to download a zip file and extract it -function Extract-ZIPFile($file, $destination, $url) -{ - $client.DownloadFile($url, $file) - $zip = $shell.NameSpace($file) - foreach($item in $zip.items()) - { - $shell.Namespace($destination).copyhere($item) - } -} - -md C:\logs -md C:\binaries - -# LogDirectory: Required by OpenCloudConfig for DSC logging -md "C:\log" - -# StackdriverLogging: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://dl.google.com/cloudagents/windows/StackdriverLogging-v1-9.exe", "C:\binaries\StackdriverLogging-v1-9.exe") -Start-Process "C:\binaries\StackdriverLogging-v1-9.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# fluentd_gw_exe: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.exe.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.exe.conf") - -# fluentd_gw_service: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.service.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.service.conf") - -# fluentd_gw_wrapper: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.wrapper.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.wrapper.conf") - -# fluentd_occ: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/occ.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\occ.conf") - -# fluentd_redact: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/redact.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\redact.conf") - -# NxLog: Maintenance Toolchain - forwards event logs to papertrail -$client.DownloadFile("https://nxlog.co/system/files/products/files/348/nxlog-ce-2.10.2150.msi", "C:\binaries\nxlog-ce-2.10.2150.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\nxlog-ce-2.10.2150.msi /quiet" -Wait -NoNewWindow - -# PaperTrailEncryptionCertificate: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/papertrail-bundle.pem", "C:\Program Files (x86)\nxlog\cert\papertrail-bundle.pem") - -# NxLogPaperTrailConfiguration: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/win2012.conf", "C:\Program Files (x86)\nxlog\conf\nxlog.conf") - -# Start_nxlog: Maintenance Toolchain - not essential for building firefox -Set-Service "nxlog" -StartupType Automatic -Status Running - -# DisableIndexing: Disable indexing on all disk volumes (for performance) -Get-WmiObject Win32_Volume -Filter "IndexingEnabled=$true" | Set-WmiInstance -Arguments @{IndexingEnabled=$false} - -# ProcessExplorer: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessExplorer" -Extract-ZIPFile -File "C:\binaries\ProcessExplorer.zip" -Destination "C:\ProcessExplorer" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessExplorer/ProcessExplorer.zip" - -# ProcessMonitor: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessMonitor" -Extract-ZIPFile -File "C:\binaries\ProcessMonitor.zip" -Destination "C:\ProcessMonitor" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessMonitor/ProcessMonitor.zip" - -# GpgForWin: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://files.gpg4win.org/gpg4win-2.3.0.exe", "C:\binaries\gpg4win-2.3.0.exe") -Start-Process "C:\binaries\gpg4win-2.3.0.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SevenZip: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://7-zip.org/a/7z1514-x64.exe", "C:\binaries\7z1514-x64.exe") -Start-Process "C:\binaries\7z1514-x64.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SublimeText3: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://download.sublimetext.com/Sublime%20Text%20Build%203114%20x64%20Setup.exe", "C:\binaries\Sublime Text Build 3114 x64 Setup.exe") -Start-Process "C:\binaries\Sublime Text Build 3114 x64 Setup.exe" -ArgumentList "/VERYSILENT /NORESTART /TASKS=`"contextentry`"" -Wait -NoNewWindow - -# SublimeText3_PackagesFolder: Maintenance Toolchain - not essential for building firefox -md "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages" - -# SublimeText3_PackageControl: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://sublime.wbond.net/Package%20Control.sublime-package", "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\Package Control.sublime-package") - -# SystemPowerShellProfile: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Microsoft.PowerShell_profile.ps1", "C:\Windows\System32\WindowsPowerShell\v1.0\Microsoft.PowerShell_profile.ps1") - -# FsutilDisable8Dot3: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disable8dot3 1" -Wait -NoNewWindow - -# FsutilDisableLastAccess: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disablelastaccess 1" -Wait -NoNewWindow - -# home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\home" "C:\Users" - -# Start_wuauserv: Required by NET-Framework-Core -Set-Service "wuauserv" -StartupType Manual -Status Running - -# NET_Framework_Core: Required by DXSDK_Jun10 -Install-WindowsFeature NET-Framework-Core - -# VisualC2010RedistributablePackageX86Uninstall: Required by DXSDK_Jun10 (https://blogs.msdn.microsoft.com/chuckw/2011/12/09/known-issue-directx-sdk-june-2010-setup-and-the-s1023-error) -Start-Process "msiexec.exe" -ArgumentList "/passive /uninstall {F0C3E5D1-1ADE-321E-8167-68EF0DE699A5}" -Wait -NoNewWindow - -# VisualC2010RedistributablePackageX86_64Uninstall: Required by DXSDK_Jun10 (https://blogs.msdn.microsoft.com/chuckw/2011/12/09/known-issue-directx-sdk-june-2010-setup-and-the-s1023-error) -Start-Process "msiexec.exe" -ArgumentList "/passive /uninstall {1D8E6291-B0D5-35EC-8441-6616F567A0F7}" -Wait -NoNewWindow - -# DXSDK_Jun10: Provides D3D compilers required by 32 bit builds -$client.DownloadFile("http://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe", "C:\binaries\DXSDK_Jun10.exe") -Start-Process "C:\binaries\DXSDK_Jun10.exe" -ArgumentList "/U" -Wait -NoNewWindow - -# vcredist_vs2010_x86: Required by yasm (c:/mozilla-build/yasm/yasm.exe) -$client.DownloadFile("http://download.microsoft.com/download/C/6/D/C6D0FD4E-9E53-4897-9B91-836EBA2AACD3/vcredist_x86.exe", "C:\binaries\vcredist_x86.exe") -Start-Process "C:\binaries\vcredist_x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2010_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2010_x64: Required by yasm (c:/mozilla-build/yasm/yasm.exe) -$client.DownloadFile("http://download.microsoft.com/download/A/8/0/A80747C3-41BD-45DF-B505-E9710D2744E0/vcredist_x64.exe", "C:\binaries\vcredist_x64.exe") -Start-Process "C:\binaries\vcredist_x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2010_x64-install.log" -Wait -NoNewWindow - -# vcredist_vs2013_x86: Required by rustc (tooltool artefact) -$client.DownloadFile("http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe", "C:\binaries\vcredist_x86.exe") -Start-Process "C:\binaries\vcredist_x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2013_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2013_x64: Required by rustc (tooltool artefact) -$client.DownloadFile("http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe", "C:\binaries\vcredist_x64.exe") -Start-Process "C:\binaries\vcredist_x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2013_x64-install.log" -Wait -NoNewWindow - -# vcredist_vs2015_x86: Required by rustc (tooltool artefact) -$client.DownloadFile("http://download.microsoft.com/download/f/3/9/f39b30ec-f8ef-4ba3-8cb4-e301fcf0e0aa/vc_redist.x86.exe", "C:\binaries\vc_redist.x86.exe") -Start-Process "C:\binaries\vc_redist.x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2015_x64: Required by rustc (tooltool artefact) -$client.DownloadFile("http://download.microsoft.com/download/4/c/b/4cbd5757-0dd4-43a7-bac0-2a492cedbacb/vc_redist.x64.exe", "C:\binaries\vc_redist.x64.exe") -Start-Process "C:\binaries\vc_redist.x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x64-install.log" -Wait -NoNewWindow - -# WindowsSDK10Setup -$client.DownloadFile("https://go.microsoft.com/fwlink/p/?LinkID=698771", "C:\binaries\sdksetup.exe") -Start-Process "C:\binaries\sdksetup.exe" -ArgumentList "/features + /quiet /norestart /ceip off /log C:\log\windowssdk10setup.log" -Wait -NoNewWindow - -# BinScope: https://dxr.mozilla.org/mozilla-central/search?q=BinScope&redirect=false&case=false -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/binscope/BinScope_x64.msi", "C:\binaries\BinScope_x64.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\BinScope_x64.msi /quiet" -Wait -NoNewWindow - -# MozillaBuildSetup: https://bugzilla.mozilla.org/show_bug.cgi?id=1461340 -$client.DownloadFile("http://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-3.2.exe", "C:\binaries\MozillaBuildSetup-3.2.exe") -Start-Process "C:\binaries\MozillaBuildSetup-3.2.exe" -ArgumentList "/S /D=C:\mozilla-build" -Wait -NoNewWindow - -# DeleteMozillaBuildPython3PythonExe -Start-Process "cmd.exe" -ArgumentList "/c del /F /Q C:\mozilla-build\python3\python.exe" -Wait -NoNewWindow - -# msys_home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\mozilla-build\msys\home" "C:\Users" - -# DeleteMozillaBuildMercurial -Start-Process "cmd.exe" -ArgumentList "/c del C:\mozilla-build\python\Scripts\hg*" -Wait -NoNewWindow - -# Mercurial: https://bugzilla.mozilla.org/show_bug.cgi?id=1490703 -$client.DownloadFile("https://www.mercurial-scm.org/release/windows/mercurial-4.7.1-x64.msi", "C:\binaries\mercurial-4.7.1-x64.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\mercurial-4.7.1-x64.msi /quiet" -Wait -NoNewWindow - -# MercurialConfig: Required by clonebundle and share hg extensions -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/mercurial.ini", "C:\Program Files\Mercurial\Mercurial.ini") - -# robustcheckout: Required by robustcheckout hg extension -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/FirefoxBuildResources/robustcheckout.py", "C:\mozilla-build\robustcheckout.py") - -# MercurialCerts -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/cacert.pem", "C:\mozilla-build\msys\etc\cacert.pem") - -# env_MOZILLABUILD: Absolutely required for mozharness builds. Python will fall in a heap, throwing misleading exceptions without this. :) -[Environment]::SetEnvironmentVariable("MOZILLABUILD", "C:\mozilla-build", "Machine") - -# pip_upgrade_pip -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade pip==19.2.3" -Wait -NoNewWindow - -# pip_upgrade_setuptools -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade setuptools==20.7.0" -Wait -NoNewWindow - -# pip_upgrade_virtualenv -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade virtualenv==15.0.1" -Wait -NoNewWindow - -# pip_upgrade_wheel -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade wheel==0.29.0" -Wait -NoNewWindow - -# pip_upgrade_pypiwin32 -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade pypiwin32==219" -Wait -NoNewWindow - -# pip_upgrade_requests -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade requests==2.8.1" -Wait -NoNewWindow - -# pip_upgrade_psutil -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade psutil==4.1.0" -Wait -NoNewWindow - -# pip3_upgrade_pip -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade pip==19.2.3" -Wait -NoNewWindow - -# pip3_upgrade_zstandard -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade zstandard==0.11.1" -Wait -NoNewWindow - -# pip3_upgrade_certifi -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade certifi" -Wait -NoNewWindow - -# ToolToolInstall -$client.DownloadFile("https://raw.githubusercontent.com/mozilla/release-services/master/src/tooltool/client/tooltool.py", "C:\mozilla-build\tooltool.py") - -# dir_TOOLTOOL_CACHE -md "Y:\tooltool_cache" - -# env_TOOLTOOL_CACHE: Tells the build system where to find the local tooltool cache -[Environment]::SetEnvironmentVariable("TOOLTOOL_CACHE", "Y:\tooltool_cache", "Machine") - -# link_TOOLTOOL_CACHE: Provides backwards compatibility to hardcoded cache paths -cmd /c mklink "C:\builds\tooltool_cache" "Y:\tooltool_cache" - -# ToolToolCacheAccessRights: https://bugzilla.mozilla.org/show_bug.cgi?id=1421114 -Start-Process "icacls.exe" -ArgumentList "Y:\tooltool_cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_PATH -[Environment]::SetEnvironmentVariable("PATH", "C:\Program Files\Mercurial;C:\mozilla-build\bin;C:\mozilla-build\kdiff3;C:\mozilla-build\moztools-x64\bin;C:\mozilla-build\mozmake;C:\mozilla-build\msys\bin;C:\mozilla-build\msys\local\bin;C:\mozilla-build\nsis-3.01;C:\mozilla-build\python;C:\mozilla-build\python\Scripts;C:\mozilla-build\python3;%PATH%", "Machine") - -# reg_WindowsErrorReportingLocalDumps: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-Item -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Force - -# reg_WindowsErrorReportingDontShowUI: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "DontShowUI" -Value "0x00000001" -PropertyType Dword -Force - -# env_DXSDK_DIR -[Environment]::SetEnvironmentVariable("DXSDK_DIR", "C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)", "Machine") - -# GenericWorkerDirectory -md "C:\generic-worker" - -# GenericWorkerDownload -$client.DownloadFile("https://github.com/taskcluster/generic-worker/releases/download/v16.5.1/generic-worker-multiuser-windows-amd64.exe", "C:\generic-worker\generic-worker.exe") - -# LiveLogDownload -$client.DownloadFile("https://github.com/taskcluster/livelog/releases/download/v1.1.0/livelog-windows-amd64.exe", "C:\generic-worker\livelog.exe") - -# TaskClusterProxyDownload -$client.DownloadFile("https://github.com/taskcluster/taskcluster-proxy/releases/download/v5.1.0/taskcluster-proxy-windows-amd64.exe", "C:\generic-worker\taskcluster-proxy.exe") - -# NSSMDownload -$client.DownloadFile("https://nssm.cc/ci/nssm-2.24-103-gdee49fc.zip", "C:\Windows\Temp\NSSMInstall.zip") - -# NSSMInstall: NSSM is required to install Generic Worker as a service. Currently ZipInstall fails, so using 7z instead. -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -oC:\ C:\Windows\Temp\NSSMInstall.zip" -Wait -NoNewWindow - -# GenericWorkerInstall -Start-Process "C:\generic-worker\generic-worker.exe" -ArgumentList "install service --nssm C:\nssm-2.24-103-gdee49fc\win64\nssm.exe --config C:\generic-worker\generic-worker.config --configure-for-%MY_CLOUD%" -Wait -NoNewWindow - -# GenericWorkerStateWait -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/run-generic-worker-and-reboot.bat", "C:\generic-worker\run-generic-worker.bat") - -# TaskUserInitScript: Bug 1433851 - wait for user registry to initialise before running a task -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/task-user-init-win2012.cmd", "C:\generic-worker\task-user-init.cmd") - -# HgShared: allows builds to use `hg robustcheckout ...` -md "y:\hg-shared" - -# HgSharedAccessRights: allows builds to use `hg robustcheckout ...` -Start-Process "icacls.exe" -ArgumentList "y:\hg-shared /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# LegacyHgShared: allows builds to use `hg share ...` -md "c:\builds\hg-shared" - -# LegacyHgSharedAccessRights: allows builds to use `hg share ...` -Start-Process "icacls.exe" -ArgumentList "c:\builds\hg-shared /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# CarbonClone: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "clone --insecure https://bitbucket.org/splatteredbits/carbon C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonUpdate: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "update 2.4.0 -R C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonInstall: Bug 1316329 - support creation of symlinks by task users -Start-Process "xcopy" -ArgumentList "C:\Windows\Temp\carbon\Carbon C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Carbon /e /i /y" -Wait -NoNewWindow - -# GrantEveryoneSeCreateSymbolicLinkPrivilege: Bug 1316329 - support creation of symlinks by task users -Start-Process "powershell" -ArgumentList "-command `"& {&'Import-Module' Carbon}`"; `"& {&'Grant-Privilege' -Identity Everyone -Privilege SeCreateSymbolicLinkPrivilege}`"" -Wait -NoNewWindow - -# ZDriveAccessRights: allows task users full access to the task drive -Start-Process "icacls.exe" -ArgumentList "z:\ /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# KmsIn -New-NetFirewallRule -DisplayName "KmsIn (TCP 1688 Inbound): Allow" -Direction Inbound -LocalPort 1688 -Protocol TCP -Action Allow - -# KmsOut -New-NetFirewallRule -DisplayName "KmsOut (TCP 1688 Outbound): Allow" -Direction Outbound -LocalPort 1688 -Protocol TCP -Action Allow - -# reg_Power_PreferredPlan_HighPerformance: https://bugzilla.mozilla.org/show_bug.cgi?id=1362613 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\ControlPanel\NameSpace\{025A5937-A6BE-4686-A844-36FE4BEC8B6D}" -Name "PreferredPlan" -Value "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c" -PropertyType String -Force - -# OpenSshDownload: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://github.com/PowerShell/Win32-OpenSSH/releases/download/v7.6.1.0p1-Beta/OpenSSH-Win64.zip", "C:\Windows\Temp\OpenSSH-Win64.zip") - -# OpenSshUnzip: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -o`"C:\Program Files`" C:\Windows\Temp\OpenSSH-Win64.zip" -Wait -NoNewWindow - -# SshIn -New-NetFirewallRule -DisplayName "SshIn (TCP 22 Inbound): Allow" -Direction Inbound -LocalPort 22 -Protocol TCP -Action Allow - -# InstallOpenSSH: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "powershell.exe" -ArgumentList "-ExecutionPolicy Bypass -File `"C:\Program Files\OpenSSH-Win64\install-sshd.ps1`"" -Wait -NoNewWindow - -# reg_OpenSSH_DefaultShell: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShell" -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force - -# reg_OpenSSH_DefaultShellCommandOption: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShellCommandOption" -Value "/c" -PropertyType String -Force - -# AdministratorSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\Users\Administrator\.ssh" - -# AdministratorSshAuthorisedKeys: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/authorized_keys", "C:\Users\Administrator\.ssh\authorized_keys") - -# ProgramDataSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\ProgramData\ssh" - -# sshd_config: https://bugzilla.mozilla.org/show_bug.cgi?id=1464343 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/sshd_config", "C:\ProgramData\ssh\sshd_config") - -# Start_sshd: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "sshd" -StartupType Automatic -Status Running - -# Start_sshagent: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "ssh-agent" -StartupType Automatic -Status Running - -# HostsFile: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/etc/hosts", "C:\Windows\System32\drivers\etc\hosts") - -# SetHostsFileContent: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 - -# env_TASKCLUSTER_ROOT_URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1551789 -[Environment]::SetEnvironmentVariable("TASKCLUSTER_ROOT_URL", "https://firefox-ci-tc.services.mozilla.com", "Machine") - -# programdata_google_auth: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -md "C:\ProgramData\Google\Auth" - -# stackdriver_key: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -cmd /c mklink "C:\ProgramData\Google\Auth\application_default_credentials.json" "C:\builds\taskcluster-worker-ec2@aws-stackdriver-log-1571127027.json" - -# now shutdown, in preparation for creating an image -# Stop-Computer isn't working, also not when specifying -AsJob, so reverting to using `shutdown` command instead -# * https://www.reddit.com/r/PowerShell/comments/65250s/windows_10_creators_update_stopcomputer_not/dgfofug/?st=j1o3oa29&sh=e0c29c6d -# * https://support.microsoft.com/en-in/help/4014551/description-of-the-security-and-quality-rollup-for-the-net-framework-4 -# * https://support.microsoft.com/en-us/help/4020459 -shutdown -s diff --git a/worker_types/gecko-2-b-win2012/aws_filters b/worker_types/gecko-2-b-win2012/aws_filters deleted file mode 100644 index 985e2cb1..00000000 --- a/worker_types/gecko-2-b-win2012/aws_filters +++ /dev/null @@ -1,2 +0,0 @@ -Name=platform,Values=windows -Name=name,Values=gecko-b-win2012-base-* diff --git a/worker_types/gecko-2-b-win2012/aws_owners b/worker_types/gecko-2-b-win2012/aws_owners deleted file mode 100644 index 38631e52..00000000 --- a/worker_types/gecko-2-b-win2012/aws_owners +++ /dev/null @@ -1,2 +0,0 @@ -self -amazon diff --git a/worker_types/gecko-2-b-win2012/bootstrap.ps1 b/worker_types/gecko-2-b-win2012/bootstrap.ps1 deleted file mode 100644 index fb6832d9..00000000 --- a/worker_types/gecko-2-b-win2012/bootstrap.ps1 +++ /dev/null @@ -1,363 +0,0 @@ -################################################################################### -# Note, this powershell script is an *APPROXIMATION ONLY* to the steps that are run -# to build the AMIs for aws-provisioner-v1/gecko-2-b-win2012. -# -# The authoratative host definition can be found at: -# -# * https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Manifest/gecko-2-b-win2012.json -# -################################################################################### - -# use TLS 1.2 (see bug 1443595) -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -# capture env -Get-ChildItem Env: | Out-File "C:\install_env.txt" - -# needed for making http requests -$client = New-Object system.net.WebClient -$shell = new-object -com shell.application - -# utility function to download a zip file and extract it -function Extract-ZIPFile($file, $destination, $url) -{ - $client.DownloadFile($url, $file) - $zip = $shell.NameSpace($file) - foreach($item in $zip.items()) - { - $shell.Namespace($destination).copyhere($item) - } -} - -md C:\logs -md C:\binaries - -# LogDirectory: Required by OpenCloudConfig for DSC logging -md "C:\log" - -# StackdriverLogging: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://dl.google.com/cloudagents/windows/StackdriverLogging-v1-9.exe", "C:\binaries\StackdriverLogging-v1-9.exe") -Start-Process "C:\binaries\StackdriverLogging-v1-9.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# fluentd_gw_exe: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.exe.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.exe.conf") - -# fluentd_gw_service: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.service.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.service.conf") - -# fluentd_gw_wrapper: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.wrapper.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.wrapper.conf") - -# fluentd_occ: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/occ.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\occ.conf") - -# fluentd_redact: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/redact.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\redact.conf") - -# NxLog: Maintenance Toolchain - forwards event logs to papertrail -$client.DownloadFile("https://nxlog.co/system/files/products/files/348/nxlog-ce-2.10.2150.msi", "C:\binaries\nxlog-ce-2.10.2150.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\nxlog-ce-2.10.2150.msi /quiet" -Wait -NoNewWindow - -# PaperTrailEncryptionCertificate: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/papertrail-bundle.pem", "C:\Program Files (x86)\nxlog\cert\papertrail-bundle.pem") - -# NxLogPaperTrailConfiguration: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/win2012.conf", "C:\Program Files (x86)\nxlog\conf\nxlog.conf") - -# Start_nxlog: Maintenance Toolchain - not essential for building firefox -Set-Service "nxlog" -StartupType Automatic -Status Running - -# DisableIndexing: Disable indexing on all disk volumes (for performance) -Get-WmiObject Win32_Volume -Filter "IndexingEnabled=$true" | Set-WmiInstance -Arguments @{IndexingEnabled=$false} - -# ProcessExplorer: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessExplorer" -Extract-ZIPFile -File "C:\binaries\ProcessExplorer.zip" -Destination "C:\ProcessExplorer" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessExplorer/ProcessExplorer.zip" - -# ProcessMonitor: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessMonitor" -Extract-ZIPFile -File "C:\binaries\ProcessMonitor.zip" -Destination "C:\ProcessMonitor" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessMonitor/ProcessMonitor.zip" - -# GpgForWin: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://files.gpg4win.org/gpg4win-2.3.0.exe", "C:\binaries\gpg4win-2.3.0.exe") -Start-Process "C:\binaries\gpg4win-2.3.0.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SevenZip: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://7-zip.org/a/7z1514-x64.exe", "C:\binaries\7z1514-x64.exe") -Start-Process "C:\binaries\7z1514-x64.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SublimeText3: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://download.sublimetext.com/Sublime%20Text%20Build%203114%20x64%20Setup.exe", "C:\binaries\Sublime Text Build 3114 x64 Setup.exe") -Start-Process "C:\binaries\Sublime Text Build 3114 x64 Setup.exe" -ArgumentList "/VERYSILENT /NORESTART /TASKS=`"contextentry`"" -Wait -NoNewWindow - -# SublimeText3_PackagesFolder: Maintenance Toolchain - not essential for building firefox -md "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages" - -# SublimeText3_PackageControl: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://sublime.wbond.net/Package%20Control.sublime-package", "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\Package Control.sublime-package") - -# SystemPowerShellProfile: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Microsoft.PowerShell_profile.ps1", "C:\Windows\System32\WindowsPowerShell\v1.0\Microsoft.PowerShell_profile.ps1") - -# FsutilDisable8Dot3: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disable8dot3 1" -Wait -NoNewWindow - -# FsutilDisableLastAccess: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disablelastaccess 1" -Wait -NoNewWindow - -# home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\home" "C:\Users" - -# Start_wuauserv: Required by NET-Framework-Core -Set-Service "wuauserv" -StartupType Manual -Status Running - -# NET_Framework_Core: Required by DXSDK_Jun10 -Install-WindowsFeature NET-Framework-Core - -# VisualC2010RedistributablePackageX86Uninstall: Required by DXSDK_Jun10 (https://blogs.msdn.microsoft.com/chuckw/2011/12/09/known-issue-directx-sdk-june-2010-setup-and-the-s1023-error) -Start-Process "msiexec.exe" -ArgumentList "/passive /uninstall {F0C3E5D1-1ADE-321E-8167-68EF0DE699A5}" -Wait -NoNewWindow - -# VisualC2010RedistributablePackageX86_64Uninstall: Required by DXSDK_Jun10 (https://blogs.msdn.microsoft.com/chuckw/2011/12/09/known-issue-directx-sdk-june-2010-setup-and-the-s1023-error) -Start-Process "msiexec.exe" -ArgumentList "/passive /uninstall {1D8E6291-B0D5-35EC-8441-6616F567A0F7}" -Wait -NoNewWindow - -# DXSDK_Jun10: Provides D3D compilers required by 32 bit builds -$client.DownloadFile("http://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe", "C:\binaries\DXSDK_Jun10.exe") -Start-Process "C:\binaries\DXSDK_Jun10.exe" -ArgumentList "/U" -Wait -NoNewWindow - -# vcredist_vs2010_x86: Required by yasm (c:/mozilla-build/yasm/yasm.exe) -$client.DownloadFile("http://download.microsoft.com/download/C/6/D/C6D0FD4E-9E53-4897-9B91-836EBA2AACD3/vcredist_x86.exe", "C:\binaries\vcredist_x86.exe") -Start-Process "C:\binaries\vcredist_x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2010_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2010_x64: Required by yasm (c:/mozilla-build/yasm/yasm.exe) -$client.DownloadFile("http://download.microsoft.com/download/A/8/0/A80747C3-41BD-45DF-B505-E9710D2744E0/vcredist_x64.exe", "C:\binaries\vcredist_x64.exe") -Start-Process "C:\binaries\vcredist_x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2010_x64-install.log" -Wait -NoNewWindow - -# vcredist_vs2013_x86: Required by rustc (tooltool artefact) -$client.DownloadFile("http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe", "C:\binaries\vcredist_x86.exe") -Start-Process "C:\binaries\vcredist_x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2013_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2013_x64: Required by rustc (tooltool artefact) -$client.DownloadFile("http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe", "C:\binaries\vcredist_x64.exe") -Start-Process "C:\binaries\vcredist_x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2013_x64-install.log" -Wait -NoNewWindow - -# vcredist_vs2015_x86: Required by rustc (tooltool artefact) -$client.DownloadFile("http://download.microsoft.com/download/f/3/9/f39b30ec-f8ef-4ba3-8cb4-e301fcf0e0aa/vc_redist.x86.exe", "C:\binaries\vc_redist.x86.exe") -Start-Process "C:\binaries\vc_redist.x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2015_x64: Required by rustc (tooltool artefact) -$client.DownloadFile("http://download.microsoft.com/download/4/c/b/4cbd5757-0dd4-43a7-bac0-2a492cedbacb/vc_redist.x64.exe", "C:\binaries\vc_redist.x64.exe") -Start-Process "C:\binaries\vc_redist.x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x64-install.log" -Wait -NoNewWindow - -# WindowsSDK10Setup -$client.DownloadFile("https://go.microsoft.com/fwlink/p/?LinkID=698771", "C:\binaries\sdksetup.exe") -Start-Process "C:\binaries\sdksetup.exe" -ArgumentList "/features + /quiet /norestart /ceip off /log C:\log\windowssdk10setup.log" -Wait -NoNewWindow - -# BinScope: https://dxr.mozilla.org/mozilla-central/search?q=BinScope&redirect=false&case=false -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/binscope/BinScope_x64.msi", "C:\binaries\BinScope_x64.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\BinScope_x64.msi /quiet" -Wait -NoNewWindow - -# MozillaBuildSetup: https://bugzilla.mozilla.org/show_bug.cgi?id=1461340 -$client.DownloadFile("http://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-3.2.exe", "C:\binaries\MozillaBuildSetup-3.2.exe") -Start-Process "C:\binaries\MozillaBuildSetup-3.2.exe" -ArgumentList "/S /D=C:\mozilla-build" -Wait -NoNewWindow - -# DeleteMozillaBuildPython3PythonExe -Start-Process "cmd.exe" -ArgumentList "/c del /F /Q C:\mozilla-build\python3\python.exe" -Wait -NoNewWindow - -# msys_home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\mozilla-build\msys\home" "C:\Users" - -# DeleteMozillaBuildMercurial -Start-Process "cmd.exe" -ArgumentList "/c del C:\mozilla-build\python\Scripts\hg*" -Wait -NoNewWindow - -# Mercurial: https://bugzilla.mozilla.org/show_bug.cgi?id=1490703 -$client.DownloadFile("https://www.mercurial-scm.org/release/windows/mercurial-4.7.1-x64.msi", "C:\binaries\mercurial-4.7.1-x64.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\mercurial-4.7.1-x64.msi /quiet" -Wait -NoNewWindow - -# MercurialConfig: Required by clonebundle and share hg extensions -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/mercurial.ini", "C:\Program Files\Mercurial\Mercurial.ini") - -# robustcheckout: Required by robustcheckout hg extension -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/FirefoxBuildResources/robustcheckout.py", "C:\mozilla-build\robustcheckout.py") - -# MercurialCerts -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/cacert.pem", "C:\mozilla-build\msys\etc\cacert.pem") - -# env_MOZILLABUILD: Absolutely required for mozharness builds. Python will fall in a heap, throwing misleading exceptions without this. :) -[Environment]::SetEnvironmentVariable("MOZILLABUILD", "C:\mozilla-build", "Machine") - -# pip_upgrade_pip -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade pip==19.2.3" -Wait -NoNewWindow - -# pip_upgrade_setuptools -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade setuptools==20.7.0" -Wait -NoNewWindow - -# pip_upgrade_virtualenv -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade virtualenv==15.0.1" -Wait -NoNewWindow - -# pip_upgrade_wheel -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade wheel==0.29.0" -Wait -NoNewWindow - -# pip_upgrade_pypiwin32 -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade pypiwin32==219" -Wait -NoNewWindow - -# pip_upgrade_requests -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade requests==2.8.1" -Wait -NoNewWindow - -# pip_upgrade_psutil -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade psutil==4.1.0" -Wait -NoNewWindow - -# pip3_upgrade_pip -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade pip==19.2.3" -Wait -NoNewWindow - -# pip3_upgrade_zstandard -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade zstandard==0.11.1" -Wait -NoNewWindow - -# pip3_upgrade_certifi -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade certifi" -Wait -NoNewWindow - -# ToolToolInstall -$client.DownloadFile("https://raw.githubusercontent.com/mozilla/release-services/master/src/tooltool/client/tooltool.py", "C:\mozilla-build\tooltool.py") - -# dir_TOOLTOOL_CACHE -md "Y:\tooltool_cache" - -# env_TOOLTOOL_CACHE: Tells the build system where to find the local tooltool cache -[Environment]::SetEnvironmentVariable("TOOLTOOL_CACHE", "Y:\tooltool_cache", "Machine") - -# link_TOOLTOOL_CACHE: Provides backwards compatibility to hardcoded cache paths -cmd /c mklink "C:\builds\tooltool_cache" "Y:\tooltool_cache" - -# ToolToolCacheAccessRights: https://bugzilla.mozilla.org/show_bug.cgi?id=1421114 -Start-Process "icacls.exe" -ArgumentList "Y:\tooltool_cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_PATH -[Environment]::SetEnvironmentVariable("PATH", "C:\Program Files\Mercurial;C:\mozilla-build\bin;C:\mozilla-build\kdiff3;C:\mozilla-build\moztools-x64\bin;C:\mozilla-build\mozmake;C:\mozilla-build\msys\bin;C:\mozilla-build\msys\local\bin;C:\mozilla-build\nsis-3.01;C:\mozilla-build\python;C:\mozilla-build\python\Scripts;C:\mozilla-build\python3;%PATH%", "Machine") - -# reg_WindowsErrorReportingLocalDumps: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-Item -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Force - -# reg_WindowsErrorReportingDontShowUI: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "DontShowUI" -Value "0x00000001" -PropertyType Dword -Force - -# env_DXSDK_DIR -[Environment]::SetEnvironmentVariable("DXSDK_DIR", "C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)", "Machine") - -# GenericWorkerDirectory -md "C:\generic-worker" - -# GenericWorkerDownload -$client.DownloadFile("https://github.com/taskcluster/generic-worker/releases/download/v16.5.1/generic-worker-multiuser-windows-amd64.exe", "C:\generic-worker\generic-worker.exe") - -# LiveLogDownload -$client.DownloadFile("https://github.com/taskcluster/livelog/releases/download/v1.1.0/livelog-windows-amd64.exe", "C:\generic-worker\livelog.exe") - -# TaskClusterProxyDownload -$client.DownloadFile("https://github.com/taskcluster/taskcluster-proxy/releases/download/v5.1.0/taskcluster-proxy-windows-amd64.exe", "C:\generic-worker\taskcluster-proxy.exe") - -# NSSMDownload -$client.DownloadFile("https://nssm.cc/ci/nssm-2.24-103-gdee49fc.zip", "C:\Windows\Temp\NSSMInstall.zip") - -# NSSMInstall: NSSM is required to install Generic Worker as a service. Currently ZipInstall fails, so using 7z instead. -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -oC:\ C:\Windows\Temp\NSSMInstall.zip" -Wait -NoNewWindow - -# GenericWorkerInstall -Start-Process "C:\generic-worker\generic-worker.exe" -ArgumentList "install service --nssm C:\nssm-2.24-103-gdee49fc\win64\nssm.exe --config C:\generic-worker\generic-worker.config --configure-for-%MY_CLOUD%" -Wait -NoNewWindow - -# GenericWorkerStateWait -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/run-generic-worker-and-reboot.bat", "C:\generic-worker\run-generic-worker.bat") - -# TaskUserInitScript: Bug 1433851 - wait for user registry to initialise before running a task -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/task-user-init-win2012.cmd", "C:\generic-worker\task-user-init.cmd") - -# HgShared: allows builds to use `hg robustcheckout ...` -md "y:\hg-shared" - -# HgSharedAccessRights: allows builds to use `hg robustcheckout ...` -Start-Process "icacls.exe" -ArgumentList "y:\hg-shared /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# LegacyHgShared: allows builds to use `hg share ...` -md "c:\builds\hg-shared" - -# LegacyHgSharedAccessRights: allows builds to use `hg share ...` -Start-Process "icacls.exe" -ArgumentList "c:\builds\hg-shared /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# CarbonClone: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "clone --insecure https://bitbucket.org/splatteredbits/carbon C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonUpdate: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "update 2.4.0 -R C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonInstall: Bug 1316329 - support creation of symlinks by task users -Start-Process "xcopy" -ArgumentList "C:\Windows\Temp\carbon\Carbon C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Carbon /e /i /y" -Wait -NoNewWindow - -# GrantEveryoneSeCreateSymbolicLinkPrivilege: Bug 1316329 - support creation of symlinks by task users -Start-Process "powershell" -ArgumentList "-command `"& {&'Import-Module' Carbon}`"; `"& {&'Grant-Privilege' -Identity Everyone -Privilege SeCreateSymbolicLinkPrivilege}`"" -Wait -NoNewWindow - -# ZDriveAccessRights: allows task users full access to the task drive -Start-Process "icacls.exe" -ArgumentList "z:\ /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# KmsIn -New-NetFirewallRule -DisplayName "KmsIn (TCP 1688 Inbound): Allow" -Direction Inbound -LocalPort 1688 -Protocol TCP -Action Allow - -# KmsOut -New-NetFirewallRule -DisplayName "KmsOut (TCP 1688 Outbound): Allow" -Direction Outbound -LocalPort 1688 -Protocol TCP -Action Allow - -# reg_Power_PreferredPlan_HighPerformance: https://bugzilla.mozilla.org/show_bug.cgi?id=1362613 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\ControlPanel\NameSpace\{025A5937-A6BE-4686-A844-36FE4BEC8B6D}" -Name "PreferredPlan" -Value "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c" -PropertyType String -Force - -# OpenSshDownload: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://github.com/PowerShell/Win32-OpenSSH/releases/download/v7.6.1.0p1-Beta/OpenSSH-Win64.zip", "C:\Windows\Temp\OpenSSH-Win64.zip") - -# OpenSshUnzip: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -o`"C:\Program Files`" C:\Windows\Temp\OpenSSH-Win64.zip" -Wait -NoNewWindow - -# SshIn -New-NetFirewallRule -DisplayName "SshIn (TCP 22 Inbound): Allow" -Direction Inbound -LocalPort 22 -Protocol TCP -Action Allow - -# InstallOpenSSH: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "powershell.exe" -ArgumentList "-ExecutionPolicy Bypass -File `"C:\Program Files\OpenSSH-Win64\install-sshd.ps1`"" -Wait -NoNewWindow - -# reg_OpenSSH_DefaultShell: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShell" -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force - -# reg_OpenSSH_DefaultShellCommandOption: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShellCommandOption" -Value "/c" -PropertyType String -Force - -# AdministratorSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\Users\Administrator\.ssh" - -# AdministratorSshAuthorisedKeys: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/authorized_keys", "C:\Users\Administrator\.ssh\authorized_keys") - -# ProgramDataSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\ProgramData\ssh" - -# sshd_config: https://bugzilla.mozilla.org/show_bug.cgi?id=1464343 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/sshd_config", "C:\ProgramData\ssh\sshd_config") - -# Start_sshd: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "sshd" -StartupType Automatic -Status Running - -# Start_sshagent: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "ssh-agent" -StartupType Automatic -Status Running - -# HostsFile: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/etc/hosts", "C:\Windows\System32\drivers\etc\hosts") - -# SetHostsFileContent: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 - -# env_TASKCLUSTER_ROOT_URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1551789 -[Environment]::SetEnvironmentVariable("TASKCLUSTER_ROOT_URL", "https://firefox-ci-tc.services.mozilla.com", "Machine") - -# programdata_google_auth: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -md "C:\ProgramData\Google\Auth" - -# stackdriver_key: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -cmd /c mklink "C:\ProgramData\Google\Auth\application_default_credentials.json" "C:\builds\taskcluster-worker-ec2@aws-stackdriver-log-1571127027.json" - -# now shutdown, in preparation for creating an image -# Stop-Computer isn't working, also not when specifying -AsJob, so reverting to using `shutdown` command instead -# * https://www.reddit.com/r/PowerShell/comments/65250s/windows_10_creators_update_stopcomputer_not/dgfofug/?st=j1o3oa29&sh=e0c29c6d -# * https://support.microsoft.com/en-in/help/4014551/description-of-the-security-and-quality-rollup-for-the-net-framework-4 -# * https://support.microsoft.com/en-us/help/4020459 -shutdown -s diff --git a/worker_types/gecko-3-b-win2012-c4/bootstrap.ps1 b/worker_types/gecko-3-b-win2012-c4/bootstrap.ps1 deleted file mode 100644 index 12268bba..00000000 --- a/worker_types/gecko-3-b-win2012-c4/bootstrap.ps1 +++ /dev/null @@ -1,327 +0,0 @@ -################################################################################### -# Note, this powershell script is an *APPROXIMATION ONLY* to the steps that are run -# to build the AMIs for aws-provisioner-v1/gecko-3-b-win2012-c4. -# -# The authoratative host definition can be found at: -# -# * https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Manifest/gecko-3-b-win2012-c4.json -# -################################################################################### - -# use TLS 1.2 (see bug 1443595) -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -# capture env -Get-ChildItem Env: | Out-File "C:\install_env.txt" - -# needed for making http requests -$client = New-Object system.net.WebClient -$shell = new-object -com shell.application - -# utility function to download a zip file and extract it -function Extract-ZIPFile($file, $destination, $url) -{ - $client.DownloadFile($url, $file) - $zip = $shell.NameSpace($file) - foreach($item in $zip.items()) - { - $shell.Namespace($destination).copyhere($item) - } -} - -md C:\logs -md C:\binaries - -# LogDirectory: Required by OpenCloudConfig for DSC logging -md "C:\log" - -# StackdriverLogging: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://dl.google.com/cloudagents/windows/StackdriverLogging-v1-9.exe", "C:\binaries\StackdriverLogging-v1-9.exe") -Start-Process "C:\binaries\StackdriverLogging-v1-9.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# fluentd_gw_exe: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.exe.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.exe.conf") - -# fluentd_gw_service: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.service.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.service.conf") - -# fluentd_gw_wrapper: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.wrapper.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.wrapper.conf") - -# fluentd_occ: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/occ.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\occ.conf") - -# fluentd_redact: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/redact.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\redact.conf") - -# NxLog: Maintenance Toolchain - forwards event logs to papertrail -$client.DownloadFile("https://nxlog.co/system/files/products/files/348/nxlog-ce-2.10.2150.msi", "C:\binaries\nxlog-ce-2.10.2150.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\nxlog-ce-2.10.2150.msi /quiet" -Wait -NoNewWindow - -# PaperTrailEncryptionCertificate: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/papertrail-bundle.pem", "C:\Program Files (x86)\nxlog\cert\papertrail-bundle.pem") - -# NxLogPaperTrailConfiguration: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/win2012.conf", "C:\Program Files (x86)\nxlog\conf\nxlog.conf") - -# Start_nxlog: Maintenance Toolchain - not essential for building firefox -Set-Service "nxlog" -StartupType Automatic -Status Running - -# DisableIndexing: Disable indexing on all disk volumes (for performance) -Get-WmiObject Win32_Volume -Filter "IndexingEnabled=$true" | Set-WmiInstance -Arguments @{IndexingEnabled=$false} - -# ProcessExplorer: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessExplorer" -Extract-ZIPFile -File "C:\binaries\ProcessExplorer.zip" -Destination "C:\ProcessExplorer" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessExplorer/ProcessExplorer.zip" - -# ProcessMonitor: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessMonitor" -Extract-ZIPFile -File "C:\binaries\ProcessMonitor.zip" -Destination "C:\ProcessMonitor" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessMonitor/ProcessMonitor.zip" - -# GpgForWin: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://files.gpg4win.org/gpg4win-2.3.0.exe", "C:\binaries\gpg4win-2.3.0.exe") -Start-Process "C:\binaries\gpg4win-2.3.0.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SevenZip: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://7-zip.org/a/7z1514-x64.exe", "C:\binaries\7z1514-x64.exe") -Start-Process "C:\binaries\7z1514-x64.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SublimeText3: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://download.sublimetext.com/Sublime%20Text%20Build%203114%20x64%20Setup.exe", "C:\binaries\Sublime Text Build 3114 x64 Setup.exe") -Start-Process "C:\binaries\Sublime Text Build 3114 x64 Setup.exe" -ArgumentList "/VERYSILENT /NORESTART /TASKS=`"contextentry`"" -Wait -NoNewWindow - -# SublimeText3_PackagesFolder: Maintenance Toolchain - not essential for building firefox -md "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages" - -# SublimeText3_PackageControl: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://sublime.wbond.net/Package%20Control.sublime-package", "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\Package Control.sublime-package") - -# SystemPowerShellProfile: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Microsoft.PowerShell_profile.ps1", "C:\Windows\System32\WindowsPowerShell\v1.0\Microsoft.PowerShell_profile.ps1") - -# FsutilDisable8Dot3: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disable8dot3 1" -Wait -NoNewWindow - -# FsutilDisableLastAccess: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disablelastaccess 1" -Wait -NoNewWindow - -# home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\home" "C:\Users" - -# Start_wuauserv: Required by NET-Framework-Core -Set-Service "wuauserv" -StartupType Manual -Status Running - -# NET_Framework_Core: Required by DXSDK_Jun10 -Install-WindowsFeature NET-Framework-Core - -# VisualC2010RedistributablePackageX86Uninstall: Required by DXSDK_Jun10 (https://blogs.msdn.microsoft.com/chuckw/2011/12/09/known-issue-directx-sdk-june-2010-setup-and-the-s1023-error) -Start-Process "msiexec.exe" -ArgumentList "/passive /uninstall {F0C3E5D1-1ADE-321E-8167-68EF0DE699A5}" -Wait -NoNewWindow - -# VisualC2010RedistributablePackageX86_64Uninstall: Required by DXSDK_Jun10 (https://blogs.msdn.microsoft.com/chuckw/2011/12/09/known-issue-directx-sdk-june-2010-setup-and-the-s1023-error) -Start-Process "msiexec.exe" -ArgumentList "/passive /uninstall {1D8E6291-B0D5-35EC-8441-6616F567A0F7}" -Wait -NoNewWindow - -# DXSDK_Jun10: Provides D3D compilers required by 32 bit builds -$client.DownloadFile("http://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe", "C:\binaries\DXSDK_Jun10.exe") -Start-Process "C:\binaries\DXSDK_Jun10.exe" -ArgumentList "/U" -Wait -NoNewWindow - -# vcredist_vs2010_x86: Required by yasm (c:/mozilla-build/yasm/yasm.exe) -$client.DownloadFile("http://download.microsoft.com/download/C/6/D/C6D0FD4E-9E53-4897-9B91-836EBA2AACD3/vcredist_x86.exe", "C:\binaries\vcredist_x86.exe") -Start-Process "C:\binaries\vcredist_x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2010_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2010_x64: Required by yasm (c:/mozilla-build/yasm/yasm.exe) -$client.DownloadFile("http://download.microsoft.com/download/A/8/0/A80747C3-41BD-45DF-B505-E9710D2744E0/vcredist_x64.exe", "C:\binaries\vcredist_x64.exe") -Start-Process "C:\binaries\vcredist_x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2010_x64-install.log" -Wait -NoNewWindow - -# vcredist_vs2013_x86: Required by rustc (tooltool artefact) -$client.DownloadFile("http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe", "C:\binaries\vcredist_x86.exe") -Start-Process "C:\binaries\vcredist_x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2013_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2013_x64: Required by rustc (tooltool artefact) -$client.DownloadFile("http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe", "C:\binaries\vcredist_x64.exe") -Start-Process "C:\binaries\vcredist_x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2013_x64-install.log" -Wait -NoNewWindow - -# vcredist_vs2015_x86: Required by rustc (tooltool artefact) -$client.DownloadFile("http://download.microsoft.com/download/f/3/9/f39b30ec-f8ef-4ba3-8cb4-e301fcf0e0aa/vc_redist.x86.exe", "C:\binaries\vc_redist.x86.exe") -Start-Process "C:\binaries\vc_redist.x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2015_x64: Required by rustc (tooltool artefact) -$client.DownloadFile("http://download.microsoft.com/download/4/c/b/4cbd5757-0dd4-43a7-bac0-2a492cedbacb/vc_redist.x64.exe", "C:\binaries\vc_redist.x64.exe") -Start-Process "C:\binaries\vc_redist.x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x64-install.log" -Wait -NoNewWindow - -# WindowsSDK10Setup -$client.DownloadFile("https://go.microsoft.com/fwlink/p/?LinkID=698771", "C:\binaries\sdksetup.exe") -Start-Process "C:\binaries\sdksetup.exe" -ArgumentList "/features + /quiet /norestart /ceip off /log C:\log\windowssdk10setup.log" -Wait -NoNewWindow - -# BinScope: https://dxr.mozilla.org/mozilla-central/search?q=BinScope&redirect=false&case=false -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/binscope/BinScope_x64.msi", "C:\binaries\BinScope_x64.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\BinScope_x64.msi /quiet" -Wait -NoNewWindow - -# MozillaBuildSetup: https://bugzilla.mozilla.org/show_bug.cgi?id=1461340 -$client.DownloadFile("http://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-3.2.exe", "C:\binaries\MozillaBuildSetup-3.2.exe") -Start-Process "C:\binaries\MozillaBuildSetup-3.2.exe" -ArgumentList "/S /D=C:\mozilla-build" -Wait -NoNewWindow - -# DeleteMozillaBuildPython3PythonExe -Start-Process "cmd.exe" -ArgumentList "/c del /F /Q C:\mozilla-build\python3\python.exe" -Wait -NoNewWindow - -# msys_home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\mozilla-build\msys\home" "C:\Users" - -# DeleteMozillaBuildMercurial -Start-Process "cmd.exe" -ArgumentList "/c del C:\mozilla-build\python\Scripts\hg*" -Wait -NoNewWindow - -# Mercurial: https://bugzilla.mozilla.org/show_bug.cgi?id=1490703 -$client.DownloadFile("https://www.mercurial-scm.org/release/windows/mercurial-4.7.1-x64.msi", "C:\binaries\mercurial-4.7.1-x64.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\mercurial-4.7.1-x64.msi /quiet" -Wait -NoNewWindow - -# MercurialConfig: Required by clonebundle and share hg extensions -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/mercurial.ini", "C:\Program Files\Mercurial\Mercurial.ini") - -# robustcheckout: Required by robustcheckout hg extension -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/FirefoxBuildResources/robustcheckout.py", "C:\mozilla-build\robustcheckout.py") - -# MercurialCerts -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/cacert.pem", "C:\mozilla-build\msys\etc\cacert.pem") - -# env_MOZILLABUILD: Absolutely required for mozharness builds. Python will fall in a heap, throwing misleading exceptions without this. :) -[Environment]::SetEnvironmentVariable("MOZILLABUILD", "C:\mozilla-build", "Machine") - -# pip_upgrade_pip -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade pip==19.2.3" -Wait -NoNewWindow - -# pip_upgrade_setuptools -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade setuptools==20.7.0" -Wait -NoNewWindow - -# pip_upgrade_virtualenv -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade virtualenv==15.0.1" -Wait -NoNewWindow - -# pip_upgrade_wheel -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade wheel==0.29.0" -Wait -NoNewWindow - -# pip_upgrade_pypiwin32 -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade pypiwin32==219" -Wait -NoNewWindow - -# pip_upgrade_requests -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade requests==2.8.1" -Wait -NoNewWindow - -# pip_upgrade_psutil -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade psutil==4.1.0" -Wait -NoNewWindow - -# pip3_upgrade_pip -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade pip==19.2.3" -Wait -NoNewWindow - -# pip3_upgrade_zstandard -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade zstandard==0.11.1" -Wait -NoNewWindow - -# pip3_upgrade_certifi -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade certifi" -Wait -NoNewWindow - -# ToolToolInstall -$client.DownloadFile("https://raw.githubusercontent.com/mozilla/release-services/master/src/tooltool/client/tooltool.py", "C:\mozilla-build\tooltool.py") - -# dir_TOOLTOOL_CACHE -md "Y:\tooltool_cache" - -# env_TOOLTOOL_CACHE: Tells the build system where to find the local tooltool cache -[Environment]::SetEnvironmentVariable("TOOLTOOL_CACHE", "Y:\tooltool_cache", "Machine") - -# link_TOOLTOOL_CACHE: Provides backwards compatibility to hardcoded cache paths -cmd /c mklink "C:\builds\tooltool_cache" "Y:\tooltool_cache" - -# ToolToolCacheAccessRights: https://bugzilla.mozilla.org/show_bug.cgi?id=1421114 -Start-Process "icacls.exe" -ArgumentList "Y:\tooltool_cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_PATH -[Environment]::SetEnvironmentVariable("PATH", "C:\Program Files\Mercurial;C:\mozilla-build\bin;C:\mozilla-build\kdiff3;C:\mozilla-build\moztools-x64\bin;C:\mozilla-build\mozmake;C:\mozilla-build\msys\bin;C:\mozilla-build\msys\local\bin;C:\mozilla-build\nsis-3.01;C:\mozilla-build\python;C:\mozilla-build\python\Scripts;C:\mozilla-build\python3;%PATH%", "Machine") - -# reg_WindowsErrorReportingLocalDumps: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-Item -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Force - -# reg_WindowsErrorReportingDontShowUI: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "DontShowUI" -Value "0x00000001" -PropertyType Dword -Force - -# env_DXSDK_DIR -[Environment]::SetEnvironmentVariable("DXSDK_DIR", "C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)", "Machine") - -# GenericWorkerDirectory -md "C:\generic-worker" - -# GenericWorkerDownload -$client.DownloadFile("https://github.com/taskcluster/generic-worker/releases/download/v14.1.0/generic-worker-nativeEngine-windows-amd64.exe", "C:\generic-worker\generic-worker.exe") - -# LiveLogDownload -$client.DownloadFile("https://github.com/taskcluster/livelog/releases/download/v1.1.0/livelog-windows-amd64.exe", "C:\generic-worker\livelog.exe") - -# TaskClusterProxyDownload -$client.DownloadFile("https://github.com/taskcluster/taskcluster-proxy/releases/download/v5.1.0/taskcluster-proxy-windows-amd64.exe", "C:\generic-worker\taskcluster-proxy.exe") - -# NSSMDownload -$client.DownloadFile("https://nssm.cc/ci/nssm-2.24-103-gdee49fc.zip", "C:\Windows\Temp\NSSMInstall.zip") - -# NSSMInstall: NSSM is required to install Generic Worker as a service. Currently ZipInstall fails, so using 7z instead. -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -oC:\ C:\Windows\Temp\NSSMInstall.zip" -Wait -NoNewWindow - -# GenericWorkerInstall -Start-Process "C:\generic-worker\generic-worker.exe" -ArgumentList "install service --nssm C:\nssm-2.24-103-gdee49fc\win64\nssm.exe --config C:\generic-worker\generic-worker.config --configure-for-%MY_CLOUD%" -Wait -NoNewWindow - -# GenericWorkerStateWait -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/run-generic-worker-and-reboot.bat", "C:\generic-worker\run-generic-worker.bat") - -# TaskUserInitScript: Bug 1433851 - wait for user registry to initialise before running a task -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/task-user-init-win2012.cmd", "C:\generic-worker\task-user-init.cmd") - -# HgShared: allows builds to use `hg robustcheckout ...` -md "y:\hg-shared" - -# HgSharedAccessRights: allows builds to use `hg robustcheckout ...` -Start-Process "icacls.exe" -ArgumentList "y:\hg-shared /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# LegacyHgShared: allows builds to use `hg share ...` -md "c:\builds\hg-shared" - -# LegacyHgSharedAccessRights: allows builds to use `hg share ...` -Start-Process "icacls.exe" -ArgumentList "c:\builds\hg-shared /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# CarbonClone: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "clone --insecure https://bitbucket.org/splatteredbits/carbon C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonUpdate: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "update 2.4.0 -R C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonInstall: Bug 1316329 - support creation of symlinks by task users -Start-Process "xcopy" -ArgumentList "C:\Windows\Temp\carbon\Carbon C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Carbon /e /i /y" -Wait -NoNewWindow - -# GrantEveryoneSeCreateSymbolicLinkPrivilege: Bug 1316329 - support creation of symlinks by task users -Start-Process "powershell" -ArgumentList "-command `"& {&'Import-Module' Carbon}`"; `"& {&'Grant-Privilege' -Identity Everyone -Privilege SeCreateSymbolicLinkPrivilege}`"" -Wait -NoNewWindow - -# ZDriveAccessRights: allows task users full access to the task drive -Start-Process "icacls.exe" -ArgumentList "z:\ /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# KmsIn -New-NetFirewallRule -DisplayName "KmsIn (TCP 1688 Inbound): Allow" -Direction Inbound -LocalPort 1688 -Protocol TCP -Action Allow - -# KmsOut -New-NetFirewallRule -DisplayName "KmsOut (TCP 1688 Outbound): Allow" -Direction Outbound -LocalPort 1688 -Protocol TCP -Action Allow - -# reg_Power_PreferredPlan_HighPerformance: https://bugzilla.mozilla.org/show_bug.cgi?id=1362613 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\ControlPanel\NameSpace\{025A5937-A6BE-4686-A844-36FE4BEC8B6D}" -Name "PreferredPlan" -Value "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c" -PropertyType String -Force - -# HostsFile: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/etc/hosts", "C:\Windows\System32\drivers\etc\hosts") - -# SetHostsFileContent: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 - -# env_TASKCLUSTER_ROOT_URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1551789 -[Environment]::SetEnvironmentVariable("TASKCLUSTER_ROOT_URL", "https://firefox-ci-tc.services.mozilla.com", "Machine") - -# programdata_google_auth: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -md "C:\ProgramData\Google\Auth" - -# stackdriver_key: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -cmd /c mklink "C:\ProgramData\Google\Auth\application_default_credentials.json" "C:\builds\taskcluster-worker-ec2@aws-stackdriver-log-1571127027.json" - -# now shutdown, in preparation for creating an image -# Stop-Computer isn't working, also not when specifying -AsJob, so reverting to using `shutdown` command instead -# * https://www.reddit.com/r/PowerShell/comments/65250s/windows_10_creators_update_stopcomputer_not/dgfofug/?st=j1o3oa29&sh=e0c29c6d -# * https://support.microsoft.com/en-in/help/4014551/description-of-the-security-and-quality-rollup-for-the-net-framework-4 -# * https://support.microsoft.com/en-us/help/4020459 -shutdown -s diff --git a/worker_types/gecko-3-b-win2012-c5/bootstrap.ps1 b/worker_types/gecko-3-b-win2012-c5/bootstrap.ps1 deleted file mode 100644 index 573428b3..00000000 --- a/worker_types/gecko-3-b-win2012-c5/bootstrap.ps1 +++ /dev/null @@ -1,327 +0,0 @@ -################################################################################### -# Note, this powershell script is an *APPROXIMATION ONLY* to the steps that are run -# to build the AMIs for aws-provisioner-v1/gecko-3-b-win2012-c5. -# -# The authoratative host definition can be found at: -# -# * https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Manifest/gecko-3-b-win2012-c5.json -# -################################################################################### - -# use TLS 1.2 (see bug 1443595) -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -# capture env -Get-ChildItem Env: | Out-File "C:\install_env.txt" - -# needed for making http requests -$client = New-Object system.net.WebClient -$shell = new-object -com shell.application - -# utility function to download a zip file and extract it -function Extract-ZIPFile($file, $destination, $url) -{ - $client.DownloadFile($url, $file) - $zip = $shell.NameSpace($file) - foreach($item in $zip.items()) - { - $shell.Namespace($destination).copyhere($item) - } -} - -md C:\logs -md C:\binaries - -# LogDirectory: Required by OpenCloudConfig for DSC logging -md "C:\log" - -# StackdriverLogging: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://dl.google.com/cloudagents/windows/StackdriverLogging-v1-9.exe", "C:\binaries\StackdriverLogging-v1-9.exe") -Start-Process "C:\binaries\StackdriverLogging-v1-9.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# fluentd_gw_exe: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.exe.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.exe.conf") - -# fluentd_gw_service: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.service.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.service.conf") - -# fluentd_gw_wrapper: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.wrapper.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.wrapper.conf") - -# fluentd_occ: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/occ.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\occ.conf") - -# fluentd_redact: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/redact.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\redact.conf") - -# NxLog: Maintenance Toolchain - forwards event logs to papertrail -$client.DownloadFile("https://nxlog.co/system/files/products/files/348/nxlog-ce-2.10.2150.msi", "C:\binaries\nxlog-ce-2.10.2150.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\nxlog-ce-2.10.2150.msi /quiet" -Wait -NoNewWindow - -# PaperTrailEncryptionCertificate: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/papertrail-bundle.pem", "C:\Program Files (x86)\nxlog\cert\papertrail-bundle.pem") - -# NxLogPaperTrailConfiguration: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/win2012.conf", "C:\Program Files (x86)\nxlog\conf\nxlog.conf") - -# Start_nxlog: Maintenance Toolchain - not essential for building firefox -Set-Service "nxlog" -StartupType Automatic -Status Running - -# DisableIndexing: Disable indexing on all disk volumes (for performance) -Get-WmiObject Win32_Volume -Filter "IndexingEnabled=$true" | Set-WmiInstance -Arguments @{IndexingEnabled=$false} - -# ProcessExplorer: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessExplorer" -Extract-ZIPFile -File "C:\binaries\ProcessExplorer.zip" -Destination "C:\ProcessExplorer" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessExplorer/ProcessExplorer.zip" - -# ProcessMonitor: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessMonitor" -Extract-ZIPFile -File "C:\binaries\ProcessMonitor.zip" -Destination "C:\ProcessMonitor" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessMonitor/ProcessMonitor.zip" - -# GpgForWin: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://files.gpg4win.org/gpg4win-2.3.0.exe", "C:\binaries\gpg4win-2.3.0.exe") -Start-Process "C:\binaries\gpg4win-2.3.0.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SevenZip: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://7-zip.org/a/7z1514-x64.exe", "C:\binaries\7z1514-x64.exe") -Start-Process "C:\binaries\7z1514-x64.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SublimeText3: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://download.sublimetext.com/Sublime%20Text%20Build%203114%20x64%20Setup.exe", "C:\binaries\Sublime Text Build 3114 x64 Setup.exe") -Start-Process "C:\binaries\Sublime Text Build 3114 x64 Setup.exe" -ArgumentList "/VERYSILENT /NORESTART /TASKS=`"contextentry`"" -Wait -NoNewWindow - -# SublimeText3_PackagesFolder: Maintenance Toolchain - not essential for building firefox -md "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages" - -# SublimeText3_PackageControl: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://sublime.wbond.net/Package%20Control.sublime-package", "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\Package Control.sublime-package") - -# SystemPowerShellProfile: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Microsoft.PowerShell_profile.ps1", "C:\Windows\System32\WindowsPowerShell\v1.0\Microsoft.PowerShell_profile.ps1") - -# FsutilDisable8Dot3: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disable8dot3 1" -Wait -NoNewWindow - -# FsutilDisableLastAccess: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disablelastaccess 1" -Wait -NoNewWindow - -# home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\home" "C:\Users" - -# Start_wuauserv: Required by NET-Framework-Core -Set-Service "wuauserv" -StartupType Manual -Status Running - -# NET_Framework_Core: Required by DXSDK_Jun10 -Install-WindowsFeature NET-Framework-Core - -# VisualC2010RedistributablePackageX86Uninstall: Required by DXSDK_Jun10 (https://blogs.msdn.microsoft.com/chuckw/2011/12/09/known-issue-directx-sdk-june-2010-setup-and-the-s1023-error) -Start-Process "msiexec.exe" -ArgumentList "/passive /uninstall {F0C3E5D1-1ADE-321E-8167-68EF0DE699A5}" -Wait -NoNewWindow - -# VisualC2010RedistributablePackageX86_64Uninstall: Required by DXSDK_Jun10 (https://blogs.msdn.microsoft.com/chuckw/2011/12/09/known-issue-directx-sdk-june-2010-setup-and-the-s1023-error) -Start-Process "msiexec.exe" -ArgumentList "/passive /uninstall {1D8E6291-B0D5-35EC-8441-6616F567A0F7}" -Wait -NoNewWindow - -# DXSDK_Jun10: Provides D3D compilers required by 32 bit builds -$client.DownloadFile("http://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe", "C:\binaries\DXSDK_Jun10.exe") -Start-Process "C:\binaries\DXSDK_Jun10.exe" -ArgumentList "/U" -Wait -NoNewWindow - -# vcredist_vs2010_x86: Required by yasm (c:/mozilla-build/yasm/yasm.exe) -$client.DownloadFile("http://download.microsoft.com/download/C/6/D/C6D0FD4E-9E53-4897-9B91-836EBA2AACD3/vcredist_x86.exe", "C:\binaries\vcredist_x86.exe") -Start-Process "C:\binaries\vcredist_x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2010_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2010_x64: Required by yasm (c:/mozilla-build/yasm/yasm.exe) -$client.DownloadFile("http://download.microsoft.com/download/A/8/0/A80747C3-41BD-45DF-B505-E9710D2744E0/vcredist_x64.exe", "C:\binaries\vcredist_x64.exe") -Start-Process "C:\binaries\vcredist_x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2010_x64-install.log" -Wait -NoNewWindow - -# vcredist_vs2013_x86: Required by rustc (tooltool artefact) -$client.DownloadFile("http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe", "C:\binaries\vcredist_x86.exe") -Start-Process "C:\binaries\vcredist_x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2013_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2013_x64: Required by rustc (tooltool artefact) -$client.DownloadFile("http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe", "C:\binaries\vcredist_x64.exe") -Start-Process "C:\binaries\vcredist_x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2013_x64-install.log" -Wait -NoNewWindow - -# vcredist_vs2015_x86: Required by rustc (tooltool artefact) -$client.DownloadFile("http://download.microsoft.com/download/f/3/9/f39b30ec-f8ef-4ba3-8cb4-e301fcf0e0aa/vc_redist.x86.exe", "C:\binaries\vc_redist.x86.exe") -Start-Process "C:\binaries\vc_redist.x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2015_x64: Required by rustc (tooltool artefact) -$client.DownloadFile("http://download.microsoft.com/download/4/c/b/4cbd5757-0dd4-43a7-bac0-2a492cedbacb/vc_redist.x64.exe", "C:\binaries\vc_redist.x64.exe") -Start-Process "C:\binaries\vc_redist.x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x64-install.log" -Wait -NoNewWindow - -# WindowsSDK10Setup -$client.DownloadFile("https://go.microsoft.com/fwlink/p/?LinkID=698771", "C:\binaries\sdksetup.exe") -Start-Process "C:\binaries\sdksetup.exe" -ArgumentList "/features + /quiet /norestart /ceip off /log C:\log\windowssdk10setup.log" -Wait -NoNewWindow - -# BinScope: https://dxr.mozilla.org/mozilla-central/search?q=BinScope&redirect=false&case=false -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/binscope/BinScope_x64.msi", "C:\binaries\BinScope_x64.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\BinScope_x64.msi /quiet" -Wait -NoNewWindow - -# MozillaBuildSetup: https://bugzilla.mozilla.org/show_bug.cgi?id=1461340 -$client.DownloadFile("http://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-3.2.exe", "C:\binaries\MozillaBuildSetup-3.2.exe") -Start-Process "C:\binaries\MozillaBuildSetup-3.2.exe" -ArgumentList "/S /D=C:\mozilla-build" -Wait -NoNewWindow - -# DeleteMozillaBuildPython3PythonExe -Start-Process "cmd.exe" -ArgumentList "/c del /F /Q C:\mozilla-build\python3\python.exe" -Wait -NoNewWindow - -# msys_home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\mozilla-build\msys\home" "C:\Users" - -# DeleteMozillaBuildMercurial -Start-Process "cmd.exe" -ArgumentList "/c del C:\mozilla-build\python\Scripts\hg*" -Wait -NoNewWindow - -# Mercurial: https://bugzilla.mozilla.org/show_bug.cgi?id=1490703 -$client.DownloadFile("https://www.mercurial-scm.org/release/windows/mercurial-4.7.1-x64.msi", "C:\binaries\mercurial-4.7.1-x64.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\mercurial-4.7.1-x64.msi /quiet" -Wait -NoNewWindow - -# MercurialConfig: Required by clonebundle and share hg extensions -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/mercurial.ini", "C:\Program Files\Mercurial\Mercurial.ini") - -# robustcheckout: Required by robustcheckout hg extension -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/FirefoxBuildResources/robustcheckout.py", "C:\mozilla-build\robustcheckout.py") - -# MercurialCerts -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/cacert.pem", "C:\mozilla-build\msys\etc\cacert.pem") - -# env_MOZILLABUILD: Absolutely required for mozharness builds. Python will fall in a heap, throwing misleading exceptions without this. :) -[Environment]::SetEnvironmentVariable("MOZILLABUILD", "C:\mozilla-build", "Machine") - -# pip_upgrade_pip -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade pip==19.2.3" -Wait -NoNewWindow - -# pip_upgrade_setuptools -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade setuptools==20.7.0" -Wait -NoNewWindow - -# pip_upgrade_virtualenv -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade virtualenv==15.0.1" -Wait -NoNewWindow - -# pip_upgrade_wheel -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade wheel==0.29.0" -Wait -NoNewWindow - -# pip_upgrade_pypiwin32 -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade pypiwin32==219" -Wait -NoNewWindow - -# pip_upgrade_requests -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade requests==2.8.1" -Wait -NoNewWindow - -# pip_upgrade_psutil -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade psutil==4.1.0" -Wait -NoNewWindow - -# pip3_upgrade_pip -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade pip==19.2.3" -Wait -NoNewWindow - -# pip3_upgrade_zstandard -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade zstandard==0.11.1" -Wait -NoNewWindow - -# pip3_upgrade_certifi -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade certifi" -Wait -NoNewWindow - -# ToolToolInstall -$client.DownloadFile("https://raw.githubusercontent.com/mozilla/release-services/master/src/tooltool/client/tooltool.py", "C:\mozilla-build\tooltool.py") - -# dir_TOOLTOOL_CACHE -md "Y:\tooltool_cache" - -# env_TOOLTOOL_CACHE: Tells the build system where to find the local tooltool cache -[Environment]::SetEnvironmentVariable("TOOLTOOL_CACHE", "Y:\tooltool_cache", "Machine") - -# link_TOOLTOOL_CACHE: Provides backwards compatibility to hardcoded cache paths -cmd /c mklink "C:\builds\tooltool_cache" "Y:\tooltool_cache" - -# ToolToolCacheAccessRights: https://bugzilla.mozilla.org/show_bug.cgi?id=1421114 -Start-Process "icacls.exe" -ArgumentList "Y:\tooltool_cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_PATH -[Environment]::SetEnvironmentVariable("PATH", "C:\Program Files\Mercurial;C:\mozilla-build\bin;C:\mozilla-build\kdiff3;C:\mozilla-build\moztools-x64\bin;C:\mozilla-build\mozmake;C:\mozilla-build\msys\bin;C:\mozilla-build\msys\local\bin;C:\mozilla-build\nsis-3.01;C:\mozilla-build\python;C:\mozilla-build\python\Scripts;C:\mozilla-build\python3;%PATH%", "Machine") - -# reg_WindowsErrorReportingLocalDumps: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-Item -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Force - -# reg_WindowsErrorReportingDontShowUI: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "DontShowUI" -Value "0x00000001" -PropertyType Dword -Force - -# env_DXSDK_DIR -[Environment]::SetEnvironmentVariable("DXSDK_DIR", "C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)", "Machine") - -# GenericWorkerDirectory -md "C:\generic-worker" - -# GenericWorkerDownload -$client.DownloadFile("https://github.com/taskcluster/generic-worker/releases/download/v14.1.0/generic-worker-nativeEngine-windows-amd64.exe", "C:\generic-worker\generic-worker.exe") - -# LiveLogDownload -$client.DownloadFile("https://github.com/taskcluster/livelog/releases/download/v1.1.0/livelog-windows-amd64.exe", "C:\generic-worker\livelog.exe") - -# TaskClusterProxyDownload -$client.DownloadFile("https://github.com/taskcluster/taskcluster-proxy/releases/download/v5.1.0/taskcluster-proxy-windows-amd64.exe", "C:\generic-worker\taskcluster-proxy.exe") - -# NSSMDownload -$client.DownloadFile("https://nssm.cc/ci/nssm-2.24-103-gdee49fc.zip", "C:\Windows\Temp\NSSMInstall.zip") - -# NSSMInstall: NSSM is required to install Generic Worker as a service. Currently ZipInstall fails, so using 7z instead. -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -oC:\ C:\Windows\Temp\NSSMInstall.zip" -Wait -NoNewWindow - -# GenericWorkerInstall -Start-Process "C:\generic-worker\generic-worker.exe" -ArgumentList "install service --nssm C:\nssm-2.24-103-gdee49fc\win64\nssm.exe --config C:\generic-worker\generic-worker.config --configure-for-%MY_CLOUD%" -Wait -NoNewWindow - -# GenericWorkerStateWait -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/run-generic-worker-and-reboot.bat", "C:\generic-worker\run-generic-worker.bat") - -# TaskUserInitScript: Bug 1433851 - wait for user registry to initialise before running a task -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/task-user-init-win2012.cmd", "C:\generic-worker\task-user-init.cmd") - -# HgShared: allows builds to use `hg robustcheckout ...` -md "y:\hg-shared" - -# HgSharedAccessRights: allows builds to use `hg robustcheckout ...` -Start-Process "icacls.exe" -ArgumentList "y:\hg-shared /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# LegacyHgShared: allows builds to use `hg share ...` -md "c:\builds\hg-shared" - -# LegacyHgSharedAccessRights: allows builds to use `hg share ...` -Start-Process "icacls.exe" -ArgumentList "c:\builds\hg-shared /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# CarbonClone: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "clone --insecure https://bitbucket.org/splatteredbits/carbon C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonUpdate: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "update 2.4.0 -R C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonInstall: Bug 1316329 - support creation of symlinks by task users -Start-Process "xcopy" -ArgumentList "C:\Windows\Temp\carbon\Carbon C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Carbon /e /i /y" -Wait -NoNewWindow - -# GrantEveryoneSeCreateSymbolicLinkPrivilege: Bug 1316329 - support creation of symlinks by task users -Start-Process "powershell" -ArgumentList "-command `"& {&'Import-Module' Carbon}`"; `"& {&'Grant-Privilege' -Identity Everyone -Privilege SeCreateSymbolicLinkPrivilege}`"" -Wait -NoNewWindow - -# ZDriveAccessRights: allows task users full access to the task drive -Start-Process "icacls.exe" -ArgumentList "z:\ /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# KmsIn -New-NetFirewallRule -DisplayName "KmsIn (TCP 1688 Inbound): Allow" -Direction Inbound -LocalPort 1688 -Protocol TCP -Action Allow - -# KmsOut -New-NetFirewallRule -DisplayName "KmsOut (TCP 1688 Outbound): Allow" -Direction Outbound -LocalPort 1688 -Protocol TCP -Action Allow - -# reg_Power_PreferredPlan_HighPerformance: https://bugzilla.mozilla.org/show_bug.cgi?id=1362613 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\ControlPanel\NameSpace\{025A5937-A6BE-4686-A844-36FE4BEC8B6D}" -Name "PreferredPlan" -Value "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c" -PropertyType String -Force - -# HostsFile: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/etc/hosts", "C:\Windows\System32\drivers\etc\hosts") - -# SetHostsFileContent: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 - -# env_TASKCLUSTER_ROOT_URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1551789 -[Environment]::SetEnvironmentVariable("TASKCLUSTER_ROOT_URL", "https://firefox-ci-tc.services.mozilla.com", "Machine") - -# programdata_google_auth: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -md "C:\ProgramData\Google\Auth" - -# stackdriver_key: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -cmd /c mklink "C:\ProgramData\Google\Auth\application_default_credentials.json" "C:\builds\taskcluster-worker-ec2@aws-stackdriver-log-1571127027.json" - -# now shutdown, in preparation for creating an image -# Stop-Computer isn't working, also not when specifying -AsJob, so reverting to using `shutdown` command instead -# * https://www.reddit.com/r/PowerShell/comments/65250s/windows_10_creators_update_stopcomputer_not/dgfofug/?st=j1o3oa29&sh=e0c29c6d -# * https://support.microsoft.com/en-in/help/4014551/description-of-the-security-and-quality-rollup-for-the-net-framework-4 -# * https://support.microsoft.com/en-us/help/4020459 -shutdown -s diff --git a/worker_types/gecko-3-b-win2012/aws_filters b/worker_types/gecko-3-b-win2012/aws_filters deleted file mode 100644 index 985e2cb1..00000000 --- a/worker_types/gecko-3-b-win2012/aws_filters +++ /dev/null @@ -1,2 +0,0 @@ -Name=platform,Values=windows -Name=name,Values=gecko-b-win2012-base-* diff --git a/worker_types/gecko-3-b-win2012/aws_owners b/worker_types/gecko-3-b-win2012/aws_owners deleted file mode 100644 index 38631e52..00000000 --- a/worker_types/gecko-3-b-win2012/aws_owners +++ /dev/null @@ -1,2 +0,0 @@ -self -amazon diff --git a/worker_types/gecko-3-b-win2012/bootstrap.ps1 b/worker_types/gecko-3-b-win2012/bootstrap.ps1 deleted file mode 100644 index f8b94f2b..00000000 --- a/worker_types/gecko-3-b-win2012/bootstrap.ps1 +++ /dev/null @@ -1,327 +0,0 @@ -################################################################################### -# Note, this powershell script is an *APPROXIMATION ONLY* to the steps that are run -# to build the AMIs for aws-provisioner-v1/gecko-3-b-win2012. -# -# The authoratative host definition can be found at: -# -# * https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Manifest/gecko-3-b-win2012.json -# -################################################################################### - -# use TLS 1.2 (see bug 1443595) -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -# capture env -Get-ChildItem Env: | Out-File "C:\install_env.txt" - -# needed for making http requests -$client = New-Object system.net.WebClient -$shell = new-object -com shell.application - -# utility function to download a zip file and extract it -function Extract-ZIPFile($file, $destination, $url) -{ - $client.DownloadFile($url, $file) - $zip = $shell.NameSpace($file) - foreach($item in $zip.items()) - { - $shell.Namespace($destination).copyhere($item) - } -} - -md C:\logs -md C:\binaries - -# LogDirectory: Required by OpenCloudConfig for DSC logging -md "C:\log" - -# StackdriverLogging: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://dl.google.com/cloudagents/windows/StackdriverLogging-v1-9.exe", "C:\binaries\StackdriverLogging-v1-9.exe") -Start-Process "C:\binaries\StackdriverLogging-v1-9.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# fluentd_gw_exe: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.exe.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.exe.conf") - -# fluentd_gw_service: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.service.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.service.conf") - -# fluentd_gw_wrapper: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.wrapper.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.wrapper.conf") - -# fluentd_occ: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/occ.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\occ.conf") - -# fluentd_redact: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/redact.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\redact.conf") - -# NxLog: Maintenance Toolchain - forwards event logs to papertrail -$client.DownloadFile("https://nxlog.co/system/files/products/files/348/nxlog-ce-2.10.2150.msi", "C:\binaries\nxlog-ce-2.10.2150.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\nxlog-ce-2.10.2150.msi /quiet" -Wait -NoNewWindow - -# PaperTrailEncryptionCertificate: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/papertrail-bundle.pem", "C:\Program Files (x86)\nxlog\cert\papertrail-bundle.pem") - -# NxLogPaperTrailConfiguration: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/win2012.conf", "C:\Program Files (x86)\nxlog\conf\nxlog.conf") - -# Start_nxlog: Maintenance Toolchain - not essential for building firefox -Set-Service "nxlog" -StartupType Automatic -Status Running - -# DisableIndexing: Disable indexing on all disk volumes (for performance) -Get-WmiObject Win32_Volume -Filter "IndexingEnabled=$true" | Set-WmiInstance -Arguments @{IndexingEnabled=$false} - -# ProcessExplorer: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessExplorer" -Extract-ZIPFile -File "C:\binaries\ProcessExplorer.zip" -Destination "C:\ProcessExplorer" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessExplorer/ProcessExplorer.zip" - -# ProcessMonitor: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessMonitor" -Extract-ZIPFile -File "C:\binaries\ProcessMonitor.zip" -Destination "C:\ProcessMonitor" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessMonitor/ProcessMonitor.zip" - -# GpgForWin: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://files.gpg4win.org/gpg4win-2.3.0.exe", "C:\binaries\gpg4win-2.3.0.exe") -Start-Process "C:\binaries\gpg4win-2.3.0.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SevenZip: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://7-zip.org/a/7z1514-x64.exe", "C:\binaries\7z1514-x64.exe") -Start-Process "C:\binaries\7z1514-x64.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SublimeText3: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://download.sublimetext.com/Sublime%20Text%20Build%203114%20x64%20Setup.exe", "C:\binaries\Sublime Text Build 3114 x64 Setup.exe") -Start-Process "C:\binaries\Sublime Text Build 3114 x64 Setup.exe" -ArgumentList "/VERYSILENT /NORESTART /TASKS=`"contextentry`"" -Wait -NoNewWindow - -# SublimeText3_PackagesFolder: Maintenance Toolchain - not essential for building firefox -md "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages" - -# SublimeText3_PackageControl: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://sublime.wbond.net/Package%20Control.sublime-package", "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\Package Control.sublime-package") - -# SystemPowerShellProfile: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Microsoft.PowerShell_profile.ps1", "C:\Windows\System32\WindowsPowerShell\v1.0\Microsoft.PowerShell_profile.ps1") - -# FsutilDisable8Dot3: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disable8dot3 1" -Wait -NoNewWindow - -# FsutilDisableLastAccess: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disablelastaccess 1" -Wait -NoNewWindow - -# home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\home" "C:\Users" - -# Start_wuauserv: Required by NET-Framework-Core -Set-Service "wuauserv" -StartupType Manual -Status Running - -# NET_Framework_Core: Required by DXSDK_Jun10 -Install-WindowsFeature NET-Framework-Core - -# VisualC2010RedistributablePackageX86Uninstall: Required by DXSDK_Jun10 (https://blogs.msdn.microsoft.com/chuckw/2011/12/09/known-issue-directx-sdk-june-2010-setup-and-the-s1023-error) -Start-Process "msiexec.exe" -ArgumentList "/passive /uninstall {F0C3E5D1-1ADE-321E-8167-68EF0DE699A5}" -Wait -NoNewWindow - -# VisualC2010RedistributablePackageX86_64Uninstall: Required by DXSDK_Jun10 (https://blogs.msdn.microsoft.com/chuckw/2011/12/09/known-issue-directx-sdk-june-2010-setup-and-the-s1023-error) -Start-Process "msiexec.exe" -ArgumentList "/passive /uninstall {1D8E6291-B0D5-35EC-8441-6616F567A0F7}" -Wait -NoNewWindow - -# DXSDK_Jun10: Provides D3D compilers required by 32 bit builds -$client.DownloadFile("http://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe", "C:\binaries\DXSDK_Jun10.exe") -Start-Process "C:\binaries\DXSDK_Jun10.exe" -ArgumentList "/U" -Wait -NoNewWindow - -# vcredist_vs2010_x86: Required by yasm (c:/mozilla-build/yasm/yasm.exe) -$client.DownloadFile("http://download.microsoft.com/download/C/6/D/C6D0FD4E-9E53-4897-9B91-836EBA2AACD3/vcredist_x86.exe", "C:\binaries\vcredist_x86.exe") -Start-Process "C:\binaries\vcredist_x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2010_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2010_x64: Required by yasm (c:/mozilla-build/yasm/yasm.exe) -$client.DownloadFile("http://download.microsoft.com/download/A/8/0/A80747C3-41BD-45DF-B505-E9710D2744E0/vcredist_x64.exe", "C:\binaries\vcredist_x64.exe") -Start-Process "C:\binaries\vcredist_x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2010_x64-install.log" -Wait -NoNewWindow - -# vcredist_vs2013_x86: Required by rustc (tooltool artefact) -$client.DownloadFile("http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe", "C:\binaries\vcredist_x86.exe") -Start-Process "C:\binaries\vcredist_x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2013_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2013_x64: Required by rustc (tooltool artefact) -$client.DownloadFile("http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe", "C:\binaries\vcredist_x64.exe") -Start-Process "C:\binaries\vcredist_x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2013_x64-install.log" -Wait -NoNewWindow - -# vcredist_vs2015_x86: Required by rustc (tooltool artefact) -$client.DownloadFile("http://download.microsoft.com/download/f/3/9/f39b30ec-f8ef-4ba3-8cb4-e301fcf0e0aa/vc_redist.x86.exe", "C:\binaries\vc_redist.x86.exe") -Start-Process "C:\binaries\vc_redist.x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2015_x64: Required by rustc (tooltool artefact) -$client.DownloadFile("http://download.microsoft.com/download/4/c/b/4cbd5757-0dd4-43a7-bac0-2a492cedbacb/vc_redist.x64.exe", "C:\binaries\vc_redist.x64.exe") -Start-Process "C:\binaries\vc_redist.x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x64-install.log" -Wait -NoNewWindow - -# WindowsSDK10Setup -$client.DownloadFile("https://go.microsoft.com/fwlink/p/?LinkID=698771", "C:\binaries\sdksetup.exe") -Start-Process "C:\binaries\sdksetup.exe" -ArgumentList "/features + /quiet /norestart /ceip off /log C:\log\windowssdk10setup.log" -Wait -NoNewWindow - -# BinScope: https://dxr.mozilla.org/mozilla-central/search?q=BinScope&redirect=false&case=false -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/binscope/BinScope_x64.msi", "C:\binaries\BinScope_x64.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\BinScope_x64.msi /quiet" -Wait -NoNewWindow - -# MozillaBuildSetup: https://bugzilla.mozilla.org/show_bug.cgi?id=1461340 -$client.DownloadFile("http://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-3.2.exe", "C:\binaries\MozillaBuildSetup-3.2.exe") -Start-Process "C:\binaries\MozillaBuildSetup-3.2.exe" -ArgumentList "/S /D=C:\mozilla-build" -Wait -NoNewWindow - -# DeleteMozillaBuildPython3PythonExe -Start-Process "cmd.exe" -ArgumentList "/c del /F /Q C:\mozilla-build\python3\python.exe" -Wait -NoNewWindow - -# msys_home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\mozilla-build\msys\home" "C:\Users" - -# DeleteMozillaBuildMercurial -Start-Process "cmd.exe" -ArgumentList "/c del C:\mozilla-build\python\Scripts\hg*" -Wait -NoNewWindow - -# Mercurial: https://bugzilla.mozilla.org/show_bug.cgi?id=1490703 -$client.DownloadFile("https://www.mercurial-scm.org/release/windows/mercurial-4.7.1-x64.msi", "C:\binaries\mercurial-4.7.1-x64.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\mercurial-4.7.1-x64.msi /quiet" -Wait -NoNewWindow - -# MercurialConfig: Required by clonebundle and share hg extensions -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/mercurial.ini", "C:\Program Files\Mercurial\Mercurial.ini") - -# robustcheckout: Required by robustcheckout hg extension -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/FirefoxBuildResources/robustcheckout.py", "C:\mozilla-build\robustcheckout.py") - -# MercurialCerts -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/cacert.pem", "C:\mozilla-build\msys\etc\cacert.pem") - -# env_MOZILLABUILD: Absolutely required for mozharness builds. Python will fall in a heap, throwing misleading exceptions without this. :) -[Environment]::SetEnvironmentVariable("MOZILLABUILD", "C:\mozilla-build", "Machine") - -# pip_upgrade_pip -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade pip==19.2.3" -Wait -NoNewWindow - -# pip_upgrade_setuptools -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade setuptools==20.7.0" -Wait -NoNewWindow - -# pip_upgrade_virtualenv -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade virtualenv==15.0.1" -Wait -NoNewWindow - -# pip_upgrade_wheel -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade wheel==0.29.0" -Wait -NoNewWindow - -# pip_upgrade_pypiwin32 -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade pypiwin32==219" -Wait -NoNewWindow - -# pip_upgrade_requests -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade requests==2.8.1" -Wait -NoNewWindow - -# pip_upgrade_psutil -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade psutil==4.1.0" -Wait -NoNewWindow - -# pip3_upgrade_pip -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade pip==19.2.3" -Wait -NoNewWindow - -# pip3_upgrade_zstandard -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade zstandard==0.11.1" -Wait -NoNewWindow - -# pip3_upgrade_certifi -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade certifi" -Wait -NoNewWindow - -# ToolToolInstall -$client.DownloadFile("https://raw.githubusercontent.com/mozilla/release-services/master/src/tooltool/client/tooltool.py", "C:\mozilla-build\tooltool.py") - -# dir_TOOLTOOL_CACHE -md "Y:\tooltool_cache" - -# env_TOOLTOOL_CACHE: Tells the build system where to find the local tooltool cache -[Environment]::SetEnvironmentVariable("TOOLTOOL_CACHE", "Y:\tooltool_cache", "Machine") - -# link_TOOLTOOL_CACHE: Provides backwards compatibility to hardcoded cache paths -cmd /c mklink "C:\builds\tooltool_cache" "Y:\tooltool_cache" - -# ToolToolCacheAccessRights: https://bugzilla.mozilla.org/show_bug.cgi?id=1421114 -Start-Process "icacls.exe" -ArgumentList "Y:\tooltool_cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_PATH -[Environment]::SetEnvironmentVariable("PATH", "C:\Program Files\Mercurial;C:\mozilla-build\bin;C:\mozilla-build\kdiff3;C:\mozilla-build\moztools-x64\bin;C:\mozilla-build\mozmake;C:\mozilla-build\msys\bin;C:\mozilla-build\msys\local\bin;C:\mozilla-build\nsis-3.01;C:\mozilla-build\python;C:\mozilla-build\python\Scripts;C:\mozilla-build\python3;%PATH%", "Machine") - -# reg_WindowsErrorReportingLocalDumps: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-Item -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Force - -# reg_WindowsErrorReportingDontShowUI: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "DontShowUI" -Value "0x00000001" -PropertyType Dword -Force - -# env_DXSDK_DIR -[Environment]::SetEnvironmentVariable("DXSDK_DIR", "C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)", "Machine") - -# GenericWorkerDirectory -md "C:\generic-worker" - -# GenericWorkerDownload -$client.DownloadFile("https://github.com/taskcluster/generic-worker/releases/download/v16.5.1/generic-worker-multiuser-windows-amd64.exe", "C:\generic-worker\generic-worker.exe") - -# LiveLogDownload -$client.DownloadFile("https://github.com/taskcluster/livelog/releases/download/v1.1.0/livelog-windows-amd64.exe", "C:\generic-worker\livelog.exe") - -# TaskClusterProxyDownload -$client.DownloadFile("https://github.com/taskcluster/taskcluster-proxy/releases/download/v5.1.0/taskcluster-proxy-windows-amd64.exe", "C:\generic-worker\taskcluster-proxy.exe") - -# NSSMDownload -$client.DownloadFile("https://nssm.cc/ci/nssm-2.24-103-gdee49fc.zip", "C:\Windows\Temp\NSSMInstall.zip") - -# NSSMInstall: NSSM is required to install Generic Worker as a service. Currently ZipInstall fails, so using 7z instead. -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -oC:\ C:\Windows\Temp\NSSMInstall.zip" -Wait -NoNewWindow - -# GenericWorkerInstall -Start-Process "C:\generic-worker\generic-worker.exe" -ArgumentList "install service --nssm C:\nssm-2.24-103-gdee49fc\win64\nssm.exe --config C:\generic-worker\generic-worker.config --configure-for-%MY_CLOUD%" -Wait -NoNewWindow - -# GenericWorkerStateWait -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/run-generic-worker-and-reboot.bat", "C:\generic-worker\run-generic-worker.bat") - -# TaskUserInitScript: Bug 1433851 - wait for user registry to initialise before running a task -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/task-user-init-win2012.cmd", "C:\generic-worker\task-user-init.cmd") - -# HgShared: allows builds to use `hg robustcheckout ...` -md "y:\hg-shared" - -# HgSharedAccessRights: allows builds to use `hg robustcheckout ...` -Start-Process "icacls.exe" -ArgumentList "y:\hg-shared /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# LegacyHgShared: allows builds to use `hg share ...` -md "c:\builds\hg-shared" - -# LegacyHgSharedAccessRights: allows builds to use `hg share ...` -Start-Process "icacls.exe" -ArgumentList "c:\builds\hg-shared /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# CarbonClone: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "clone --insecure https://bitbucket.org/splatteredbits/carbon C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonUpdate: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "update 2.4.0 -R C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonInstall: Bug 1316329 - support creation of symlinks by task users -Start-Process "xcopy" -ArgumentList "C:\Windows\Temp\carbon\Carbon C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Carbon /e /i /y" -Wait -NoNewWindow - -# GrantEveryoneSeCreateSymbolicLinkPrivilege: Bug 1316329 - support creation of symlinks by task users -Start-Process "powershell" -ArgumentList "-command `"& {&'Import-Module' Carbon}`"; `"& {&'Grant-Privilege' -Identity Everyone -Privilege SeCreateSymbolicLinkPrivilege}`"" -Wait -NoNewWindow - -# ZDriveAccessRights: allows task users full access to the task drive -Start-Process "icacls.exe" -ArgumentList "z:\ /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# KmsIn -New-NetFirewallRule -DisplayName "KmsIn (TCP 1688 Inbound): Allow" -Direction Inbound -LocalPort 1688 -Protocol TCP -Action Allow - -# KmsOut -New-NetFirewallRule -DisplayName "KmsOut (TCP 1688 Outbound): Allow" -Direction Outbound -LocalPort 1688 -Protocol TCP -Action Allow - -# reg_Power_PreferredPlan_HighPerformance: https://bugzilla.mozilla.org/show_bug.cgi?id=1362613 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\ControlPanel\NameSpace\{025A5937-A6BE-4686-A844-36FE4BEC8B6D}" -Name "PreferredPlan" -Value "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c" -PropertyType String -Force - -# HostsFile: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/etc/hosts", "C:\Windows\System32\drivers\etc\hosts") - -# SetHostsFileContent: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 - -# env_TASKCLUSTER_ROOT_URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1551789 -[Environment]::SetEnvironmentVariable("TASKCLUSTER_ROOT_URL", "https://firefox-ci-tc.services.mozilla.com", "Machine") - -# programdata_google_auth: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -md "C:\ProgramData\Google\Auth" - -# stackdriver_key: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -cmd /c mklink "C:\ProgramData\Google\Auth\application_default_credentials.json" "C:\builds\taskcluster-worker-ec2@aws-stackdriver-log-1571127027.json" - -# now shutdown, in preparation for creating an image -# Stop-Computer isn't working, also not when specifying -AsJob, so reverting to using `shutdown` command instead -# * https://www.reddit.com/r/PowerShell/comments/65250s/windows_10_creators_update_stopcomputer_not/dgfofug/?st=j1o3oa29&sh=e0c29c6d -# * https://support.microsoft.com/en-in/help/4014551/description-of-the-security-and-quality-rollup-for-the-net-framework-4 -# * https://support.microsoft.com/en-us/help/4020459 -shutdown -s diff --git a/worker_types/gecko-t-win10-64-alpha/bootstrap.ps1 b/worker_types/gecko-t-win10-64-alpha/bootstrap.ps1 deleted file mode 100644 index 2bb76ef8..00000000 --- a/worker_types/gecko-t-win10-64-alpha/bootstrap.ps1 +++ /dev/null @@ -1,443 +0,0 @@ -################################################################################### -# Note, this powershell script is an *APPROXIMATION ONLY* to the steps that are run -# to build the AMIs for aws-provisioner-v1/gecko-t-win10-64-alpha. -# -# The authoratative host definition can be found at: -# -# * https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Manifest/gecko-t-win10-64-alpha.json -# -################################################################################### - -# use TLS 1.2 (see bug 1443595) -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -# capture env -Get-ChildItem Env: | Out-File "C:\install_env.txt" - -# needed for making http requests -$client = New-Object system.net.WebClient -$shell = new-object -com shell.application - -# utility function to download a zip file and extract it -function Extract-ZIPFile($file, $destination, $url) -{ - $client.DownloadFile($url, $file) - $zip = $shell.NameSpace($file) - foreach($item in $zip.items()) - { - $shell.Namespace($destination).copyhere($item) - } -} - -md C:\logs -md C:\binaries - -# LogDirectory: Required by OpenCloudConfig for DSC logging -md "C:\log" - -# StackdriverLogging: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://dl.google.com/cloudagents/windows/StackdriverLogging-v1-9.exe", "C:\binaries\StackdriverLogging-v1-9.exe") -Start-Process "C:\binaries\StackdriverLogging-v1-9.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# fluentd_gw_exe: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.exe.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.exe.conf") - -# fluentd_gw_service: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.service.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.service.conf") - -# fluentd_gw_wrapper: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.wrapper.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.wrapper.conf") - -# fluentd_occ: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/occ.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\occ.conf") - -# fluentd_redact: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/redact.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\redact.conf") - -# NxLog: Maintenance Toolchain - forwards event logs to papertrail -$client.DownloadFile("https://nxlog.co/system/files/products/files/348/nxlog-ce-2.10.2150.msi", "C:\binaries\nxlog-ce-2.10.2150.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\nxlog-ce-2.10.2150.msi /quiet" -Wait -NoNewWindow - -# PaperTrailEncryptionCertificate: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/papertrail-bundle.pem", "C:\Program Files (x86)\nxlog\cert\papertrail-bundle.pem") - -# NxLogPaperTrailConfiguration: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/win10.conf", "C:\Program Files (x86)\nxlog\conf\nxlog.conf") - -# Start_nxlog: Maintenance Toolchain - not essential for building firefox -Set-Service "nxlog" -StartupType Automatic -Status Running - -# ProcessExplorer: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessExplorer" -Extract-ZIPFile -File "C:\binaries\ProcessExplorer.zip" -Destination "C:\ProcessExplorer" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessExplorer/ProcessExplorer.zip" - -# ProcessMonitor: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessMonitor" -Extract-ZIPFile -File "C:\binaries\ProcessMonitor.zip" -Destination "C:\ProcessMonitor" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessMonitor/ProcessMonitor.zip" - -# GpgForWin: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://files.gpg4win.org/gpg4win-2.3.0.exe", "C:\binaries\gpg4win-2.3.0.exe") -Start-Process "C:\binaries\gpg4win-2.3.0.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SevenZip: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://7-zip.org/a/7z1514-x64.exe", "C:\binaries\7z1514-x64.exe") -Start-Process "C:\binaries\7z1514-x64.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SublimeText3: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://download.sublimetext.com/Sublime%20Text%20Build%203114%20x64%20Setup.exe", "C:\binaries\Sublime Text Build 3114 x64 Setup.exe") -Start-Process "C:\binaries\Sublime Text Build 3114 x64 Setup.exe" -ArgumentList "/VERYSILENT /NORESTART /TASKS=`"contextentry`"" -Wait -NoNewWindow - -# SublimeText3_PackagesFolder: Maintenance Toolchain - not essential for building firefox -md "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages" - -# SublimeText3_PackageControl: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://sublime.wbond.net/Package%20Control.sublime-package", "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\Package Control.sublime-package") - -# SystemPowerShellProfile: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Microsoft.PowerShell_profile.ps1", "C:\Windows\System32\WindowsPowerShell\v1.0\Microsoft.PowerShell_profile.ps1") - -# FsutilDisable8Dot3: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disable8dot3 1" -Wait -NoNewWindow - -# FsutilDisableLastAccess: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disablelastaccess 1" -Wait -NoNewWindow - -# home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\home" "C:\Users" - -# MozillaBuildSetup: https://bugzilla.mozilla.org/show_bug.cgi?id=1461340 -$client.DownloadFile("http://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-3.2.exe", "C:\binaries\MozillaBuildSetup-3.2.exe") -Start-Process "C:\binaries\MozillaBuildSetup-3.2.exe" -ArgumentList "/S /D=C:\mozilla-build" -Wait -NoNewWindow - -# DeleteMozillaBuildPython3PythonExe -Start-Process "cmd.exe" -ArgumentList "/c del /F /Q C:\mozilla-build\python3\python.exe" -Wait -NoNewWindow - -# msys_home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\mozilla-build\msys\home" "C:\Users" - -# DeleteMozillaBuildMercurial -Start-Process "cmd.exe" -ArgumentList "/c del C:\mozilla-build\python\Scripts\hg*" -Wait -NoNewWindow - -# Mercurial: https://bugzilla.mozilla.org/show_bug.cgi?id=1490703 -$client.DownloadFile("https://www.mercurial-scm.org/release/windows/mercurial-4.7.1-x64.msi", "C:\binaries\mercurial-4.7.1-x64.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\mercurial-4.7.1-x64.msi /quiet" -Wait -NoNewWindow - -# MercurialConfig: Required by clonebundle and share hg extensions -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/mercurial.ini", "C:\Program Files\Mercurial\Mercurial.ini") - -# robustcheckout: Required by robustcheckout hg extension -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/FirefoxBuildResources/robustcheckout.py", "C:\mozilla-build\robustcheckout.py") - -# MercurialCerts -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/cacert.pem", "C:\mozilla-build\msys\etc\cacert.pem") - -# env_MOZILLABUILD: Absolutely required for mozharness builds. Python will fall in a heap, throwing misleading exceptions without this. :) -[Environment]::SetEnvironmentVariable("MOZILLABUILD", "C:\mozilla-build", "Machine") - -# env_PATH - -# pip3_upgrade_pip -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade pip==19.2.3" -Wait -NoNewWindow - -# pip3_upgrade_zstandard -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade zstandard==0.11.1" -Wait -NoNewWindow - -# pip3_upgrade_certifi -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade certifi" -Wait -NoNewWindow - -# ToolToolInstall -$client.DownloadFile("https://raw.githubusercontent.com/mozilla/release-services/master/src/tooltool/client/tooltool.py", "C:\mozilla-build\tooltool.py") - -# reg_WindowsErrorReportingLocalDumps: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-Item -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Force - -# reg_WindowsErrorReportingDontShowUI: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "DontShowUI" -Value "0x00000001" -PropertyType Dword -Force - -# GenericWorkerDirectory -md "C:\generic-worker" - -# GenericWorkerDownload -$client.DownloadFile("https://github.com/taskcluster/generic-worker/releases/download/v14.1.0/generic-worker-nativeEngine-windows-amd64.exe", "C:\generic-worker\generic-worker.exe") - -# LiveLogDownload -$client.DownloadFile("https://github.com/taskcluster/livelog/releases/download/v1.1.0/livelog-windows-amd64.exe", "C:\generic-worker\livelog.exe") - -# TaskClusterProxyDownload -$client.DownloadFile("https://github.com/taskcluster/taskcluster-proxy/releases/download/v5.1.0/taskcluster-proxy-windows-amd64.exe", "C:\generic-worker\taskcluster-proxy.exe") - -# NSSMDownload -$client.DownloadFile("https://nssm.cc/ci/nssm-2.24-103-gdee49fc.zip", "C:\Windows\Temp\NSSMInstall.zip") - -# NSSMInstall: NSSM is required to install Generic Worker as a service. Currently ZipInstall fails, so using 7z instead. -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -oC:\ C:\Windows\Temp\NSSMInstall.zip" -Wait -NoNewWindow - -# GenericWorkerInstall -Start-Process "C:\generic-worker\generic-worker.exe" -ArgumentList "install service --nssm C:\nssm-2.24-103-gdee49fc\win64\nssm.exe --config C:\generic-worker\generic-worker.config --configure-for-%MY_CLOUD%" -Wait -NoNewWindow - -# DisableDesktopInterrupt -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/disable-desktop-interrupt.reg", "C:\generic-worker\disable-desktop-interrupt.reg") - -# SetDefaultPrinter -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/SetDefaultPrinter.ps1", "C:\generic-worker\SetDefaultPrinter.ps1") - -# GenericWorkerStateWait -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/run-generic-worker-and-reboot.bat", "C:\generic-worker\run-generic-worker.bat") - -# TaskUserInitScript: Bug 1261188 - initialisation script for new task users -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/task-user-init-win10.cmd", "C:\generic-worker\task-user-init.cmd") - -# PipConfDirectory: https://pip.pypa.io/en/stable/user_guide/#config-file -md "C:\ProgramData\pip" - -# PipConf -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/pip.conf", "C:\ProgramData\pip\pip.ini") - -# virtualenv_support -md "C:\mozilla-build\python\Lib\site-packages\virtualenv_support" - -# virtualenv_support_pywin32 -$client.DownloadFile("https://pypi.python.org/packages/cp27/p/pypiwin32/pypiwin32-219-cp27-none-win32.whl#md5=a8b0c1b608c1afeb18cd38d759ee5e29", "C:\mozilla-build\python\Lib\site-packages\virtualenv_support\pypiwin32-219-cp27-none-win32.whl") - -# virtualenv_support_pywin32_amd64 -$client.DownloadFile("https://pypi.python.org/packages/cp27/p/pypiwin32/pypiwin32-219-cp27-none-win_amd64.whl#md5=d7bafcf3cce72c3ce9fdd633a262c335", "C:\mozilla-build\python\Lib\site-packages\virtualenv_support\pypiwin32-219-cp27-none-win_amd64.whl") - -# HgShared: allows builds to use `hg robustcheckout ...` -md "y:\hg-shared" - -# HgSharedAccessRights: allows builds to use `hg robustcheckout ...` -Start-Process "icacls.exe" -ArgumentList "y:\hg-shared /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# PipCache: share pip cache across subsequent task users -md "y:\pip-cache" - -# PipCacheAccessRights: share pip cache across subsequent task users -Start-Process "icacls.exe" -ArgumentList "y:\pip-cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_PIP_DOWNLOAD_CACHE: share pip download cache between tasks -[Environment]::SetEnvironmentVariable("PIP_DOWNLOAD_CACHE", "y:\pip-cache", "Machine") - -# TooltoolCache: share tooltool cache across subsequent task users -md "y:\tooltool-cache" - -# TooltoolCacheAccessRights: share tooltool cache across subsequent task users -Start-Process "icacls.exe" -ArgumentList "y:\tooltool-cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_TOOLTOOL_CACHE: share tooltool cache between tasks -[Environment]::SetEnvironmentVariable("TOOLTOOL_CACHE", "y:\tooltool-cache", "Machine") - -# CarbonClone: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "clone --insecure https://bitbucket.org/splatteredbits/carbon C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonUpdate: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "update 2.4.0 -R C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonInstall: Bug 1316329 - support creation of symlinks by task users -Start-Process "xcopy" -ArgumentList "C:\Windows\Temp\carbon\Carbon C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Carbon /e /i /y" -Wait -NoNewWindow - -# GrantEveryoneSeCreateSymbolicLinkPrivilege: Bug 1316329 - support creation of symlinks by task users -Start-Process "powershell" -ArgumentList "-command `"& {&'Import-Module' Carbon}`"; `"& {&'Grant-Privilege' -Identity Everyone -Privilege SeCreateSymbolicLinkPrivilege}`"" -Wait -NoNewWindow - -# MozillaMaintenanceDir: Working directory for Mozilla Maintenance Service installation -md "C:\dsc\MozillaMaintenance" - -# maintenanceservice_installer -$client.DownloadFile("https://github.com/mozilla-releng/OpenCloudConfig/blob/master/userdata/Configuration/Mozilla%20Maintenance%20Service/maintenanceservice_installer.exe?raw=true", "C:\dsc\MozillaMaintenance\maintenanceservice_installer.exe") - -# maintenanceservice -$client.DownloadFile("https://github.com/mozilla-releng/OpenCloudConfig/blob/master/userdata/Configuration/Mozilla%20Maintenance%20Service/maintenanceservice.exe?raw=true", "C:\dsc\MozillaMaintenance\maintenanceservice.exe") - -# maintenanceservice_install -Start-Process "C:\dsc\MozillaMaintenance\maintenanceservice_installer.exe" -ArgumentList "/s" -Wait -NoNewWindow - -# MaintenanceServiceAcessRights: See https://bugzilla.mozilla.org/show_bug.cgi?id=1067756#c21 -Start-Process "icacls.exe" -ArgumentList "`"C:\Program Files (x86)\Mozilla Maintenance Service`" /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# MozFakeCA_cer -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mozilla%20Maintenance%20Service/MozFakeCA.cer", "C:\dsc\MozillaMaintenance\MozFakeCA.cer") - -# MozFakeCA_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozFakeCA.cer" -Wait -NoNewWindow - -# MozFakeCA_2017_10_13_cer -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mozilla%20Maintenance%20Service/MozFakeCA_2017-10-13.cer", "C:\dsc\MozillaMaintenance\MozFakeCA_2017-10-13.cer") - -# MozFakeCA_2017_10_13_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozFakeCA_2017-10-13.cer" -Wait -NoNewWindow - -# MozRoot_cer -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/certs/MozRoot.cer", "C:\dsc\MozillaMaintenance\MozRoot.cer") - -# MozRoot_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozRoot.cer" -Wait -NoNewWindow - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "name" -Value "Mozilla Corporation" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "issuer" -Value "Thawte Code Signing CA - G2" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "publisherLink" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "name" -Value "Mozilla Fake SPC" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "issuer" -Value "Mozilla Fake CA" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "publisherLink" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "name" -Value "Mozilla Corporation" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "issuer" -Value "DigiCert SHA2 Assured ID Code Signing CA" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "publisherLink" -Value "" -PropertyType String -Force - -# GrantEveryoneMozillaRegistryWriteAccess: Bug 1353889 - Grant Everyone group write access to Mozilla registry key -Start-Process "powershell" -ArgumentList "-command `"& {(Get-Acl -Path 'HKLM:\SOFTWARE\Mozilla').SetAccessRule((New-Object -TypeName 'System.Security.AccessControl.RegistryAccessRule' -ArgumentList @('Everyone', 'FullControl', 'Allow')))}`"" -Wait -NoNewWindow - -# DisableFirewall: Bug 1358301 - Disable Windows Firewall -Start-Process "netsh" -ArgumentList "advfirewall set allprofiles state off" -Wait -NoNewWindow - -# KmsIn -New-NetFirewallRule -DisplayName "KmsIn (TCP 1688 Inbound): Allow" -Direction Inbound -LocalPort 1688 -Protocol TCP -Action Allow - -# KmsOut -New-NetFirewallRule -DisplayName "KmsOut (TCP 1688 Outbound): Allow" -Direction Outbound -LocalPort 1688 -Protocol TCP -Action Allow - -# nircmd -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/nircmd/nircmd.exe", "C:\Windows\System32\nircmd.exe") - -# nircmdc -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/nircmd/nircmdc.exe", "C:\Windows\System32\nircmdc.exe") - -# reg_DisableNewAppAlert: Bug 1373551 - prevent dialog to confirm file association -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "NoNewAppAlert" -Value "1" -PropertyType Dword -Force - -# reg_NewNetworkWindowOff: https://bugzilla.mozilla.org/show_bug.cgi?id=1397201#c58 -New-Item -Path "HKLM:System\CurrentControlSet\Control\Network\NewNetworkWindowOff" -Force - -# reg_Power_PreferredPlan_HighPerformance: https://bugzilla.mozilla.org/show_bug.cgi?id=1362613 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\ControlPanel\NameSpace\{025A5937-A6BE-4686-A844-36FE4BEC8B6D}" -Name "PreferredPlan" -Value "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c" -PropertyType String -Force - -# Reg_WinDefend_DisableConfig: https://bugzilla.mozilla.org/show_bug.cgi?id=1365909 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows Defender" -Name "DisableConfig" -Value "0x00000001" -PropertyType Dword -Force - -# Reg_WinDefend_DisableAntiSpyware: https://bugzilla.mozilla.org/show_bug.cgi?id=1365909 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows Defender" -Name "DisableAntiSpyware" -Value "0x00000001" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_wscsvc: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\wscsvc" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_SecurityHealthService: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\SecurityHealthService" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_Sense: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\Sense" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdBoot: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdBoot" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdFilter: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdFilter" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdNisDrv: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdNisDrv" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdNisSvc: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdNisSvc" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WinDefend: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WinDefend" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# OpenSshDownload: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://github.com/PowerShell/Win32-OpenSSH/releases/download/v7.6.1.0p1-Beta/OpenSSH-Win64.zip", "C:\Windows\Temp\OpenSSH-Win64.zip") - -# OpenSshUnzip: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -o`"C:\Program Files`" C:\Windows\Temp\OpenSSH-Win64.zip" -Wait -NoNewWindow - -# SshIn -New-NetFirewallRule -DisplayName "SshIn (TCP 22 Inbound): Allow" -Direction Inbound -LocalPort 22 -Protocol TCP -Action Allow - -# InstallOpenSSH: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "powershell.exe" -ArgumentList "-ExecutionPolicy Bypass -File `"C:\Program Files\OpenSSH-Win64\install-sshd.ps1`"" -Wait -NoNewWindow - -# reg_OpenSSH_DefaultShell: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShell" -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force - -# reg_OpenSSH_DefaultShellCommandOption: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShellCommandOption" -Value "/c" -PropertyType String -Force - -# AdministratorSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\Users\Administrator\.ssh" - -# AdministratorSshAuthorisedKeys: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/authorized_keys", "C:\Users\Administrator\.ssh\authorized_keys") - -# ProgramDataSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\ProgramData\ssh" - -# sshd_config: https://bugzilla.mozilla.org/show_bug.cgi?id=1464343 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/sshd_config", "C:\ProgramData\ssh\sshd_config") - -# Start_sshd: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "sshd" -StartupType Automatic -Status Running - -# Start_sshagent: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "ssh-agent" -StartupType Automatic -Status Running - -# vcredist_vs2015_x86: https://bugzilla.mozilla.org/show_bug.cgi?id=1460042 -$client.DownloadFile("http://download.microsoft.com/download/f/3/9/f39b30ec-f8ef-4ba3-8cb4-e301fcf0e0aa/vc_redist.x86.exe", "C:\binaries\vc_redist.x86.exe") -Start-Process "C:\binaries\vc_redist.x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2015_x64: https://bugzilla.mozilla.org/show_bug.cgi?id=1460042 -$client.DownloadFile("http://download.microsoft.com/download/4/c/b/4cbd5757-0dd4-43a7-bac0-2a492cedbacb/vc_redist.x64.exe", "C:\binaries\vc_redist.x64.exe") -Start-Process "C:\binaries\vc_redist.x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x64-install.log" -Wait -NoNewWindow - -# WindowsPerformanceToolkit: https://bugzilla.mozilla.org/show_bug.cgi?id=1485757 -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/WindowsPerformanceToolkit/WPTx64-x86_en-us.msi", "C:\binaries\WPTx64-x86_en-us.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\WPTx64-x86_en-us.msi /quiet" -Wait -NoNewWindow - -# mozprofilerprobe: https://bugzilla.mozilla.org/show_bug.cgi?id=1485757 -$client.DownloadFile("http://hg.mozilla.org/mozilla-central/raw-file/360ab7771e27/toolkit/components/startup/mozprofilerprobe.mof", "C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\mozprofilerprobe.mof") - -# mofcomp_mozprofilerprobe: https://bugzilla.mozilla.org/show_bug.cgi?id=1485757 -Start-Process "mofcomp" -ArgumentList "`"C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\mozprofilerprobe.mof`"" -Wait -NoNewWindow - -# ProgramData_Mozilla_AccessRights: https://bugzilla.mozilla.org/show_bug.cgi?id=1494048 -Start-Process "icacls.exe" -ArgumentList "C:\ProgramData\Mozilla /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# HostsFile: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/etc/hosts", "C:\Windows\System32\drivers\etc\hosts") - -# SetHostsFileContent: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 - -# env_TASKCLUSTER_ROOT_URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1551789 -[Environment]::SetEnvironmentVariable("TASKCLUSTER_ROOT_URL", "https://firefox-ci-tc.services.mozilla.com", "Machine") - -# programdata_google_auth: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -md "C:\ProgramData\Google\Auth" - -# stackdriver_key: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -cmd /c mklink "C:\ProgramData\Google\Auth\application_default_credentials.json" "C:\builds\taskcluster-worker-ec2@aws-stackdriver-log-1571127027.json" - -# now shutdown, in preparation for creating an image -# Stop-Computer isn't working, also not when specifying -AsJob, so reverting to using `shutdown` command instead -# * https://www.reddit.com/r/PowerShell/comments/65250s/windows_10_creators_update_stopcomputer_not/dgfofug/?st=j1o3oa29&sh=e0c29c6d -# * https://support.microsoft.com/en-in/help/4014551/description-of-the-security-and-quality-rollup-for-the-net-framework-4 -# * https://support.microsoft.com/en-us/help/4020459 -shutdown -s diff --git a/worker_types/gecko-t-win10-64-beta/aws_filters b/worker_types/gecko-t-win10-64-beta/aws_filters deleted file mode 100644 index 985e2cb1..00000000 --- a/worker_types/gecko-t-win10-64-beta/aws_filters +++ /dev/null @@ -1,2 +0,0 @@ -Name=platform,Values=windows -Name=name,Values=gecko-b-win2012-base-* diff --git a/worker_types/gecko-t-win10-64-beta/aws_owners b/worker_types/gecko-t-win10-64-beta/aws_owners deleted file mode 100644 index 38631e52..00000000 --- a/worker_types/gecko-t-win10-64-beta/aws_owners +++ /dev/null @@ -1,2 +0,0 @@ -self -amazon diff --git a/worker_types/gecko-t-win10-64-beta/bootstrap.ps1 b/worker_types/gecko-t-win10-64-beta/bootstrap.ps1 deleted file mode 100644 index da9e71e2..00000000 --- a/worker_types/gecko-t-win10-64-beta/bootstrap.ps1 +++ /dev/null @@ -1,476 +0,0 @@ -################################################################################### -# Note, this powershell script is an *APPROXIMATION ONLY* to the steps that are run -# to build the AMIs for aws-provisioner-v1/gecko-t-win10-64-beta. -# -# The authoratative host definition can be found at: -# -# * https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Manifest/gecko-t-win10-64-beta.json -# -################################################################################### - -# use TLS 1.2 (see bug 1443595) -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -# capture env -Get-ChildItem Env: | Out-File "C:\install_env.txt" - -# needed for making http requests -$client = New-Object system.net.WebClient -$shell = new-object -com shell.application - -# utility function to download a zip file and extract it -function Extract-ZIPFile($file, $destination, $url) -{ - $client.DownloadFile($url, $file) - $zip = $shell.NameSpace($file) - foreach($item in $zip.items()) - { - $shell.Namespace($destination).copyhere($item) - } -} - -md C:\logs -md C:\binaries - -# LogDirectory: Required by OpenCloudConfig for DSC logging -md "C:\log" - -# StackdriverLogging: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://dl.google.com/cloudagents/windows/StackdriverLogging-v1-9.exe", "C:\binaries\StackdriverLogging-v1-9.exe") -Start-Process "C:\binaries\StackdriverLogging-v1-9.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# fluentd_gw_exe: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.exe.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.exe.conf") - -# fluentd_gw_service: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.service.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.service.conf") - -# fluentd_gw_wrapper: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.wrapper.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.wrapper.conf") - -# fluentd_occ: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/occ.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\occ.conf") - -# fluentd_redact: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/redact.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\redact.conf") - -# NxLog: Maintenance Toolchain - forwards event logs to papertrail -$client.DownloadFile("https://nxlog.co/system/files/products/files/348/nxlog-ce-2.10.2150.msi", "C:\binaries\nxlog-ce-2.10.2150.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\nxlog-ce-2.10.2150.msi /quiet" -Wait -NoNewWindow - -# PaperTrailEncryptionCertificate: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/papertrail-bundle.pem", "C:\Program Files (x86)\nxlog\cert\papertrail-bundle.pem") - -# NxLogPaperTrailConfiguration: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/win10.conf", "C:\Program Files (x86)\nxlog\conf\nxlog.conf") - -# Start_nxlog: Maintenance Toolchain - not essential for building firefox -Set-Service "nxlog" -StartupType Automatic -Status Running - -# ProcessExplorer: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessExplorer" -Extract-ZIPFile -File "C:\binaries\ProcessExplorer.zip" -Destination "C:\ProcessExplorer" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessExplorer/ProcessExplorer.zip" - -# ProcessMonitor: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessMonitor" -Extract-ZIPFile -File "C:\binaries\ProcessMonitor.zip" -Destination "C:\ProcessMonitor" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessMonitor/ProcessMonitor.zip" - -# GpgForWin: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://files.gpg4win.org/gpg4win-2.3.0.exe", "C:\binaries\gpg4win-2.3.0.exe") -Start-Process "C:\binaries\gpg4win-2.3.0.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SevenZip: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://7-zip.org/a/7z1514-x64.exe", "C:\binaries\7z1514-x64.exe") -Start-Process "C:\binaries\7z1514-x64.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SublimeText3: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://download.sublimetext.com/Sublime%20Text%20Build%203114%20x64%20Setup.exe", "C:\binaries\Sublime Text Build 3114 x64 Setup.exe") -Start-Process "C:\binaries\Sublime Text Build 3114 x64 Setup.exe" -ArgumentList "/VERYSILENT /NORESTART /TASKS=`"contextentry`"" -Wait -NoNewWindow - -# SublimeText3_PackagesFolder: Maintenance Toolchain - not essential for building firefox -md "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages" - -# SublimeText3_PackageControl: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://sublime.wbond.net/Package%20Control.sublime-package", "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\Package Control.sublime-package") - -# SystemPowerShellProfile: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Microsoft.PowerShell_profile.ps1", "C:\Windows\System32\WindowsPowerShell\v1.0\Microsoft.PowerShell_profile.ps1") - -# FsutilDisable8Dot3: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disable8dot3 1" -Wait -NoNewWindow - -# FsutilDisableLastAccess: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disablelastaccess 1" -Wait -NoNewWindow - -# home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\home" "C:\Users" - -# MozillaBuildSetup: https://bugzilla.mozilla.org/show_bug.cgi?id=1461340 -$client.DownloadFile("http://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-3.2.exe", "C:\binaries\MozillaBuildSetup-3.2.exe") -Start-Process "C:\binaries\MozillaBuildSetup-3.2.exe" -ArgumentList "/S /D=C:\mozilla-build" -Wait -NoNewWindow - -# DeleteMozillaBuildPython3PythonExe -Start-Process "cmd.exe" -ArgumentList "/c del /F /Q C:\mozilla-build\python3\python.exe" -Wait -NoNewWindow - -# msys_home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\mozilla-build\msys\home" "C:\Users" - -# DeleteMozillaBuildMercurial -Start-Process "cmd.exe" -ArgumentList "/c del C:\mozilla-build\python\Scripts\hg*" -Wait -NoNewWindow - -# Mercurial: https://bugzilla.mozilla.org/show_bug.cgi?id=1490703 -$client.DownloadFile("https://www.mercurial-scm.org/release/windows/mercurial-4.7.1-x64.msi", "C:\binaries\mercurial-4.7.1-x64.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\mercurial-4.7.1-x64.msi /quiet" -Wait -NoNewWindow - -# MercurialConfig: Required by clonebundle and share hg extensions -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/mercurial.ini", "C:\Program Files\Mercurial\Mercurial.ini") - -# robustcheckout: Required by robustcheckout hg extension -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/FirefoxBuildResources/robustcheckout.py", "C:\mozilla-build\robustcheckout.py") - -# MercurialCerts -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/cacert.pem", "C:\mozilla-build\msys\etc\cacert.pem") - -# env_MOZILLABUILD: Absolutely required for mozharness builds. Python will fall in a heap, throwing misleading exceptions without this. :) -[Environment]::SetEnvironmentVariable("MOZILLABUILD", "C:\mozilla-build", "Machine") - -# env_PATH - -# pip3_upgrade_pip -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade pip==19.2.3" -Wait -NoNewWindow - -# pip3_upgrade_zstandard -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade zstandard==0.11.1" -Wait -NoNewWindow - -# pip3_upgrade_certifi -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade certifi" -Wait -NoNewWindow - -# ToolToolInstall -$client.DownloadFile("https://raw.githubusercontent.com/mozilla/release-services/master/src/tooltool/client/tooltool.py", "C:\mozilla-build\tooltool.py") - -# reg_WindowsErrorReportingLocalDumps: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-Item -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Force - -# reg_WindowsErrorReportingDontShowUI: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "DontShowUI" -Value "0x00000001" -PropertyType Dword -Force - -# GenericWorkerDirectory -md "C:\generic-worker" - -# GenericWorkerDownload -$client.DownloadFile("https://github.com/taskcluster/generic-worker/releases/download/v16.5.5/generic-worker-multiuser-windows-amd64.exe", "C:\generic-worker\generic-worker.exe") - -# LiveLogDownload -$client.DownloadFile("https://github.com/taskcluster/livelog/releases/download/v1.1.0/livelog-windows-amd64.exe", "C:\generic-worker\livelog.exe") - -# TaskClusterProxyDownload -$client.DownloadFile("https://github.com/taskcluster/taskcluster-proxy/releases/download/v5.1.0/taskcluster-proxy-windows-amd64.exe", "C:\generic-worker\taskcluster-proxy.exe") - -# NSSMDownload -$client.DownloadFile("https://nssm.cc/ci/nssm-2.24-103-gdee49fc.zip", "C:\Windows\Temp\NSSMInstall.zip") - -# NSSMInstall: NSSM is required to install Generic Worker as a service. Currently ZipInstall fails, so using 7z instead. -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -oC:\ C:\Windows\Temp\NSSMInstall.zip" -Wait -NoNewWindow - -# GenericWorkerInstall -Start-Process "C:\generic-worker\generic-worker.exe" -ArgumentList "install service --nssm C:\nssm-2.24-103-gdee49fc\win64\nssm.exe --config C:\generic-worker\generic-worker.config --configure-for-%MY_CLOUD%" -Wait -NoNewWindow - -# DisableDesktopInterrupt -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/disable-desktop-interrupt.reg", "C:\generic-worker\disable-desktop-interrupt.reg") - -# SetDefaultPrinter -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/SetDefaultPrinter.ps1", "C:\generic-worker\SetDefaultPrinter.ps1") - -# GenericWorkerStateWait -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/run-generic-worker-and-reboot.bat", "C:\generic-worker\run-generic-worker.bat") - -# TaskUserInitScript: Bug 1261188 - initialisation script for new task users -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/task-user-init-win10.cmd", "C:\generic-worker\task-user-init.cmd") - -# PipConfDirectory: https://pip.pypa.io/en/stable/user_guide/#config-file -md "C:\ProgramData\pip" - -# PipConf -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/pip.conf", "C:\ProgramData\pip\pip.ini") - -# virtualenv_support -md "C:\mozilla-build\python\Lib\site-packages\virtualenv_support" - -# virtualenv_support_pywin32 -$client.DownloadFile("https://pypi.python.org/packages/cp27/p/pypiwin32/pypiwin32-219-cp27-none-win32.whl#md5=a8b0c1b608c1afeb18cd38d759ee5e29", "C:\mozilla-build\python\Lib\site-packages\virtualenv_support\pypiwin32-219-cp27-none-win32.whl") - -# virtualenv_support_pywin32_amd64 -$client.DownloadFile("https://pypi.python.org/packages/cp27/p/pypiwin32/pypiwin32-219-cp27-none-win_amd64.whl#md5=d7bafcf3cce72c3ce9fdd633a262c335", "C:\mozilla-build\python\Lib\site-packages\virtualenv_support\pypiwin32-219-cp27-none-win_amd64.whl") - -# HgShared: allows builds to use `hg robustcheckout ...` -md "y:\hg-shared" - -# HgSharedAccessRights: allows builds to use `hg robustcheckout ...` -Start-Process "icacls.exe" -ArgumentList "y:\hg-shared /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# PipCache: share pip cache across subsequent task users -md "y:\pip-cache" - -# PipCacheAccessRights: share pip cache across subsequent task users -Start-Process "icacls.exe" -ArgumentList "y:\pip-cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_PIP_DOWNLOAD_CACHE: share pip download cache between tasks -[Environment]::SetEnvironmentVariable("PIP_DOWNLOAD_CACHE", "y:\pip-cache", "Machine") - -# TooltoolCache: share tooltool cache across subsequent task users -md "y:\tooltool-cache" - -# TooltoolCacheAccessRights: share tooltool cache across subsequent task users -Start-Process "icacls.exe" -ArgumentList "y:\tooltool-cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_TOOLTOOL_CACHE: share tooltool cache between tasks -[Environment]::SetEnvironmentVariable("TOOLTOOL_CACHE", "y:\tooltool-cache", "Machine") - -# CarbonClone: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "clone --insecure https://bitbucket.org/splatteredbits/carbon C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonUpdate: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "update 2.4.0 -R C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonInstall: Bug 1316329 - support creation of symlinks by task users -Start-Process "xcopy" -ArgumentList "C:\Windows\Temp\carbon\Carbon C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Carbon /e /i /y" -Wait -NoNewWindow - -# GrantEveryoneSeCreateSymbolicLinkPrivilege: Bug 1316329 - support creation of symlinks by task users -Start-Process "powershell" -ArgumentList "-command `"& {&'Import-Module' Carbon}`"; `"& {&'Grant-Privilege' -Identity Everyone -Privilege SeCreateSymbolicLinkPrivilege}`"" -Wait -NoNewWindow - -# MozillaMaintenanceDir: Working directory for Mozilla Maintenance Service installation -md "C:\dsc\MozillaMaintenance" - -# maintenanceservice_installer -$client.DownloadFile("https://github.com/mozilla-releng/OpenCloudConfig/blob/master/userdata/Configuration/Mozilla%20Maintenance%20Service/maintenanceservice_installer.exe?raw=true", "C:\dsc\MozillaMaintenance\maintenanceservice_installer.exe") - -# maintenanceservice -$client.DownloadFile("https://github.com/mozilla-releng/OpenCloudConfig/blob/master/userdata/Configuration/Mozilla%20Maintenance%20Service/maintenanceservice.exe?raw=true", "C:\dsc\MozillaMaintenance\maintenanceservice.exe") - -# maintenanceservice_install -Start-Process "C:\dsc\MozillaMaintenance\maintenanceservice_installer.exe" -ArgumentList "/s" -Wait -NoNewWindow - -# MaintenanceServiceAcessRights: See https://bugzilla.mozilla.org/show_bug.cgi?id=1067756#c21 -Start-Process "icacls.exe" -ArgumentList "`"C:\Program Files (x86)\Mozilla Maintenance Service`" /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# MozFakeCA_cer -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mozilla%20Maintenance%20Service/MozFakeCA.cer", "C:\dsc\MozillaMaintenance\MozFakeCA.cer") - -# MozFakeCA_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozFakeCA.cer" -Wait -NoNewWindow - -# MozFakeCA_2017_10_13_cer -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mozilla%20Maintenance%20Service/MozFakeCA_2017-10-13.cer", "C:\dsc\MozillaMaintenance\MozFakeCA_2017-10-13.cer") - -# MozFakeCA_2017_10_13_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozFakeCA_2017-10-13.cer" -Wait -NoNewWindow - -# MozRoot_cer -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/certs/MozRoot.cer", "C:\dsc\MozillaMaintenance\MozRoot.cer") - -# MozRoot_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozRoot.cer" -Wait -NoNewWindow - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "name" -Value "Mozilla Corporation" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "issuer" -Value "Thawte Code Signing CA - G2" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "publisherLink" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "name" -Value "Mozilla Fake SPC" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "issuer" -Value "Mozilla Fake CA" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "publisherLink" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "name" -Value "Mozilla Corporation" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "issuer" -Value "DigiCert SHA2 Assured ID Code Signing CA" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "publisherLink" -Value "" -PropertyType String -Force - -# GrantEveryoneMozillaRegistryWriteAccess: Bug 1353889 - Grant Everyone group write access to Mozilla registry key -Start-Process "powershell" -ArgumentList "-command `"& {(Get-Acl -Path 'HKLM:\SOFTWARE\Mozilla').SetAccessRule((New-Object -TypeName 'System.Security.AccessControl.RegistryAccessRule' -ArgumentList @('Everyone', 'FullControl', 'Allow')))}`"" -Wait -NoNewWindow - -# DisableFirewall: Bug 1358301 - Disable Windows Firewall -Start-Process "netsh" -ArgumentList "advfirewall set allprofiles state off" -Wait -NoNewWindow - -# KmsIn -New-NetFirewallRule -DisplayName "KmsIn (TCP 1688 Inbound): Allow" -Direction Inbound -LocalPort 1688 -Protocol TCP -Action Allow - -# KmsOut -New-NetFirewallRule -DisplayName "KmsOut (TCP 1688 Outbound): Allow" -Direction Outbound -LocalPort 1688 -Protocol TCP -Action Allow - -# nircmd -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/nircmd/nircmd.exe", "C:\Windows\System32\nircmd.exe") - -# nircmdc -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/nircmd/nircmdc.exe", "C:\Windows\System32\nircmdc.exe") - -# reg_DisableNewAppAlert: Bug 1373551 - prevent dialog to confirm file association -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "NoNewAppAlert" -Value "1" -PropertyType Dword -Force - -# reg_NewNetworkWindowOff: https://bugzilla.mozilla.org/show_bug.cgi?id=1397201#c58 -New-Item -Path "HKLM:System\CurrentControlSet\Control\Network\NewNetworkWindowOff" -Force - -# reg_Power_PreferredPlan_HighPerformance: https://bugzilla.mozilla.org/show_bug.cgi?id=1362613 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\ControlPanel\NameSpace\{025A5937-A6BE-4686-A844-36FE4BEC8B6D}" -Name "PreferredPlan" -Value "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c" -PropertyType String -Force - -# Reg_WinDefend_DisableConfig: https://bugzilla.mozilla.org/show_bug.cgi?id=1365909 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows Defender" -Name "DisableConfig" -Value "0x00000001" -PropertyType Dword -Force - -# Reg_WinDefend_DisableAntiSpyware: https://bugzilla.mozilla.org/show_bug.cgi?id=1365909 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows Defender" -Name "DisableAntiSpyware" -Value "0x00000001" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_wscsvc: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\wscsvc" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_SecurityHealthService: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\SecurityHealthService" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_Sense: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\Sense" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdBoot: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdBoot" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdFilter: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdFilter" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdNisDrv: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdNisDrv" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdNisSvc: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdNisSvc" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WinDefend: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WinDefend" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# OpenSshDownload: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://github.com/PowerShell/Win32-OpenSSH/releases/download/v7.6.1.0p1-Beta/OpenSSH-Win64.zip", "C:\Windows\Temp\OpenSSH-Win64.zip") - -# OpenSshUnzip: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -o`"C:\Program Files`" C:\Windows\Temp\OpenSSH-Win64.zip" -Wait -NoNewWindow - -# SshIn -New-NetFirewallRule -DisplayName "SshIn (TCP 22 Inbound): Allow" -Direction Inbound -LocalPort 22 -Protocol TCP -Action Allow - -# InstallOpenSSH: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "powershell.exe" -ArgumentList "-ExecutionPolicy Bypass -File `"C:\Program Files\OpenSSH-Win64\install-sshd.ps1`"" -Wait -NoNewWindow - -# reg_OpenSSH_DefaultShell: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShell" -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force - -# reg_OpenSSH_DefaultShellCommandOption: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShellCommandOption" -Value "/c" -PropertyType String -Force - -# AdministratorSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\Users\Administrator\.ssh" - -# AdministratorSshAuthorisedKeys: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/authorized_keys", "C:\Users\Administrator\.ssh\authorized_keys") - -# ProgramDataSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\ProgramData\ssh" - -# sshd_config: https://bugzilla.mozilla.org/show_bug.cgi?id=1464343 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/sshd_config", "C:\ProgramData\ssh\sshd_config") - -# Start_sshd: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "sshd" -StartupType Automatic -Status Running - -# Start_sshagent: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "ssh-agent" -StartupType Automatic -Status Running - -# vcredist_vs2015_x86: https://bugzilla.mozilla.org/show_bug.cgi?id=1460042 -$client.DownloadFile("http://download.microsoft.com/download/f/3/9/f39b30ec-f8ef-4ba3-8cb4-e301fcf0e0aa/vc_redist.x86.exe", "C:\binaries\vc_redist.x86.exe") -Start-Process "C:\binaries\vc_redist.x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2015_x64: https://bugzilla.mozilla.org/show_bug.cgi?id=1460042 -$client.DownloadFile("http://download.microsoft.com/download/4/c/b/4cbd5757-0dd4-43a7-bac0-2a492cedbacb/vc_redist.x64.exe", "C:\binaries\vc_redist.x64.exe") -Start-Process "C:\binaries\vc_redist.x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x64-install.log" -Wait -NoNewWindow - -# WindowsPerformanceToolkit: https://bugzilla.mozilla.org/show_bug.cgi?id=1485757 -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/WindowsPerformanceToolkit/WPTx64-x86_en-us.msi", "C:\binaries\WPTx64-x86_en-us.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\WPTx64-x86_en-us.msi /quiet" -Wait -NoNewWindow - -# mozprofilerprobe: https://bugzilla.mozilla.org/show_bug.cgi?id=1485757 -$client.DownloadFile("http://hg.mozilla.org/mozilla-central/raw-file/360ab7771e27/toolkit/components/startup/mozprofilerprobe.mof", "C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\mozprofilerprobe.mof") - -# mofcomp_mozprofilerprobe: https://bugzilla.mozilla.org/show_bug.cgi?id=1485757 -Start-Process "mofcomp" -ArgumentList "`"C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\mozprofilerprobe.mof`"" -Wait -NoNewWindow - -# ProgramData_Mozilla_AccessRights: https://bugzilla.mozilla.org/show_bug.cgi?id=1494048 -Start-Process "icacls.exe" -ArgumentList "C:\ProgramData\Mozilla /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# HostsFile: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/etc/hosts", "C:\Windows\System32\drivers\etc\hosts") - -# SetHostsFileContent: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 - -# reg_WindowsUpdate_DeferUpgrade: https://bugzilla.mozilla.org/show_bug.cgi?id=1510220 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "DeferUpgrade" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_DeferUpgradePeriod: https://bugzilla.mozilla.org/show_bug.cgi?id=1510220 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "DeferUpgradePeriod" -Value "8" -PropertyType Dword -Force - -# reg_WindowsUpdate_DeferUpdatePeriod: https://bugzilla.mozilla.org/show_bug.cgi?id=1510220 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "DeferUpdatePeriod" -Value "4" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_NoAutoRebootWithLoggedOnUsers: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoRebootWithLoggedOnUsers" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_NoAutoUpdate: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoUpdate" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_AUOptions: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUOptions" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_ScheduledInstallDay: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "ScheduledInstallDay" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_ScheduledInstallTime: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "ScheduledInstallTime" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_AutomaticMaintenanceEnabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AutomaticMaintenanceEnabled" -Value "0" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_AllowMUUpdateService: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AllowMUUpdateService" -Value "0" -PropertyType Dword -Force - -# reg_ScheduleMaintenance_MaintenanceDisabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\Maintenance" -Name "MaintenanceDisabled" -Value "1" -PropertyType Dword -Force - -# env_TASKCLUSTER_ROOT_URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1551789 -[Environment]::SetEnvironmentVariable("TASKCLUSTER_ROOT_URL", "https://firefox-ci-tc.services.mozilla.com", "Machine") - -# programdata_google_auth: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -md "C:\ProgramData\Google\Auth" - -# stackdriver_key: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -cmd /c mklink "C:\ProgramData\Google\Auth\application_default_credentials.json" "C:\builds\taskcluster-worker-ec2@aws-stackdriver-log-1571127027.json" - -# now shutdown, in preparation for creating an image -# Stop-Computer isn't working, also not when specifying -AsJob, so reverting to using `shutdown` command instead -# * https://www.reddit.com/r/PowerShell/comments/65250s/windows_10_creators_update_stopcomputer_not/dgfofug/?st=j1o3oa29&sh=e0c29c6d -# * https://support.microsoft.com/en-in/help/4014551/description-of-the-security-and-quality-rollup-for-the-net-framework-4 -# * https://support.microsoft.com/en-us/help/4020459 -shutdown -s diff --git a/worker_types/gecko-t-win10-64-cu/aws_filters b/worker_types/gecko-t-win10-64-cu/aws_filters deleted file mode 100644 index 985e2cb1..00000000 --- a/worker_types/gecko-t-win10-64-cu/aws_filters +++ /dev/null @@ -1,2 +0,0 @@ -Name=platform,Values=windows -Name=name,Values=gecko-b-win2012-base-* diff --git a/worker_types/gecko-t-win10-64-cu/aws_owners b/worker_types/gecko-t-win10-64-cu/aws_owners deleted file mode 100644 index 38631e52..00000000 --- a/worker_types/gecko-t-win10-64-cu/aws_owners +++ /dev/null @@ -1,2 +0,0 @@ -self -amazon diff --git a/worker_types/gecko-t-win10-64-cu/bootstrap.ps1 b/worker_types/gecko-t-win10-64-cu/bootstrap.ps1 deleted file mode 100644 index 4140fe41..00000000 --- a/worker_types/gecko-t-win10-64-cu/bootstrap.ps1 +++ /dev/null @@ -1,476 +0,0 @@ -################################################################################### -# Note, this powershell script is an *APPROXIMATION ONLY* to the steps that are run -# to build the AMIs for aws-provisioner-v1/gecko-t-win10-64-cu. -# -# The authoratative host definition can be found at: -# -# * https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Manifest/gecko-t-win10-64-cu.json -# -################################################################################### - -# use TLS 1.2 (see bug 1443595) -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -# capture env -Get-ChildItem Env: | Out-File "C:\install_env.txt" - -# needed for making http requests -$client = New-Object system.net.WebClient -$shell = new-object -com shell.application - -# utility function to download a zip file and extract it -function Extract-ZIPFile($file, $destination, $url) -{ - $client.DownloadFile($url, $file) - $zip = $shell.NameSpace($file) - foreach($item in $zip.items()) - { - $shell.Namespace($destination).copyhere($item) - } -} - -md C:\logs -md C:\binaries - -# LogDirectory: Required by OpenCloudConfig for DSC logging -md "C:\log" - -# StackdriverLogging: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://dl.google.com/cloudagents/windows/StackdriverLogging-v1-9.exe", "C:\binaries\StackdriverLogging-v1-9.exe") -Start-Process "C:\binaries\StackdriverLogging-v1-9.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# fluentd_gw_exe: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.exe.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.exe.conf") - -# fluentd_gw_service: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.service.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.service.conf") - -# fluentd_gw_wrapper: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.wrapper.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.wrapper.conf") - -# fluentd_occ: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/occ.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\occ.conf") - -# fluentd_redact: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/redact.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\redact.conf") - -# NxLog: Maintenance Toolchain - forwards event logs to papertrail -$client.DownloadFile("https://nxlog.co/system/files/products/files/348/nxlog-ce-2.10.2150.msi", "C:\binaries\nxlog-ce-2.10.2150.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\nxlog-ce-2.10.2150.msi /quiet" -Wait -NoNewWindow - -# PaperTrailEncryptionCertificate: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/papertrail-bundle.pem", "C:\Program Files (x86)\nxlog\cert\papertrail-bundle.pem") - -# NxLogPaperTrailConfiguration: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/win10.conf", "C:\Program Files (x86)\nxlog\conf\nxlog.conf") - -# Start_nxlog: Maintenance Toolchain - not essential for building firefox -Set-Service "nxlog" -StartupType Automatic -Status Running - -# ProcessExplorer: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessExplorer" -Extract-ZIPFile -File "C:\binaries\ProcessExplorer.zip" -Destination "C:\ProcessExplorer" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessExplorer/ProcessExplorer.zip" - -# ProcessMonitor: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessMonitor" -Extract-ZIPFile -File "C:\binaries\ProcessMonitor.zip" -Destination "C:\ProcessMonitor" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessMonitor/ProcessMonitor.zip" - -# GpgForWin: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://files.gpg4win.org/gpg4win-2.3.0.exe", "C:\binaries\gpg4win-2.3.0.exe") -Start-Process "C:\binaries\gpg4win-2.3.0.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SevenZip: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://7-zip.org/a/7z1514-x64.exe", "C:\binaries\7z1514-x64.exe") -Start-Process "C:\binaries\7z1514-x64.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SublimeText3: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://download.sublimetext.com/Sublime%20Text%20Build%203114%20x64%20Setup.exe", "C:\binaries\Sublime Text Build 3114 x64 Setup.exe") -Start-Process "C:\binaries\Sublime Text Build 3114 x64 Setup.exe" -ArgumentList "/VERYSILENT /NORESTART /TASKS=`"contextentry`"" -Wait -NoNewWindow - -# SublimeText3_PackagesFolder: Maintenance Toolchain - not essential for building firefox -md "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages" - -# SublimeText3_PackageControl: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://sublime.wbond.net/Package%20Control.sublime-package", "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\Package Control.sublime-package") - -# SystemPowerShellProfile: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Microsoft.PowerShell_profile.ps1", "C:\Windows\System32\WindowsPowerShell\v1.0\Microsoft.PowerShell_profile.ps1") - -# FsutilDisable8Dot3: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disable8dot3 1" -Wait -NoNewWindow - -# FsutilDisableLastAccess: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disablelastaccess 1" -Wait -NoNewWindow - -# home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\home" "C:\Users" - -# MozillaBuildSetup: https://bugzilla.mozilla.org/show_bug.cgi?id=1461340 -$client.DownloadFile("http://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-3.2.exe", "C:\binaries\MozillaBuildSetup-3.2.exe") -Start-Process "C:\binaries\MozillaBuildSetup-3.2.exe" -ArgumentList "/S /D=C:\mozilla-build" -Wait -NoNewWindow - -# DeleteMozillaBuildPython3PythonExe -Start-Process "cmd.exe" -ArgumentList "/c del /F /Q C:\mozilla-build\python3\python.exe" -Wait -NoNewWindow - -# msys_home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\mozilla-build\msys\home" "C:\Users" - -# DeleteMozillaBuildMercurial -Start-Process "cmd.exe" -ArgumentList "/c del C:\mozilla-build\python\Scripts\hg*" -Wait -NoNewWindow - -# Mercurial: https://bugzilla.mozilla.org/show_bug.cgi?id=1490703 -$client.DownloadFile("https://www.mercurial-scm.org/release/windows/mercurial-4.7.1-x64.msi", "C:\binaries\mercurial-4.7.1-x64.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\mercurial-4.7.1-x64.msi /quiet" -Wait -NoNewWindow - -# MercurialConfig: Required by clonebundle and share hg extensions -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/mercurial.ini", "C:\Program Files\Mercurial\Mercurial.ini") - -# robustcheckout: Required by robustcheckout hg extension -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/FirefoxBuildResources/robustcheckout.py", "C:\mozilla-build\robustcheckout.py") - -# MercurialCerts -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/cacert.pem", "C:\mozilla-build\msys\etc\cacert.pem") - -# env_MOZILLABUILD: Absolutely required for mozharness builds. Python will fall in a heap, throwing misleading exceptions without this. :) -[Environment]::SetEnvironmentVariable("MOZILLABUILD", "C:\mozilla-build", "Machine") - -# env_PATH - -# pip3_upgrade_pip -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade pip==19.2.3" -Wait -NoNewWindow - -# pip3_upgrade_zstandard -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade zstandard==0.11.1" -Wait -NoNewWindow - -# pip3_upgrade_certifi -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade certifi" -Wait -NoNewWindow - -# ToolToolInstall -$client.DownloadFile("https://raw.githubusercontent.com/mozilla/release-services/master/src/tooltool/client/tooltool.py", "C:\mozilla-build\tooltool.py") - -# reg_WindowsErrorReportingLocalDumps: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-Item -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Force - -# reg_WindowsErrorReportingDontShowUI: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "DontShowUI" -Value "0x00000001" -PropertyType Dword -Force - -# GenericWorkerDirectory -md "C:\generic-worker" - -# GenericWorkerDownload -$client.DownloadFile("https://github.com/taskcluster/generic-worker/releases/download/v16.5.5/generic-worker-multiuser-windows-amd64.exe", "C:\generic-worker\generic-worker.exe") - -# LiveLogDownload -$client.DownloadFile("https://github.com/taskcluster/livelog/releases/download/v1.1.0/livelog-windows-amd64.exe", "C:\generic-worker\livelog.exe") - -# TaskClusterProxyDownload -$client.DownloadFile("https://github.com/taskcluster/taskcluster-proxy/releases/download/v5.1.0/taskcluster-proxy-windows-amd64.exe", "C:\generic-worker\taskcluster-proxy.exe") - -# NSSMDownload -$client.DownloadFile("https://nssm.cc/ci/nssm-2.24-103-gdee49fc.zip", "C:\Windows\Temp\NSSMInstall.zip") - -# NSSMInstall: NSSM is required to install Generic Worker as a service. Currently ZipInstall fails, so using 7z instead. -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -oC:\ C:\Windows\Temp\NSSMInstall.zip" -Wait -NoNewWindow - -# GenericWorkerInstall -Start-Process "C:\generic-worker\generic-worker.exe" -ArgumentList "install service --nssm C:\nssm-2.24-103-gdee49fc\win64\nssm.exe --config C:\generic-worker\generic-worker.config --configure-for-%MY_CLOUD%" -Wait -NoNewWindow - -# DisableDesktopInterrupt -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/disable-desktop-interrupt.reg", "C:\generic-worker\disable-desktop-interrupt.reg") - -# SetDefaultPrinter -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/SetDefaultPrinter.ps1", "C:\generic-worker\SetDefaultPrinter.ps1") - -# GenericWorkerStateWait -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/run-generic-worker-and-reboot.bat", "C:\generic-worker\run-generic-worker.bat") - -# TaskUserInitScript: Bug 1261188 - initialisation script for new task users -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/task-user-init-win10.cmd", "C:\generic-worker\task-user-init.cmd") - -# PipConfDirectory: https://pip.pypa.io/en/stable/user_guide/#config-file -md "C:\ProgramData\pip" - -# PipConf -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/pip.conf", "C:\ProgramData\pip\pip.ini") - -# virtualenv_support -md "C:\mozilla-build\python\Lib\site-packages\virtualenv_support" - -# virtualenv_support_pywin32 -$client.DownloadFile("https://pypi.python.org/packages/cp27/p/pypiwin32/pypiwin32-219-cp27-none-win32.whl#md5=a8b0c1b608c1afeb18cd38d759ee5e29", "C:\mozilla-build\python\Lib\site-packages\virtualenv_support\pypiwin32-219-cp27-none-win32.whl") - -# virtualenv_support_pywin32_amd64 -$client.DownloadFile("https://pypi.python.org/packages/cp27/p/pypiwin32/pypiwin32-219-cp27-none-win_amd64.whl#md5=d7bafcf3cce72c3ce9fdd633a262c335", "C:\mozilla-build\python\Lib\site-packages\virtualenv_support\pypiwin32-219-cp27-none-win_amd64.whl") - -# HgShared: allows builds to use `hg robustcheckout ...` -md "y:\hg-shared" - -# HgSharedAccessRights: allows builds to use `hg robustcheckout ...` -Start-Process "icacls.exe" -ArgumentList "y:\hg-shared /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# PipCache: share pip cache across subsequent task users -md "y:\pip-cache" - -# PipCacheAccessRights: share pip cache across subsequent task users -Start-Process "icacls.exe" -ArgumentList "y:\pip-cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_PIP_DOWNLOAD_CACHE: share pip download cache between tasks -[Environment]::SetEnvironmentVariable("PIP_DOWNLOAD_CACHE", "y:\pip-cache", "Machine") - -# TooltoolCache: share tooltool cache across subsequent task users -md "y:\tooltool-cache" - -# TooltoolCacheAccessRights: share tooltool cache across subsequent task users -Start-Process "icacls.exe" -ArgumentList "y:\tooltool-cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_TOOLTOOL_CACHE: share tooltool cache between tasks -[Environment]::SetEnvironmentVariable("TOOLTOOL_CACHE", "y:\tooltool-cache", "Machine") - -# CarbonClone: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "clone --insecure https://bitbucket.org/splatteredbits/carbon C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonUpdate: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "update 2.4.0 -R C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonInstall: Bug 1316329 - support creation of symlinks by task users -Start-Process "xcopy" -ArgumentList "C:\Windows\Temp\carbon\Carbon C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Carbon /e /i /y" -Wait -NoNewWindow - -# GrantEveryoneSeCreateSymbolicLinkPrivilege: Bug 1316329 - support creation of symlinks by task users -Start-Process "powershell" -ArgumentList "-command `"& {&'Import-Module' Carbon}`"; `"& {&'Grant-Privilege' -Identity Everyone -Privilege SeCreateSymbolicLinkPrivilege}`"" -Wait -NoNewWindow - -# MozillaMaintenanceDir: Working directory for Mozilla Maintenance Service installation -md "C:\dsc\MozillaMaintenance" - -# maintenanceservice_installer -$client.DownloadFile("https://github.com/mozilla-releng/OpenCloudConfig/blob/master/userdata/Configuration/Mozilla%20Maintenance%20Service/maintenanceservice_installer.exe?raw=true", "C:\dsc\MozillaMaintenance\maintenanceservice_installer.exe") - -# maintenanceservice -$client.DownloadFile("https://github.com/mozilla-releng/OpenCloudConfig/blob/master/userdata/Configuration/Mozilla%20Maintenance%20Service/maintenanceservice.exe?raw=true", "C:\dsc\MozillaMaintenance\maintenanceservice.exe") - -# maintenanceservice_install -Start-Process "C:\dsc\MozillaMaintenance\maintenanceservice_installer.exe" -ArgumentList "/s" -Wait -NoNewWindow - -# MaintenanceServiceAcessRights: See https://bugzilla.mozilla.org/show_bug.cgi?id=1067756#c21 -Start-Process "icacls.exe" -ArgumentList "`"C:\Program Files (x86)\Mozilla Maintenance Service`" /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# MozFakeCA_cer -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mozilla%20Maintenance%20Service/MozFakeCA.cer", "C:\dsc\MozillaMaintenance\MozFakeCA.cer") - -# MozFakeCA_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozFakeCA.cer" -Wait -NoNewWindow - -# MozFakeCA_2017_10_13_cer -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mozilla%20Maintenance%20Service/MozFakeCA_2017-10-13.cer", "C:\dsc\MozillaMaintenance\MozFakeCA_2017-10-13.cer") - -# MozFakeCA_2017_10_13_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozFakeCA_2017-10-13.cer" -Wait -NoNewWindow - -# MozRoot_cer -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/certs/MozRoot.cer", "C:\dsc\MozillaMaintenance\MozRoot.cer") - -# MozRoot_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozRoot.cer" -Wait -NoNewWindow - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "name" -Value "Mozilla Corporation" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "issuer" -Value "Thawte Code Signing CA - G2" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "publisherLink" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "name" -Value "Mozilla Fake SPC" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "issuer" -Value "Mozilla Fake CA" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "publisherLink" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "name" -Value "Mozilla Corporation" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "issuer" -Value "DigiCert SHA2 Assured ID Code Signing CA" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "publisherLink" -Value "" -PropertyType String -Force - -# GrantEveryoneMozillaRegistryWriteAccess: Bug 1353889 - Grant Everyone group write access to Mozilla registry key -Start-Process "powershell" -ArgumentList "-command `"& {(Get-Acl -Path 'HKLM:\SOFTWARE\Mozilla').SetAccessRule((New-Object -TypeName 'System.Security.AccessControl.RegistryAccessRule' -ArgumentList @('Everyone', 'FullControl', 'Allow')))}`"" -Wait -NoNewWindow - -# DisableFirewall: Bug 1358301 - Disable Windows Firewall -Start-Process "netsh" -ArgumentList "advfirewall set allprofiles state off" -Wait -NoNewWindow - -# KmsIn -New-NetFirewallRule -DisplayName "KmsIn (TCP 1688 Inbound): Allow" -Direction Inbound -LocalPort 1688 -Protocol TCP -Action Allow - -# KmsOut -New-NetFirewallRule -DisplayName "KmsOut (TCP 1688 Outbound): Allow" -Direction Outbound -LocalPort 1688 -Protocol TCP -Action Allow - -# nircmd -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/nircmd/nircmd.exe", "C:\Windows\System32\nircmd.exe") - -# nircmdc -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/nircmd/nircmdc.exe", "C:\Windows\System32\nircmdc.exe") - -# reg_DisableNewAppAlert: Bug 1373551 - prevent dialog to confirm file association -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "NoNewAppAlert" -Value "1" -PropertyType Dword -Force - -# reg_NewNetworkWindowOff: https://bugzilla.mozilla.org/show_bug.cgi?id=1397201#c58 -New-Item -Path "HKLM:System\CurrentControlSet\Control\Network\NewNetworkWindowOff" -Force - -# reg_Power_PreferredPlan_HighPerformance: https://bugzilla.mozilla.org/show_bug.cgi?id=1362613 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\ControlPanel\NameSpace\{025A5937-A6BE-4686-A844-36FE4BEC8B6D}" -Name "PreferredPlan" -Value "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c" -PropertyType String -Force - -# Reg_WinDefend_DisableConfig: https://bugzilla.mozilla.org/show_bug.cgi?id=1365909 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows Defender" -Name "DisableConfig" -Value "0x00000001" -PropertyType Dword -Force - -# Reg_WinDefend_DisableAntiSpyware: https://bugzilla.mozilla.org/show_bug.cgi?id=1365909 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows Defender" -Name "DisableAntiSpyware" -Value "0x00000001" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_wscsvc: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\wscsvc" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_SecurityHealthService: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\SecurityHealthService" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_Sense: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\Sense" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdBoot: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdBoot" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdFilter: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdFilter" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdNisDrv: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdNisDrv" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdNisSvc: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdNisSvc" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WinDefend: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WinDefend" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# OpenSshDownload: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://github.com/PowerShell/Win32-OpenSSH/releases/download/v7.6.1.0p1-Beta/OpenSSH-Win64.zip", "C:\Windows\Temp\OpenSSH-Win64.zip") - -# OpenSshUnzip: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -o`"C:\Program Files`" C:\Windows\Temp\OpenSSH-Win64.zip" -Wait -NoNewWindow - -# SshIn -New-NetFirewallRule -DisplayName "SshIn (TCP 22 Inbound): Allow" -Direction Inbound -LocalPort 22 -Protocol TCP -Action Allow - -# InstallOpenSSH: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "powershell.exe" -ArgumentList "-ExecutionPolicy Bypass -File `"C:\Program Files\OpenSSH-Win64\install-sshd.ps1`"" -Wait -NoNewWindow - -# reg_OpenSSH_DefaultShell: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShell" -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force - -# reg_OpenSSH_DefaultShellCommandOption: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShellCommandOption" -Value "/c" -PropertyType String -Force - -# AdministratorSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\Users\Administrator\.ssh" - -# AdministratorSshAuthorisedKeys: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/authorized_keys", "C:\Users\Administrator\.ssh\authorized_keys") - -# ProgramDataSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\ProgramData\ssh" - -# sshd_config: https://bugzilla.mozilla.org/show_bug.cgi?id=1464343 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/sshd_config", "C:\ProgramData\ssh\sshd_config") - -# Start_sshd: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "sshd" -StartupType Automatic -Status Running - -# Start_sshagent: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "ssh-agent" -StartupType Automatic -Status Running - -# vcredist_vs2015_x86: https://bugzilla.mozilla.org/show_bug.cgi?id=1460042 -$client.DownloadFile("http://download.microsoft.com/download/f/3/9/f39b30ec-f8ef-4ba3-8cb4-e301fcf0e0aa/vc_redist.x86.exe", "C:\binaries\vc_redist.x86.exe") -Start-Process "C:\binaries\vc_redist.x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2015_x64: https://bugzilla.mozilla.org/show_bug.cgi?id=1460042 -$client.DownloadFile("http://download.microsoft.com/download/4/c/b/4cbd5757-0dd4-43a7-bac0-2a492cedbacb/vc_redist.x64.exe", "C:\binaries\vc_redist.x64.exe") -Start-Process "C:\binaries\vc_redist.x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x64-install.log" -Wait -NoNewWindow - -# WindowsPerformanceToolkit: https://bugzilla.mozilla.org/show_bug.cgi?id=1485757 -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/WindowsPerformanceToolkit/WPTx64-x86_en-us.msi", "C:\binaries\WPTx64-x86_en-us.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\WPTx64-x86_en-us.msi /quiet" -Wait -NoNewWindow - -# mozprofilerprobe: https://bugzilla.mozilla.org/show_bug.cgi?id=1485757 -$client.DownloadFile("http://hg.mozilla.org/mozilla-central/raw-file/360ab7771e27/toolkit/components/startup/mozprofilerprobe.mof", "C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\mozprofilerprobe.mof") - -# mofcomp_mozprofilerprobe: https://bugzilla.mozilla.org/show_bug.cgi?id=1485757 -Start-Process "mofcomp" -ArgumentList "`"C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\mozprofilerprobe.mof`"" -Wait -NoNewWindow - -# ProgramData_Mozilla_AccessRights: https://bugzilla.mozilla.org/show_bug.cgi?id=1494048 -Start-Process "icacls.exe" -ArgumentList "C:\ProgramData\Mozilla /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# HostsFile: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/etc/hosts", "C:\Windows\System32\drivers\etc\hosts") - -# SetHostsFileContent: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 - -# reg_WindowsUpdate_DeferUpgrade: https://bugzilla.mozilla.org/show_bug.cgi?id=1510220 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "DeferUpgrade" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_DeferUpgradePeriod: https://bugzilla.mozilla.org/show_bug.cgi?id=1510220 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "DeferUpgradePeriod" -Value "8" -PropertyType Dword -Force - -# reg_WindowsUpdate_DeferUpdatePeriod: https://bugzilla.mozilla.org/show_bug.cgi?id=1510220 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "DeferUpdatePeriod" -Value "4" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_NoAutoRebootWithLoggedOnUsers: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoRebootWithLoggedOnUsers" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_NoAutoUpdate: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoUpdate" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_AUOptions: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUOptions" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_ScheduledInstallDay: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "ScheduledInstallDay" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_ScheduledInstallTime: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "ScheduledInstallTime" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_AutomaticMaintenanceEnabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AutomaticMaintenanceEnabled" -Value "0" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_AllowMUUpdateService: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AllowMUUpdateService" -Value "0" -PropertyType Dword -Force - -# reg_ScheduleMaintenance_MaintenanceDisabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\Maintenance" -Name "MaintenanceDisabled" -Value "1" -PropertyType Dword -Force - -# env_TASKCLUSTER_ROOT_URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1551789 -[Environment]::SetEnvironmentVariable("TASKCLUSTER_ROOT_URL", "https://firefox-ci-tc.services.mozilla.com", "Machine") - -# programdata_google_auth: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -md "C:\ProgramData\Google\Auth" - -# stackdriver_key: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -cmd /c mklink "C:\ProgramData\Google\Auth\application_default_credentials.json" "C:\builds\taskcluster-worker-ec2@aws-stackdriver-log-1571127027.json" - -# now shutdown, in preparation for creating an image -# Stop-Computer isn't working, also not when specifying -AsJob, so reverting to using `shutdown` command instead -# * https://www.reddit.com/r/PowerShell/comments/65250s/windows_10_creators_update_stopcomputer_not/dgfofug/?st=j1o3oa29&sh=e0c29c6d -# * https://support.microsoft.com/en-in/help/4014551/description-of-the-security-and-quality-rollup-for-the-net-framework-4 -# * https://support.microsoft.com/en-us/help/4020459 -shutdown -s diff --git a/worker_types/gecko-t-win10-64-gpu-a/bootstrap.ps1 b/worker_types/gecko-t-win10-64-gpu-a/bootstrap.ps1 deleted file mode 100644 index 54c35dac..00000000 --- a/worker_types/gecko-t-win10-64-gpu-a/bootstrap.ps1 +++ /dev/null @@ -1,450 +0,0 @@ -################################################################################### -# Note, this powershell script is an *APPROXIMATION ONLY* to the steps that are run -# to build the AMIs for aws-provisioner-v1/gecko-t-win10-64-gpu-a. -# -# The authoratative host definition can be found at: -# -# * https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Manifest/gecko-t-win10-64-gpu-a.json -# -################################################################################### - -# use TLS 1.2 (see bug 1443595) -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -# capture env -Get-ChildItem Env: | Out-File "C:\install_env.txt" - -# needed for making http requests -$client = New-Object system.net.WebClient -$shell = new-object -com shell.application - -# utility function to download a zip file and extract it -function Extract-ZIPFile($file, $destination, $url) -{ - $client.DownloadFile($url, $file) - $zip = $shell.NameSpace($file) - foreach($item in $zip.items()) - { - $shell.Namespace($destination).copyhere($item) - } -} - -md C:\logs -md C:\binaries - -# LogDirectory: Required by OpenCloudConfig for DSC logging -md "C:\log" - -# StackdriverLogging: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://dl.google.com/cloudagents/windows/StackdriverLogging-v1-9.exe", "C:\binaries\StackdriverLogging-v1-9.exe") -Start-Process "C:\binaries\StackdriverLogging-v1-9.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# fluentd_gw_exe: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.exe.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.exe.conf") - -# fluentd_gw_service: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.service.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.service.conf") - -# fluentd_gw_wrapper: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.wrapper.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.wrapper.conf") - -# fluentd_occ: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/occ.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\occ.conf") - -# fluentd_redact: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/redact.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\redact.conf") - -# NxLog: Maintenance Toolchain - forwards event logs to papertrail -$client.DownloadFile("https://nxlog.co/system/files/products/files/348/nxlog-ce-2.10.2150.msi", "C:\binaries\nxlog-ce-2.10.2150.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\nxlog-ce-2.10.2150.msi /quiet" -Wait -NoNewWindow - -# PaperTrailEncryptionCertificate: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/papertrail-bundle.pem", "C:\Program Files (x86)\nxlog\cert\papertrail-bundle.pem") - -# NxLogPaperTrailConfiguration: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/win10.conf", "C:\Program Files (x86)\nxlog\conf\nxlog.conf") - -# Start_nxlog: Maintenance Toolchain - not essential for building firefox -Set-Service "nxlog" -StartupType Automatic -Status Running - -# ProcessExplorer: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessExplorer" -Extract-ZIPFile -File "C:\binaries\ProcessExplorer.zip" -Destination "C:\ProcessExplorer" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessExplorer/ProcessExplorer.zip" - -# ProcessMonitor: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessMonitor" -Extract-ZIPFile -File "C:\binaries\ProcessMonitor.zip" -Destination "C:\ProcessMonitor" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessMonitor/ProcessMonitor.zip" - -# GpgForWin: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://files.gpg4win.org/gpg4win-2.3.0.exe", "C:\binaries\gpg4win-2.3.0.exe") -Start-Process "C:\binaries\gpg4win-2.3.0.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SevenZip: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://7-zip.org/a/7z1514-x64.exe", "C:\binaries\7z1514-x64.exe") -Start-Process "C:\binaries\7z1514-x64.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SublimeText3: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://download.sublimetext.com/Sublime%20Text%20Build%203114%20x64%20Setup.exe", "C:\binaries\Sublime Text Build 3114 x64 Setup.exe") -Start-Process "C:\binaries\Sublime Text Build 3114 x64 Setup.exe" -ArgumentList "/VERYSILENT /NORESTART /TASKS=`"contextentry`"" -Wait -NoNewWindow - -# SublimeText3_PackagesFolder: Maintenance Toolchain - not essential for building firefox -md "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages" - -# SublimeText3_PackageControl: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://sublime.wbond.net/Package%20Control.sublime-package", "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\Package Control.sublime-package") - -# SystemPowerShellProfile: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Microsoft.PowerShell_profile.ps1", "C:\Windows\System32\WindowsPowerShell\v1.0\Microsoft.PowerShell_profile.ps1") - -# FsutilDisable8Dot3: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disable8dot3 1" -Wait -NoNewWindow - -# FsutilDisableLastAccess: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disablelastaccess 1" -Wait -NoNewWindow - -# home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\home" "C:\Users" - -# MozillaBuildSetup: https://bugzilla.mozilla.org/show_bug.cgi?id=1461340 -$client.DownloadFile("http://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-3.2.exe", "C:\binaries\MozillaBuildSetup-3.2.exe") -Start-Process "C:\binaries\MozillaBuildSetup-3.2.exe" -ArgumentList "/S /D=C:\mozilla-build" -Wait -NoNewWindow - -# DeleteMozillaBuildPython3PythonExe -Start-Process "cmd.exe" -ArgumentList "/c del /F /Q C:\mozilla-build\python3\python.exe" -Wait -NoNewWindow - -# msys_home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\mozilla-build\msys\home" "C:\Users" - -# DeleteMozillaBuildMercurial -Start-Process "cmd.exe" -ArgumentList "/c del C:\mozilla-build\python\Scripts\hg*" -Wait -NoNewWindow - -# Mercurial: https://bugzilla.mozilla.org/show_bug.cgi?id=1490703 -$client.DownloadFile("https://www.mercurial-scm.org/release/windows/mercurial-4.7.1-x64.msi", "C:\binaries\mercurial-4.7.1-x64.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\mercurial-4.7.1-x64.msi /quiet" -Wait -NoNewWindow - -# MercurialConfig: Required by clonebundle and share hg extensions -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/mercurial.ini", "C:\Program Files\Mercurial\Mercurial.ini") - -# robustcheckout: Required by robustcheckout hg extension -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/FirefoxBuildResources/robustcheckout.py", "C:\mozilla-build\robustcheckout.py") - -# MercurialCerts -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/cacert.pem", "C:\mozilla-build\msys\etc\cacert.pem") - -# env_MOZILLABUILD: Absolutely required for mozharness builds. Python will fall in a heap, throwing misleading exceptions without this. :) -[Environment]::SetEnvironmentVariable("MOZILLABUILD", "C:\mozilla-build", "Machine") - -# env_PATH - -# pip3_upgrade_pip -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade pip==19.2.3" -Wait -NoNewWindow - -# pip3_upgrade_zstandard -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade zstandard==0.11.1" -Wait -NoNewWindow - -# pip3_upgrade_certifi -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade certifi" -Wait -NoNewWindow - -# ToolToolInstall -$client.DownloadFile("https://raw.githubusercontent.com/mozilla/release-services/master/src/tooltool/client/tooltool.py", "C:\mozilla-build\tooltool.py") - -# reg_WindowsErrorReportingLocalDumps: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-Item -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Force - -# reg_WindowsErrorReportingDontShowUI: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "DontShowUI" -Value "0x00000001" -PropertyType Dword -Force - -# GenericWorkerDirectory -md "C:\generic-worker" - -# GenericWorkerDownload -$client.DownloadFile("https://github.com/taskcluster/generic-worker/releases/download/v14.1.0/generic-worker-nativeEngine-windows-amd64.exe", "C:\generic-worker\generic-worker.exe") - -# LiveLogDownload -$client.DownloadFile("https://github.com/taskcluster/livelog/releases/download/v1.1.0/livelog-windows-amd64.exe", "C:\generic-worker\livelog.exe") - -# TaskClusterProxyDownload -$client.DownloadFile("https://github.com/taskcluster/taskcluster-proxy/releases/download/v5.1.0/taskcluster-proxy-windows-amd64.exe", "C:\generic-worker\taskcluster-proxy.exe") - -# NSSMDownload -$client.DownloadFile("https://nssm.cc/ci/nssm-2.24-103-gdee49fc.zip", "C:\Windows\Temp\NSSMInstall.zip") - -# NSSMInstall: NSSM is required to install Generic Worker as a service. Currently ZipInstall fails, so using 7z instead. -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -oC:\ C:\Windows\Temp\NSSMInstall.zip" -Wait -NoNewWindow - -# GenericWorkerInstall -Start-Process "C:\generic-worker\generic-worker.exe" -ArgumentList "install service --nssm C:\nssm-2.24-103-gdee49fc\win64\nssm.exe --config C:\generic-worker\generic-worker.config --configure-for-%MY_CLOUD%" -Wait -NoNewWindow - -# DisableDesktopInterrupt -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/disable-desktop-interrupt.reg", "C:\generic-worker\disable-desktop-interrupt.reg") - -# SetDefaultPrinter -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/SetDefaultPrinter.ps1", "C:\generic-worker\SetDefaultPrinter.ps1") - -# GenericWorkerStateWait -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/run-generic-worker-and-reboot.bat", "C:\generic-worker\run-generic-worker.bat") - -# TaskUserInitScript: Bug 1261188 - initialisation script for new task users -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/task-user-init-win10.cmd", "C:\generic-worker\task-user-init.cmd") - -# PipConfDirectory: https://pip.pypa.io/en/stable/user_guide/#config-file -md "C:\ProgramData\pip" - -# PipConf -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/pip.conf", "C:\ProgramData\pip\pip.ini") - -# virtualenv_support -md "C:\mozilla-build\python\Lib\site-packages\virtualenv_support" - -# virtualenv_support_pywin32 -$client.DownloadFile("https://pypi.python.org/packages/cp27/p/pypiwin32/pypiwin32-219-cp27-none-win32.whl#md5=a8b0c1b608c1afeb18cd38d759ee5e29", "C:\mozilla-build\python\Lib\site-packages\virtualenv_support\pypiwin32-219-cp27-none-win32.whl") - -# virtualenv_support_pywin32_amd64 -$client.DownloadFile("https://pypi.python.org/packages/cp27/p/pypiwin32/pypiwin32-219-cp27-none-win_amd64.whl#md5=d7bafcf3cce72c3ce9fdd633a262c335", "C:\mozilla-build\python\Lib\site-packages\virtualenv_support\pypiwin32-219-cp27-none-win_amd64.whl") - -# HgShared: allows builds to use `hg robustcheckout ...` -md "y:\hg-shared" - -# HgSharedAccessRights: allows builds to use `hg robustcheckout ...` -Start-Process "icacls.exe" -ArgumentList "y:\hg-shared /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# PipCache: share pip cache across subsequent task users -md "y:\pip-cache" - -# PipCacheAccessRights: share pip cache across subsequent task users -Start-Process "icacls.exe" -ArgumentList "y:\pip-cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_PIP_DOWNLOAD_CACHE: share pip download cache between tasks -[Environment]::SetEnvironmentVariable("PIP_DOWNLOAD_CACHE", "y:\pip-cache", "Machine") - -# TooltoolCache: share tooltool cache across subsequent task users -md "y:\tooltool-cache" - -# TooltoolCacheAccessRights: share tooltool cache across subsequent task users -Start-Process "icacls.exe" -ArgumentList "y:\tooltool-cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_TOOLTOOL_CACHE: share tooltool cache between tasks -[Environment]::SetEnvironmentVariable("TOOLTOOL_CACHE", "y:\tooltool-cache", "Machine") - -# CarbonClone: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "clone --insecure https://bitbucket.org/splatteredbits/carbon C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonUpdate: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "update 2.4.0 -R C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonInstall: Bug 1316329 - support creation of symlinks by task users -Start-Process "xcopy" -ArgumentList "C:\Windows\Temp\carbon\Carbon C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Carbon /e /i /y" -Wait -NoNewWindow - -# GrantEveryoneSeCreateSymbolicLinkPrivilege: Bug 1316329 - support creation of symlinks by task users -Start-Process "powershell" -ArgumentList "-command `"& {&'Import-Module' Carbon}`"; `"& {&'Grant-Privilege' -Identity Everyone -Privilege SeCreateSymbolicLinkPrivilege}`"" -Wait -NoNewWindow - -# MozillaMaintenanceDir: Working directory for Mozilla Maintenance Service installation -md "C:\dsc\MozillaMaintenance" - -# maintenanceservice_installer -$client.DownloadFile("https://github.com/mozilla-releng/OpenCloudConfig/blob/master/userdata/Configuration/Mozilla%20Maintenance%20Service/maintenanceservice_installer.exe?raw=true", "C:\dsc\MozillaMaintenance\maintenanceservice_installer.exe") - -# maintenanceservice -$client.DownloadFile("https://github.com/mozilla-releng/OpenCloudConfig/blob/master/userdata/Configuration/Mozilla%20Maintenance%20Service/maintenanceservice.exe?raw=true", "C:\dsc\MozillaMaintenance\maintenanceservice.exe") - -# maintenanceservice_install -Start-Process "C:\dsc\MozillaMaintenance\maintenanceservice_installer.exe" -ArgumentList "/s" -Wait -NoNewWindow - -# MaintenanceServiceAcessRights: See https://bugzilla.mozilla.org/show_bug.cgi?id=1067756#c21 -Start-Process "icacls.exe" -ArgumentList "`"C:\Program Files (x86)\Mozilla Maintenance Service`" /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# MozFakeCA_cer -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mozilla%20Maintenance%20Service/MozFakeCA.cer", "C:\dsc\MozillaMaintenance\MozFakeCA.cer") - -# MozFakeCA_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozFakeCA.cer" -Wait -NoNewWindow - -# MozFakeCA_2017_10_13_cer -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mozilla%20Maintenance%20Service/MozFakeCA_2017-10-13.cer", "C:\dsc\MozillaMaintenance\MozFakeCA_2017-10-13.cer") - -# MozFakeCA_2017_10_13_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozFakeCA_2017-10-13.cer" -Wait -NoNewWindow - -# MozRoot_cer -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/certs/MozRoot.cer", "C:\dsc\MozillaMaintenance\MozRoot.cer") - -# MozRoot_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozRoot.cer" -Wait -NoNewWindow - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "name" -Value "Mozilla Corporation" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "issuer" -Value "Thawte Code Signing CA - G2" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "publisherLink" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "name" -Value "Mozilla Fake SPC" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "issuer" -Value "Mozilla Fake CA" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "publisherLink" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "name" -Value "Mozilla Corporation" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "issuer" -Value "DigiCert SHA2 Assured ID Code Signing CA" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "publisherLink" -Value "" -PropertyType String -Force - -# GrantEveryoneMozillaRegistryWriteAccess: Bug 1353889 - Grant Everyone group write access to Mozilla registry key -Start-Process "powershell" -ArgumentList "-command `"& {(Get-Acl -Path 'HKLM:\SOFTWARE\Mozilla').SetAccessRule((New-Object -TypeName 'System.Security.AccessControl.RegistryAccessRule' -ArgumentList @('Everyone', 'FullControl', 'Allow')))}`"" -Wait -NoNewWindow - -# KmsIn -New-NetFirewallRule -DisplayName "KmsIn (TCP 1688 Inbound): Allow" -Direction Inbound -LocalPort 1688 -Protocol TCP -Action Allow - -# KmsOut -New-NetFirewallRule -DisplayName "KmsOut (TCP 1688 Outbound): Allow" -Direction Outbound -LocalPort 1688 -Protocol TCP -Action Allow - -# DisableFirewall: Bug 1358301 - Disable Windows Firewall -Start-Process "netsh" -ArgumentList "advfirewall set allprofiles state off" -Wait -NoNewWindow - -# nircmd -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/nircmd/nircmd.exe", "C:\Windows\System32\nircmd.exe") - -# nircmdc -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/nircmd/nircmdc.exe", "C:\Windows\System32\nircmdc.exe") - -# UltraVNC: VNC Server - not essential for building firefox -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/UltraVnc/UltraVnc_10962_x64.msi", "C:\binaries\UltraVnc_10962_x64.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\UltraVnc_10962_x64.msi /quiet" -Wait -NoNewWindow - -# Vnc_In -New-NetFirewallRule -DisplayName "Vnc_In (TCP 5900 Inbound): Allow" -Direction Inbound -LocalPort 5900 -Protocol TCP -Action Allow - -# reg_DisableNewAppAlert: Bug 1373551 - prevent dialog to confirm file association -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "NoNewAppAlert" -Value "1" -PropertyType Dword -Force - -# reg_NewNetworkWindowOff: https://bugzilla.mozilla.org/show_bug.cgi?id=1397201#c58 -New-Item -Path "HKLM:System\CurrentControlSet\Control\Network\NewNetworkWindowOff" -Force - -# reg_Power_PreferredPlan_HighPerformance: https://bugzilla.mozilla.org/show_bug.cgi?id=1362613 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\ControlPanel\NameSpace\{025A5937-A6BE-4686-A844-36FE4BEC8B6D}" -Name "PreferredPlan" -Value "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c" -PropertyType String -Force - -# Reg_WinDefend_DisableConfig: https://bugzilla.mozilla.org/show_bug.cgi?id=1365909 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows Defender" -Name "DisableConfig" -Value "0x00000001" -PropertyType Dword -Force - -# Reg_WinDefend_DisableAntiSpyware: https://bugzilla.mozilla.org/show_bug.cgi?id=1365909 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows Defender" -Name "DisableAntiSpyware" -Value "0x00000001" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_wscsvc: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\wscsvc" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_SecurityHealthService: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\SecurityHealthService" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_Sense: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\Sense" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdBoot: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdBoot" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdFilter: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdFilter" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdNisDrv: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdNisDrv" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdNisSvc: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdNisSvc" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WinDefend: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WinDefend" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# OpenSshDownload: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://github.com/PowerShell/Win32-OpenSSH/releases/download/v7.6.1.0p1-Beta/OpenSSH-Win64.zip", "C:\Windows\Temp\OpenSSH-Win64.zip") - -# OpenSshUnzip: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -o`"C:\Program Files`" C:\Windows\Temp\OpenSSH-Win64.zip" -Wait -NoNewWindow - -# SshIn -New-NetFirewallRule -DisplayName "SshIn (TCP 22 Inbound): Allow" -Direction Inbound -LocalPort 22 -Protocol TCP -Action Allow - -# InstallOpenSSH: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "powershell.exe" -ArgumentList "-ExecutionPolicy Bypass -File `"C:\Program Files\OpenSSH-Win64\install-sshd.ps1`"" -Wait -NoNewWindow - -# reg_OpenSSH_DefaultShell: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShell" -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force - -# reg_OpenSSH_DefaultShellCommandOption: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShellCommandOption" -Value "/c" -PropertyType String -Force - -# AdministratorSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\Users\Administrator\.ssh" - -# AdministratorSshAuthorisedKeys: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/authorized_keys", "C:\Users\Administrator\.ssh\authorized_keys") - -# ProgramDataSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\ProgramData\ssh" - -# sshd_config: https://bugzilla.mozilla.org/show_bug.cgi?id=1464343 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/sshd_config", "C:\ProgramData\ssh\sshd_config") - -# Start_sshd: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "sshd" -StartupType Automatic -Status Running - -# Start_sshagent: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "ssh-agent" -StartupType Automatic -Status Running - -# vcredist_vs2015_x86: https://bugzilla.mozilla.org/show_bug.cgi?id=1460042 -$client.DownloadFile("http://download.microsoft.com/download/f/3/9/f39b30ec-f8ef-4ba3-8cb4-e301fcf0e0aa/vc_redist.x86.exe", "C:\binaries\vc_redist.x86.exe") -Start-Process "C:\binaries\vc_redist.x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2015_x64: https://bugzilla.mozilla.org/show_bug.cgi?id=1460042 -$client.DownloadFile("http://download.microsoft.com/download/4/c/b/4cbd5757-0dd4-43a7-bac0-2a492cedbacb/vc_redist.x64.exe", "C:\binaries\vc_redist.x64.exe") -Start-Process "C:\binaries\vc_redist.x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x64-install.log" -Wait -NoNewWindow - -# WindowsPerformanceToolkit: https://bugzilla.mozilla.org/show_bug.cgi?id=1485757 -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/WindowsPerformanceToolkit/WPTx64-x86_en-us.msi", "C:\binaries\WPTx64-x86_en-us.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\WPTx64-x86_en-us.msi /quiet" -Wait -NoNewWindow - -# mozprofilerprobe: https://bugzilla.mozilla.org/show_bug.cgi?id=1485757 -$client.DownloadFile("http://hg.mozilla.org/mozilla-central/raw-file/360ab7771e27/toolkit/components/startup/mozprofilerprobe.mof", "C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\mozprofilerprobe.mof") - -# mofcomp_mozprofilerprobe: https://bugzilla.mozilla.org/show_bug.cgi?id=1485757 -Start-Process "mofcomp" -ArgumentList "`"C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\mozprofilerprobe.mof`"" -Wait -NoNewWindow - -# ProgramData_Mozilla_AccessRights: https://bugzilla.mozilla.org/show_bug.cgi?id=1494048 -Start-Process "icacls.exe" -ArgumentList "C:\ProgramData\Mozilla /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# HostsFile: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/etc/hosts", "C:\Windows\System32\drivers\etc\hosts") - -# SetHostsFileContent: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 - -# env_TASKCLUSTER_ROOT_URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1551789 -[Environment]::SetEnvironmentVariable("TASKCLUSTER_ROOT_URL", "https://firefox-ci-tc.services.mozilla.com", "Machine") - -# programdata_google_auth: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -md "C:\ProgramData\Google\Auth" - -# stackdriver_key: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -cmd /c mklink "C:\ProgramData\Google\Auth\application_default_credentials.json" "C:\builds\taskcluster-worker-ec2@aws-stackdriver-log-1571127027.json" - -# now shutdown, in preparation for creating an image -# Stop-Computer isn't working, also not when specifying -AsJob, so reverting to using `shutdown` command instead -# * https://www.reddit.com/r/PowerShell/comments/65250s/windows_10_creators_update_stopcomputer_not/dgfofug/?st=j1o3oa29&sh=e0c29c6d -# * https://support.microsoft.com/en-in/help/4014551/description-of-the-security-and-quality-rollup-for-the-net-framework-4 -# * https://support.microsoft.com/en-us/help/4020459 -shutdown -s diff --git a/worker_types/gecko-t-win10-64-gpu-b/aws_filters b/worker_types/gecko-t-win10-64-gpu-b/aws_filters deleted file mode 100644 index 985e2cb1..00000000 --- a/worker_types/gecko-t-win10-64-gpu-b/aws_filters +++ /dev/null @@ -1,2 +0,0 @@ -Name=platform,Values=windows -Name=name,Values=gecko-b-win2012-base-* diff --git a/worker_types/gecko-t-win10-64-gpu-b/aws_owners b/worker_types/gecko-t-win10-64-gpu-b/aws_owners deleted file mode 100644 index 38631e52..00000000 --- a/worker_types/gecko-t-win10-64-gpu-b/aws_owners +++ /dev/null @@ -1,2 +0,0 @@ -self -amazon diff --git a/worker_types/gecko-t-win10-64-gpu-b/bootstrap.ps1 b/worker_types/gecko-t-win10-64-gpu-b/bootstrap.ps1 deleted file mode 100644 index 585b1f6f..00000000 --- a/worker_types/gecko-t-win10-64-gpu-b/bootstrap.ps1 +++ /dev/null @@ -1,483 +0,0 @@ -################################################################################### -# Note, this powershell script is an *APPROXIMATION ONLY* to the steps that are run -# to build the AMIs for aws-provisioner-v1/gecko-t-win10-64-gpu-b. -# -# The authoratative host definition can be found at: -# -# * https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Manifest/gecko-t-win10-64-gpu-b.json -# -################################################################################### - -# use TLS 1.2 (see bug 1443595) -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -# capture env -Get-ChildItem Env: | Out-File "C:\install_env.txt" - -# needed for making http requests -$client = New-Object system.net.WebClient -$shell = new-object -com shell.application - -# utility function to download a zip file and extract it -function Extract-ZIPFile($file, $destination, $url) -{ - $client.DownloadFile($url, $file) - $zip = $shell.NameSpace($file) - foreach($item in $zip.items()) - { - $shell.Namespace($destination).copyhere($item) - } -} - -md C:\logs -md C:\binaries - -# LogDirectory: Required by OpenCloudConfig for DSC logging -md "C:\log" - -# StackdriverLogging: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://dl.google.com/cloudagents/windows/StackdriverLogging-v1-9.exe", "C:\binaries\StackdriverLogging-v1-9.exe") -Start-Process "C:\binaries\StackdriverLogging-v1-9.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# fluentd_gw_exe: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.exe.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.exe.conf") - -# fluentd_gw_service: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.service.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.service.conf") - -# fluentd_gw_wrapper: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.wrapper.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.wrapper.conf") - -# fluentd_occ: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/occ.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\occ.conf") - -# fluentd_redact: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/redact.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\redact.conf") - -# NxLog: Maintenance Toolchain - forwards event logs to papertrail -$client.DownloadFile("https://nxlog.co/system/files/products/files/348/nxlog-ce-2.10.2150.msi", "C:\binaries\nxlog-ce-2.10.2150.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\nxlog-ce-2.10.2150.msi /quiet" -Wait -NoNewWindow - -# PaperTrailEncryptionCertificate: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/papertrail-bundle.pem", "C:\Program Files (x86)\nxlog\cert\papertrail-bundle.pem") - -# NxLogPaperTrailConfiguration: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/win10.conf", "C:\Program Files (x86)\nxlog\conf\nxlog.conf") - -# Start_nxlog: Maintenance Toolchain - not essential for building firefox -Set-Service "nxlog" -StartupType Automatic -Status Running - -# ProcessExplorer: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessExplorer" -Extract-ZIPFile -File "C:\binaries\ProcessExplorer.zip" -Destination "C:\ProcessExplorer" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessExplorer/ProcessExplorer.zip" - -# ProcessMonitor: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessMonitor" -Extract-ZIPFile -File "C:\binaries\ProcessMonitor.zip" -Destination "C:\ProcessMonitor" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessMonitor/ProcessMonitor.zip" - -# GpgForWin: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://files.gpg4win.org/gpg4win-2.3.0.exe", "C:\binaries\gpg4win-2.3.0.exe") -Start-Process "C:\binaries\gpg4win-2.3.0.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SevenZip: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://7-zip.org/a/7z1514-x64.exe", "C:\binaries\7z1514-x64.exe") -Start-Process "C:\binaries\7z1514-x64.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SublimeText3: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://download.sublimetext.com/Sublime%20Text%20Build%203114%20x64%20Setup.exe", "C:\binaries\Sublime Text Build 3114 x64 Setup.exe") -Start-Process "C:\binaries\Sublime Text Build 3114 x64 Setup.exe" -ArgumentList "/VERYSILENT /NORESTART /TASKS=`"contextentry`"" -Wait -NoNewWindow - -# SublimeText3_PackagesFolder: Maintenance Toolchain - not essential for building firefox -md "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages" - -# SublimeText3_PackageControl: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://sublime.wbond.net/Package%20Control.sublime-package", "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\Package Control.sublime-package") - -# SystemPowerShellProfile: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Microsoft.PowerShell_profile.ps1", "C:\Windows\System32\WindowsPowerShell\v1.0\Microsoft.PowerShell_profile.ps1") - -# FsutilDisable8Dot3: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disable8dot3 1" -Wait -NoNewWindow - -# FsutilDisableLastAccess: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disablelastaccess 1" -Wait -NoNewWindow - -# home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\home" "C:\Users" - -# MozillaBuildSetup: https://bugzilla.mozilla.org/show_bug.cgi?id=1461340 -$client.DownloadFile("http://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-3.2.exe", "C:\binaries\MozillaBuildSetup-3.2.exe") -Start-Process "C:\binaries\MozillaBuildSetup-3.2.exe" -ArgumentList "/S /D=C:\mozilla-build" -Wait -NoNewWindow - -# DeleteMozillaBuildPython3PythonExe -Start-Process "cmd.exe" -ArgumentList "/c del /F /Q C:\mozilla-build\python3\python.exe" -Wait -NoNewWindow - -# msys_home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\mozilla-build\msys\home" "C:\Users" - -# DeleteMozillaBuildMercurial -Start-Process "cmd.exe" -ArgumentList "/c del C:\mozilla-build\python\Scripts\hg*" -Wait -NoNewWindow - -# Mercurial: https://bugzilla.mozilla.org/show_bug.cgi?id=1490703 -$client.DownloadFile("https://www.mercurial-scm.org/release/windows/mercurial-4.7.1-x64.msi", "C:\binaries\mercurial-4.7.1-x64.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\mercurial-4.7.1-x64.msi /quiet" -Wait -NoNewWindow - -# MercurialConfig: Required by clonebundle and share hg extensions -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/mercurial.ini", "C:\Program Files\Mercurial\Mercurial.ini") - -# robustcheckout: Required by robustcheckout hg extension -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/FirefoxBuildResources/robustcheckout.py", "C:\mozilla-build\robustcheckout.py") - -# MercurialCerts -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/cacert.pem", "C:\mozilla-build\msys\etc\cacert.pem") - -# env_MOZILLABUILD: Absolutely required for mozharness builds. Python will fall in a heap, throwing misleading exceptions without this. :) -[Environment]::SetEnvironmentVariable("MOZILLABUILD", "C:\mozilla-build", "Machine") - -# env_PATH - -# pip3_upgrade_pip -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade pip==19.2.3" -Wait -NoNewWindow - -# pip3_upgrade_zstandard -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade zstandard==0.11.1" -Wait -NoNewWindow - -# pip3_upgrade_certifi -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade certifi" -Wait -NoNewWindow - -# ToolToolInstall -$client.DownloadFile("https://raw.githubusercontent.com/mozilla/release-services/master/src/tooltool/client/tooltool.py", "C:\mozilla-build\tooltool.py") - -# reg_WindowsErrorReportingLocalDumps: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-Item -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Force - -# reg_WindowsErrorReportingDontShowUI: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "DontShowUI" -Value "0x00000001" -PropertyType Dword -Force - -# GenericWorkerDirectory -md "C:\generic-worker" - -# GenericWorkerDownload -$client.DownloadFile("https://github.com/taskcluster/generic-worker/releases/download/v16.5.5/generic-worker-multiuser-windows-amd64.exe", "C:\generic-worker\generic-worker.exe") - -# LiveLogDownload -$client.DownloadFile("https://github.com/taskcluster/livelog/releases/download/v1.1.0/livelog-windows-amd64.exe", "C:\generic-worker\livelog.exe") - -# TaskClusterProxyDownload -$client.DownloadFile("https://github.com/taskcluster/taskcluster-proxy/releases/download/v5.1.0/taskcluster-proxy-windows-amd64.exe", "C:\generic-worker\taskcluster-proxy.exe") - -# NSSMDownload -$client.DownloadFile("https://nssm.cc/ci/nssm-2.24-103-gdee49fc.zip", "C:\Windows\Temp\NSSMInstall.zip") - -# NSSMInstall: NSSM is required to install Generic Worker as a service. Currently ZipInstall fails, so using 7z instead. -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -oC:\ C:\Windows\Temp\NSSMInstall.zip" -Wait -NoNewWindow - -# GenericWorkerInstall -Start-Process "C:\generic-worker\generic-worker.exe" -ArgumentList "install service --nssm C:\nssm-2.24-103-gdee49fc\win64\nssm.exe --config C:\generic-worker\generic-worker.config --configure-for-%MY_CLOUD%" -Wait -NoNewWindow - -# DisableDesktopInterrupt -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/disable-desktop-interrupt.reg", "C:\generic-worker\disable-desktop-interrupt.reg") - -# SetDefaultPrinter -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/SetDefaultPrinter.ps1", "C:\generic-worker\SetDefaultPrinter.ps1") - -# GenericWorkerStateWait -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/run-generic-worker-and-reboot.bat", "C:\generic-worker\run-generic-worker.bat") - -# TaskUserInitScript: Bug 1261188 - initialisation script for new task users -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/task-user-init-win10.cmd", "C:\generic-worker\task-user-init.cmd") - -# PipConfDirectory: https://pip.pypa.io/en/stable/user_guide/#config-file -md "C:\ProgramData\pip" - -# PipConf -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/pip.conf", "C:\ProgramData\pip\pip.ini") - -# virtualenv_support -md "C:\mozilla-build\python\Lib\site-packages\virtualenv_support" - -# virtualenv_support_pywin32 -$client.DownloadFile("https://pypi.python.org/packages/cp27/p/pypiwin32/pypiwin32-219-cp27-none-win32.whl#md5=a8b0c1b608c1afeb18cd38d759ee5e29", "C:\mozilla-build\python\Lib\site-packages\virtualenv_support\pypiwin32-219-cp27-none-win32.whl") - -# virtualenv_support_pywin32_amd64 -$client.DownloadFile("https://pypi.python.org/packages/cp27/p/pypiwin32/pypiwin32-219-cp27-none-win_amd64.whl#md5=d7bafcf3cce72c3ce9fdd633a262c335", "C:\mozilla-build\python\Lib\site-packages\virtualenv_support\pypiwin32-219-cp27-none-win_amd64.whl") - -# HgShared: allows builds to use `hg robustcheckout ...` -md "y:\hg-shared" - -# HgSharedAccessRights: allows builds to use `hg robustcheckout ...` -Start-Process "icacls.exe" -ArgumentList "y:\hg-shared /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# PipCache: share pip cache across subsequent task users -md "y:\pip-cache" - -# PipCacheAccessRights: share pip cache across subsequent task users -Start-Process "icacls.exe" -ArgumentList "y:\pip-cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_PIP_DOWNLOAD_CACHE: share pip download cache between tasks -[Environment]::SetEnvironmentVariable("PIP_DOWNLOAD_CACHE", "y:\pip-cache", "Machine") - -# TooltoolCache: share tooltool cache across subsequent task users -md "y:\tooltool-cache" - -# TooltoolCacheAccessRights: share tooltool cache across subsequent task users -Start-Process "icacls.exe" -ArgumentList "y:\tooltool-cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_TOOLTOOL_CACHE: share tooltool cache between tasks -[Environment]::SetEnvironmentVariable("TOOLTOOL_CACHE", "y:\tooltool-cache", "Machine") - -# CarbonClone: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "clone --insecure https://bitbucket.org/splatteredbits/carbon C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonUpdate: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "update 2.4.0 -R C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonInstall: Bug 1316329 - support creation of symlinks by task users -Start-Process "xcopy" -ArgumentList "C:\Windows\Temp\carbon\Carbon C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Carbon /e /i /y" -Wait -NoNewWindow - -# GrantEveryoneSeCreateSymbolicLinkPrivilege: Bug 1316329 - support creation of symlinks by task users -Start-Process "powershell" -ArgumentList "-command `"& {&'Import-Module' Carbon}`"; `"& {&'Grant-Privilege' -Identity Everyone -Privilege SeCreateSymbolicLinkPrivilege}`"" -Wait -NoNewWindow - -# MozillaMaintenanceDir: Working directory for Mozilla Maintenance Service installation -md "C:\dsc\MozillaMaintenance" - -# maintenanceservice_installer -$client.DownloadFile("https://github.com/mozilla-releng/OpenCloudConfig/blob/master/userdata/Configuration/Mozilla%20Maintenance%20Service/maintenanceservice_installer.exe?raw=true", "C:\dsc\MozillaMaintenance\maintenanceservice_installer.exe") - -# maintenanceservice -$client.DownloadFile("https://github.com/mozilla-releng/OpenCloudConfig/blob/master/userdata/Configuration/Mozilla%20Maintenance%20Service/maintenanceservice.exe?raw=true", "C:\dsc\MozillaMaintenance\maintenanceservice.exe") - -# maintenanceservice_install -Start-Process "C:\dsc\MozillaMaintenance\maintenanceservice_installer.exe" -ArgumentList "/s" -Wait -NoNewWindow - -# MaintenanceServiceAcessRights: See https://bugzilla.mozilla.org/show_bug.cgi?id=1067756#c21 -Start-Process "icacls.exe" -ArgumentList "`"C:\Program Files (x86)\Mozilla Maintenance Service`" /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# MozFakeCA_cer -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mozilla%20Maintenance%20Service/MozFakeCA.cer", "C:\dsc\MozillaMaintenance\MozFakeCA.cer") - -# MozFakeCA_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozFakeCA.cer" -Wait -NoNewWindow - -# MozFakeCA_2017_10_13_cer -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mozilla%20Maintenance%20Service/MozFakeCA_2017-10-13.cer", "C:\dsc\MozillaMaintenance\MozFakeCA_2017-10-13.cer") - -# MozFakeCA_2017_10_13_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozFakeCA_2017-10-13.cer" -Wait -NoNewWindow - -# MozRoot_cer -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/certs/MozRoot.cer", "C:\dsc\MozillaMaintenance\MozRoot.cer") - -# MozRoot_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozRoot.cer" -Wait -NoNewWindow - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "name" -Value "Mozilla Corporation" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "issuer" -Value "Thawte Code Signing CA - G2" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "publisherLink" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "name" -Value "Mozilla Fake SPC" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "issuer" -Value "Mozilla Fake CA" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "publisherLink" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "name" -Value "Mozilla Corporation" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "issuer" -Value "DigiCert SHA2 Assured ID Code Signing CA" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "publisherLink" -Value "" -PropertyType String -Force - -# GrantEveryoneMozillaRegistryWriteAccess: Bug 1353889 - Grant Everyone group write access to Mozilla registry key -Start-Process "powershell" -ArgumentList "-command `"& {(Get-Acl -Path 'HKLM:\SOFTWARE\Mozilla').SetAccessRule((New-Object -TypeName 'System.Security.AccessControl.RegistryAccessRule' -ArgumentList @('Everyone', 'FullControl', 'Allow')))}`"" -Wait -NoNewWindow - -# KmsIn -New-NetFirewallRule -DisplayName "KmsIn (TCP 1688 Inbound): Allow" -Direction Inbound -LocalPort 1688 -Protocol TCP -Action Allow - -# KmsOut -New-NetFirewallRule -DisplayName "KmsOut (TCP 1688 Outbound): Allow" -Direction Outbound -LocalPort 1688 -Protocol TCP -Action Allow - -# DisableFirewall: Bug 1358301 - Disable Windows Firewall -Start-Process "netsh" -ArgumentList "advfirewall set allprofiles state off" -Wait -NoNewWindow - -# nircmd -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/nircmd/nircmd.exe", "C:\Windows\System32\nircmd.exe") - -# nircmdc -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/nircmd/nircmdc.exe", "C:\Windows\System32\nircmdc.exe") - -# UltraVNC: VNC Server - not essential for building firefox -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/UltraVnc/UltraVnc_10962_x64.msi", "C:\binaries\UltraVnc_10962_x64.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\UltraVnc_10962_x64.msi /quiet" -Wait -NoNewWindow - -# Vnc_In -New-NetFirewallRule -DisplayName "Vnc_In (TCP 5900 Inbound): Allow" -Direction Inbound -LocalPort 5900 -Protocol TCP -Action Allow - -# reg_DisableNewAppAlert: Bug 1373551 - prevent dialog to confirm file association -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "NoNewAppAlert" -Value "1" -PropertyType Dword -Force - -# reg_NewNetworkWindowOff: https://bugzilla.mozilla.org/show_bug.cgi?id=1397201#c58 -New-Item -Path "HKLM:System\CurrentControlSet\Control\Network\NewNetworkWindowOff" -Force - -# reg_Power_PreferredPlan_HighPerformance: https://bugzilla.mozilla.org/show_bug.cgi?id=1362613 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\ControlPanel\NameSpace\{025A5937-A6BE-4686-A844-36FE4BEC8B6D}" -Name "PreferredPlan" -Value "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c" -PropertyType String -Force - -# Reg_WinDefend_DisableConfig: https://bugzilla.mozilla.org/show_bug.cgi?id=1365909 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows Defender" -Name "DisableConfig" -Value "0x00000001" -PropertyType Dword -Force - -# Reg_WinDefend_DisableAntiSpyware: https://bugzilla.mozilla.org/show_bug.cgi?id=1365909 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows Defender" -Name "DisableAntiSpyware" -Value "0x00000001" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_wscsvc: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\wscsvc" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_SecurityHealthService: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\SecurityHealthService" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_Sense: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\Sense" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdBoot: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdBoot" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdFilter: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdFilter" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdNisDrv: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdNisDrv" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdNisSvc: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdNisSvc" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WinDefend: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WinDefend" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# OpenSshDownload: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://github.com/PowerShell/Win32-OpenSSH/releases/download/v7.6.1.0p1-Beta/OpenSSH-Win64.zip", "C:\Windows\Temp\OpenSSH-Win64.zip") - -# OpenSshUnzip: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -o`"C:\Program Files`" C:\Windows\Temp\OpenSSH-Win64.zip" -Wait -NoNewWindow - -# SshIn -New-NetFirewallRule -DisplayName "SshIn (TCP 22 Inbound): Allow" -Direction Inbound -LocalPort 22 -Protocol TCP -Action Allow - -# InstallOpenSSH: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "powershell.exe" -ArgumentList "-ExecutionPolicy Bypass -File `"C:\Program Files\OpenSSH-Win64\install-sshd.ps1`"" -Wait -NoNewWindow - -# reg_OpenSSH_DefaultShell: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShell" -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force - -# reg_OpenSSH_DefaultShellCommandOption: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShellCommandOption" -Value "/c" -PropertyType String -Force - -# AdministratorSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\Users\Administrator\.ssh" - -# AdministratorSshAuthorisedKeys: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/authorized_keys", "C:\Users\Administrator\.ssh\authorized_keys") - -# ProgramDataSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\ProgramData\ssh" - -# sshd_config: https://bugzilla.mozilla.org/show_bug.cgi?id=1464343 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/sshd_config", "C:\ProgramData\ssh\sshd_config") - -# Start_sshd: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "sshd" -StartupType Automatic -Status Running - -# Start_sshagent: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "ssh-agent" -StartupType Automatic -Status Running - -# vcredist_vs2015_x86: https://bugzilla.mozilla.org/show_bug.cgi?id=1460042 -$client.DownloadFile("http://download.microsoft.com/download/f/3/9/f39b30ec-f8ef-4ba3-8cb4-e301fcf0e0aa/vc_redist.x86.exe", "C:\binaries\vc_redist.x86.exe") -Start-Process "C:\binaries\vc_redist.x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2015_x64: https://bugzilla.mozilla.org/show_bug.cgi?id=1460042 -$client.DownloadFile("http://download.microsoft.com/download/4/c/b/4cbd5757-0dd4-43a7-bac0-2a492cedbacb/vc_redist.x64.exe", "C:\binaries\vc_redist.x64.exe") -Start-Process "C:\binaries\vc_redist.x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x64-install.log" -Wait -NoNewWindow - -# WindowsPerformanceToolkit: https://bugzilla.mozilla.org/show_bug.cgi?id=1485757 -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/WindowsPerformanceToolkit/WPTx64-x86_en-us.msi", "C:\binaries\WPTx64-x86_en-us.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\WPTx64-x86_en-us.msi /quiet" -Wait -NoNewWindow - -# mozprofilerprobe: https://bugzilla.mozilla.org/show_bug.cgi?id=1485757 -$client.DownloadFile("http://hg.mozilla.org/mozilla-central/raw-file/360ab7771e27/toolkit/components/startup/mozprofilerprobe.mof", "C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\mozprofilerprobe.mof") - -# mofcomp_mozprofilerprobe: https://bugzilla.mozilla.org/show_bug.cgi?id=1485757 -Start-Process "mofcomp" -ArgumentList "`"C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\mozprofilerprobe.mof`"" -Wait -NoNewWindow - -# ProgramData_Mozilla_AccessRights: https://bugzilla.mozilla.org/show_bug.cgi?id=1494048 -Start-Process "icacls.exe" -ArgumentList "c:\ProgramData\Mozilla /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# HostsFile: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/etc/hosts", "C:\Windows\System32\drivers\etc\hosts") - -# SetHostsFileContent: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 - -# reg_WindowsUpdate_DeferUpgrade: https://bugzilla.mozilla.org/show_bug.cgi?id=1510220 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "DeferUpgrade" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_DeferUpgradePeriod: https://bugzilla.mozilla.org/show_bug.cgi?id=1510220 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "DeferUpgradePeriod" -Value "8" -PropertyType Dword -Force - -# reg_WindowsUpdate_DeferUpdatePeriod: https://bugzilla.mozilla.org/show_bug.cgi?id=1510220 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "DeferUpdatePeriod" -Value "4" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_NoAutoRebootWithLoggedOnUsers: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoRebootWithLoggedOnUsers" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_NoAutoUpdate: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoUpdate" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_AUOptions: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUOptions" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_ScheduledInstallDay: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "ScheduledInstallDay" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_ScheduledInstallTime: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "ScheduledInstallTime" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_AutomaticMaintenanceEnabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AutomaticMaintenanceEnabled" -Value "0" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_AllowMUUpdateService: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AllowMUUpdateService" -Value "0" -PropertyType Dword -Force - -# reg_ScheduleMaintenance_MaintenanceDisabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\Maintenance" -Name "MaintenanceDisabled" -Value "1" -PropertyType Dword -Force - -# env_TASKCLUSTER_ROOT_URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1551789 -[Environment]::SetEnvironmentVariable("TASKCLUSTER_ROOT_URL", "https://firefox-ci-tc.services.mozilla.com", "Machine") - -# programdata_google_auth: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -md "C:\ProgramData\Google\Auth" - -# stackdriver_key: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -cmd /c mklink "C:\ProgramData\Google\Auth\application_default_credentials.json" "C:\builds\taskcluster-worker-ec2@aws-stackdriver-log-1571127027.json" - -# now shutdown, in preparation for creating an image -# Stop-Computer isn't working, also not when specifying -AsJob, so reverting to using `shutdown` command instead -# * https://www.reddit.com/r/PowerShell/comments/65250s/windows_10_creators_update_stopcomputer_not/dgfofug/?st=j1o3oa29&sh=e0c29c6d -# * https://support.microsoft.com/en-in/help/4014551/description-of-the-security-and-quality-rollup-for-the-net-framework-4 -# * https://support.microsoft.com/en-us/help/4020459 -shutdown -s diff --git a/worker_types/gecko-t-win10-64-gpu-s/bootstrap.ps1 b/worker_types/gecko-t-win10-64-gpu-s/bootstrap.ps1 deleted file mode 100644 index 5841e23f..00000000 --- a/worker_types/gecko-t-win10-64-gpu-s/bootstrap.ps1 +++ /dev/null @@ -1,483 +0,0 @@ -################################################################################### -# Note, this powershell script is an *APPROXIMATION ONLY* to the steps that are run -# to build the AMIs for aws-provisioner-v1/gecko-t-win10-64-gpu-s. -# -# The authoratative host definition can be found at: -# -# * https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Manifest/gecko-t-win10-64-gpu-s.json -# -################################################################################### - -# use TLS 1.2 (see bug 1443595) -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -# capture env -Get-ChildItem Env: | Out-File "C:\install_env.txt" - -# needed for making http requests -$client = New-Object system.net.WebClient -$shell = new-object -com shell.application - -# utility function to download a zip file and extract it -function Extract-ZIPFile($file, $destination, $url) -{ - $client.DownloadFile($url, $file) - $zip = $shell.NameSpace($file) - foreach($item in $zip.items()) - { - $shell.Namespace($destination).copyhere($item) - } -} - -md C:\logs -md C:\binaries - -# LogDirectory: Required by OpenCloudConfig for DSC logging -md "C:\log" - -# StackdriverLogging: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://dl.google.com/cloudagents/windows/StackdriverLogging-v1-9.exe", "C:\binaries\StackdriverLogging-v1-9.exe") -Start-Process "C:\binaries\StackdriverLogging-v1-9.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# fluentd_gw_exe: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.exe.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.exe.conf") - -# fluentd_gw_service: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.service.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.service.conf") - -# fluentd_gw_wrapper: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.wrapper.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.wrapper.conf") - -# fluentd_occ: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/occ.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\occ.conf") - -# fluentd_redact: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/redact.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\redact.conf") - -# NxLog: Maintenance Toolchain - forwards event logs to papertrail -$client.DownloadFile("https://nxlog.co/system/files/products/files/348/nxlog-ce-2.10.2150.msi", "C:\binaries\nxlog-ce-2.10.2150.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\nxlog-ce-2.10.2150.msi /quiet" -Wait -NoNewWindow - -# PaperTrailEncryptionCertificate: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/papertrail-bundle.pem", "C:\Program Files (x86)\nxlog\cert\papertrail-bundle.pem") - -# NxLogPaperTrailConfiguration: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/win10.conf", "C:\Program Files (x86)\nxlog\conf\nxlog.conf") - -# Start_nxlog: Maintenance Toolchain - not essential for building firefox -Set-Service "nxlog" -StartupType Automatic -Status Running - -# ProcessExplorer: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessExplorer" -Extract-ZIPFile -File "C:\binaries\ProcessExplorer.zip" -Destination "C:\ProcessExplorer" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessExplorer/ProcessExplorer.zip" - -# ProcessMonitor: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessMonitor" -Extract-ZIPFile -File "C:\binaries\ProcessMonitor.zip" -Destination "C:\ProcessMonitor" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessMonitor/ProcessMonitor.zip" - -# GpgForWin: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://files.gpg4win.org/gpg4win-2.3.0.exe", "C:\binaries\gpg4win-2.3.0.exe") -Start-Process "C:\binaries\gpg4win-2.3.0.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SevenZip: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://7-zip.org/a/7z1514-x64.exe", "C:\binaries\7z1514-x64.exe") -Start-Process "C:\binaries\7z1514-x64.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SublimeText3: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://download.sublimetext.com/Sublime%20Text%20Build%203114%20x64%20Setup.exe", "C:\binaries\Sublime Text Build 3114 x64 Setup.exe") -Start-Process "C:\binaries\Sublime Text Build 3114 x64 Setup.exe" -ArgumentList "/VERYSILENT /NORESTART /TASKS=`"contextentry`"" -Wait -NoNewWindow - -# SublimeText3_PackagesFolder: Maintenance Toolchain - not essential for building firefox -md "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages" - -# SublimeText3_PackageControl: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://sublime.wbond.net/Package%20Control.sublime-package", "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\Package Control.sublime-package") - -# SystemPowerShellProfile: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Microsoft.PowerShell_profile.ps1", "C:\Windows\System32\WindowsPowerShell\v1.0\Microsoft.PowerShell_profile.ps1") - -# FsutilDisable8Dot3: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disable8dot3 1" -Wait -NoNewWindow - -# FsutilDisableLastAccess: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disablelastaccess 1" -Wait -NoNewWindow - -# home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\home" "C:\Users" - -# MozillaBuildSetup: https://bugzilla.mozilla.org/show_bug.cgi?id=1461340 -$client.DownloadFile("http://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-3.2.exe", "C:\binaries\MozillaBuildSetup-3.2.exe") -Start-Process "C:\binaries\MozillaBuildSetup-3.2.exe" -ArgumentList "/S /D=C:\mozilla-build" -Wait -NoNewWindow - -# DeleteMozillaBuildPython3PythonExe -Start-Process "cmd.exe" -ArgumentList "/c del /F /Q C:\mozilla-build\python3\python.exe" -Wait -NoNewWindow - -# msys_home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\mozilla-build\msys\home" "C:\Users" - -# DeleteMozillaBuildMercurial -Start-Process "cmd.exe" -ArgumentList "/c del C:\mozilla-build\python\Scripts\hg*" -Wait -NoNewWindow - -# Mercurial: https://bugzilla.mozilla.org/show_bug.cgi?id=1490703 -$client.DownloadFile("https://www.mercurial-scm.org/release/windows/mercurial-4.7.1-x64.msi", "C:\binaries\mercurial-4.7.1-x64.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\mercurial-4.7.1-x64.msi /quiet" -Wait -NoNewWindow - -# MercurialConfig: Required by clonebundle and share hg extensions -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/mercurial.ini", "C:\Program Files\Mercurial\Mercurial.ini") - -# robustcheckout: Required by robustcheckout hg extension -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/FirefoxBuildResources/robustcheckout.py", "C:\mozilla-build\robustcheckout.py") - -# MercurialCerts -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/cacert.pem", "C:\mozilla-build\msys\etc\cacert.pem") - -# env_MOZILLABUILD: Absolutely required for mozharness builds. Python will fall in a heap, throwing misleading exceptions without this. :) -[Environment]::SetEnvironmentVariable("MOZILLABUILD", "C:\mozilla-build", "Machine") - -# env_PATH - -# pip3_upgrade_pip -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade pip==19.2.3" -Wait -NoNewWindow - -# pip3_upgrade_zstandard -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade zstandard==0.11.1" -Wait -NoNewWindow - -# pip3_upgrade_certifi -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade certifi" -Wait -NoNewWindow - -# ToolToolInstall -$client.DownloadFile("https://raw.githubusercontent.com/mozilla/release-services/master/src/tooltool/client/tooltool.py", "C:\mozilla-build\tooltool.py") - -# reg_WindowsErrorReportingLocalDumps: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-Item -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Force - -# reg_WindowsErrorReportingDontShowUI: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "DontShowUI" -Value "0x00000001" -PropertyType Dword -Force - -# GenericWorkerDirectory -md "C:\generic-worker" - -# GenericWorkerDownload -$client.DownloadFile("https://github.com/taskcluster/generic-worker/releases/download/v16.5.1/generic-worker-multiuser-windows-amd64.exe", "C:\generic-worker\generic-worker.exe") - -# LiveLogDownload -$client.DownloadFile("https://github.com/taskcluster/livelog/releases/download/v1.1.0/livelog-windows-amd64.exe", "C:\generic-worker\livelog.exe") - -# TaskClusterProxyDownload -$client.DownloadFile("https://github.com/taskcluster/taskcluster-proxy/releases/download/v5.1.0/taskcluster-proxy-windows-amd64.exe", "C:\generic-worker\taskcluster-proxy.exe") - -# NSSMDownload -$client.DownloadFile("https://nssm.cc/ci/nssm-2.24-103-gdee49fc.zip", "C:\Windows\Temp\NSSMInstall.zip") - -# NSSMInstall: NSSM is required to install Generic Worker as a service. Currently ZipInstall fails, so using 7z instead. -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -oC:\ C:\Windows\Temp\NSSMInstall.zip" -Wait -NoNewWindow - -# GenericWorkerInstall -Start-Process "C:\generic-worker\generic-worker.exe" -ArgumentList "install service --nssm C:\nssm-2.24-103-gdee49fc\win64\nssm.exe --config C:\generic-worker\generic-worker.config --configure-for-%MY_CLOUD%" -Wait -NoNewWindow - -# DisableDesktopInterrupt -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/disable-desktop-interrupt.reg", "C:\generic-worker\disable-desktop-interrupt.reg") - -# SetDefaultPrinter -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/SetDefaultPrinter.ps1", "C:\generic-worker\SetDefaultPrinter.ps1") - -# GenericWorkerStateWait -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/run-generic-worker-and-reboot.bat", "C:\generic-worker\run-generic-worker.bat") - -# TaskUserInitScript: Bug 1261188 - initialisation script for new task users -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/task-user-init-win10.cmd", "C:\generic-worker\task-user-init.cmd") - -# PipConfDirectory: https://pip.pypa.io/en/stable/user_guide/#config-file -md "C:\ProgramData\pip" - -# PipConf -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/pip.conf", "C:\ProgramData\pip\pip.ini") - -# virtualenv_support -md "C:\mozilla-build\python\Lib\site-packages\virtualenv_support" - -# virtualenv_support_pywin32 -$client.DownloadFile("https://pypi.python.org/packages/cp27/p/pypiwin32/pypiwin32-219-cp27-none-win32.whl#md5=a8b0c1b608c1afeb18cd38d759ee5e29", "C:\mozilla-build\python\Lib\site-packages\virtualenv_support\pypiwin32-219-cp27-none-win32.whl") - -# virtualenv_support_pywin32_amd64 -$client.DownloadFile("https://pypi.python.org/packages/cp27/p/pypiwin32/pypiwin32-219-cp27-none-win_amd64.whl#md5=d7bafcf3cce72c3ce9fdd633a262c335", "C:\mozilla-build\python\Lib\site-packages\virtualenv_support\pypiwin32-219-cp27-none-win_amd64.whl") - -# HgShared: allows builds to use `hg robustcheckout ...` -md "y:\hg-shared" - -# HgSharedAccessRights: allows builds to use `hg robustcheckout ...` -Start-Process "icacls.exe" -ArgumentList "y:\hg-shared /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# PipCache: share pip cache across subsequent task users -md "y:\pip-cache" - -# PipCacheAccessRights: share pip cache across subsequent task users -Start-Process "icacls.exe" -ArgumentList "y:\pip-cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_PIP_DOWNLOAD_CACHE: share pip download cache between tasks -[Environment]::SetEnvironmentVariable("PIP_DOWNLOAD_CACHE", "y:\pip-cache", "Machine") - -# TooltoolCache: share tooltool cache across subsequent task users -md "y:\tooltool-cache" - -# TooltoolCacheAccessRights: share tooltool cache across subsequent task users -Start-Process "icacls.exe" -ArgumentList "y:\tooltool-cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_TOOLTOOL_CACHE: share tooltool cache between tasks -[Environment]::SetEnvironmentVariable("TOOLTOOL_CACHE", "y:\tooltool-cache", "Machine") - -# CarbonClone: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "clone --insecure https://bitbucket.org/splatteredbits/carbon C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonUpdate: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "update 2.4.0 -R C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonInstall: Bug 1316329 - support creation of symlinks by task users -Start-Process "xcopy" -ArgumentList "C:\Windows\Temp\carbon\Carbon C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Carbon /e /i /y" -Wait -NoNewWindow - -# GrantEveryoneSeCreateSymbolicLinkPrivilege: Bug 1316329 - support creation of symlinks by task users -Start-Process "powershell" -ArgumentList "-command `"& {&'Import-Module' Carbon}`"; `"& {&'Grant-Privilege' -Identity Everyone -Privilege SeCreateSymbolicLinkPrivilege}`"" -Wait -NoNewWindow - -# MozillaMaintenanceDir: Working directory for Mozilla Maintenance Service installation -md "C:\dsc\MozillaMaintenance" - -# maintenanceservice_installer -$client.DownloadFile("https://github.com/mozilla-releng/OpenCloudConfig/blob/master/userdata/Configuration/Mozilla%20Maintenance%20Service/maintenanceservice_installer.exe?raw=true", "C:\dsc\MozillaMaintenance\maintenanceservice_installer.exe") - -# maintenanceservice -$client.DownloadFile("https://github.com/mozilla-releng/OpenCloudConfig/blob/master/userdata/Configuration/Mozilla%20Maintenance%20Service/maintenanceservice.exe?raw=true", "C:\dsc\MozillaMaintenance\maintenanceservice.exe") - -# maintenanceservice_install -Start-Process "C:\dsc\MozillaMaintenance\maintenanceservice_installer.exe" -ArgumentList "/s" -Wait -NoNewWindow - -# MaintenanceServiceAcessRights: See https://bugzilla.mozilla.org/show_bug.cgi?id=1067756#c21 -Start-Process "icacls.exe" -ArgumentList "`"C:\Program Files (x86)\Mozilla Maintenance Service`" /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# MozFakeCA_cer -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mozilla%20Maintenance%20Service/MozFakeCA.cer", "C:\dsc\MozillaMaintenance\MozFakeCA.cer") - -# MozFakeCA_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozFakeCA.cer" -Wait -NoNewWindow - -# MozFakeCA_2017_10_13_cer -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mozilla%20Maintenance%20Service/MozFakeCA_2017-10-13.cer", "C:\dsc\MozillaMaintenance\MozFakeCA_2017-10-13.cer") - -# MozFakeCA_2017_10_13_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozFakeCA_2017-10-13.cer" -Wait -NoNewWindow - -# MozRoot_cer -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/certs/MozRoot.cer", "C:\dsc\MozillaMaintenance\MozRoot.cer") - -# MozRoot_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozRoot.cer" -Wait -NoNewWindow - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "name" -Value "Mozilla Corporation" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "issuer" -Value "Thawte Code Signing CA - G2" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "publisherLink" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "name" -Value "Mozilla Fake SPC" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "issuer" -Value "Mozilla Fake CA" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "publisherLink" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "name" -Value "Mozilla Corporation" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "issuer" -Value "DigiCert SHA2 Assured ID Code Signing CA" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "publisherLink" -Value "" -PropertyType String -Force - -# GrantEveryoneMozillaRegistryWriteAccess: Bug 1353889 - Grant Everyone group write access to Mozilla registry key -Start-Process "powershell" -ArgumentList "-command `"& {(Get-Acl -Path 'HKLM:\SOFTWARE\Mozilla').SetAccessRule((New-Object -TypeName 'System.Security.AccessControl.RegistryAccessRule' -ArgumentList @('Everyone', 'FullControl', 'Allow')))}`"" -Wait -NoNewWindow - -# KmsIn -New-NetFirewallRule -DisplayName "KmsIn (TCP 1688 Inbound): Allow" -Direction Inbound -LocalPort 1688 -Protocol TCP -Action Allow - -# KmsOut -New-NetFirewallRule -DisplayName "KmsOut (TCP 1688 Outbound): Allow" -Direction Outbound -LocalPort 1688 -Protocol TCP -Action Allow - -# DisableFirewall: Bug 1358301 - Disable Windows Firewall -Start-Process "netsh" -ArgumentList "advfirewall set allprofiles state off" -Wait -NoNewWindow - -# nircmd -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/nircmd/nircmd.exe", "C:\Windows\System32\nircmd.exe") - -# nircmdc -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/nircmd/nircmdc.exe", "C:\Windows\System32\nircmdc.exe") - -# UltraVNC: VNC Server - not essential for building firefox -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/UltraVnc/UltraVnc_10962_x64.msi", "C:\binaries\UltraVnc_10962_x64.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\UltraVnc_10962_x64.msi /quiet" -Wait -NoNewWindow - -# Vnc_In -New-NetFirewallRule -DisplayName "Vnc_In (TCP 5900 Inbound): Allow" -Direction Inbound -LocalPort 5900 -Protocol TCP -Action Allow - -# reg_DisableNewAppAlert: Bug 1373551 - prevent dialog to confirm file association -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "NoNewAppAlert" -Value "1" -PropertyType Dword -Force - -# reg_NewNetworkWindowOff: https://bugzilla.mozilla.org/show_bug.cgi?id=1397201#c58 -New-Item -Path "HKLM:System\CurrentControlSet\Control\Network\NewNetworkWindowOff" -Force - -# reg_Power_PreferredPlan_HighPerformance: https://bugzilla.mozilla.org/show_bug.cgi?id=1362613 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\ControlPanel\NameSpace\{025A5937-A6BE-4686-A844-36FE4BEC8B6D}" -Name "PreferredPlan" -Value "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c" -PropertyType String -Force - -# Reg_WinDefend_DisableConfig: https://bugzilla.mozilla.org/show_bug.cgi?id=1365909 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows Defender" -Name "DisableConfig" -Value "0x00000001" -PropertyType Dword -Force - -# Reg_WinDefend_DisableAntiSpyware: https://bugzilla.mozilla.org/show_bug.cgi?id=1365909 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows Defender" -Name "DisableAntiSpyware" -Value "0x00000001" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_wscsvc: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\wscsvc" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_SecurityHealthService: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\SecurityHealthService" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_Sense: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\Sense" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdBoot: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdBoot" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdFilter: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdFilter" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdNisDrv: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdNisDrv" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdNisSvc: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdNisSvc" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WinDefend: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WinDefend" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# OpenSshDownload: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://github.com/PowerShell/Win32-OpenSSH/releases/download/v7.6.1.0p1-Beta/OpenSSH-Win64.zip", "C:\Windows\Temp\OpenSSH-Win64.zip") - -# OpenSshUnzip: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -o`"C:\Program Files`" C:\Windows\Temp\OpenSSH-Win64.zip" -Wait -NoNewWindow - -# SshIn -New-NetFirewallRule -DisplayName "SshIn (TCP 22 Inbound): Allow" -Direction Inbound -LocalPort 22 -Protocol TCP -Action Allow - -# InstallOpenSSH: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "powershell.exe" -ArgumentList "-ExecutionPolicy Bypass -File `"C:\Program Files\OpenSSH-Win64\install-sshd.ps1`"" -Wait -NoNewWindow - -# reg_OpenSSH_DefaultShell: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShell" -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force - -# reg_OpenSSH_DefaultShellCommandOption: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShellCommandOption" -Value "/c" -PropertyType String -Force - -# AdministratorSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\Users\Administrator\.ssh" - -# AdministratorSshAuthorisedKeys: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/authorized_keys", "C:\Users\Administrator\.ssh\authorized_keys") - -# ProgramDataSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\ProgramData\ssh" - -# sshd_config: https://bugzilla.mozilla.org/show_bug.cgi?id=1464343 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/sshd_config", "C:\ProgramData\ssh\sshd_config") - -# Start_sshd: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "sshd" -StartupType Automatic -Status Running - -# Start_sshagent: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "ssh-agent" -StartupType Automatic -Status Running - -# vcredist_vs2015_x86: https://bugzilla.mozilla.org/show_bug.cgi?id=1460042 -$client.DownloadFile("http://download.microsoft.com/download/f/3/9/f39b30ec-f8ef-4ba3-8cb4-e301fcf0e0aa/vc_redist.x86.exe", "C:\binaries\vc_redist.x86.exe") -Start-Process "C:\binaries\vc_redist.x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2015_x64: https://bugzilla.mozilla.org/show_bug.cgi?id=1460042 -$client.DownloadFile("http://download.microsoft.com/download/4/c/b/4cbd5757-0dd4-43a7-bac0-2a492cedbacb/vc_redist.x64.exe", "C:\binaries\vc_redist.x64.exe") -Start-Process "C:\binaries\vc_redist.x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x64-install.log" -Wait -NoNewWindow - -# WindowsPerformanceToolkit: https://bugzilla.mozilla.org/show_bug.cgi?id=1485757 -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/WindowsPerformanceToolkit/WPTx64-x86_en-us.msi", "C:\binaries\WPTx64-x86_en-us.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\WPTx64-x86_en-us.msi /quiet" -Wait -NoNewWindow - -# mozprofilerprobe: https://bugzilla.mozilla.org/show_bug.cgi?id=1485757 -$client.DownloadFile("http://hg.mozilla.org/mozilla-central/raw-file/360ab7771e27/toolkit/components/startup/mozprofilerprobe.mof", "C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\mozprofilerprobe.mof") - -# mofcomp_mozprofilerprobe: https://bugzilla.mozilla.org/show_bug.cgi?id=1485757 -Start-Process "mofcomp" -ArgumentList "`"C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\mozprofilerprobe.mof`"" -Wait -NoNewWindow - -# ProgramData_Mozilla_AccessRights: https://bugzilla.mozilla.org/show_bug.cgi?id=1494048 -Start-Process "icacls.exe" -ArgumentList "c:\ProgramData\Mozilla /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# HostsFile: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/etc/hosts", "C:\Windows\System32\drivers\etc\hosts") - -# SetHostsFileContent: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 - -# reg_WindowsUpdate_DeferUpgrade: https://bugzilla.mozilla.org/show_bug.cgi?id=1510220 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "DeferUpgrade" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_DeferUpgradePeriod: https://bugzilla.mozilla.org/show_bug.cgi?id=1510220 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "DeferUpgradePeriod" -Value "8" -PropertyType Dword -Force - -# reg_WindowsUpdate_DeferUpdatePeriod: https://bugzilla.mozilla.org/show_bug.cgi?id=1510220 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "DeferUpdatePeriod" -Value "4" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_NoAutoRebootWithLoggedOnUsers: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoRebootWithLoggedOnUsers" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_NoAutoUpdate: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoUpdate" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_AUOptions: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUOptions" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_ScheduledInstallDay: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "ScheduledInstallDay" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_ScheduledInstallTime: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "ScheduledInstallTime" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_AutomaticMaintenanceEnabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AutomaticMaintenanceEnabled" -Value "0" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_AllowMUUpdateService: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AllowMUUpdateService" -Value "0" -PropertyType Dword -Force - -# reg_ScheduleMaintenance_MaintenanceDisabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\Maintenance" -Name "MaintenanceDisabled" -Value "1" -PropertyType Dword -Force - -# env_TASKCLUSTER_ROOT_URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1551789 -[Environment]::SetEnvironmentVariable("TASKCLUSTER_ROOT_URL", "https://firefox-ci-tc.services.mozilla.com", "Machine") - -# programdata_google_auth: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -md "C:\ProgramData\Google\Auth" - -# stackdriver_key: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -cmd /c mklink "C:\ProgramData\Google\Auth\application_default_credentials.json" "C:\builds\taskcluster-worker-ec2@aws-stackdriver-log-1571127027.json" - -# now shutdown, in preparation for creating an image -# Stop-Computer isn't working, also not when specifying -AsJob, so reverting to using `shutdown` command instead -# * https://www.reddit.com/r/PowerShell/comments/65250s/windows_10_creators_update_stopcomputer_not/dgfofug/?st=j1o3oa29&sh=e0c29c6d -# * https://support.microsoft.com/en-in/help/4014551/description-of-the-security-and-quality-rollup-for-the-net-framework-4 -# * https://support.microsoft.com/en-us/help/4020459 -shutdown -s diff --git a/worker_types/gecko-t-win10-64-gpu/aws_filters b/worker_types/gecko-t-win10-64-gpu/aws_filters deleted file mode 100644 index 985e2cb1..00000000 --- a/worker_types/gecko-t-win10-64-gpu/aws_filters +++ /dev/null @@ -1,2 +0,0 @@ -Name=platform,Values=windows -Name=name,Values=gecko-b-win2012-base-* diff --git a/worker_types/gecko-t-win10-64-gpu/aws_owners b/worker_types/gecko-t-win10-64-gpu/aws_owners deleted file mode 100644 index 38631e52..00000000 --- a/worker_types/gecko-t-win10-64-gpu/aws_owners +++ /dev/null @@ -1,2 +0,0 @@ -self -amazon diff --git a/worker_types/gecko-t-win10-64-gpu/bootstrap.ps1 b/worker_types/gecko-t-win10-64-gpu/bootstrap.ps1 deleted file mode 100644 index 4ec0ea85..00000000 --- a/worker_types/gecko-t-win10-64-gpu/bootstrap.ps1 +++ /dev/null @@ -1,483 +0,0 @@ -################################################################################### -# Note, this powershell script is an *APPROXIMATION ONLY* to the steps that are run -# to build the AMIs for aws-provisioner-v1/gecko-t-win10-64-gpu. -# -# The authoratative host definition can be found at: -# -# * https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Manifest/gecko-t-win10-64-gpu.json -# -################################################################################### - -# use TLS 1.2 (see bug 1443595) -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -# capture env -Get-ChildItem Env: | Out-File "C:\install_env.txt" - -# needed for making http requests -$client = New-Object system.net.WebClient -$shell = new-object -com shell.application - -# utility function to download a zip file and extract it -function Extract-ZIPFile($file, $destination, $url) -{ - $client.DownloadFile($url, $file) - $zip = $shell.NameSpace($file) - foreach($item in $zip.items()) - { - $shell.Namespace($destination).copyhere($item) - } -} - -md C:\logs -md C:\binaries - -# LogDirectory: Required by OpenCloudConfig for DSC logging -md "C:\log" - -# StackdriverLogging: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://dl.google.com/cloudagents/windows/StackdriverLogging-v1-9.exe", "C:\binaries\StackdriverLogging-v1-9.exe") -Start-Process "C:\binaries\StackdriverLogging-v1-9.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# fluentd_gw_exe: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.exe.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.exe.conf") - -# fluentd_gw_service: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.service.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.service.conf") - -# fluentd_gw_wrapper: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.wrapper.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.wrapper.conf") - -# fluentd_occ: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/occ.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\occ.conf") - -# fluentd_redact: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/redact.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\redact.conf") - -# NxLog: Maintenance Toolchain - forwards event logs to papertrail -$client.DownloadFile("https://nxlog.co/system/files/products/files/348/nxlog-ce-2.10.2150.msi", "C:\binaries\nxlog-ce-2.10.2150.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\nxlog-ce-2.10.2150.msi /quiet" -Wait -NoNewWindow - -# PaperTrailEncryptionCertificate: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/papertrail-bundle.pem", "C:\Program Files (x86)\nxlog\cert\papertrail-bundle.pem") - -# NxLogPaperTrailConfiguration: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/win10.conf", "C:\Program Files (x86)\nxlog\conf\nxlog.conf") - -# Start_nxlog: Maintenance Toolchain - not essential for building firefox -Set-Service "nxlog" -StartupType Automatic -Status Running - -# ProcessExplorer: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessExplorer" -Extract-ZIPFile -File "C:\binaries\ProcessExplorer.zip" -Destination "C:\ProcessExplorer" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessExplorer/ProcessExplorer.zip" - -# ProcessMonitor: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessMonitor" -Extract-ZIPFile -File "C:\binaries\ProcessMonitor.zip" -Destination "C:\ProcessMonitor" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessMonitor/ProcessMonitor.zip" - -# GpgForWin: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://files.gpg4win.org/gpg4win-2.3.0.exe", "C:\binaries\gpg4win-2.3.0.exe") -Start-Process "C:\binaries\gpg4win-2.3.0.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SevenZip: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://7-zip.org/a/7z1514-x64.exe", "C:\binaries\7z1514-x64.exe") -Start-Process "C:\binaries\7z1514-x64.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SublimeText3: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://download.sublimetext.com/Sublime%20Text%20Build%203114%20x64%20Setup.exe", "C:\binaries\Sublime Text Build 3114 x64 Setup.exe") -Start-Process "C:\binaries\Sublime Text Build 3114 x64 Setup.exe" -ArgumentList "/VERYSILENT /NORESTART /TASKS=`"contextentry`"" -Wait -NoNewWindow - -# SublimeText3_PackagesFolder: Maintenance Toolchain - not essential for building firefox -md "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages" - -# SublimeText3_PackageControl: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://sublime.wbond.net/Package%20Control.sublime-package", "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\Package Control.sublime-package") - -# SystemPowerShellProfile: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Microsoft.PowerShell_profile.ps1", "C:\Windows\System32\WindowsPowerShell\v1.0\Microsoft.PowerShell_profile.ps1") - -# FsutilDisable8Dot3: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disable8dot3 1" -Wait -NoNewWindow - -# FsutilDisableLastAccess: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disablelastaccess 1" -Wait -NoNewWindow - -# home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\home" "C:\Users" - -# MozillaBuildSetup: https://bugzilla.mozilla.org/show_bug.cgi?id=1461340 -$client.DownloadFile("http://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-3.2.exe", "C:\binaries\MozillaBuildSetup-3.2.exe") -Start-Process "C:\binaries\MozillaBuildSetup-3.2.exe" -ArgumentList "/S /D=C:\mozilla-build" -Wait -NoNewWindow - -# DeleteMozillaBuildPython3PythonExe -Start-Process "cmd.exe" -ArgumentList "/c del /F /Q C:\mozilla-build\python3\python.exe" -Wait -NoNewWindow - -# msys_home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\mozilla-build\msys\home" "C:\Users" - -# DeleteMozillaBuildMercurial -Start-Process "cmd.exe" -ArgumentList "/c del C:\mozilla-build\python\Scripts\hg*" -Wait -NoNewWindow - -# Mercurial: https://bugzilla.mozilla.org/show_bug.cgi?id=1490703 -$client.DownloadFile("https://www.mercurial-scm.org/release/windows/mercurial-4.7.1-x64.msi", "C:\binaries\mercurial-4.7.1-x64.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\mercurial-4.7.1-x64.msi /quiet" -Wait -NoNewWindow - -# MercurialConfig: Required by clonebundle and share hg extensions -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/mercurial.ini", "C:\Program Files\Mercurial\Mercurial.ini") - -# robustcheckout: Required by robustcheckout hg extension -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/FirefoxBuildResources/robustcheckout.py", "C:\mozilla-build\robustcheckout.py") - -# MercurialCerts -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/cacert.pem", "C:\mozilla-build\msys\etc\cacert.pem") - -# env_MOZILLABUILD: Absolutely required for mozharness builds. Python will fall in a heap, throwing misleading exceptions without this. :) -[Environment]::SetEnvironmentVariable("MOZILLABUILD", "C:\mozilla-build", "Machine") - -# env_PATH - -# pip3_upgrade_pip -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade pip==19.2.3" -Wait -NoNewWindow - -# pip3_upgrade_zstandard -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade zstandard==0.11.1" -Wait -NoNewWindow - -# pip3_upgrade_certifi -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade certifi" -Wait -NoNewWindow - -# ToolToolInstall -$client.DownloadFile("https://raw.githubusercontent.com/mozilla/release-services/master/src/tooltool/client/tooltool.py", "C:\mozilla-build\tooltool.py") - -# reg_WindowsErrorReportingLocalDumps: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-Item -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Force - -# reg_WindowsErrorReportingDontShowUI: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "DontShowUI" -Value "0x00000001" -PropertyType Dword -Force - -# GenericWorkerDirectory -md "C:\generic-worker" - -# GenericWorkerDownload -$client.DownloadFile("https://github.com/taskcluster/generic-worker/releases/download/v16.5.1/generic-worker-multiuser-windows-amd64.exe", "C:\generic-worker\generic-worker.exe") - -# LiveLogDownload -$client.DownloadFile("https://github.com/taskcluster/livelog/releases/download/v1.1.0/livelog-windows-amd64.exe", "C:\generic-worker\livelog.exe") - -# TaskClusterProxyDownload -$client.DownloadFile("https://github.com/taskcluster/taskcluster-proxy/releases/download/v5.1.0/taskcluster-proxy-windows-amd64.exe", "C:\generic-worker\taskcluster-proxy.exe") - -# NSSMDownload -$client.DownloadFile("https://nssm.cc/ci/nssm-2.24-103-gdee49fc.zip", "C:\Windows\Temp\NSSMInstall.zip") - -# NSSMInstall: NSSM is required to install Generic Worker as a service. Currently ZipInstall fails, so using 7z instead. -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -oC:\ C:\Windows\Temp\NSSMInstall.zip" -Wait -NoNewWindow - -# GenericWorkerInstall -Start-Process "C:\generic-worker\generic-worker.exe" -ArgumentList "install service --nssm C:\nssm-2.24-103-gdee49fc\win64\nssm.exe --config C:\generic-worker\generic-worker.config --configure-for-%MY_CLOUD%" -Wait -NoNewWindow - -# DisableDesktopInterrupt -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/disable-desktop-interrupt.reg", "C:\generic-worker\disable-desktop-interrupt.reg") - -# SetDefaultPrinter -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/SetDefaultPrinter.ps1", "C:\generic-worker\SetDefaultPrinter.ps1") - -# GenericWorkerStateWait -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/run-generic-worker-and-reboot.bat", "C:\generic-worker\run-generic-worker.bat") - -# TaskUserInitScript: Bug 1261188 - initialisation script for new task users -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/task-user-init-win10.cmd", "C:\generic-worker\task-user-init.cmd") - -# PipConfDirectory: https://pip.pypa.io/en/stable/user_guide/#config-file -md "C:\ProgramData\pip" - -# PipConf -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/pip.conf", "C:\ProgramData\pip\pip.ini") - -# virtualenv_support -md "C:\mozilla-build\python\Lib\site-packages\virtualenv_support" - -# virtualenv_support_pywin32 -$client.DownloadFile("https://pypi.python.org/packages/cp27/p/pypiwin32/pypiwin32-219-cp27-none-win32.whl#md5=a8b0c1b608c1afeb18cd38d759ee5e29", "C:\mozilla-build\python\Lib\site-packages\virtualenv_support\pypiwin32-219-cp27-none-win32.whl") - -# virtualenv_support_pywin32_amd64 -$client.DownloadFile("https://pypi.python.org/packages/cp27/p/pypiwin32/pypiwin32-219-cp27-none-win_amd64.whl#md5=d7bafcf3cce72c3ce9fdd633a262c335", "C:\mozilla-build\python\Lib\site-packages\virtualenv_support\pypiwin32-219-cp27-none-win_amd64.whl") - -# HgShared: allows builds to use `hg robustcheckout ...` -md "y:\hg-shared" - -# HgSharedAccessRights: allows builds to use `hg robustcheckout ...` -Start-Process "icacls.exe" -ArgumentList "y:\hg-shared /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# PipCache: share pip cache across subsequent task users -md "y:\pip-cache" - -# PipCacheAccessRights: share pip cache across subsequent task users -Start-Process "icacls.exe" -ArgumentList "y:\pip-cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_PIP_DOWNLOAD_CACHE: share pip download cache between tasks -[Environment]::SetEnvironmentVariable("PIP_DOWNLOAD_CACHE", "y:\pip-cache", "Machine") - -# TooltoolCache: share tooltool cache across subsequent task users -md "y:\tooltool-cache" - -# TooltoolCacheAccessRights: share tooltool cache across subsequent task users -Start-Process "icacls.exe" -ArgumentList "y:\tooltool-cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_TOOLTOOL_CACHE: share tooltool cache between tasks -[Environment]::SetEnvironmentVariable("TOOLTOOL_CACHE", "y:\tooltool-cache", "Machine") - -# CarbonClone: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "clone --insecure https://bitbucket.org/splatteredbits/carbon C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonUpdate: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "update 2.4.0 -R C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonInstall: Bug 1316329 - support creation of symlinks by task users -Start-Process "xcopy" -ArgumentList "C:\Windows\Temp\carbon\Carbon C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Carbon /e /i /y" -Wait -NoNewWindow - -# GrantEveryoneSeCreateSymbolicLinkPrivilege: Bug 1316329 - support creation of symlinks by task users -Start-Process "powershell" -ArgumentList "-command `"& {&'Import-Module' Carbon}`"; `"& {&'Grant-Privilege' -Identity Everyone -Privilege SeCreateSymbolicLinkPrivilege}`"" -Wait -NoNewWindow - -# MozillaMaintenanceDir: Working directory for Mozilla Maintenance Service installation -md "C:\dsc\MozillaMaintenance" - -# maintenanceservice_installer -$client.DownloadFile("https://github.com/mozilla-releng/OpenCloudConfig/blob/master/userdata/Configuration/Mozilla%20Maintenance%20Service/maintenanceservice_installer.exe?raw=true", "C:\dsc\MozillaMaintenance\maintenanceservice_installer.exe") - -# maintenanceservice -$client.DownloadFile("https://github.com/mozilla-releng/OpenCloudConfig/blob/master/userdata/Configuration/Mozilla%20Maintenance%20Service/maintenanceservice.exe?raw=true", "C:\dsc\MozillaMaintenance\maintenanceservice.exe") - -# maintenanceservice_install -Start-Process "C:\dsc\MozillaMaintenance\maintenanceservice_installer.exe" -ArgumentList "/s" -Wait -NoNewWindow - -# MaintenanceServiceAcessRights: See https://bugzilla.mozilla.org/show_bug.cgi?id=1067756#c21 -Start-Process "icacls.exe" -ArgumentList "`"C:\Program Files (x86)\Mozilla Maintenance Service`" /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# MozFakeCA_cer -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mozilla%20Maintenance%20Service/MozFakeCA.cer", "C:\dsc\MozillaMaintenance\MozFakeCA.cer") - -# MozFakeCA_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozFakeCA.cer" -Wait -NoNewWindow - -# MozFakeCA_2017_10_13_cer -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mozilla%20Maintenance%20Service/MozFakeCA_2017-10-13.cer", "C:\dsc\MozillaMaintenance\MozFakeCA_2017-10-13.cer") - -# MozFakeCA_2017_10_13_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozFakeCA_2017-10-13.cer" -Wait -NoNewWindow - -# MozRoot_cer -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/certs/MozRoot.cer", "C:\dsc\MozillaMaintenance\MozRoot.cer") - -# MozRoot_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozRoot.cer" -Wait -NoNewWindow - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "name" -Value "Mozilla Corporation" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "issuer" -Value "Thawte Code Signing CA - G2" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "publisherLink" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "name" -Value "Mozilla Fake SPC" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "issuer" -Value "Mozilla Fake CA" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "publisherLink" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "name" -Value "Mozilla Corporation" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "issuer" -Value "DigiCert SHA2 Assured ID Code Signing CA" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "publisherLink" -Value "" -PropertyType String -Force - -# GrantEveryoneMozillaRegistryWriteAccess: Bug 1353889 - Grant Everyone group write access to Mozilla registry key -Start-Process "powershell" -ArgumentList "-command `"& {(Get-Acl -Path 'HKLM:\SOFTWARE\Mozilla').SetAccessRule((New-Object -TypeName 'System.Security.AccessControl.RegistryAccessRule' -ArgumentList @('Everyone', 'FullControl', 'Allow')))}`"" -Wait -NoNewWindow - -# KmsIn -New-NetFirewallRule -DisplayName "KmsIn (TCP 1688 Inbound): Allow" -Direction Inbound -LocalPort 1688 -Protocol TCP -Action Allow - -# KmsOut -New-NetFirewallRule -DisplayName "KmsOut (TCP 1688 Outbound): Allow" -Direction Outbound -LocalPort 1688 -Protocol TCP -Action Allow - -# DisableFirewall: Bug 1358301 - Disable Windows Firewall -Start-Process "netsh" -ArgumentList "advfirewall set allprofiles state off" -Wait -NoNewWindow - -# nircmd -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/nircmd/nircmd.exe", "C:\Windows\System32\nircmd.exe") - -# nircmdc -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/nircmd/nircmdc.exe", "C:\Windows\System32\nircmdc.exe") - -# UltraVNC: VNC Server - not essential for building firefox -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/UltraVnc/UltraVnc_10962_x64.msi", "C:\binaries\UltraVnc_10962_x64.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\UltraVnc_10962_x64.msi /quiet" -Wait -NoNewWindow - -# Vnc_In -New-NetFirewallRule -DisplayName "Vnc_In (TCP 5900 Inbound): Allow" -Direction Inbound -LocalPort 5900 -Protocol TCP -Action Allow - -# reg_DisableNewAppAlert: Bug 1373551 - prevent dialog to confirm file association -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "NoNewAppAlert" -Value "1" -PropertyType Dword -Force - -# reg_NewNetworkWindowOff: https://bugzilla.mozilla.org/show_bug.cgi?id=1397201#c58 -New-Item -Path "HKLM:System\CurrentControlSet\Control\Network\NewNetworkWindowOff" -Force - -# reg_Power_PreferredPlan_HighPerformance: https://bugzilla.mozilla.org/show_bug.cgi?id=1362613 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\ControlPanel\NameSpace\{025A5937-A6BE-4686-A844-36FE4BEC8B6D}" -Name "PreferredPlan" -Value "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c" -PropertyType String -Force - -# Reg_WinDefend_DisableConfig: https://bugzilla.mozilla.org/show_bug.cgi?id=1365909 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows Defender" -Name "DisableConfig" -Value "0x00000001" -PropertyType Dword -Force - -# Reg_WinDefend_DisableAntiSpyware: https://bugzilla.mozilla.org/show_bug.cgi?id=1365909 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows Defender" -Name "DisableAntiSpyware" -Value "0x00000001" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_wscsvc: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\wscsvc" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_SecurityHealthService: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\SecurityHealthService" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_Sense: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\Sense" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdBoot: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdBoot" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdFilter: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdFilter" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdNisDrv: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdNisDrv" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdNisSvc: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdNisSvc" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WinDefend: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WinDefend" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# OpenSshDownload: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://github.com/PowerShell/Win32-OpenSSH/releases/download/v7.6.1.0p1-Beta/OpenSSH-Win64.zip", "C:\Windows\Temp\OpenSSH-Win64.zip") - -# OpenSshUnzip: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -o`"C:\Program Files`" C:\Windows\Temp\OpenSSH-Win64.zip" -Wait -NoNewWindow - -# SshIn -New-NetFirewallRule -DisplayName "SshIn (TCP 22 Inbound): Allow" -Direction Inbound -LocalPort 22 -Protocol TCP -Action Allow - -# InstallOpenSSH: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "powershell.exe" -ArgumentList "-ExecutionPolicy Bypass -File `"C:\Program Files\OpenSSH-Win64\install-sshd.ps1`"" -Wait -NoNewWindow - -# reg_OpenSSH_DefaultShell: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShell" -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force - -# reg_OpenSSH_DefaultShellCommandOption: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShellCommandOption" -Value "/c" -PropertyType String -Force - -# AdministratorSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\Users\Administrator\.ssh" - -# AdministratorSshAuthorisedKeys: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/authorized_keys", "C:\Users\Administrator\.ssh\authorized_keys") - -# ProgramDataSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\ProgramData\ssh" - -# sshd_config: https://bugzilla.mozilla.org/show_bug.cgi?id=1464343 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/sshd_config", "C:\ProgramData\ssh\sshd_config") - -# Start_sshd: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "sshd" -StartupType Automatic -Status Running - -# Start_sshagent: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "ssh-agent" -StartupType Automatic -Status Running - -# vcredist_vs2015_x86: https://bugzilla.mozilla.org/show_bug.cgi?id=1460042 -$client.DownloadFile("http://download.microsoft.com/download/f/3/9/f39b30ec-f8ef-4ba3-8cb4-e301fcf0e0aa/vc_redist.x86.exe", "C:\binaries\vc_redist.x86.exe") -Start-Process "C:\binaries\vc_redist.x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2015_x64: https://bugzilla.mozilla.org/show_bug.cgi?id=1460042 -$client.DownloadFile("http://download.microsoft.com/download/4/c/b/4cbd5757-0dd4-43a7-bac0-2a492cedbacb/vc_redist.x64.exe", "C:\binaries\vc_redist.x64.exe") -Start-Process "C:\binaries\vc_redist.x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x64-install.log" -Wait -NoNewWindow - -# WindowsPerformanceToolkit: https://bugzilla.mozilla.org/show_bug.cgi?id=1485757 -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/WindowsPerformanceToolkit/WPTx64-x86_en-us.msi", "C:\binaries\WPTx64-x86_en-us.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\WPTx64-x86_en-us.msi /quiet" -Wait -NoNewWindow - -# mozprofilerprobe: https://bugzilla.mozilla.org/show_bug.cgi?id=1485757 -$client.DownloadFile("http://hg.mozilla.org/mozilla-central/raw-file/360ab7771e27/toolkit/components/startup/mozprofilerprobe.mof", "C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\mozprofilerprobe.mof") - -# mofcomp_mozprofilerprobe: https://bugzilla.mozilla.org/show_bug.cgi?id=1485757 -Start-Process "mofcomp" -ArgumentList "`"C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\mozprofilerprobe.mof`"" -Wait -NoNewWindow - -# ProgramData_Mozilla_AccessRights: https://bugzilla.mozilla.org/show_bug.cgi?id=1494048 -Start-Process "icacls.exe" -ArgumentList "c:\ProgramData\Mozilla /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# HostsFile: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/etc/hosts", "C:\Windows\System32\drivers\etc\hosts") - -# SetHostsFileContent: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 - -# reg_WindowsUpdate_DeferUpgrade: https://bugzilla.mozilla.org/show_bug.cgi?id=1510220 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "DeferUpgrade" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_DeferUpgradePeriod: https://bugzilla.mozilla.org/show_bug.cgi?id=1510220 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "DeferUpgradePeriod" -Value "8" -PropertyType Dword -Force - -# reg_WindowsUpdate_DeferUpdatePeriod: https://bugzilla.mozilla.org/show_bug.cgi?id=1510220 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "DeferUpdatePeriod" -Value "4" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_NoAutoRebootWithLoggedOnUsers: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoRebootWithLoggedOnUsers" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_NoAutoUpdate: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoUpdate" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_AUOptions: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUOptions" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_ScheduledInstallDay: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "ScheduledInstallDay" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_ScheduledInstallTime: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "ScheduledInstallTime" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_AutomaticMaintenanceEnabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AutomaticMaintenanceEnabled" -Value "0" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_AllowMUUpdateService: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AllowMUUpdateService" -Value "0" -PropertyType Dword -Force - -# reg_ScheduleMaintenance_MaintenanceDisabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\Maintenance" -Name "MaintenanceDisabled" -Value "1" -PropertyType Dword -Force - -# env_TASKCLUSTER_ROOT_URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1551789 -[Environment]::SetEnvironmentVariable("TASKCLUSTER_ROOT_URL", "https://firefox-ci-tc.services.mozilla.com", "Machine") - -# programdata_google_auth: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -md "C:\ProgramData\Google\Auth" - -# stackdriver_key: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -cmd /c mklink "C:\ProgramData\Google\Auth\application_default_credentials.json" "C:\builds\taskcluster-worker-ec2@aws-stackdriver-log-1571127027.json" - -# now shutdown, in preparation for creating an image -# Stop-Computer isn't working, also not when specifying -AsJob, so reverting to using `shutdown` command instead -# * https://www.reddit.com/r/PowerShell/comments/65250s/windows_10_creators_update_stopcomputer_not/dgfofug/?st=j1o3oa29&sh=e0c29c6d -# * https://support.microsoft.com/en-in/help/4014551/description-of-the-security-and-quality-rollup-for-the-net-framework-4 -# * https://support.microsoft.com/en-us/help/4020459 -shutdown -s diff --git a/worker_types/gecko-t-win10-64-hw/aws_filters b/worker_types/gecko-t-win10-64-hw/aws_filters deleted file mode 100644 index 985e2cb1..00000000 --- a/worker_types/gecko-t-win10-64-hw/aws_filters +++ /dev/null @@ -1,2 +0,0 @@ -Name=platform,Values=windows -Name=name,Values=gecko-b-win2012-base-* diff --git a/worker_types/gecko-t-win10-64-hw/aws_owners b/worker_types/gecko-t-win10-64-hw/aws_owners deleted file mode 100644 index 38631e52..00000000 --- a/worker_types/gecko-t-win10-64-hw/aws_owners +++ /dev/null @@ -1,2 +0,0 @@ -self -amazon diff --git a/worker_types/gecko-t-win10-64/aws_filters b/worker_types/gecko-t-win10-64/aws_filters deleted file mode 100644 index 985e2cb1..00000000 --- a/worker_types/gecko-t-win10-64/aws_filters +++ /dev/null @@ -1,2 +0,0 @@ -Name=platform,Values=windows -Name=name,Values=gecko-b-win2012-base-* diff --git a/worker_types/gecko-t-win10-64/aws_owners b/worker_types/gecko-t-win10-64/aws_owners deleted file mode 100644 index 38631e52..00000000 --- a/worker_types/gecko-t-win10-64/aws_owners +++ /dev/null @@ -1,2 +0,0 @@ -self -amazon diff --git a/worker_types/gecko-t-win10-64/bootstrap.ps1 b/worker_types/gecko-t-win10-64/bootstrap.ps1 deleted file mode 100644 index 98acdb44..00000000 --- a/worker_types/gecko-t-win10-64/bootstrap.ps1 +++ /dev/null @@ -1,476 +0,0 @@ -################################################################################### -# Note, this powershell script is an *APPROXIMATION ONLY* to the steps that are run -# to build the AMIs for aws-provisioner-v1/gecko-t-win10-64. -# -# The authoratative host definition can be found at: -# -# * https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Manifest/gecko-t-win10-64.json -# -################################################################################### - -# use TLS 1.2 (see bug 1443595) -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -# capture env -Get-ChildItem Env: | Out-File "C:\install_env.txt" - -# needed for making http requests -$client = New-Object system.net.WebClient -$shell = new-object -com shell.application - -# utility function to download a zip file and extract it -function Extract-ZIPFile($file, $destination, $url) -{ - $client.DownloadFile($url, $file) - $zip = $shell.NameSpace($file) - foreach($item in $zip.items()) - { - $shell.Namespace($destination).copyhere($item) - } -} - -md C:\logs -md C:\binaries - -# LogDirectory: Required by OpenCloudConfig for DSC logging -md "C:\log" - -# StackdriverLogging: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://dl.google.com/cloudagents/windows/StackdriverLogging-v1-9.exe", "C:\binaries\StackdriverLogging-v1-9.exe") -Start-Process "C:\binaries\StackdriverLogging-v1-9.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# fluentd_gw_exe: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.exe.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.exe.conf") - -# fluentd_gw_service: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.service.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.service.conf") - -# fluentd_gw_wrapper: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.wrapper.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.wrapper.conf") - -# fluentd_occ: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/occ.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\occ.conf") - -# fluentd_redact: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/redact.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\redact.conf") - -# NxLog: Maintenance Toolchain - forwards event logs to papertrail -$client.DownloadFile("https://nxlog.co/system/files/products/files/348/nxlog-ce-2.10.2150.msi", "C:\binaries\nxlog-ce-2.10.2150.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\nxlog-ce-2.10.2150.msi /quiet" -Wait -NoNewWindow - -# PaperTrailEncryptionCertificate: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/papertrail-bundle.pem", "C:\Program Files (x86)\nxlog\cert\papertrail-bundle.pem") - -# NxLogPaperTrailConfiguration: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/win10.conf", "C:\Program Files (x86)\nxlog\conf\nxlog.conf") - -# Start_nxlog: Maintenance Toolchain - not essential for building firefox -Set-Service "nxlog" -StartupType Automatic -Status Running - -# ProcessExplorer: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessExplorer" -Extract-ZIPFile -File "C:\binaries\ProcessExplorer.zip" -Destination "C:\ProcessExplorer" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessExplorer/ProcessExplorer.zip" - -# ProcessMonitor: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessMonitor" -Extract-ZIPFile -File "C:\binaries\ProcessMonitor.zip" -Destination "C:\ProcessMonitor" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessMonitor/ProcessMonitor.zip" - -# GpgForWin: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://files.gpg4win.org/gpg4win-2.3.0.exe", "C:\binaries\gpg4win-2.3.0.exe") -Start-Process "C:\binaries\gpg4win-2.3.0.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SevenZip: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://7-zip.org/a/7z1514-x64.exe", "C:\binaries\7z1514-x64.exe") -Start-Process "C:\binaries\7z1514-x64.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SublimeText3: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://download.sublimetext.com/Sublime%20Text%20Build%203114%20x64%20Setup.exe", "C:\binaries\Sublime Text Build 3114 x64 Setup.exe") -Start-Process "C:\binaries\Sublime Text Build 3114 x64 Setup.exe" -ArgumentList "/VERYSILENT /NORESTART /TASKS=`"contextentry`"" -Wait -NoNewWindow - -# SublimeText3_PackagesFolder: Maintenance Toolchain - not essential for building firefox -md "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages" - -# SublimeText3_PackageControl: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://sublime.wbond.net/Package%20Control.sublime-package", "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\Package Control.sublime-package") - -# SystemPowerShellProfile: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Microsoft.PowerShell_profile.ps1", "C:\Windows\System32\WindowsPowerShell\v1.0\Microsoft.PowerShell_profile.ps1") - -# FsutilDisable8Dot3: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disable8dot3 1" -Wait -NoNewWindow - -# FsutilDisableLastAccess: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disablelastaccess 1" -Wait -NoNewWindow - -# home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\home" "C:\Users" - -# MozillaBuildSetup: https://bugzilla.mozilla.org/show_bug.cgi?id=1461340 -$client.DownloadFile("http://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-3.2.exe", "C:\binaries\MozillaBuildSetup-3.2.exe") -Start-Process "C:\binaries\MozillaBuildSetup-3.2.exe" -ArgumentList "/S /D=C:\mozilla-build" -Wait -NoNewWindow - -# DeleteMozillaBuildPython3PythonExe -Start-Process "cmd.exe" -ArgumentList "/c del /F /Q C:\mozilla-build\python3\python.exe" -Wait -NoNewWindow - -# msys_home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\mozilla-build\msys\home" "C:\Users" - -# DeleteMozillaBuildMercurial -Start-Process "cmd.exe" -ArgumentList "/c del C:\mozilla-build\python\Scripts\hg*" -Wait -NoNewWindow - -# Mercurial: https://bugzilla.mozilla.org/show_bug.cgi?id=1490703 -$client.DownloadFile("https://www.mercurial-scm.org/release/windows/mercurial-4.7.1-x64.msi", "C:\binaries\mercurial-4.7.1-x64.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\mercurial-4.7.1-x64.msi /quiet" -Wait -NoNewWindow - -# MercurialConfig: Required by clonebundle and share hg extensions -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/mercurial.ini", "C:\Program Files\Mercurial\Mercurial.ini") - -# robustcheckout: Required by robustcheckout hg extension -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/FirefoxBuildResources/robustcheckout.py", "C:\mozilla-build\robustcheckout.py") - -# MercurialCerts -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/cacert.pem", "C:\mozilla-build\msys\etc\cacert.pem") - -# env_MOZILLABUILD: Absolutely required for mozharness builds. Python will fall in a heap, throwing misleading exceptions without this. :) -[Environment]::SetEnvironmentVariable("MOZILLABUILD", "C:\mozilla-build", "Machine") - -# env_PATH - -# pip3_upgrade_pip -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade pip==19.2.3" -Wait -NoNewWindow - -# pip3_upgrade_zstandard -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade zstandard==0.11.1" -Wait -NoNewWindow - -# pip3_upgrade_certifi -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade certifi" -Wait -NoNewWindow - -# ToolToolInstall -$client.DownloadFile("https://raw.githubusercontent.com/mozilla/release-services/master/src/tooltool/client/tooltool.py", "C:\mozilla-build\tooltool.py") - -# reg_WindowsErrorReportingLocalDumps: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-Item -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Force - -# reg_WindowsErrorReportingDontShowUI: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "DontShowUI" -Value "0x00000001" -PropertyType Dword -Force - -# GenericWorkerDirectory -md "C:\generic-worker" - -# GenericWorkerDownload -$client.DownloadFile("https://github.com/taskcluster/generic-worker/releases/download/v16.5.1/generic-worker-multiuser-windows-amd64.exe", "C:\generic-worker\generic-worker.exe") - -# LiveLogDownload -$client.DownloadFile("https://github.com/taskcluster/livelog/releases/download/v1.1.0/livelog-windows-amd64.exe", "C:\generic-worker\livelog.exe") - -# TaskClusterProxyDownload -$client.DownloadFile("https://github.com/taskcluster/taskcluster-proxy/releases/download/v5.1.0/taskcluster-proxy-windows-amd64.exe", "C:\generic-worker\taskcluster-proxy.exe") - -# NSSMDownload -$client.DownloadFile("https://nssm.cc/ci/nssm-2.24-103-gdee49fc.zip", "C:\Windows\Temp\NSSMInstall.zip") - -# NSSMInstall: NSSM is required to install Generic Worker as a service. Currently ZipInstall fails, so using 7z instead. -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -oC:\ C:\Windows\Temp\NSSMInstall.zip" -Wait -NoNewWindow - -# GenericWorkerInstall -Start-Process "C:\generic-worker\generic-worker.exe" -ArgumentList "install service --nssm C:\nssm-2.24-103-gdee49fc\win64\nssm.exe --config C:\generic-worker\generic-worker.config --configure-for-%MY_CLOUD%" -Wait -NoNewWindow - -# DisableDesktopInterrupt -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/disable-desktop-interrupt.reg", "C:\generic-worker\disable-desktop-interrupt.reg") - -# SetDefaultPrinter -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/SetDefaultPrinter.ps1", "C:\generic-worker\SetDefaultPrinter.ps1") - -# GenericWorkerStateWait -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/run-generic-worker-and-reboot.bat", "C:\generic-worker\run-generic-worker.bat") - -# TaskUserInitScript: Bug 1261188 - initialisation script for new task users -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/task-user-init-win10.cmd", "C:\generic-worker\task-user-init.cmd") - -# PipConfDirectory: https://pip.pypa.io/en/stable/user_guide/#config-file -md "C:\ProgramData\pip" - -# PipConf -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/pip.conf", "C:\ProgramData\pip\pip.ini") - -# virtualenv_support -md "C:\mozilla-build\python\Lib\site-packages\virtualenv_support" - -# virtualenv_support_pywin32 -$client.DownloadFile("https://pypi.python.org/packages/cp27/p/pypiwin32/pypiwin32-219-cp27-none-win32.whl#md5=a8b0c1b608c1afeb18cd38d759ee5e29", "C:\mozilla-build\python\Lib\site-packages\virtualenv_support\pypiwin32-219-cp27-none-win32.whl") - -# virtualenv_support_pywin32_amd64 -$client.DownloadFile("https://pypi.python.org/packages/cp27/p/pypiwin32/pypiwin32-219-cp27-none-win_amd64.whl#md5=d7bafcf3cce72c3ce9fdd633a262c335", "C:\mozilla-build\python\Lib\site-packages\virtualenv_support\pypiwin32-219-cp27-none-win_amd64.whl") - -# HgShared: allows builds to use `hg robustcheckout ...` -md "y:\hg-shared" - -# HgSharedAccessRights: allows builds to use `hg robustcheckout ...` -Start-Process "icacls.exe" -ArgumentList "y:\hg-shared /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# PipCache: share pip cache across subsequent task users -md "y:\pip-cache" - -# PipCacheAccessRights: share pip cache across subsequent task users -Start-Process "icacls.exe" -ArgumentList "y:\pip-cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_PIP_DOWNLOAD_CACHE: share pip download cache between tasks -[Environment]::SetEnvironmentVariable("PIP_DOWNLOAD_CACHE", "y:\pip-cache", "Machine") - -# TooltoolCache: share tooltool cache across subsequent task users -md "y:\tooltool-cache" - -# TooltoolCacheAccessRights: share tooltool cache across subsequent task users -Start-Process "icacls.exe" -ArgumentList "y:\tooltool-cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_TOOLTOOL_CACHE: share tooltool cache between tasks -[Environment]::SetEnvironmentVariable("TOOLTOOL_CACHE", "y:\tooltool-cache", "Machine") - -# CarbonClone: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "clone --insecure https://bitbucket.org/splatteredbits/carbon C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonUpdate: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "update 2.4.0 -R C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonInstall: Bug 1316329 - support creation of symlinks by task users -Start-Process "xcopy" -ArgumentList "C:\Windows\Temp\carbon\Carbon C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Carbon /e /i /y" -Wait -NoNewWindow - -# GrantEveryoneSeCreateSymbolicLinkPrivilege: Bug 1316329 - support creation of symlinks by task users -Start-Process "powershell" -ArgumentList "-command `"& {&'Import-Module' Carbon}`"; `"& {&'Grant-Privilege' -Identity Everyone -Privilege SeCreateSymbolicLinkPrivilege}`"" -Wait -NoNewWindow - -# MozillaMaintenanceDir: Working directory for Mozilla Maintenance Service installation -md "C:\dsc\MozillaMaintenance" - -# maintenanceservice_installer -$client.DownloadFile("https://github.com/mozilla-releng/OpenCloudConfig/blob/master/userdata/Configuration/Mozilla%20Maintenance%20Service/maintenanceservice_installer.exe?raw=true", "C:\dsc\MozillaMaintenance\maintenanceservice_installer.exe") - -# maintenanceservice -$client.DownloadFile("https://github.com/mozilla-releng/OpenCloudConfig/blob/master/userdata/Configuration/Mozilla%20Maintenance%20Service/maintenanceservice.exe?raw=true", "C:\dsc\MozillaMaintenance\maintenanceservice.exe") - -# maintenanceservice_install -Start-Process "C:\dsc\MozillaMaintenance\maintenanceservice_installer.exe" -ArgumentList "/s" -Wait -NoNewWindow - -# MaintenanceServiceAcessRights: See https://bugzilla.mozilla.org/show_bug.cgi?id=1067756#c21 -Start-Process "icacls.exe" -ArgumentList "`"C:\Program Files (x86)\Mozilla Maintenance Service`" /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# MozFakeCA_cer -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mozilla%20Maintenance%20Service/MozFakeCA.cer", "C:\dsc\MozillaMaintenance\MozFakeCA.cer") - -# MozFakeCA_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozFakeCA.cer" -Wait -NoNewWindow - -# MozFakeCA_2017_10_13_cer -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mozilla%20Maintenance%20Service/MozFakeCA_2017-10-13.cer", "C:\dsc\MozillaMaintenance\MozFakeCA_2017-10-13.cer") - -# MozFakeCA_2017_10_13_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozFakeCA_2017-10-13.cer" -Wait -NoNewWindow - -# MozRoot_cer -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/certs/MozRoot.cer", "C:\dsc\MozillaMaintenance\MozRoot.cer") - -# MozRoot_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozRoot.cer" -Wait -NoNewWindow - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "name" -Value "Mozilla Corporation" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "issuer" -Value "Thawte Code Signing CA - G2" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "publisherLink" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "name" -Value "Mozilla Fake SPC" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "issuer" -Value "Mozilla Fake CA" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "publisherLink" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "name" -Value "Mozilla Corporation" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "issuer" -Value "DigiCert SHA2 Assured ID Code Signing CA" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "publisherLink" -Value "" -PropertyType String -Force - -# GrantEveryoneMozillaRegistryWriteAccess: Bug 1353889 - Grant Everyone group write access to Mozilla registry key -Start-Process "powershell" -ArgumentList "-command `"& {(Get-Acl -Path 'HKLM:\SOFTWARE\Mozilla').SetAccessRule((New-Object -TypeName 'System.Security.AccessControl.RegistryAccessRule' -ArgumentList @('Everyone', 'FullControl', 'Allow')))}`"" -Wait -NoNewWindow - -# DisableFirewall: Bug 1358301 - Disable Windows Firewall -Start-Process "netsh" -ArgumentList "advfirewall set allprofiles state off" -Wait -NoNewWindow - -# KmsIn -New-NetFirewallRule -DisplayName "KmsIn (TCP 1688 Inbound): Allow" -Direction Inbound -LocalPort 1688 -Protocol TCP -Action Allow - -# KmsOut -New-NetFirewallRule -DisplayName "KmsOut (TCP 1688 Outbound): Allow" -Direction Outbound -LocalPort 1688 -Protocol TCP -Action Allow - -# nircmd -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/nircmd/nircmd.exe", "C:\Windows\System32\nircmd.exe") - -# nircmdc -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/nircmd/nircmdc.exe", "C:\Windows\System32\nircmdc.exe") - -# reg_DisableNewAppAlert: Bug 1373551 - prevent dialog to confirm file association -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "NoNewAppAlert" -Value "1" -PropertyType Dword -Force - -# reg_NewNetworkWindowOff: https://bugzilla.mozilla.org/show_bug.cgi?id=1397201#c58 -New-Item -Path "HKLM:System\CurrentControlSet\Control\Network\NewNetworkWindowOff" -Force - -# reg_Power_PreferredPlan_HighPerformance: https://bugzilla.mozilla.org/show_bug.cgi?id=1362613 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\ControlPanel\NameSpace\{025A5937-A6BE-4686-A844-36FE4BEC8B6D}" -Name "PreferredPlan" -Value "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c" -PropertyType String -Force - -# Reg_WinDefend_DisableConfig: https://bugzilla.mozilla.org/show_bug.cgi?id=1365909 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows Defender" -Name "DisableConfig" -Value "0x00000001" -PropertyType Dword -Force - -# Reg_WinDefend_DisableAntiSpyware: https://bugzilla.mozilla.org/show_bug.cgi?id=1365909 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows Defender" -Name "DisableAntiSpyware" -Value "0x00000001" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_wscsvc: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\wscsvc" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_SecurityHealthService: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\SecurityHealthService" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_Sense: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\Sense" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdBoot: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdBoot" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdFilter: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdFilter" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdNisDrv: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdNisDrv" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdNisSvc: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdNisSvc" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WinDefend: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WinDefend" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# OpenSshDownload: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://github.com/PowerShell/Win32-OpenSSH/releases/download/v7.6.1.0p1-Beta/OpenSSH-Win64.zip", "C:\Windows\Temp\OpenSSH-Win64.zip") - -# OpenSshUnzip: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -o`"C:\Program Files`" C:\Windows\Temp\OpenSSH-Win64.zip" -Wait -NoNewWindow - -# SshIn -New-NetFirewallRule -DisplayName "SshIn (TCP 22 Inbound): Allow" -Direction Inbound -LocalPort 22 -Protocol TCP -Action Allow - -# InstallOpenSSH: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "powershell.exe" -ArgumentList "-ExecutionPolicy Bypass -File `"C:\Program Files\OpenSSH-Win64\install-sshd.ps1`"" -Wait -NoNewWindow - -# reg_OpenSSH_DefaultShell: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShell" -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force - -# reg_OpenSSH_DefaultShellCommandOption: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShellCommandOption" -Value "/c" -PropertyType String -Force - -# AdministratorSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\Users\Administrator\.ssh" - -# AdministratorSshAuthorisedKeys: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/authorized_keys", "C:\Users\Administrator\.ssh\authorized_keys") - -# ProgramDataSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\ProgramData\ssh" - -# sshd_config: https://bugzilla.mozilla.org/show_bug.cgi?id=1464343 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/sshd_config", "C:\ProgramData\ssh\sshd_config") - -# Start_sshd: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "sshd" -StartupType Automatic -Status Running - -# Start_sshagent: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "ssh-agent" -StartupType Automatic -Status Running - -# vcredist_vs2015_x86: https://bugzilla.mozilla.org/show_bug.cgi?id=1460042 -$client.DownloadFile("http://download.microsoft.com/download/f/3/9/f39b30ec-f8ef-4ba3-8cb4-e301fcf0e0aa/vc_redist.x86.exe", "C:\binaries\vc_redist.x86.exe") -Start-Process "C:\binaries\vc_redist.x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2015_x64: https://bugzilla.mozilla.org/show_bug.cgi?id=1460042 -$client.DownloadFile("http://download.microsoft.com/download/4/c/b/4cbd5757-0dd4-43a7-bac0-2a492cedbacb/vc_redist.x64.exe", "C:\binaries\vc_redist.x64.exe") -Start-Process "C:\binaries\vc_redist.x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x64-install.log" -Wait -NoNewWindow - -# WindowsPerformanceToolkit: https://bugzilla.mozilla.org/show_bug.cgi?id=1485757 -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/WindowsPerformanceToolkit/WPTx64-x86_en-us.msi", "C:\binaries\WPTx64-x86_en-us.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\WPTx64-x86_en-us.msi /quiet" -Wait -NoNewWindow - -# mozprofilerprobe: https://bugzilla.mozilla.org/show_bug.cgi?id=1485757 -$client.DownloadFile("http://hg.mozilla.org/mozilla-central/raw-file/360ab7771e27/toolkit/components/startup/mozprofilerprobe.mof", "C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\mozprofilerprobe.mof") - -# mofcomp_mozprofilerprobe: https://bugzilla.mozilla.org/show_bug.cgi?id=1485757 -Start-Process "mofcomp" -ArgumentList "`"C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\mozprofilerprobe.mof`"" -Wait -NoNewWindow - -# ProgramData_Mozilla_AccessRights: https://bugzilla.mozilla.org/show_bug.cgi?id=1494048 -Start-Process "icacls.exe" -ArgumentList "C:\ProgramData\Mozilla /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# HostsFile: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/etc/hosts", "C:\Windows\System32\drivers\etc\hosts") - -# SetHostsFileContent: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 - -# reg_WindowsUpdate_DeferUpgrade: https://bugzilla.mozilla.org/show_bug.cgi?id=1510220 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "DeferUpgrade" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_DeferUpgradePeriod: https://bugzilla.mozilla.org/show_bug.cgi?id=1510220 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "DeferUpgradePeriod" -Value "8" -PropertyType Dword -Force - -# reg_WindowsUpdate_DeferUpdatePeriod: https://bugzilla.mozilla.org/show_bug.cgi?id=1510220 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "DeferUpdatePeriod" -Value "4" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_NoAutoRebootWithLoggedOnUsers: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoRebootWithLoggedOnUsers" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_NoAutoUpdate: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoUpdate" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_AUOptions: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUOptions" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_ScheduledInstallDay: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "ScheduledInstallDay" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_ScheduledInstallTime: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "ScheduledInstallTime" -Value "1" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_AutomaticMaintenanceEnabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AutomaticMaintenanceEnabled" -Value "0" -PropertyType Dword -Force - -# reg_WindowsUpdate_AU_AllowMUUpdateService: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AllowMUUpdateService" -Value "0" -PropertyType Dword -Force - -# reg_ScheduleMaintenance_MaintenanceDisabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1485628 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\Maintenance" -Name "MaintenanceDisabled" -Value "1" -PropertyType Dword -Force - -# env_TASKCLUSTER_ROOT_URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1551789 -[Environment]::SetEnvironmentVariable("TASKCLUSTER_ROOT_URL", "https://firefox-ci-tc.services.mozilla.com", "Machine") - -# programdata_google_auth: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -md "C:\ProgramData\Google\Auth" - -# stackdriver_key: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -cmd /c mklink "C:\ProgramData\Google\Auth\application_default_credentials.json" "C:\builds\taskcluster-worker-ec2@aws-stackdriver-log-1571127027.json" - -# now shutdown, in preparation for creating an image -# Stop-Computer isn't working, also not when specifying -AsJob, so reverting to using `shutdown` command instead -# * https://www.reddit.com/r/PowerShell/comments/65250s/windows_10_creators_update_stopcomputer_not/dgfofug/?st=j1o3oa29&sh=e0c29c6d -# * https://support.microsoft.com/en-in/help/4014551/description-of-the-security-and-quality-rollup-for-the-net-framework-4 -# * https://support.microsoft.com/en-us/help/4020459 -shutdown -s diff --git a/worker_types/gecko-t-win10-a64-beta/bootstrap.ps1 b/worker_types/gecko-t-win10-a64-beta/bootstrap.ps1 deleted file mode 100644 index 779c72cb..00000000 --- a/worker_types/gecko-t-win10-a64-beta/bootstrap.ps1 +++ /dev/null @@ -1,494 +0,0 @@ -################################################################################### -# Note, this powershell script is an *APPROXIMATION ONLY* to the steps that are run -# to build the AMIs for aws-provisioner-v1/gecko-t-win10-a64-beta. -# -# The authoratative host definition can be found at: -# -# * https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Manifest/gecko-t-win10-a64-beta.json -# -################################################################################### - -# use TLS 1.2 (see bug 1443595) -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -# capture env -Get-ChildItem Env: | Out-File "C:\install_env.txt" - -# needed for making http requests -$client = New-Object system.net.WebClient -$shell = new-object -com shell.application - -# utility function to download a zip file and extract it -function Extract-ZIPFile($file, $destination, $url) -{ - $client.DownloadFile($url, $file) - $zip = $shell.NameSpace($file) - foreach($item in $zip.items()) - { - $shell.Namespace($destination).copyhere($item) - } -} - -md C:\logs -md C:\binaries - -# LogDirectory: Required by OpenCloudConfig for DSC logging -md "C:\log" - -# NxLog: Maintenance Toolchain - forwards event logs to papertrail -$client.DownloadFile("https://nxlog.co/system/files/products/files/348/nxlog-ce-2.10.2150.msi", "C:\binaries\nxlog-ce-2.10.2150.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\nxlog-ce-2.10.2150.msi /quiet" -Wait -NoNewWindow - -# PaperTrailEncryptionCertificate: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/papertrail-bundle.pem", "C:\Program Files (x86)\nxlog\cert\papertrail-bundle.pem") - -# NxLogPaperTrailConfiguration: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/win10arm64.conf", "C:\Program Files (x86)\nxlog\conf\nxlog.conf") - -# Start_nxlog: Maintenance Toolchain - not essential for building firefox -Set-Service "nxlog" -StartupType Automatic -Status Running - -# ProcessExplorer: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessExplorer" -Extract-ZIPFile -File "C:\binaries\ProcessExplorer.zip" -Destination "C:\ProcessExplorer" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessExplorer/ProcessExplorer.zip" - -# ProcessMonitor: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessMonitor" -Extract-ZIPFile -File "C:\binaries\ProcessMonitor.zip" -Destination "C:\ProcessMonitor" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessMonitor/ProcessMonitor.zip" - -# GpgForWin: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://files.gpg4win.org/gpg4win-2.3.0.exe", "C:\binaries\gpg4win-2.3.0.exe") -Start-Process "C:\binaries\gpg4win-2.3.0.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SevenZip: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://7-zip.org/a/7z1602.exe", "C:\binaries\7z1602.exe") -Start-Process "C:\binaries\7z1602.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SystemPowerShellProfile: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Microsoft.PowerShell_profile.ps1", "C:\Windows\System32\WindowsPowerShell\v1.0\Microsoft.PowerShell_profile.ps1") - -# FsutilDisable8Dot3: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disable8dot3 1" -Wait -NoNewWindow - -# FsutilDisableLastAccess: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disablelastaccess 1" -Wait -NoNewWindow - -# home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\home" "C:\Users" - -# MozillaBuildSetup: Base Firefox on Windows build requirement -$client.DownloadFile("http://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-2.2.0.exe", "C:\binaries\MozillaBuildSetup-2.2.0.exe") -Start-Process "C:\binaries\MozillaBuildSetup-2.2.0.exe" -ArgumentList "/S /D=C:\mozilla-build" -Wait -NoNewWindow - -# msys_home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\mozilla-build\msys\home" "C:\Users" - -# reg_PythonInstallPath -New-ItemProperty -Path "HKLM:SOFTWARE\Python\PythonCore\2.7\InstallPath" -Name "(Default)" -Value "C:\mozilla-build\python" -PropertyType String -Force - -# reg_PythonPath -New-ItemProperty -Path "HKLM:SOFTWARE\Python\PythonCore\2.7\PythonPath" -Name "(Default)" -Value "C:\mozilla-build\python\Lib;C:\mozilla-build\python\DLLs;C:\mozilla-build\python\Lib\lib-tk" -PropertyType String -Force - -# python_3_7_3_win32_core -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/core.msi", "C:\binaries\core.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\core.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_core_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/core_d.msi", "C:\binaries\core_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\core_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_core_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/core_pdb.msi", "C:\binaries\core_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\core_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_dev -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/dev.msi", "C:\binaries\dev.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\dev.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_dev_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/dev_d.msi", "C:\binaries\dev_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\dev_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_doc -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/doc.msi", "C:\binaries\doc.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\doc.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_exe -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/exe.msi", "C:\binaries\exe.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\exe.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_exe_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/exe_d.msi", "C:\binaries\exe_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\exe_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_exe_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/exe_pdb.msi", "C:\binaries\exe_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\exe_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_launcher -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/launcher.msi", "C:\binaries\launcher.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\launcher.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_lib -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/lib.msi", "C:\binaries\lib.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\lib.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_lib_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/lib_d.msi", "C:\binaries\lib_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\lib_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_lib_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/lib_pdb.msi", "C:\binaries\lib_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\lib_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_path -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/path.msi", "C:\binaries\path.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\path.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_pip -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/pip.msi", "C:\binaries\pip.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\pip.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_tcltk -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/tcltk.msi", "C:\binaries\tcltk.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\tcltk.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_tcltk_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/tcltk_d.msi", "C:\binaries\tcltk_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\tcltk_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_tcltk_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/tcltk_pdb.msi", "C:\binaries\tcltk_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\tcltk_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_test -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/test.msi", "C:\binaries\test.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\test.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_test_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/test_d.msi", "C:\binaries\test_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\test_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_test_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/test_pdb.msi", "C:\binaries\test_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\test_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_tools -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/tools.msi", "C:\binaries\tools.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\tools.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_ucrt -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/ucrt.msi", "C:\binaries\ucrt.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\ucrt.msi /quiet" -Wait -NoNewWindow - -# Python3: https://bugzilla.mozilla.org/show_bug.cgi?id=1545339 -cmd /c mklink "C:\mozilla-build\python3\python3.exe" "C:\mozilla-build\python3\python.exe" - -# DeleteMozillaBuildMercurial -Start-Process "cmd.exe" -ArgumentList "/c del C:\mozilla-build\python\Scripts\hg*" -Wait -NoNewWindow - -# Mercurial: https://bugzilla.mozilla.org/show_bug.cgi?id=1490703 -$client.DownloadFile("https://www.mercurial-scm.org/release/windows/mercurial-4.7.1-x86.msi", "C:\binaries\mercurial-4.7.1-x86.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\mercurial-4.7.1-x86.msi /quiet" -Wait -NoNewWindow - -# MercurialConfig: Required by clonebundle and share hg extensions -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/mercurial.ini", "C:\Program Files (x86)\Mercurial\Mercurial.ini") - -# robustcheckout: Required by robustcheckout hg extension -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/FirefoxBuildResources/robustcheckout.py", "C:\mozilla-build\robustcheckout.py") - -# MercurialCerts -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/cacert.pem", "C:\mozilla-build\msys\etc\cacert.pem") - -# env_MOZILLABUILD: Absolutely required for mozharness builds. Python will fall in a heap, throwing misleading exceptions without this. :) -[Environment]::SetEnvironmentVariable("MOZILLABUILD", "C:\mozilla-build", "Machine") - -# env_PATH - -# pip3_upgrade_pip -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade pip==19.2.3" -Wait -NoNewWindow - -# pip3_upgrade_zstandard -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade zstandard==0.11.1" -Wait -NoNewWindow - -# pip3_upgrade_certifi -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade certifi" -Wait -NoNewWindow - -# ToolToolInstall -$client.DownloadFile("https://raw.githubusercontent.com/mozilla/release-services/master/src/tooltool/client/tooltool.py", "C:\mozilla-build\tooltool.py") - -# reg_WindowsErrorReportingLocalDumps: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-Item -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Force - -# reg_WindowsErrorReportingDontShowUI: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "DontShowUI" -Value "0x00000001" -PropertyType Dword -Force - -# GenericWorkerDirectory -md "C:\generic-worker" - -# GenericWorkerDownload -$client.DownloadFile("https://github.com/taskcluster/generic-worker/releases/download/v14.1.2/generic-worker-nativeEngine-windows-386.exe", "C:\generic-worker\generic-worker.exe") - -# LiveLogDownload -$client.DownloadFile("https://github.com/taskcluster/livelog/releases/download/v1.1.0/livelog-windows-386.exe", "C:\generic-worker\livelog.exe") - -# TaskClusterProxyDownload -$client.DownloadFile("https://github.com/taskcluster/taskcluster-proxy/releases/download/v5.1.0/taskcluster-proxy-windows-386.exe", "C:\generic-worker\taskcluster-proxy.exe") - -# NSSMDownload -$client.DownloadFile("https://nssm.cc/ci/nssm-2.24-103-gdee49fc.zip", "C:\Windows\Temp\NSSMInstall.zip") - -# NSSMInstall: NSSM is required to install Generic Worker as a service. Currently ZipInstall fails, so using 7z instead. -Start-Process "C:\Program Files (x86)\7-Zip\7z.exe" -ArgumentList "x -aoa -oC:\ C:\Windows\Temp\NSSMInstall.zip" -Wait -NoNewWindow - -# GenericWorkerInstall -Start-Process "C:\generic-worker\generic-worker.exe" -ArgumentList "install service --nssm C:\nssm-2.24-103-gdee49fc\win32\nssm.exe --config C:\generic-worker\generic-worker.config" -Wait -NoNewWindow - -# DisableDesktopInterrupt -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/disable-desktop-interrupt.reg", "C:\generic-worker\disable-desktop-interrupt.reg") - -# SetDefaultPrinter -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/SetDefaultPrinter.ps1", "C:\generic-worker\SetDefaultPrinter.ps1") - -# GenericWorkerStateWait -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/run-hw-generic-worker-10-and-reboot.bat", "C:\generic-worker\run-generic-worker.bat") - -# TaskUserInitScript: Bug 1261188 - initialisation script for new task users -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/task-user-init-win10.cmd", "C:\generic-worker\task-user-init.cmd") - -# PipConfDirectory: https://pip.pypa.io/en/stable/user_guide/#config-file -md "C:\ProgramData\pip" - -# PipConf -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/pip.conf", "C:\ProgramData\pip\pip.ini") - -# virtualenv_support -md "C:\mozilla-build\python\Lib\site-packages\virtualenv_support" - -# virtualenv_support_pywin32 -$client.DownloadFile("https://pypi.python.org/packages/cp27/p/pypiwin32/pypiwin32-219-cp27-none-win32.whl#md5=a8b0c1b608c1afeb18cd38d759ee5e29", "C:\mozilla-build\python\Lib\site-packages\virtualenv_support\pypiwin32-219-cp27-none-win32.whl") - -# virtualenv_support_pywin32_amd64 -$client.DownloadFile("https://pypi.python.org/packages/cp27/p/pypiwin32/pypiwin32-219-cp27-none-win_amd64.whl#md5=d7bafcf3cce72c3ce9fdd633a262c335", "C:\mozilla-build\python\Lib\site-packages\virtualenv_support\pypiwin32-219-cp27-none-win_amd64.whl") - -# HgShared: allows builds to use `hg robustcheckout ...` -md "C:\hg-shared" - -# HgSharedAccessRights: allows builds to use `hg robustcheckout ...` -Start-Process "icacls.exe" -ArgumentList "C:\hg-shared /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# PipCache: share pip cache across subsequent task users -md "C:\pip-cache" - -# PipCacheAccessRights: share pip cache across subsequent task users -Start-Process "icacls.exe" -ArgumentList "C:\pip-cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_PIP_DOWNLOAD_CACHE: share pip download cache between tasks -[Environment]::SetEnvironmentVariable("PIP_DOWNLOAD_CACHE", "C:\pip-cache", "Machine") - -# TooltoolCache: share tooltool cache across subsequent task users -md "C:\tooltool-cache" - -# TooltoolCacheAccessRights: share tooltool cache across subsequent task users -Start-Process "icacls.exe" -ArgumentList "C:\tooltool-cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_TOOLTOOL_CACHE: share tooltool cache between tasks -[Environment]::SetEnvironmentVariable("TOOLTOOL_CACHE", "C:\tooltool-cache", "Machine") - -# ngen_executeQueuedItems: https://blogs.msdn.microsoft.com/dotnet/2013/08/06/wondering-why-mscorsvw-exe-has-high-cpu-usage-you-can-speed-it-up -Start-Process "c:\Windows\Microsoft.NET\Framework\v4.0.30319\ngen.exe" -ArgumentList "executeQueuedItems" -Wait -NoNewWindow - -# CarbonClone: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files (x86)\Mercurial\hg.exe" -ArgumentList "clone --insecure https://bitbucket.org/splatteredbits/carbon C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonUpdate: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files (x86)\Mercurial\hg.exe" -ArgumentList "update 2.4.0 -R C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonInstall: Bug 1316329 - support creation of symlinks by task users -Start-Process "xcopy" -ArgumentList "C:\Windows\Temp\carbon\Carbon C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Carbon /e /i /y" -Wait -NoNewWindow - -# GrantEveryoneSeCreateSymbolicLinkPrivilege: Bug 1316329 - support creation of symlinks by task users -Start-Process "powershell" -ArgumentList "-NoProfile -command `"& {&'Import-Module' Carbon}`"; `"& {&'Grant-Privilege' -Identity Everyone -Privilege SeCreateSymbolicLinkPrivilege}`"" -Wait -NoNewWindow - -# MozillaMaintenanceDir: Working directory for Mozilla Maintenance Service installation -md "C:\dsc\MozillaMaintenance" - -# maintenanceservice_installer -$client.DownloadFile("https://github.com/mozilla-releng/OpenCloudConfig/blob/master/userdata/Configuration/Mozilla%20Maintenance%20Service/maintenanceservice_installer.exe?raw=true", "C:\dsc\MozillaMaintenance\maintenanceservice_installer.exe") - -# maintenanceservice -$client.DownloadFile("https://github.com/mozilla-releng/OpenCloudConfig/blob/master/userdata/Configuration/Mozilla%20Maintenance%20Service/maintenanceservice.exe?raw=true", "C:\dsc\MozillaMaintenance\maintenanceservice.exe") - -# maintenanceservice_install -Start-Process "C:\dsc\MozillaMaintenance\maintenanceservice_installer.exe" -ArgumentList "/s" -Wait -NoNewWindow - -# MaintenanceServiceAcessRights: See https://bugzilla.mozilla.org/show_bug.cgi?id=1067756#c21 -Start-Process "icacls.exe" -ArgumentList "`"C:\Program Files (x86)\Mozilla Maintenance Service`" /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# MozFakeCA_cer -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mozilla%20Maintenance%20Service/MozFakeCA.cer", "C:\dsc\MozillaMaintenance\MozFakeCA.cer") - -# MozFakeCA_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozFakeCA.cer" -Wait -NoNewWindow - -# MozFakeCA_2017_10_13_cer -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mozilla%20Maintenance%20Service/MozFakeCA_2017-10-13.cer", "C:\dsc\MozillaMaintenance\MozFakeCA_2017-10-13.cer") - -# MozFakeCA_2017_10_13_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozFakeCA_2017-10-13.cer" -Wait -NoNewWindow - -# MozRoot_cer -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/certs/MozRoot.cer", "C:\dsc\MozillaMaintenance\MozRoot.cer") - -# MozRoot_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozRoot.cer" -Wait -NoNewWindow - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "name" -Value "Mozilla Corporation" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "issuer" -Value "Thawte Code Signing CA - G2" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "publisherLink" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "name" -Value "Mozilla Fake SPC" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "issuer" -Value "Mozilla Fake CA" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "publisherLink" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "name" -Value "Mozilla Corporation" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "issuer" -Value "DigiCert SHA2 Assured ID Code Signing CA" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "publisherLink" -Value "" -PropertyType String -Force - -# GrantEveryoneMozillaRegistryWriteAccess: Bug 1353889 - Grant all users account write access to Mozilla registry key -Start-Process "powershell" -ArgumentList "-NoProfile -command `"& {(Get-Acl -Path 'HKLM:\SOFTWARE\Mozilla').SetAccessRule((New-Object -TypeName 'System.Security.AccessControl.RegistryAccessRule' -ArgumentList @('Everyone', 'FullControl', 'Allow')))}`"" -Wait -NoNewWindow - -# KmsIn -New-NetFirewallRule -DisplayName "KmsIn (TCP 1688 Inbound): Allow" -Direction Inbound -LocalPort 1688 -Protocol TCP -Action Allow - -# KmsOut -New-NetFirewallRule -DisplayName "KmsOut (TCP 1688 Outbound): Allow" -Direction Outbound -LocalPort 1688 -Protocol TCP -Action Allow - -# jqInstall -$client.DownloadFile("https://github.com/stedolan/jq/releases/download/jq-1.6/jq-win32.exe", "C:\Windows\System32\jq.exe") - -# nircmd -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/nircmd/nircmd.exe", "C:\Windows\System32\nircmd.exe") - -# nircmdc -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/nircmd/nircmdc.exe", "C:\Windows\System32\nircmdc.exe") - -# reg_Power_PreferredPlan_HighPerformance: https://bugzilla.mozilla.org/show_bug.cgi?id=1362613 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\ControlPanel\NameSpace\{025A5937-A6BE-4686-A844-36FE4BEC8B6D}" -Name "PreferredPlan" -Value "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c" -PropertyType String -Force - -# Reg_WinDefend_DisableConfig: https://bugzilla.mozilla.org/show_bug.cgi?id=1365909 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows Defender" -Name "DisableConfig" -Value "0x00000001" -PropertyType Dword -Force - -# Reg_WinDefend_DisableAntiSpyware: https://bugzilla.mozilla.org/show_bug.cgi?id=1365909 -New-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows Defender" -Name "DisableAntiSpyware" -Value "0x00000001" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_wscsvc: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\wscsvc" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_SecurityHealthService: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\SecurityHealthService" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_Sense: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\Sense" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdBoot: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdBoot" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdFilter: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdFilter" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdNisDrv: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdNisDrv" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WdNisSvc: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WdNisSvc" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# RegServiceStartupType_Disabled_WinDefend: https://bugzilla.mozilla.org/show_bug.cgi?id=1509722 -New-ItemProperty -Path "HKLM:SYSTEM\CurrentControlSet\Services\WinDefend" -Name "Start" -Value "0x4" -PropertyType Dword -Force - -# OpenSshDownload: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://github.com/PowerShell/Win32-OpenSSH/releases/download/v7.6.1.0p1-Beta/OpenSSH-Win32.zip", "C:\Windows\Temp\OpenSSH-Win32.zip") - -# OpenSshUnzip: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "C:\Program Files (x86)\7-Zip\7z.exe" -ArgumentList "x -aoa -o`"C:\Program Files (x86)`" C:\Windows\Temp\OpenSSH-Win32.zip" -Wait -NoNewWindow - -# SshIn -New-NetFirewallRule -DisplayName "SshIn (TCP 22 Inbound): Allow" -Direction Inbound -LocalPort 22 -Protocol TCP -Action Allow - -# InstallOpenSSH: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "powershell.exe" -ArgumentList "-NoProfile -ExecutionPolicy Bypass -File `"C:\Program Files (x86)\OpenSSH-Win32\install-sshd.ps1`"" -Wait -NoNewWindow - -# reg_OpenSSH_DefaultShell: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShell" -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force - -# reg_OpenSSH_DefaultShellCommandOption: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShellCommandOption" -Value "/c" -PropertyType String -Force - -# AdministratorSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\Users\Administrator\.ssh" - -# AdministratorSshAuthorisedKeys: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/authorized_keys", "C:\Users\Administrator\.ssh\authorized_keys") - -# ProgramDataSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\ProgramData\ssh" - -# sshd_config: https://bugzilla.mozilla.org/show_bug.cgi?id=1464343 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/sshd_config", "C:\ProgramData\ssh\sshd_config") - -# Start_sshd: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "sshd" -StartupType Automatic -Status Running - -# Start_sshagent: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "ssh-agent" -StartupType Automatic -Status Running - -# vcredist_vs2015_x86: https://bugzilla.mozilla.org/show_bug.cgi?id=1460042 -$client.DownloadFile("http://download.microsoft.com/download/f/3/9/f39b30ec-f8ef-4ba3-8cb4-e301fcf0e0aa/vc_redist.x86.exe", "C:\binaries\vc_redist.x86.exe") -Start-Process "C:\binaries\vc_redist.x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2015_x64: https://bugzilla.mozilla.org/show_bug.cgi?id=1460042 -$client.DownloadFile("http://download.microsoft.com/download/4/c/b/4cbd5757-0dd4-43a7-bac0-2a492cedbacb/vc_redist.x64.exe", "C:\binaries\vc_redist.x64.exe") -Start-Process "C:\binaries\vc_redist.x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x64-install.log" -Wait -NoNewWindow - -# ProgramData_Mozilla_AccessRights: https://bugzilla.mozilla.org/show_bug.cgi?id=1494048 -Start-Process "icacls.exe" -ArgumentList "c:\ProgramData\Mozilla /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_TASKCLUSTER_ROOT_URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1551789 -[Environment]::SetEnvironmentVariable("TASKCLUSTER_ROOT_URL", "https://firefox-ci-tc.services.mozilla.com", "Machine") - -# hw-startup-check_ps1: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/hw-startup-check.ps1", "C:\DSC\hw-startup-check.ps1") - -# EndOfManifest.semaphore: https://bugzilla.mozilla.org/show_bug.cgi?id=1494704 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/EndOfManifest.semaphore", "C:\DSC\EndOfManifest.semaphore") - -# now shutdown, in preparation for creating an image -# Stop-Computer isn't working, also not when specifying -AsJob, so reverting to using `shutdown` command instead -# * https://www.reddit.com/r/PowerShell/comments/65250s/windows_10_creators_update_stopcomputer_not/dgfofug/?st=j1o3oa29&sh=e0c29c6d -# * https://support.microsoft.com/en-in/help/4014551/description-of-the-security-and-quality-rollup-for-the-net-framework-4 -# * https://support.microsoft.com/en-us/help/4020459 -shutdown -s diff --git a/worker_types/gecko-t-win7-32-beta/aws_filters b/worker_types/gecko-t-win7-32-beta/aws_filters deleted file mode 100644 index 985e2cb1..00000000 --- a/worker_types/gecko-t-win7-32-beta/aws_filters +++ /dev/null @@ -1,2 +0,0 @@ -Name=platform,Values=windows -Name=name,Values=gecko-b-win2012-base-* diff --git a/worker_types/gecko-t-win7-32-beta/aws_owners b/worker_types/gecko-t-win7-32-beta/aws_owners deleted file mode 100644 index 38631e52..00000000 --- a/worker_types/gecko-t-win7-32-beta/aws_owners +++ /dev/null @@ -1,2 +0,0 @@ -self -amazon diff --git a/worker_types/gecko-t-win7-32-beta/bootstrap.ps1 b/worker_types/gecko-t-win7-32-beta/bootstrap.ps1 deleted file mode 100644 index d9b0482c..00000000 --- a/worker_types/gecko-t-win7-32-beta/bootstrap.ps1 +++ /dev/null @@ -1,501 +0,0 @@ -################################################################################### -# Note, this powershell script is an *APPROXIMATION ONLY* to the steps that are run -# to build the AMIs for aws-provisioner-v1/gecko-t-win7-32-beta. -# -# The authoratative host definition can be found at: -# -# * https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Manifest/gecko-t-win7-32-beta.json -# -################################################################################### - -# use TLS 1.2 (see bug 1443595) -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -# capture env -Get-ChildItem Env: | Out-File "C:\install_env.txt" - -# needed for making http requests -$client = New-Object system.net.WebClient -$shell = new-object -com shell.application - -# utility function to download a zip file and extract it -function Extract-ZIPFile($file, $destination, $url) -{ - $client.DownloadFile($url, $file) - $zip = $shell.NameSpace($file) - foreach($item in $zip.items()) - { - $shell.Namespace($destination).copyhere($item) - } -} - -md C:\logs -md C:\binaries - -# KillXenDPriv.exe: See https://bugzilla.mozilla.org/show_bug.cgi?id=1399401#c43 and https://bugzilla.mozilla.org/show_bug.cgi?id=1394757 -Start-Process "taskkill" -ArgumentList "/im XenDPriv.exe /f" -Wait -NoNewWindow - -# DeleteXenDPriv.exe: See https://bugzilla.mozilla.org/show_bug.cgi?id=1399401#c43 and https://bugzilla.mozilla.org/show_bug.cgi?id=1394757 -Start-Process "cmd.exe" -ArgumentList "/c del /f /q `"C:\Program Files\Citrix\XenTools\XenDPriv.exe`"" -Wait -NoNewWindow - -# LogDirectory: Required by OpenCloudConfig for DSC logging -md "C:\log" - -# StackdriverLogging: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://dl.google.com/cloudagents/windows/StackdriverLogging-v1-9.exe", "C:\binaries\StackdriverLogging-v1-9.exe") -Start-Process "C:\binaries\StackdriverLogging-v1-9.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# fluentd_gw_exe: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.exe.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.exe.conf") - -# fluentd_gw_service: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.service.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.service.conf") - -# fluentd_gw_wrapper: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.wrapper.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.wrapper.conf") - -# fluentd_occ: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/occ.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\occ.conf") - -# fluentd_redact: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/redact.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\redact.conf") - -# NxLog: Maintenance Toolchain - forwards event logs to papertrail -$client.DownloadFile("https://nxlog.co/system/files/products/files/348/nxlog-ce-2.10.2150.msi", "C:\binaries\nxlog-ce-2.10.2150.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\nxlog-ce-2.10.2150.msi /quiet" -Wait -NoNewWindow - -# PaperTrailEncryptionCertificate: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/papertrail-bundle.pem", "C:\Program Files\nxlog\cert\papertrail-bundle.pem") - -# NxLogPaperTrailConfiguration: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/win7.conf", "C:\Program Files\nxlog\conf\nxlog.conf") - -# Start_nxlog: Maintenance Toolchain - not essential for building firefox -Set-Service "nxlog" -StartupType Automatic -Status Running - -# ProcessExplorer: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessExplorer" -Extract-ZIPFile -File "C:\binaries\ProcessExplorer.zip" -Destination "C:\ProcessExplorer" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessExplorer/ProcessExplorer.zip" - -# ProcessMonitor: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessMonitor" -Extract-ZIPFile -File "C:\binaries\ProcessMonitor.zip" -Destination "C:\ProcessMonitor" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessMonitor/ProcessMonitor.zip" - -# GpgForWin: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://files.gpg4win.org/gpg4win-2.3.0.exe", "C:\binaries\gpg4win-2.3.0.exe") -Start-Process "C:\binaries\gpg4win-2.3.0.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SevenZip: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://7-zip.org/a/7z1602.exe", "C:\binaries\7z1602.exe") -Start-Process "C:\binaries\7z1602.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SublimeText3: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://download.sublimetext.com/Sublime%20Text%20Build%203114%20Setup.exe", "C:\binaries\Sublime Text Build 3114 Setup.exe") -Start-Process "C:\binaries\Sublime Text Build 3114 Setup.exe" -ArgumentList "/VERYSILENT /NORESTART /TASKS=`"contextentry`"" -Wait -NoNewWindow - -# SublimeText3_PackagesFolder: Maintenance Toolchain - not essential for building firefox -md "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages" - -# SublimeText3_PackageControl: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://sublime.wbond.net/Package%20Control.sublime-package", "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\Package Control.sublime-package") - -# SystemPowerShellProfile: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Microsoft.PowerShell_profile.ps1", "C:\Windows\System32\WindowsPowerShell\v1.0\Microsoft.PowerShell_profile.ps1") - -# FsutilDisable8Dot3: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disable8dot3 1" -Wait -NoNewWindow - -# FsutilDisableLastAccess: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disablelastaccess 1" -Wait -NoNewWindow - -# home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\home" "C:\Users" - -# MozillaBuildSetup: Base Firefox on Windows build requirement -$client.DownloadFile("http://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-2.2.0.exe", "C:\binaries\MozillaBuildSetup-2.2.0.exe") -Start-Process "C:\binaries\MozillaBuildSetup-2.2.0.exe" -ArgumentList "/S /D=C:\mozilla-build" -Wait -NoNewWindow - -# msys_home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\mozilla-build\msys\home" "C:\Users" - -# reg_PythonInstallPath -New-ItemProperty -Path "HKLM:SOFTWARE\Python\PythonCore\2.7\InstallPath" -Name "(Default)" -Value "C:\mozilla-build\python" -PropertyType String -Force - -# reg_PythonPath -New-ItemProperty -Path "HKLM:SOFTWARE\Python\PythonCore\2.7\PythonPath" -Name "(Default)" -Value "C:\mozilla-build\python\Lib;C:\mozilla-build\python\DLLs;C:\mozilla-build\python\Lib\lib-tk" -PropertyType String -Force - -# python_3_7_3_win32_core -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/core.msi", "C:\binaries\core.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\core.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_core_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/core_d.msi", "C:\binaries\core_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\core_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_core_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/core_pdb.msi", "C:\binaries\core_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\core_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_dev -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/dev.msi", "C:\binaries\dev.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\dev.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_dev_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/dev_d.msi", "C:\binaries\dev_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\dev_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_doc -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/doc.msi", "C:\binaries\doc.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\doc.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_exe -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/exe.msi", "C:\binaries\exe.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\exe.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_exe_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/exe_d.msi", "C:\binaries\exe_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\exe_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_exe_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/exe_pdb.msi", "C:\binaries\exe_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\exe_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_launcher -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/launcher.msi", "C:\binaries\launcher.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\launcher.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_lib -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/lib.msi", "C:\binaries\lib.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\lib.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_lib_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/lib_d.msi", "C:\binaries\lib_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\lib_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_lib_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/lib_pdb.msi", "C:\binaries\lib_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\lib_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_path -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/path.msi", "C:\binaries\path.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\path.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_pip -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/pip.msi", "C:\binaries\pip.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\pip.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_tcltk -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/tcltk.msi", "C:\binaries\tcltk.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\tcltk.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_tcltk_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/tcltk_d.msi", "C:\binaries\tcltk_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\tcltk_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_tcltk_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/tcltk_pdb.msi", "C:\binaries\tcltk_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\tcltk_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_test -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/test.msi", "C:\binaries\test.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\test.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_test_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/test_d.msi", "C:\binaries\test_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\test_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_test_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/test_pdb.msi", "C:\binaries\test_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\test_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_tools -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/tools.msi", "C:\binaries\tools.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\tools.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_ucrt -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/ucrt.msi", "C:\binaries\ucrt.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\ucrt.msi /quiet" -Wait -NoNewWindow - -# Python3: https://bugzilla.mozilla.org/show_bug.cgi?id=1545339 -cmd /c mklink "C:\mozilla-build\python3\python3.exe" "C:\mozilla-build\python3\python.exe" - -# DeleteMozillaBuildMercurial -Start-Process "cmd.exe" -ArgumentList "/c del C:\mozilla-build\python\Scripts\hg*" -Wait -NoNewWindow - -# Mercurial: https://bugzilla.mozilla.org/show_bug.cgi?id=1490703 -$client.DownloadFile("https://www.mercurial-scm.org/release/windows/mercurial-4.7.1-x86.msi", "C:\binaries\mercurial-4.7.1-x86.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\mercurial-4.7.1-x86.msi /quiet" -Wait -NoNewWindow - -# MercurialConfig: Required by clonebundle and share hg extensions -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/mercurial.ini", "C:\Program Files\Mercurial\Mercurial.ini") - -# robustcheckout: Required by robustcheckout hg extension -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/FirefoxBuildResources/robustcheckout.py", "C:\mozilla-build\robustcheckout.py") - -# MercurialCerts -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/cacert.pem", "C:\mozilla-build\msys\etc\cacert.pem") - -# env_MOZILLABUILD: Absolutely required for mozharness builds. Python will fall in a heap, throwing misleading exceptions without this. :) -[Environment]::SetEnvironmentVariable("MOZILLABUILD", "C:\mozilla-build", "Machine") - -# env_PATH - -# pip3_upgrade_pip -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade pip==19.2.3" -Wait -NoNewWindow - -# pip3_upgrade_zstandard -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade zstandard==0.11.1" -Wait -NoNewWindow - -# pip3_upgrade_certifi -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade certifi" -Wait -NoNewWindow - -# ToolToolInstall -$client.DownloadFile("https://raw.githubusercontent.com/mozilla/release-services/master/src/tooltool/client/tooltool.py", "C:\mozilla-build\tooltool.py") - -# reg_WindowsErrorReportingLocalDumps: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-Item -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Force - -# reg_WindowsErrorReportingDontShowUI: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "DontShowUI" -Value "0x00000001" -PropertyType Dword -Force - -# GenericWorkerDirectory -md "C:\generic-worker" - -# GenericWorkerDownload -$client.DownloadFile("https://github.com/taskcluster/generic-worker/releases/download/v16.5.5/generic-worker-multiuser-windows-386.exe", "C:\generic-worker\generic-worker.exe") - -# LiveLogDownload -$client.DownloadFile("https://github.com/taskcluster/livelog/releases/download/v1.1.0/livelog-windows-386.exe", "C:\generic-worker\livelog.exe") - -# TaskClusterProxyDownload -$client.DownloadFile("https://github.com/taskcluster/taskcluster-proxy/releases/download/v5.1.0/taskcluster-proxy-windows-386.exe", "C:\generic-worker\taskcluster-proxy.exe") - -# NSSMDownload -$client.DownloadFile("https://nssm.cc/ci/nssm-2.24-103-gdee49fc.zip", "C:\Windows\Temp\NSSMInstall.zip") - -# NSSMInstall: NSSM is required to install Generic Worker as a service. Currently ZipInstall fails, so using 7z instead. -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -oC:\ C:\Windows\Temp\NSSMInstall.zip" -Wait -NoNewWindow - -# GenericWorkerInstall -Start-Process "C:\generic-worker\generic-worker.exe" -ArgumentList "install service --nssm C:\nssm-2.24-103-gdee49fc\win32\nssm.exe --config C:\generic-worker\generic-worker.config --configure-for-%MY_CLOUD%" -Wait -NoNewWindow - -# DisableDesktopInterrupt -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/disable-desktop-interrupt.reg", "C:\generic-worker\disable-desktop-interrupt.reg") - -# GenericWorkerStateWait -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/run-generic-worker-and-reboot.bat", "C:\generic-worker\run-generic-worker.bat") - -# TaskUserInitScript: https://bugzilla.mozilla.org/show_bug.cgi?id=1433851#c19 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/task-user-init-win7.cmd", "C:\generic-worker\task-user-init.cmd") - -# PipConfDirectory: https://pip.pypa.io/en/stable/user_guide/#config-file -md "C:\ProgramData\pip" - -# PipConf -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/pip.conf", "C:\ProgramData\pip\pip.ini") - -# virtualenv_support -md "C:\mozilla-build\python\Lib\site-packages\virtualenv_support" - -# virtualenv_support_pywin32 -$client.DownloadFile("https://pypi.python.org/packages/cp27/p/pypiwin32/pypiwin32-219-cp27-none-win32.whl#md5=a8b0c1b608c1afeb18cd38d759ee5e29", "C:\mozilla-build\python\Lib\site-packages\virtualenv_support\pypiwin32-219-cp27-none-win32.whl") - -# virtualenv_support_pywin32_amd64 -$client.DownloadFile("https://pypi.python.org/packages/cp27/p/pypiwin32/pypiwin32-219-cp27-none-win_amd64.whl#md5=d7bafcf3cce72c3ce9fdd633a262c335", "C:\mozilla-build\python\Lib\site-packages\virtualenv_support\pypiwin32-219-cp27-none-win_amd64.whl") - -# HgShared: allows builds to use `hg robustcheckout ...` -md "y:\hg-shared" - -# HgSharedAccessRights: allows builds to use `hg robustcheckout ...` -Start-Process "icacls.exe" -ArgumentList "y:\hg-shared /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# PipCache: share pip cache across subsequent task users -md "y:\pip-cache" - -# PipCacheAccessRights: share pip cache across subsequent task users -Start-Process "icacls.exe" -ArgumentList "y:\pip-cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_PIP_DOWNLOAD_CACHE: share pip download cache between tasks -[Environment]::SetEnvironmentVariable("PIP_DOWNLOAD_CACHE", "y:\pip-cache", "Machine") - -# TooltoolCache: share tooltool cache across subsequent task users -md "y:\tooltool-cache" - -# TooltoolCacheAccessRights: share tooltool cache across subsequent task users -Start-Process "icacls.exe" -ArgumentList "y:\tooltool-cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_TOOLTOOL_CACHE: share tooltool cache between tasks -[Environment]::SetEnvironmentVariable("TOOLTOOL_CACHE", "y:\tooltool-cache", "Machine") - -# ngen_executeQueuedItems: https://blogs.msdn.microsoft.com/dotnet/2013/08/06/wondering-why-mscorsvw-exe-has-high-cpu-usage-you-can-speed-it-up -Start-Process "c:\Windows\Microsoft.NET\Framework\v4.0.30319\ngen.exe" -ArgumentList "executeQueuedItems" -Wait -NoNewWindow - -# CarbonClone: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "clone --insecure https://bitbucket.org/splatteredbits/carbon C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonUpdate: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "update 2.4.0 -R C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonInstall: Bug 1316329 - support creation of symlinks by task users -Start-Process "xcopy" -ArgumentList "C:\Windows\Temp\carbon\Carbon C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Carbon /e /i /y" -Wait -NoNewWindow - -# GrantEveryoneSeCreateSymbolicLinkPrivilege: Bug 1316329 - support creation of symlinks by task users -Start-Process "powershell" -ArgumentList "-command `"& {&'Import-Module' Carbon}`"; `"& {&'Grant-Privilege' -Identity Everyone -Privilege SeCreateSymbolicLinkPrivilege}`"" -Wait -NoNewWindow - -# MozillaMaintenanceDir: Working directory for Mozilla Maintenance Service installation -md "C:\dsc\MozillaMaintenance" - -# maintenanceservice_installer -$client.DownloadFile("https://github.com/mozilla-releng/OpenCloudConfig/blob/master/userdata/Configuration/Mozilla%20Maintenance%20Service/maintenanceservice_installer.exe?raw=true", "C:\dsc\MozillaMaintenance\maintenanceservice_installer.exe") - -# maintenanceservice -$client.DownloadFile("https://github.com/mozilla-releng/OpenCloudConfig/blob/master/userdata/Configuration/Mozilla%20Maintenance%20Service/maintenanceservice.exe?raw=true", "C:\dsc\MozillaMaintenance\maintenanceservice.exe") - -# maintenanceservice_install -Start-Process "C:\dsc\MozillaMaintenance\maintenanceservice_installer.exe" -ArgumentList "/s" -Wait -NoNewWindow - -# MaintenanceServiceAcessRights: See https://bugzilla.mozilla.org/show_bug.cgi?id=1067756#c21 -Start-Process "icacls.exe" -ArgumentList "`"C:\Program Files\Mozilla Maintenance Service`" /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# MozFakeCA_cer -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mozilla%20Maintenance%20Service/MozFakeCA.cer", "C:\dsc\MozillaMaintenance\MozFakeCA.cer") - -# MozFakeCA_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozFakeCA.cer" -Wait -NoNewWindow - -# MozFakeCA_2017_10_13_cer -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mozilla%20Maintenance%20Service/MozFakeCA_2017-10-13.cer", "C:\dsc\MozillaMaintenance\MozFakeCA_2017-10-13.cer") - -# MozFakeCA_2017_10_13_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozFakeCA_2017-10-13.cer" -Wait -NoNewWindow - -# MozRoot_cer -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/certs/MozRoot.cer", "C:\dsc\MozillaMaintenance\MozRoot.cer") - -# MozRoot_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozRoot.cer" -Wait -NoNewWindow - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "name" -Value "Mozilla Corporation" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "issuer" -Value "Thawte Code Signing CA - G2" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "publisherLink" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "name" -Value "Mozilla Fake SPC" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "issuer" -Value "Mozilla Fake CA" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "publisherLink" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "name" -Value "Mozilla Corporation" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "issuer" -Value "DigiCert SHA2 Assured ID Code Signing CA" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "publisherLink" -Value "" -PropertyType String -Force - -# GrantEveryoneMozillaRegistryWriteAccess: Bug 1353889 - Grant all users account write access to Mozilla registry key -Start-Process "powershell" -ArgumentList "-command `"& {(Get-Acl -Path 'HKLM:\SOFTWARE\Mozilla').SetAccessRule((New-Object -TypeName 'System.Security.AccessControl.RegistryAccessRule' -ArgumentList @('Everyone', 'FullControl', 'Allow')))}`"" -Wait -NoNewWindow - -# KmsIn -New-NetFirewallRule -DisplayName "KmsIn (TCP 1688 Inbound): Allow" -Direction Inbound -LocalPort 1688 -Protocol TCP -Action Allow - -# KmsOut -New-NetFirewallRule -DisplayName "KmsOut (TCP 1688 Outbound): Allow" -Direction Outbound -LocalPort 1688 -Protocol TCP -Action Allow - -# nircmd -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/nircmd/nircmd.exe", "C:\Windows\System32\nircmd.exe") - -# nircmdc -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/nircmd/nircmdc.exe", "C:\Windows\System32\nircmdc.exe") - -# reg_Power_PreferredPlan_HighPerformance: https://bugzilla.mozilla.org/show_bug.cgi?id=1362613 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\ControlPanel\NameSpace\{025A5937-A6BE-4686-A844-36FE4BEC8B6D}" -Name "PreferredPlan" -Value "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c" -PropertyType String -Force - -# DisableWinDefend: https://bugzilla.mozilla.org/show_bug.cgi?id=1365909 -Set-Service "WinDefend" -StartupType Disabled -Status Stopped - -# OpenSshDownload: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://github.com/PowerShell/Win32-OpenSSH/releases/download/v7.6.1.0p1-Beta/OpenSSH-Win32.zip", "C:\Windows\Temp\OpenSSH-Win32.zip") - -# OpenSshUnzip: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -o`"C:\Program Files`" C:\Windows\Temp\OpenSSH-Win32.zip" -Wait -NoNewWindow - -# SshIn -New-NetFirewallRule -DisplayName "SshIn (TCP 22 Inbound): Allow" -Direction Inbound -LocalPort 22 -Protocol TCP -Action Allow - -# InstallOpenSSH: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "powershell.exe" -ArgumentList "-ExecutionPolicy Bypass -File `"C:\Program Files\OpenSSH-Win32\install-sshd.ps1`"" -Wait -NoNewWindow - -# reg_OpenSSH_DefaultShell: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShell" -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force - -# reg_OpenSSH_DefaultShellCommandOption: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShellCommandOption" -Value "/c" -PropertyType String -Force - -# AdministratorSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\Users\Administrator\.ssh" - -# AdministratorSshAuthorisedKeys: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/authorized_keys", "C:\Users\Administrator\.ssh\authorized_keys") - -# ProgramDataSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\ProgramData\ssh" - -# sshd_config: https://bugzilla.mozilla.org/show_bug.cgi?id=1464343 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/sshd_config", "C:\ProgramData\ssh\sshd_config") - -# Start_sshd: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "sshd" -StartupType Automatic -Status Running - -# Start_sshagent: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "ssh-agent" -StartupType Automatic -Status Running - -# vcredist_vs2015_x86: https://bugzilla.mozilla.org/show_bug.cgi?id=1460042 -$client.DownloadFile("http://download.microsoft.com/download/f/3/9/f39b30ec-f8ef-4ba3-8cb4-e301fcf0e0aa/vc_redist.x86.exe", "C:\binaries\vc_redist.x86.exe") -Start-Process "C:\binaries\vc_redist.x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2015_x64: https://bugzilla.mozilla.org/show_bug.cgi?id=1460042 -$client.DownloadFile("http://download.microsoft.com/download/4/c/b/4cbd5757-0dd4-43a7-bac0-2a492cedbacb/vc_redist.x64.exe", "C:\binaries\vc_redist.x64.exe") -Start-Process "C:\binaries\vc_redist.x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x64-install.log" -Wait -NoNewWindow - -# ProgramData_Mozilla_AccessRights: https://bugzilla.mozilla.org/show_bug.cgi?id=1494048 -Start-Process "icacls.exe" -ArgumentList "c:\ProgramData\Mozilla /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# HostsFile: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/etc/hosts", "C:\Windows\System32\drivers\etc\hosts") - -# SetHostsFileContent: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 - -# env_TASKCLUSTER_ROOT_URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1551789 -[Environment]::SetEnvironmentVariable("TASKCLUSTER_ROOT_URL", "https://firefox-ci-tc.services.mozilla.com", "Machine") - -# programdata_google_auth: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -md "C:\ProgramData\Google\Auth" - -# stackdriver_key: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -cmd /c mklink "C:\ProgramData\Google\Auth\application_default_credentials.json" "C:\builds\taskcluster-worker-ec2@aws-stackdriver-log-1571127027.json" - -# now shutdown, in preparation for creating an image -# Stop-Computer isn't working, also not when specifying -AsJob, so reverting to using `shutdown` command instead -# * https://www.reddit.com/r/PowerShell/comments/65250s/windows_10_creators_update_stopcomputer_not/dgfofug/?st=j1o3oa29&sh=e0c29c6d -# * https://support.microsoft.com/en-in/help/4014551/description-of-the-security-and-quality-rollup-for-the-net-framework-4 -# * https://support.microsoft.com/en-us/help/4020459 -shutdown -s diff --git a/worker_types/gecko-t-win7-32-cu/aws_filters b/worker_types/gecko-t-win7-32-cu/aws_filters deleted file mode 100644 index 985e2cb1..00000000 --- a/worker_types/gecko-t-win7-32-cu/aws_filters +++ /dev/null @@ -1,2 +0,0 @@ -Name=platform,Values=windows -Name=name,Values=gecko-b-win2012-base-* diff --git a/worker_types/gecko-t-win7-32-cu/aws_owners b/worker_types/gecko-t-win7-32-cu/aws_owners deleted file mode 100644 index 38631e52..00000000 --- a/worker_types/gecko-t-win7-32-cu/aws_owners +++ /dev/null @@ -1,2 +0,0 @@ -self -amazon diff --git a/worker_types/gecko-t-win7-32-cu/bootstrap.ps1 b/worker_types/gecko-t-win7-32-cu/bootstrap.ps1 deleted file mode 100644 index 9fad814b..00000000 --- a/worker_types/gecko-t-win7-32-cu/bootstrap.ps1 +++ /dev/null @@ -1,501 +0,0 @@ -################################################################################### -# Note, this powershell script is an *APPROXIMATION ONLY* to the steps that are run -# to build the AMIs for aws-provisioner-v1/gecko-t-win7-32-cu. -# -# The authoratative host definition can be found at: -# -# * https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Manifest/gecko-t-win7-32-cu.json -# -################################################################################### - -# use TLS 1.2 (see bug 1443595) -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -# capture env -Get-ChildItem Env: | Out-File "C:\install_env.txt" - -# needed for making http requests -$client = New-Object system.net.WebClient -$shell = new-object -com shell.application - -# utility function to download a zip file and extract it -function Extract-ZIPFile($file, $destination, $url) -{ - $client.DownloadFile($url, $file) - $zip = $shell.NameSpace($file) - foreach($item in $zip.items()) - { - $shell.Namespace($destination).copyhere($item) - } -} - -md C:\logs -md C:\binaries - -# KillXenDPriv.exe: See https://bugzilla.mozilla.org/show_bug.cgi?id=1399401#c43 and https://bugzilla.mozilla.org/show_bug.cgi?id=1394757 -Start-Process "taskkill" -ArgumentList "/im XenDPriv.exe /f" -Wait -NoNewWindow - -# DeleteXenDPriv.exe: See https://bugzilla.mozilla.org/show_bug.cgi?id=1399401#c43 and https://bugzilla.mozilla.org/show_bug.cgi?id=1394757 -Start-Process "cmd.exe" -ArgumentList "/c del /f /q `"C:\Program Files\Citrix\XenTools\XenDPriv.exe`"" -Wait -NoNewWindow - -# LogDirectory: Required by OpenCloudConfig for DSC logging -md "C:\log" - -# StackdriverLogging: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://dl.google.com/cloudagents/windows/StackdriverLogging-v1-9.exe", "C:\binaries\StackdriverLogging-v1-9.exe") -Start-Process "C:\binaries\StackdriverLogging-v1-9.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# fluentd_gw_exe: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.exe.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.exe.conf") - -# fluentd_gw_service: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.service.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.service.conf") - -# fluentd_gw_wrapper: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.wrapper.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.wrapper.conf") - -# fluentd_occ: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/occ.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\occ.conf") - -# fluentd_redact: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/redact.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\redact.conf") - -# NxLog: Maintenance Toolchain - forwards event logs to papertrail -$client.DownloadFile("https://nxlog.co/system/files/products/files/348/nxlog-ce-2.10.2150.msi", "C:\binaries\nxlog-ce-2.10.2150.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\nxlog-ce-2.10.2150.msi /quiet" -Wait -NoNewWindow - -# PaperTrailEncryptionCertificate: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/papertrail-bundle.pem", "C:\Program Files\nxlog\cert\papertrail-bundle.pem") - -# NxLogPaperTrailConfiguration: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/win7.conf", "C:\Program Files\nxlog\conf\nxlog.conf") - -# Start_nxlog: Maintenance Toolchain - not essential for building firefox -Set-Service "nxlog" -StartupType Automatic -Status Running - -# ProcessExplorer: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessExplorer" -Extract-ZIPFile -File "C:\binaries\ProcessExplorer.zip" -Destination "C:\ProcessExplorer" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessExplorer/ProcessExplorer.zip" - -# ProcessMonitor: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessMonitor" -Extract-ZIPFile -File "C:\binaries\ProcessMonitor.zip" -Destination "C:\ProcessMonitor" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessMonitor/ProcessMonitor.zip" - -# GpgForWin: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://files.gpg4win.org/gpg4win-2.3.0.exe", "C:\binaries\gpg4win-2.3.0.exe") -Start-Process "C:\binaries\gpg4win-2.3.0.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SevenZip: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://7-zip.org/a/7z1602.exe", "C:\binaries\7z1602.exe") -Start-Process "C:\binaries\7z1602.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SublimeText3: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://download.sublimetext.com/Sublime%20Text%20Build%203114%20Setup.exe", "C:\binaries\Sublime Text Build 3114 Setup.exe") -Start-Process "C:\binaries\Sublime Text Build 3114 Setup.exe" -ArgumentList "/VERYSILENT /NORESTART /TASKS=`"contextentry`"" -Wait -NoNewWindow - -# SublimeText3_PackagesFolder: Maintenance Toolchain - not essential for building firefox -md "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages" - -# SublimeText3_PackageControl: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://sublime.wbond.net/Package%20Control.sublime-package", "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\Package Control.sublime-package") - -# SystemPowerShellProfile: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Microsoft.PowerShell_profile.ps1", "C:\Windows\System32\WindowsPowerShell\v1.0\Microsoft.PowerShell_profile.ps1") - -# FsutilDisable8Dot3: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disable8dot3 1" -Wait -NoNewWindow - -# FsutilDisableLastAccess: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disablelastaccess 1" -Wait -NoNewWindow - -# home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\home" "C:\Users" - -# MozillaBuildSetup: Base Firefox on Windows build requirement -$client.DownloadFile("http://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-2.2.0.exe", "C:\binaries\MozillaBuildSetup-2.2.0.exe") -Start-Process "C:\binaries\MozillaBuildSetup-2.2.0.exe" -ArgumentList "/S /D=C:\mozilla-build" -Wait -NoNewWindow - -# msys_home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\mozilla-build\msys\home" "C:\Users" - -# reg_PythonInstallPath -New-ItemProperty -Path "HKLM:SOFTWARE\Python\PythonCore\2.7\InstallPath" -Name "(Default)" -Value "C:\mozilla-build\python" -PropertyType String -Force - -# reg_PythonPath -New-ItemProperty -Path "HKLM:SOFTWARE\Python\PythonCore\2.7\PythonPath" -Name "(Default)" -Value "C:\mozilla-build\python\Lib;C:\mozilla-build\python\DLLs;C:\mozilla-build\python\Lib\lib-tk" -PropertyType String -Force - -# python_3_7_3_win32_core -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/core.msi", "C:\binaries\core.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\core.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_core_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/core_d.msi", "C:\binaries\core_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\core_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_core_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/core_pdb.msi", "C:\binaries\core_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\core_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_dev -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/dev.msi", "C:\binaries\dev.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\dev.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_dev_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/dev_d.msi", "C:\binaries\dev_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\dev_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_doc -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/doc.msi", "C:\binaries\doc.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\doc.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_exe -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/exe.msi", "C:\binaries\exe.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\exe.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_exe_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/exe_d.msi", "C:\binaries\exe_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\exe_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_exe_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/exe_pdb.msi", "C:\binaries\exe_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\exe_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_launcher -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/launcher.msi", "C:\binaries\launcher.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\launcher.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_lib -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/lib.msi", "C:\binaries\lib.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\lib.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_lib_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/lib_d.msi", "C:\binaries\lib_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\lib_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_lib_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/lib_pdb.msi", "C:\binaries\lib_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\lib_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_path -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/path.msi", "C:\binaries\path.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\path.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_pip -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/pip.msi", "C:\binaries\pip.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\pip.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_tcltk -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/tcltk.msi", "C:\binaries\tcltk.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\tcltk.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_tcltk_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/tcltk_d.msi", "C:\binaries\tcltk_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\tcltk_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_tcltk_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/tcltk_pdb.msi", "C:\binaries\tcltk_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\tcltk_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_test -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/test.msi", "C:\binaries\test.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\test.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_test_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/test_d.msi", "C:\binaries\test_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\test_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_test_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/test_pdb.msi", "C:\binaries\test_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\test_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_tools -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/tools.msi", "C:\binaries\tools.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\tools.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_ucrt -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/ucrt.msi", "C:\binaries\ucrt.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\ucrt.msi /quiet" -Wait -NoNewWindow - -# Python3: https://bugzilla.mozilla.org/show_bug.cgi?id=1545339 -cmd /c mklink "C:\mozilla-build\python3\python3.exe" "C:\mozilla-build\python3\python.exe" - -# DeleteMozillaBuildMercurial -Start-Process "cmd.exe" -ArgumentList "/c del C:\mozilla-build\python\Scripts\hg*" -Wait -NoNewWindow - -# Mercurial: https://bugzilla.mozilla.org/show_bug.cgi?id=1490703 -$client.DownloadFile("https://www.mercurial-scm.org/release/windows/mercurial-4.7.1-x86.msi", "C:\binaries\mercurial-4.7.1-x86.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\mercurial-4.7.1-x86.msi /quiet" -Wait -NoNewWindow - -# MercurialConfig: Required by clonebundle and share hg extensions -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/mercurial.ini", "C:\Program Files\Mercurial\Mercurial.ini") - -# robustcheckout: Required by robustcheckout hg extension -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/FirefoxBuildResources/robustcheckout.py", "C:\mozilla-build\robustcheckout.py") - -# MercurialCerts -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/cacert.pem", "C:\mozilla-build\msys\etc\cacert.pem") - -# env_MOZILLABUILD: Absolutely required for mozharness builds. Python will fall in a heap, throwing misleading exceptions without this. :) -[Environment]::SetEnvironmentVariable("MOZILLABUILD", "C:\mozilla-build", "Machine") - -# env_PATH - -# pip3_upgrade_pip -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade pip==19.2.3" -Wait -NoNewWindow - -# pip3_upgrade_zstandard -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade zstandard==0.11.1" -Wait -NoNewWindow - -# pip3_upgrade_certifi -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade certifi" -Wait -NoNewWindow - -# ToolToolInstall -$client.DownloadFile("https://raw.githubusercontent.com/mozilla/release-services/master/src/tooltool/client/tooltool.py", "C:\mozilla-build\tooltool.py") - -# reg_WindowsErrorReportingLocalDumps: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-Item -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Force - -# reg_WindowsErrorReportingDontShowUI: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "DontShowUI" -Value "0x00000001" -PropertyType Dword -Force - -# GenericWorkerDirectory -md "C:\generic-worker" - -# GenericWorkerDownload -$client.DownloadFile("https://github.com/taskcluster/generic-worker/releases/download/v16.5.5/generic-worker-multiuser-windows-386.exe", "C:\generic-worker\generic-worker.exe") - -# LiveLogDownload -$client.DownloadFile("https://github.com/taskcluster/livelog/releases/download/v1.1.0/livelog-windows-386.exe", "C:\generic-worker\livelog.exe") - -# TaskClusterProxyDownload -$client.DownloadFile("https://github.com/taskcluster/taskcluster-proxy/releases/download/v5.1.0/taskcluster-proxy-windows-386.exe", "C:\generic-worker\taskcluster-proxy.exe") - -# NSSMDownload -$client.DownloadFile("https://nssm.cc/ci/nssm-2.24-103-gdee49fc.zip", "C:\Windows\Temp\NSSMInstall.zip") - -# NSSMInstall: NSSM is required to install Generic Worker as a service. Currently ZipInstall fails, so using 7z instead. -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -oC:\ C:\Windows\Temp\NSSMInstall.zip" -Wait -NoNewWindow - -# GenericWorkerInstall -Start-Process "C:\generic-worker\generic-worker.exe" -ArgumentList "install service --nssm C:\nssm-2.24-103-gdee49fc\win32\nssm.exe --config C:\generic-worker\generic-worker.config --configure-for-%MY_CLOUD%" -Wait -NoNewWindow - -# DisableDesktopInterrupt -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/disable-desktop-interrupt.reg", "C:\generic-worker\disable-desktop-interrupt.reg") - -# GenericWorkerStateWait -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/run-generic-worker-and-reboot.bat", "C:\generic-worker\run-generic-worker.bat") - -# TaskUserInitScript: https://bugzilla.mozilla.org/show_bug.cgi?id=1433851#c19 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/task-user-init-win7.cmd", "C:\generic-worker\task-user-init.cmd") - -# PipConfDirectory: https://pip.pypa.io/en/stable/user_guide/#config-file -md "C:\ProgramData\pip" - -# PipConf -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/pip.conf", "C:\ProgramData\pip\pip.ini") - -# virtualenv_support -md "C:\mozilla-build\python\Lib\site-packages\virtualenv_support" - -# virtualenv_support_pywin32 -$client.DownloadFile("https://pypi.python.org/packages/cp27/p/pypiwin32/pypiwin32-219-cp27-none-win32.whl#md5=a8b0c1b608c1afeb18cd38d759ee5e29", "C:\mozilla-build\python\Lib\site-packages\virtualenv_support\pypiwin32-219-cp27-none-win32.whl") - -# virtualenv_support_pywin32_amd64 -$client.DownloadFile("https://pypi.python.org/packages/cp27/p/pypiwin32/pypiwin32-219-cp27-none-win_amd64.whl#md5=d7bafcf3cce72c3ce9fdd633a262c335", "C:\mozilla-build\python\Lib\site-packages\virtualenv_support\pypiwin32-219-cp27-none-win_amd64.whl") - -# HgShared: allows builds to use `hg robustcheckout ...` -md "y:\hg-shared" - -# HgSharedAccessRights: allows builds to use `hg robustcheckout ...` -Start-Process "icacls.exe" -ArgumentList "y:\hg-shared /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# PipCache: share pip cache across subsequent task users -md "y:\pip-cache" - -# PipCacheAccessRights: share pip cache across subsequent task users -Start-Process "icacls.exe" -ArgumentList "y:\pip-cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_PIP_DOWNLOAD_CACHE: share pip download cache between tasks -[Environment]::SetEnvironmentVariable("PIP_DOWNLOAD_CACHE", "y:\pip-cache", "Machine") - -# TooltoolCache: share tooltool cache across subsequent task users -md "y:\tooltool-cache" - -# TooltoolCacheAccessRights: share tooltool cache across subsequent task users -Start-Process "icacls.exe" -ArgumentList "y:\tooltool-cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_TOOLTOOL_CACHE: share tooltool cache between tasks -[Environment]::SetEnvironmentVariable("TOOLTOOL_CACHE", "y:\tooltool-cache", "Machine") - -# ngen_executeQueuedItems: https://blogs.msdn.microsoft.com/dotnet/2013/08/06/wondering-why-mscorsvw-exe-has-high-cpu-usage-you-can-speed-it-up -Start-Process "c:\Windows\Microsoft.NET\Framework\v4.0.30319\ngen.exe" -ArgumentList "executeQueuedItems" -Wait -NoNewWindow - -# CarbonClone: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "clone --insecure https://bitbucket.org/splatteredbits/carbon C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonUpdate: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "update 2.4.0 -R C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonInstall: Bug 1316329 - support creation of symlinks by task users -Start-Process "xcopy" -ArgumentList "C:\Windows\Temp\carbon\Carbon C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Carbon /e /i /y" -Wait -NoNewWindow - -# GrantEveryoneSeCreateSymbolicLinkPrivilege: Bug 1316329 - support creation of symlinks by task users -Start-Process "powershell" -ArgumentList "-command `"& {&'Import-Module' Carbon}`"; `"& {&'Grant-Privilege' -Identity Everyone -Privilege SeCreateSymbolicLinkPrivilege}`"" -Wait -NoNewWindow - -# MozillaMaintenanceDir: Working directory for Mozilla Maintenance Service installation -md "C:\dsc\MozillaMaintenance" - -# maintenanceservice_installer -$client.DownloadFile("https://github.com/mozilla-releng/OpenCloudConfig/blob/master/userdata/Configuration/Mozilla%20Maintenance%20Service/maintenanceservice_installer.exe?raw=true", "C:\dsc\MozillaMaintenance\maintenanceservice_installer.exe") - -# maintenanceservice -$client.DownloadFile("https://github.com/mozilla-releng/OpenCloudConfig/blob/master/userdata/Configuration/Mozilla%20Maintenance%20Service/maintenanceservice.exe?raw=true", "C:\dsc\MozillaMaintenance\maintenanceservice.exe") - -# maintenanceservice_install -Start-Process "C:\dsc\MozillaMaintenance\maintenanceservice_installer.exe" -ArgumentList "/s" -Wait -NoNewWindow - -# MaintenanceServiceAcessRights: See https://bugzilla.mozilla.org/show_bug.cgi?id=1067756#c21 -Start-Process "icacls.exe" -ArgumentList "`"C:\Program Files\Mozilla Maintenance Service`" /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# MozFakeCA_cer -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mozilla%20Maintenance%20Service/MozFakeCA.cer", "C:\dsc\MozillaMaintenance\MozFakeCA.cer") - -# MozFakeCA_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozFakeCA.cer" -Wait -NoNewWindow - -# MozFakeCA_2017_10_13_cer -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mozilla%20Maintenance%20Service/MozFakeCA_2017-10-13.cer", "C:\dsc\MozillaMaintenance\MozFakeCA_2017-10-13.cer") - -# MozFakeCA_2017_10_13_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozFakeCA_2017-10-13.cer" -Wait -NoNewWindow - -# MozRoot_cer -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/certs/MozRoot.cer", "C:\dsc\MozillaMaintenance\MozRoot.cer") - -# MozRoot_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozRoot.cer" -Wait -NoNewWindow - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "name" -Value "Mozilla Corporation" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "issuer" -Value "Thawte Code Signing CA - G2" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "publisherLink" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "name" -Value "Mozilla Fake SPC" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "issuer" -Value "Mozilla Fake CA" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "publisherLink" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "name" -Value "Mozilla Corporation" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "issuer" -Value "DigiCert SHA2 Assured ID Code Signing CA" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "publisherLink" -Value "" -PropertyType String -Force - -# GrantEveryoneMozillaRegistryWriteAccess: Bug 1353889 - Grant all users account write access to Mozilla registry key -Start-Process "powershell" -ArgumentList "-command `"& {(Get-Acl -Path 'HKLM:\SOFTWARE\Mozilla').SetAccessRule((New-Object -TypeName 'System.Security.AccessControl.RegistryAccessRule' -ArgumentList @('Everyone', 'FullControl', 'Allow')))}`"" -Wait -NoNewWindow - -# KmsIn -New-NetFirewallRule -DisplayName "KmsIn (TCP 1688 Inbound): Allow" -Direction Inbound -LocalPort 1688 -Protocol TCP -Action Allow - -# KmsOut -New-NetFirewallRule -DisplayName "KmsOut (TCP 1688 Outbound): Allow" -Direction Outbound -LocalPort 1688 -Protocol TCP -Action Allow - -# nircmd -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/nircmd/nircmd.exe", "C:\Windows\System32\nircmd.exe") - -# nircmdc -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/nircmd/nircmdc.exe", "C:\Windows\System32\nircmdc.exe") - -# reg_Power_PreferredPlan_HighPerformance: https://bugzilla.mozilla.org/show_bug.cgi?id=1362613 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\ControlPanel\NameSpace\{025A5937-A6BE-4686-A844-36FE4BEC8B6D}" -Name "PreferredPlan" -Value "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c" -PropertyType String -Force - -# DisableWinDefend: https://bugzilla.mozilla.org/show_bug.cgi?id=1365909 -Set-Service "WinDefend" -StartupType Disabled -Status Stopped - -# OpenSshDownload: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://github.com/PowerShell/Win32-OpenSSH/releases/download/v7.6.1.0p1-Beta/OpenSSH-Win32.zip", "C:\Windows\Temp\OpenSSH-Win32.zip") - -# OpenSshUnzip: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -o`"C:\Program Files`" C:\Windows\Temp\OpenSSH-Win32.zip" -Wait -NoNewWindow - -# SshIn -New-NetFirewallRule -DisplayName "SshIn (TCP 22 Inbound): Allow" -Direction Inbound -LocalPort 22 -Protocol TCP -Action Allow - -# InstallOpenSSH: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "powershell.exe" -ArgumentList "-ExecutionPolicy Bypass -File `"C:\Program Files\OpenSSH-Win32\install-sshd.ps1`"" -Wait -NoNewWindow - -# reg_OpenSSH_DefaultShell: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShell" -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force - -# reg_OpenSSH_DefaultShellCommandOption: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShellCommandOption" -Value "/c" -PropertyType String -Force - -# AdministratorSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\Users\Administrator\.ssh" - -# AdministratorSshAuthorisedKeys: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/authorized_keys", "C:\Users\Administrator\.ssh\authorized_keys") - -# ProgramDataSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\ProgramData\ssh" - -# sshd_config: https://bugzilla.mozilla.org/show_bug.cgi?id=1464343 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/sshd_config", "C:\ProgramData\ssh\sshd_config") - -# Start_sshd: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "sshd" -StartupType Automatic -Status Running - -# Start_sshagent: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "ssh-agent" -StartupType Automatic -Status Running - -# vcredist_vs2015_x86: https://bugzilla.mozilla.org/show_bug.cgi?id=1460042 -$client.DownloadFile("http://download.microsoft.com/download/f/3/9/f39b30ec-f8ef-4ba3-8cb4-e301fcf0e0aa/vc_redist.x86.exe", "C:\binaries\vc_redist.x86.exe") -Start-Process "C:\binaries\vc_redist.x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2015_x64: https://bugzilla.mozilla.org/show_bug.cgi?id=1460042 -$client.DownloadFile("http://download.microsoft.com/download/4/c/b/4cbd5757-0dd4-43a7-bac0-2a492cedbacb/vc_redist.x64.exe", "C:\binaries\vc_redist.x64.exe") -Start-Process "C:\binaries\vc_redist.x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x64-install.log" -Wait -NoNewWindow - -# ProgramData_Mozilla_AccessRights: https://bugzilla.mozilla.org/show_bug.cgi?id=1494048 -Start-Process "icacls.exe" -ArgumentList "c:\ProgramData\Mozilla /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# HostsFile: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/etc/hosts", "C:\Windows\System32\drivers\etc\hosts") - -# SetHostsFileContent: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 - -# env_TASKCLUSTER_ROOT_URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1551789 -[Environment]::SetEnvironmentVariable("TASKCLUSTER_ROOT_URL", "https://firefox-ci-tc.services.mozilla.com", "Machine") - -# programdata_google_auth: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -md "C:\ProgramData\Google\Auth" - -# stackdriver_key: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -cmd /c mklink "C:\ProgramData\Google\Auth\application_default_credentials.json" "C:\builds\taskcluster-worker-ec2@aws-stackdriver-log-1571127027.json" - -# now shutdown, in preparation for creating an image -# Stop-Computer isn't working, also not when specifying -AsJob, so reverting to using `shutdown` command instead -# * https://www.reddit.com/r/PowerShell/comments/65250s/windows_10_creators_update_stopcomputer_not/dgfofug/?st=j1o3oa29&sh=e0c29c6d -# * https://support.microsoft.com/en-in/help/4014551/description-of-the-security-and-quality-rollup-for-the-net-framework-4 -# * https://support.microsoft.com/en-us/help/4020459 -shutdown -s diff --git a/worker_types/gecko-t-win7-32-gpu-b/aws_filters b/worker_types/gecko-t-win7-32-gpu-b/aws_filters deleted file mode 100644 index 985e2cb1..00000000 --- a/worker_types/gecko-t-win7-32-gpu-b/aws_filters +++ /dev/null @@ -1,2 +0,0 @@ -Name=platform,Values=windows -Name=name,Values=gecko-b-win2012-base-* diff --git a/worker_types/gecko-t-win7-32-gpu-b/aws_owners b/worker_types/gecko-t-win7-32-gpu-b/aws_owners deleted file mode 100644 index 38631e52..00000000 --- a/worker_types/gecko-t-win7-32-gpu-b/aws_owners +++ /dev/null @@ -1,2 +0,0 @@ -self -amazon diff --git a/worker_types/gecko-t-win7-32-gpu-b/bootstrap.ps1 b/worker_types/gecko-t-win7-32-gpu-b/bootstrap.ps1 deleted file mode 100644 index b3587278..00000000 --- a/worker_types/gecko-t-win7-32-gpu-b/bootstrap.ps1 +++ /dev/null @@ -1,501 +0,0 @@ -################################################################################### -# Note, this powershell script is an *APPROXIMATION ONLY* to the steps that are run -# to build the AMIs for aws-provisioner-v1/gecko-t-win7-32-gpu-b. -# -# The authoratative host definition can be found at: -# -# * https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Manifest/gecko-t-win7-32-gpu-b.json -# -################################################################################### - -# use TLS 1.2 (see bug 1443595) -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -# capture env -Get-ChildItem Env: | Out-File "C:\install_env.txt" - -# needed for making http requests -$client = New-Object system.net.WebClient -$shell = new-object -com shell.application - -# utility function to download a zip file and extract it -function Extract-ZIPFile($file, $destination, $url) -{ - $client.DownloadFile($url, $file) - $zip = $shell.NameSpace($file) - foreach($item in $zip.items()) - { - $shell.Namespace($destination).copyhere($item) - } -} - -md C:\logs -md C:\binaries - -# KillXenDPriv.exe: See https://bugzilla.mozilla.org/show_bug.cgi?id=1399401#c43 and https://bugzilla.mozilla.org/show_bug.cgi?id=1394757 -Start-Process "taskkill" -ArgumentList "/im XenDPriv.exe /f" -Wait -NoNewWindow - -# DeleteXenDPriv.exe: See https://bugzilla.mozilla.org/show_bug.cgi?id=1399401#c43 and https://bugzilla.mozilla.org/show_bug.cgi?id=1394757 -Start-Process "cmd.exe" -ArgumentList "/c del /f /q `"C:\Program Files\Citrix\XenTools\XenDPriv.exe`"" -Wait -NoNewWindow - -# LogDirectory: Required by OpenCloudConfig for DSC logging -md "C:\log" - -# StackdriverLogging: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://dl.google.com/cloudagents/windows/StackdriverLogging-v1-9.exe", "C:\binaries\StackdriverLogging-v1-9.exe") -Start-Process "C:\binaries\StackdriverLogging-v1-9.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# fluentd_gw_exe: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.exe.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.exe.conf") - -# fluentd_gw_service: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.service.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.service.conf") - -# fluentd_gw_wrapper: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.wrapper.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\gw.wrapper.conf") - -# fluentd_occ: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/occ.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\occ.conf") - -# fluentd_redact: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/redact.conf", "C:\Program Files (x86)\Stackdriver\LoggingAgent\config.d\redact.conf") - -# NxLog: Maintenance Toolchain - forwards event logs to papertrail -$client.DownloadFile("https://nxlog.co/system/files/products/files/348/nxlog-ce-2.10.2150.msi", "C:\binaries\nxlog-ce-2.10.2150.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\nxlog-ce-2.10.2150.msi /quiet" -Wait -NoNewWindow - -# PaperTrailEncryptionCertificate: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/papertrail-bundle.pem", "C:\Program Files\nxlog\cert\papertrail-bundle.pem") - -# NxLogPaperTrailConfiguration: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/win7.conf", "C:\Program Files\nxlog\conf\nxlog.conf") - -# Start_nxlog: Maintenance Toolchain - not essential for building firefox -Set-Service "nxlog" -StartupType Automatic -Status Running - -# ProcessExplorer: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessExplorer" -Extract-ZIPFile -File "C:\binaries\ProcessExplorer.zip" -Destination "C:\ProcessExplorer" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessExplorer/ProcessExplorer.zip" - -# ProcessMonitor: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessMonitor" -Extract-ZIPFile -File "C:\binaries\ProcessMonitor.zip" -Destination "C:\ProcessMonitor" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessMonitor/ProcessMonitor.zip" - -# GpgForWin: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://files.gpg4win.org/gpg4win-2.3.0.exe", "C:\binaries\gpg4win-2.3.0.exe") -Start-Process "C:\binaries\gpg4win-2.3.0.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SevenZip: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://7-zip.org/a/7z1602.exe", "C:\binaries\7z1602.exe") -Start-Process "C:\binaries\7z1602.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SublimeText3: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://download.sublimetext.com/Sublime%20Text%20Build%203114%20Setup.exe", "C:\binaries\Sublime Text Build 3114 Setup.exe") -Start-Process "C:\binaries\Sublime Text Build 3114 Setup.exe" -ArgumentList "/VERYSILENT /NORESTART /TASKS=`"contextentry`"" -Wait -NoNewWindow - -# SublimeText3_PackagesFolder: Maintenance Toolchain - not essential for building firefox -md "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages" - -# SublimeText3_PackageControl: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://sublime.wbond.net/Package%20Control.sublime-package", "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\Package Control.sublime-package") - -# SystemPowerShellProfile: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Microsoft.PowerShell_profile.ps1", "C:\Windows\System32\WindowsPowerShell\v1.0\Microsoft.PowerShell_profile.ps1") - -# FsutilDisable8Dot3: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disable8dot3 1" -Wait -NoNewWindow - -# FsutilDisableLastAccess: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disablelastaccess 1" -Wait -NoNewWindow - -# home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\home" "C:\Users" - -# MozillaBuildSetup: Base Firefox on Windows build requirement -$client.DownloadFile("http://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-2.2.0.exe", "C:\binaries\MozillaBuildSetup-2.2.0.exe") -Start-Process "C:\binaries\MozillaBuildSetup-2.2.0.exe" -ArgumentList "/S /D=C:\mozilla-build" -Wait -NoNewWindow - -# msys_home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\mozilla-build\msys\home" "C:\Users" - -# reg_PythonInstallPath -New-ItemProperty -Path "HKLM:SOFTWARE\Python\PythonCore\2.7\InstallPath" -Name "(Default)" -Value "C:\mozilla-build\python" -PropertyType String -Force - -# reg_PythonPath -New-ItemProperty -Path "HKLM:SOFTWARE\Python\PythonCore\2.7\PythonPath" -Name "(Default)" -Value "C:\mozilla-build\python\Lib;C:\mozilla-build\python\DLLs;C:\mozilla-build\python\Lib\lib-tk" -PropertyType String -Force - -# python_3_7_3_win32_core -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/core.msi", "C:\binaries\core.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\core.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_core_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/core_d.msi", "C:\binaries\core_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\core_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_core_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/core_pdb.msi", "C:\binaries\core_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\core_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_dev -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/dev.msi", "C:\binaries\dev.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\dev.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_dev_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/dev_d.msi", "C:\binaries\dev_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\dev_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_doc -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/doc.msi", "C:\binaries\doc.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\doc.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_exe -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/exe.msi", "C:\binaries\exe.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\exe.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_exe_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/exe_d.msi", "C:\binaries\exe_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\exe_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_exe_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/exe_pdb.msi", "C:\binaries\exe_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\exe_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_launcher -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/launcher.msi", "C:\binaries\launcher.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\launcher.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_lib -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/lib.msi", "C:\binaries\lib.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\lib.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_lib_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/lib_d.msi", "C:\binaries\lib_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\lib_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_lib_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/lib_pdb.msi", "C:\binaries\lib_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\lib_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_path -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/path.msi", "C:\binaries\path.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\path.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_pip -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/pip.msi", "C:\binaries\pip.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\pip.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_tcltk -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/tcltk.msi", "C:\binaries\tcltk.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\tcltk.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_tcltk_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/tcltk_d.msi", "C:\binaries\tcltk_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\tcltk_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_tcltk_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/tcltk_pdb.msi", "C:\binaries\tcltk_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\tcltk_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_test -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/test.msi", "C:\binaries\test.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\test.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_test_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/test_d.msi", "C:\binaries\test_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\test_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_test_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/test_pdb.msi", "C:\binaries\test_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\test_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_tools -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/tools.msi", "C:\binaries\tools.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\tools.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_ucrt -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/ucrt.msi", "C:\binaries\ucrt.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\ucrt.msi /quiet" -Wait -NoNewWindow - -# Python3: https://bugzilla.mozilla.org/show_bug.cgi?id=1545339 -cmd /c mklink "C:\mozilla-build\python3\python3.exe" "C:\mozilla-build\python3\python.exe" - -# DeleteMozillaBuildMercurial -Start-Process "cmd.exe" -ArgumentList "/c del C:\mozilla-build\python\Scripts\hg*" -Wait -NoNewWindow - -# Mercurial: https://bugzilla.mozilla.org/show_bug.cgi?id=1490703 -$client.DownloadFile("https://www.mercurial-scm.org/release/windows/mercurial-4.7.1-x86.msi", "C:\binaries\mercurial-4.7.1-x86.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\mercurial-4.7.1-x86.msi /quiet" -Wait -NoNewWindow - -# MercurialConfig: Required by clonebundle and share hg extensions -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/mercurial.ini", "C:\Program Files\Mercurial\Mercurial.ini") - -# robustcheckout: Required by robustcheckout hg extension -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/FirefoxBuildResources/robustcheckout.py", "C:\mozilla-build\robustcheckout.py") - -# MercurialCerts -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/cacert.pem", "C:\mozilla-build\msys\etc\cacert.pem") - -# env_MOZILLABUILD: Absolutely required for mozharness builds. Python will fall in a heap, throwing misleading exceptions without this. :) -[Environment]::SetEnvironmentVariable("MOZILLABUILD", "C:\mozilla-build", "Machine") - -# env_PATH - -# pip3_upgrade_pip -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade pip==19.2.3" -Wait -NoNewWindow - -# pip3_upgrade_zstandard -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade zstandard==0.11.1" -Wait -NoNewWindow - -# pip3_upgrade_certifi -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade certifi" -Wait -NoNewWindow - -# ToolToolInstall -$client.DownloadFile("https://raw.githubusercontent.com/mozilla/release-services/master/src/tooltool/client/tooltool.py", "C:\mozilla-build\tooltool.py") - -# reg_WindowsErrorReportingLocalDumps: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-Item -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Force - -# reg_WindowsErrorReportingDontShowUI: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "DontShowUI" -Value "0x00000001" -PropertyType Dword -Force - -# GenericWorkerDirectory -md "C:\generic-worker" - -# GenericWorkerDownload -$client.DownloadFile("https://github.com/taskcluster/generic-worker/releases/download/v16.5.5/generic-worker-multiuser-windows-386.exe", "C:\generic-worker\generic-worker.exe") - -# LiveLogDownload -$client.DownloadFile("https://github.com/taskcluster/livelog/releases/download/v1.1.0/livelog-windows-386.exe", "C:\generic-worker\livelog.exe") - -# TaskClusterProxyDownload -$client.DownloadFile("https://github.com/taskcluster/taskcluster-proxy/releases/download/v5.1.0/taskcluster-proxy-windows-386.exe", "C:\generic-worker\taskcluster-proxy.exe") - -# NSSMDownload -$client.DownloadFile("https://nssm.cc/ci/nssm-2.24-103-gdee49fc.zip", "C:\Windows\Temp\NSSMInstall.zip") - -# NSSMInstall: NSSM is required to install Generic Worker as a service. Currently ZipInstall fails, so using 7z instead. -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -oC:\ C:\Windows\Temp\NSSMInstall.zip" -Wait -NoNewWindow - -# GenericWorkerInstall -Start-Process "C:\generic-worker\generic-worker.exe" -ArgumentList "install service --nssm C:\nssm-2.24-103-gdee49fc\win32\nssm.exe --config C:\generic-worker\generic-worker.config --configure-for-%MY_CLOUD%" -Wait -NoNewWindow - -# DisableDesktopInterrupt -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/disable-desktop-interrupt.reg", "C:\generic-worker\disable-desktop-interrupt.reg") - -# GenericWorkerStateWait -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/run-generic-worker-and-reboot.bat", "C:\generic-worker\run-generic-worker.bat") - -# TaskUserInitScript: https://bugzilla.mozilla.org/show_bug.cgi?id=1433851#c19 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/task-user-init-win7.cmd", "C:\generic-worker\task-user-init.cmd") - -# PipConfDirectory: https://pip.pypa.io/en/stable/user_guide/#config-file -md "C:\ProgramData\pip" - -# PipConf -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/pip.conf", "C:\ProgramData\pip\pip.ini") - -# virtualenv_support -md "C:\mozilla-build\python\Lib\site-packages\virtualenv_support" - -# virtualenv_support_pywin32 -$client.DownloadFile("https://pypi.python.org/packages/cp27/p/pypiwin32/pypiwin32-219-cp27-none-win32.whl#md5=a8b0c1b608c1afeb18cd38d759ee5e29", "C:\mozilla-build\python\Lib\site-packages\virtualenv_support\pypiwin32-219-cp27-none-win32.whl") - -# virtualenv_support_pywin32_amd64 -$client.DownloadFile("https://pypi.python.org/packages/cp27/p/pypiwin32/pypiwin32-219-cp27-none-win_amd64.whl#md5=d7bafcf3cce72c3ce9fdd633a262c335", "C:\mozilla-build\python\Lib\site-packages\virtualenv_support\pypiwin32-219-cp27-none-win_amd64.whl") - -# HgShared: allows builds to use `hg robustcheckout ...` -md "y:\hg-shared" - -# HgSharedAccessRights: allows builds to use `hg robustcheckout ...` -Start-Process "icacls.exe" -ArgumentList "y:\hg-shared /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# PipCache: share pip cache across subsequent task users -md "y:\pip-cache" - -# PipCacheAccessRights: share pip cache across subsequent task users -Start-Process "icacls.exe" -ArgumentList "y:\pip-cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_PIP_DOWNLOAD_CACHE: share pip download cache between tasks -[Environment]::SetEnvironmentVariable("PIP_DOWNLOAD_CACHE", "y:\pip-cache", "Machine") - -# TooltoolCache: share tooltool cache across subsequent task users -md "y:\tooltool-cache" - -# TooltoolCacheAccessRights: share tooltool cache across subsequent task users -Start-Process "icacls.exe" -ArgumentList "y:\tooltool-cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_TOOLTOOL_CACHE: share tooltool cache between tasks -[Environment]::SetEnvironmentVariable("TOOLTOOL_CACHE", "y:\tooltool-cache", "Machine") - -# ngen_executeQueuedItems: https://blogs.msdn.microsoft.com/dotnet/2013/08/06/wondering-why-mscorsvw-exe-has-high-cpu-usage-you-can-speed-it-up -Start-Process "c:\Windows\Microsoft.NET\Framework\v4.0.30319\ngen.exe" -ArgumentList "executeQueuedItems" -Wait -NoNewWindow - -# CarbonClone: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "clone --insecure https://bitbucket.org/splatteredbits/carbon C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonUpdate: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "update 2.4.0 -R C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonInstall: Bug 1316329 - support creation of symlinks by task users -Start-Process "xcopy" -ArgumentList "C:\Windows\Temp\carbon\Carbon C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Carbon /e /i /y" -Wait -NoNewWindow - -# GrantEveryoneSeCreateSymbolicLinkPrivilege: Bug 1316329 - support creation of symlinks by task users -Start-Process "powershell" -ArgumentList "-command `"& {&'Import-Module' Carbon}`"; `"& {&'Grant-Privilege' -Identity Everyone -Privilege SeCreateSymbolicLinkPrivilege}`"" -Wait -NoNewWindow - -# MozillaMaintenanceDir: Working directory for Mozilla Maintenance Service installation -md "C:\dsc\MozillaMaintenance" - -# maintenanceservice_installer -$client.DownloadFile("https://github.com/mozilla-releng/OpenCloudConfig/blob/master/userdata/Configuration/Mozilla%20Maintenance%20Service/maintenanceservice_installer.exe?raw=true", "C:\dsc\MozillaMaintenance\maintenanceservice_installer.exe") - -# maintenanceservice -$client.DownloadFile("https://github.com/mozilla-releng/OpenCloudConfig/blob/master/userdata/Configuration/Mozilla%20Maintenance%20Service/maintenanceservice.exe?raw=true", "C:\dsc\MozillaMaintenance\maintenanceservice.exe") - -# maintenanceservice_install -Start-Process "C:\dsc\MozillaMaintenance\maintenanceservice_installer.exe" -ArgumentList "/s" -Wait -NoNewWindow - -# MaintenanceServiceAcessRights: See https://bugzilla.mozilla.org/show_bug.cgi?id=1067756#c21 -Start-Process "icacls.exe" -ArgumentList "`"C:\Program Files\Mozilla Maintenance Service`" /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# MozFakeCA_cer -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mozilla%20Maintenance%20Service/MozFakeCA.cer", "C:\dsc\MozillaMaintenance\MozFakeCA.cer") - -# MozFakeCA_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozFakeCA.cer" -Wait -NoNewWindow - -# MozFakeCA_2017_10_13_cer -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mozilla%20Maintenance%20Service/MozFakeCA_2017-10-13.cer", "C:\dsc\MozillaMaintenance\MozFakeCA_2017-10-13.cer") - -# MozFakeCA_2017_10_13_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozFakeCA_2017-10-13.cer" -Wait -NoNewWindow - -# MozRoot_cer -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/certs/MozRoot.cer", "C:\dsc\MozillaMaintenance\MozRoot.cer") - -# MozRoot_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozRoot.cer" -Wait -NoNewWindow - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "name" -Value "Mozilla Corporation" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "issuer" -Value "Thawte Code Signing CA - G2" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "publisherLink" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "name" -Value "Mozilla Fake SPC" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "issuer" -Value "Mozilla Fake CA" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "publisherLink" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "name" -Value "Mozilla Corporation" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "issuer" -Value "DigiCert SHA2 Assured ID Code Signing CA" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "publisherLink" -Value "" -PropertyType String -Force - -# GrantEveryoneMozillaRegistryWriteAccess: Bug 1353889 - Grant all users account write access to Mozilla registry key -Start-Process "powershell" -ArgumentList "-command `"& {(Get-Acl -Path 'HKLM:\SOFTWARE\Mozilla').SetAccessRule((New-Object -TypeName 'System.Security.AccessControl.RegistryAccessRule' -ArgumentList @('Everyone', 'FullControl', 'Allow')))}`"" -Wait -NoNewWindow - -# KmsIn -New-NetFirewallRule -DisplayName "KmsIn (TCP 1688 Inbound): Allow" -Direction Inbound -LocalPort 1688 -Protocol TCP -Action Allow - -# KmsOut -New-NetFirewallRule -DisplayName "KmsOut (TCP 1688 Outbound): Allow" -Direction Outbound -LocalPort 1688 -Protocol TCP -Action Allow - -# nircmd -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/nircmd/nircmd.exe", "C:\Windows\System32\nircmd.exe") - -# nircmdc -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/nircmd/nircmdc.exe", "C:\Windows\System32\nircmdc.exe") - -# reg_Power_PreferredPlan_HighPerformance: https://bugzilla.mozilla.org/show_bug.cgi?id=1362613 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\ControlPanel\NameSpace\{025A5937-A6BE-4686-A844-36FE4BEC8B6D}" -Name "PreferredPlan" -Value "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c" -PropertyType String -Force - -# DisableWinDefend: https://bugzilla.mozilla.org/show_bug.cgi?id=1365909 -Set-Service "WinDefend" -StartupType Disabled -Status Stopped - -# OpenSshDownload: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://github.com/PowerShell/Win32-OpenSSH/releases/download/v7.6.1.0p1-Beta/OpenSSH-Win32.zip", "C:\Windows\Temp\OpenSSH-Win32.zip") - -# OpenSshUnzip: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -o`"C:\Program Files`" C:\Windows\Temp\OpenSSH-Win32.zip" -Wait -NoNewWindow - -# SshIn -New-NetFirewallRule -DisplayName "SshIn (TCP 22 Inbound): Allow" -Direction Inbound -LocalPort 22 -Protocol TCP -Action Allow - -# InstallOpenSSH: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "powershell.exe" -ArgumentList "-ExecutionPolicy Bypass -File `"C:\Program Files\OpenSSH-Win32\install-sshd.ps1`"" -Wait -NoNewWindow - -# reg_OpenSSH_DefaultShell: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShell" -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force - -# reg_OpenSSH_DefaultShellCommandOption: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShellCommandOption" -Value "/c" -PropertyType String -Force - -# AdministratorSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\Users\Administrator\.ssh" - -# AdministratorSshAuthorisedKeys: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/authorized_keys", "C:\Users\Administrator\.ssh\authorized_keys") - -# ProgramDataSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\ProgramData\ssh" - -# sshd_config: https://bugzilla.mozilla.org/show_bug.cgi?id=1464343 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/sshd_config", "C:\ProgramData\ssh\sshd_config") - -# Start_sshd: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "sshd" -StartupType Automatic -Status Running - -# Start_sshagent: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "ssh-agent" -StartupType Automatic -Status Running - -# vcredist_vs2015_x86: https://bugzilla.mozilla.org/show_bug.cgi?id=1460042 -$client.DownloadFile("http://download.microsoft.com/download/f/3/9/f39b30ec-f8ef-4ba3-8cb4-e301fcf0e0aa/vc_redist.x86.exe", "C:\binaries\vc_redist.x86.exe") -Start-Process "C:\binaries\vc_redist.x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2015_x64: https://bugzilla.mozilla.org/show_bug.cgi?id=1460042 -$client.DownloadFile("http://download.microsoft.com/download/4/c/b/4cbd5757-0dd4-43a7-bac0-2a492cedbacb/vc_redist.x64.exe", "C:\binaries\vc_redist.x64.exe") -Start-Process "C:\binaries\vc_redist.x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x64-install.log" -Wait -NoNewWindow - -# ProgramData_Mozilla_AccessRights: https://bugzilla.mozilla.org/show_bug.cgi?id=1494048 -Start-Process "icacls.exe" -ArgumentList "c:\ProgramData\Mozilla /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# HostsFile: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/etc/hosts", "C:\Windows\System32\drivers\etc\hosts") - -# SetHostsFileContent: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 - -# env_TASKCLUSTER_ROOT_URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1551789 -[Environment]::SetEnvironmentVariable("TASKCLUSTER_ROOT_URL", "https://firefox-ci-tc.services.mozilla.com", "Machine") - -# programdata_google_auth: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -md "C:\ProgramData\Google\Auth" - -# stackdriver_key: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -cmd /c mklink "C:\ProgramData\Google\Auth\application_default_credentials.json" "C:\builds\taskcluster-worker-ec2@aws-stackdriver-log-1571127027.json" - -# now shutdown, in preparation for creating an image -# Stop-Computer isn't working, also not when specifying -AsJob, so reverting to using `shutdown` command instead -# * https://www.reddit.com/r/PowerShell/comments/65250s/windows_10_creators_update_stopcomputer_not/dgfofug/?st=j1o3oa29&sh=e0c29c6d -# * https://support.microsoft.com/en-in/help/4014551/description-of-the-security-and-quality-rollup-for-the-net-framework-4 -# * https://support.microsoft.com/en-us/help/4020459 -shutdown -s diff --git a/worker_types/gecko-t-win7-32-gpu/aws_filters b/worker_types/gecko-t-win7-32-gpu/aws_filters deleted file mode 100644 index 985e2cb1..00000000 --- a/worker_types/gecko-t-win7-32-gpu/aws_filters +++ /dev/null @@ -1,2 +0,0 @@ -Name=platform,Values=windows -Name=name,Values=gecko-b-win2012-base-* diff --git a/worker_types/gecko-t-win7-32-gpu/aws_owners b/worker_types/gecko-t-win7-32-gpu/aws_owners deleted file mode 100644 index 38631e52..00000000 --- a/worker_types/gecko-t-win7-32-gpu/aws_owners +++ /dev/null @@ -1,2 +0,0 @@ -self -amazon diff --git a/worker_types/gecko-t-win7-32-gpu/bootstrap.ps1 b/worker_types/gecko-t-win7-32-gpu/bootstrap.ps1 deleted file mode 100644 index 43d3857e..00000000 --- a/worker_types/gecko-t-win7-32-gpu/bootstrap.ps1 +++ /dev/null @@ -1,501 +0,0 @@ -################################################################################### -# Note, this powershell script is an *APPROXIMATION ONLY* to the steps that are run -# to build the AMIs for aws-provisioner-v1/gecko-t-win7-32-gpu. -# -# The authoratative host definition can be found at: -# -# * https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Manifest/gecko-t-win7-32-gpu.json -# -################################################################################### - -# use TLS 1.2 (see bug 1443595) -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -# capture env -Get-ChildItem Env: | Out-File "C:\install_env.txt" - -# needed for making http requests -$client = New-Object system.net.WebClient -$shell = new-object -com shell.application - -# utility function to download a zip file and extract it -function Extract-ZIPFile($file, $destination, $url) -{ - $client.DownloadFile($url, $file) - $zip = $shell.NameSpace($file) - foreach($item in $zip.items()) - { - $shell.Namespace($destination).copyhere($item) - } -} - -md C:\logs -md C:\binaries - -# KillXenDPriv.exe: See https://bugzilla.mozilla.org/show_bug.cgi?id=1399401#c43 and https://bugzilla.mozilla.org/show_bug.cgi?id=1394757 -Start-Process "taskkill" -ArgumentList "/im XenDPriv.exe /f" -Wait -NoNewWindow - -# DeleteXenDPriv.exe: See https://bugzilla.mozilla.org/show_bug.cgi?id=1399401#c43 and https://bugzilla.mozilla.org/show_bug.cgi?id=1394757 -Start-Process "cmd.exe" -ArgumentList "/c del /f /q `"C:\Program Files\Citrix\XenTools\XenDPriv.exe`"" -Wait -NoNewWindow - -# LogDirectory: Required by OpenCloudConfig for DSC logging -md "C:\log" - -# StackdriverLogging: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://dl.google.com/cloudagents/windows/StackdriverLogging-v1-9.exe", "C:\binaries\StackdriverLogging-v1-9.exe") -Start-Process "C:\binaries\StackdriverLogging-v1-9.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# fluentd_gw_exe: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.exe.conf", "C:\Program Files\Stackdriver\LoggingAgent\config.d\gw.exe.conf") - -# fluentd_gw_service: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.service.conf", "C:\Program Files\Stackdriver\LoggingAgent\config.d\gw.service.conf") - -# fluentd_gw_wrapper: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.wrapper.conf", "C:\Program Files\Stackdriver\LoggingAgent\config.d\gw.wrapper.conf") - -# fluentd_occ: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/occ.conf", "C:\Program Files\Stackdriver\LoggingAgent\config.d\occ.conf") - -# fluentd_redact: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/redact.conf", "C:\Program Files\Stackdriver\LoggingAgent\config.d\redact.conf") - -# NxLog: Maintenance Toolchain - forwards event logs to papertrail -$client.DownloadFile("https://nxlog.co/system/files/products/files/348/nxlog-ce-2.10.2150.msi", "C:\binaries\nxlog-ce-2.10.2150.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\nxlog-ce-2.10.2150.msi /quiet" -Wait -NoNewWindow - -# PaperTrailEncryptionCertificate: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/papertrail-bundle.pem", "C:\Program Files\nxlog\cert\papertrail-bundle.pem") - -# NxLogPaperTrailConfiguration: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/win7.conf", "C:\Program Files\nxlog\conf\nxlog.conf") - -# Start_nxlog: Maintenance Toolchain - not essential for building firefox -Set-Service "nxlog" -StartupType Automatic -Status Running - -# ProcessExplorer: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessExplorer" -Extract-ZIPFile -File "C:\binaries\ProcessExplorer.zip" -Destination "C:\ProcessExplorer" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessExplorer/ProcessExplorer.zip" - -# ProcessMonitor: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessMonitor" -Extract-ZIPFile -File "C:\binaries\ProcessMonitor.zip" -Destination "C:\ProcessMonitor" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessMonitor/ProcessMonitor.zip" - -# GpgForWin: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://files.gpg4win.org/gpg4win-2.3.0.exe", "C:\binaries\gpg4win-2.3.0.exe") -Start-Process "C:\binaries\gpg4win-2.3.0.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SevenZip: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://7-zip.org/a/7z1602.exe", "C:\binaries\7z1602.exe") -Start-Process "C:\binaries\7z1602.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SublimeText3: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://download.sublimetext.com/Sublime%20Text%20Build%203114%20Setup.exe", "C:\binaries\Sublime Text Build 3114 Setup.exe") -Start-Process "C:\binaries\Sublime Text Build 3114 Setup.exe" -ArgumentList "/VERYSILENT /NORESTART /TASKS=`"contextentry`"" -Wait -NoNewWindow - -# SublimeText3_PackagesFolder: Maintenance Toolchain - not essential for building firefox -md "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages" - -# SublimeText3_PackageControl: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://sublime.wbond.net/Package%20Control.sublime-package", "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\Package Control.sublime-package") - -# SystemPowerShellProfile: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Microsoft.PowerShell_profile.ps1", "C:\Windows\System32\WindowsPowerShell\v1.0\Microsoft.PowerShell_profile.ps1") - -# FsutilDisable8Dot3: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disable8dot3 1" -Wait -NoNewWindow - -# FsutilDisableLastAccess: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disablelastaccess 1" -Wait -NoNewWindow - -# home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\home" "C:\Users" - -# MozillaBuildSetup: Base Firefox on Windows build requirement -$client.DownloadFile("http://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-2.2.0.exe", "C:\binaries\MozillaBuildSetup-2.2.0.exe") -Start-Process "C:\binaries\MozillaBuildSetup-2.2.0.exe" -ArgumentList "/S /D=C:\mozilla-build" -Wait -NoNewWindow - -# msys_home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\mozilla-build\msys\home" "C:\Users" - -# reg_PythonInstallPath -New-ItemProperty -Path "HKLM:SOFTWARE\Python\PythonCore\2.7\InstallPath" -Name "(Default)" -Value "C:\mozilla-build\python" -PropertyType String -Force - -# reg_PythonPath -New-ItemProperty -Path "HKLM:SOFTWARE\Python\PythonCore\2.7\PythonPath" -Name "(Default)" -Value "C:\mozilla-build\python\Lib;C:\mozilla-build\python\DLLs;C:\mozilla-build\python\Lib\lib-tk" -PropertyType String -Force - -# python_3_7_3_win32_core -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/core.msi", "C:\binaries\core.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\core.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_core_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/core_d.msi", "C:\binaries\core_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\core_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_core_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/core_pdb.msi", "C:\binaries\core_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\core_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_dev -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/dev.msi", "C:\binaries\dev.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\dev.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_dev_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/dev_d.msi", "C:\binaries\dev_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\dev_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_doc -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/doc.msi", "C:\binaries\doc.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\doc.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_exe -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/exe.msi", "C:\binaries\exe.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\exe.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_exe_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/exe_d.msi", "C:\binaries\exe_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\exe_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_exe_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/exe_pdb.msi", "C:\binaries\exe_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\exe_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_launcher -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/launcher.msi", "C:\binaries\launcher.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\launcher.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_lib -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/lib.msi", "C:\binaries\lib.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\lib.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_lib_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/lib_d.msi", "C:\binaries\lib_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\lib_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_lib_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/lib_pdb.msi", "C:\binaries\lib_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\lib_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_path -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/path.msi", "C:\binaries\path.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\path.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_pip -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/pip.msi", "C:\binaries\pip.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\pip.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_tcltk -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/tcltk.msi", "C:\binaries\tcltk.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\tcltk.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_tcltk_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/tcltk_d.msi", "C:\binaries\tcltk_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\tcltk_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_tcltk_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/tcltk_pdb.msi", "C:\binaries\tcltk_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\tcltk_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_test -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/test.msi", "C:\binaries\test.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\test.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_test_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/test_d.msi", "C:\binaries\test_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\test_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_test_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/test_pdb.msi", "C:\binaries\test_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\test_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_tools -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/tools.msi", "C:\binaries\tools.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\tools.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_ucrt -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/ucrt.msi", "C:\binaries\ucrt.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\ucrt.msi /quiet" -Wait -NoNewWindow - -# Python3: https://bugzilla.mozilla.org/show_bug.cgi?id=1545339 -cmd /c mklink "C:\mozilla-build\python3\python3.exe" "C:\mozilla-build\python3\python.exe" - -# DeleteMozillaBuildMercurial -Start-Process "cmd.exe" -ArgumentList "/c del C:\mozilla-build\python\Scripts\hg*" -Wait -NoNewWindow - -# Mercurial: https://bugzilla.mozilla.org/show_bug.cgi?id=1490703 -$client.DownloadFile("https://www.mercurial-scm.org/release/windows/mercurial-4.7.1-x86.msi", "C:\binaries\mercurial-4.7.1-x86.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\mercurial-4.7.1-x86.msi /quiet" -Wait -NoNewWindow - -# MercurialConfig: Required by clonebundle and share hg extensions -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/mercurial.ini", "C:\Program Files\Mercurial\Mercurial.ini") - -# robustcheckout: Required by robustcheckout hg extension -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/FirefoxBuildResources/robustcheckout.py", "C:\mozilla-build\robustcheckout.py") - -# MercurialCerts -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/cacert.pem", "C:\mozilla-build\msys\etc\cacert.pem") - -# env_MOZILLABUILD: Absolutely required for mozharness builds. Python will fall in a heap, throwing misleading exceptions without this. :) -[Environment]::SetEnvironmentVariable("MOZILLABUILD", "C:\mozilla-build", "Machine") - -# env_PATH - -# pip3_upgrade_pip -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade pip==19.2.3" -Wait -NoNewWindow - -# pip3_upgrade_zstandard -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade zstandard==0.11.1" -Wait -NoNewWindow - -# pip3_upgrade_certifi -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade certifi" -Wait -NoNewWindow - -# ToolToolInstall -$client.DownloadFile("https://raw.githubusercontent.com/mozilla/release-services/master/src/tooltool/client/tooltool.py", "C:\mozilla-build\tooltool.py") - -# reg_WindowsErrorReportingLocalDumps: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-Item -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Force - -# reg_WindowsErrorReportingDontShowUI: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "DontShowUI" -Value "0x00000001" -PropertyType Dword -Force - -# GenericWorkerDirectory -md "C:\generic-worker" - -# GenericWorkerDownload -$client.DownloadFile("https://github.com/taskcluster/generic-worker/releases/download/v16.5.1/generic-worker-multiuser-windows-386.exe", "C:\generic-worker\generic-worker.exe") - -# LiveLogDownload -$client.DownloadFile("https://github.com/taskcluster/livelog/releases/download/v1.1.0/livelog-windows-386.exe", "C:\generic-worker\livelog.exe") - -# TaskClusterProxyDownload -$client.DownloadFile("https://github.com/taskcluster/taskcluster-proxy/releases/download/v5.1.0/taskcluster-proxy-windows-386.exe", "C:\generic-worker\taskcluster-proxy.exe") - -# NSSMDownload -$client.DownloadFile("https://nssm.cc/ci/nssm-2.24-103-gdee49fc.zip", "C:\Windows\Temp\NSSMInstall.zip") - -# NSSMInstall: NSSM is required to install Generic Worker as a service. Currently ZipInstall fails, so using 7z instead. -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -oC:\ C:\Windows\Temp\NSSMInstall.zip" -Wait -NoNewWindow - -# GenericWorkerInstall -Start-Process "C:\generic-worker\generic-worker.exe" -ArgumentList "install service --nssm C:\nssm-2.24-103-gdee49fc\win32\nssm.exe --config C:\generic-worker\generic-worker.config --configure-for-%MY_CLOUD%" -Wait -NoNewWindow - -# DisableDesktopInterrupt -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/disable-desktop-interrupt.reg", "C:\generic-worker\disable-desktop-interrupt.reg") - -# GenericWorkerStateWait -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/run-generic-worker-and-reboot.bat", "C:\generic-worker\run-generic-worker.bat") - -# TaskUserInitScript: https://bugzilla.mozilla.org/show_bug.cgi?id=1433851#c19 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/task-user-init-win7.cmd", "C:\generic-worker\task-user-init.cmd") - -# PipConfDirectory: https://pip.pypa.io/en/stable/user_guide/#config-file -md "C:\ProgramData\pip" - -# PipConf -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/pip.conf", "C:\ProgramData\pip\pip.ini") - -# virtualenv_support -md "C:\mozilla-build\python\Lib\site-packages\virtualenv_support" - -# virtualenv_support_pywin32 -$client.DownloadFile("https://pypi.python.org/packages/cp27/p/pypiwin32/pypiwin32-219-cp27-none-win32.whl#md5=a8b0c1b608c1afeb18cd38d759ee5e29", "C:\mozilla-build\python\Lib\site-packages\virtualenv_support\pypiwin32-219-cp27-none-win32.whl") - -# virtualenv_support_pywin32_amd64 -$client.DownloadFile("https://pypi.python.org/packages/cp27/p/pypiwin32/pypiwin32-219-cp27-none-win_amd64.whl#md5=d7bafcf3cce72c3ce9fdd633a262c335", "C:\mozilla-build\python\Lib\site-packages\virtualenv_support\pypiwin32-219-cp27-none-win_amd64.whl") - -# HgShared: allows builds to use `hg robustcheckout ...` -md "y:\hg-shared" - -# HgSharedAccessRights: allows builds to use `hg robustcheckout ...` -Start-Process "icacls.exe" -ArgumentList "y:\hg-shared /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# PipCache: share pip cache across subsequent task users -md "y:\pip-cache" - -# PipCacheAccessRights: share pip cache across subsequent task users -Start-Process "icacls.exe" -ArgumentList "y:\pip-cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_PIP_DOWNLOAD_CACHE: share pip download cache between tasks -[Environment]::SetEnvironmentVariable("PIP_DOWNLOAD_CACHE", "y:\pip-cache", "Machine") - -# TooltoolCache: share tooltool cache across subsequent task users -md "y:\tooltool-cache" - -# TooltoolCacheAccessRights: share tooltool cache across subsequent task users -Start-Process "icacls.exe" -ArgumentList "y:\tooltool-cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_TOOLTOOL_CACHE: share tooltool cache between tasks -[Environment]::SetEnvironmentVariable("TOOLTOOL_CACHE", "y:\tooltool-cache", "Machine") - -# ngen_executeQueuedItems: https://blogs.msdn.microsoft.com/dotnet/2013/08/06/wondering-why-mscorsvw-exe-has-high-cpu-usage-you-can-speed-it-up -Start-Process "c:\Windows\Microsoft.NET\Framework\v4.0.30319\ngen.exe" -ArgumentList "executeQueuedItems" -Wait -NoNewWindow - -# CarbonClone: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "clone --insecure https://bitbucket.org/splatteredbits/carbon C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonUpdate: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "update 2.4.0 -R C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonInstall: Bug 1316329 - support creation of symlinks by task users -Start-Process "xcopy" -ArgumentList "C:\Windows\Temp\carbon\Carbon C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Carbon /e /i /y" -Wait -NoNewWindow - -# GrantEveryoneSeCreateSymbolicLinkPrivilege: Bug 1316329 - support creation of symlinks by task users -Start-Process "powershell" -ArgumentList "-command `"& {&'Import-Module' Carbon}`"; `"& {&'Grant-Privilege' -Identity Everyone -Privilege SeCreateSymbolicLinkPrivilege}`"" -Wait -NoNewWindow - -# MozillaMaintenanceDir: Working directory for Mozilla Maintenance Service installation -md "C:\dsc\MozillaMaintenance" - -# maintenanceservice_installer -$client.DownloadFile("https://github.com/mozilla-releng/OpenCloudConfig/blob/master/userdata/Configuration/Mozilla%20Maintenance%20Service/maintenanceservice_installer.exe?raw=true", "C:\dsc\MozillaMaintenance\maintenanceservice_installer.exe") - -# maintenanceservice -$client.DownloadFile("https://github.com/mozilla-releng/OpenCloudConfig/blob/master/userdata/Configuration/Mozilla%20Maintenance%20Service/maintenanceservice.exe?raw=true", "C:\dsc\MozillaMaintenance\maintenanceservice.exe") - -# maintenanceservice_install -Start-Process "C:\dsc\MozillaMaintenance\maintenanceservice_installer.exe" -ArgumentList "/s" -Wait -NoNewWindow - -# MaintenanceServiceAcessRights: See https://bugzilla.mozilla.org/show_bug.cgi?id=1067756#c21 -Start-Process "icacls.exe" -ArgumentList "`"C:\Program Files\Mozilla Maintenance Service`" /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# MozFakeCA_cer -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mozilla%20Maintenance%20Service/MozFakeCA.cer", "C:\dsc\MozillaMaintenance\MozFakeCA.cer") - -# MozFakeCA_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozFakeCA.cer" -Wait -NoNewWindow - -# MozFakeCA_2017_10_13_cer -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mozilla%20Maintenance%20Service/MozFakeCA_2017-10-13.cer", "C:\dsc\MozillaMaintenance\MozFakeCA_2017-10-13.cer") - -# MozFakeCA_2017_10_13_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozFakeCA_2017-10-13.cer" -Wait -NoNewWindow - -# MozRoot_cer -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/certs/MozRoot.cer", "C:\dsc\MozillaMaintenance\MozRoot.cer") - -# MozRoot_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozRoot.cer" -Wait -NoNewWindow - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "name" -Value "Mozilla Corporation" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "issuer" -Value "Thawte Code Signing CA - G2" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "publisherLink" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "name" -Value "Mozilla Fake SPC" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "issuer" -Value "Mozilla Fake CA" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "publisherLink" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "name" -Value "Mozilla Corporation" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "issuer" -Value "DigiCert SHA2 Assured ID Code Signing CA" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "publisherLink" -Value "" -PropertyType String -Force - -# GrantEveryoneMozillaRegistryWriteAccess: Bug 1353889 - Grant all users account write access to Mozilla registry key -Start-Process "powershell" -ArgumentList "-command `"& {(Get-Acl -Path 'HKLM:\SOFTWARE\Mozilla').SetAccessRule((New-Object -TypeName 'System.Security.AccessControl.RegistryAccessRule' -ArgumentList @('Everyone', 'FullControl', 'Allow')))}`"" -Wait -NoNewWindow - -# KmsIn -New-NetFirewallRule -DisplayName "KmsIn (TCP 1688 Inbound): Allow" -Direction Inbound -LocalPort 1688 -Protocol TCP -Action Allow - -# KmsOut -New-NetFirewallRule -DisplayName "KmsOut (TCP 1688 Outbound): Allow" -Direction Outbound -LocalPort 1688 -Protocol TCP -Action Allow - -# nircmd -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/nircmd/nircmd.exe", "C:\Windows\System32\nircmd.exe") - -# nircmdc -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/nircmd/nircmdc.exe", "C:\Windows\System32\nircmdc.exe") - -# reg_Power_PreferredPlan_HighPerformance: https://bugzilla.mozilla.org/show_bug.cgi?id=1362613 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\ControlPanel\NameSpace\{025A5937-A6BE-4686-A844-36FE4BEC8B6D}" -Name "PreferredPlan" -Value "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c" -PropertyType String -Force - -# DisableWinDefend: https://bugzilla.mozilla.org/show_bug.cgi?id=1365909 -Set-Service "WinDefend" -StartupType Disabled -Status Stopped - -# OpenSshDownload: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://github.com/PowerShell/Win32-OpenSSH/releases/download/v7.6.1.0p1-Beta/OpenSSH-Win32.zip", "C:\Windows\Temp\OpenSSH-Win32.zip") - -# OpenSshUnzip: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -o`"C:\Program Files`" C:\Windows\Temp\OpenSSH-Win32.zip" -Wait -NoNewWindow - -# SshIn -New-NetFirewallRule -DisplayName "SshIn (TCP 22 Inbound): Allow" -Direction Inbound -LocalPort 22 -Protocol TCP -Action Allow - -# InstallOpenSSH: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "powershell.exe" -ArgumentList "-ExecutionPolicy Bypass -File `"C:\Program Files\OpenSSH-Win32\install-sshd.ps1`"" -Wait -NoNewWindow - -# reg_OpenSSH_DefaultShell: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShell" -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force - -# reg_OpenSSH_DefaultShellCommandOption: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShellCommandOption" -Value "/c" -PropertyType String -Force - -# AdministratorSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\Users\Administrator\.ssh" - -# AdministratorSshAuthorisedKeys: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/authorized_keys", "C:\Users\Administrator\.ssh\authorized_keys") - -# ProgramDataSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\ProgramData\ssh" - -# sshd_config: https://bugzilla.mozilla.org/show_bug.cgi?id=1464343 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/sshd_config", "C:\ProgramData\ssh\sshd_config") - -# Start_sshd: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "sshd" -StartupType Automatic -Status Running - -# Start_sshagent: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "ssh-agent" -StartupType Automatic -Status Running - -# vcredist_vs2015_x86: https://bugzilla.mozilla.org/show_bug.cgi?id=1460042 -$client.DownloadFile("http://download.microsoft.com/download/f/3/9/f39b30ec-f8ef-4ba3-8cb4-e301fcf0e0aa/vc_redist.x86.exe", "C:\binaries\vc_redist.x86.exe") -Start-Process "C:\binaries\vc_redist.x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2015_x64: https://bugzilla.mozilla.org/show_bug.cgi?id=1460042 -$client.DownloadFile("http://download.microsoft.com/download/4/c/b/4cbd5757-0dd4-43a7-bac0-2a492cedbacb/vc_redist.x64.exe", "C:\binaries\vc_redist.x64.exe") -Start-Process "C:\binaries\vc_redist.x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x64-install.log" -Wait -NoNewWindow - -# ProgramData_Mozilla_AccessRights: https://bugzilla.mozilla.org/show_bug.cgi?id=1494048 -Start-Process "icacls.exe" -ArgumentList "c:\ProgramData\Mozilla /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# HostsFile: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/etc/hosts", "C:\Windows\System32\drivers\etc\hosts") - -# SetHostsFileContent: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 - -# env_TASKCLUSTER_ROOT_URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1551789 -[Environment]::SetEnvironmentVariable("TASKCLUSTER_ROOT_URL", "https://firefox-ci-tc.services.mozilla.com", "Machine") - -# programdata_google_auth: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -md "C:\ProgramData\Google\Auth" - -# stackdriver_key: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -cmd /c mklink "C:\ProgramData\Google\Auth\application_default_credentials.json" "C:\builds\taskcluster-worker-ec2@aws-stackdriver-log-1571127027.json" - -# now shutdown, in preparation for creating an image -# Stop-Computer isn't working, also not when specifying -AsJob, so reverting to using `shutdown` command instead -# * https://www.reddit.com/r/PowerShell/comments/65250s/windows_10_creators_update_stopcomputer_not/dgfofug/?st=j1o3oa29&sh=e0c29c6d -# * https://support.microsoft.com/en-in/help/4014551/description-of-the-security-and-quality-rollup-for-the-net-framework-4 -# * https://support.microsoft.com/en-us/help/4020459 -shutdown -s diff --git a/worker_types/gecko-t-win7-32-hw/aws_filters b/worker_types/gecko-t-win7-32-hw/aws_filters deleted file mode 100644 index 985e2cb1..00000000 --- a/worker_types/gecko-t-win7-32-hw/aws_filters +++ /dev/null @@ -1,2 +0,0 @@ -Name=platform,Values=windows -Name=name,Values=gecko-b-win2012-base-* diff --git a/worker_types/gecko-t-win7-32-hw/aws_owners b/worker_types/gecko-t-win7-32-hw/aws_owners deleted file mode 100644 index 38631e52..00000000 --- a/worker_types/gecko-t-win7-32-hw/aws_owners +++ /dev/null @@ -1,2 +0,0 @@ -self -amazon diff --git a/worker_types/gecko-t-win7-32/aws_filters b/worker_types/gecko-t-win7-32/aws_filters deleted file mode 100644 index 985e2cb1..00000000 --- a/worker_types/gecko-t-win7-32/aws_filters +++ /dev/null @@ -1,2 +0,0 @@ -Name=platform,Values=windows -Name=name,Values=gecko-b-win2012-base-* diff --git a/worker_types/gecko-t-win7-32/aws_owners b/worker_types/gecko-t-win7-32/aws_owners deleted file mode 100644 index 38631e52..00000000 --- a/worker_types/gecko-t-win7-32/aws_owners +++ /dev/null @@ -1,2 +0,0 @@ -self -amazon diff --git a/worker_types/gecko-t-win7-32/bootstrap.ps1 b/worker_types/gecko-t-win7-32/bootstrap.ps1 deleted file mode 100644 index ca9a91b4..00000000 --- a/worker_types/gecko-t-win7-32/bootstrap.ps1 +++ /dev/null @@ -1,501 +0,0 @@ -################################################################################### -# Note, this powershell script is an *APPROXIMATION ONLY* to the steps that are run -# to build the AMIs for aws-provisioner-v1/gecko-t-win7-32. -# -# The authoratative host definition can be found at: -# -# * https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Manifest/gecko-t-win7-32.json -# -################################################################################### - -# use TLS 1.2 (see bug 1443595) -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -# capture env -Get-ChildItem Env: | Out-File "C:\install_env.txt" - -# needed for making http requests -$client = New-Object system.net.WebClient -$shell = new-object -com shell.application - -# utility function to download a zip file and extract it -function Extract-ZIPFile($file, $destination, $url) -{ - $client.DownloadFile($url, $file) - $zip = $shell.NameSpace($file) - foreach($item in $zip.items()) - { - $shell.Namespace($destination).copyhere($item) - } -} - -md C:\logs -md C:\binaries - -# KillXenDPriv.exe: See https://bugzilla.mozilla.org/show_bug.cgi?id=1399401#c43 and https://bugzilla.mozilla.org/show_bug.cgi?id=1394757 -Start-Process "taskkill" -ArgumentList "/im XenDPriv.exe /f" -Wait -NoNewWindow - -# DeleteXenDPriv.exe: See https://bugzilla.mozilla.org/show_bug.cgi?id=1399401#c43 and https://bugzilla.mozilla.org/show_bug.cgi?id=1394757 -Start-Process "cmd.exe" -ArgumentList "/c del /f /q `"C:\Program Files\Citrix\XenTools\XenDPriv.exe`"" -Wait -NoNewWindow - -# LogDirectory: Required by OpenCloudConfig for DSC logging -md "C:\log" - -# StackdriverLogging: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://dl.google.com/cloudagents/windows/StackdriverLogging-v1-9.exe", "C:\binaries\StackdriverLogging-v1-9.exe") -Start-Process "C:\binaries\StackdriverLogging-v1-9.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# fluentd_gw_exe: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.exe.conf", "C:\Program Files\Stackdriver\LoggingAgent\config.d\gw.exe.conf") - -# fluentd_gw_service: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.service.conf", "C:\Program Files\Stackdriver\LoggingAgent\config.d\gw.service.conf") - -# fluentd_gw_wrapper: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/gw.wrapper.conf", "C:\Program Files\Stackdriver\LoggingAgent\config.d\gw.wrapper.conf") - -# fluentd_occ: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/occ.conf", "C:\Program Files\Stackdriver\LoggingAgent\config.d\occ.conf") - -# fluentd_redact: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/fluentd/redact.conf", "C:\Program Files\Stackdriver\LoggingAgent\config.d\redact.conf") - -# NxLog: Maintenance Toolchain - forwards event logs to papertrail -$client.DownloadFile("https://nxlog.co/system/files/products/files/348/nxlog-ce-2.10.2150.msi", "C:\binaries\nxlog-ce-2.10.2150.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\nxlog-ce-2.10.2150.msi /quiet" -Wait -NoNewWindow - -# PaperTrailEncryptionCertificate: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/papertrail-bundle.pem", "C:\Program Files\nxlog\cert\papertrail-bundle.pem") - -# NxLogPaperTrailConfiguration: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/nxlog/win7.conf", "C:\Program Files\nxlog\conf\nxlog.conf") - -# Start_nxlog: Maintenance Toolchain - not essential for building firefox -Set-Service "nxlog" -StartupType Automatic -Status Running - -# ProcessExplorer: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessExplorer" -Extract-ZIPFile -File "C:\binaries\ProcessExplorer.zip" -Destination "C:\ProcessExplorer" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessExplorer/ProcessExplorer.zip" - -# ProcessMonitor: Maintenance Toolchain - not essential for building firefox -New-Item -ItemType Directory -Force -Path "C:\ProcessMonitor" -Extract-ZIPFile -File "C:\binaries\ProcessMonitor.zip" -Destination "C:\ProcessMonitor" -Url "https://s3.amazonaws.com/windows-opencloudconfig-packages/ProcessMonitor/ProcessMonitor.zip" - -# GpgForWin: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://files.gpg4win.org/gpg4win-2.3.0.exe", "C:\binaries\gpg4win-2.3.0.exe") -Start-Process "C:\binaries\gpg4win-2.3.0.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SevenZip: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://7-zip.org/a/7z1602.exe", "C:\binaries\7z1602.exe") -Start-Process "C:\binaries\7z1602.exe" -ArgumentList "/S" -Wait -NoNewWindow - -# SublimeText3: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://download.sublimetext.com/Sublime%20Text%20Build%203114%20Setup.exe", "C:\binaries\Sublime Text Build 3114 Setup.exe") -Start-Process "C:\binaries\Sublime Text Build 3114 Setup.exe" -ArgumentList "/VERYSILENT /NORESTART /TASKS=`"contextentry`"" -Wait -NoNewWindow - -# SublimeText3_PackagesFolder: Maintenance Toolchain - not essential for building firefox -md "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages" - -# SublimeText3_PackageControl: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("http://sublime.wbond.net/Package%20Control.sublime-package", "C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\Package Control.sublime-package") - -# SystemPowerShellProfile: Maintenance Toolchain - not essential for building firefox -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Microsoft.PowerShell_profile.ps1", "C:\Windows\System32\WindowsPowerShell\v1.0\Microsoft.PowerShell_profile.ps1") - -# FsutilDisable8Dot3: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disable8dot3 1" -Wait -NoNewWindow - -# FsutilDisableLastAccess: Maintenance Toolchain - not essential for building firefox -Start-Process "fsutil.exe" -ArgumentList "behavior set disablelastaccess 1" -Wait -NoNewWindow - -# home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\home" "C:\Users" - -# MozillaBuildSetup: Base Firefox on Windows build requirement -$client.DownloadFile("http://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-2.2.0.exe", "C:\binaries\MozillaBuildSetup-2.2.0.exe") -Start-Process "C:\binaries\MozillaBuildSetup-2.2.0.exe" -ArgumentList "/S /D=C:\mozilla-build" -Wait -NoNewWindow - -# msys_home: Maintenance Toolchain - not essential for building firefox -cmd /c mklink "C:\mozilla-build\msys\home" "C:\Users" - -# reg_PythonInstallPath -New-ItemProperty -Path "HKLM:SOFTWARE\Python\PythonCore\2.7\InstallPath" -Name "(Default)" -Value "C:\mozilla-build\python" -PropertyType String -Force - -# reg_PythonPath -New-ItemProperty -Path "HKLM:SOFTWARE\Python\PythonCore\2.7\PythonPath" -Name "(Default)" -Value "C:\mozilla-build\python\Lib;C:\mozilla-build\python\DLLs;C:\mozilla-build\python\Lib\lib-tk" -PropertyType String -Force - -# python_3_7_3_win32_core -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/core.msi", "C:\binaries\core.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\core.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_core_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/core_d.msi", "C:\binaries\core_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\core_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_core_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/core_pdb.msi", "C:\binaries\core_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\core_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_dev -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/dev.msi", "C:\binaries\dev.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\dev.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_dev_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/dev_d.msi", "C:\binaries\dev_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\dev_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_doc -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/doc.msi", "C:\binaries\doc.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\doc.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_exe -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/exe.msi", "C:\binaries\exe.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\exe.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_exe_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/exe_d.msi", "C:\binaries\exe_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\exe_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_exe_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/exe_pdb.msi", "C:\binaries\exe_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\exe_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_launcher -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/launcher.msi", "C:\binaries\launcher.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\launcher.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_lib -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/lib.msi", "C:\binaries\lib.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\lib.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_lib_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/lib_d.msi", "C:\binaries\lib_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\lib_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_lib_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/lib_pdb.msi", "C:\binaries\lib_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\lib_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_path -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/path.msi", "C:\binaries\path.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\path.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_pip -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/pip.msi", "C:\binaries\pip.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\pip.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_tcltk -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/tcltk.msi", "C:\binaries\tcltk.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\tcltk.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_tcltk_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/tcltk_d.msi", "C:\binaries\tcltk_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\tcltk_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_tcltk_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/tcltk_pdb.msi", "C:\binaries\tcltk_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\tcltk_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_test -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/test.msi", "C:\binaries\test.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\test.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_test_d -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/test_d.msi", "C:\binaries\test_d.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\test_d.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_test_pdb -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/test_pdb.msi", "C:\binaries\test_pdb.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\test_pdb.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_tools -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/tools.msi", "C:\binaries\tools.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\tools.msi /quiet" -Wait -NoNewWindow - -# python_3_7_3_win32_ucrt -$client.DownloadFile("https://www.python.org/ftp/python/3.7.3/win32/ucrt.msi", "C:\binaries\ucrt.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\ucrt.msi /quiet" -Wait -NoNewWindow - -# Python3: https://bugzilla.mozilla.org/show_bug.cgi?id=1545339 -cmd /c mklink "C:\mozilla-build\python3\python3.exe" "C:\mozilla-build\python3\python.exe" - -# DeleteMozillaBuildMercurial -Start-Process "cmd.exe" -ArgumentList "/c del C:\mozilla-build\python\Scripts\hg*" -Wait -NoNewWindow - -# Mercurial: https://bugzilla.mozilla.org/show_bug.cgi?id=1490703 -$client.DownloadFile("https://www.mercurial-scm.org/release/windows/mercurial-4.7.1-x86.msi", "C:\binaries\mercurial-4.7.1-x86.msi") -Start-Process "msiexec" -ArgumentList "/i C:\binaries\mercurial-4.7.1-x86.msi /quiet" -Wait -NoNewWindow - -# MercurialConfig: Required by clonebundle and share hg extensions -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/mercurial.ini", "C:\Program Files\Mercurial\Mercurial.ini") - -# robustcheckout: Required by robustcheckout hg extension -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/FirefoxBuildResources/robustcheckout.py", "C:\mozilla-build\robustcheckout.py") - -# MercurialCerts -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mercurial/cacert.pem", "C:\mozilla-build\msys\etc\cacert.pem") - -# env_MOZILLABUILD: Absolutely required for mozharness builds. Python will fall in a heap, throwing misleading exceptions without this. :) -[Environment]::SetEnvironmentVariable("MOZILLABUILD", "C:\mozilla-build", "Machine") - -# env_PATH - -# pip3_upgrade_pip -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade pip==19.2.3" -Wait -NoNewWindow - -# pip3_upgrade_zstandard -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade zstandard==0.11.1" -Wait -NoNewWindow - -# pip3_upgrade_certifi -Start-Process "C:\mozilla-build\python3\python3.exe" -ArgumentList "-m pip install --upgrade certifi" -Wait -NoNewWindow - -# ToolToolInstall -$client.DownloadFile("https://raw.githubusercontent.com/mozilla/release-services/master/src/tooltool/client/tooltool.py", "C:\mozilla-build\tooltool.py") - -# reg_WindowsErrorReportingLocalDumps: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-Item -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Force - -# reg_WindowsErrorReportingDontShowUI: https://bugzilla.mozilla.org/show_bug.cgi?id=1261812 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "DontShowUI" -Value "0x00000001" -PropertyType Dword -Force - -# GenericWorkerDirectory -md "C:\generic-worker" - -# GenericWorkerDownload -$client.DownloadFile("https://github.com/taskcluster/generic-worker/releases/download/v16.5.1/generic-worker-multiuser-windows-386.exe", "C:\generic-worker\generic-worker.exe") - -# LiveLogDownload -$client.DownloadFile("https://github.com/taskcluster/livelog/releases/download/v1.1.0/livelog-windows-386.exe", "C:\generic-worker\livelog.exe") - -# TaskClusterProxyDownload -$client.DownloadFile("https://github.com/taskcluster/taskcluster-proxy/releases/download/v5.1.0/taskcluster-proxy-windows-386.exe", "C:\generic-worker\taskcluster-proxy.exe") - -# NSSMDownload -$client.DownloadFile("https://nssm.cc/ci/nssm-2.24-103-gdee49fc.zip", "C:\Windows\Temp\NSSMInstall.zip") - -# NSSMInstall: NSSM is required to install Generic Worker as a service. Currently ZipInstall fails, so using 7z instead. -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -oC:\ C:\Windows\Temp\NSSMInstall.zip" -Wait -NoNewWindow - -# GenericWorkerInstall -Start-Process "C:\generic-worker\generic-worker.exe" -ArgumentList "install service --nssm C:\nssm-2.24-103-gdee49fc\win32\nssm.exe --config C:\generic-worker\generic-worker.config --configure-for-%MY_CLOUD%" -Wait -NoNewWindow - -# DisableDesktopInterrupt -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/disable-desktop-interrupt.reg", "C:\generic-worker\disable-desktop-interrupt.reg") - -# GenericWorkerStateWait -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/run-generic-worker-and-reboot.bat", "C:\generic-worker\run-generic-worker.bat") - -# TaskUserInitScript: https://bugzilla.mozilla.org/show_bug.cgi?id=1433851#c19 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/GenericWorker/task-user-init-win7.cmd", "C:\generic-worker\task-user-init.cmd") - -# PipConfDirectory: https://pip.pypa.io/en/stable/user_guide/#config-file -md "C:\ProgramData\pip" - -# PipConf -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/pip.conf", "C:\ProgramData\pip\pip.ini") - -# virtualenv_support -md "C:\mozilla-build\python\Lib\site-packages\virtualenv_support" - -# virtualenv_support_pywin32 -$client.DownloadFile("https://pypi.python.org/packages/cp27/p/pypiwin32/pypiwin32-219-cp27-none-win32.whl#md5=a8b0c1b608c1afeb18cd38d759ee5e29", "C:\mozilla-build\python\Lib\site-packages\virtualenv_support\pypiwin32-219-cp27-none-win32.whl") - -# virtualenv_support_pywin32_amd64 -$client.DownloadFile("https://pypi.python.org/packages/cp27/p/pypiwin32/pypiwin32-219-cp27-none-win_amd64.whl#md5=d7bafcf3cce72c3ce9fdd633a262c335", "C:\mozilla-build\python\Lib\site-packages\virtualenv_support\pypiwin32-219-cp27-none-win_amd64.whl") - -# HgShared: allows builds to use `hg robustcheckout ...` -md "y:\hg-shared" - -# HgSharedAccessRights: allows builds to use `hg robustcheckout ...` -Start-Process "icacls.exe" -ArgumentList "y:\hg-shared /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# PipCache: share pip cache across subsequent task users -md "y:\pip-cache" - -# PipCacheAccessRights: share pip cache across subsequent task users -Start-Process "icacls.exe" -ArgumentList "y:\pip-cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_PIP_DOWNLOAD_CACHE: share pip download cache between tasks -[Environment]::SetEnvironmentVariable("PIP_DOWNLOAD_CACHE", "y:\pip-cache", "Machine") - -# TooltoolCache: share tooltool cache across subsequent task users -md "y:\tooltool-cache" - -# TooltoolCacheAccessRights: share tooltool cache across subsequent task users -Start-Process "icacls.exe" -ArgumentList "y:\tooltool-cache /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# env_TOOLTOOL_CACHE: share tooltool cache between tasks -[Environment]::SetEnvironmentVariable("TOOLTOOL_CACHE", "y:\tooltool-cache", "Machine") - -# ngen_executeQueuedItems: https://blogs.msdn.microsoft.com/dotnet/2013/08/06/wondering-why-mscorsvw-exe-has-high-cpu-usage-you-can-speed-it-up -Start-Process "c:\Windows\Microsoft.NET\Framework\v4.0.30319\ngen.exe" -ArgumentList "executeQueuedItems" -Wait -NoNewWindow - -# CarbonClone: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "clone --insecure https://bitbucket.org/splatteredbits/carbon C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonUpdate: Bug 1316329 - support creation of symlinks by task users -Start-Process "C:\Program Files\Mercurial\hg.exe" -ArgumentList "update 2.4.0 -R C:\Windows\Temp\carbon" -Wait -NoNewWindow - -# CarbonInstall: Bug 1316329 - support creation of symlinks by task users -Start-Process "xcopy" -ArgumentList "C:\Windows\Temp\carbon\Carbon C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Carbon /e /i /y" -Wait -NoNewWindow - -# GrantEveryoneSeCreateSymbolicLinkPrivilege: Bug 1316329 - support creation of symlinks by task users -Start-Process "powershell" -ArgumentList "-command `"& {&'Import-Module' Carbon}`"; `"& {&'Grant-Privilege' -Identity Everyone -Privilege SeCreateSymbolicLinkPrivilege}`"" -Wait -NoNewWindow - -# MozillaMaintenanceDir: Working directory for Mozilla Maintenance Service installation -md "C:\dsc\MozillaMaintenance" - -# maintenanceservice_installer -$client.DownloadFile("https://github.com/mozilla-releng/OpenCloudConfig/blob/master/userdata/Configuration/Mozilla%20Maintenance%20Service/maintenanceservice_installer.exe?raw=true", "C:\dsc\MozillaMaintenance\maintenanceservice_installer.exe") - -# maintenanceservice -$client.DownloadFile("https://github.com/mozilla-releng/OpenCloudConfig/blob/master/userdata/Configuration/Mozilla%20Maintenance%20Service/maintenanceservice.exe?raw=true", "C:\dsc\MozillaMaintenance\maintenanceservice.exe") - -# maintenanceservice_install -Start-Process "C:\dsc\MozillaMaintenance\maintenanceservice_installer.exe" -ArgumentList "/s" -Wait -NoNewWindow - -# MaintenanceServiceAcessRights: See https://bugzilla.mozilla.org/show_bug.cgi?id=1067756#c21 -Start-Process "icacls.exe" -ArgumentList "`"C:\Program Files\Mozilla Maintenance Service`" /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# MozFakeCA_cer -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mozilla%20Maintenance%20Service/MozFakeCA.cer", "C:\dsc\MozillaMaintenance\MozFakeCA.cer") - -# MozFakeCA_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozFakeCA.cer" -Wait -NoNewWindow - -# MozFakeCA_2017_10_13_cer -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/Mozilla%20Maintenance%20Service/MozFakeCA_2017-10-13.cer", "C:\dsc\MozillaMaintenance\MozFakeCA_2017-10-13.cer") - -# MozFakeCA_2017_10_13_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozFakeCA_2017-10-13.cer" -Wait -NoNewWindow - -# MozRoot_cer -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/certs/MozRoot.cer", "C:\dsc\MozillaMaintenance\MozRoot.cer") - -# MozRoot_cer -Start-Process "certutil.exe" -ArgumentList "-addstore Root C:\dsc\MozillaMaintenance\MozRoot.cer" -Wait -NoNewWindow - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "name" -Value "Mozilla Corporation" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "issuer" -Value "Thawte Code Signing CA - G2" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_0_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\0" -Name "publisherLink" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "name" -Value "Mozilla Fake SPC" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "issuer" -Value "Mozilla Fake CA" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_1_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\1" -Name "publisherLink" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_name -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "name" -Value "Mozilla Corporation" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_issuer -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "issuer" -Value "DigiCert SHA2 Assured ID Code Signing CA" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_programName -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "programName" -Value "" -PropertyType String -Force - -# reg_Mozilla_MaintenanceService_3932ecacee736d366d6436db0f55bce4_2_publisherLink -New-ItemProperty -Path "HKLM:SOFTWARE\Mozilla\MaintenanceService\3932ecacee736d366d6436db0f55bce4\2" -Name "publisherLink" -Value "" -PropertyType String -Force - -# GrantEveryoneMozillaRegistryWriteAccess: Bug 1353889 - Grant all users account write access to Mozilla registry key -Start-Process "powershell" -ArgumentList "-command `"& {(Get-Acl -Path 'HKLM:\SOFTWARE\Mozilla').SetAccessRule((New-Object -TypeName 'System.Security.AccessControl.RegistryAccessRule' -ArgumentList @('Everyone', 'FullControl', 'Allow')))}`"" -Wait -NoNewWindow - -# KmsIn -New-NetFirewallRule -DisplayName "KmsIn (TCP 1688 Inbound): Allow" -Direction Inbound -LocalPort 1688 -Protocol TCP -Action Allow - -# KmsOut -New-NetFirewallRule -DisplayName "KmsOut (TCP 1688 Outbound): Allow" -Direction Outbound -LocalPort 1688 -Protocol TCP -Action Allow - -# nircmd -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/nircmd/nircmd.exe", "C:\Windows\System32\nircmd.exe") - -# nircmdc -$client.DownloadFile("https://s3.amazonaws.com/windows-opencloudconfig-packages/nircmd/nircmdc.exe", "C:\Windows\System32\nircmdc.exe") - -# reg_Power_PreferredPlan_HighPerformance: https://bugzilla.mozilla.org/show_bug.cgi?id=1362613 -New-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\ControlPanel\NameSpace\{025A5937-A6BE-4686-A844-36FE4BEC8B6D}" -Name "PreferredPlan" -Value "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c" -PropertyType String -Force - -# DisableWinDefend: https://bugzilla.mozilla.org/show_bug.cgi?id=1365909 -Set-Service "WinDefend" -StartupType Disabled -Status Stopped - -# OpenSshDownload: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://github.com/PowerShell/Win32-OpenSSH/releases/download/v7.6.1.0p1-Beta/OpenSSH-Win32.zip", "C:\Windows\Temp\OpenSSH-Win32.zip") - -# OpenSshUnzip: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "C:\Program Files\7-Zip\7z.exe" -ArgumentList "x -o`"C:\Program Files`" C:\Windows\Temp\OpenSSH-Win32.zip" -Wait -NoNewWindow - -# SshIn -New-NetFirewallRule -DisplayName "SshIn (TCP 22 Inbound): Allow" -Direction Inbound -LocalPort 22 -Protocol TCP -Action Allow - -# InstallOpenSSH: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Start-Process "powershell.exe" -ArgumentList "-ExecutionPolicy Bypass -File `"C:\Program Files\OpenSSH-Win32\install-sshd.ps1`"" -Wait -NoNewWindow - -# reg_OpenSSH_DefaultShell: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShell" -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force - -# reg_OpenSSH_DefaultShellCommandOption: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -New-ItemProperty -Path "HKLM:SOFTWARE\OpenSSH" -Name "DefaultShellCommandOption" -Value "/c" -PropertyType String -Force - -# AdministratorSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\Users\Administrator\.ssh" - -# AdministratorSshAuthorisedKeys: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/authorized_keys", "C:\Users\Administrator\.ssh\authorized_keys") - -# ProgramDataSshDir: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -md "C:\ProgramData\ssh" - -# sshd_config: https://bugzilla.mozilla.org/show_bug.cgi?id=1464343 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/ssh/sshd_config", "C:\ProgramData\ssh\sshd_config") - -# Start_sshd: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "sshd" -StartupType Automatic -Status Running - -# Start_sshagent: https://bugzilla.mozilla.org/show_bug.cgi?id=1454578 -Set-Service "ssh-agent" -StartupType Automatic -Status Running - -# vcredist_vs2015_x86: https://bugzilla.mozilla.org/show_bug.cgi?id=1460042 -$client.DownloadFile("http://download.microsoft.com/download/f/3/9/f39b30ec-f8ef-4ba3-8cb4-e301fcf0e0aa/vc_redist.x86.exe", "C:\binaries\vc_redist.x86.exe") -Start-Process "C:\binaries\vc_redist.x86.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x86-install.log" -Wait -NoNewWindow - -# vcredist_vs2015_x64: https://bugzilla.mozilla.org/show_bug.cgi?id=1460042 -$client.DownloadFile("http://download.microsoft.com/download/4/c/b/4cbd5757-0dd4-43a7-bac0-2a492cedbacb/vc_redist.x64.exe", "C:\binaries\vc_redist.x64.exe") -Start-Process "C:\binaries\vc_redist.x64.exe" -ArgumentList "/install /passive /norestart /log C:\log\vcredist_vs2015_x64-install.log" -Wait -NoNewWindow - -# ProgramData_Mozilla_AccessRights: https://bugzilla.mozilla.org/show_bug.cgi?id=1494048 -Start-Process "icacls.exe" -ArgumentList "c:\ProgramData\Mozilla /grant Everyone:(OI)(CI)F" -Wait -NoNewWindow - -# HostsFile: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 -$client.DownloadFile("https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Configuration/etc/hosts", "C:\Windows\System32\drivers\etc\hosts") - -# SetHostsFileContent: https://bugzilla.mozilla.org/show_bug.cgi?id=1497308 - -# env_TASKCLUSTER_ROOT_URL: https://bugzilla.mozilla.org/show_bug.cgi?id=1551789 -[Environment]::SetEnvironmentVariable("TASKCLUSTER_ROOT_URL", "https://firefox-ci-tc.services.mozilla.com", "Machine") - -# programdata_google_auth: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -md "C:\ProgramData\Google\Auth" - -# stackdriver_key: https://bugzilla.mozilla.org/show_bug.cgi?id=1588757 -cmd /c mklink "C:\ProgramData\Google\Auth\application_default_credentials.json" "C:\builds\taskcluster-worker-ec2@aws-stackdriver-log-1571127027.json" - -# now shutdown, in preparation for creating an image -# Stop-Computer isn't working, also not when specifying -AsJob, so reverting to using `shutdown` command instead -# * https://www.reddit.com/r/PowerShell/comments/65250s/windows_10_creators_update_stopcomputer_not/dgfofug/?st=j1o3oa29&sh=e0c29c6d -# * https://support.microsoft.com/en-in/help/4014551/description-of-the-security-and-quality-rollup-for-the-net-framework-4 -# * https://support.microsoft.com/en-us/help/4020459 -shutdown -s diff --git a/worker_types/generate_occ_userdata.sh b/worker_types/generate_occ_userdata.sh deleted file mode 100755 index 10ee92fb..00000000 --- a/worker_types/generate_occ_userdata.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -e -cd "$(dirname "${0}")" - -echo "Removing..." -rm -v gecko-*/bootstrap.ps1 - -echo "Generating..." -curl -L 'https://github.com/mozilla-releng/OpenCloudConfig/tree/master/userdata/Manifest' 2>/dev/null | sed -n 's/.*\(gecko[^.]*\)\.json.*/\1/p' | sort -u | xargs -n 1 -P 32 ./transform.sh diff --git a/worker_types/gwci-linux/aws_filters b/worker_types/gwci-linux/aws_filters deleted file mode 100644 index 70c09574..00000000 --- a/worker_types/gwci-linux/aws_filters +++ /dev/null @@ -1 +0,0 @@ -Name=name,Values=ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-* diff --git a/worker_types/gwci-linux/aws_owners b/worker_types/gwci-linux/aws_owners deleted file mode 100644 index ba0a9c54..00000000 --- a/worker_types/gwci-linux/aws_owners +++ /dev/null @@ -1 +0,0 @@ -099720109477 diff --git a/worker_types/gwci-linux/gcp_filters b/worker_types/gwci-linux/gcp_filters deleted file mode 100644 index f708a14a..00000000 --- a/worker_types/gwci-linux/gcp_filters +++ /dev/null @@ -1 +0,0 @@ ---image=ubuntu-1804-bionic-v20190918 --image-project=ubuntu-os-cloud --boot-disk-size=10GB --boot-disk-type=pd-standard diff --git a/worker_types/nss-win2012r2-new/aws_filters b/worker_types/nss-win2012r2-new/aws_filters deleted file mode 100644 index 67753022..00000000 --- a/worker_types/nss-win2012r2-new/aws_filters +++ /dev/null @@ -1,2 +0,0 @@ -Name=platform,Values=windows -Name=name,Values=Windows_Server-2012-R2_RTM-English-64Bit-Base* diff --git a/worker_types/nss-win2012r2-new/aws_owners b/worker_types/nss-win2012r2-new/aws_owners deleted file mode 100644 index 38631e52..00000000 --- a/worker_types/nss-win2012r2-new/aws_owners +++ /dev/null @@ -1,2 +0,0 @@ -self -amazon diff --git a/worker_types/nss-win2012r2-new/bootstrap.ps1 b/worker_types/nss-win2012r2-new/bootstrap.ps1 deleted file mode 100644 index 6058a100..00000000 --- a/worker_types/nss-win2012r2-new/bootstrap.ps1 +++ /dev/null @@ -1,210 +0,0 @@ -#### Before making changes to nss-win2012r2 worker type, please first apply -#### your changes to nss-win2012r2-new worker type, which is the staging worker -#### type for nss windows tasks. Then please ask for these changes to be -#### deployed to production, and you can then make a new try push which uses -#### nss-win2012r2-new instead of nss-win2012r2 to test that the worker type -#### changes are ok. If that try push is successful, you can then copy over -#### the staging worker type definition over the production worker type -#### definition, and request a new deployment in order to get your changes in -#### production. - -# use TLS 1.2 (see bug 1443595) -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -# capture env -Get-ChildItem Env: | Out-File "C:\install_env.txt" - -# needed for making http requests -$client = New-Object system.net.WebClient -$shell = new-object -com shell.application - -# utility function to download a zip file and extract it -function Expand-ZIPFile($file, $destination, $url) -{ - $client.DownloadFile($url, $file) - $zip = $shell.NameSpace($file) - foreach($item in $zip.items()) - { - $shell.Namespace($destination).copyhere($item) - } -} - -# allow powershell scripts to run -Set-ExecutionPolicy Unrestricted -Force -Scope Process - -# install chocolatey package manager -Invoke-Expression ($client.DownloadString('https://chocolatey.org/install.ps1')) - -# install Windows SDK 8.1 -choco install -y windows-sdk-8.1 - -# install June 2010 DirectX SDK for compatibility with Win XP -$client.DownloadFile("http://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe", "C:\DXSDK_Jun10.exe") - -# prerequisite for June 2010 DirectX SDK is to install ".NET Framework 3.5 (includes .NET 2.0 and 3.0)" -Install-WindowsFeature NET-Framework-Core - -# now run DirectX SDK installer -Start-Process C:\DXSDK_Jun10.exe -ArgumentList "/U" -Wait -NoNewWindow -PassThru -RedirectStandardOutput C:\directx_sdk_install.log -RedirectStandardError C:\directx_sdk_install.err - -# install rustc dependencies (32 bit) -$client.DownloadFile("http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe", "C:\vcredist_x86-vs2013.exe") -Start-Process "C:\vcredist_x86-vs2013.exe" -ArgumentList "/install /passive /norestart /log C:\vcredist_x86-vs2013-install.log" -Wait -PassThru - -# install rustc dependencies (64 bit) -$client.DownloadFile("http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe", "C:\vcredist_x64-vs2013.exe") -Start-Process "C:\vcredist_x64-vs2013.exe" -ArgumentList "/install /passive /norestart /log C:\vcredist_x64-vs2013-install.log" -Wait -PassThru - -# install more rustc dependencies (32 bit) -$client.DownloadFile("http://download.microsoft.com/download/f/3/9/f39b30ec-f8ef-4ba3-8cb4-e301fcf0e0aa/vc_redist.x86.exe", "C:\vcredist_x86-vs2015.exe") -Start-Process "C:\vcredist_x86-vs2015.exe" -ArgumentList "/install /passive /norestart /log C:\vcredist_x86-vs2015-install.log" -Wait -PassThru - -# install more rustc dependencies (64 bit) -$client.DownloadFile("http://download.microsoft.com/download/4/c/b/4cbd5757-0dd4-43a7-bac0-2a492cedbacb/vc_redist.x64.exe", "C:\vcredist_x64-vs2015.exe") -Start-Process "C:\vcredist_x64-vs2015.exe" -ArgumentList "/install /passive /norestart /log C:\vcredist_x64-vs2015-install.log" -Wait -PassThru - -# install mozilla-build yasm dependencies (32 bit) -$client.DownloadFile("http://download.microsoft.com/download/C/6/D/C6D0FD4E-9E53-4897-9B91-836EBA2AACD3/vcredist_x86.exe", "C:\vcredist_x86-vs2010.exe") -Start-Process "C:\vcredist_x86-vs2010.exe" -ArgumentList "/install /passive /norestart /log C:\vcredist_x86-vs2010-install.log" -Wait -PassThru - -# install mozilla-build yasm dependencies (64 bit) -$client.DownloadFile("http://download.microsoft.com/download/A/8/0/A80747C3-41BD-45DF-B505-E9710D2744E0/vcredist_x64.exe", "C:\vcredist_x64-vs2010.exe") -Start-Process "C:\vcredist_x64-vs2010.exe" -ArgumentList "/install /passive /norestart /log C:\vcredist_x64-vs2010-install.log" -Wait -PassThru - -# download mozilla-build installer -$client.DownloadFile("https://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-3.2.exe", "C:\MozillaBuildSetup.exe") - -# run mozilla-build installer in silent (/S) mode -Start-Process "C:\MozillaBuildSetup.exe" -ArgumentList "/S" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\MozillaBuild_install.log" -RedirectStandardError "C:\MozillaBuild_install.err" - -# Create C:\builds and give full access to all users (for hg-shared, tooltool_cache, etc) -md "C:\builds" -$acl = Get-Acl -Path "C:\builds" -$ace = New-Object System.Security.AccessControl.FileSystemAccessRule("Everyone","Full","ContainerInherit,ObjectInherit","None","Allow") -$acl.AddAccessRule($ace) -Set-Acl "C:\builds" $acl - -# download tooltool -$client.DownloadFile("https://raw.githubusercontent.com/mozilla/release-services/master/src/tooltool/client/tooltool.py", "C:\builds\tooltool.py") - -# install nssm -Expand-ZIPFile -File "C:\nssm-2.24.zip" -Destination "C:\" -Url "http://www.nssm.cc/release/nssm-2.24.zip" - -# download generic-worker -md C:\generic-worker -$client.DownloadFile("https://github.com/taskcluster/generic-worker/releases/download/v16.5.5/generic-worker-multiuser-windows-amd64.exe", "C:\generic-worker\generic-worker.exe") - -# download livelog -$client.DownloadFile("https://github.com/taskcluster/livelog/releases/download/v1.1.0/livelog-windows-amd64.exe", "C:\generic-worker\livelog.exe") - -# download taskcluster-proxy -$client.DownloadFile("https://github.com/taskcluster/taskcluster-proxy/releases/download/v5.1.0/taskcluster-proxy-windows-amd64.exe", "C:\generic-worker\taskcluster-proxy.exe") - -# configure hosts file for taskcluster-proxy access via http://taskcluster -$HostsFile_Base64 = "IyBDb3B5cmlnaHQgKGMpIDE5OTMtMjAwOSBNaWNyb3NvZnQgQ29ycC4NCiMNCiMgVGhpcyBpcyBhIHNhbXBsZSBIT1NUUyBmaWxlIHVzZWQgYnkgTWljcm9zb2Z0IFRDUC9JUCBmb3IgV2luZG93cy4NCiMNCiMgVGhpcyBmaWxlIGNvbnRhaW5zIHRoZSBtYXBwaW5ncyBvZiBJUCBhZGRyZXNzZXMgdG8gaG9zdCBuYW1lcy4gRWFjaA0KIyBlbnRyeSBzaG91bGQgYmUga2VwdCBvbiBhbiBpbmRpdmlkdWFsIGxpbmUuIFRoZSBJUCBhZGRyZXNzIHNob3VsZA0KIyBiZSBwbGFjZWQgaW4gdGhlIGZpcnN0IGNvbHVtbiBmb2xsb3dlZCBieSB0aGUgY29ycmVzcG9uZGluZyBob3N0IG5hbWUuDQojIFRoZSBJUCBhZGRyZXNzIGFuZCB0aGUgaG9zdCBuYW1lIHNob3VsZCBiZSBzZXBhcmF0ZWQgYnkgYXQgbGVhc3Qgb25lDQojIHNwYWNlLg0KIw0KIyBBZGRpdGlvbmFsbHksIGNvbW1lbnRzIChzdWNoIGFzIHRoZXNlKSBtYXkgYmUgaW5zZXJ0ZWQgb24gaW5kaXZpZHVhbA0KIyBsaW5lcyBvciBmb2xsb3dpbmcgdGhlIG1hY2hpbmUgbmFtZSBkZW5vdGVkIGJ5IGEgJyMnIHN5bWJvbC4NCiMNCiMgRm9yIGV4YW1wbGU6DQojDQojICAgICAgMTAyLjU0Ljk0Ljk3ICAgICByaGluby5hY21lLmNvbSAgICAgICAgICAjIHNvdXJjZSBzZXJ2ZXINCiMgICAgICAgMzguMjUuNjMuMTAgICAgIHguYWNtZS5jb20gICAgICAgICAgICAgICMgeCBjbGllbnQgaG9zdA0KDQojIGxvY2FsaG9zdCBuYW1lIHJlc29sdXRpb24gaXMgaGFuZGxlZCB3aXRoaW4gRE5TIGl0c2VsZi4NCiMJMTI3LjAuMC4xICAgICAgIGxvY2FsaG9zdA0KIwk6OjEgICAgICAgICAgICAgbG9jYWxob3N0DQoNCiMgVXNlZnVsIGZvciBnZW5lcmljLXdvcmtlciB0YXNrY2x1c3Rlci1wcm94eSBpbnRlZ3JhdGlvbg0KIyBTZWUgaHR0cHM6Ly9idWd6aWxsYS5tb3ppbGxhLm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MTQ0OTk4MSNjNg0KMTI3LjAuMC4xICAgICAgICB0YXNrY2x1c3RlciAgICANCg==" -$HostsFile_Content = [System.Convert]::FromBase64String($HostsFile_Base64) -Set-Content -Path "C:\Windows\System32\drivers\etc\hosts" -Value $HostsFile_Content -Encoding Byte - -# install generic-worker -Start-Process C:\generic-worker\generic-worker.exe -ArgumentList "install service --configure-for-%MY_CLOUD% --nssm C:\nssm-2.24\win64\nssm.exe --config C:\generic-worker\generic-worker.config" -Wait -NoNewWindow -PassThru -RedirectStandardOutput C:\generic-worker\install.log -RedirectStandardError C:\generic-worker\install.err - -# initial clone of mozilla-central -# Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "C:\mozilla-build\python\Scripts\hg clone -u null https://hg.mozilla.org/mozilla-central C:\gecko" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\hg_initial_clone.log" -RedirectStandardError "C:\hg_initial_clone.err" - -# download Windows Server 2003 Resource Kit Tools -$client.DownloadFile("https://download.microsoft.com/download/8/e/c/8ec3a7d8-05b4-440a-a71e-ca3ee25fe057/rktools.exe", "C:\rktools.exe") - -# download gvim -$client.DownloadFile("http://artfiles.org/vim.org/pc/gvim80-069.exe", "C:\gvim80-069.exe") - -# https://bugzil.la/1274844 download BinScope -$client.DownloadFile("https://download.microsoft.com/download/2/6/A/26AAA1DE-D060-4246-93B5-7D7C877E4F8F/BinScopeSetup.msi", "C:\BinScopeSetup.msi") - -# install BinScope -Start-Process "msiexec" -ArgumentList "/i C:\BinScopeSetup.msi /quiet" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\binscope-install.log" -RedirectStandardError "C:\binscope-install.err" - -# open up firewall for livelog (both PUT and GET interfaces) -New-NetFirewallRule -DisplayName "Allow livelog PUT requests" -Direction Inbound -LocalPort 60022 -Protocol TCP -Action Allow -New-NetFirewallRule -DisplayName "Allow livelog GET requests" -Direction Inbound -LocalPort 60023 -Protocol TCP -Action Allow - -# install go (not required, but useful) -md "C:\gopath" -Expand-ZIPFile -File "C:\go1.11.5.windows-amd64.zip" -Destination "C:\" -Url "https://storage.googleapis.com/golang/go1.11.5.windows-amd64.zip" - -# install PSTools -# md "C:\PSTools" -# Expand-ZIPFile -File "C:\PSTools\PSTools.zip" -Destination "C:\PSTools" -Url "https://download.sysinternals.com/files/PSTools.zip" - -# install git -$client.DownloadFile("https://github.com/git-for-windows/git/releases/download/v2.16.2.windows.1/Git-2.16.2-64-bit.exe", "C:\Git-2.16.2-64-bit.exe") -Start-Process "C:\Git-2.16.2-64-bit.exe" -ArgumentList "/VERYSILENT /LOG=C:\git_install.log /NORESTART /SUPPRESSMSGBOXES" -Wait -NoNewWindow - -# install node -$client.DownloadFile("https://nodejs.org/dist/v6.6.0/node-v6.6.0-x64.msi", "C:\NodeSetup.msi") -Start-Process "msiexec" -ArgumentList "/i C:\NodeSetup.msi /quiet" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\node-install.log" -RedirectStandardError "C:\node-install.err" - -# set permanent env vars -[Environment]::SetEnvironmentVariable("GOROOT", "C:\go", "Machine") -[Environment]::SetEnvironmentVariable("PATH", $Env:Path + ";C:\Program Files\Vim\vim80;C:\go\bin;C:\gopath\bin;C:\mozilla-build\python;C:\mozilla-build\python\Scripts;C:\Program Files\Git\cmd;C:\Program Files\nodejs", "Machine") -[Environment]::SetEnvironmentVariable("GOPATH", "C:\gopath", "Machine") - -# upgrade python libraries -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade pip==8.1.1 setuptools==20.7.0 virtualenv==15.0.3 wheel==0.29.0 pypiwin32==219 requests==2.9.1 psutil==4.1.0" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\python_package_upgrades.log" -RedirectStandardError "C:\python_package_upgrades.err" - -# set env vars for the currently running process -$env:GOROOT = "C:\go" -$env:GOPATH = "C:\gopath" -$env:PATH = $env:PATH + ";C:\go\bin;C:\gopath\bin;C:\mozilla-build\python;C:\mozilla-build\python\Scripts;C:\Program Files\Git\cmd" - -# get generic-worker and livelog source code (note required, but useful) -Start-Process "go" -ArgumentList "get -t github.com/taskcluster/generic-worker github.com/taskcluster/livelog" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\generic-worker\go-get_install.log" -RedirectStandardError "C:\generic-worker\go-get_install.err" - -# generate ed25519 key -Start-Process C:\generic-worker\generic-worker.exe -ArgumentList "new-ed25519-keypair --file C:\generic-worker\generic-worker-ed25519-signing-key.key" -Wait -NoNewWindow -PassThru -RedirectStandardOutput C:\generic-worker\generate-signing-key.log -RedirectStandardError C:\generic-worker\generate-signing-key.err - -# download cygwin (not required, but useful) -$client.DownloadFile("https://www.cygwin.com/setup-x86_64.exe", "C:\cygwin-setup-x86_64.exe") - -# install cygwin -# complete package list: https://cygwin.com/packages/package_list.html -Start-Process "C:\cygwin-setup-x86_64.exe" -ArgumentList "--quiet-mode --wait --root C:\cygwin --site http://cygwin.mirror.constant.com --packages openssh,vim,curl,tar,wget,zip,unzip,diffutils,bzr" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\cygwin_install.log" -RedirectStandardError "C:\cygwin_install.err" - -# open up firewall for ssh daemon -New-NetFirewallRule -DisplayName "Allow SSH inbound" -Direction Inbound -LocalPort 22 -Protocol TCP -Action Allow - -# workaround for https://www.cygwin.com/ml/cygwin/2015-10/msg00036.html -# see: -# 1) https://www.cygwin.com/ml/cygwin/2015-10/msg00038.html -# 2) https://cygwin.com/git/gitweb.cgi?p=cygwin-csih.git;a=blob;f=cygwin-service-installation-helper.sh;h=10ab4fb6d47803c9ffabdde51923fc2c3f0496bb;hb=7ca191bebb52ae414bb2a2e37ef22d94f2658dc7#l2884 -$env:LOGONSERVER = "\\" + $env:COMPUTERNAME - -# configure sshd (not required, but useful) -Start-Process "C:\cygwin\bin\bash.exe" -ArgumentList "--login -c `"ssh-host-config -y -c 'ntsec mintty' -u 'cygwinsshd' -w 'qwe123QWE!@#'`"" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\cygrunsrv.log" -RedirectStandardError "C:\cygrunsrv.err" - -# start sshd -Start-Process "net" -ArgumentList "start sshd" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\net_start_sshd.log" -RedirectStandardError "C:\net_start_sshd.err" - -# download bash setup script -$client.DownloadFile("https://raw.githubusercontent.com/petemoore/myscrapbook/master/setup.sh", "C:\cygwin\home\Administrator\setup.sh") - -# run bash setup script -Start-Process "C:\cygwin\bin\bash.exe" -ArgumentList "--login -c 'chmod a+x setup.sh; ./setup.sh'" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\Administrator_cygwin_setup.log" -RedirectStandardError "C:\Administrator_cygwin_setup.err" - -# install dependencywalker (useful utility for troubleshooting, not required) -md "C:\DependencyWalker" -Expand-ZIPFile -File "C:\depends22_x64.zip" -Destination "C:\DependencyWalker" -Url "http://dependencywalker.com/depends22_x64.zip" - -# install ProcessExplorer (useful utility for troubleshooting, not required) -md "C:\ProcessExplorer" -Expand-ZIPFile -File "C:\ProcessExplorer.zip" -Destination "C:\ProcessExplorer" -Url "https://download.sysinternals.com/files/ProcessExplorer.zip" - -# install ProcessMonitor (useful utility for troubleshooting, not required) -md "C:\ProcessMonitor" -Expand-ZIPFile -File "C:\ProcessMonitor.zip" -Destination "C:\ProcessMonitor" -Url "https://download.sysinternals.com/files/ProcessMonitor.zip" - -# now shutdown, in preparation for creating an image -# Stop-Computer isn't working, also not when specifying -AsJob, so reverting to using `shutdown` command instead -# * https://www.reddit.com/r/PowerShell/comments/65250s/windows_10_creators_update_stopcomputer_not/dgfofug/?st=j1o3oa29&sh=e0c29c6d -# * https://support.microsoft.com/en-in/help/4014551/description-of-the-security-and-quality-rollup-for-the-net-framework-4 -# * https://support.microsoft.com/en-us/help/4020459 -shutdown -s diff --git a/worker_types/nss-win2012r2-new/gcp_filters b/worker_types/nss-win2012r2-new/gcp_filters deleted file mode 100644 index f2e848c9..00000000 --- a/worker_types/nss-win2012r2-new/gcp_filters +++ /dev/null @@ -1 +0,0 @@ ---image=windows-server-2012-r2-dc-v20190910 --image-project=windows-cloud --boot-disk-size=50GB --boot-disk-type=pd-standard diff --git a/worker_types/nss-win2012r2/aws_filters b/worker_types/nss-win2012r2/aws_filters deleted file mode 100644 index 67753022..00000000 --- a/worker_types/nss-win2012r2/aws_filters +++ /dev/null @@ -1,2 +0,0 @@ -Name=platform,Values=windows -Name=name,Values=Windows_Server-2012-R2_RTM-English-64Bit-Base* diff --git a/worker_types/nss-win2012r2/aws_owners b/worker_types/nss-win2012r2/aws_owners deleted file mode 100644 index 38631e52..00000000 --- a/worker_types/nss-win2012r2/aws_owners +++ /dev/null @@ -1,2 +0,0 @@ -self -amazon diff --git a/worker_types/nss-win2012r2/bootstrap.ps1 b/worker_types/nss-win2012r2/bootstrap.ps1 deleted file mode 100644 index 0d9e574b..00000000 --- a/worker_types/nss-win2012r2/bootstrap.ps1 +++ /dev/null @@ -1,211 +0,0 @@ -#### Before making changes to nss-win2012r2 worker type, please first apply -#### your changes to nss-win2012r2-new worker type, which is the staging worker -#### type for nss windows tasks. Then please ask for these changes to be -#### deployed to production, and you can then make a new try push which uses -#### nss-win2012r2-new instead of nss-win2012r2 to test that the worker type -#### changes are ok. If that try push is successful, you can then copy over -#### the staging worker type definition over the production worker type -#### definition, and request a new deployment in order to get your changes in -#### production. - -# use TLS 1.2 (see bug 1443595) -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -# capture env -Get-ChildItem Env: | Out-File "C:\install_env.txt" - -# needed for making http requests -$client = New-Object system.net.WebClient -$shell = new-object -com shell.application - -# utility function to download a zip file and extract it -function Expand-ZIPFile($file, $destination, $url) -{ - $client.DownloadFile($url, $file) - $zip = $shell.NameSpace($file) - foreach($item in $zip.items()) - { - $shell.Namespace($destination).copyhere($item) - } -} - -# allow powershell scripts to run -Set-ExecutionPolicy Unrestricted -Force -Scope Process - -# install chocolatey package manager -Invoke-Expression ($client.DownloadString('https://chocolatey.org/install.ps1')) - -# install Windows SDK 8.1 -choco install -y windows-sdk-8.1 - -# install June 2010 DirectX SDK for compatibility with Win XP -$client.DownloadFile("http://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe", "C:\DXSDK_Jun10.exe") - -# prerequisite for June 2010 DirectX SDK is to install ".NET Framework 3.5 (includes .NET 2.0 and 3.0)" -Install-WindowsFeature NET-Framework-Core - -# now run DirectX SDK installer -Start-Process C:\DXSDK_Jun10.exe -ArgumentList "/U" -wait -NoNewWindow -PassThru -RedirectStandardOutput C:\directx_sdk_install.log -RedirectStandardError C:\directx_sdk_install.err - -# install rustc dependencies (32 bit) -$client.DownloadFile("http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe", "C:\vcredist_x86-vs2013.exe") -Start-Process "C:\vcredist_x86-vs2013.exe" -ArgumentList "/install /passive /norestart /log C:\vcredist_x86-vs2013-install.log" -Wait -PassThru - -# install rustc dependencies (64 bit) -$client.DownloadFile("http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe", "C:\vcredist_x64-vs2013.exe") -Start-Process "C:\vcredist_x64-vs2013.exe" -ArgumentList "/install /passive /norestart /log C:\vcredist_x64-vs2013-install.log" -Wait -PassThru - -# install more rustc dependencies (32 bit) -$client.DownloadFile("http://download.microsoft.com/download/f/3/9/f39b30ec-f8ef-4ba3-8cb4-e301fcf0e0aa/vc_redist.x86.exe", "C:\vcredist_x86-vs2015.exe") -Start-Process "C:\vcredist_x86-vs2015.exe" -ArgumentList "/install /passive /norestart /log C:\vcredist_x86-vs2015-install.log" -Wait -PassThru - -# install more rustc dependencies (64 bit) -$client.DownloadFile("http://download.microsoft.com/download/4/c/b/4cbd5757-0dd4-43a7-bac0-2a492cedbacb/vc_redist.x64.exe", "C:\vcredist_x64-vs2015.exe") -Start-Process "C:\vcredist_x64-vs2015.exe" -ArgumentList "/install /passive /norestart /log C:\vcredist_x64-vs2015-install.log" -Wait -PassThru - -# install mozilla-build yasm dependencies (32 bit) -$client.DownloadFile("http://download.microsoft.com/download/C/6/D/C6D0FD4E-9E53-4897-9B91-836EBA2AACD3/vcredist_x86.exe", "C:\vcredist_x86-vs2010.exe") -Start-Process "C:\vcredist_x86-vs2010.exe" -ArgumentList "/install /passive /norestart /log C:\vcredist_x86-vs2010-install.log" -Wait -PassThru - -# install mozilla-build yasm dependencies (64 bit) -$client.DownloadFile("http://download.microsoft.com/download/A/8/0/A80747C3-41BD-45DF-B505-E9710D2744E0/vcredist_x64.exe", "C:\vcredist_x64-vs2010.exe") -Start-Process "C:\vcredist_x64-vs2010.exe" -ArgumentList "/install /passive /norestart /log C:\vcredist_x64-vs2010-install.log" -Wait -PassThru - -# download mozilla-build installer -$client.DownloadFile("https://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-3.2.exe", "C:\MozillaBuildSetup.exe") - -# run mozilla-build installer in silent (/S) mode -Start-Process "C:\MozillaBuildSetup.exe" -ArgumentList "/S" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\MozillaBuild_install.log" -RedirectStandardError "C:\MozillaBuild_install.err" - -# Create C:\builds and give full access to all users (for hg-shared, tooltool_cache, etc) -md "C:\builds" -$acl = Get-Acl -Path "C:\builds" -$ace = New-Object System.Security.AccessControl.FileSystemAccessRule("Everyone","Full","ContainerInherit,ObjectInherit","None","Allow") -$acl.AddAccessRule($ace) -Set-Acl "C:\builds" $acl - -# download tooltool -$client.DownloadFile("https://raw.githubusercontent.com/mozilla/release-services/master/src/tooltool/client/tooltool.py", "C:\builds\tooltool.py") - -# install nssm -Expand-ZIPFile -File "C:\nssm-2.24.zip" -Destination "C:\" -Url "http://www.nssm.cc/release/nssm-2.24.zip" - -# download generic-worker -md C:\generic-worker -$client.DownloadFile("https://github.com/taskcluster/generic-worker/releases/download/v16.5.5/generic-worker-multiuser-windows-amd64.exe", "C:\generic-worker\generic-worker.exe") - -# download livelog -$client.DownloadFile("https://github.com/taskcluster/livelog/releases/download/v1.1.0/livelog-windows-amd64.exe", "C:\generic-worker\livelog.exe") - -# download taskcluster-proxy -$client.DownloadFile("https://github.com/taskcluster/taskcluster-proxy/releases/download/v5.1.0/taskcluster-proxy-windows-amd64.exe", "C:\generic-worker\taskcluster-proxy.exe") - -# configure hosts file for taskcluster-proxy access via http://taskcluster -$HostsFile_Base64 = "IyBDb3B5cmlnaHQgKGMpIDE5OTMtMjAwOSBNaWNyb3NvZnQgQ29ycC4NCiMNCiMgVGhpcyBpcyBhIHNhbXBsZSBIT1NUUyBmaWxlIHVzZWQgYnkgTWljcm9zb2Z0IFRDUC9JUCBmb3IgV2luZG93cy4NCiMNCiMgVGhpcyBmaWxlIGNvbnRhaW5zIHRoZSBtYXBwaW5ncyBvZiBJUCBhZGRyZXNzZXMgdG8gaG9zdCBuYW1lcy4gRWFjaA0KIyBlbnRyeSBzaG91bGQgYmUga2VwdCBvbiBhbiBpbmRpdmlkdWFsIGxpbmUuIFRoZSBJUCBhZGRyZXNzIHNob3VsZA0KIyBiZSBwbGFjZWQgaW4gdGhlIGZpcnN0IGNvbHVtbiBmb2xsb3dlZCBieSB0aGUgY29ycmVzcG9uZGluZyBob3N0IG5hbWUuDQojIFRoZSBJUCBhZGRyZXNzIGFuZCB0aGUgaG9zdCBuYW1lIHNob3VsZCBiZSBzZXBhcmF0ZWQgYnkgYXQgbGVhc3Qgb25lDQojIHNwYWNlLg0KIw0KIyBBZGRpdGlvbmFsbHksIGNvbW1lbnRzIChzdWNoIGFzIHRoZXNlKSBtYXkgYmUgaW5zZXJ0ZWQgb24gaW5kaXZpZHVhbA0KIyBsaW5lcyBvciBmb2xsb3dpbmcgdGhlIG1hY2hpbmUgbmFtZSBkZW5vdGVkIGJ5IGEgJyMnIHN5bWJvbC4NCiMNCiMgRm9yIGV4YW1wbGU6DQojDQojICAgICAgMTAyLjU0Ljk0Ljk3ICAgICByaGluby5hY21lLmNvbSAgICAgICAgICAjIHNvdXJjZSBzZXJ2ZXINCiMgICAgICAgMzguMjUuNjMuMTAgICAgIHguYWNtZS5jb20gICAgICAgICAgICAgICMgeCBjbGllbnQgaG9zdA0KDQojIGxvY2FsaG9zdCBuYW1lIHJlc29sdXRpb24gaXMgaGFuZGxlZCB3aXRoaW4gRE5TIGl0c2VsZi4NCiMJMTI3LjAuMC4xICAgICAgIGxvY2FsaG9zdA0KIwk6OjEgICAgICAgICAgICAgbG9jYWxob3N0DQoNCiMgVXNlZnVsIGZvciBnZW5lcmljLXdvcmtlciB0YXNrY2x1c3Rlci1wcm94eSBpbnRlZ3JhdGlvbg0KIyBTZWUgaHR0cHM6Ly9idWd6aWxsYS5tb3ppbGxhLm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MTQ0OTk4MSNjNg0KMTI3LjAuMC4xICAgICAgICB0YXNrY2x1c3RlciAgICANCg==" -$HostsFile_Content = [System.Convert]::FromBase64String($HostsFile_Base64) -Set-Content -Path "C:\Windows\System32\drivers\etc\hosts" -Value $HostsFile_Content -Encoding Byte - -# install generic-worker -Start-Process C:\generic-worker\generic-worker.exe -ArgumentList "install service --configure-for-%MY_CLOUD% --nssm C:\nssm-2.24\win64\nssm.exe --config C:\generic-worker\generic-worker.config" -Wait -NoNewWindow -PassThru -RedirectStandardOutput C:\generic-worker\install.log -RedirectStandardError C:\generic-worker\install.err -# Start-Process C:\generic-worker\generic-worker.exe -ArgumentList "install startup --config C:\generic-worker\generic-worker.config" -Wait -NoNewWindow -PassThru -RedirectStandardOutput C:\generic-worker\install.log -RedirectStandardError C:\generic-worker\install.err - -# initial clone of mozilla-central -# Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "C:\mozilla-build\python\Scripts\hg clone -u null https://hg.mozilla.org/mozilla-central C:\gecko" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\hg_initial_clone.log" -RedirectStandardError "C:\hg_initial_clone.err" - -# download Windows Server 2003 Resource Kit Tools -$client.DownloadFile("https://download.microsoft.com/download/8/e/c/8ec3a7d8-05b4-440a-a71e-ca3ee25fe057/rktools.exe", "C:\rktools.exe") - -# download gvim -$client.DownloadFile("http://artfiles.org/vim.org/pc/gvim80-069.exe", "C:\gvim80-069.exe") - -# https://bugzil.la/1274844 download BinScope -$client.DownloadFile("https://download.microsoft.com/download/2/6/A/26AAA1DE-D060-4246-93B5-7D7C877E4F8F/BinScopeSetup.msi", "C:\BinScopeSetup.msi") - -# install BinScope -Start-Process "msiexec" -ArgumentList "/i C:\BinScopeSetup.msi /quiet" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\binscope-install.log" -RedirectStandardError "C:\binscope-install.err" - -# open up firewall for livelog (both PUT and GET interfaces) -New-NetFirewallRule -DisplayName "Allow livelog PUT requests" -Direction Inbound -LocalPort 60022 -Protocol TCP -Action Allow -New-NetFirewallRule -DisplayName "Allow livelog GET requests" -Direction Inbound -LocalPort 60023 -Protocol TCP -Action Allow - -# install go (not required, but useful) -md "C:\gopath" -Expand-ZIPFile -File "C:\go1.11.5.windows-amd64.zip" -Destination "C:\" -Url "https://storage.googleapis.com/golang/go1.11.5.windows-amd64.zip" - -# install PSTools -# md "C:\PSTools" -# Expand-ZIPFile -File "C:\PSTools\PSTools.zip" -Destination "C:\PSTools" -Url "https://download.sysinternals.com/files/PSTools.zip" - -# install git -$client.DownloadFile("https://github.com/git-for-windows/git/releases/download/v2.16.2.windows.1/Git-2.16.2-64-bit.exe", "C:\Git-2.16.2-64-bit.exe") -Start-Process "C:\Git-2.16.2-64-bit.exe" -ArgumentList "/VERYSILENT /LOG=C:\git_install.log /NORESTART /SUPPRESSMSGBOXES" -Wait -NoNewWindow - -# install node -$client.DownloadFile("https://nodejs.org/dist/v6.6.0/node-v6.6.0-x64.msi", "C:\NodeSetup.msi") -Start-Process "msiexec" -ArgumentList "/i C:\NodeSetup.msi /quiet" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\node-install.log" -RedirectStandardError "C:\node-install.err" - -# set permanent env vars -[Environment]::SetEnvironmentVariable("GOROOT", "C:\go", "Machine") -[Environment]::SetEnvironmentVariable("PATH", $Env:Path + ";C:\Program Files\Vim\vim80;C:\go\bin;C:\gopath\bin;C:\mozilla-build\python;C:\mozilla-build\python\Scripts;C:\Program Files\Git\cmd;C:\Program Files\nodejs", "Machine") -[Environment]::SetEnvironmentVariable("GOPATH", "C:\gopath", "Machine") - -# upgrade python libraries -Start-Process "C:\mozilla-build\python\python.exe" -ArgumentList "-m pip install --upgrade pip==8.1.1 setuptools==20.7.0 virtualenv==15.0.3 wheel==0.29.0 pypiwin32==219 requests==2.9.1 psutil==4.1.0" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\python_package_upgrades.log" -RedirectStandardError "C:\python_package_upgrades.err" - -# set env vars for the currently running process -$env:GOROOT = "C:\go" -$env:GOPATH = "C:\gopath" -$env:PATH = $env:PATH + ";C:\go\bin;C:\gopath\bin;C:\mozilla-build\python;C:\mozilla-build\python\Scripts;C:\Program Files\Git\cmd" - -# get generic-worker and livelog source code (note required, but useful) -Start-Process "go" -ArgumentList "get -t github.com/taskcluster/generic-worker github.com/taskcluster/livelog" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\generic-worker\go-get_install.log" -RedirectStandardError "C:\generic-worker\go-get_install.err" - -# generate ed25519 key -Start-Process C:\generic-worker\generic-worker.exe -ArgumentList "new-ed25519-keypair --file C:\generic-worker\generic-worker-ed25519-signing-key.key" -Wait -NoNewWindow -PassThru -RedirectStandardOutput C:\generic-worker\generate-signing-key.log -RedirectStandardError C:\generic-worker\generate-signing-key.err - -# download cygwin (not required, but useful) -$client.DownloadFile("https://www.cygwin.com/setup-x86_64.exe", "C:\cygwin-setup-x86_64.exe") - -# install cygwin -# complete package list: https://cygwin.com/packages/package_list.html -Start-Process "C:\cygwin-setup-x86_64.exe" -ArgumentList "--quiet-mode --wait --root C:\cygwin --site http://cygwin.mirror.constant.com --packages openssh,vim,curl,tar,wget,zip,unzip,diffutils,bzr" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\cygwin_install.log" -RedirectStandardError "C:\cygwin_install.err" - -# open up firewall for ssh daemon -New-NetFirewallRule -DisplayName "Allow SSH inbound" -Direction Inbound -LocalPort 22 -Protocol TCP -Action Allow - -# workaround for https://www.cygwin.com/ml/cygwin/2015-10/msg00036.html -# see: -# 1) https://www.cygwin.com/ml/cygwin/2015-10/msg00038.html -# 2) https://cygwin.com/git/gitweb.cgi?p=cygwin-csih.git;a=blob;f=cygwin-service-installation-helper.sh;h=10ab4fb6d47803c9ffabdde51923fc2c3f0496bb;hb=7ca191bebb52ae414bb2a2e37ef22d94f2658dc7#l2884 -$env:LOGONSERVER = "\\" + $env:COMPUTERNAME - -# configure sshd (not required, but useful) -Start-Process "C:\cygwin\bin\bash.exe" -ArgumentList "--login -c `"ssh-host-config -y -c 'ntsec mintty' -u 'cygwinsshd' -w 'qwe123QWE!@#'`"" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\cygrunsrv.log" -RedirectStandardError "C:\cygrunsrv.err" - -# start sshd -Start-Process "net" -ArgumentList "start sshd" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\net_start_sshd.log" -RedirectStandardError "C:\net_start_sshd.err" - -# download bash setup script -$client.DownloadFile("https://raw.githubusercontent.com/petemoore/myscrapbook/master/setup.sh", "C:\cygwin\home\Administrator\setup.sh") - -# run bash setup script -Start-Process "C:\cygwin\bin\bash.exe" -ArgumentList "--login -c 'chmod a+x setup.sh; ./setup.sh'" -Wait -NoNewWindow -PassThru -RedirectStandardOutput "C:\Administrator_cygwin_setup.log" -RedirectStandardError "C:\Administrator_cygwin_setup.err" - -# install dependencywalker (useful utility for troubleshooting, not required) -md "C:\DependencyWalker" -Expand-ZIPFile -File "C:\depends22_x64.zip" -Destination "C:\DependencyWalker" -Url "http://dependencywalker.com/depends22_x64.zip" - -# install ProcessExplorer (useful utility for troubleshooting, not required) -md "C:\ProcessExplorer" -Expand-ZIPFile -File "C:\ProcessExplorer.zip" -Destination "C:\ProcessExplorer" -Url "https://download.sysinternals.com/files/ProcessExplorer.zip" - -# install ProcessMonitor (useful utility for troubleshooting, not required) -md "C:\ProcessMonitor" -Expand-ZIPFile -File "C:\ProcessMonitor.zip" -Destination "C:\ProcessMonitor" -Url "https://download.sysinternals.com/files/ProcessMonitor.zip" - -# now shutdown, in preparation for creating an image -# Stop-Computer isn't working, also not when specifying -AsJob, so reverting to using `shutdown` command instead -# * https://www.reddit.com/r/PowerShell/comments/65250s/windows_10_creators_update_stopcomputer_not/dgfofug/?st=j1o3oa29&sh=e0c29c6d -# * https://support.microsoft.com/en-in/help/4014551/description-of-the-security-and-quality-rollup-for-the-net-framework-4 -# * https://support.microsoft.com/en-us/help/4020459 -shutdown -s diff --git a/worker_types/nss-win2012r2/gcp_filters b/worker_types/nss-win2012r2/gcp_filters deleted file mode 100644 index f2e848c9..00000000 --- a/worker_types/nss-win2012r2/gcp_filters +++ /dev/null @@ -1 +0,0 @@ ---image=windows-server-2012-r2-dc-v20190910 --image-project=windows-cloud --boot-disk-size=50GB --boot-disk-type=pd-standard diff --git a/worker_types/process_region.sh b/worker_types/process_region.sh deleted file mode 100755 index fe982ffa..00000000 --- a/worker_types/process_region.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -e - -############ This script should be used for creating or updating a worker type -############ (i.e. creating AMIs in AWS EC2, and calling the Taskcluster AWS -############ Provisioner API to update the worker type definition with the -############ newly generated AMIs). - -# TODO: [pmoore] submit a task after updating worker type - -function log { - echo -e "\x1B[38;5;${COLOUR}m$(date): ${PROVIDER}: ${WORKER_TYPE}: ${REGION}: ${@}\x1B[0m" -} - -REGION="${1}" -COLOUR="${2}" - -if [ -z "${REGION}" ]; then - echo "Must specify a region to process_region.sh script" >&2 - exit 64 -fi - -if [ -z "${WORKER_TYPE}" ]; then - echo "Must export valid WORKER_TYPE env var before calling this script" >&2 - exit 65 -fi - -if [ -z "${COLOUR}" ]; then - echo "Missing colour code as input for process_region.sh script" >&2 - exit 66 -fi - -if [ -z "${PROVIDER}" ]; then - echo "Must export valid PROVIDER env var before calling this script" >&2 - exit 67 -fi - -cd "$(dirname "${0}")/${WORKER_TYPE}" - -if [ "${ACTION}" == "update" ]; then - . "../update_${PROVIDER}.sh" -elif [ "${ACTION}" == "delete" ]; then - . "../delete_${PROVIDER}.sh" -else - log "$(basename "${0}"): ERROR: Unknown action '${ACTION}' ... exiting" >&2 - exit 86 -fi diff --git a/worker_types/refresh-gw-configs/main.go b/worker_types/refresh-gw-configs/main.go deleted file mode 100644 index f8ba5d3b..00000000 --- a/worker_types/refresh-gw-configs/main.go +++ /dev/null @@ -1,146 +0,0 @@ -package main - -import ( - "encoding/json" - "fmt" - "net/http" - "strings" - - "github.com/taskcluster/generic-worker/gwconfig" - "github.com/taskcluster/taskcluster-client-go/tcawsprovisioner" -) - -type AWSSecrets struct { - GW *struct { - C *gwconfig.Config `json:"config"` - } `json:"generic-worker"` -} - -type OCCManifest struct { - Components []struct { - ComponentName string - Validate struct { - CommandsReturn []struct { - Match string - } - } - } -} - -func main() { - prov := tcawsprovisioner.NewFromEnv() - allWorkerTypes, err := prov.ListWorkerTypes() - if err != nil { - panic(err) - } - - for _, wt := range *allWorkerTypes { - resp, err := prov.WorkerType(wt) - if err != nil { - panic(err) - } - var s AWSSecrets - err = json.Unmarshal(resp.Secrets, &s) - if err != nil { - panic(err) - } - if s.GW == nil { - continue - } - fmt.Println("") - fmt.Println(wt) - targetConfig := &gwconfig.Config{ - // The following all set automatically - // for aws-provisioner-v1 worker types - // - // AccessToken: "", - // Certificate: "", - // ClientID: "", - // InstanceID: "", - // InstanceType: "", - // PrivateIP: nil, - // PublicIP: nil, - // Region: "", - // WorkerGroup: "", - // WorkerID: "", - // WorkerType: "", - PublicConfig: gwconfig.PublicConfig{ - CachesDir: "", - CheckForNewDeploymentEverySecs: 0, - CleanUpTaskDirs: true, - DeploymentID: "", - DisableReboots: true, - DownloadsDir: "", - Ed25519SigningKeyLocation: "", - IdleTimeoutSecs: 7200, - LiveLogCertificate: "C:\\generic-worker\\livelog.crt", - LiveLogExecutable: "C:\\generic-worker\\livelog.exe", - LiveLogGETPort: 64724, - LiveLogKey: "C:\\generic-worker\\livelog.key", - LiveLogPUTPort: 1234, - NumberOfTasksToRun: 0, - SentryProject: "generic-worker", - ProvisionerID: "", - RequiredDiskSpaceMegabytes: 3, - RunAfterUserCreation: "", - ShutdownMachineOnInternalError: true, - ShutdownMachineOnIdle: true, - Subdomain: "", - TasksDir: "", - WorkerTypeMetadata: map[string]interface{}{}, - }, - PrivateConfig: gwconfig.PrivateConfig{ - // LiveLogSecret: "", - }, - } - - if ms, ok := s.GW.C.WorkerTypeMetadata["machine-setup"]; ok { - if manifest, ok := ms.(map[string]interface{})["manifest"]; ok { - url := manifest.(string) - fmt.Println(url) - url = strings.Replace( - url, - "github.com/mozilla-releng/OpenCloudConfig/blob", - "raw.githubusercontent.com/mozilla-releng/OpenCloudConfig", - -1, - ) - fmt.Println(url) - resp, err := http.Get(url) - if err != nil { - panic(err) - } - defer resp.Body.Close() - decoder := json.NewDecoder(resp.Body) - var occ OCCManifest - err = decoder.Decode(&occ) - if err != nil { - panic(err) - } - for _, comp := range occ.Components { - if comp.ComponentName == "GenericWorkerInstall" { - for _, cr := range comp.Validate.CommandsReturn { - fmt.Println(cr.Match) - switch { - case strings.HasPrefix(cr.Match, "generic-worker 10."): - targetConfig.CachesDir = "Y:\\Caches" - case strings.HasPrefix(cr.Match, "generic-worker "): - targetConfig.CachesDir = "Z:\\Caches" - } - } - } - } - } - } - targetConfig.LiveLogSecret = s.GW.C.LiveLogSecret - b, err := json.MarshalIndent(s.GW.C, "", " ") - if err != nil { - panic(err) - } - fmt.Printf("%v\n", string(b)) - b, err = json.MarshalIndent(targetConfig, "", " ") - if err != nil { - panic(err) - } - fmt.Printf("%v\n", string(b)) - } -} diff --git a/worker_types/set_occ_ami_base_names.sh b/worker_types/set_occ_ami_base_names.sh deleted file mode 100755 index 38b5a183..00000000 --- a/worker_types/set_occ_ami_base_names.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash - -cd "$(dirname "${0}")" -aws_region=us-west-2 - -curl -L 'https://github.com/mozilla-releng/OpenCloudConfig/tree/master/userdata/Manifest' 2>/dev/null | sed -n 's/.*\(gecko[^.]*\)\.json.*/\1/p' | sort -u | while read tc_worker_type -do - case "${tc_worker_type}" in - gecko-t-win7-32-gpu*) - aws_base_ami_search_term=${aws_base_ami_search_term:='gecko-t-win7-32-base-20170905'} - aws_instance_type=${aws_instance_type:='g2.2xlarge'} - aws_base_ami_id="$(aws ec2 describe-images --region ${aws_region} --owners self --filters "Name=state,Values=available" "Name=name,Values=${aws_base_ami_search_term}" --query 'Images[*].{A:CreationDate,B:ImageId}' --output text | sort -u | tail -1 | cut -f2)" - ami_description="Gecko test worker for Windows 7 32 bit; TaskCluster worker type: ${tc_worker_type}, OCC version ${aws_client_token}, https://github.com/mozilla-releng/OpenCloudConfig/tree/${GITHUB_HEAD_SHA}"} - gw_tasks_dir='Z:\' - root_username=root - worker_username=GenericWorker - aws_copy_regions=('us-east-1' 'us-east-2' 'us-west-1' 'eu-central-1') - block_device_mappings='[{"DeviceName":"/dev/sda1","Ebs":{"VolumeType":"gp2","VolumeSize":30,"DeleteOnTermination":true}},{"DeviceName":"/dev/sdb","Ebs":{"VolumeType":"gp2","VolumeSize":120,"DeleteOnTermination":true}},{"DeviceName":"/dev/sdc","Ebs":{"VolumeType":"gp2","VolumeSize":120,"DeleteOnTermination":true}}]' - ;; - gecko-t-win7-32*) - aws_base_ami_search_term=${aws_base_ami_search_term:='gecko-t-win7-32-base-20170905'} - aws_instance_type=${aws_instance_type:='c4.2xlarge'} - aws_base_ami_id="$(aws ec2 describe-images --region ${aws_region} --owners self --filters "Name=state,Values=available" "Name=name,Values=${aws_base_ami_search_term}" --query 'Images[*].{A:CreationDate,B:ImageId}' --output text | sort -u | tail -1 | cut -f2)" - ami_description="Gecko test worker for Windows 7 32 bit; TaskCluster worker type: ${tc_worker_type}, OCC version ${aws_client_token}, https://github.com/mozilla-releng/OpenCloudConfig/tree/${GITHUB_HEAD_SHA}"} - gw_tasks_dir='Z:\' - root_username=root - worker_username=GenericWorker - aws_copy_regions=('us-east-1' 'us-east-2' 'us-west-1' 'eu-central-1') - block_device_mappings='[{"DeviceName":"/dev/sda1","Ebs":{"VolumeType":"gp2","VolumeSize":30,"DeleteOnTermination":true}},{"DeviceName":"/dev/sdb","Ebs":{"VolumeType":"gp2","VolumeSize":120,"DeleteOnTermination":true}},{"DeviceName":"/dev/sdc","Ebs":{"VolumeType":"gp2","VolumeSize":120,"DeleteOnTermination":true}}]' - ;; - gecko-t-win10-64-gpu*) - aws_base_ami_search_term=${aws_base_ami_search_term:='gecko-t-win10-64-gpu-base-20170921'} - aws_instance_type=${aws_instance_type:='g2.2xlarge'} - aws_base_ami_id="$(aws ec2 describe-images --region ${aws_region} --owners self --filters "Name=state,Values=available" "Name=name,Values=${aws_base_ami_search_term}" --query 'Images[*].{A:CreationDate,B:ImageId}' --output text | sort -u | tail -1 | cut -f2)" - ami_description="Gecko tester for Windows 10 64 bit; TaskCluster worker type: ${tc_worker_type}, OCC version ${aws_client_token}, https://github.com/mozilla-releng/OpenCloudConfig/tree/${GITHUB_HEAD_SHA}"} - gw_tasks_dir='Z:\' - root_username=Administrator - worker_username=GenericWorker - aws_copy_regions=('us-east-1' 'us-east-2' 'eu-central-1') - block_device_mappings='[{"DeviceName":"/dev/sda1","Ebs":{"VolumeType":"gp2","VolumeSize":120,"DeleteOnTermination":true}},{"DeviceName":"/dev/sdb","Ebs":{"VolumeType":"gp2","VolumeSize":120,"DeleteOnTermination":true}}]' - ;; - gecko-t-win10-64*) - aws_base_ami_search_term=${aws_base_ami_search_term:='gecko-t-win10-64-base-20170905'} - aws_instance_type=${aws_instance_type:='c4.2xlarge'} - aws_base_ami_id="$(aws ec2 describe-images --region ${aws_region} --owners self --filters "Name=state,Values=available" "Name=name,Values=${aws_base_ami_search_term}" --query 'Images[*].{A:CreationDate,B:ImageId}' --output text | sort -u | tail -1 | cut -f2)" - ami_description="Gecko tester for Windows 10 64 bit; TaskCluster worker type: ${tc_worker_type}, OCC version ${aws_client_token}, https://github.com/mozilla-releng/OpenCloudConfig/tree/${GITHUB_HEAD_SHA}"} - gw_tasks_dir='Z:\' - root_username=Administrator - worker_username=GenericWorker - aws_copy_regions=('us-east-1' 'us-east-2' 'us-west-1' 'eu-central-1') - block_device_mappings='[{"DeviceName":"/dev/sda1","Ebs":{"VolumeType":"gp2","VolumeSize":120,"DeleteOnTermination":true}},{"DeviceName":"/dev/sdb","Ebs":{"VolumeType":"gp2","VolumeSize":120,"DeleteOnTermination":true}}]' - ;; - gecko-[123]-b-win2012*) - aws_base_ami_search_term=${aws_base_ami_search_term:='gecko-b-win2012-base-*'} - aws_instance_type=${aws_instance_type:='c4.4xlarge'} - aws_base_ami_id="$(aws ec2 describe-images --region ${aws_region} --owners self --filters "Name=state,Values=available" "Name=name,Values=${aws_base_ami_search_term}" --query 'Images[*].{A:CreationDate,B:ImageId}' --output text | sort -u | tail -1 | cut -f2)" - ami_description="Gecko builder for Windows; TaskCluster worker type: ${tc_worker_type}, OCC version ${aws_client_token}, https://github.com/mozilla-releng/OpenCloudConfig/tree/${GITHUB_HEAD_SHA}"} - gw_tasks_dir='Z:\' - root_username=Administrator - worker_username=GenericWorker - aws_copy_regions=('us-east-1' 'us-west-1' 'eu-central-1') - block_device_mappings='[{"DeviceName":"/dev/sda1","Ebs":{"VolumeType":"gp2","VolumeSize":40,"DeleteOnTermination":true}},{"DeviceName":"/dev/sdb","Ebs":{"VolumeType":"gp2","VolumeSize":120,"DeleteOnTermination":true}}]' - ;; - *) - echo "ERROR: unknown worker type: '${tc_worker_type}'" - exit 67 - ;; - esac - echo "${aws_base_ami_search_term}" > "${tc_worker_type}/ami-base-name" -done diff --git a/worker_types/transform-occ/main.go b/worker_types/transform-occ/main.go deleted file mode 100644 index 8f7bf23d..00000000 --- a/worker_types/transform-occ/main.go +++ /dev/null @@ -1,389 +0,0 @@ -package main - -import ( - "encoding/json" - "fmt" - "log" - "net/http" - pkgurl "net/url" - "os" - "path" - "strings" -) - -type ( - OCCManifest struct { - Components []Component `json:"Components"` - ProvisionerConfiguration interface{} `json:"ProvisionerConfiguration"` - } - Component struct { - ComponentKey - Action string `json:"Action"` - Arguments interface{} `json:"Arguments"` - Command string `json:"Command"` - Comment string `json:"Comment"` - DependsOn []ComponentKey `json:"DependsOn"` - Destination string `json:"Destination"` - Direction string `json:"Direction"` - Hex bool `json:"Hex"` - Key string `json:"Key"` - Link string `json:"Link"` - LocalPort uint `json:"LocalPort"` - Match interface{} `json:"Match"` - Name string `json:"Name"` - Path string `json:"Path"` - ProductID string `json:"ProductId"` - Protocol string `json:"Protocol"` - Replace interface{} `json:"Replace"` - SetOwner interface{} `json:"SetOwner"` - SHA512 string `json:"sha512"` - Source string `json:"Source"` - StartupType string `json:"StartupType"` - State string `json:"State"` - Target string `json:"Target"` - Timeout uint `json:"Timeout"` - URL string `json:"Url"` - Validate interface{} `json:"Validate"` - Value string `json:"Value"` - // Using 'string' type for ValueData is broken for win10 worker types - // at the moment which are sometimes storing an int rather than a - // string. Conversion to a hex did not work - see - // https://github.com/mozilla-releng/OpenCloudConfig/pull/108 and - // https://github.com/mozilla-releng/OpenCloudConfig/commit/801ef77f468b7e6bc5778a7e231f196af17fee65 - // for details. The ValueData is used in OCC components - // RegistryValueSet and RegistryKeySet which are essentially wrappers - // around - // https://docs.microsoft.com/en-us/powershell/dsc/registryresource . - // Need to experiment if these docs are correct and evaluate if - // string/[]string/something else is really required. Also need to make - // sure "Hex" property is respected in "RegistryKeySet" and - // "RegistryValueSet" and find out why it was failing prior to - // https://github.com/mozilla-releng/OpenCloudConfig/commit/801ef77f468b7e6bc5778a7e231f196af17fee65 - ValueData interface{} `json:"ValueData"` - ValueName string `json:"ValueName"` - ValueType string `json:"ValueType"` - Values []string `json:"Values"` - } - ComponentKey struct { - ComponentName string `json:"ComponentName"` - ComponentType string `json:"ComponentType"` - } -) - -func (c ComponentKey) String() string { - return fmt.Sprintf("{ComponentName: '%v', ComponentType: '%v'}", c.ComponentName, c.ComponentType) -} - -func PSEscape(s string) string { - return strings.Replace(strings.Replace(s, "`", "``", -1), `"`, "`\"", -1) -} - -func main() { - if len(os.Args) != 2 { - log.Fatal("Please specify a single workerType, e.g. `transform-occ gecko-1-b-win2012`") - } - workerType := os.Args[1] - log.SetFlags(0) - log.SetPrefix("ERROR: " + workerType + ": ") - manifestURL := "https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/master/userdata/Manifest/" + workerType + ".json" - resp, err := http.Get(manifestURL) - if err != nil { - log.Fatalf("%v", err) - } - defer resp.Body.Close() - dec := json.NewDecoder(resp.Body) - dec.DisallowUnknownFields() - var o OCCManifest - err = dec.Decode(&o) - if err != nil { - log.Fatalf("%v", err) - } - - orderedComponents, err := OrderComponents(o.Components) - if err != nil { - log.Fatalf("%v", err) - } - - fmt.Println(`###################################################################################`) - fmt.Println(`# Note, this powershell script is an *APPROXIMATION ONLY* to the steps that are run`) - fmt.Println(`# to build the AMIs for aws-provisioner-v1/` + workerType + `.`) - fmt.Println(`#`) - fmt.Println(`# The authoratative host definition can be found at:`) - fmt.Println(`#`) - fmt.Println(`# * ` + manifestURL) - fmt.Println(`#`) - fmt.Println(`###################################################################################`) - fmt.Println(``) - fmt.Println(`# use TLS 1.2 (see bug 1443595)`) - fmt.Println(`[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12`) - fmt.Println(``) - fmt.Println(`# capture env`) - fmt.Println(`Get-ChildItem Env: | Out-File "C:\install_env.txt"`) - fmt.Println(``) - fmt.Println(`# needed for making http requests`) - fmt.Println(`$client = New-Object system.net.WebClient`) - fmt.Println(`$shell = new-object -com shell.application`) - fmt.Println(``) - fmt.Println(`# utility function to download a zip file and extract it`) - fmt.Println(`function Extract-ZIPFile($file, $destination, $url)`) - fmt.Println(`{`) - fmt.Println(` $client.DownloadFile($url, $file)`) - fmt.Println(` $zip = $shell.NameSpace($file)`) - fmt.Println(` foreach($item in $zip.items())`) - fmt.Println(` {`) - fmt.Println(` $shell.Namespace($destination).copyhere($item)`) - fmt.Println(` }`) - fmt.Println(`}`) - fmt.Println(``) - fmt.Println(`md C:\logs`) - fmt.Println(`md C:\binaries`) - - for _, c := range orderedComponents { - fmt.Println("") - if c.Comment != "" { - fmt.Println("# " + c.ComponentName + ": " + c.Comment) - } else { - fmt.Println("# " + c.ComponentName) - } - switch c.ComponentType { - case "ChecksumFileDownload": - fmt.Printf(`$client.DownloadFile("%s", "%s")`+"\n", c.Source, c.Target) - case "CommandRun": - switch cc := c.Arguments.(type) { - case string: - fmt.Println(strings.Replace(`Start-Process "`+c.Command+`" -ArgumentList "`+PSEscape(cc)+`" -Wait -NoNewWindow`, "--configure-for-aws", "--configure-for-%MY_CLOUD%", -1)) - case []interface{}: - a := []string{} - for _, x := range cc { - a = append(a, x.(string)) - } - fmt.Println(strings.Replace(`Start-Process "`+c.Command+`" -ArgumentList "`+PSEscape(strings.Join(a, " "))+`" -Wait -NoNewWindow`, "--configure-for-aws", "--configure-for-%MY_CLOUD%", -1)) - default: - log.Printf("Got type %T", cc) - } - case "DirectoryCreate": - fmt.Printf(`md "%s"`+"\n", c.Path) - case "DisableIndexing": - fmt.Print(`Get-WmiObject Win32_Volume -Filter "IndexingEnabled=$true" | Set-WmiInstance -Arguments @{IndexingEnabled=$false}` + "\n") - case "EnvironmentVariableSet": - fmt.Printf(`[Environment]::SetEnvironmentVariable("%s", "%s", "%s")`+"\n", c.Name, c.Value, c.Target) - case "EnvironmentVariableUniquePrepend": - fmt.Printf(`[Environment]::SetEnvironmentVariable("%s", "%s;%%%s%%", "%s")`+"\n", c.Name, strings.Join(c.Values, ";"), c.Name, c.Target) - case "ExeInstall": - filename := FilenameFromURL(c.URL, ".exe") - fmt.Printf(`$client.DownloadFile("%s", "C:\binaries\%v")`+"\n", c.URL, filename) - switch cc := c.Arguments.(type) { - case string: - fmt.Printf(`Start-Process "C:\binaries\%v" -ArgumentList "%s" -Wait -NoNewWindow`+"\n", filename, PSEscape(cc)) - case []interface{}: - a := []string{} - for _, x := range cc { - a = append(a, x.(string)) - } - fmt.Printf(`Start-Process "C:\binaries\%v" -ArgumentList "%s" -Wait -NoNewWindow`+"\n", filename, PSEscape(strings.Join(a, " "))) - default: - log.Printf("Got type %T", cc) - } - case "FileDownload": - fmt.Printf(`$client.DownloadFile("%s", "%s")`+"\n", c.Source, c.Target) - case "FirewallRule": - fmt.Printf(`New-NetFirewallRule -DisplayName "%v (%v %v %v): %v" -Direction %v -LocalPort %v -Protocol %v -Action %v`+"\n", c.ComponentName, c.Protocol, c.LocalPort, c.Direction, c.Action, c.Direction, c.LocalPort, c.Protocol, c.Action) - case "MsiInstall": - filename := FilenameFromURL(c.URL, ".msi") - fmt.Printf(`$client.DownloadFile("%v", "C:\binaries\%v")`+"\n", c.URL, filename) - fmt.Printf(`Start-Process "msiexec" -ArgumentList "/i C:\binaries\%v /quiet" -Wait -NoNewWindow`+"\n", filename) - case "MsuInstall": - filename := FilenameFromURL(c.URL, ".msu") - fmt.Printf(`$client.DownloadFile("%v", "C:\binaries\%v")`+"\n", c.URL, filename) - fmt.Printf(`Start-Process "wusa" -ArgumentList "C:\binaries\%v /quiet /norestart" -Wait -NoNewWindow`+"\n", filename) - case "RegistryKeySet": - fmt.Printf(`New-Item -Path "%v" -Force`+"\n", PSPath(c.Key+`\`+c.ValueName)) - case "RegistryValueSet": - fmt.Printf(`New-ItemProperty -Path "%v" -Name "%v" -Value "%v" -PropertyType %v -Force`+"\n", PSPath(c.Key), c.ValueName, c.ValueData, c.ValueType) - case "ServiceControl": - fmt.Printf(`Set-Service "%v" -StartupType %v -Status %v`+"\n", c.Name, c.StartupType, c.State) - case "SymbolicLink": - fmt.Printf(`cmd /c mklink "%v" "%v"`+"\n", c.Link, c.Target) - case "WindowsFeatureInstall": - fmt.Printf(`Install-WindowsFeature %v`+"\n", c.Name) - case "ZipInstall": - filename := FilenameFromURL(c.URL, ".zip") - fmt.Printf(`New-Item -ItemType Directory -Force -Path "%v"`+"\n", c.Destination) - fmt.Printf(`Extract-ZIPFile -File "C:\binaries\%v" -Destination "%v" -Url "%v"`+"\n", filename, c.Destination, c.URL) - case "ReplaceInFile": - log.Printf("Skipping ReplaceInFile") - case "EnvironmentVariableUniqueAppend": - log.Printf("Skipping EnvironmentVariableUniqueAppend") - default: - log.Fatalf("Do not know how to convert component type '%v' into raw powershell code", c.ComponentType) - } - } - fmt.Println("") - fmt.Println("# now shutdown, in preparation for creating an image") - fmt.Println("# Stop-Computer isn't working, also not when specifying -AsJob, so reverting to using `shutdown` command instead") - fmt.Println("# * https://www.reddit.com/r/PowerShell/comments/65250s/windows_10_creators_update_stopcomputer_not/dgfofug/?st=j1o3oa29&sh=e0c29c6d") - fmt.Println("# * https://support.microsoft.com/en-in/help/4014551/description-of-the-security-and-quality-rollup-for-the-net-framework-4") - fmt.Println("# * https://support.microsoft.com/en-us/help/4020459") - fmt.Println("shutdown -s") -} - -func FilenameFromURL(url string, extension string) (filename string) { - stripFromPath := func(url string, extension string) (filename string) { - filename = path.Base(url) - unescaped, err := pkgurl.QueryUnescape(filename) - if err == nil { - filename = unescaped - } - if strings.HasSuffix(strings.ToLower(filename), strings.ToLower(extension)) { - return filename - } - return "" - } - - if firstTry := stripFromPath(url, extension); firstTry != "" { - return firstTry - } - - // URL provided does not have filename explicitly in it, so next strategy - // to obtain the filename is to make an http request to the url, and keep - // following http redirects until a url is found that filename can be - // extracted from. - client := http.Client{ - CheckRedirect: func(req *http.Request, via []*http.Request) error { - url = req.URL.String() - filename = stripFromPath(url, extension) - if filename != "" { - return http.ErrUseLastResponse - } - return nil - }, - } - resp, err := client.Head(url) - if err != nil { - log.Fatal("Could not reach URL " + url) - } - defer resp.Body.Close() - if filename == "" { - log.Fatalf("FAIL: Got empty filename for content from url %v with extension %v - cannot proceed!", url, extension) - } - return -} - -// PSPath takes a fully qualified registry path, and returns the powershell path representation. -// `HKEY_CURRENT_USER\` -> `HKCU:` -// `HKEY_LOCAL_MACHINE\` -> `HKLM:` -// If path does not match one of these expressions, it will be returned unaltered. -func PSPath(path string) string { - psPath := path - for i, j := range map[string]string{ - `HKEY_CURRENT_USER\`: `HKCU:`, - `HKEY_LOCAL_MACHINE\`: `HKLM:`, - } { - if strings.HasPrefix(path, i) { - psPath = j + path[len(i):] - break - } - } - return psPath -} - -type DependencyDoesNotExist struct { - ComponentKey ComponentKey - Dependency ComponentKey - ComponentList []Component -} - -func (d *DependencyDoesNotExist) Error() string { - return fmt.Sprintf("Component %v depends on %v which is not defined in component list", d.ComponentKey, d.Dependency) -} - -type DuplicateComponentKey struct { - Key ComponentKey - ComponentList []Component -} - -func (d *DuplicateComponentKey) Error() string { - return fmt.Sprintf("Duplicate component key found: %v", d.Key) -} - -type CyclicDependency struct { - Key ComponentKey - Chain []ComponentKey - ComponentList []Component -} - -func (d *CyclicDependency) Error() string { - keyStrings := make([]string, len(d.Chain), len(d.Chain)) - for i, key := range d.Chain { - keyStrings[i] = key.String() - } - return "Cyclic dependency found in component list: " + strings.Join(keyStrings, " -> ") + " -> " + d.Key.String() -} - -// OrderComponents will return a sorted copy of comps such that dependencies of -// a component appear earlier in the list than the component itself. Returns an -// error if there is a cyclic dependency, or if comps contains non-unique -// component keys, or if a component refers to a dependency which is not in the -// list. -func OrderComponents(comps []Component) (ordered []Component, err error) { - ordered = make([]Component, len(comps), len(comps)) - i := 0 - addedKeys := map[ComponentKey]bool{} - compByKey := map[ComponentKey]Component{} - for _, c := range comps { - key := ComponentKey{ComponentName: c.ComponentName, ComponentType: c.ComponentType} - if _, exists := compByKey[key]; exists { - return nil, &DuplicateComponentKey{ - ComponentList: comps, - Key: key, - } - } - compByKey[key] = c - } - for key, comp := range compByKey { - for _, dependency := range comp.DependsOn { - if _, exists := compByKey[dependency]; !exists { - return nil, &DependencyDoesNotExist{ - ComponentKey: key, - Dependency: dependency, - ComponentList: comps, - } - } - } - } - var add func(key ComponentKey, dependencyChain []ComponentKey) error - add = func(key ComponentKey, dependencyChain []ComponentKey) error { - if !addedKeys[key] { - // maintaining a map of keys may have been more efficient, but would require more complex code - // so just loop through all keys in dependency chain for now - for _, k := range dependencyChain { - if key == k { - return &CyclicDependency{ - Key: key, - Chain: dependencyChain, - ComponentList: comps, - } - } - } - dependencyChain = append(dependencyChain, key) - for _, d := range compByKey[key].DependsOn { - err = add(d, dependencyChain) - if err != nil { - return err - } - } - ordered[i] = compByKey[key] - addedKeys[key] = true - i++ - } - return nil - } - for _, c := range comps { - key := ComponentKey{ComponentName: c.ComponentName, ComponentType: c.ComponentType} - err = add(key, []ComponentKey{}) - if err != nil { - return nil, err - } - } - return -} diff --git a/worker_types/transform-occ/main_test.go b/worker_types/transform-occ/main_test.go deleted file mode 100644 index 3c7d5c39..00000000 --- a/worker_types/transform-occ/main_test.go +++ /dev/null @@ -1,168 +0,0 @@ -package main - -import "testing" - -func TestFilenameFromURL(t *testing.T) { - actual := FilenameFromURL("https://go.microsoft.com/fwlink/p/?LinkID=698771", ".exe") - expected := "sdksetup.exe" - if actual != expected { - t.Fatalf("Expected filename was '%v' but got '%v'", expected, actual) - } -} - -func TestCyclicDependency(t *testing.T) { - - _, err := OrderComponents( - []Component{ - Component{ - ComponentKey: ComponentKey{ - ComponentName: "abc", - ComponentType: "123", - }, - URL: "asdbkasjdb", - DependsOn: []ComponentKey{ - ComponentKey{ - ComponentName: "ABC", - ComponentType: "123", - }, - ComponentKey{ - ComponentName: "XYZ", - ComponentType: "XYZ", - }, - }, - }, { - ComponentKey: ComponentKey{ - ComponentName: "ABC", - ComponentType: "123", - }, - URL: "asdbkasjdb", - DependsOn: []ComponentKey{ - ComponentKey{ - ComponentName: "abc", - ComponentType: "345", - }, - }, - }, { - ComponentKey: ComponentKey{ - ComponentName: "abc", - ComponentType: "345", - }, - URL: "asdbkasjdb", - DependsOn: []ComponentKey{ - ComponentKey{ - ComponentName: "ABC", - ComponentType: "123", - }, - }, - }, { - ComponentKey: ComponentKey{ - ComponentName: "XYZ", - ComponentType: "XYZ", - }, - }, - }, - ) - - if err == nil { - t.Fatal("Was expecting an error") - } - - switch err.(type) { - case *CyclicDependency: - t.Logf("Error: %v", err) - default: - t.Fatalf("Was expecting an error of type &main.CyclicDependency but got %T: %v", err, err) - } -} - -func TestDependencyNotDefined(t *testing.T) { - - _, err := OrderComponents( - []Component{ - Component{ - ComponentKey: ComponentKey{ - ComponentName: "abc", - ComponentType: "123", - }, - URL: "asdbkasjdb", - DependsOn: []ComponentKey{ - ComponentKey{ - ComponentName: "ABC", - ComponentType: "123", - }, - ComponentKey{ - ComponentName: "XYZ", - ComponentType: "XYZ", - }, - }, - }, { - ComponentKey: ComponentKey{ - ComponentName: "ABC", - ComponentType: "123", - }, - URL: "asdbkasjdb", - }, - }, - ) - - if err == nil { - t.Fatal("Was expecting an error") - } - - switch err.(type) { - case *DependencyDoesNotExist: - t.Logf("Error: %v", err) - default: - t.Fatalf("Was expecting an error of type &main.CyclicDependency but got %T: %v", err, err) - } -} - -func TestDuplicateComponentKey(t *testing.T) { - - _, err := OrderComponents( - []Component{ - Component{ - ComponentKey: ComponentKey{ - ComponentName: "abc", - ComponentType: "123", - }, - URL: "ASDBKAsjdb", - }, { - ComponentKey: ComponentKey{ - ComponentName: "def", - ComponentType: "123", - }, - URL: "ASDBKAsjdb", - }, { - ComponentKey: ComponentKey{ - ComponentName: "abc", - ComponentType: "456", - }, - URL: "ASDBKAsjdb", - }, { - ComponentKey: ComponentKey{ - ComponentName: "def", - ComponentType: "123", - }, - URL: "asdbkasjdb", - }, { - ComponentKey: ComponentKey{ - ComponentName: "ghi", - ComponentType: "123", - }, - URL: "asdbkasjdb", - }, - }, - ) - - if err == nil { - t.Fatal("Was expecting an error") - } - - switch err.(type) { - case *DuplicateComponentKey: - t.Logf("Error: %v", err) - default: - t.Fatalf("Was expecting an error of type &main.CyclicDependency but got %T: %v", err, err) - } -} diff --git a/worker_types/transform.sh b/worker_types/transform.sh deleted file mode 100755 index d449b957..00000000 --- a/worker_types/transform.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -e -cd "$(dirname "${0}")" - -echo "${1}" -mkdir -p "${1}" -go run transform-occ/main.go "${1}" > "${1}/bootstrap.ps1" || rm "${1}/bootstrap.ps1" diff --git a/worker_types/update_aws.sh b/worker_types/update_aws.sh deleted file mode 100755 index 6c925329..00000000 --- a/worker_types/update_aws.sh +++ /dev/null @@ -1,111 +0,0 @@ -cd "$(dirname "${0}")/${WORKER_TYPE}" - -log "Generating new ssh key..." -rm -rf "${REGION}.id_rsa" -aws --region "${REGION}" ec2 delete-key-pair --key-name "${WORKER_TYPE}_${REGION}" || true -aws --region "${REGION}" ec2 create-key-pair --key-name "${WORKER_TYPE}_${REGION}" --query 'KeyMaterial' --output text > "${REGION}.id_rsa" -chmod 400 "${REGION}.id_rsa" - -# search for latest base AMI to use -AMI_METADATA="$(aws --region "${REGION}" ec2 describe-images --owners $(cat aws_owners) --filters $(cat aws_filters) --query 'Images[*].{A:CreationDate,B:ImageId,C:Name}' --output text | sort -u | tail -1 | cut -f2,3)" - -AMI="$(echo $AMI_METADATA | sed 's/ .*//')" -AMI_NAME="$(echo $AMI_METADATA | sed 's/.* //')" -log "Base AMI is: ${AMI} ('${AMI_NAME}')" - -. ../find_old_aws_objects.sh - -TEMP_SETUP_SCRIPT="$(mktemp -t ${UNIQUE_NAME}.XXXXXXXXXX)" - -if [ -f "bootstrap.ps1" ]; then - echo '' >> "${TEMP_SETUP_SCRIPT}" - cat bootstrap.ps1 | sed 's/%MY_CLOUD%/aws/g' >> "${TEMP_SETUP_SCRIPT}" - echo '' >> "${TEMP_SETUP_SCRIPT}" -else - cat bootstrap.sh | sed 's/%MY_CLOUD%/aws/g' >> "${TEMP_SETUP_SCRIPT}" -fi - -# make sure we have an ssh security group in this region -# note if we *try* to create a security group that already exists (regardless of whether it is successful or not), there will be a cloudwatch alarm, so avoid this -# by checking first. -echo 'ssh-only 22 SSH only -rdp-only 3389 RDP only -livelog-direct 60023 For connecting to livelog GET interface running directly on host' | while read group_name port description; do - if ! aws --region "${REGION}" ec2 describe-security-groups --group-names "${group_name}" >/dev/null 2>&1; then - SECURITY_GROUP="$(aws --region "${REGION}" ec2 create-security-group --group-name "${group_name}" --description "${description}" --output text 2>/dev/null || true)" - aws --region "${REGION}" ec2 authorize-security-group-ingress --group-id "${SECURITY_GROUP}" --ip-permissions '[{"IpProtocol": "tcp", "FromPort": '"${port}"', "ToPort": '"${port}"', "IpRanges": [{"CidrIp": "0.0.0.0/0"}]}]' - fi -done - -# create new base ami, and apply user-data -# filter output, to get INSTANCE_ID -INSTANCE_ID="$(aws --region "${REGION}" ec2 run-instances --image-id "${AMI}" --key-name "${WORKER_TYPE}_${REGION}" --security-groups "rdp-only" "ssh-only" --user-data "$(cat "${TEMP_SETUP_SCRIPT}")" --instance-type c4.2xlarge --block-device-mappings DeviceName=/dev/sda1,Ebs='{VolumeSize=75,DeleteOnTermination=true,VolumeType=gp2}' --instance-initiated-shutdown-behavior stop --client-token "${GW_COMMIT_SHA}" --query 'Instances[*].InstanceId' --output text)" - -log "I've triggered the creation of instance ${INSTANCE_ID} - it can take a \x1B[4mVery Long Time™\x1B[24m for it to be created and bootstrapped..." -aws --region "${REGION}" ec2 create-tags --resources "${INSTANCE_ID}" --tags "Key=WorkerType,Value=${WORKER_POOL}" "Key=Name,Value=${WORKER_TYPE} base instance" "Key=TC-Windows-Base,Value=true" -log "I've tagged it with \"WorkerType\": \"${WORKER_POOL}\"" - -sleep 1 - -# grab public IP before it shuts down and loses it! -PUBLIC_IP="$(aws --region "${REGION}" ec2 describe-instances --instance-id "${INSTANCE_ID}" --query 'Reservations[*].Instances[*].NetworkInterfaces[*].Association.PublicIp' --output text)" - -PASSWORD="$(aws --region "${REGION}" ec2 get-password-data --instance-id "${INSTANCE_ID}" --priv-launch-key ${REGION}.id_rsa --output text --query PasswordData)" - -log "To connect to the template instance (please don't do so until AMI creation process is completed"'!'"):" -log '' - -if [ -n "${PASSWORD}" ]; then - # windows - log " Public IP: ${PUBLIC_IP}" - log " Username: Administrator" - log " Password: ${PASSWORD}" -else - # linux - log " ssh -i '$(pwd)/${REGION}.id_rsa' ubuntu@${PUBLIC_IP}" -fi - -# poll for a stopped state -until aws --region "${REGION}" ec2 wait instance-stopped --instance-ids "${INSTANCE_ID}" >/dev/null 2>&1; do - log " Waiting for instance ${INSTANCE_ID} (IP ${PUBLIC_IP}) to shut down..." - sleep 30 -done - -rm "${TEMP_SETUP_SCRIPT}" - -log "Now snapshotting the instance to create an AMI..." -# now capture the AMI -IMAGE_ID="$(aws --region "${REGION}" ec2 create-image --instance-id "${INSTANCE_ID}" --name "${WORKER_TYPE} generic-worker version ${GW_COMMIT_SHA}" --description "generic-worker ${GW_COMMIT_SHA}" --output text)" - -log "The AMI is currently being created: ${IMAGE_ID}" - -log '' -log "To monitor the AMI creation process, see:" -log '' -log " https://${REGION}.console.aws.amazon.com/ec2/v2/home?region=${REGION}#Images:visibility=owned-by-me;search=${IMAGE_ID};sort=desc:platform" - -log "I've triggered the snapshot of instance ${INSTANCE_ID} as ${IMAGE_ID} - but now we will need to wait a \x1B[4mVery Long Time™\x1B[24m for it to be created..." - -until aws --region "${REGION}" ec2 wait image-available --image-ids "${IMAGE_ID}" >/dev/null 2>&1; do - log " Waiting for ${IMAGE_ID} availability..." - sleep 30 -done - -touch "${REGION}.${IMAGE_ID}.latest-image" - -{ - echo "Instance: ${INSTANCE_ID}" - echo "Public IP: ${PUBLIC_IP}" - [ -n "${PASSWORD}" ] && echo "Password: ${PASSWORD}" - echo "AMI: ${IMAGE_ID}" -} > "${REGION}.secrets" - -. "../delete_aws.sh" - -# log '' -# log "Starting instance ${INSTANCE_ID} back up..." -# if aws --region "${REGION}" ec2 start-instances --instance-ids "${INSTANCE_ID}" >/dev/null 2>&1; then -# log "Done" -# else -# log "Could not start up instance ${INSTANCE_ID}" -# fi diff --git a/worker_types/update_gcp.sh b/worker_types/update_gcp.sh deleted file mode 100755 index 7ccb23bf..00000000 --- a/worker_types/update_gcp.sh +++ /dev/null @@ -1,64 +0,0 @@ -GCP_PROJECT='pmoore-dev' - -# gcloud projects add-iam-policy-binding "${GCP_PROJECT}" --member serviceAccount:taskcluster-worker-manager@taskcluster-temp-workers.iam.gserviceaccount.com --role roles/compute.imageUser - -cd "$(dirname "${0}")/${WORKER_TYPE}" - -# Let's not create shh keys unless we have to, see: https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys -# log "Generating new ssh key..." - -. ../find_old_gcp_objects.sh - -TEMP_SETUP_SCRIPT="$(mktemp -t ${UNIQUE_NAME}.XXXXXXXXXX)" - -if [ -f "bootstrap.ps1" ]; then - PLATFORM=windows - echo '&{' >> "${TEMP_SETUP_SCRIPT}" - cat bootstrap.ps1 | sed 's/%MY_CLOUD%/gcp/g' >> "${TEMP_SETUP_SCRIPT}" - echo '} 5>&1 4>&1 3>&1 2>&1 > C:\update_gcp.log' >> "${TEMP_SETUP_SCRIPT}" - STARTUP_KEY=windows-startup-script-ps1 -else - PLATFORM=linux - cat bootstrap.sh | sed 's/%MY_CLOUD%/gcp/g' >> "${TEMP_SETUP_SCRIPT}" - STARTUP_KEY=startup-script -fi - -gcloud beta compute --project="${GCP_PROJECT}" instances create "${UNIQUE_NAME}" --description="generic-worker instance for worker type ${WORKER_TYPE}" --zone="${REGION}" --machine-type=n1-standard-4 --subnet=default --network-tier=PREMIUM --metadata-from-file="${STARTUP_KEY}=${TEMP_SETUP_SCRIPT}" --no-restart-on-failure --maintenance-policy=MIGRATE --service-account=593123400364-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 $(cat gcp_filters) --boot-disk-device-name="${UNIQUE_NAME}" --labels="worker-type=${WORKER_TYPE},worker-implementation=generic-worker" --reservation-affinity=any --enable-display-device - -log "I've triggered the creation of instance ${UNIQUE_NAME} - it can take a \x1B[4mVery Long Time™\x1B[24m for it to be created and bootstrapped..." - -log "To connect to the template instance:" -log '' -log " gcloud compute ssh ${UNIQUE_NAME} --project='${GCP_PROJECT}' --zone=${REGION}" -log '' - -if [ "${PLATFORM}" == "windows" ]; then - until gcloud compute reset-windows-password "${UNIQUE_NAME}" --zone "${REGION}"; do - sleep 15 - done -fi - -# poll for a stopped state - -until [ "$(gcloud compute --project="${GCP_PROJECT}" instances describe --zone="${REGION}" "${UNIQUE_NAME}" --format='table[no-heading](status)')" == 'TERMINATED' ]; do - log " Waiting for instance ${UNIQUE_NAME} to shut down..." - sleep 15 -done - -rm "${TEMP_SETUP_SCRIPT}" - -log "Now creating an image from the terminated instance..." -# gcloud compute disks snapshot "${UNIQUE_NAME}" --project="${GCP_PROJECT}" --description="my description" --labels="key1=value1" --snapshot-names="${UNIQUE_NAME}" --zone="${REGION}" --storage-location=us -gcloud compute images create "${UNIQUE_NAME}" --source-disk="${UNIQUE_NAME}" --source-disk-zone="${REGION}" --labels="worker-type=${WORKER_TYPE},worker-implementation=generic-worker" - -log '' -log "The image is being created here:" -log '' -log " https://console.cloud.google.com/compute/imagesDetail/projects/${GCP_PROJECT}/global/images/${UNIQUE_NAME}?project=${GCP_PROJECT}&authuser=1&supportedpurview=project" - -until [ "$(gcloud compute --project="${GCP_PROJECT}" images describe "${UNIQUE_NAME}" --format='table[no-heading](status)')" == 'READY' ]; do - log " Waiting for image ${UNIQUE_NAME} to be created..." - sleep 15 -done - -. ../delete_gcp.sh diff --git a/worker_types/win2012r2-cu/aws_filters b/worker_types/win2012r2-cu/aws_filters deleted file mode 100644 index 67753022..00000000 --- a/worker_types/win2012r2-cu/aws_filters +++ /dev/null @@ -1,2 +0,0 @@ -Name=platform,Values=windows -Name=name,Values=Windows_Server-2012-R2_RTM-English-64Bit-Base* diff --git a/worker_types/win2012r2-cu/aws_owners b/worker_types/win2012r2-cu/aws_owners deleted file mode 100644 index 38631e52..00000000 --- a/worker_types/win2012r2-cu/aws_owners +++ /dev/null @@ -1,2 +0,0 @@ -self -amazon diff --git a/worker_types/win2012r2-cu/gcp_filters b/worker_types/win2012r2-cu/gcp_filters deleted file mode 100644 index f2e848c9..00000000 --- a/worker_types/win2012r2-cu/gcp_filters +++ /dev/null @@ -1 +0,0 @@ ---image=windows-server-2012-r2-dc-v20190910 --image-project=windows-cloud --boot-disk-size=50GB --boot-disk-type=pd-standard diff --git a/worker_types/win2012r2/aws_filters b/worker_types/win2012r2/aws_filters deleted file mode 100644 index 67753022..00000000 --- a/worker_types/win2012r2/aws_filters +++ /dev/null @@ -1,2 +0,0 @@ -Name=platform,Values=windows -Name=name,Values=Windows_Server-2012-R2_RTM-English-64Bit-Base* diff --git a/worker_types/win2012r2/aws_owners b/worker_types/win2012r2/aws_owners deleted file mode 100644 index 38631e52..00000000 --- a/worker_types/win2012r2/aws_owners +++ /dev/null @@ -1,2 +0,0 @@ -self -amazon diff --git a/worker_types/win2012r2/gcp_filters b/worker_types/win2012r2/gcp_filters deleted file mode 100644 index f2e848c9..00000000 --- a/worker_types/win2012r2/gcp_filters +++ /dev/null @@ -1 +0,0 @@ ---image=windows-server-2012-r2-dc-v20190910 --image-project=windows-cloud --boot-disk-size=50GB --boot-disk-type=pd-standard diff --git a/worker_types/win2016/aws_owners b/worker_types/win2016/aws_owners deleted file mode 100644 index 38631e52..00000000 --- a/worker_types/win2016/aws_owners +++ /dev/null @@ -1,2 +0,0 @@ -self -amazon diff --git a/worker_types/worker_type.sh b/worker_types/worker_type.sh deleted file mode 100755 index 3372b2f8..00000000 --- a/worker_types/worker_type.sh +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/bash -e - -############ This script should be used for creating or updating a worker type -############ (i.e. creating AMIs in AWS EC2, and calling the Taskcluster AWS -############ Provisioner API to update the worker type definition with the -############ newly generated AMIs). - -# TODO: [pmoore] submit a task after updating worker type -# TODO: [pmoore] publish ssh key to secret store after generating it - -echo "$(date): Checking inputs..." - -if [ "${#}" -ne 3 ]; then - echo "Please specify a provider (aws/gcp), worker pool (e.g. pmoore-test/gwci-linux) and action (delete|update), e.g. worker_type.sh aws aws-provisioner-v1/win2012r2 update" >&2 - exit 64 -fi - -export PROVIDER="${1}" -if [ "${PROVIDER}" != "aws" ] && [ "${PROVIDER}" != "gcp" ]; then - echo "worker_type.sh: provider must be 'aws' or 'gcp' but '${PROVIDER}' was specified" >&2 - exit 67 -fi - -export WORKER_POOL="${2}" -if ! echo "${WORKER_POOL}" | grep -q '/'; then - echo "worker_type.sh: Worker pool (second argument) must contain '/' character - but have '${WORKER_POOL}'" >&2 - exit 68 -fi - -export PROVISIONER_ID="${WORKER_POOL%%/*}" -if [ -z "${PROVISIONER_ID}" ]; then - echo "Empty provisioner ID" >&2 - exit 69 -fi - -export WORKER_TYPE="${WORKER_POOL#*/}" -if [ ! -d "$(dirname "${0}")/${WORKER_TYPE}" ]; then - echo "worker_type.sh: No directory for worker type: '$(dirname "${0}")/${WORKER_TYPE}'" >&2 - exit 65 -fi - -export ACTION="${3}" -if [ "${ACTION}" != "update" ] && [ "${ACTION}" != "delete" ]; then - echo "worker_type.sh: action must be 'delete' or 'update' but '${ACTION}' was specified" >&2 - exit 66 -fi - -echo "$(date): Starting"'!' - -# cd into directory containing script... -cd "$(dirname "${0}")/${WORKER_TYPE}" - -export GW_COMMIT_SHA="$(git rev-parse HEAD)" - -# aws ec2 describe-regions --query '{A:Regions[*].RegionName}' --output text | grep -v sa-east-1 | while read x REGION; do -# (skip sa-east-1 since it doesn't support all the APIs we use in this script) - -# needed to not confuse the script later -rm -f *.latest-image - -case "${PROVIDER}" in - aws) - echo us-west-1 118 us-west-2 199 us-east-1 100 | xargs -P32 -n2 ../process_region.sh - - if [ "${ACTION}" == "update" ]; then - "${GOPATH}/bin/update-worker-type" . - echo - echo 'The worker type has been proactively updated(!)' - echo - echo " https://tools.taskcluster.net/aws-provisioner/#${WORKER_TYPE}/edit" - fi - ;; - gcp) - - # UUID is 20 random chars of [a-z0-9] - UUID="$(LC_CTYPE=C