HPCloud and OpenStack

252 views
Skip to first unread message

Mihály László Molnár

unread,
Sep 25, 2013, 11:36:53 AM9/25/13
to brookly...@googlegroups.com
Hi All!

I'm new to brooklyn and I think I will have some question.

The first one, is that in brooklyn.properties I don't see any example for HP Cloud or OpenStack, just only this:

# brooklyn.location.named.HP = jclouds:hpcloud-compute

So my question is how to setup HP and OpenStack cloud in brooklyn.properties and how to use them, because every example for AWS as I can see.

My goal is to make a system which scales from my private OpenStack cloud to public HP.

Thanks for your help!

Rusty

Richard Downer

unread,
Sep 25, 2013, 12:02:56 PM9/25/13
to brookly...@googlegroups.com
Hi Rusty. Welcome to brooklyn :)

HP Cloud should certainly be compatible with brooklyn. I'll give a try shortly to confirm, but here's what I think *should* work.

Firstly you need to define your identity and credential (these are jclouds terms; jclouds is the library that brooklyn uses to do the work of talking to all the different cloud providers.) For HP Cloud, the identity is in the form "tenantid:username". You can get your tenant ID (also known as project ID) from this page: https://account.hpcloud.com/account/api_keys. Username is the same username you use to log in to the web console. The credential is your web console password.

You then add these to brooklyn.properties like this:

brooklyn.jclouds.hpcloud-compute.identity = 1234567890:johndoe
brooklyn.jclouds.hpcloud-compute.credential = p4ssw0rd

Step 2 is to define named locations for the HP Cloud compute zones. This should do it:

brooklyn.location.named.HP\ Cloud\ Arizona-1 = jclouds:hpcloud-compute:az-1.region-a.geo-1
brooklyn.location.named.HP\ Cloud\ Arizona-2 = jclouds:hpcloud-compute:az-2.region-a.geo-1
brooklyn.location.named.HP\ Cloud\ Arizona-3 = jclouds:hpcloud-compute:az-3.region-a.geo-1

That should be enough to get things going - with this information, brooklyn should be able to log in to your HP Cloud account and start VMs in the different regions. However we sometimes find that it's best to give brooklyn specific image IDs, rather than letting jclouds pick an image ID for us (you can see this has been done for the various Amazon EC2 zones) - we may need to log into doing this for HPCloud, too.

As I said, this *should* work but I haven't tried this yet. I will give it a go shortly, and post a correction if I'm wrong :)



--
You received this message because you are subscribed to the Google Groups "brooklyn-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brooklyn-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Richard Downer • Principal Software Engineer • Cloudsoft Corporation • http://www.cloudsoftcorp.com
Skype richardcloudsoft • Twitter @FrontierTown

Richard Downer

unread,
Sep 25, 2013, 12:40:51 PM9/25/13
to brookly...@googlegroups.com
OK, so I've tried it out - I got one thing wrong, and my suspicions about needing to supply image IDs were correct.

My mistake is with the identity - it's not the project/tenant ID, it's the project/tenant *name* that needs to be given. You can find your project name on this page: https://account.hpcloud.com/projects

So you will need to add this to brooklyn.properties:

brooklyn.jclouds.hpcloud-compute.identity = projectname:username
brooklyn.jclouds.hpcloud-compute.credential = password

Regarding step 2, I've looked up the image IDs for Ubuntu 12.04 LTS, and these should work:

brooklyn.location.named.HP\ Cloud\ Arizona-1 = jclouds:hpcloud-compute:az-1.region-a.geo-1
brooklyn.location.named.HP\ Cloud\ Arizona-1.imageId = az-1.region-a.geo-1/75845
brooklyn.location.named.HP\ Cloud\ Arizona-1.user = ubuntu
brooklyn.location.named.HP\ Cloud\ Arizona-2 = jclouds:hpcloud-compute:az-2.region-a.geo-1
brooklyn.location.named.HP\ Cloud\ Arizona-2.imageId = az-1.region-a.geo-2/67074
brooklyn.location.named.HP\ Cloud\ Arizona-2.user = ubuntu
brooklyn.location.named.HP\ Cloud\ Arizona-3 = jclouds:hpcloud-compute:az-3.region-a.geo-1
brooklyn.location.named.HP\ Cloud\ Arizona-3.imageId = az-1.region-a.geo-3/48335
brooklyn.location.named.HP\ Cloud\ Arizona-3.user = ubuntu

