You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by Andrew Kennedy <an...@cloudsoftcorp.com> on 2014/07/07 18:07:43 UTC

New Advanced Networking Project

All.

This is to announce the availability of a new advanced networking project
for Brooklyn. The project contains entities, locations and supporting code
that can be used when building new blueprints. They provide features like
subnet and CIDR based access control, port forwarding support, and allow
use of extra native features in the latest releases of CloudStack.

The main new capabilities are as follows:

- Port forwarding
- Subnet entities
- Docker port forwarding
- Load balancer entities
- Advanced CloudStack

These features are what is used to provide the transparent forwarding of
the mapped Docker ports in the Clocker project. Other examples can be found
in the live test cases, and we are working on further user documentation.
To use tthese libraries in your projects ensure that you have the Sonatype
OSS snapshot repository configured, then add one of the following
dependencies to your POM file.

For the port forwarding and subnet features, use this:

    <dependency>
        <groupId>io.brooklyn.networking</groupId>
        <artifactId>brooklyn-networking-portforwarding</artifactId>
        <version>0.7.0-SNAPSHOT</version>
    </dependency>

Or, for the CloudStack features, including the native load balancer, use
this:

    <dependency>
        <groupId>io.brooklyn.networking</groupId>
        <artifactId>brooklyn-networking-cloudstack</artifactId>
        <version>0.7.0-SNAPSHOT</version>
    </dependency>

The original code was developed by Cloudsoft, and we have released it under
the Apache 2.0 license. You can access the repository on GitHub, and clone
or fork it to make changes.

- https://github.com/brooklyncentral/advanced-networking/

We think these features will be useful to the Brooklyn user and developer
community, and we encourage people to improve and extend them.

Thanks,
Andrew.
-- 
-- andrew kennedy ? engineer : http://cloudsoftcorp.com/developers/ ;

Re: New Advanced Networking Project

Posted by Andrew Kennedy <an...@cloudsoftcorp.com>.
On 8 July 2014 21:14, Tidd, Bryan (MAN-Corporate) <Br...@manheim.com>
 wrote:
> Tried it, got an error that it was of the wrong type: Map<String, String>
is not equal to json array….

Oh, sorry. I got the YAML formatting wrong for maps, it should be like this:

locations:
- jclouds:aws-ec2:us-east-1:
    tags: "One,Two"
    userMetadata:
      "Key": "Value"
      "Meta": "Data"


I've just tested this, and it works as expected. Hope that helps...

Cheers,
Andrew.
-- 
-- andrew kennedy ? engineer : http://cloudsoftcorp.com/developers/ ;

Re: New Advanced Networking Project

Posted by Andrew Kennedy <an...@cloudsoftcorp.com>.
Bryan,

Yes it supports multiple tags, so if you set the string as "Dev,Web,Blah"
it will give you three tags. If you want key-value pairs then you need to
use the `USER_METADATA_MAP` location config key, something like this:

- jclouds:aws-ec2:eu-west-1:
  tags: "Brooklyn"
  userMetadata:
     - "Env": "Dev"
     - "Project": "Test"

So, the VMs would have "Brooklyn", "Env" = "Dev" and "Project" = "Test"
tags set. The issue with the user metadata in jclouds is that it's not
supported in as many cloud APIs as simple tags. Amzon EC2 and OpenStack
should be OK, though.

Andrew.

-- 
-- andrew kennedy ? engineer : http://cloudsoftcorp.com/developers/ ;

On 7 July 2014 20:39, Tidd, Bryan (MAN-Corporate) <Br...@manheim.com>
wrote:

