[Rdo-list] [foreman-dev] Re: [OFI] Orchestration <-> Wizard Integration

Marek Hulan mhulan at redhat.com
Thu Mar 6 11:49:56 UTC 2014


On Wednesday 05 of March 2014 10:56:22 Jirka Tomášek wrote:
> Dne středa, 5. března 2014 17:46:03 UTC+1 Marek Hulán napsal(a):
> > On Wednesday 05 of March 2014 07:23:41 Jirka Tomášek wrote:
> > > Dne úterý, 4. března 2014 16:10:06 UTC+1 Petr Chalupa napsal(a):
> > > > Hello guys,
> > > > 
> > > > I would like to start discussion about how the integration of
> > > > Orchestration and Wizard will look like.
> > > > 
> > > > The parts are:
> > > > 1. Collecting the configuration of OS (OpenStack) infrastructure
> > > > 2. Configuring Foreman's HostGroups and other stuff based on that
> > > > configuration
> > > > 3. Orchestrate the provisioning of the whole OS infrastructure in the
> > > > right order using configured HostGroups and Dynflow.
> > > > 
> > > > I am thinking that 1. and 2. will be part of the Wizard and 3. will be
> > > > the orchestration's job.
> > > > 
> > > > I am assuming that 2. is ±simple function using seed data and
> > > > user-provided configuration that creates configured HostGroups.
> > 
> > Meaning
> > 
> > > > it does not need any of the workflow engine stuff that Dynflow
> > 
> > provides.
> > 
> > > > If so then developing these in parallel and connecting them later
> > 
> > should
> > 
> > > > be quite easy. I and Martyn can simulate the OS infrastructure
> > > > provisioning with blank hosts for now.
> > > > 
> > > > Petr
> > > 
> > > Hey,
> > > 
> > > Regarding the wizard, I have been looking around for rails solutions and
> > > Wicked gem [1] seems like something we could use for steps 1 and 2.  As
> > 
> > you
> > 
> > > said, we basically need form with several steps that gets validated and
> > > submitted.
> > > 
> > > I am not sure if Foreman already uses some kind of wizard which we might
> > > use instead of Wicked. Please let me know if there is something like
> > 
> > that.
> > 
> > > [1]
> > 
> > http://railscasts.com/episodes/346-wizard-forms-with-wicked?view=asciicast
> > 
> > > Jirka
> > 
> > Foreman does not use any 3rd party wizard tool. You can see wizard when
> > you
> > create new taxonomy (location or organization) or a good example could be
> > foreman_setup plugin [1]. So we use own helpers for that.
> > 
> > Wicked gem seems handy and have no extra dependencies so it should be easy
> > to
> > package. Code looks good, my only concern was hardcoded I18n for
> > translations.
> > I'm not sure whether it's problem or not, will look at that tomorrow.
> > 
> > [1]
> > 
> > https://github.com/theforeman/foreman_setup/blob/master/app/controllers/fo
> > reman_setup/provisioners_controller.rb
> As it seems that the wizard is going to be just a large form without need
> of saving data during the process the process, we can try to split it into
> fieldsets(wizard steps) and hide/show the steps with jquery. I'd like to
> look into that tomorrow.

I think it's generally better to save step1 before continue with step2 so you 
don't have to start again when your browser crashes (or user closes tab, 
session expires or whatever).

Anyway depending on what way we decide to implement - wicked seems as a good 
candidate for persisted wizard, I18n is used only for steps name translating 
(which is handy when you need translated routes) but that's probably not our 
case, so I18n hardcoding is not an issue.

-- 
Marek




More information about the rdo-list mailing list