Closed mbdebian closed 2 months ago
We'll create a disk image for the machine with a description that contains the information related to machine geometry, and then destroy the machine itself
Created an image, which contains everything required to recreate the VM. But just in case, here is the CLI for creating a similar VM.
gcloud compute instances create be-debian-worker-mk-20240423-093124 --project=open-targets-platform --zone=europe-west1-d --machine-type=n1-standard-1 --network-interface=network-tier=PREMIUM,stack-type=IPV4_ONLY,subnet=default --metadata=startup-script=\#\!/bin/bash$'\n'$'\n'apt-get\ update\ \&\&\ DEBIAN_FRONTEND=noninteractive\ \\$'\n'\ \ \ \ apt-get\ \\$'\n'\ \ \ \ -o\ Dpkg::Options::=\"--force-confnew\"\ \\$'\n'\ \ \ \ --force-yes\ \\$'\n'\ \ \ \ -fuy\ \\$'\n'\ \ \ \ dist-upgrade\ \&\&\ \\$'\n'\ \ \ \ DEBIAN_FRONTEND=noninteractive\ \\$'\n'\ \ \ \ apt-get\ \\$'\n'\ \ \ \ -o\ Dpkg::Options::=\"--force-confnew\"\ \\$'\n'\ \ \ \ --force-yes\ \\$'\n'\ \ \ \ -fuy\ \\$'\n'\ \ \ \ -t\ stretch-backports\ install\ openjdk-8-jdk-headless\ net-tools\ wget\ uuid-runtime\ python-pip\ python-dev\ libyaml-dev\ httpie\ jq\ gawk\ zip\ unzip\ tmux\ git\ build-essential$'\n'$'\n'pip\ install\ --upgrade\ pip$'\n'$'\n'cat\ \<\<EOF\ \>\ /etc/security/limits.conf$'\n'\*\ soft\ nofile\ 65536$'\n'\*\ hard\ nofile\ 65536$'\n'\*\ soft\ memlock\ unlimited$'\n'\*\ hard\ memlock\ unlimited$'\n'$'\n'EOF$'\n'$'\n'cat\ \<\<EOF\ \>\ /etc/sysctl.conf$'\n'net.ipv4.icmp_echo_ignore_broadcasts\ =\ 1$'\n'net.ipv4.icmp_ignore_bogus_error_responses\ =\ 1$'\n'net.ipv4.tcp_syncookies\ =\ 1$'\n'net.ipv4.conf.all.accept_source_route\ =\ 0$'\n'net.ipv4.conf.default.accept_source_route\ =\ 0$'\n'net.ipv4.conf.all.rp_filter\ =\ 1$'\n'net.ipv4.conf.default.rp_filter\ =\ 1$'\n'net.ipv4.conf.all.accept_redirects\ =\ 0$'\n'net.ipv4.conf.default.accept_redirects\ =\ 0$'\n'net.ipv4.conf.all.secure_redirects\ =\ 0$'\n'net.ipv4.conf.default.secure_redirects\ =\ 0$'\n'net.ipv4.ip_forward\ =\ 0$'\n'net.ipv4.conf.all.send_redirects\ =\ 0$'\n'net.ipv4.conf.default.send_redirects\ =\ 0$'\n'kernel.randomize_va_space\ =\ 1$'\n'fs.file-max\ =\ 65535$'\n'kernel.pid_max\ =\ 65536$'\n'net.ipv4.ip_local_port_range\ =\ 2000\ 65000$'\n'net.ipv4.tcp_window_scaling\ =\ 1$'\n'net.ipv4.tcp_max_syn_backlog\ =\ 3240000$'\n'net.ipv4.tcp_fin_timeout\ =\ 15$'\n'net.core.somaxconn\ =\ 65535$'\n'net.ipv4.tcp_max_tw_buckets\ =\ 1440000$'\n'net.core.rmem_default\ =\ 8388608$'\n'net.core.rmem_max\ =\ 16777216$'\n'net.core.wmem_max\ =\ 16777216$'\n'net.ipv4.tcp_rmem\ =\ 4096\ 87380\ 16777216$'\n'net.ipv4.tcp_wmem\ =\ 4096\ 65536\ 16777216$'\n'net.ipv4.tcp_congestion_control\ =\ cubic$'\n'vm.swappiness\ =\ 1$'\n'net.ipv4.tcp_tw_reuse\ =\ 1$'\n'$'\n'EOF$'\n'$'\n'\#\ set\ all\ sysctl\ configurations$'\n'sysctl\ -p$'\n'$'\n'\#\ disable\ swap$'\n'swapoff\ -a$'\n'$'\n'echo\ \"block/sda/queue/scheduler\ =\ noop\"\ \>\>\ /etc/sysfs.conf$'\n'echo\ noop\ \>\ /sys/block/sda/queue/scheduler$'\n'$'\n'echo\ done.$'\n'$'\n' --no-restart-on-failure --maintenance-policy=TERMINATE --provisioning-model=STANDARD --service-account=1047194775394-compute@developer.gserviceaccount.com --scopes=https://www.googleapis.com/auth/pubsub,https://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/service.management.readonly,https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/trace.append,https://www.googleapis.com/auth/devstorage.read_write --create-disk=auto-delete=yes,boot=yes,device-name=persistent-disk-0,image=projects/debian-cloud/global/images/debian-9-stretch-v20181210,mode=rw,size=25,type=projects/open-targets-platform/zones/europe-west1-d/diskTypes/pd-ssd --labels=goog-ec-src=vm_add-gcloud --reservation-affinity=any
vm deleted
Please, have a look at the be-debian-worker-mk VM which was shutdown long time ago and I don't think is of any use, to find out whether we could decommission it.
VM: be-debian-worker-mk Project: open-targets-platform