Project

General

Profile

Actions

User story #3152

closed

Create a migration script to change the stored internal Rudder variables from ${xxx.yyy} to ${rudder.xxxx.yyyy}

Added by Nicolas CHARLES over 11 years ago. Updated about 9 years ago.

Status:
Released
Priority:
1
Category:
Packaging
Target version:
UX impact:
Suggestion strength:
User visibility:
Effort required:
Name check:
Fix check:
Regression:

Description

We are changing the format of our internal Rudder variables that designates others "object" in Rudder (nodes, group, policyserver) from ${xxx.yyy} to ${rudder.xxx.yyy}

Some values already exists in the LDAP tree, and need to be migrated :
- in the user defined directive, some may exists if an exerienced user used them
- in the System directive (they are mandatory there, and always exists)

The migration script should :
  1. check in the system directives DN: directiveId=common-root,activeTechniqueId=common,techniqueCategoryId=Rudder Internal,techniqueCategoryId=Active Techniques,ou=Rudder,cn=rudder-configuration if there are values that starts with ${rudder.*}. If so, exit
  2. update the variables ${X} where X doesn't starts by rudder to ${rudder.X} in the DN: techniqueCategoryId=Active Techniques,ou=Rudder,cn=rudder-configuration subtree, EXCEPT in techniqueCategoryId=Rudder Internal,techniqueCategoryId=Active Techniques,ou=Rudder,cn=rudder-configuration
  3. update the variables ${X} where X doesn't starts by rudder to ${rudder.X} in the techniqueCategoryId=Rudder Internal,techniqueCategoryId=Active Techniques,ou=Rudder,cn=rudder-configuration

This script should hence be reentrant.

The script will actually be implemented as a Rudder web application boot-time check, i.e. a Scala function executed each time Rudder webapp is started.


Files

migration_test.sh (2.57 KB) migration_test.sh Matthieu CERDA, 2013-01-14 14:43
Actions

Also available in: Atom PDF