Skip to content

socactl config

socactl config helps you manage the SOCA environment configure stored on AWS System Manager Parameter Store. Additionally, any write operation will automatically update the cache configured on SOCA to improve overall performance.

Important

It's NOT RECOMMENDED to update your configuration on AWS Parameter Store AWS console directly as the configuration values are also cached on Amazon ElastiCache.

In order to successfully update your configuration, you must also invalidate the cached value(s), which is done automatically when you use socactl config. If you are updating the AWS Parameter Store directly, make sure you manually update any relevant keys in the cache as well.

Run socactl config --help to display help message.

config get

Retrieve a configuration key

./socactl config get \
  --key "/configuration/PrivateSubnets"

['subnet-0145161ba2ffb677a', 'subnet-0102a5b1b21cb1aef', 'subnet-0bc3f861ffb2322fe']

config set

Update a configuration key value

./socactl config set \
  --key "/configuration/PrivateSubnets" \
  --value "['subnet-0145161ba2ffb677a', 'subnet-0102a5b1b21cb1aef']"

Cache updated
Success: Key has been updated successfully

Immutable Keys

You are not authorized to update the value of specific keys such as ClusterId, Region etc ...

Config Check

Any configuration update is checked and verified via cluster_manager/utils/config_checks.py and cluster_manager/utils/settings/socaconfig_key_validator.yml

config rollback

Rollback to a previous configuration.

./socactl config rollback --key "/configuration/PrivateSubnets"
No --version specified, Rollback to the previous version
RollBack to: {'Version': 1, 'Value': "['subnet-0145161ba2ffb677a', 'subnet-0102a5b1b21cb1aef', 'subnet-0bc3f861ffb2322fe']", 'LastModifiedDate': datetime.datetime(2024, 9, 23, 12, 56, 2, 767000, tzinfo=tzlocal())}
Confirm (use --force to skip)? (Yes, No): yes

Cache updated
Success: Key has been updated successfully

Rollback to specific version

You can pin a version number via --version <version_number>, otherwise it will default to the current_version - 1

config history

Get the entire history of a given configuration key

./socactl config history --key "/configuration/PrivateSubnets" --output json
{
    "3": {
        "Version": 3,
        "Value": "['subnet-0145161ba2ffb677a', 'subnet-0102a5b1b21cb1aef', 'subnet-0bc3f861ffb2322fe']",
        "LastModifiedDate": "2024-09-26 11:34:52.816000+00:00"
    },
    "2": {
        "Version": 2,
        "Value": "['subnet-0145161ba2ffb677a', 'subnet-0102a5b1b21cb1aef']",
        "LastModifiedDate": "2024-09-26 09:56:50.202000+00:00"
    },
    "1": {
        "Version": 1,
        "Value": "['subnet-0145161ba2ffb677a', 'subnet-0102a5b1b21cb1aef', 'subnet-0bc3f861ffb2322fe']",
        "LastModifiedDate": "2024-09-23 12:56:02.767000+00:00"
    }
}

config snapshot

Get the entire configuration tree of your SOCA environment

./socactl config snapshot --output json
    {
    "/cdk_completed": "true",
    "/configuration/ClusterId": "soca-mcrozes",
    "/configuration/ControllerInstanceId": "i-0f59375e417e71f4e",
    "/configuration/DCVAllowedInstances": "['m7i-flex.*', 'm7i.*', 'm6i.*', 'm6g.*', 'm5.*', 'g4dn.*', 'g4ad.*', 'g5.*', 'g6.*', 'gr6.*', 'c6i.*', 'c6a.*', 'r6i.*', 'r6a.*']",
    "/configuration/HPC": "{'scheduler_engine': 'openpbs', 'deployment_type': 'tgz'}",
    "/configuration/PrivateSubnets": "['subnet-0145161ba2ffb677a', 'subnet-0102a5b1b21cb1aef', 'subnet-0bc3f861ffb2322fe']",
    "/configuration/PublicSubnets": "['subnet-01df1d82e8e125daf', 'subnet-02747c0e81532b9b9', 'subnet-0ac8c9c3cf4fdb82a']",
    "/configuration/SchedulerDeploymentType": "tgz",
    "/configuration/BaseOS": "amazonlinux2",
    "/configuration/ClusterId": "soca-mcrozes",
    "/configuration/ComputeNodeIAMRole": "soca--ComputeNodeRole7A9ECFBB-jFIV23XPETZq",
    "/configuration/ControllerSecurityGroup": "sg-0e8a210e8d91a8fb4",
    ...... TRUNCATED