Build on Home Network

Hi,

My home network is 192.168.1.0/24

I tried to deploy Microstack, but the web UI doesn’t seem to work and I can’t reach my virtual machine.

What am I doing wrong?

snap install microstack --channel beta
snap set microstack config.network.ext-cidr=192.168.1.39/24
snap set microstack config.network.ext-gateway=192.168.1.39
snap set microstack config.network.control-ip=192.168.1.39
snap set microstack config.network.compute-ip=192.168.1.39
snap set microstack config.network.dns-servers=192.168.1.3
microstack.init --auto --control
snap alias microstack.openstack openstack && \
snap alias microstack.ovs-vsctl ovs-vsctl && \
openstack router remove subnet $(openstack router list | grep test-router | cut -d \| -f 2 | sed -e 's/^[ \t]*//') $(openstack subnet list | grep test-subnet | cut -d \| -f 2 | sed -e 's/^[ \t]*//') && \
openstack router delete $(openstack router list | grep test-router | cut -d \| -f 2 | sed -e 's/^[ \t]*//') && \
openstack network delete external && \
openstack network delete test && \
openstack network create --external --provider-physical-network physnet1 --provider-network-type flat public && \
openstack subnet create --no-dhcp --allocation-pool start=192.168.1.40,end=192.168.1.60 --network public --subnet-range 192.168.1.0/24 --dns-nameserver 192.168.1.3 --gateway 192.168.1.1 --ip-version 4 public-subnet && \
openstack network create --provider-network-type geneve private && \
openstack subnet create --dhcp --network private --subnet-range 10.0.10.0/24 --ip-version 4 private-subnet && \
openstack router create public-router && \
openstack router set --external-gateway public --enable-snat public-router && \
openstack router add subnet $(openstack router list | grep public-router | cut -d \| -f 2 | sed -e 's/^[ \t]*//') $(openstack subnet list | grep private-subnet | cut -d \| -f 2 | sed -e 's/^[ \t]*//') && \
mkdir -p /home/$(whoami)/.ssh && \
openstack keypair create sshkey > /home/$(whoami)/.ssh/id_rsa && \
openstack server create --network private --flavor m1.small --image cirros --key-name sshkey --security-group default workstation && \
openstack floating ip create --subnet public-subnet public --tag workstation && \
openstack server add floating ip workstation $(openstack floating ip list --tags workstation | grep 1 | cut -d \| -f 3 | sed -e 's/^[ \t]*//')

I feel like the Microstack folks should make some of this much more apparent, but at least they have it somewhere in their docs I guess:

OpenStack for the edge, micro clouds and developers

On this page you’ll find a note about creating some port forwarding to accessing the Horizon UI.

Accessing Horizon on a remote server If you’ve installed MicroStack on a remote server you can use SSH local port forwarding to access Horizon:

sudo ssh -i <ssh-key> -N -L 8001:10.20.20.1:443 <user>@<server-ip>

Then point your browser at: https://localhost:8001.

Personally, I found it easier to simply to an entire SOCKS proxy to the OpenStack node running Horizon. Here’s what I do (at a basic level, though the below will still work):

ssh -D <local_port> <microstack_host>

You can set the <local_port> to any available port, I have a habit of using 8123.

Once that connection is open, I usually just use FireFox and tell it to use the proxy I just created. Here’s a screenshot of the config I use in FireFox:

Then I open up the Horizon UI in Firefox and I’m off to the races :slight_smile: I’m still learning, but I would definitely like to figure out way to make this all accessible without the SSH proxy stuff as that feels a bit awkward.

1 Like

Makes sense, but I didn’t create Microstack on a remote server, it is on the same subnet as my local network, so it should just work. It’s possible that I have not comprehended the method by which network talks via the host to Microstack and maybe that needs to change.