[jira] [Commented] (BROOKLYN-217) Support for SaltStack

2016-02-03 Thread Geoff Macartney (JIRA)

[ 
https://issues.apache.org/jira/browse/BROOKLYN-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15130693#comment-15130693
 ] 

Geoff Macartney commented on BROOKLYN-217:
--

I have done some more work on the Saltstack integration.  There are a number of 
things still do to but I think it is at the stage where it is worth a pull 
request for review and test.  I have created a pull request for brooklyn-server:

https://github.com/apache/brooklyn-server/pull/4

and added some documentation in 

https://github.com/apache/brooklyn-docs/pull/9

The code at present provides support for Salt in masterless mode only, reading 
Salt formulas and Pillar data and using them to set up a Brooklyn node.  There 
are a number of things still to do here:

* if salt-call --local is used it may be better (just in MASTERLESS mode) to 
pass '-X' to install_salt.sh
* add config for using a proxy via download '-H' flag with install_salt.sh
* add a Salt resolver
* master mode
* testing on a range of platforms (so far tested on Ubuntu in both 'bring your 
own node' and cloud).
* testing with a wider range of formulas (so far tested with Apache and MySQL 
formulas)



> Support for SaltStack
> -
>
> Key: BROOKLYN-217
> URL: https://issues.apache.org/jira/browse/BROOKLYN-217
> Project: Brooklyn
>  Issue Type: Improvement
>Reporter: Hadrian Zbarcea
>Assignee: Hadrian Zbarcea
> Fix For: 0.9.0
>
>
> SaltStack is a popular configuration management tool.
> SaltStack would rapidly extend its support for managing services in a cloud 
> infrastructure by using SaltStack master/minions and leveraging SaltStack 
> formulas. SaltStack grains provide metrics about hosts and installation and 
> would be a good source of sensors.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (BROOKLYN-217) Support for SaltStack

2016-01-27 Thread Geoff Macartney (JIRA)

[ 
https://issues.apache.org/jira/browse/BROOKLYN-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15119277#comment-15119277
 ] 

Geoff Macartney commented on BROOKLYN-217:
--

Adding link to my branch - 
https://github.com/geomacy/incubator-brooklyn/tree/salt-entity.  Note thought 
that I don't feel this is ready for a pull request yet.

> Support for SaltStack
> -
>
> Key: BROOKLYN-217
> URL: https://issues.apache.org/jira/browse/BROOKLYN-217
> Project: Brooklyn
>  Issue Type: Improvement
>Reporter: Hadrian Zbarcea
>Assignee: Hadrian Zbarcea
> Fix For: 0.9.0
>
>
> SaltStack is a popular configuration management tool.
> SaltStack would rapidly extend its support for managing services in a cloud 
> infrastructure by using SaltStack master/minions and leveraging SaltStack 
> formulas. SaltStack grains provide metrics about hosts and installation and 
> would be a good source of sensors.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (BROOKLYN-217) Support for SaltStack

2016-01-20 Thread Geoff Macartney (JIRA)

[ 
https://issues.apache.org/jira/browse/BROOKLYN-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15108288#comment-15108288
 ] 

Geoff Macartney commented on BROOKLYN-217:
--

hi [~hzbar...@gmail.com]

I agree that a driver based implementation would be useful, this would also let 
us take advantage of some of the utilities available to drivers, like script 
execution. I will look at adding that and also your other bullets above, and 
what can be done about freshening up the structure of the test code.

Geoff

> Support for SaltStack
> -
>
> Key: BROOKLYN-217
> URL: https://issues.apache.org/jira/browse/BROOKLYN-217
> Project: Brooklyn
>  Issue Type: Improvement
>Reporter: Hadrian Zbarcea
>Assignee: Hadrian Zbarcea
> Fix For: 0.9.0
>
>
> SaltStack is a popular configuration management tool.
> SaltStack would rapidly extend its support for managing services in a cloud 
> infrastructure by using SaltStack master/minions and leveraging SaltStack 
> formulas. SaltStack grains provide metrics about hosts and installation and 
> would be a good source of sensors.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (BROOKLYN-217) Support for SaltStack

2016-01-19 Thread Hadrian Zbarcea (JIRA)

[ 
https://issues.apache.org/jira/browse/BROOKLYN-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15107864#comment-15107864
 ] 

Hadrian Zbarcea commented on BROOKLYN-217:
--

Hi [~geomacy],

I looked at your branch, looks great. Here are some comments:
* agree that startWithSshAsync could be better organized. I actually wonder if 
it's not better to move back to a Driver based implementation vs 
SaltLifecycleEffectorTasks
* the leftover files from my previous attempts can be removed, obviously
* when installing you may add a check if the salt-call executable is present 
(if so skip install)
* if {{salt-call --local}} is used it may be better (just in MASTERLESS mode) 
to pass '-X' to install_salt.sh
* we could add config for using a proxy via download '-H' flag with 
install_salt.sh

This latter part is something that concerns me a bit. My previous impl was 
installing the salt-minion and salt-ssh packages via the package manager 
configured with the system. Downloading the bootstrap script from the net may 
not be an option for many environments behind a firewall. This is not just a 
salt entity issue but a more general one.

The SimultatedLocation is useless in this context in the SaltIntegrationTest. 
The desire was to allow more support for testing without using a more real 
location. The rule for DriverInferenceForSimulatedLocation was needed in the 
Driver based implementation, but useless now. On a side note, the code is split 
between the o.a.b.cm.salt and o.a.b.cm.salt.impl packages. The rationale was 
that best practices in OSGi dictate to hide implementation as private package 
as much as possible. A driver inference rule would be needed for that if we 
were to move to that kind of model across the board.

Back to effectors, I think the "apply" effector makes sense. Sensors, yeah, not 
sure, but more could be added later.





> Support for SaltStack
> -
>
> Key: BROOKLYN-217
> URL: https://issues.apache.org/jira/browse/BROOKLYN-217
> Project: Brooklyn
>  Issue Type: Improvement
>Reporter: Hadrian Zbarcea
>Assignee: Hadrian Zbarcea
> Fix For: 0.9.0
>
>
> SaltStack is a popular configuration management tool.
> SaltStack would rapidly extend its support for managing services in a cloud 
> infrastructure by using SaltStack master/minions and leveraging SaltStack 
> formulas. SaltStack grains provide metrics about hosts and installation and 
> would be a good source of sensors.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (BROOKLYN-217) Support for SaltStack

2016-01-19 Thread Geoff Macartney (JIRA)

[ 
https://issues.apache.org/jira/browse/BROOKLYN-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15107110#comment-15107110
 ] 

Geoff Macartney commented on BROOKLYN-217:
--

hi Hadrian.  As an initial step I have been looking at getting a 'masterless' 
mode going.

My thoughts on the steps for this are to:

* Update SaltEntity/SaltSshTasks to install Salt itself
* Update SaltLifecycleEffectorTasks to set ‘local’ file client mode in Salt 
config
* Add task to generate a ‘top.sls’ file from run list of states
* Update SALT_FORMULAS config flag to support download and install of Salt 
formulas to /srv/formulas. (Provides ability for clients to configure their own 
custom states.)
* Update 'start' to bring up all desired states using salt-call --local. 
* Add sensors to give overview of applied states

I took your 'saltier' branch and added initial support for the above points, 
except the last one, so far.
 I have pushed this as my branch 
[salt-entity|https://github.com/geomacy/incubator-brooklyn/tree/salt-entity], 
for discussion.
 
 (Note, this runs successfully from my IDE, but having caught up to the master 
Brooklyn branch for some reason there is a build failure in the "Brooklyn QA" 
module from a maven build, which I have yet to fix.)
 
 I have tested this by deploying an apache web server using salt, with the 
following blueprint:
 
{noformat}
name: salt-test
location: byon3
services:
- type: org.apache.brooklyn.cm.salt.SaltEntity
  name: myent
  brooklyn.config:
brooklyn.salt.runList:
  - apache
brooklyn.salt.formulaUrls:
  apache: 
https://github.com/saltstack-formulas/apache-formula/archive/master.tar.gz
 {noformat}

This is very much a work in progress.  At the moment all tasks just get invoked 
from the 'startWithSshAsync()' method, but I think this could be better 
organised.  I have left them in there for the mean time as I wanted to get it 
going first.


I would like to think more about what sensors and effectors to add.  Alex 
Heneveld suggests a starting point of a single “apply”-type effector and 
“states” map sensor.  I will have a look into that and will make notes on other 
potentially useful sensors/effectors.


> Support for SaltStack
> -
>
> Key: BROOKLYN-217
> URL: https://issues.apache.org/jira/browse/BROOKLYN-217
> Project: Brooklyn
>  Issue Type: Improvement
>Reporter: Hadrian Zbarcea
>Assignee: Hadrian Zbarcea
> Fix For: 0.9.0
>
>
> SaltStack is a popular configuration management tool.
> SaltStack would rapidly extend its support for managing services in a cloud 
> infrastructure by using SaltStack master/minions and leveraging SaltStack 
> formulas. SaltStack grains provide metrics about hosts and installation and 
> would be a good source of sensors.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (BROOKLYN-217) Support for SaltStack

2016-01-18 Thread Hadrian Zbarcea (JIRA)

[ 
https://issues.apache.org/jira/browse/BROOKLYN-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15106161#comment-15106161
 ] 

Hadrian Zbarcea commented on BROOKLYN-217:
--

I have a few branches on my 
[{{fork}}|https://github.com/hzbarcea/incubator-brooklyn] trying a few 
approaches to SaltStack integration. A more complex one is the 
{{salt-location}} branch, but I abandoned it in favor of a simple approach on 
the [{{saltier}}|https://github.com/hzbarcea/incubator-brooklyn/tree/saltier] 
branch.

The premise is to support 4 modes:
* MASTER - a salt master entity
* MINION - a salt minion entity (running with {{file_client: remote}})
* MASTERLESS - a salt minion entity (running with {{file_client: local}}) using 
salt-call
* AGENTLESS - a salt entity using {{salt-ssh}}


> Support for SaltStack
> -
>
> Key: BROOKLYN-217
> URL: https://issues.apache.org/jira/browse/BROOKLYN-217
> Project: Brooklyn
>  Issue Type: Improvement
>Reporter: Hadrian Zbarcea
>Assignee: Hadrian Zbarcea
> Fix For: 0.9.0
>
>
> SaltStack is a popular configuration management tool.
> SaltStack would rapidly extend its support for managing services in a cloud 
> infrastructure by using SaltStack master/minions and leveraging SaltStack 
> formulas. SaltStack grains provide metrics about hosts and installation and 
> would be a good source of sensors.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)