2

I'm trying to access the inner juju environment by doing the following from the MAAS server

First up - juju status from the 'outer' environment

production@maas:~$ juju status
Model                  Controller                     Cloud/Region    Version  SLA
conjure-landscape-338  conjure-up-cloud-maas-982-8f1  cloud-maas-982  2.2.0    unsupported

App               Version  Status   Scale  Charm             Store       Rev  OS      Notes
haproxy                    unknown      1  haproxy           jujucharms   41  ubuntu  exposed
landscape-server           active       1  landscape-server  jujucharms   21  ubuntu  
postgresql                 active       1  postgresql        jujucharms  101  ubuntu  
rabbitmq-server            active       1  rabbitmq-server   jujucharms    5  ubuntu  

Unit                 Workload  Agent  Machine  Public address  Ports           Message
haproxy/0*           unknown   idle   0/lxd/0  10.44.94.201    80/tcp,443/tcp  
landscape-server/0*  active    idle   0/lxd/1  10.44.94.205                    
postgresql/0*        active    idle   0/lxd/2  10.44.94.202    5432/tcp        Live master (9.5.7)
rabbitmq-server/0*   active    idle   0/lxd/3  10.44.94.203    5672/tcp        Unit is ready

Machine  State    DNS           Inst id              Series  AZ       Message
0        started  10.44.94.200  aqdsce               xenial  default  Deployed
0/lxd/0  started  10.44.94.201  juju-b17704-0-lxd-0  xenial           Container started
0/lxd/1  started  10.44.94.205  juju-b17704-0-lxd-1  xenial           Container started
0/lxd/2  started  10.44.94.202  juju-b17704-0-lxd-2  xenial           Container started
0/lxd/3  started  10.44.94.203  juju-b17704-0-lxd-3  xenial           Container started

Relation     Provides          Consumes          Type
peer         haproxy           haproxy           peer
website      haproxy           landscape-server  regular
db-admin     landscape-server  postgresql        regular
amqp         landscape-server  rabbitmq-server   regular
replication  postgresql        postgresql        peer
cluster      rabbitmq-server   rabbitmq-server   peer

Then we jump onto the landscape server

production@maas:~$ juju ssh landscape-server/0 sudo 'JUJU_HOME=/var/lib/landscape/juju-homes/`sudo ls -rt /var/lib/landscape/juju-homes/ | tail -1` sudo -u landscape -E bash'
landscape@juju-b17704-0-lxd-1:~$ 

And at this point - according to Landscape openstack juju management i should be able to run juju status - but I just get permission denied

landscape@juju-b17704-0-lxd-1:~$ juju status
error: cannot load ssh client keys: mkdir /home/ubuntu/.local: permission denied
landscape@juju-b17704-0-lxd-1:~$ set | grep JUJU
JUJU_HOME=/var/lib/landscape/juju-homes/1
landscape@juju-b17704-0-lxd-1:~$ 

I'm sure its something simple - but i'm hesistant to start opening up permissions if that's not the issue.

2
  • when you are in landscape and you type juju users, what output do you get? Jun 19, 2017 at 14:15
  • 2
    Have managed to solve this, it appears a lot of the information is wrong for the latest MAAS/Juju combo the correct command is <pre>juju ssh landscape-server/0 sudo 'JUJU_DATA=/var/lib/landscape/juju-homes/sudo ls -rt /var/lib/landscape/juju-homes/ | tail -1 sudo -u root -E bash'</pre> - note that it is accessing as root not the landscape user! Jun 19, 2017 at 14:37

1 Answer 1

0

If you're using conjure-up I used that:

$:juju ssh landscape-server/0 sudo 'JUJU_DATA=/var/lib/landscape/juju-homes/`sudo ls -rt /var/lib/landscape/juju-homes/ | tail -1` sudo -u root -E bash'

Then switch to the non default controller with, here it is called controller:

$: juju switch controller
$: juju status

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .