1
1

More incus updates.

This commit is contained in:
Derek Smith 2023-11-29 21:33:45 -05:00
parent a2c29b189e
commit 57e75a88ec
Signed by: farscapian
GPG Key ID: B443E530A14E1C90
7 changed files with 21 additions and 21 deletions

View File

@ -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"

View File

@ -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:

View File

@ -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 <<EOF | ssh ubuntu@"$FQDN" lxd init --preseed
# run incus admin init on the remote server.
cat <<EOF | ssh ubuntu@"$FQDN" incus admin init --preseed
config:
core.https_address: ${MGMT_PLANE_IP}:8443
core.dns_address: ${MGMT_PLANE_IP}
@ -175,7 +175,7 @@ networks:
ipv4.nat: true
ipv6.address: none
dns.mode: managed
- name: lxdbr1
- name: incusbr1
description: "Non-natting bridge needed for ovn networks."
type: bridge
config:
@ -205,11 +205,11 @@ cluster:
cluster_token: ""
EOF
# ensure the lxd service is available over the network, then add a incus remote, then switch the active remote to it.
# ensure the incus service is available over the network, then add a incus remote, then switch the active remote to it.
if wait-for-it -t 20 "$FQDN:8443"; then
# now create a remote on your local incus client and switch to it.
# the software will now target the new remote.
incus remote add "$REMOTE_NAME" "$FQDN" --protocol=lxd --auth-type=tls --accept-certificate
incus remote add "$REMOTE_NAME" "$FQDN" --auth-type=tls --accept-certificate
incus remote switch "$REMOTE_NAME"
echo "INFO: A new remote named '$REMOTE_NAME' has been created. Your incus client has been switched to it."

View File

@ -58,8 +58,8 @@ if [ "$PURGE_INCUS" = true ]; then
incus network delete incusbr0 --project default
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
fi
# # create the testnet/mainnet blocks/chainstate subvolumes.

View File

@ -11,7 +11,7 @@ BACKUP_VOLUME_NAME=
# grab any modifications from the command line.
for i in "$@"; do
case $i in
--lxd-hostname=*)
--incus-hostname=*)
INCUS_HOSTNAME="${i#*=}"
shift
;;

View File

@ -287,7 +287,7 @@ VPS_HOSTNAME=
. ./base.sh
if ! incus image list --format csv | grep -q "$DOCKER_BASE_IMAGE_NAME"; then
# create the lxd base image.
# create the incus base image.
if [ "$SKIP_BASE_IMAGE_CREATION" = false ]; then
./create_base.sh
fi
@ -345,7 +345,7 @@ for VIRTUAL_MACHINE in www btcpayserver lnplayserver; do
# check if the OVN network exists in this project.
if ! incus network list | grep -q "ss-ovn"; then
incus network create ss-ovn --type=ovn network=lxdbr1 ipv6.address=none
incus network create ss-ovn --type=ovn network=incusbr1 ipv6.address=none
fi
export MAC_ADDRESS_TO_PROVISION=

View File

@ -7,7 +7,7 @@ INCUS_INSTANCE_NAME=
# grab any modifications from the command line.
for i in "$@"; do
case $i in
--lxd-name=*)
--incus-name=*)
INCUS_INSTANCE_NAME="${i#*=}"
shift
;;