From b82813231c511ef9cf0a086c8747c9b70c4f4f95 Mon Sep 17 00:00:00 2001 From: Derek Smith Date: Tue, 4 Apr 2023 11:34:20 -0400 Subject: [PATCH] Remote update. --- deployment/remote.sh | 18 +++++++++--------- deployment/remote_env.sh | 1 - 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/deployment/remote.sh b/deployment/remote.sh index 31e23a9..2e28b5f 100755 --- a/deployment/remote.sh +++ b/deployment/remote.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -ex +set -e cd "$(dirname "$0")" # This script is meant to be executed on the management machine. @@ -88,13 +88,15 @@ if ! lxc remote list | grep -q "$REMOTE_NAME"; then ssh-copy-id -i "$HOME/.ssh/id_rsa.pub" "ubuntu@$FQDN" if [ -z "$DISK_TO_USE" ]; then - echo "INFO: It looks like the DISK_TO_USE has not been set. Enter it now." - echo "" + if ! ssh "ubuntu@$FQDN" lxc storage list -q | grep -q ss-base; then + echo "INFO: It looks like the DISK_TO_USE has not been set. Enter it now." + echo "" - ssh "ubuntu@$FQDN" lsblk --paths + ssh "ubuntu@$FQDN" lsblk --paths - echo "Please enter the disk or partition that Sovereign Stack will use to store data: " - read -r DISK_TO_USE + echo "Please enter the disk or partition that Sovereign Stack will use to store data: " + read -r DISK_TO_USE + fi fi else @@ -150,9 +152,7 @@ if ! ssh "ubuntu@$FQDN" snap list | grep -q lxd; then fi # install OVN for the project-specific bridge networks -ssh -t "ubuntu@$FQDN" "sudo apt-get install -y ovn-host ovn-central" - -ssh -t "ubuntu@$FQDN" "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" +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" # if the user did not specify the interface, we just use whatever is used for the default route. if [ -z "$DATA_PLANE_MACVLAN_INTERFACE" ]; then diff --git a/deployment/remote_env.sh b/deployment/remote_env.sh index ce141eb..a3da4ae 100755 --- a/deployment/remote_env.sh +++ b/deployment/remote_env.sh @@ -1,7 +1,6 @@ #!/bin/bash set -eu -cd "$(dirname "$0")" CURRENT_REMOTE="$(lxc remote get-default)"