From 91999d509e52905eaff16fc8928fbe5316f1eaeb Mon Sep 17 00:00:00 2001 From: unchama <11990197+unchama@users.noreply.github.com> Date: Mon, 4 Dec 2023 00:07:16 +0900 Subject: [PATCH] =?UTF-8?q?nic=E8=BF=BD=E5=8A=A0=20=E4=B8=8D=E8=A6=81?= =?UTF-8?q?=E3=81=AA=E3=82=B3=E3=83=9E=E3=83=B3=E3=83=89=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../proxmox-host-terminal/deploy-vm.sh | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/seichi-onp-k8s/cluster-boot-up/scripts/proxmox-host-terminal/deploy-vm.sh b/seichi-onp-k8s/cluster-boot-up/scripts/proxmox-host-terminal/deploy-vm.sh index fa421d71e..2024c6325 100644 --- a/seichi-onp-k8s/cluster-boot-up/scripts/proxmox-host-terminal/deploy-vm.sh +++ b/seichi-onp-k8s/cluster-boot-up/scripts/proxmox-host-terminal/deploy-vm.sh @@ -36,7 +36,7 @@ virt-customize -a jammy-server-cloudimg-amd64.img --install liburing2 --install # create a new VM and attach Network Adaptor # vmbr0=Service Network Segment (192.168.0.0/20) # vmbr1=Storage Network Segment (192.168.16.0/22) -qm create $TEMPLATE_VMID --cores 2 --memory 4096 --net0 virtio,bridge=vmbr0 --net1 virtio,bridge=vmbr1 --agent enabled=1,fstrim_cloned_disks=1 --name seichi-onp-k8s-template +qm create $TEMPLATE_VMID --cores 2 --memory 4096 --net0 virtio,bridge=vmbr0 --net1 virtio,bridge=vmbr1 --net2 virtio,bridge=vmbr2 --agent enabled=1,fstrim_cloned_disks=1 --name seichi-onp-k8s-template # import the downloaded disk to $TEMPLATE_BOOT_IMAGE_TARGET_VOLUME storage qm importdisk $TEMPLATE_VMID jammy-server-cloudimg-amd64.img $TEMPLATE_BOOT_IMAGE_TARGET_VOLUME @@ -119,24 +119,6 @@ runcmd: EOF # ----- # # END irregular indent because heredoc - - # only seichi-onp-k8s-cp-1, append snippet for cloud-init(user-config) - if [ "${vmname}" = "seichi-onp-k8s-cp-1" ] - then - # START irregular indent because heredoc -# --------- # -cat >> "$SNIPPET_TARGET_PATH"/"$vmname"-user.yaml << EOF - # add kubeconfig to cloudinit user - - su - cloudinit -c "mkdir -p ~/.kube" - - su - cloudinit -c "sudo cp /etc/kubernetes/admin.conf ~/.kube/config" - - su - cloudinit -c "sudo chown cloudinit:cloudinit ~/.kube/config" - # copy kubeadm-join-config to cloudinit user home directory - - su - cloudinit -c "sudo cp /root/join_kubeadm_cp.yaml ~/join_kubeadm_cp.yaml" - - su - cloudinit -c "sudo cp /root/join_kubeadm_wk.yaml ~/join_kubeadm_wk.yaml" -EOF -# --------- # - # END irregular indent because heredoc - fi # download snippet for cloud-init(network) curl -s "${REPOSITORY_RAW_SOURCE_URL}/seichi-onp-k8s/cluster-boot-up/snippets/${vmname}-network.yaml" > "${SNIPPET_TARGET_PATH}"/"${vmname}"-network.yaml