Skip to content

Collect Audrey Parameters in Conductor

movitto edited this page Dec 7, 2012 · 1 revision

Collect Audrey Parameters in Conductor

SWAG Estimate

Implementation and unit tests: 2 weeks

Overview

There are three main pieces of new functionality in Conductor required to collect Audrey parameters when launching “configurable” deployables.

  1. UI Updates that present the user with input boxes corresponding to assembly parameters and a summary view of parameter values post-launch
  2. Model changes to store the parameters and collected values in the Conductor database
  3. Business logic changes to utilize the collected parameter values when sending instance configurations to the Config Server

UI Updates

There are two places where the Conductor UI will change.

  • The launch deployment page (path:/deployments/new)
  • The show instance page (path:/instances/#{ID})

Launch Deployment UI Updates

Currently, the launch deployment page shows the deployable summary information followed by a table of the assemblies in the deployable. This proposal adds text boxes, which correspond to the assemblies’ parameters, to the assembly table in order to collect the parameter values from the user. The proposed design will look like this. This example is based on this deployable XML file.

Show Instance UI Updates

The show instance page is currently an unformatted page with a simple unordered list of instance information. This proposal simply adds more items to this list to show the parameters that were collected from the user on the launch deployment page.

Model Updates

This proposal adds a new table to the Conductor DB to hold the assemblies’ parameters and values collected from the user. This table will be populated during the deployment launch process and read when the user views a single instance on the show instance page. The new table will be called “instance_parameters” and look as follows:

id int Table primary key
instance_id int FK Reference to parent instance
parameter_name String The name of the collected parameter
parameter_type String The type of the parameter (currently only supporting scalar types)
parameter_value String The collected parameter value

As more complex parameter types are supported (outside of scalar values) this design with have to be updated.

Business Logic Updates

The main business logic update is restricted to capturing the provided parameter values and updating the deployableXML document stored with the deployment. Currently, the controller behind the launch deployment page captures the deployableXML and saves it into a field on the deployment model object. This proposal will update the controller logic to updated the deployableXML with the captured parameter values.

This change has two impacts. First, the logic that iterates the assemblies in the deployableXML to create the instance records can be updated to read the parameter values directly from the updated deployableXML and create instance_parameter records. Second, the logic that iterates the deployableXML and sends instance configurations to the Audrey Config Server can be updated to find the parameter values directly in the deployableXML file.