function install_microstack() {
sudo snap install microstack --devmode --edge
- sudo snap set microstack config.network.ports.dashboard=10080
+ sudo snap set microstack config.network.ports.dashboard=8080
sudo microstack.init --auto --control
sudo snap alias microstack.openstack openstack
. /var/snap/microstack/common/etc/microstack.rc
- for i in $(openstack security group list | awk '/default/{ print $2 }'); do
- openstack security group rule create $i --protocol icmp --remote-ip 0.0.0.0/0
- openstack security group rule create $i --protocol tcp --remote-ip 0.0.0.0/0
+ for i in $(microstack.openstack security group list | awk '/default/{ print $2 }'); do
+ microstack.openstack security group rule create $i --protocol icmp --remote-ip 0.0.0.0/0
+ microstack.openstack security group rule create $i --protocol tcp --remote-ip 0.0.0.0/0
done
- openstack network create --enable --no-share osm-ext
- openstack subnet create osm-ext-subnet --network osm-ext --dns-nameserver 8.8.8.8 \
+ microstack.openstack network create --enable --no-share osm-ext
+ microstack.openstack subnet create osm-ext-subnet --network osm-ext --dns-nameserver 8.8.8.8 \
--subnet-range 172.30.0.0/24
- openstack router create external-router
- openstack router add subnet external-router osm-ext-subnet
- openstack router set --external-gateway external external-router
+ microstack.openstack router create external-router
+ microstack.openstack router add subnet external-router osm-ext-subnet
+ microstack.openstack router set --external-gateway external external-router
curl -L https://github.com/cirros-dev/cirros/releases/download/0.3.5/cirros-0.3.5-x86_64-disk.img \
- | openstack image create --public --container-format=bare \
+ | microstack.openstack image create --public --container-format=bare \
--disk-format=qcow2 cirros-0.3.5-x86_64-disk.img
curl https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img \
- | openstack image create --public --container-format=bare \
+ | microstack.openstack image create --public --container-format=bare \
--disk-format=qcow2 ubuntu16.04
curl https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img \
- | openstack image create --public --container-format=bare \
+ | microstack.openstack image create --public --container-format=bare \
--disk-format=qcow2 US1604
curl https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img \
- | openstack image create --public --container-format=bare \
+ | microstack.openstack image create --public --container-format=bare \
--disk-format=qcow2 ubuntu18.04
curl https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img \
- | openstack image create --public --container-format=bare \
+ | microstack.openstack image create --public --container-format=bare \
--disk-format=qcow2 ubuntu20.04
}