juju manual bootstrap - does it work?
brian mullan
bmullan.mail at gmail.com
Mon May 5 11:11:43 UTC 2014
Will do Andrew... I will be trying this again with a newly launched server
today or tomorrow.
On Mon, May 5, 2014 at 2:14 AM, Andrew Wilkins <andrew.wilkins at canonical.com
> wrote:
> On Sun, May 4, 2014 at 8:59 PM, brian mullan <bmullan.mail at gmail.com>wrote:
>
>> Andrews... sorry but don't spend any more time troubleshooting this.
>> I'm going to blow that server away and start over.
>>
>
> Brian,
>
> Sorry I wasn't able to be of timely assistance, and thanks for providing
> the information I requested. I could at least see that sudo was not part of
> the problem, as even the ssh commands not invoking sudo were causing a
> prompt. We explicitly disallow the password authentication method, so I'm
> wondering if some other method is triggering.
>
> If I end up in the same place with the same problem I'll send another
>> email but I've already spent way too much time trying to get this server to
>> work via manual juju bootstrap.
>>
>
> I would be very grateful if you're able to track down the problem, so we
> can prevent this in the future. If you do reproduce the issue, could you
> please send back the results of running:
>
> ssh -vv ubuntu at host true
> and
> ssh -vv -o "StrictHostKeyChecking no" -o "PasswordAuthentication no"
> -i /home/bmullan/.juju/ssh/juju_id_rsa -i /home/bmullan/.ssh/id_rsa
> ubuntu at host true*173.39.236.162 <ubuntu at 173.39.236.162> bash*
>
>
>> brian
>>
>>
>>
>> On Sun, May 4, 2014 at 7:22 AM, brian mullan <bmullan.mail at gmail.com>wrote:
>>
>>>
>>> Thanks Andrew... information you asked for is inline.
>>>
>>>
>>> On Sat, May 3, 2014 at 10:12 PM, Andrew Wilkins <
>>> andrew.wilkins at canonical.com> wrote:
>>>
>>>> On Sat, May 3, 2014 at 2:11 PM, brian mullan <bmullan.mail at gmail.com>wrote:
>>>>
>>>>> I've tried for 2 days to get this to work and I'm stumped.
>>>>> using my laptop w/ubuntu 14.04 desktop
>>>>> remote server /w ubuntu 14.04 fresh server install
>>>>>
>>>>> I am the only account on both systems and I have both ssh and sudo
>>>>> access on both
>>>>>
>>>>> I can ssh & login to server just fine
>>>>>
>>>>> I even set up passwordless ssh for me from laptop to server and doing
>>>>>
>>>>
>>>> When you did that, did you use ~/.ssh/id_rsa or something else?
>>>>
>>>
>>>
>>>
>>> *I tried this two different ways*
>>> *$ssh-keygen -t rsa*
>>>
>>> *then*
>>> *$ ssh-add*
>>> *then*
>>> *$ ssh-copy-id my_login_ID@<server_ip>*
>>>
>>>
>>>
>>> *then tried juju bootstrap each time... when that didn't work I removed
>>> those keys and used the following which didn't work either.*
>>>
>>>
>>> *$ ssh-keygen*
>>>
>>> *then*
>>> *$ ssh-add*
>>> *then*
>>> *$ ssh-copy-id my_login_ID@<server_ip>*
>>>
>>>
>>> *But with either of the above passwordless ssh works for me if I just
>>> ssh to the server in a terminal window*
>>>
>>> *example: ssh my_login_ID@<server_ip>*
>>> *logs me directly into the server with no password prompt.*
>>>
>>>
>>>>
>>>>> ssh me at server logs me directly into it just fine.
>>>>>
>>>>
>>>> And "ssh me at server sudo true" works, without prompting?
>>>>
>>>> On laptop I've installed juju
>>>>>
>>>>
>>>> Just to be clear, you're on 1.18.x?
>>>>
>>>
>>> *yes... v1.18.1*
>>>
>>> *$ juju --version1.18.1-trusty-amd64*
>>>
>>>
>>>
>>>>
>>>> Created configuration template environments.yaml with:
>>>>>
>>>>> default: manual
>>>>>
>>>>> manual:
>>>>> type: manual
>>>>> # bootstrap-host holds the host name of the machine where
>>>>> the
>>>>> # bootstrap machine agent will be started.
>>>>> bootstrap-host: <server_ip>
>>>>> # bootstrap-user specifies the user to authenticate as when
>>>>> # connecting to the bootstrap machine. If defaults to
>>>>> # the current user.
>>>>> # bootstrap-user: <my_username_id>
>>>>> # storage-listen-ip specifies the IP address that the
>>>>> # bootstrap machine's Juju storage server will listen
>>>>> # on. By default, storage will be served on all
>>>>> # network interfaces.
>>>>> # storage-listen-ip:
>>>>> # storage-port specifes the TCP port that the
>>>>> # bootstrap machine's Juju storage server will listen
>>>>> # on. It defaults to 8040
>>>>> # storage-port: 8040
>>>>>
>>>>> On my laptop I execute the following
>>>>>
>>>>> *$ juju switch manual*
>>>>>
>>>>> then
>>>>>
>>>>> * $ juju bootstrap*
>>>>>
>>>>> Juju appears to connect to the Server ok but I keep getting asked for
>>>>> a password??
>>>>>
>>>>
>>>> Would you mind doing this again with "--debug" and replying with the
>>>> output?
>>>>
>>>
>>> *bmullan at brians-juju:~$ juju bootstrap --debug *
>>>
>>> *2014-05-04 11:11:00 INFO juju.cmd supercommand.go:297 running
>>> juju-1.18.1-trusty-amd64 [gc]*
>>> *2014-05-04 11:11:00 DEBUG juju.environs.configstore disk.go:64 Making
>>> /home/bmullan/.juju/environments*
>>> *2014-05-04 11:11:00 INFO juju.environs.manual init.go:139 initialising
>>> "173.39.236.162", user ""*
>>> *2014-05-04 11:11:00 DEBUG juju.utils.ssh ssh.go:234 using OpenSSH ssh
>>> client*
>>> *2014-05-04 11:11:00 DEBUG juju.utils.ssh ssh_openssh.go:122 running:
>>> ssh -o "StrictHostKeyChecking no" -o "PasswordAuthentication no" -i
>>> /home/bmullan/.juju/ssh/juju_id_rsa -i /home/bmullan/.ssh/id_rsa
>>> ubuntu at 173.39.236.162 <ubuntu at 173.39.236.162> sudo -n true*
>>> *Password: *
>>> *2014-05-04 11:11:49 INFO juju.environs.manual init.go:150 ubuntu user
>>> is already initialised*
>>> *2014-05-04 11:11:49 INFO juju.provider.manual provider.go:33
>>> initialized ubuntu user*
>>> *2014-05-04 11:11:50 DEBUG juju.provider.manual environ.go:194 using ssh
>>> storage at host "ubuntu at 173.39.236.162 <ubuntu at 173.39.236.162>" dir
>>> "/var/lib/juju/storage"*
>>> *2014-05-04 11:11:50 DEBUG juju.utils.ssh ssh.go:234 using OpenSSH ssh
>>> client*
>>> *2014-05-04 11:11:50 DEBUG juju.utils.ssh ssh_openssh.go:122 running:
>>> ssh -o "StrictHostKeyChecking no" -o "PasswordAuthentication no" -i
>>> /home/bmullan/.juju/ssh/juju_id_rsa -i /home/bmullan/.ssh/id_rsa
>>> ubuntu at 173.39.236.162 <ubuntu at 173.39.236.162> sudo -n /bin/bash*
>>> *Password: *
>>> *2014-05-04 11:12:39 DEBUG juju.utils.ssh ssh.go:234 using OpenSSH ssh
>>> client*
>>> *2014-05-04 11:12:39 DEBUG juju.utils.ssh ssh_openssh.go:122 running:
>>> ssh -o "StrictHostKeyChecking no" -o "PasswordAuthentication no" -i
>>> /home/bmullan/.juju/ssh/juju_id_rsa -i /home/bmullan/.ssh/id_rsa
>>> ubuntu at 173.39.236.162 <ubuntu at 173.39.236.162> bash*
>>> *Password: *
>>>
>>> *I enter my password and it will just keep reprompting for "a
>>> password"... I'm not sure what password though as there is only one account
>>> on both my laptop and on the server.*
>>>
>>>
>>>
>>>
>>>>
>>>>> The Juju Documentation at:
>>>>> https://juju.ubuntu.com/docs/config-manual.html
>>>>> says...
>>>>>
>>>>> *The manual provider does not perform automatic machine provisioning
>>>>> like other providers; instead, you must manually provision machines into
>>>>> the environment. Provisioning machines is described in the following
>>>>> sections.*
>>>>> *Bootstrapping*
>>>>>
>>>>> *To bootstrap a manual environment, you must specify the
>>>>> bootstrap-host configuration, and optionally the bootstrap-user
>>>>> configuration. If bootstrap-user is not specified, then Juju will ssh to
>>>>> the bootstrap host as the current user. Once the configuration is
>>>>> specified, you bootstrap as usual:*
>>>>>
>>>>> *juju bootstrap
>>>>> *
>>>>>
>>>>> *The juju bootstrap command will connect to bootstrap-host via SSH,
>>>>> and copy across and install the Juju agent.*
>>>>>
>>>>> *When bootstrapping, Juju will create the "ubuntu" user if it does not
>>>>> already exist. To eliminate the need for repeated password prompts, Juju
>>>>> will configure password-less ssh and sudo for the ubuntu user.*
>>>>> I've tried with the environments.yaml "bootstrap-user" set to my User
>>>>> ID and i have also tried with "bootstrap-user" commented out which as the
>>>>> above documentation states "should" default to me as the "current user".
>>>>>
>>>>> First... Why would the *juju bootstrap* prompt for a passworrd
>>>>>
>>>>
>>>> The only thing that springs to mind is that juju may be attempting to
>>>> use an SSH key that is not loaded by the SSH agent. The debug log should
>>>> help narrow this down.
>>>>
>>>
>>> *as I pointed out above locally on my laptop after creating the Key I
>>> used -* * ssh-add *
>>>
>>>
>>>> Second... What password can this be?? Its not mine on either system
>>>>> and I also tried just "ubuntu" in case but neither is accepted.
>>>>>
>>>>> Both Ubuntu systems, my lapttop and the server, have had sudo apt-get
>>>>> update && sudo apt-get upgrade so they both should have had all latest
>>>>> package updates.
>>>>>
>>>>> Anyone got any ideas?
>>>>>
>>>>> Does juju manual bootstrap work in 14.04?
>>>>>
>>>>
>>>> It works well for me, and there is automated testing in place for the
>>>> manual provider.
>>>>
>>>> thanks in advance
>>>>>
>>>>> Brian
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Juju mailing list
>>>>> Juju at lists.ubuntu.com
>>>>> Modify settings or unsubscribe at:
>>>>> https://lists.ubuntu.com/mailman/listinfo/juju
>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20140505/36944097/attachment.html>
More information about the Juju
mailing list