I've tested out an app in az-1 but haven't yet tried the rest (I'm not expecting any more problems, however.)

I'll get the rest of the IDs checked tomorrow, and will work to get the HP Cloud config into the shipped brooklyn.properties.

Shout back if you're seeing any problems.

Cheers,
Richard.

Molnár Mihály László

unread,
Sep 25, 2013, 1:06:11 PM9/25/13
to brookly...@googlegroups.com
Hi Richard!

Thanks a lot for the quick answer. I will try it tomorrow.

I think OpenStack is similar. According to this - http://jclouds.incubator.apache.org/documentation/quickstart/openstack/ , I think it should look like this:
brooklyn.jclouds.openstack-nova.identity = 1234567890:johndoe
brooklyn.jclouds.openstack-nova.credential = p4ssw0rd

But somehow I have to configure my own endpoint/api url. Is there any chance that this could work?:
brooklyn.location.named.MyOpenStack = jclouds:openstack-nova:https://apiurl:port/v2

How about more images? If I have prepared images as the docs says, for example one for nginx and one for the webapplication so I can speed up deployment.
I'm still just checking out the docs and examples, but is there any example for how to use these images? I think I have to create my own entity and there specify the image, read from property and then the other activities.
Or I have to create new location for every image?

Thanks again!
Rusty

Richard Downer

unread,
Sep 26, 2013, 4:42:10 AM9/26/13
to brookly...@googlegroups.com
Hi Rusty,

You can set an endpoint with this property:

brooklynjclouds.openstack-nova.endpoint = http://keystone-url/v2

For your question about using images pre-installed with your application, I'm not sure of the answer to that. I'll see what I can find out.

Richard.

Alex Heneveld

unread,
Sep 26, 2013, 5:25:16 AM9/26/13
to brookly...@googlegroups.com, Richard Downer

Hi Rusty,

your settings look right.� depending what the other end is doing you might need some other options however.� fwiw here is what i use:

��� brooklyn.location.named.hpcloud-compute-at=jclouds:openstack-nova:https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0
��� brooklyn.location.named.hpcloud-compute-at.identity=al...@cloudsoftcorp.com-tenant1:al...@cloudsoftcorp.com
��� brooklyn.location.named.hpcloud-compute-at.credential=p4ssw0rd
��� # configure login because this is not correctly autodetected
��� brooklyn.location.named.hpcloud-compute-at.privateKeyFile=~/.ssh/id_rsa
��� brooklyn.location.named.hpcloud-compute-at.loginUser=ubuntu
��� # set this to true in some openstacks to get public IP's automatically assigned
��� brooklyn.location.named.hpcloud-compute-at.jclouds.openstack-nova.auto-create-floating-ips=false
��� # optional to re-use the same keypair and security groups
��� brooklyn.location.named.hpcloud-compute-at.jclouds.openstack-nova.auto-generate-keypairs=false
��� brooklyn.location.named.hpcloud-compute-at.securityGroups=universal
��� brooklyn.location.named.hpcloud-compute-at.keyPair=mykeypair
��� brooklyn.location.named.hpcloud-compute-at.loginUser.privateKeyFile=~/.ssh/hpcloud-mykeypair.pem

this blog might be helpful:

��� http://www.cloudsoftcorp.com/blog/having-a-lark-at-parc/

re images -- if you set an imageId property that will use the image.

however as you say, this is not very portable, so our common approrach is to use a plain linux image, and install what is needed.� that's what the entities like nginx etc do, so that they can run in any cloud.� as an optimisation once it's working you can plug in a different "driver" which uses a known imageId to skip software installation (or take a snapshot from creation of the first instance of an entity and use that for subsequent instances, i.e. writing code to do exactly the behaviour you want).

HTH
--A



On 26/09/2013 09:42, Richard Downer wrote:
Hi Rusty,

You can set an endpoint with this property:

brooklynjclouds.openstack-nova.endpoint = http://keystone-url/v2

For your question about using images pre-installed with your application, I'm not sure of the answer to that. I'll see what I can find out.

Richard.

On 25 September 2013 18:06, Moln�r Mih�ly L�szl� <laci...@gmail.com> wrote:
Hi Richard!

Thanks a lot for the quick answer. I will try it tomorrow.

I think OpenStack is similar. According to this - http://jclouds.incubator.apache.org/documentation/quickstart/openstack/ , I think it should look like this:
brooklyn.jclouds.openstack-nova.identity = 1234567890:johndoe
brooklyn.jclouds.openstack-nova.credential = p4ssw0rd

But somehow I have to configure my own endpoint/api url. Is there any chance that this could work?:
brooklyn.location.named.MyOpenStack = jclouds:openstack-nova:https://apiurl:port/v2

How about more images? If I have prepared images as the docs says, for example one for nginx and one for the webapplication so I can speed up deployment.
I'm still just checking out the docs and examples, but is there any example for how to use these images? I think I have to create my own entity and there specify the image, read from property and then the other activities.
Or I have to create new location for every image?

Thanks again!
Rusty

On Wed, Sep 25, 2013 at 6:40 PM, Richard Downer <richard...@cloudsoftcorp.com> wrote:
OK, so I've tried it out - I got one thing wrong, and my suspicions about needing to supply image IDs were correct.

My mistake is with the identity - it's not the project/tenant ID, it's the project/tenant *name* that needs to be given. You can find your project name on this page:�https://account.hpcloud.com/projects

So you will need to add this to brooklyn.properties:

brooklyn.jclouds.hpcloud-compute.identity = projectname:username
brooklyn.jclouds.hpcloud-compute.credential = password

Regarding step 2, I've looked up the image IDs for Ubuntu 12.04 LTS, and these should work:

brooklyn.location.named.HP\ Cloud\ Arizona-1 = jclouds:hpcloud-compute:az-1.region-a.geo-1
brooklyn.location.named.HP\ Cloud\ Arizona-1.imageId = az-1.region-a.geo-1/75845
brooklyn.location.named.HP\ Cloud\ Arizona-1.user = ubuntu
brooklyn.location.named.HP\ Cloud\ Arizona-2 = jclouds:hpcloud-compute:az-2.region-a.geo-1
brooklyn.location.named.HP\ Cloud\ Arizona-2.imageId = az-1.region-a.geo-2/67074
brooklyn.location.named.HP\ Cloud\ Arizona-2.user = ubuntu
brooklyn.location.named.HP\ Cloud\ Arizona-3 = jclouds:hpcloud-compute:az-3.region-a.geo-1
brooklyn.location.named.HP\ Cloud\ Arizona-3.imageId = az-1.region-a.geo-3/48335
brooklyn.location.named.HP\ Cloud\ Arizona-3.user = ubuntu

I've tested out an app in az-1 but haven't yet tried the rest (I'm not expecting any more problems, however.)

I'll get the rest of the IDs checked tomorrow, and will work to get the HP Cloud config into the shipped brooklyn.properties.

Shout back if you're seeing any problems.

Cheers,
Richard.

On 25 September 2013 17:02, Richard Downer <richard...@cloudsoftcorp.com> wrote:
Hi Rusty. Welcome to brooklyn :)

HP Cloud should certainly be compatible with brooklyn. I'll give a try shortly to confirm, but here's what I think *should* work.

Firstly you need to define your identity and credential (these are jclouds terms; jclouds is the library that brooklyn uses to do the work of talking to all the different cloud providers.) For HP Cloud, the identity is in the form "tenantid:username". You can get your tenant ID (also known as project ID) from this page:�https://account.hpcloud.com/account/api_keys. Username is the same username you use to log in to the web console. The credential is your web console password.

You then add these to brooklyn.properties like this:

brooklyn.jclouds.hpcloud-compute.identity = 1234567890:johndoe
brooklyn.jclouds.hpcloud-compute.credential = p4ssw0rd

Step 2 is to define named locations for the HP Cloud compute zones. This should do it:

brooklyn.location.named.HP\ Cloud\ Arizona-1 = jclouds:hpcloud-compute:az-1.region-a.geo-1
brooklyn.location.named.HP\ Cloud\ Arizona-2 = jclouds:hpcloud-compute:az-2.region-a.geo-1
brooklyn.location.named.HP\ Cloud\ Arizona-3 = jclouds:hpcloud-compute:az-3.region-a.geo-1

That should be enough to get things going - with this information, brooklyn should be able to log in to your HP Cloud account and start VMs in the different regions. However we sometimes find that it's best to give brooklyn specific image IDs, rather than letting jclouds pick an image ID for us (you can see this has been done for the various Amazon EC2 zones) - we may need to log into doing this for HPCloud, too.

As I said, this *should* work but I haven't tried this yet. I will give it a go shortly, and post a correction if I'm wrong :)



