7

I have been trying to install juju with juju-gui on my virtual machine (Fresh installation Ubuntu 13.04 64-bit)

To configure my local environment I installed mongodb-server and lxc.

After successfully installing juju and juju-gui, I run watch juju status and get public ip: 10.0.3.213 for juju-gui.

Since I am running server version of ubuntu I have no way of seeing that URL from this virtual machine. Using my host OS I can't reach that IP since that IP is being used by lxc.

Is this a default way of accessing juju?

If I remove lxc would I be able to access GUI on eth0 ip address?

Braiam
  • 69,112
mabasic
  • 121

2 Answers2

4

You will probably find what you're looking for here: How do I setup an LXC guest so that it gets a dhcp address so I can access it on my network?

Alternatively if you are looking for a temporary solution you can create an ssh tunnel to the GUI machine by: ssh -N -p 22 -c 3des hostUser@hostIp -L 1234/lxcMachineIp/443 and then you will be able to access it on your local machine at https://localhost:1234

hatch
  • 2,323
1

The IP range 10.0.3.* and therefore the juju-gui assigned IP 10.0.3.213 come from the lxc default configuration. Follow these steps :

  1. Clean-up

    • uninstall juju, juju-gui etc.
    • delete "local-machine" lxc files, if any rm -rf /var/lib/lxc/*
  2. configure LXC

    • edit /etc/init/lxc-net.conf and /etc/default/lxc-net and set your LAN IP range, e.g. instead of 10.0.3.* your LAN is 10.1.2.*, then set LXC_ADDR="10.1.2.4"
      LXC_NETWORK="10.1.2.0/24"
      LXC_DHCP_RANGE="10.1.2.201,10.1.2.250"
      LXC_DHCP_MAX="50"
      Actually the LXC_ADDR should be the I.P. of your "lxcbr0" bridge.
    • Optionally you may edit /etc/lxc/dnsmasq.conf and give STATIC IPs to LXC containers (within the LXC_DHCP_RANGE I.P. range).
  3. reboot the machine and reinstall juju, juju-gui etc.

By the way LXC is only necessary if you deploy with juju on the "local" environment.