Together with my son, I'm working on improving the Salt support in Manager 3.

The idea is inspired by SUSE OpenStack Cloud's Crowbar tool:

Provide complete formulas for setting up a certain system to perform a certain role, and expose a form to the user that allows editing user-definable parameters.

What we've accomplished so far:

  • set up Eclipse
  • git checkout of Manager 3 tree
  • Manager 3 VM
  • wire it all together (in other words we have a working development environment
  • learn how to change and add menu items and translate them
  • learn how old-style JSP pages and new-style Jade/React.js pages work in Manager 3
  • add a first new screen that shows formulas from an on-disk folder
  • add dummy pages for assigning the formulas and a placeholder for the parameter dialog

Lessons learned:

  • Don't edit the React.js bundle files. Those are generated from the source files in another folder.
  • When they tell you that your Manager may blow up if you are running new code against an old DB schema, believe them!
  • If you've messed the server up, you can recover it with a zypper up. ;-)

Update:

A much improved version of this project has made it into SUSE Manager 3 as the "Formulas with Forms" feature!


Comments

  • tdig
    almost 3 years ago by tdig | Reply

    Multi-generation hacking sounds great :)

  • joachimwerner
    almost 3 years ago by joachimwerner | Reply

    Update from today:

    • set up pgadmin to connect to the Manager database
    • define a simple JSON syntax for defining the form for the Pillar data
    • create a form generator in Javascript that renders the JSON into a form

  • joachimwerner
    almost 3 years ago by joachimwerner | Reply

    We presented our results today, and I think it's fair to say that we reached the goals we had set for this week!

    The only part we didn't figure out during the net three days of hacking was how exactly to work with the hibernate ORM. We worked around that by using plain files for the data we need to store.

    The full workflow is implemented:

    • Create a Salt formula in a folder, with two "magic files", "state.sls" (as the entry point for the formula, could also be called top.sls) and "form.json" (the JSON file that describes the input form).

    • Move the folder into the Formulas folder. This automatically registers the formula to SUSE Manager. The idea is to make these formulas pretty static and, for example, deploy them via RPM updates to the server.

    • New tab for System Groups that allows for adding a formula from the catalog. In a more refined implementation we may want to allow for more than one formula per system.

    • New tab for systems that shows the formula's form if a formula was selected for the system's group. The tab also has an Apply Highstate button.

    We built an example for a configurable web server, where the title of the page can be set via a string variable, a boolean switches on or off the copyright notice, and you can choose a theme from a pull-down.

Similar Projects

This project is one of its kind!