On 25 September 2013 16:36, Mih�ly L�szl� Moln�r <laci...@gmail.com> wrote:
Hi All!

I'm new to brooklyn and I think I will have some question.

The first one, is that in brooklyn.properties I don't see any example for HP Cloud or OpenStack, just only this:

# brooklyn.location.named.HP = jclouds:hpcloud-compute

So my question is how to setup HP and OpenStack cloud in brooklyn.properties and how to use them, because every example for AWS as I can see.

My goal is to make a system which scales from my private OpenStack cloud to public HP.

Thanks for your help!

Rusty

--
You received this message because you are subscribed to the Google Groups "brooklyn-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brooklyn-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Richard Downer � Principal Software Engineer � Cloudsoft Corporation � http://www.cloudsoftcorp.com
Skype richardcloudsoft � Twitter @FrontierTown



--
Richard Downer � Principal Software Engineer � Cloudsoft Corporation � http://www.cloudsoftcorp.com
Skype richardcloudsoft � Twitter @FrontierTown
--
You received this message because you are subscribed to the Google Groups "brooklyn-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brooklyn-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "brooklyn-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brooklyn-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Richard Downer � Principal Software Engineer � Cloudsoft Corporation � http://www.cloudsoftcorp.com
Skype richardcloudsoft � Twitter @FrontierTown

Molnár Mihály László

unread,
Oct 16, 2013, 4:48:18 PM10/16/13
to brookly...@googlegroups.com, Richard Downer
Hi Richard and Alex,

It's been a while, but I haven't got time to test. Today I tried to use HP cloud both ways you wrote. Either way I get Unauthorized from HP.

I did some testing using these pages from HP:
https://docs.hpcloud.com/api/identity#authenticate-jumplink-span
https://community.hpcloud.com/article/utilize-hp-cloud-services-api-rest-client

What I get seems quite interesting. If I use the rest api tester with the form HP suggests, like this:
{
    "auth":{
        "passwordCredentials":{
            "username":"arunkant",
            "password":"changeme"
        },
        "tenantId":"95096564413950"
    }
}

Then it's working, no problem.
But if I copy it from the log, all in one line, like this:
{"auth":{"passwordCredentials":{"username":"arunkant","password":"changeme"},"tenantName":"95096564413950"}}

So I finally figured it out that jcloud or brooklyn wants to send tenantName while HP expect tenantID.
On OpenStack Grizzly it works fine, but with HP its a problem.

Any idea how should I fix it?

Thanks for the help!


Rusty


On Thu, Sep 26, 2013 at 11:25 AM, Alex Heneveld <alex.h...@cloudsoftcorp.com> wrote:

Hi Rusty,

your settings look right.  depending what the other end is doing you might need some other options however.  fwiw here is what i use:


    brooklyn.location.named.hpcloud-compute-at=jclouds:openstack-nova:https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0
    brooklyn.location.named.hpcloud-compute-at.identity=al...@cloudsoftcorp.com-tenant1:al...@cloudsoftcorp.com
    brooklyn.location.named.hpcloud-compute-at.credential=p4ssw0rd

    # configure login because this is not correctly autodetected
    brooklyn.location.named.hpcloud-compute-at.privateKeyFile=~/.ssh/id_rsa
    brooklyn.location.named.hpcloud-compute-at.loginUser=ubuntu

    # set this to true in some openstacks to get public IP's automatically assigned
    brooklyn.location.named.hpcloud-compute-at.jclouds.openstack-nova.auto-create-floating-ips=false

    # optional to re-use the same keypair and security groups
    brooklyn.location.named.hpcloud-compute-at.jclouds.openstack-nova.auto-generate-keypairs=false
    brooklyn.location.named.hpcloud-compute-at.securityGroups=universal
    brooklyn.location.named.hpcloud-compute-at.keyPair=mykeypair

    brooklyn.location.named.hpcloud-compute-at.loginUser.privateKeyFile=~/.ssh/hpcloud-mykeypair.pem

this blog might be helpful:

    http://www.cloudsoftcorp.com/blog/having-a-lark-at-parc/

re images -- if you set an imageId property that will use the image.

however as you say, this is not very portable, so our common approrach is to use a plain linux image, and install what is needed.  that's what the entities like nginx etc do, so that they can run in any cloud.  as an optimisation once it's working you can plug in a different "driver" which uses a known imageId to skip software installation (or take a snapshot from creation of the first instance of an entity and use that for subsequent instances, i.e. writing code to do exactly the behaviour you want).


HTH
--A



On 26/09/2013 09:42, Richard Downer wrote:
Hi Rusty,

You can set an endpoint with this property:

brooklynjclouds.openstack-nova.endpoint = http://keystone-url/v2

For your question about using images pre-installed with your application, I'm not sure of the answer to that. I'll see what I can find out.

Richard.

On 25 September 2013 18:06, Molnár Mihály László <laci...@gmail.com> wrote:
Hi Richard!

Thanks a lot for the quick answer. I will try it tomorrow.

I think OpenStack is similar. According to this - http://jclouds.incubator.apache.org/documentation/quickstart/openstack/ , I think it should look like this:
brooklyn.jclouds.openstack-nova.identity = 1234567890:johndoe
brooklyn.jclouds.openstack-nova.credential = p4ssw0rd

But somehow I have to configure my own endpoint/api url. Is there any chance that this could work?:
brooklyn.location.named.MyOpenStack = jclouds:openstack-nova:https://apiurl:port/v2

How about more images? If I have prepared images as the docs says, for example one for nginx and one for the webapplication so I can speed up deployment.
I'm still just checking out the docs and examples, but is there any example for how to use these images? I think I have to create my own entity and there specify the image, read from property and then the other activities.
Or I have to create new location for every image?

Thanks again!
Rusty

On Wed, Sep 25, 2013 at 6:40 PM, Richard Downer <richard...@cloudsoftcorp.com> wrote:
OK, so I've tried it out - I got one thing wrong, and my suspicions about needing to supply image IDs were correct.

My mistake is with the identity - it's not the project/tenant ID, it's the project/tenant *name* that needs to be given. You can find your project name on this page: https://account.hpcloud.com/projects

