SpectroCloud/MAAS

From DER's LLC
Jump to navigation Jump to search

MAAS Information

MAAS Install

 apt install net-tools
 ifconfig
 vi /etc/netplan/50-cloud-init.yaml
 hostnamectl set-hostname MAAS
 reboot
 snap install --channel="latest" maas
 snap install maas
 maas init region+rack --database-uri "postgres://maas:[email protected]/maas"
 maas init region+rack --database-uri 'postgres://maas:[email protected]/maas'
 maas create admin --username=admin [email protected]
 maas createadmin --username=admin [email protected]
 systemctl status snap.docker.dockerd
 systemctl disable snap.docker.dockerd
 systemctl stop snap.docker.dockerd
 reboot

Upload Spectro Images to MAAS

# SCP Files to MAAS Server
scp $IMAGE_NAME.tar.gz [email protected]:/home/ders/
#Login to MAAS Server
ssh [email protected]

export IMAGE_NAME='u-2004-0-k-1305-fips'
export MAAS_IP='172.16.84.32'
### API Key is found @ http://172.16.84.32:5240/MAAS/r/account/prefs/api-keys
export MAAS_API_KEY='QEsrBQnKbrty7kP9d3:XCugUZPMqzeNUHSXtQ:S4QtELuSEAd5WrbJrhkZTLQqsCBvjgjG'

maas login maas http://$MAAS_IP:5240/MAAS/api/2.0 $MAAS_API_KEY

maas maas boot-resources create name=custom/$IMAGE_NAME architecture=amd64/generic content@=/home/ders/$IMAGE_NAME.tar.gz title=$IMAGE_NAME

Deploy MAAS PCG

#Create VM with 4CPU and 8G of Memory and 50G Disk and Networking to VLAN-2
#PXE Boot the VM. This should register it with MAAS. 
#In MAAS Commission the VM and add the Power Configuration. 
#On a separate vm (TEMP-VM) Download the Palette-CLI. 
wget --no-check-certificate https://software.spectrocloud.com/palette-cli/v4.5.4/linux/cli/palette -O /usr/bin/palette
chmod +x /usr/bin/palette

wget --no-check-certificate https://ders-gitlab.dersllc.com/ders/spectro-sa/-/raw/main/maas-pcg/palette-cli-config.yaml -O palette-cli-config.yaml
palette login -c palette-cli-config.yaml --api-key 'NmZlMzFjMTljYmZlZTY2YzMyMjBmY2MzMmU5ZDAzZDc=' --org ders-lab --console-url https://vertex.dersllc.com

wget --no-check-certificate https://ders-gitlab.dersllc.com/ders/spectro-sa/-/raw/main/maas-pcg/pcg.yaml -O pcg.yaml
palette pcg install -f pcg.yaml

#Once complete this VM can be deleted.