>  Would STRING_TAGS support multiple key value tags?
> For example:
> Environment -> Dev
> Component -> Web
> Project -> Blah
>
>  Thoughts?
> Bryan
>
>
>   From: Andrew Kennedy <an...@cloudsoftcorp.com>
> Date: Monday, July 7, 2014 at 2:34 PM
> To: Bryan Tidd <br...@manheim.com>, "
> dev@brooklyn.incubator.apache.org" <de...@brooklyn.incubator.apache.org>
> Subject: Re: New Advanced Networking Project
>
>   Hi.
>
>  There is support for tagging in some of the jclouds APIs and providers,
> so it is certainly the sort of thing that can be pushed out from Brooklyn
> if you are using a cloud API that supports this functionality. We provide
> `STRING_TAGS` in the `JcloudsLocation` configuration if you want to tag the
> VMs for a blueprint with some pre-defined label. So, this YAML will start a
> Tomcat server and a MySQL database on VMs with the "testing" tag:
>
>   id: tagged-application
>  locations:
>  - jclouds:aws-ec2:eu-west-1:
>      tags: "testing"
>  services:
>  - serviceType: brooklyn.entity.webapp.tomcat.TomcatServer
>  - serviceType: brooklyn.entity.database.mysql.MySqlNode
>
>
>  It could also be set as part of the provisioning data for each VM
> automatically as well, if you implement `obtainProvisioningFlags()` in the
> entity, or write a `JcloudslocationCustomizer` implementation.
>
>  If you're thinking of something more than just adding a static string as
> a tag, that would also be interesting. For example, setting a complete set
> of metadata reflecting the information Brooklyn knows (application id,
> entity type, user id, activity, state and so forth) about the current
> entity onto its provisioned VM, then the VMs could be filtered and managed
> or monitored by tools operating on the underlying cloud API themselves.
>
>  It sounds like a useful feature, and would fit into the
> `advanced-networking` project. Using OpenStack and AWS EC2 only to begin to
> give us a PoC for a common private cloud API and public cloud provider.
> Something like a location customisation step, carried out when a
> `MachineProvisioningLocation` has its `obtain()` method called, to
> provision a new `SshMachineLocation` and we call the appropriate API to set
> the required tags?
>
>  Andrew.
>   --
> -- andrew kennedy ? engineer : http://cloudsoftcorp.com/developers/ ;
>
> On 7 July 2014 17:16, Tidd, Bryan (MAN-Corporate) <Br...@manheim.com>
> wrote:
>
>> Great announcement!
>>
>> One question I have is how can we implement tagging for resources deployed
>> to AWS or Openstack, etc. This is important to any enterprise
>> deployment/management.
>>
>> Thanks
>> Bryan Tidd
>> Manheim
>>
>> >
>>
>>
>

Re: New Advanced Networking Project

Posted by Andrew Kennedy <an...@cloudsoftcorp.com>.
Hi.

There is support for tagging in some of the jclouds APIs and providers, so
it is certainly the sort of thing that can be pushed out from Brooklyn if
you are using a cloud API that supports this functionality. We provide
`STRING_TAGS` in the `JcloudsLocation` configuration if you want to tag the
VMs for a blueprint with some pre-defined label. So, this YAML will start a
Tomcat server and a MySQL database on VMs with the "testing" tag:

id: tagged-application
locations:
- jclouds:aws-ec2:eu-west-1:
    tags: "testing"
services:
- serviceType: brooklyn.entity.webapp.tomcat.TomcatServer
- serviceType: brooklyn.entity.database.mysql.MySqlNode


It could also be set as part of the provisioning data for each VM
automatically as well, if you implement `obtainProvisioningFlags()` in the
entity, or write a `JcloudslocationCustomizer` implementation.

If you're thinking of something more than just adding a static string as a
tag, that would also be interesting. For example, setting a complete set of
metadata reflecting the information Brooklyn knows (application id, entity
type, user id, activity, state and so forth) about the current entity onto
its provisioned VM, then the VMs could be filtered and managed or monitored
by tools operating on the underlying cloud API themselves.

It sounds like a useful feature, and would fit into the
`advanced-networking` project. Using OpenStack and AWS EC2 only to begin to
give us a PoC for a common private cloud API and public cloud provider.
Something like a location customisation step, carried out when a
`MachineProvisioningLocation` has its `obtain()` method called, to
provision a new `SshMachineLocation` and we call the appropriate API to set
the required tags?

Andrew.
-- 
-- andrew kennedy ? engineer : http://cloudsoftcorp.com/developers/ ;

On 7 July 2014 17:16, Tidd, Bryan (MAN-Corporate) <Br...@manheim.com>
wrote:

> Great announcement!
>
> One question I have is how can we implement tagging for resources deployed
> to AWS or Openstack, etc. This is important to any enterprise
> deployment/management.
>
> Thanks
> Bryan Tidd
> Manheim
>
> >
>
>