So you will need to add this to brooklyn.properties:

brooklyn.jclouds.hpcloud-compute.identity = projectname:username
brooklyn.jclouds.hpcloud-compute.credential = password

Regarding step 2, I've looked up the image IDs for Ubuntu 12.04 LTS, and these should work:

brooklyn.location.named.HP\ Cloud\ Arizona-1 = jclouds:hpcloud-compute:az-1.region-a.geo-1
brooklyn.location.named.HP\ Cloud\ Arizona-1.imageId = az-1.region-a.geo-1/75845
brooklyn.location.named.HP\ Cloud\ Arizona-1.user = ubuntu
brooklyn.location.named.HP\ Cloud\ Arizona-2 = jclouds:hpcloud-compute:az-2.region-a.geo-1
brooklyn.location.named.HP\ Cloud\ Arizona-2.imageId = az-1.region-a.geo-2/67074
brooklyn.location.named.HP\ Cloud\ Arizona-2.user = ubuntu
brooklyn.location.named.HP\ Cloud\ Arizona-3 = jclouds:hpcloud-compute:az-3.region-a.geo-1
brooklyn.location.named.HP\ Cloud\ Arizona-3.imageId = az-1.region-a.geo-3/48335
brooklyn.location.named.HP\ Cloud\ Arizona-3.user = ubuntu

I've tested out an app in az-1 but haven't yet tried the rest (I'm not expecting any more problems, however.)

I'll get the rest of the IDs checked tomorrow, and will work to get the HP Cloud config into the shipped brooklyn.properties.

Shout back if you're seeing any problems.

Cheers,
Richard.

On 25 September 2013 17:02, Richard Downer <richard...@cloudsoftcorp.com> wrote:
Hi Rusty. Welcome to brooklyn :)

HP Cloud should certainly be compatible with brooklyn. I'll give a try shortly to confirm, but here's what I think *should* work.

Firstly you need to define your identity and credential (these are jclouds terms; jclouds is the library that brooklyn uses to do the work of talking to all the different cloud providers.) For HP Cloud, the identity is in the form "tenantid:username". You can get your tenant ID (also known as project ID) from this page: https://account.hpcloud.com/account/api_keys. Username is the same username you use to log in to the web console. The credential is your web console password.

You then add these to brooklyn.properties like this:

brooklyn.jclouds.hpcloud-compute.identity = 1234567890:johndoe
brooklyn.jclouds.hpcloud-compute.credential = p4ssw0rd

Step 2 is to define named locations for the HP Cloud compute zones. This should do it:

brooklyn.location.named.HP\ Cloud\ Arizona-1 = jclouds:hpcloud-compute:az-1.region-a.geo-1
brooklyn.location.named.HP\ Cloud\ Arizona-2 = jclouds:hpcloud-compute:az-2.region-a.geo-1
brooklyn.location.named.HP\ Cloud\ Arizona-3 = jclouds:hpcloud-compute:az-3.region-a.geo-1

That should be enough to get things going - with this information, brooklyn should be able to log in to your HP Cloud account and start VMs in the different regions. However we sometimes find that it's best to give brooklyn specific image IDs, rather than letting jclouds pick an image ID for us (you can see this has been done for the various Amazon EC2 zones) - we may need to log into doing this for HPCloud, too.

As I said, this *should* work but I haven't tried this yet. I will give it a go shortly, and post a correction if I'm wrong :)



On 25 September 2013 16:36, Mihály László Molnár <laci...@gmail.com> wrote:
Hi All!

I'm new to brooklyn and I think I will have some question.

The first one, is that in brooklyn.properties I don't see any example for HP Cloud or OpenStack, just only this:

# brooklyn.location.named.HP = jclouds:hpcloud-compute

So my question is how to setup HP and OpenStack cloud in brooklyn.properties and how to use them, because every example for AWS as I can see.

My goal is to make a system which scales from my private OpenStack cloud to public HP.

Thanks for your help!

Rusty

--
You received this message because you are subscribed to the Google Groups "brooklyn-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brooklyn-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Richard Downer • Principal Software Engineer • Cloudsoft Corporation • http://www.cloudsoftcorp.com
Skype richardcloudsoft • Twitter @FrontierTown



--
Richard Downer • Principal Software Engineer • Cloudsoft Corporation • http://www.cloudsoftcorp.com
Skype richardcloudsoft • Twitter @FrontierTown
--
You received this message because you are subscribed to the Google Groups "brooklyn-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brooklyn-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "brooklyn-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brooklyn-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Richard Downer • Principal Software Engineer • Cloudsoft Corporation • http://www.cloudsoftcorp.com
Skype richardcloudsoft • Twitter @FrontierTown
--
You received this message because you are subscribed to the Google Groups "brooklyn-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brooklyn-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Molnár Mihály László

unread,
Oct 17, 2013, 8:08:21 AM10/17/13
to brookly...@googlegroups.com, Richard Downer
Hi all!

More question coming through. I upgraded to M2 and my problem still exists with HP Cloud.

An interesting thing, if I create an instance from horizon on my OpenStack Grizzly installation, then it gets its IP address, but if brooklyn creates it, then no dhcp request from the instance and therefore no IP.
Another interesting thing, that brooklyn connects the instance to the external and internal net too. Is that possible to use floating IP instead of connecting to the external network?

One more question: is there any document about all available option in brooklyn.properties? It would help a lot.

Thanks in advance!



Rusty

David Toy

unread,
Oct 22, 2013, 7:55:49 AM10/22/13
to brookly...@googlegroups.com, Richard Downer
Hi Rusty,

While I'm not a power user like Richard or Alex, I do help with the docs.

I've been pulling brooklyn.properties options together in a spreadsheet in preparation for writing something comprehensive. Perhaps this will be useful in this raw form https://docs.google.com/a/cloudsoftcorp.com/spreadsheet/ccc?key=0Avy7Tdf2EOIqdGQzSlNiT2M0V19SejBScDhSdzMtT2c#gid=0

Regarding IPs, there is an OpenStack specific option - auto-create-floating-ips - which Alex sets to false. Does setting this to true resolve your problem?

Thanks,
David


Richard Downer

unread,
Oct 22, 2013, 9:28:45 AM10/22/13
to David Toy, brookly...@googlegroups.com
Hi Rusty,

I've tried out HPCloud this morning and it worked well, so hopefully it's just a minor configuration issue that should be straightforward to fix.

My brooklyn.properties has this:

