Hi Chris,
To add to Aled's response, there's nothing inherently server-centric in 
Brooklyn's design. You can run it as a local application which will handle 
spinning up new machines, installing the software and managing it.
When launching Brooklyn just point it to the blueprint and it will take care of 
executing it. I've made a small improvement for this case at 
https://github.com/apache/incubator-brooklyn/pull/656 
<https://github.com/apache/incubator-brooklyn/pull/656>. This will instruct the 
instance to exit once the blueprint application is up and running, leaving any 
further management to you. When coupled with persisting the state, you can 
bring up the instance at any time later to let Brooklyn manage the processes 
again.

To execute a blueprint and the immediately exit, without enabling the web 
console (i.e. batch mode):

bin/brooklyn launch --app <path to blueprint> 
--exitAndLeaveAppsRunningAfterStarting --persist auto --noConsole

To start Brooklyn later, loading the application state:

bin/brooklyn launch --persist auto

This will let you monitor and manage the running entities from the web console.

Vagrant support is not currently included in Brooklyn by default, but it's 
straightforward to add it.
  * mvn clean install on https://github.com/neykov/vagrant-java-bindings 
<https://github.com/neykov/vagrant-java-bindings>
  * mvn clean install on 
https://github.com/neykov/jclouds-vagrant/tree/vagrant/vagrant 
<https://github.com/neykov/jclouds-vagrant/tree/vagrant/vagrant>
  * copy the above jars to the brooklyn's lib/dropins folder
  * download a vagrant box - vagrant box add ubuntu/trusty64
  * configure a brooklyn location:
        brooklyn.location.jclouds.vagrant.imageId=ubuntu/vivid64
        brooklyn.location.jclouds.vagrant.identity=not_used_but_required
        brooklyn.location.jclouds.vagrant.credential=not_used_but_required
  * in blueprints use "location: vagrant" or start Brooklyn with "--location 
vagrant"

It's always interesting to see the different ways Brooklyn is used, also any 
improvements or suggestions are welcome!

Svet.




> On 19.05.2015 г., at 16:35, Aled Sage <[email protected]> wrote:
> 
> Hi Chris,
> 
> Great to hear you're trying out Brooklyn!
> 
> For running Brooklyn serverless, you can either just run the Brooklyn process 
> on your laptop telling it to deploy to localhost (or to local VMs), or you 
> can interact with brooklyn programmatically to embed it.
> 
> You'll likely find the separate Brooklyn process easier to setup.
> 
> ---
> For many blueprints, they are written to be able to deploy to localhost (but 
> some require sudo rights, and passwordless ssh).
> 
> In yaml, you just say:
> 
>   location: localhost
> 
> ---
> For deploying to local VMs, note that we're using Apache jclouds under the 
> covers.
> 
> You can therefore deploy to anything that jclouds supports (and a few more 
> things).
> 
> I know that *Svet Neykov* did some work to be able to deploy to Vagrant (so 
> that it launches/terminates the VMs for you).
> 
> You can also use a "byon" location (bring your own nodes), configuring 
> Brooklyn to target existing ssh'able VMs. You just supply the IPs, username 
> and credential (if it's not your default ~/.ssh/id_rsa or ~/.ssh/id_dsa).
> 
> ---
> Lastly, you can deploy to Docker containers using the downstream Clocker 
> project [1].
> 
> ---
> Also of interest is a maven plugin that allows you to hook Brooklyn into your 
> build process.
> 
> You can use Brooklyn to spin up your multi-node app (e.g. several VMs or 
> docker containers), and inject its endpoint into a test suite. Your test 
> suite can then run against that app instance. The app will be torn down once 
> the test suite is complete.
> 
> *Sam Corbett* wrote that, and can provide more information.
> 
> Aled
> 
> [1] http://clocker.io
> 
> 
> On 19/05/2015 10:02, Christofer Dutz wrote:
>> Hi,
>> 
>> Since reviewing some of the ApacheCon submissions for ApacheCon in Austin I 
>> am pretty interested in Booklyn. Unfortunately I haven’t had the opportunity 
>> to dig deeper.
>> 
>> Now I have such an opportunity and wanted to ask if it is possible to 
>> integrate Brooklyn into my development process.
>> 
>> I know that in general Brooklyn is constructed as Server-Centric approach, 
>> but as with other sever-centric approaches there usually is some serverless 
>> mode which I could use to use Brooklyn for setting up local dev environments 
>> during development. I would expect to be able to provide a blueprint and 
>> have that executed locally, eventually setting up some vagrant vms and 
>> provisioning them.
>> 
>> Am I on a completely wrong path? Would something like this make sense, but 
>> none has built it yet? If the later is valid … need/want help with this?
>> 
>> I really like the notation and the general concept and that I can extend it 
>> with Java … this is one thing that I like most with Brooklyn :-)
>> 
>> Chris
>> 
>> 
> 

Reply via email to