Skip to main content

Organization Service Migration

What was the Organization Service?

The Organization Service was an optional component deployed in customer environments to provide dynamic organizational hierarchies.

To simplify Moderne’s operational complexity, it was decided to sunset the Organization Service and replace it with a file-based mechanism managed directly by the Moderne Agent. This change streamlines customer deployments by reducing the number of moving parts and eliminates the need for an additional network hop whenever organizational data is accessed.

Migration instructions

To migrate from the old organization service to the new file-based configuration, you'll need to:

  1. Remove any configuration related to the Organization Service from your Agent
  2. Configure the Agent to use repos.csv and devcenter.json
    • If copying from a previous repos.csv file, you may need to make some minor changes to your repos.csv file.
  3. Remove the organization service from your system
  4. Ensure that your agent is using at least version 0.221.0 (to get the latest variable names included in this doc)

Make sure that the following configurations are not included in your Agent run command:

Variables:

Argument Name
MODERNE_AGENT_ORGANIZATION_SERVICE_URL
MODERNE_AGENT_ORGANIZATION_SERVICE_SKIPSSL
MODERNE_AGENT_ORGANIZATION_FILE_REPOSCSVPATH
MODERNE_AGENT_ORGANIZATION_FILE_COMMITOPTIONSPATH
MODERNE_AGENT_ORGANIZATION_FILE_IDMAPPINGPATH
MODERNE_AGENT_ORGANIZATION_FILE_DEVCENTERPATH
MODERNE_AGENT_ORGANIZATION_SERVICE_UPDATEINTERVALSECONDS

2. Configure the Agent to use repos.csv and devcenter.json

  1. Copy the devcenter.json file from your Organization Service and put it somewhere where your Agent can access.
  2. Follow the organizational hierarchy configuration instructions to generate a repos.csv. Alternatively, if your Organization Service already uses a repos.csv, you may copy that file directly and put it somewhere where your Agent can access.
  3. Update the relevant variables in your Agent deployment so that your Agent knows where these files are.

Environment Variables:

Environment VariableDefaultDescription
MODERNE_AGENT_ORGANIZATION_REPOSCSVThe path of your repos.csv file that provides organization information.
MODERNE_AGENT_ORGANIZATION_DEVCENTERThe path of your devcenter.json file that provides the DevCenter configurations.
MODERNE_AGENT_ORGANIZATION_UPDATEINTERVALSECONDS600Specifies how often to request your organization information.

Example:

docker run \
# ... Existing variables
-e MODERNE_AGENT_ORGANIZATION_REPOSCSV=/Users/MY_USER/Documents/repos.csv \
-e MODERNE_AGENT_ORGANIZATION_DEVCENTER=/Users/MY_USER/Documents/devcenter.json \
-e MODERNE_AGENT_ORGANIZATION_UPDATEINTERVALSECONDS=600 \
# ... Additional variables
tip

The Agent is able to fetch your repos.csv from an unauthenticated HTTP/HTTPS endpoint. To specify an endpoint instead of a local file, use a URI instead of a local file.

3. Remove the organization service from your system

This step will depend on your specific deployment topology.

Notable changes from the previous Organization Service

Organization ID changes

It's no longer possible to customize ID names via an id-mapping.txt file. Organization IDs are, instead, entirely generated from the organization names. For instance, if you have a repos.csv file that looks like this:

cloneUrl,branch,org1,org2,org3,org4
<url>,<branch>,Team,Director,VP,ALL

Then four organizations will be produced. The IDs for these organizations will be:

  1. ALL/VP/Director/Team
  2. ALL/VP/Director
  3. ALL/VP
  4. ALL

These are the IDs you'd then use in your devcenter.json file if you wanted to create DevCenters. These are also the IDs you can use with the CLI when you run commands like: mod git clone moderne <path> <moderne org id>.

Note that above command also allows you to clone orgs with just the name instead of the ID – but if multiple organizations share the same name it will then ask you to pick which one you want.

Commit option changes

It's no longer possible to define commit options on a per-org basis. Instead, you must define what commit options you want available in your agent and those commit options will be shared between all organizations.