brooklyn.jclouds.hpcloud-compute.identity = richard@XXXXXXXXXXXX-tenant1:rdowner
brooklyn.jclouds.hpcloud-compute.credential = <password I log in to the web console with>

The "identity" part is two parts separated by :

The first part is the "project name", which you can get from this page: https://account.hpcloud.com/projects

The second part is the username that I use to log in to the web console.

Also make sure that there's no other *.identity or *.credential lines in brooklyn.properties that may be overriding this one.

Hopefully this should get you through. If there's still an issue, then maybe HPCloud have changed something for newer accounts, and we'll debug it in more detail.

Molnár Mihály László

unread,
Oct 22, 2013, 9:58:32 AM10/22/13
to brookly...@googlegroups.com, David Toy
Hi all!

I managed to connect HPCloud and create vm by replacing tenantid with my project/tenant name. This way there is no auth error. I used the id but i dont know why.... HP is working fine now.

The other one. I checked out that when I create an instance from horizon it sends the network id in the rest api post. But in the rest api post sent by brooklyn/jcloud there is no network id. I have no other idea why is it working from horizon and why not from brooklyn. There is no other difference. So I looking for a way to put the network id into the request.

And thank you guys for the help! Especially for the property list!


Rusty

Molnár Mihály László

unread,
Oct 31, 2013, 9:35:55 AM10/31/13
to brookly...@googlegroups.com
Hi!

I have made it working. A lot of info can be found here and here.

Summary:
- I had to recreate the external network as it should belong to the admin tenant. In my deployment my user tenant was the owner of the external net
- jClouds seems doesn't handle floating IP well as it doesn't send anything in request body in this post: http://COMPUTEAPI/v2/TENANTID/os-floating-ips
I had to set in nova.conf default_floating_pool=ext_net. Now its okay.

Thanks for the help you provided with properties!


Rusty

David Toy

unread,
Oct 31, 2013, 12:10:45 PM10/31/13
to brookly...@googlegroups.com
Rusty,

That's great news! (Thanks for the links & apologies for missing you on irc yesterday.)

What did your brooklyn.properties look like in the end?

Out of interest (& for the next release notes) what are you doing with Brooklyn?
For example, can you share what type of application you are deploying?

Thanks,
David


Molnár Mihály László

unread,
Nov 4, 2013, 8:07:30 AM11/4/13
to brookly...@googlegroups.com
Hi David!

My property is merged from the aboves :) But here it is: http://pastebin.com/NJWAfUra

I'm writing my thesis about hybrid cloud, and I needed something that could handle multiple cloud and supports scaling. As heat didn't work in Grizzly I had to look for an external library. Thats how I ended up here.

So I would like to build something simple, like an applacation engine+db+load balancer scaling between my private and HP public cloud.
I think DB will be mysql, app engine is tomcat/glassfish/jboss, load balancer is nginx or apache. Testing is with jmeter.



Rusty

Molnár Mihály László

unread,
Nov 4, 2013, 12:46:58 PM11/4/13
to brookly...@googlegroups.com
Hi!

I have another question about the userMetadata property. (When I start it says openstack doesnt support userData)
I would like to pass a script like this:

#!/bin/bash
curl -s script.sh | /bin/bash

As you can see its a two liner. How can I pass this? Its working from Horizon. If I try it in brooklyn its says the /bin/bash=null.

Thanks for the help again!

Btw  my original problem is that I want to set my hostname. So I do this after creating the instance or the other chance I see is to inherit from the classes in the example. I tried this way because I would like to see how the elasticwebapp works. Jboss doesnt start without a resolvable hostname.



Rusty

Alex Heneveld

unread,
Nov 5, 2013, 5:22:45 AM11/5/13
to brookly...@googlegroups.com, Molnár Mihály László, Andrea Turli

Hi Rusty

How are you passing the script?� We support the following as part of location setup:

��� <location.prefix>.setup.script=<url>

e.g.

��� brooklyn.location.named.My\ HP-Cloud.setup.script=file:///path/to/script.sh

to have the given script loaded at runtime.� (You can also use classpath URLs of the form classpath:/org/acme/script.sh .)
You can also pass vars in via <location.prefix>.setup.script.vars.

However ensuring that a sensible hostname is set is a common requirement which you can have done automatically with:

��� <location.prefix>.generate.hostname=true

Andrea is the man behind all this good stuff.

HTH
Best
Alex



On 04/11/2013 17:46, Moln�r Mih�ly L�szl� wrote:
Hi!

I have another question about the userMetadata property. (When I start it says openstack doesnt support userData)
I would like to pass a script like this:

#!/bin/bash
curl -s script.sh | /bin/bash

As you can see its a two liner. How can I pass this? Its working from Horizon. If I try it in brooklyn its says the /bin/bash=null.

Thanks for the help again!

Btw� my original problem is that I want to set my hostname. So I do this after creating the instance or the other chance I see is to inherit from the classes in the example. I tried this way because I would like to see how the elasticwebapp works. Jboss doesnt start without a resolvable hostname.



Rusty




Rusty




Rusty




Rusty


The first part is the "project name", which you can get from this page:�https://account.hpcloud.com/projects

The second part is the username that I use to log in to the web console.

Also make sure that there's no other *.identity or *.credential lines in brooklyn.properties that may be overriding this one.

Hopefully this should get you through. If there's still an issue, then maybe HPCloud have changed something for newer accounts, and we'll debug it in more detail.

On 22 October 2013 12:55, David Toy <davi...@cloudsoftcorp.com> wrote:
Hi Rusty,

While I'm not a power user like Richard or Alex, I do help with the docs.

I've been pulling brooklyn.properties options together in a spreadsheet in preparation for writing something comprehensive. Perhaps this will be useful in this raw form https://docs.google.com/a/cloudsoftcorp.com/spreadsheet/ccc?key=0Avy7Tdf2EOIqdGQzSlNiT2M0V19SejBScDhSdzMtT2c#gid=0

Regarding IPs, there is an OpenStack specific option -�auto-create-floating-ips - which Alex sets to false. Does setting this to true resolve your problem?

Thanks,
David






Rusty




Rusty



Hi Rusty,

your settings look right.� depending what the other end is doing you might need some other options however.� fwiw here is what i use:

