Ubuntu autoinstall

HowTo
https://canonical-subiquity.readthedocs-hosted.com/en/latest/tutorial/providing-autoinstall.html#providing-autoinstall

Download Ubuntu iso
https://releases.ubuntu.com/24.04/ubuntu-24.04-desktop-amd64.iso

wget https://releases.ubuntu.com/24.04/ubuntu-24.04-desktop-amd64.iso -O ~/Downloads/iso/ubuntu-24.04-desktop-amd64.iso

Prepare

sudo apt install qemu-system-x86
 
# mount ISO by double click
#sudo mount -r ~/Downloads/iso/ubuntu-24.04-desktop-amd64.iso /mnt

autoinstall.yaml

Side2Side IPSec VPN connection between OpenStack VPN and AVM Fritz!Box

Define variables for OpenStack VPN configuration

FRITZBOX_EXTERNAL_IP=x.x.x.x                    # curl ipinfo.io/ip
FRITZBOX_NETWORK=192.168.178.0/24               # Heimnetz > Netzwerk > Netzwerkeinstellungen > IPv4-Einstellungen
PASSWORD='xxxxxxxx'                             # apg -m 32
OPENSTACK_SUBNET_ID=$(openstack subnet list -c ID -f value)
OPENSTACK_ROUTER_ID=$(openstack router list -c ID -f value)

Define variables

Cleanup / delete OpenStack objects

PROJECT_ID=f0f745a9c79c47fdbbdd187d728f9e41
 
# Delete VMs
openstack server list --project ${PROJECT_ID}
openstack server delete ${SERVER_ID}
 
openstack volume list --project ${PROJECT_ID}
openstack volume delete ${VOLUME_ID}
 
openstack image list --private --long | grep ${PROJECT_ID}
openstack image delete ${IMAGE_ID}
 
# Delete loadbalancer
openstack loadbalancer list --project ${PROJECT_ID}
openstack loadbalancer delete --cascade ${LOADBALANCER_ID}
 
# Delete secrets
openstack secret list
openstack secret delete ${SECRET_URL}
 
# Delete VPNs
openstack vpn ipsec site connection list --long | grep ${PROJECT_ID}
openstack vpn ipsec site connection delete ${IPSEC_SITE_CONNECTION_ID}
openstack vpn endpoint group list --long | grep ${PROJECT_ID}
openstack vpn endpoint group delete ${VPN_LOCAL_ENDPOINT_GROUP_ID} ${VPN_PEER_ENDPOINT_GROUP_ID}
openstack vpn service list --long | grep ${PROJECT_ID}
openstack vpn service delete ${VPN_SERVICE_ID}
openstack vpn ipsec policy list --long | grep ${PROJECT_ID}
openstack vpn ipsec policy delete ${VPN_IPSEC_POLICY_ID}
openstack vpn ike policy list --long | grep ${PROJECT_ID}
openstack vpn ike policy delete ${VPN_IKE_POLICY_ID}
 
# Delete k8s
openstack coe cluster list 
 
# Delete floating ip
openstack floating ip list --project ${PROJECT_ID}
openstack floating ip delete ${FLOATING_IP}
 
# Delete router

OpenStack Debug VPN

Find the VPN server and the relevant router UUID

# get VPN connection ID
openstack vpn ipsec site connection list | grep foo
openstack vpn ipsec site connection list --long | grep <project_id>
 
VPN_CONNECTION_ID=142dc25f-13bb-4fda-b093-edf13df98ed8
openstack vpn ipsec site connection show ${VPN_CONNECTION_ID}
 
VPN_SERVICE_ID=$(openstack vpn ipsec site connection show ${VPN_CONNECTION_ID} -c 'VPN Service' -f value)
openstack vpn service show ${VPN_SERVICE_ID}
 
# get router ID
ROUTER_ID=$(openstack vpn service show ${VPN_SERVICE_ID} -c Router -f value)
echo "ROUTER_ID=${ROUTER_ID}"

Find the ctl Node where the active router is running

ROUTER_PORT_ID=$(openstack port list --device-owner network:router_gateway -f value -c id --router ${ROUTER_ID})
CONTROL_NODE=$(openstack port show ${ROUTER_PORT_ID} -c binding_host_id -f value)
echo "CONTROL_NODE: ${CONTROL_NODE}"
 
echo "ssh ${CONTROL_NODE} sudo ip netns exec qrouter-${ROUTER_ID} ip a s"

Connect to that ctl node and "jump" in its neutron-l3-agent docker container

Xiaomi Mi A2 Lite (daisy)

Enable USB-Debugging and unlock phone

# Connect phone to Wifi
Settings > About Phone > Build number > tap 7x times to become developer
Settings > System > Advanced > Developer Options > OEM unclocking
Settings > System > Advanced > Developer Options > USB Debugging > OK

Unlock phone

# Connect phone to computer
adb devices
# Accept "Allow access with your computer RSA key" on phone
adb reboot bootloader
fastboot oem unlock

Boot bootloader

Power Off phone
Hold volume_down + power
 
OPTIONAL: Recovery phone with original Xiaomi image to update firmware

Flash custom image
https://arrowos.net/download
# ArrowOS download: https://get.mirror1.arrowos.net/download.php?token=oD03QRrG9umnU1Egj6VspKXNwaiIlcYSOqbfCdyP4x8WzMtT7kL2hHZFJAv5&version=arrow-11.0&variant=community&device=daisy
#OpenGA apps: https://netix.dl.sourceforge.net/project/opengapps/arm64/test/20210130/open_gapps-arm64-11.0-pico-20210130-TEST.zip
NikGapps: https://sourceforge.net/projects/nikgapps/files/Releases/NikGapps-SL/18-Feb-2023/NikGapps-core-arm64-12.1-20230218-signed.zip/download