From 57e75a88ecd3de605d0bd868a7ecfafad323559b Mon Sep 17 00:00:00 2001 From: Derek Smith Date: Wed, 29 Nov 2023 21:33:45 -0500 Subject: [PATCH] More incus updates. --- deployment/deploy_vm.sh | 4 ++-- deployment/help.txt | 2 +- deployment/remote.sh | 24 ++++++++++++------------ deployment/reset.sh | 4 ++-- deployment/stub_profile.sh | 2 +- deployment/up.sh | 4 ++-- deployment/wait_for_ip.sh | 2 +- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/deployment/deploy_vm.sh b/deployment/deploy_vm.sh index e8c7a10..9ff82a6 100755 --- a/deployment/deploy_vm.sh +++ b/deployment/deploy_vm.sh @@ -93,7 +93,7 @@ if ! incus list --format csv | grep -q "$INCUS_VM_NAME"; then incus storage volume set ss-base "$BACKUP_VOLUME_NAME" size="${BACKUP_DISK_SIZE_GB}GB" - bash -c "./stub_profile.sh --vm=$VIRTUAL_MACHINE --lxd-hostname=$INCUS_VM_NAME --ss-volume-name=$SSDATA_VOLUME_NAME --backup-volume-name=$BACKUP_VOLUME_NAME" + bash -c "./stub_profile.sh --vm=$VIRTUAL_MACHINE --incus-hostname=$INCUS_VM_NAME --ss-volume-name=$SSDATA_VOLUME_NAME --backup-volume-name=$BACKUP_VOLUME_NAME" # now let's create a new VM to work with. #incus init -q --profile="$INCUS_VM_NAME" "$BASE_IMAGE_VM_NAME" "$INCUS_VM_NAME" --vm @@ -119,7 +119,7 @@ if ! incus list --format csv | grep -q "$INCUS_VM_NAME"; then incus start "$INCUS_VM_NAME" sleep 10 - bash -c "./wait_for_ip.sh --lxd-name=$INCUS_VM_NAME" + bash -c "./wait_for_ip.sh --incus-name=$INCUS_VM_NAME" # scan the remote machine and install it's identity in our SSH known_hosts file. ssh-keyscan -H "$FQDN" >> "$SSH_HOME/known_hosts" diff --git a/deployment/help.txt b/deployment/help.txt index 292aec3..62a2afb 100644 --- a/deployment/help.txt +++ b/deployment/help.txt @@ -8,7 +8,7 @@ You are in the Sovereign Stack Management Environment (SSME). From here, you can ss-down - Reverses ss-up. Takes the active project down. Non-destructive of user data, unless you provide the --purge flag. ss-update - This is just ss-down then ss-up. - ss-show - show the lxd resources associated with the current remote. + ss-show - show the incus resources associated with the current remote. For more infomation about all these topics, consult the Sovereign Stack website starting with: diff --git a/deployment/remote.sh b/deployment/remote.sh index a6daae3..cafec6d 100755 --- a/deployment/remote.sh +++ b/deployment/remote.sh @@ -99,7 +99,7 @@ if ! incus remote list | grep -q "$REMOTE_NAME"; then fi else - echo "ERROR: the remote already exists! You need to go delete your lxd remote if you want to re-create your remote." + echo "ERROR: the remote already exists! You need to go delete your incus remote if you want to re-create your remote." echo " It's may also be helpful to reset/rename your remote path." exit 1 fi @@ -129,8 +129,8 @@ if ! command -v incus >/dev/null 2>&1; then fi - if incus network list --format csv -q project default | grep -q lxdbr1; then - incus network delete lxdbr1 --project default + if incus network list --format csv -q project default | grep -q incusbr1; then + incus network delete incusbr1 --project default sleep 1 fi @@ -138,10 +138,10 @@ fi # install dependencies. ssh -t "ubuntu@$FQDN" 'sudo apt update && sudo apt upgrade -y && sudo apt install htop dnsutils nano -y' -if ! ssh "ubuntu@$FQDN" snap list | grep -q lxd; then - ssh -t "ubuntu@$FQDN" 'sudo snap install lxd --channel=5.18/candidate' - sleep 5 -fi + +scp ../install_incus.sh "ubuntu@$FQDN:$REMOTE_DATA_PATH/install_incus.sh" +ssh -t "ubuntu@$FQDN" "sudo chmod +x $REMOTE_DATA_PATH/install_incus.sh" +ssh -t "ubuntu@$FQDN" "sudo bash -c $REMOTE_DATA_PATH/install_incus.sh" # install OVN for the project-specific bridge networks ssh -t "ubuntu@$FQDN" "sudo apt-get install -y ovn-host ovn-central && sudo ovs-vsctl set open_vswitch . external_ids:ovn-remote=unix:/var/run/ovn/ovnsb_db.sock external_ids:ovn-encap-type=geneve external_ids:ovn-encap-ip=127.0.0.1" @@ -158,8 +158,8 @@ IP_OF_MGMT_MACHINE="$(ssh ubuntu@"$FQDN" env | grep SSH_CLIENT | cut -d " " -f 1 IP_OF_MGMT_MACHINE="${IP_OF_MGMT_MACHINE#*=}" IP_OF_MGMT_MACHINE="$(echo "$IP_OF_MGMT_MACHINE" | cut -d: -f1)" -# run lxd init on the remote server. -cat <