��� brooklyn.location.named.hpcloud-compute-at=jclouds:openstack-nova:https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0
��� brooklyn.location.named.hpcloud-compute-at.identity=al...@cloudsoftcorp.com-tenant1:al...@cloudsoftcorp.com
��� brooklyn.location.named.hpcloud-compute-at.credential=p4ssw0rd
��� # configure login because this is not correctly autodetected
��� brooklyn.location.named.hpcloud-compute-at.privateKeyFile=~/.ssh/id_rsa
��� brooklyn.location.named.hpcloud-compute-at.loginUser=ubuntu
��� # set this to true in some openstacks to get public IP's automatically assigned
��� brooklyn.location.named.hpcloud-compute-at.jclouds.openstack-nova.auto-create-floating-ips=false
��� # optional to re-use the same keypair and security groups
��� brooklyn.location.named.hpcloud-compute-at.jclouds.openstack-nova.auto-generate-keypairs=false
��� brooklyn.location.named.hpcloud-compute-at.securityGroups=universal
��� brooklyn.location.named.hpcloud-compute-at.keyPair=mykeypair
��� brooklyn.location.named.hpcloud-compute-at.loginUser.privateKeyFile=~/.ssh/hpcloud-mykeypair.pem


this blog might be helpful:



re images -- if you set an imageId property that will use the image.

however as you say, this is not very portable, so our common approrach is to use a plain linux image, and install what is needed.� that's what the entities like nginx etc do, so that they can run in any cloud.� as an optimisation once it's working you can plug in a different "driver" which uses a known imageId to skip software installation (or take a snapshot from creation of the first instance of an entity and use that for subsequent instances, i.e. writing code to do exactly the behaviour you want).


HTH
--A



On 26/09/2013 09:42, Richard Downer wrote:
Hi Rusty,

You can set an endpoint with this property:

brooklynjclouds.openstack-nova.endpoint = http://keystone-url/v2

For your question about using images pre-installed with your application, I'm not sure of the answer to that. I'll see what I can find out.

Richard.

On 25 September 2013 18:06, Moln�r Mih�ly L�szl� <laci...@gmail.com> wrote:
Hi Richard!

Thanks a lot for the quick answer. I will try it tomorrow.

I think OpenStack is similar. According to this - http://jclouds.incubator.apache.org/documentation/quickstart/openstack/ , I think it should look like this:
brooklyn.jclouds.openstack-nova.identity = 1234567890:johndoe
brooklyn.jclouds.openstack-nova.credential = p4ssw0rd

But somehow I have to configure my own endpoint/api url. Is there any chance that this could work?:
brooklyn.location.named.MyOpenStack = jclouds:openstack-nova:https://apiurl:port/v2

How about more images? If I have prepared images as the docs says, for example one for nginx and one for the webapplication so I can speed up deployment.
I'm still just checking out the docs and examples, but is there any example for how to use these images? I think I have to create my own entity and there specify the image, read from property and then the other activities.
Or I have to create new location for every image?

Thanks again!
Rusty

On Wed, Sep 25, 2013 at 6:40 PM, Richard Downer <richard...@cloudsoftcorp.com> wrote:
OK, so I've tried it out - I got one thing wrong, and my suspicions about needing to supply image IDs were correct.

My mistake is with the identity - it's not the project/tenant ID, it's the project/tenant *name* that needs to be given. You can find your project name on this page:�https://account.hpcloud.com/projects

So you will need to add this to brooklyn.properties:

brooklyn.jclouds.hpcloud-compute.identity = projectname:username
brooklyn.jclouds.hpcloud-compute.credential = password

Regarding step 2, I've looked up the image IDs for Ubuntu 12.04 LTS, and these should work:

brooklyn.location.named.HP\ Cloud\ Arizona-1 = jclouds:hpcloud-compute:az-1.region-a.geo-1
brooklyn.location.named.HP\ Cloud\ Arizona-1.imageId = az-1.region-a.geo-1/75845
brooklyn.location.named.HP\ Cloud\ Arizona-1.user = ubuntu
brooklyn.location.named.HP\ Cloud\ Arizona-2 = jclouds:hpcloud-compute:az-2.region-a.geo-1
brooklyn.location.named.HP\ Cloud\ Arizona-2.imageId = az-1.region-a.geo-2/67074
brooklyn.location.named.HP\ Cloud\ Arizona-2.user = ubuntu
brooklyn.location.named.HP\ Cloud\ Arizona-3 = jclouds:hpcloud-compute:az-3.region-a.geo-1
brooklyn.location.named.HP\ Cloud\ Arizona-3.imageId = az-1.region-a.geo-3/48335
brooklyn.location.named.HP\ Cloud\ Arizona-3.user = ubuntu

I've tested out an app in az-1 but haven't yet tried the rest (I'm not expecting any more problems, however.)

I'll get the rest of the IDs checked tomorrow, and will work to get the HP Cloud config into the shipped brooklyn.properties.

Shout back if you're seeing any problems.

Cheers,
Richard.

On 25 September 2013 17:02, Richard Downer <richard...@cloudsoftcorp.com> wrote:
Hi Rusty. Welcome to brooklyn :)

HP Cloud should certainly be compatible with brooklyn. I'll give a try shortly to confirm, but here's what I think *should* work.

Firstly you need to define your identity and credential (these are jclouds terms; jclouds is the library that brooklyn uses to do the work of talking to all the different cloud providers.) For HP Cloud, the identity is in the form "tenantid:username". You can get your tenant ID (also known as project ID) from this page:�https://account.hpcloud.com/account/api_keys. Username is the same username you use to log in to the web console. The credential is your web console password.

You then add these to brooklyn.properties like this:

brooklyn.jclouds.hpcloud-compute.identity = 1234567890:johndoe
brooklyn.jclouds.hpcloud-compute.credential = p4ssw0rd

Step 2 is to define named locations for the HP Cloud compute zones. This should do it:

brooklyn.location.named.HP\ Cloud\ Arizona-1 = jclouds:hpcloud-compute:az-1.region-a.geo-1
brooklyn.location.named.HP\ Cloud\ Arizona-2 = jclouds:hpcloud-compute:az-2.region-a.geo-1
brooklyn.location.named.HP\ Cloud\ Arizona-3 = jclouds:hpcloud-compute:az-3.region-a.geo-1

That should be enough to get things going - with this information, brooklyn should be able to log in to your HP Cloud account and start VMs in the different regions. However we sometimes find that it's best to give brooklyn specific image IDs, rather than letting jclouds pick an image ID for us (you can see this has been done for the various Amazon EC2 zones) - we may need to log into doing this for HPCloud, too.

