Puppet module for MantisBT

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
shelltreenok
Posts: 2
Joined: 04 Jan 2016, 13:38

Puppet module for MantisBT

Post by shelltreenok »

Hello MantisBT community!

I am currently studying the possible implementation of a Puppet module for MantisBT instance deployment. For those who are not familiar with Puppet, it is an IT automation software like Chef.
The idea is to automate the deployment of software and tools using a descriptive language. Users can defined the state in which an environment/machine is to be, and Puppet ensure it is done.

What I would like to do is implement a Puppet module which can manage MantisBT installation (i.e. copy the file to a webserver) and configuration such as
projects, users and rights. For this I need to find an efficient way to manage Mantis configuration externally (via Puppet in our case).
For example, I would need to check for a Project existence, and create it if it does not exists.

So far I found the following possibilities:
  • use the MantisBT SOAP API (seems the most efficient)
  • directly query the database to update configuration related tables as wished
  • another way I did not think about?
In the end, our module would be doing the following:
  1. Ensure Apache as a web server (or another web server manageable via Puppet)
  2. Ensure MySQL as a database (or another database server manageable via Puppet)
  3. Ensure the Mantis files are available to our webserver (this can be done by Puppet)
  4. Set-up the MantisBT projects, users, rights, etc. This is where we would require the configuration to be done.
Do you think one of the solutions above would be suitable? Or another way to configure MantisBT instances externally exists?
Of course, if a module ends-up being implemented, I'll try to make it available publicly on GitHub and Puppet Forge, and I'll leave a link here ;)

Thanks by advance for your help.

Regards,
Shelltreenok
atrol
Site Admin
Posts: 8572
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Puppet module for MantisBT

Post by atrol »

Using the MantisBT SOAP API is certainly a good approach (not sure if the API will cover all functionality you need, you might also have to access the database)
You could also use PHP and the internal Mantis API.
Not sure if this would be an option as I don't known how Puppet works.

Maybe our scripts for Travis-CI to run our PHPunit tests in different environments (multiple PHP versions, different databases) can help you some way.
https://github.com/mantisbt/mantisbt/bl ... travis.yml
https://github.com/mantisbt/mantisbt/bl ... _script.sh
https://github.com/mantisbt/mantisbt/bl ... _script.sh

I recommend to write to the SOAP API Mailing List https://www.mantisbt.org/mailinglists.php if there are any SOAP related questions.
Please use Search before posting and read the Manual
atrol
Site Admin
Posts: 8572
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Puppet module for MantisBT

Post by atrol »

Please use Search before posting and read the Manual
shelltreenok
Posts: 2
Joined: 04 Jan 2016, 13:38

Re: Puppet module for MantisBT

Post by shelltreenok »

Thank you for your answers. I'll try and get going using the SOAP API.

These tests scripts are definitely useful, I re-used a similar method to run the install.php script with curl.
Post Reply