From b6fa941fcc0abb60e00399f7aaab85c0e07ad382 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Cluseau?= Date: Mon, 22 May 2023 19:16:11 +0200 Subject: [PATCH] cleanup --- Dockerfile | 4 ---- govc.env | 8 -------- upload-vmware.sh | 27 --------------------------- 3 files changed, 39 deletions(-) delete mode 100644 govc.env delete mode 100644 upload-vmware.sh diff --git a/Dockerfile b/Dockerfile index de0377d..575d574 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,8 +16,4 @@ run yes |apt-get install -y grub2 grub-pc-bin grub-efi-amd64-bin \ run apt-get install -y ca-certificates curl openssh-client \ && apt-get clean -run curl -L https://github.com/vmware/govmomi/releases/download/v0.30.4/govc_Linux_x86_64.tar.gz | gunzip > /bin/govc && chmod +x /bin/govc - -copy upload-vmware.sh govc.env /var/lib/direktil/ - copy --from=build /go/bin/ /bin/ diff --git a/govc.env b/govc.env deleted file mode 100644 index 3900582..0000000 --- a/govc.env +++ /dev/null @@ -1,8 +0,0 @@ -export GOVC_DATACENTER= -export GOVC_PASSWORD= -export GOVC_URL= -export GOVC_USERNAME= -export GOVC_INSECURE=1 -export GOVC_DATASTORE= -export NOVIT_VM_FOLDER= -export NOVIT_ISO_FOLDER= diff --git a/upload-vmware.sh b/upload-vmware.sh deleted file mode 100644 index 8c887a1..0000000 --- a/upload-vmware.sh +++ /dev/null @@ -1,27 +0,0 @@ -set -e - -dir=/var/lib/direktil/ -PATH=$PATH:$dir -cd $dir - -if [ ! -f govc.env ]; then - echo ERROR: govc.env file not found in dir $dir ; exit 1 -fi -source govc.env - -if [ $# != 2 ]; then - echo "Usage: $0 " ; exit 1 -fi - -if [[ -z $NOVIT_VM_FOLDER || -z $NOVIT_ISO_FOLDER ]]; then - echo "ERROR: All GOVC env vars (including NOVIT_VM_FOLDER and NOVIT_ISO_FOLDER) must be provided" ; exit 1 -fi - -VM=$1 -HOST=$2 - -govc vm.power -off "$NOVIT_VM_FOLDER/$VM" || true -sleep 5 -curl localhost:7606/hosts/$HOST/boot.iso | govc datastore.upload - "$NOVIT_ISO_FOLDER/$VM.iso" -sleep 5 -govc vm.power -on "$NOVIT_VM_FOLDER/$VM"