summaryrefslogtreecommitdiffstats
path: root/ci/03-maasdeploy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/03-maasdeploy.sh')
-rwxr-xr-xci/03-maasdeploy.sh26
1 files changed, 18 insertions, 8 deletions
diff --git a/ci/03-maasdeploy.sh b/ci/03-maasdeploy.sh
index 0207e89a..60ed0855 100755
--- a/ci/03-maasdeploy.sh
+++ b/ci/03-maasdeploy.sh
@@ -13,11 +13,15 @@ fi
NODE_ARCTYPE=`arch`
NODE_ARC="amd64/generic"
+NODE_ARCHES="amd64"
if [ "x86_64" == "$NODE_ARCTYPE" ]; then
NODE_ARC="amd64/generic"
elif [ "ppc64le" == "$NODE_ARCTYPE" ]; then
NODE_ARC='ppc64el'
+elif [ "aarch64" == "$NODE_ARCTYPE" ]; then
+ NODE_ARC="arm64/generic"
+ NODE_ARCHES="arm64"
else
NODE_ARC=$NODE_ARCTYPE
fi
@@ -96,8 +100,8 @@ python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, i
MAAS_IP=$(grep " ip_address" deployconfig.yaml | cut -d ':' -f 2 | sed -e 's/ //')
MAAS_NAME=`grep "maas_name" deployconfig.yaml | cut -d ':' -f 2 | sed -e 's/ //'`
-API_SERVER="http://$MAAS_IP/MAAS/api/2.0"
-API_SERVERMAAS="http://$MAAS_IP/MAAS/"
+API_SERVER="http://$MAAS_IP:5240/MAAS/api/2.0"
+API_SERVERMAAS="http://$MAAS_IP:5240/MAAS/"
PROFILE=ubuntu
MY_UPSTREAM_DNS=`grep "upstream_dns" deployconfig.yaml | cut -d ':' -f 2 | sed -e 's/ //'`
SSH_KEY=`cat ~/.ssh/id_rsa.pub`
@@ -211,7 +215,7 @@ installmaas(){
#
configuremaas(){
#reconfigure maas with correct MAAS address.
- #Below code is needed as MAAS have issue in commisoning without restart.
+ #Below code is needed as MAAS have issue in commissioning without restart.
#sudo ./maas-reconfigure-region.sh $MAAS_IP
sleep 30
sudo maas-rack config --region-url http://$MAAS_IP:5240/MAAS
@@ -243,6 +247,10 @@ configuremaas(){
maas $PROFILE boot-source update $SOURCE_ID \
url=$URL keyring_filename=$KEYRING_FILE || true
+ if [ $NODE_ARCTYPE != "x86_64" ] ; then
+ maas $PROFILE boot-source-selection update 1 1 arches="$NODE_ARCHES"
+ fi
+
maas $PROFILE boot-resources import || true
while [ "$(maas $PROFILE boot-resources is-importing)" == "true" ];
@@ -325,7 +333,7 @@ setupspacenetwork(){
fi
fi
if ([ $type == "admin" ]); then
- # If we have a network, we create it
+ # If we have a network, we create it
if ([ $NET_FABRIC_ID ]); then
# Set ranges
SUBNET_PREFIX=${SPACE_CIDR::-5}
@@ -403,10 +411,10 @@ addnodes(){
echo_info "Creating and adding bootstrap node"
- virt-install --connect $VIRSHURL --name bootstrap --ram 4098 --cpu host --vcpus 2 --video \
- cirrus --disk size=20,format=qcow2,bus=virtio,cache=directsync,io=native,pool=default \
+ virt-install --connect $VIRSHURL --name bootstrap --ram 4098 --cpu host --vcpus 2 \
+ --disk size=20,format=qcow2,bus=virtio,cache=directsync,io=native,pool=default \
$netw --boot network,hd,menu=off --noautoconsole \
- --vnc --print-xml | tee bootstrap
+ --print-xml | tee bootstrap
if [ "$virtinstall" -eq 1 ]; then
bootstrapmac=`grep "mac address" bootstrap | head -1 | cut -d '"' -f 2`
@@ -440,7 +448,7 @@ addnodes(){
virt-install --connect $VIRSHURL --name $NODE_NAME --ram 8192 --cpu host --vcpus 4 \
--disk size=120,format=qcow2,bus=virtio,cache=directsync,io=native,pool=default \
- $netw $netw --boot network,hd,menu=off --noautoconsole --vnc --print-xml | tee $NODE_NAME
+ $netw $netw --boot network,hd,menu=off --noautoconsole --print-xml | tee $NODE_NAME
nodemac=`grep "mac address" $NODE_NAME | head -1 | cut -d '"' -f 2`
virsh -c $VIRSHURL define --file $NODE_NAME
@@ -471,6 +479,8 @@ addnodes(){
NODE_ARC="amd64/generic"
elif [ "ppc64le" == "$NODE_ARCTYPE" ]; then
NODE_ARC='ppc64el'
+ elif [ "aarch64" == "$NODE_ARCTYPE" ]; then
+ NODE_ARC="arm64/generic"
else
NODE_ARC=$NODE_ARCTYPE
fi