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:
- Remove any configuration related to the Organization Service from your Agent
- Configure the Agent to use
repos.csv
anddevcenter.json
- If copying from a previous
repos.csv
file, you may need to make some minor changes to yourrepos.csv
file.
- If copying from a previous
- Remove the organization service from your system
- Ensure that your agent is using at least version
0.221.0
(to get the latest variable names included in this doc)
1. Remove any configuration related to the Organization Service from your Agent
Make sure that the following configurations are not included in your Agent run command:
- OCI Container
- Executable JAR
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 |
Arguments:
Argument Name |
---|
--moderne.agent.organization.service.url |
--moderne.agent.organization.service.skipSsl |
--moderne.agent.organization.file.reposCsvPath |
--moderne.agent.organization.commitOptionsPath |
--moderne.agent.organization.idMappingPath |
--moderne.agent.organization.devCenterPath |
--moderne.agent.organization.service.updateIntervalSeconds |
2. Configure the Agent to use repos.csv
and devcenter.json
- Copy the
devcenter.json
file from your Organization Service and put it somewhere where your Agent can access. - Follow the organizational hierarchy configuration instructions to generate a
repos.csv
. Alternatively, if your Organization Service already uses arepos.csv
, you may copy that file directly and put it somewhere where your Agent can access.- Note: There are a couple of changes you should be aware of if you previously used an Organization Service. We've documented those at the bottom of this doc.
- Update the relevant variables in your Agent deployment so that your Agent knows where these files are.
- OCI Container
- Executable JAR
Environment Variables:
Environment Variable | Default | Description |
---|---|---|
MODERNE_AGENT_ORGANIZATION_REPOSCSV | The path of your repos.csv file that provides organization information. | |
MODERNE_AGENT_ORGANIZATION_DEVCENTER | The path of your devcenter.json file that provides the DevCenter configurations. | |
MODERNE_AGENT_ORGANIZATION_UPDATEINTERVALSECONDS | 600 | Specifies 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
Arguments:
Argument Name | Default | Description |
---|---|---|
--moderne.agent.organization.reposCsv | The path of your repos.csv file that provides organization information. | |
--moderne.agent.organization.devCenter | The path of your devcenter.json file that provides the DevCenter configurations. | |
--moderne.agent.organization.updateIntervalSeconds | 600 | Specifies how often to request your organization information. |
Example:
java -jar moderne-agent-{version}.jar \
# ... Existing arguments
--moderne.agent.organization.reposCsv=/Users/MY_USER/Documents/repos.csv \
--moderne.agent.organization.devCenter=/Users/MY_USER/Documents/devcenter.json \
--moderne.agent.organization.updateIntervalSeconds=600 \
# ... Additional arguments
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:
ALL/VP/Director/Team
ALL/VP/Director
ALL/VP
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.