As I said, this *should* work but I haven't tried this yet. I will give it a go shortly, and post a correction if I'm wrong :)



On 25 September 2013 16:36, Mih�ly L�szl� Moln�r <laci...@gmail.com> wrote:
Hi All!

I'm new to brooklyn and I think I will have some question.

The first one, is that in brooklyn.properties I don't see any example for HP Cloud or OpenStack, just only this:

# brooklyn.location.named.HP = jclouds:hpcloud-compute

So my question is how to setup HP and OpenStack cloud in brooklyn.properties and how to use them, because every example for AWS as I can see.

My goal is to make a system which scales from my private OpenStack cloud to public HP.

Thanks for your help!

Rusty

--
You received this message because you are subscribed to the Google Groups "brooklyn-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brooklyn-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Richard Downer � Principal Software Engineer � Cloudsoft Corporation � http://www.cloudsoftcorp.com
Skype richardcloudsoft � Twitter @FrontierTown



--
Richard Downer � Principal Software Engineer � Cloudsoft Corporation � http://www.cloudsoftcorp.com
Skype richardcloudsoft � Twitter @FrontierTown
--
You received this message because you are subscribed to the Google Groups "brooklyn-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brooklyn-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "brooklyn-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brooklyn-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Richard Downer � Principal Software Engineer � Cloudsoft Corporation � http://www.cloudsoftcorp.com
Skype richardcloudsoft � Twitter @FrontierTown
--
You received this message because you are subscribed to the Google Groups "brooklyn-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brooklyn-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "brooklyn-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brooklyn-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "brooklyn-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brooklyn-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




--
Richard Downer � Principal Software Engineer � Cloudsoft Corporation � http://www.cloudsoftcorp.com
Skype richardcloudsoft � Twitter @FrontierTown
--
You received this message because you are subscribed to the Google Groups "brooklyn-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brooklyn-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "brooklyn-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brooklyn-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "brooklyn-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brooklyn-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


--

Sam Corbett

unread,
Nov 5, 2013, 10:14:07 AM11/5/13
to brookly...@googlegroups.com
Although "CUSTOM_MACHINE_SETUP_SCRIPT_URL" leads you to believe the key accepts a URL, I believe it only accepts paths to files on your local disk, without the file:// prefix.

Here's the relevant code from JcloudsLocation:

if(Strings.isNonBlank(setupScript)) {
��� String setupVarsString = ...;
��� Map<String, String> substitutions = ..;
��� String script = TemplateProcessor.processTemplate(setupScript, substitutions);
��� sshMachineLocation.execCommands("Customizing node " + this, ImmutableList.of(script));
}

TemplateProcessor.processTemplate only accepts references to files. It's been on my list to alter for a while.

Sam

Molnár Mihály László

unread,
Nov 5, 2013, 10:43:07 AM11/5/13
to brookly...@googlegroups.com
Hi!

Thanks for the help.
This works: <location.prefix>.generate.hostname=true

But if I want to pass my script even with file:/// or classpath:/ it throws file not found exception.

Is there a way to tell nginx to use the internal IP address of jboss? It's an unnecessary overhead to use a floating IP to access another instance in the same subnet.

Thanks!


Rusty


On Tue, Nov 5, 2013 at 4:14 PM, Sam Corbett <sam.c...@cloudsoftcorp.com> wrote:
Although "CUSTOM_MACHINE_SETUP_SCRIPT_URL" leads you to believe the key accepts a URL, I believe it only accepts paths to files on your local disk, without the file:// prefix.

Here's the relevant code from JcloudsLocation:

if(Strings.isNonBlank(setupScript)) {
    String setupVarsString = ...;

    Map<String, String> substitutions = ..;
    String script = TemplateProcessor.processTemplate(setupScript, substitutions);
    sshMachineLocation.execCommands("Customizing node " + this, ImmutableList.of(script));
}

TemplateProcessor.processTemplate only accepts references to files. It's been on my list to alter for a while.

Sam

On 05/11/2013 10:22, Alex Heneveld wrote:

Hi Rusty

How are you passing the script?  We support the following as part of location setup:

    <location.prefix>.setup.script=<url>

e.g.

    brooklyn.location.named.My\ HP-Cloud.setup.script=file:///path/to/script.sh

to have the given script loaded at runtime.  (You can also use classpath URLs of the form classpath:/org/acme/script.sh .)

You can also pass vars in via <location.prefix>.setup.script.vars.

However ensuring that a sensible hostname is set is a common requirement which you can have done automatically with:

    <location.prefix>.generate.hostname=true

Andrea is the man behind all this good stuff.

HTH
Best
Alex


On 04/11/2013 17:46, Molnár Mihály László wrote:
Hi!

I have another question about the userMetadata property. (When I start it says openstack doesnt support userData)
I would like to pass a script like this:

#!/bin/bash
curl -s script.sh | /bin/bash

As you can see its a two liner. How can I pass this? Its working from Horizon. If I try it in brooklyn its says the /bin/bash=null.

Thanks for the help again!

Btw  my original problem is that I want to set my hostname. So I do this after creating the instance or the other chance I see is to inherit from the classes in the example. I tried this way because I would like to see how the elasticwebapp works. Jboss doesnt start without a resolvable hostname.

Alex Heneveld

unread,
Nov 5, 2013, 10:53:52 AM11/5/13
to brookly...@googlegroups.com, Molnár Mihály László

Hi Rusty-

Turns out the setup.script config requires a path on the local file system, not a URL -- which is what Sam was saying.  This is probably a trivial fix in the code -- using ResourceUtils.getResourceAsString -- if we can tempt you to come over to the dark side ie brookl...@googlegroups.com !  Alternatively try dropping the file:// prefix and just use an absolute path.

To point nginx at the internal IP, which is a more efficient model (and what we do in production clusters), you'll want to set the config key AbstractController.HOSTNAME_SENSOR on Nginx (or the ControlledDynamicWebAppCluster if that is what you are using) equal to Attributes.SUBNET_HOSTNAME.  Again this would be a nice thing to make the default.  (You may need 0.6.0-rc.1 for this BTW.)

Best
Alex

Molnár Mihály László

unread,
Nov 5, 2013, 11:27:25 AM11/5/13
to brookly...@googlegroups.com
Hi Alex!

I tried like this: file:///home/user/sethostname.sh and this gave me a filenotfoundexc

Ok, I subbed to dev list too. So if I have programming questions, like with entities or policer I should write there?

