-
1. Re: Automated configuration management (with puppet...)
ctomc Jul 4, 2012 1:17 PM (in response to j4m3s)Hi,
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...
--
tomaz
-
2. Re: Automated configuration management (with puppet...)
j4m3s Jul 4, 2012 4:31 PM (in response to ctomc)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.
-
3. Re: Automated configuration management (with puppet...)
mark_us Jul 6, 2013 5:53 PM (in response to j4m3s)Hi James,
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?
Best Erhards
Markus
-
4. Re: Automated configuration management (with puppet...)
herwix Jul 26, 2013 7:25 PM (in response to mark_us)Hey,
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
http://www.example42.com/?q=Puppi_A_Puppet_module_for_Deployment_Automation
https://github.com/example42/puppet-jboss
Cheers, Alex
-
5. Re: Automated configuration management (with puppet...)
bserdar Aug 5, 2013 11:38 PM (in response to mark_us)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.
-
6. Re: Automated configuration management (with puppet...)
mark_us Aug 6, 2013 2:35 AM (in response to herwix)Very interesting project, I'm going to look at this
Many thanks, Alexander!
-
7. Re: Automated configuration management (with puppet...)
mark_us Aug 6, 2013 3:00 AM (in response to bserdar)Hi Burak,
JCliff is also a very interesting project.
Another thing:
Does anyone have experience with a CLI Deployment Archiv?
https://community.jboss.org/wiki/CLIDeploymentArchive
It is very interesting to deploy the configuration with the application artifacts (Puppet could deploy the CLI artifact).
What do you think?
-
8. Re: Automated configuration management (with puppet...)
bserdar Aug 6, 2013 12:40 PM (in response to mark_us)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.