i am not familiar with Puppet beyond knowing what it is...
can you give more precise description what od you want to do, and current api's are not supporting that for you?
just for info, one cli is just getting better at if/else scripts https://github.com/jbossas/jboss-as/pull/2571
What kind of API is current puppet integration using? REST/JSON? or something else? and how is it written? as you can access every information trought scripting...
Thanks for the reply Tomaz.
The CLI would be the ideal option - puppet is written in Ruby but it's very straightforward to write shell scripts, so could connect to the CLI and run commands from files etc. Using the CLI would also protect the config file to some extent.
Forgive me if this is obvious stuff to some, but:
Puppet really has three main functions (it will for us anyway):
a) building servers
b) applying updates/ changes to servers
c) ensuring all servers are configured the same way, by correcting any deviations that occur on servers.
You could acheive a) by writing a pile of shell scripts and jboss CLI scripts to configure a server. It's a bit brittle, but it can work (with some manual intervention).
You could acheive b) by writing another set of shell scripts for each update, and applying them to each server. All changes would also need to be applied in sequence to the output of a) for any new builds.
I'm not sure how you acheive c). You rely on a) and b) working flawlessly and then you prevent anyone from changing anything.
The beauty of puppet is that it describes the desired state of the server, and applies whatever changes are necessary for that particular server to get it to this desired state. Importantly, it does so in a fashion that is quite surgical - it won't blat a new config file over the top of an old one (unless you want it to) - it allows you to change parts of a file, so you could have a server running one app, with its config, a separate server running another app, with its config, and a server running both - with their configs side-by-side.
As you'd expect, the key is for puppet to be able to understand the desired state, the current state, and correct the differences.
For JBoss this could be: Ensure all serverXs have a particular security domain configured. If it's not there already, easy - just run an "add" script through the CLI. But what if it IS there already, but just needs another login module option adding? Running the same script as the "add" would fail because the security domain already exists.
The problem can probably be split into three separate challenges:
1) How do you describe the desired Jboss config state in a logical way
2) How do you retrieve the current state and calculate the changes that must be applied in order to get the config to match the desired state
3) how do you convert those changes into a format that can be run through the CLI.
Support for if-else in the CLI may well help for step 2 and 3, if we can figure out a way of applying it generically to the output from step 1.
Puppet integrates with a tool called Augeas which may help (it has modules for lots of other standard config files) - and it's even red-hat related from what I can tell. However it seems to operate directly on the config files, so I'm not sure it's really the way to go.
I am also looking for a solution to manage jboss with puppet over cli.
Have you found a good solution? How did you go to use cli with puppet?
I'm looking for a similar solution and what I found seems to fit the bill perfectly... didn't have an indepth look yet but gonna do it next week.
Puppi by example42 and their jboss plugin! Hope this helps you
JCliff is a project we are currently developing and using to manage our JBoss servers. It is not a puppet module, but allows one to write puppet modules to configure JBoss AS7/EAP6 using the command line client. The idea is to lay down configuration file fragments using the CLI language, and have JCliff apply those changes.
Very interesting project, I'm going to look at this
Many thanks, Alexander!
JCliff is also a very interesting project.
Does anyone have experience with a CLI Deployment Archiv?
It is very interesting to deploy the configuration with the application artifacts (Puppet could deploy the CLI artifact).
What do you think?
I don't think CLI deployment archive would be very useful if you're using something like puppet. At least in our case, we deploy multiple apps, and they share certain configuration elemens. So we use puppet to lay down Jcliff configuration files, as well as the applications themselves, and run Jcliff to keep the server config up to date, and deploy the applications.