brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alessio Gambi <alessioga...@gmail.com>
Subject Re: Problems in running the brooklyn.demo.WebClusterDatabaseExample on OpenStack
Date Wed, 04 Jun 2014 15:33:04 GMT
Hi Martin,

sadly the situation is unchanged after implementing your suggestion.

The ssh client (jclouds.ssh) cannot connect to the instances, because the key pair is not
set up correctly. It seems that the privateKey/publicKey options are silently ignored.

I think suspect that there might be a misconfiguration somewhere and not all the data are
passed to jclouds.

Something like this:
http://stackoverflow.com/questions/19733905/pass-ssh-key-using-jclouds-in-openstack

— Alessio

On Jun 4, 2014, at 4:05 PM, Martin Harris <martin.harris@cloudsoftcorp.com> wrote:

> Hi Alessio,
> 
> Sorry, that should have read "brooklyn.location.named.OpenStack.user=ubuntu"
> not "brooklyn.location.named.OpenStack.loginUser=ubuntu" - a copy-and-paste
> error on my behalf. I must admit I haven't tried it on OpenStack as I don't
> have an OpenStack account setup, but I've just tested it on AWS and it
> works fine. If it doesn't work for you, let me know and I'll keep digging
> 
> Cheers
> 
> M
> 
> 
> On 4 June 2014 14:28, Alessio Gambi <alessiogambi@gmail.com> wrote:
> 
>> Hi Martin,
>> 
>> tried your solution, but unfortunately that did not work.
>> 
>> As before, all the VMs are started but no keyPair is setup, and no ssh key
>> put inside the VM.
>> 
>> For the moment, I can workaround this by using an “hand made” image, that
>> is, an image where I already install mine public key, but I would like to
>> make the setup as correct as possible since the beginning.
>> 
>> I attach some parts of the logs below.
>> 
>> 
>> ==== Brooklyn.debug ====
>> 
>> 2014-06-04 13:04:41,403 DEBUG brooklyn.util.os.Os
>> [brooklyn-execmanager-l0WUHIdn-9]: Quietly changing '~/.ssh/brooklyn_rsa'
>> to '/home/ubuntu/.ssh/brooklyn_rsa'
>> 2014-06-04 13:04:41,404 DEBUG b.l.jclouds.JcloudsLocation
>> [brooklyn-execmanager-l0WUHIdn-13]: jclouds using template
>> {image={id=myregion/9e6ee7a0-7dc9-4fe1-851a-7dc632f5f912,
>> providerId=9e6ee7a0-7dc9-4fe1-851a-
>> 7dc632f5f912, name=Ubuntu 12.04.1 LTS amd64, location={scope=ZONE,
>> id=myregion, description=myregion, parent=openstack-nova},
>> os={family=ubuntu, name=Ubuntu 12.04.1 LTS amd64, version=12.04,
>> description=Ubuntu
>> 12.04.1 LTS amd64, is64Bit=true}, description=Ubuntu 12.04.1 LTS amd64,
>> status=AVAILABLE, loginUser=ubuntu}, hardware={id=myregion/000000960,
>> providerId=000000960, name=m1.micro, location={scope=ZONE, id=myregi
>> on, description=myregion, parent=openstack-nova}, processors=[{cores=1.0,
>> speed=1.0}], ram=960, volumes=[{type=LOCAL, size=40.0, bootDevice=true,
>> durable=true}], supportsImage=ALWAYS_TRUE}, location={scope=ZONE
>> , id=myregion, description=myregion, parent=openstack-nova},
>> options={loginUser=ubuntu, inboundPorts=[22, 8000], scriptPresent=true,
>> autoAssignFloatingIp=false, securityGroupNames=[default],
>> configDrive=false}}
>> / options {loginUser=ubuntu, inboundPorts=[22, 8000], scriptPresent=true,
>> autoAssignFloatingIp=false, securityGroupNames=[default],
>> configDrive=false} to provision machine in
>> openstack-novXXXX@NginxControllerImpl{id=IMgLLkfT}
>> 
>> 2014-06-04 13:04:41,405 DEBUG jclouds.compute
>> [brooklyn-execmanager-l0WUHIdn-13]: >> running 1 node
>> group(brooklyn-kuhb-ubuntu-webclusterdatab-krt9-nginx-imgl)
>> location(myregion) image(myregion/9e6ee7a0-7dc9-4fe1-851a-7dc632f5f912)
>> hardwareProfile(myregion/000000960) options({loginUser=ubuntu,
>> inboundPorts=[22, 8000], scriptPresent=true,
>> userMetadata={Name=brooklyn-kuhb-ubuntu-webclusterdatab-krt9-nginx-imgl-vzFy},
>> autoAssignFloatingIp=false, securityGroupNames=[default],
>> configDrive=false})
>> 
>> . . .
>> 
>> 2014-06-04 13:04:42,010 DEBUG jclouds.wire [user thread 2]: << "{"server":
>> {"status": "BUILD", "updated": "2014-06-04T13:04:41Z", "hostId": "",
>> "addresses": {}, "links": [{"href": "
>> http://openstack.infosys.tuwien.ac.at:8774/v2/dce8a3b04a3843c89d855e682a71c672/servers/94d99d6b-1a27-4169-855d-dbeed9b4c971",
>> "rel": "self"}, {"href": "
>> http://openstack.infosys.tuwien.ac.at:8774/dce8a3b04a3843c89d855e682a71c672/servers/94d99d6b-1a27-4169-855d-dbeed9b4c971",
>> "rel": "bookmark"}], "key_name": null, "image": {"id":
>> "9e6ee7a0-7dc9-4fe1-851a-7dc632f5f912", "links": [{"href": "
>> http://openstack.infosys.tuwien.ac.at:8774/dce8a3b04a3843c89d855e682a71c672/images/9e6ee7a0-7dc9-4fe1-851a-7dc632f5f912",
>> "rel": "bookmark"}]}, "OS-EXT-STS:task_state": "scheduling",
>> "OS-EXT-STS:vm_state": "building", "flavor": {"id": "000000960", "links":
>> [{"href": "
>> http://openstack.infosys.tuwien.ac.at:8774/dce8a3b04a3843c89d855e682a71c672/flavors/000000960",
>> "rel": "bookmark"}]}, "id": "94d99d6b-1a27-4169-855d-dbeed9b4c971",
>> "security_groups": [{"name": "default"}], "user_id":
>> "74416de8baf14f22ad1da0e20001252a", "name":
>> "brooklyn-gtb0-ubuntu-webclusterdatab-krt9-mysql-uk2g-7c7", "created":
>> "2014-06-04T13:04:41Z", "tenant_id": "dce8a3b04a3843c89d855e682a71c672",
>> "OS-DCF:diskConfig": "MANUAL", "accessIPv4": "", "accessIPv6": "",
>> "progress": 0, "OS-EXT-STS:power_state": 0, "config_drive": "", "metadata":
>> {"Name": "brooklyn-gtb0-ubuntu-webclusterdatab-krt9-mysql-uk2g-vbYG",
>> "jclouds-group": "brooklyn-gtb0-ubuntu-webclusterdatab-krt9-mysql-uk2g"}}}"
>> 
>> . . . // Eventually the VM starts
>> 
>> 2014-06-04 13:06:40,019 DEBUG jclouds.ssh [user thread 2]: >>
>> (ubuntu:pw[512839791320ffea9341a5edaa9f388f]@10.99.0.49:22) acquiring
>> {hostAndPort=10.99.0.49:22, loginUser=ubuntu, ssh=null,
>> connectTimeout=60000, sessionTimeout=60000}
>> 
>> 2014-06-04 13:06:40,019 DEBUG jclouds.ssh [user thread 2]: >>
>> (ubuntu:pw[512839791320ffea9341a5edaa9f388f]@10.99.0.49:22) acquiring
>> {hostAndPort=10.99.0.49:22, loginUser=ubuntu, ssh=null,
>> connectTimeout=60000, sessionTimeout=60000}
>> 2014-06-04 13:06:45,620 WARN  net.schmizz.sshj.DefaultConfig [user thread
>> 3]: Disabling high-strength ciphers: cipher strengths apparently limited by
>> JCE policy
>> 2014-06-04 13:06:45,813 ERROR net.schmizz.concurrent.Promise [user thread
>> 3]: <<authenticated>> woke to: net.schmizz.sshj.userauth.UserAuthException:
>> password auth failed
>> 
>> 
>> ==== MySQL VM ====
>> Generating public/private rsa key pair.
>> 
>> Your identification has been saved in /etc/ssh/ssh_host_rsa_key.
>> 
>> Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub.
>> 
>> The key fingerprint is:
>> 
>> 39:fd:cf:76:92:bd:cb:68:22:c1:2b:1a:a4:f0:ca:66
>> root@brooklyn-gtb0-ubuntu-webclusterdatab-krt9-mysql-uk2g-7c7
>> 
>> . . .
>> Generating public/private dsa key pair.
>> 
>> Your identification has been saved in /etc/ssh/ssh_host_dsa_key.
>> 
>> Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub.
>> 
>> The key fingerprint is:
>> 
>> 11:7d:6e:e7:db:e2:a4:0d:08:73:4f:16:ec:d7:a3:14
>> root@brooklyn-gtb0-ubuntu-webclusterdatab-krt9-mysql-uk2g-7c7
>> 
>> . . .
>> Generating public/private ecdsa key pair.
>> 
>> Your identification has been saved in /etc/ssh/ssh_host_ecdsa_key.
>> 
>> Your public key has been saved in /etc/ssh/ssh_host_ecdsa_key.pub.
>> 
>> The key fingerprint is:
>> 
>> c4:65:ff:f9:86:be:be:b8:06:c5:1a:2e:1d:f5:4b:87
>> root@brooklyn-gtb0-ubuntu-webclusterdatab-krt9-mysql-uk2g-7c7
>> 
>> . . .
>> Generation complete.
>> ec2:
>> ec2: #############################################################
>> ec2: -----BEGIN SSH HOST KEY FINGERPRINTS-----
>> ec2: 1024 11:7d:6e:e7:db:e2:a4:0d:08:73:4f:16:ec:d7:a3:14
>> root@brooklyn-gtb0-ubuntu-webclusterdatab-krt9-mysql-uk2g-7c7 (DSA)
>> ec2: 256 c4:65:ff:f9:86:be:be:b8:06:c5:1a:2e:1d:f5:4b:87
>> root@brooklyn-gtb0-ubuntu-webclusterdatab-krt9-mysql-uk2g-7c7 (ECDSA)
>> ec2: 2048 39:fd:cf:76:92:bd:cb:68:22:c1:2b:1a:a4:f0:ca:66
>> root@brooklyn-gtb0-ubuntu-webclusterdatab-krt9-mysql-uk2g-7c7 (RSA)
>> ec2: -----END SSH HOST KEY FINGERPRINTS-----
>> ec2: #############################################################
>> -----BEGIN SSH HOST KEY KEYS-----
>> ecdsa-sha2-nistp256
>> AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJohzlX8mGzbHW4SZzB7cw1Y7eJkTPPOjRis+WwiF++/GIX4xOcW+OTqX+pGhQMlIS3dVaRqhFlw3DuZNxMahws=
>> root@brooklyn-gtb0-ubuntu-webclusterdatab-krt9-mysql-uk2g-7c7
>> ssh-rsa
>> AAAAB3NzaC1yc2EAAAADAQABAAABAQChtIR+qUTMGCUzEZrFvCz5xkzaGYRpiKNDT7GipBnyaGDz8rfrcJtvUrC3Qa11Rq+2TVv8CrLQ0AkgJB0dFu3F7xw1bG1IHn8xOClr2zz7Bpin7etu09A8fwj3iv7bCcJQiApOesfneM2Pt1PS/h6npl8ypt8UtFtUdkeNdr2JOmkJlxjuOShNWgdXntyUD//q+fbIWccN3Dt0gN7l8tbqJzwO+SEL71gxxjZ2Uj+OA6TiQWazUbrVn9kopDd1DbdNBRTjnbxxterPM5PqAm11vKHYm/eqXNtyIKMcZTo53jlVmGEzh1PTO/rkwkvJpvJdM+yyrP5qY1vf6ZIhr2T7
>> root@brooklyn-gtb0-ubuntu-webclusterdatab-krt9-mysql-uk2g-7c7
>> -----END SSH HOST KEY KEYS-----
>> 
>> 
>> 
>> 
>> On Jun 4, 2014, at 2:57 PM, Martin Harris <martin.harris@cloudsoftcorp.com>
>> wrote:
>> 
>>> Hi Alessio,
>>> 
>>> Great to hear that you're considering Brooklyn for your research project
>> -
>>> I hope it works well for you!
>>> 
>>> To configure brooklyn to use a specific key file, you can use the
>>> privateKeyFile and publicKeyFile (note the removal of the 'login' prefix)
>>> configuration keys as follows:
>>> 
>>> ========================================================
>>> 
>>> brooklyn.location.named.OpenStack=XXXX
>>> brooklyn.location.named.OpenStack.identity=XXXX
>>> brooklyn.location.named.OpenStack.credential=XXXX
>>> brooklyn.location.named.OpenStack.imageId=XXXX
>>> 
>>> # m1.micro
>>> brooklyn.location.named.OpenStack.hardwareId=myregion/000000960
>>> 
>>> # Security Configuration
>>> brooklyn.location.named.OpenStack.loginUser=ubuntu
>>> brooklyn.location.named.OpenStack.privateKeyFile=~/.ssh/brooklyn_rsa
>>> brooklyn.location.named.OpenStack.publicKeyFile=~/.ssh/brooklyn_rsa.pub
>>> 
>>> brooklyn.location.named.OpenStack.securityGroups=default
>>> 
>>> 
>>> ========================================================
>>> 
>>> Cheers
>>> 
>>> Martin Harris
>>> 
>>> 
>>> On 4 June 2014 13:50, Alessio Gambi <a.gambi@infosys.tuwien.ac.at>
>> wrote:
>>> 
>>>> Hi,
>>>> 
>>>> I am about to start a new research project that focuses on testing
>> elastic
>>>> cloud-based applications, and I am considering Brooklyn as Case Study.
>>>> 
>>>> At the moment, I am trying to deploy the WebClusterDatabaseExample on a
>>>> private OpenStack installation. However I am stuck with something that
>>>> should be simple, but apparently it is not: setting a KeyPair for the
>> VM.
>>>> 
>>>> I configured the OpenStack location in the brooklyn.properities file as
>>>> below, but I am probably missing something.
>>>> Maybe you can help.
>>>> 
>>>> 
>>>> The deployment goes smooth up to the point of launching the three VMs
>>>> (loadbalancer, jboss and mysql), but it gets stuck there.
>>>> The machines run but the Brooklyn manager cannot ssh to them.
>>>> 
>>>> From the Web console of OpenStack I see that the machines have no
>> KeyPair,
>>>> but from the startup logs of the VMs I see that they received 2 public
>> keys.
>>>> (Of course, none of them match the one specified in the properties file)
>>>> 
>>>> Many thanks
>>>> 
>>>> — Alessio
>>>> 
>>>> ========================================================
>>>> 
>>>> brooklyn.location.named.OpenStack=XXXX
>>>> brooklyn.location.named.OpenStack.identity=XXXX
>>>> brooklyn.location.named.OpenStack.credential=XXXX
>>>> brooklyn.location.named.OpenStack.imageId=XXXX
>>>> 
>>>> # m1.micro
>>>> brooklyn.location.named.OpenStack.hardwareId=myregion/000000960
>>>> 
>>>> # Security Configuration
>>>> brooklyn.location.named.OpenStack.loginUser=ubuntu
>>>> 
>> brooklyn.location.named.OpenStack.loginPrivateKeyFile=~/.ssh/brooklyn_rsa
>>>> 
>>>> 
>> brooklyn.location.named.OpenStack.loginPublicKeyFile=~/.ssh/brooklyn_rsa.pub
>>>> 
>>>> brooklyn.location.named.OpenStack.securityGroups=default
>>>> 
>> brooklyn.location.named.OpenStack.extraSshPublicKeyData=~/.ssh/id_rsa.pub
>>>> 
>>>> 
>>>> ========================================================
>>>> 
>>>> 
>>>> 
>>>> Dr. Alessio Gambi, PhD
>>>> Distributed Systems Group (DSG)
>>>> Vienna University of Technology, Austria
>>>> alessio.gambi@tuwien.ac.at
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>> 
>>> 
>>> --
>>> Martin Harris
>>> Lead Software Engineer
>>> Cloudsoft Corporation Ltd
>>> www.cloudsoftcorp.com
>>> Mobile: +44 (0)7989 047-855
>> 
>> 
> 
> 
> -- 
> Martin Harris
> Lead Software Engineer
> Cloudsoft Corporation Ltd
> www.cloudsoftcorp.com
> Mobile: +44 (0)7989 047-855


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message