Until now I have been trying to setup my OpenStack and HP Cloud to work with the examples so I dont have any specific knowledge using the actual library. I will try to setup what you sent. Thank you for it.



Rusty

Molnár Mihály László

unread,
Nov 5, 2013, 12:12:46 PM11/5/13
to brookly...@googlegroups.com
Hi!

2013-11-05 17:58:21,492 WARN  Deprecated use of old-style entity construction for brooklyn.entity.webapp.ControlledDynamicWebAppClusterImpl; instead use EntityManager().createEntity(spec)
2013-11-05 17:58:21,531 WARN  Unsupported flags when configuring ControlledDynamicWebAppClusterImpl{id=FYBpiO6g}; ignoring: {member.sensor.hostname=Sensor: host.subnet.hostname (java.lang.String)}

I got these warns. I modified the example only a little:

DynamicFabric webFabric = addChild(EntitySpec.create(DynamicFabric.class)
                .displayName("Web Fabric")
                .configure(DynamicFabric.FACTORY, new ElasticJavaWebAppService.Factory()
                        .configure(AbstractController.HOSTNAME_SENSOR, Attributes.SUBNET_HOSTNAME))

               
                //specify the WAR file to use
                .configure(ElasticJavaWebAppService.ROOT_WAR, WAR_PATH)
               
                //load-balancer instances must run on 80 to work with GeoDNS (default is 8000)
                .configure(AbstractController.PROXY_HTTP_PORT, PortRanges.fromInteger(80)));

Everything else is the same as in the GlobalWebFabricExample and I use rc1

Thanks!


Rusty

David Toy

unread,
Nov 5, 2013, 12:18:46 PM11/5/13
to brookly...@googlegroups.com
Hi Rusty!

Just to be clear on the startup script issue, you tried this:
<location.prefix>.setup.script = file:///home/user/sethostname.sh

Did you also try this?
<location.prefix>.setup.script = /home/user/sethostname.sh 
# (no file://)


Thanks,
David

Molnár Mihály László

unread,
Nov 5, 2013, 12:56:17 PM11/5/13
to brookly...@googlegroups.com
Hi David!

I promise I tried, but it was maybe with M2. Now its working. I was trying for a while to get this working and I dont think I mistyped anything as I set it in the property many times. It always dropped an exception.

Here is the script btw: http://home.sch.bme.hu/~rusty/upload/sethostname.sh

Thanks!


Rusty

Molnár Mihály László

unread,
Nov 6, 2013, 8:48:47 AM11/6/13
to brookly...@googlegroups.com
Hi!

Back to the IP problem.

I configured the ElasticJavaWebAppService, while I should have configured the webfabric:


DynamicFabric webFabric = addChild(EntitySpec.create(DynamicFabric.class)
                .displayName("Web Fabric")
                .configure(DynamicFabric.FACTORY, new ElasticJavaWebAppService.Factory())
                .configure(AbstractController.HOSTNAME_SENSOR, Attributes.SUBNET_ADDRESS)

                //specify the WAR file to use
                .configure(ElasticJavaWebAppService.ROOT_WAR, WAR_PATH)
               
                //load-balancer instances must run on 80 to work with GeoDNS (default is 8000)
                .configure(AbstractController.PROXY_HTTP_PORT, PortRanges.fromInteger(80)));

Thanks Alex for the hint!


Rusty

Molnár Mihály László

unread,
Nov 18, 2013, 5:54:42 PM11/18/13
to brookly...@googlegroups.com
Hi!

Back to the network defining problem a little. Everett from jclouds list pointed me to the jcloud method for configuring network for OpenStack:
https://github.com/jclouds/jclouds/blob/master/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/options/CreateServerOptions.java#L475

Is this available through brooklyn like in properties or other way? It isn't necessary for me at the moment but it can be useful later.

Thank you guys!


Rusty

andrea...@gmail.com

unread,
Nov 21, 2013, 2:54:02 AM11/21/13
to brookly...@googlegroups.com
Hi Rusty,

can you summarize what are you trying to achieve?

To give you a little context, at the moment Brooklyn exposes this subset of jclouds properties
https://github.com/brooklyncentral/brooklyn/blob/master/locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsLocation.java#L611

These properties needs to be TemplateOptions (or its extensions), as Brooklyn is supporting the jclouds abstract model.
For example, Brooklyn can certainly supports the options coming from NovaTemplateOptions, like it does for AUTO_GENERATE_KEYPAIRS and AUTO_CREATE_FLOATING_IPS from
https://github.com/jclouds/jclouds/blob/master/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/options/NovaTemplateOptions.java

but CreateServerOptions.java is too Nova specific as far as I can see.

In other words, Brooklyn will ultimately use NovaComputeServiceAdapter.createNodeWithGroupEncodedIntoName(String group, String name,
Template template)
(see https://github.com/jclouds/jclouds/blob/master/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/NovaComputeServiceAdapter.java#L101-L139) where the TemplateOptions are converted to CreateServerOptions, but in this method the networks are not considered explicitly.

I hope this helps you.

Please let us know what you need to do and will try to figure it out.

Thanks,
Andrea

Aled Sage

unread,
Nov 21, 2013, 6:48:06 AM11/21/13
to brookly...@googlegroups.com
Hi,

It's also possible to use the JcloudsLocationCustomizer [1] to add to
the jclouds template/options setup, for things not exposed in the
properties.

This approach allows you to write some custom code to interact directly
with the jclouds objects, and to specify in properties (or code) user
JcloudsLocationCustomizer that should be used.

However, we're currently reviewing this approach - though useful, the
set of interception points aren't rich enough and it isn't clear enough
exactly when these methods get called during the provisioning lifecycle.
Any feedback you have on that is gratefully received!

Aled

[1]
https://github.com/brooklyncentral/brooklyn/blob/master/locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsLocationCustomizer.java

Molnár Mihály László

unread,
Nov 25, 2013, 3:47:54 PM11/25/13
to brookly...@googlegroups.com
Hi,

thanks for the answers. For now it's not a real problem for me because 'my tenant' has only one network. But if in openstack a tenant has more networks and in the instance creation request there is no network defined, then the instance is part of all the networks which is not ideal I think.
I had this problem, because I had misconfiguration in my openstack deployment, but as it is fixed I don't have to use a workaround from brooklyn/jclouds. But in future projects it can be useful.

Thanks again!


Rusty


--
You received this message because you are subscribed to the Google Groups "brooklyn-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brooklyn-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages