User story #3403
closed
User story #3231: Validation workflows for configuration related change request
Create a migration script to allow the usage of workflow in Rudder
Added by Vincent MEMBRÉ over 11 years ago.
Updated over 9 years ago.
Category:
Web - Config management
Description
Since the workflow are almost completed for 2.6.0, we know what will be important for the migration script:
One part consists in adding the new table in Rudder psql database,
the file 'dbMigration-2.5-2.6-add_workflow_support.sql' contains the following sql commands
create sequence ChangeRequestId start 1;
CREATE TABLE ChangeRequest(
id integer PRIMARY KEY default(nextval('ChangeRequestId'))
, name text CHECK (name <> '')
, description text
, creationTime timestamp with time zone
, content xml
);
CREATE TABLE Workflow(
id integer references ChangeRequest(id)
, state text
);
the other consists in handling the properties
- commenting "rudder.autoDeployOnModification" because it will not be in usage anymore
- adding the property "rudder.workflow.enabled" and set it to
- false if rudder.autoDeployOnModification was true (no workflow if change were automatically deployed)
- true if rudder.autoDeployOnModification was false
- Status changed from New to Pending technical review
- % Done changed from 0 to 100
- Pull Request set to https://github.com/Normation/rudder-packages/pull/30
Technical review contained some minor things to address. Please address comments in GitHub, and merge directly (no new review required).
- Status changed from Pending technical review to Pending release
Applied in changeset packages:commit:5bacfc252666d80930fc96605d7b9c3b828dd561.
Applied in changeset packages:commit:8dfd843e67690217ccc08d4540e88251708dc5e8.
Applied in changeset packages:commit:a402b050df284a0455dc79467e7a71d19543a2d8.
- Status changed from Pending release to Discussion
PR reviewed, corrected and merged. All good to go !
Actually, I'm sorry but this is not quite OK:
AUTODEPLOY_BOOL=$(grep rudder.autoDeployOnModification rudder-web.properties|sed "s/.*=\(.*\)/\1/")
Should be anchored with ^ regexp, this might catch comments containing that line. So :
AUTODEPLOY_BOOL=$(grep ^rudder.autoDeployOnModification rudder-web.properties|sed "s/.*=\(.*\)/\1/")
- Assignee changed from Matthieu CERDA to Jonathan CLARKE
Actually, this is not even reached in case the variable has been migrated already as this variable is set only if:
if egrep -q "^rudder.autoDeployOnModification" /opt/rudder/etc/rudder-web.properties; then
is matched. This is not really a problem then, or I am mistaken ?
- Status changed from Discussion to Pending release
Applied in changeset packages:commit:ebad935f231d0613581bfa749631f6c313b65c83.
Applied in changeset packages:commit:2b828c96b28695ec32aedfa24ccf6cd646d0722a.
- Status changed from Pending release to Released
- Tracker changed from 6 to User story
Also available in: Atom
PDF