RDS Operations
Available Operations
Scale Cluster
What is it?
It enables user to modify the capacity of the cluster by changing the count of instances and/or the type of the instance that are already part of the cluster.
When to use?
This operation can be run only when the cluster is in running
state or when an existing operation is success
. User need to wait if any existing operation is already running on the same cluster and can check its status via odin provided Jenkins.
Options
writer
json
The instance type required for the writer to be passed as a parameter to the json.
"writer": { "instance_type": "db.t4g.medium" }
reader
json
The instance type required along with instance count for the reader to be passed as a parameter to the json. Multiple instance types and their counts can be passed as comma separated values.
"readers": [{ "instance_type": "db.t4g.medium", "instance_count":2, }, { "instance_type": "db.t4g.small", "instance_count":1, }
Command
odin operate component --name [YOUR_COMPONENT_NAME] --service [YOUR_SERVICE_NAME] --operation scale
--options '{
"writer": {
"instance_type": "[YOUR_INSTANCE_TYPE]"
},
"readers": [{
"instance_type": "[YOUR_INSTANCE_TYPE]",
"instance_count":[DESIRED_COUNT]
}, {
"instance_type": "[YOUR_INSTANCE_TYPE]",
"instance_count":[DESIRED_COUNT]
}]
}' --env [YOUR_ENV_NAME]
Reboot
What is it?
Reboot operation can be used by the user in case of changes in parameter, pushing new changes or even in case of observed higher latency.
When to use?
This operation can be run only when the cluster is in running
state or when an existing operation is success
. User need to wait if any existing operation is already running on the same cluster and can check its status via odin provided Jenkins.
Options
instance_name
text
This is a reader identifier and value can be found as instance identifier in AWS RDS console. The same value will be used as input.
--options '{"
instance_name": "
INSTANCE_NAME_TO_REBOOT"}'
Command
odin operate component --name [YOUR_COMPONENT_NAME] --service [YOUR_SERVICE_NAME] --operation reboot
--options '{"instance_name": "<INSTANCE_NAME_TO_REBOOT>"}' --env [YOUR_ENV_NAME]
Failover
What is it?
Failover operation can be used by the users to failover the writer to any available reader. This is done in case writer is observing high latency or similar situation.
In this operation, Writer is failed over to a reader instance.
When to use?
This operation can be run only when the cluster is in running
state or when an existing operation is success
. User need to wait if any existing operation is already running on the same cluster and can check its status via odin provided Jenkins.
Options
failover_instance
text
This is a reader identifier and value can be found as instance identifier in AWS RDS console. The same value will be used as input.
--options '{"failover_instance": "INSTANCE_ID_TO_FAILOVER_TO"}'
Command
odin operate component --name [YOUR_COMPONENT_NAME] --service [YOUR_SERVICE_NAME]
--operation failover
--options '{"failover_instance": "INSTANCE_ID_TO_FAILOVER_TO"}'
--env [YOUR_ENV_NAME]
Add Reader
What is it?
Adding a reader is a subset of the operation "Scale". Using this operation a user can scale up the cluster.
When to use?
This operation can be run only when the cluster is in running
state or when an existing operation is success
. User need to wait if any existing operation is already running on the same cluster and can check its status via odin provided Jenkins.
How to use ?
Insert the instance count to be added for the cluster in number_of_reader
. E.g: If you have 5 instances and you want to add 5 more, the value of number_of_reader
will be 5.
Options
instance_type
text
Instance type that you want to add
--options '{"instance_type": "db.t4g.medium", "number_of_reader": 12}
number_of_reader
integer
Number of readers that you want to add for the said instance type
--options '{"instance_type": "db.t4g.medium", "number_of_reader": 12}
Command
odin operate component --name [YOUR_COMPONENT_NAME] --service [YOUR_SERVICE_NAME]
--operation add_reader
--options '{"instance_type": "INSTANCE_TYPE_TO_ADD", "number_of_reader": "NO_OF_READERS_TO_ADD"}'
--env [YOUR_ENV_NAME]
Example:
odin operate component --name deadpool-rds --service deadpool-service --operation add_reader
--options '{"instance_type": "db.t4g.medium", "number_of_reader": 12} --env sr001
Remove Reader
What is it?
Removing a reader is a subset of the operation "Scale". Using this operation a user can scale down the cluster.
When to use?
This operation can be run only when the cluster is in running
state or when an existing operation is success
. User need to wait if any existing operation is already running on the same cluster and can check its status via odin provided Jenkins.
How to use ?
The user can provide either the number of readers to be removed or the instance id that the user wants to remove as a parameter for remove reader operation.
Options
reader_instance_name
Text
This is a reader identifier and value can be found as instance identifier in AWS RDS console. The same value will be used as input.
--options '{"reader_instance_name": "INSTANCE_ID_TO_FAILOVER_TO"}'
number_of_readers
Integer
Number of readers that you want to remove
--options '{"number_of_readers": 12}'
Command
// Using Instance Identifier
odin operate component --name [YOUR_COMPONENT_NAME] --service [YOUR_SERVICE_NAME]
--operation remove_reader
--options '{"reader_instance_name": "INSTANCE_ID_TO_BE_REMOVED"}'
--env [YOUR_ENV_NAME]
//Using Reader Count
odin operate component --name [YOUR_COMPONENT_NAME] --service [YOUR_SERVICE_NAME]
--operation remove_reader
--options '{"number_of_readers": "NO_OF_READERS_TO_REMOVE"}'
--env [YOUR_ENV_NAME]
Example:
//Using Instance Identifier
odin operate component --name deadpool-rds --service deadpool-service --operation remove_reader
--options '{"reader_instance_name": "Your_Instance_name"} --env sr001
//Using Reader Count
odin operate component --name deadpool-rds --service deadpool-service --operation remove_reader
--options '{"number_of_reader": 12} --env sr001
Modify Cluster Config
What is it?
Modify cluster config operation enables you to update mentioned cluster configuration of a RDS cluster
When to use?
This operation can be run only when the cluster is in running
state or when an existing operation is success
. User need to wait if any existing operation is already running on the same cluster and can check its status via odin provided Jenkins.
How to use ?
The user can provide input in combination of below mentioned cluster configuration to update.
Options
performance_insights
JSON
This is a JSON configuration to enable/disable performance insight with retention period
{
"performance_insights": {
"enabled": TRUE_OR_FALSE,
"retention_period": RETENTION_PERIOD
}
}
enhanced_monitoring
JSON
This is a JSON configuration to enable/disable enhanced monitoring with specified interval
{
"enhanced_monitoring": {
"enabled": TRUE_OR_FALSE,
"interval": MONITORING_INTERVAL
}
}
storage_type
String
Storage Type configuration supported values are
aurora
aurora-iopt1
{
"storage_type": "STORAGE_TYPE"
}
log_exports
Array
Log export configuration supported values are combination of any of the below values
error
slowquery
general
audit
{
"log_exports": ["LOG_EXPORT_LIST"]
}
Command
odin operate component --name [YOUR_COMPONENT_NAME] --service [YOUR_SERVICE_NAME]
--env [YOUR_ENV_NAME]
--operation modify_cluster_config
--options '''{
"performance_insights": {
"enabled": TRUE_OR_FALSE,
"retention_period": RETENTION_PERIOD
},
"enhanced_monitoring": {
"enabled": TRUE_OR_FALSE,
"interval": MONITORING_INTERVAL
},
"storage_type": "STORAGE_TYPE",
"log_exports": ["LOG_EXPORT_LIST"]
}'''
Example:
odin operate component --name deadpool-rds --service deadpool-service --env sr001
--operation modify_cluster_config
--options '''{
"enhancedMonitoring": {
"enabled": True,
"interval": 15
}
"storageType": "aurora",
"logExports": ["general"]
}'''
Replace Parameter Group
What is it?
This operation can be used to replace existing parameter group(s) with new parameter group(s) for a RDS cluster
When to use?
This operation can be run only when the cluster is in running
state or when an existing operation is success
. User need to wait if any existing operation is already running on the same cluster and can check its status via odin provided Jenkins.
How to use ?
The user can replace cluster parameter group and instance parameter group in any combination.
Options
cluster_parameter_group
String
Name of the cluster parameter group
{
"cluster_parameter_group": "CLUSTER_PARAMETER_GROUP_NAME"
}
instance_parameter_group
String
Name of the instance/db parameter group
{
"instance_parameter_group": "INSTANCE/DB_PARAMETER_GROUP_NAME"
}
Command
odin operate component --name [YOUR_COMPONENT_NAME] --service [YOUR_SERVICE_NAME]
--env [YOUR_ENV_NAME]
--operation replace_parameter_group
--options '{
"cluster_parameter_group": "CLUSTER_PARAMETER_GROUP_NAME",
"instance_parameter_group": "INSTANCE/DB_PARAMETER_GROUP_NAME"
}'
Example:
odin operate component --name deadpool-rds --service deadpool-service --env sr001
--operation replace_parameter_group
--options '{
"cluster_parameter_group": "default-cluster.aurora-mysql8.0",
"instance_parameter_group": "default-db.aurora-mysql8.0"
}'
Update Parameter Group
What is it?
This operation can be used to add/update configs of parameter group(s) which is/are already attached to a RDS cluster. User can add/update any parameter config(s) which is/are supported by RDS service irrespective of what is exposed in deploy(provisioning)
When to use?
This operation can be run only when the cluster is in running
state or when an existing operation is success
. User need to wait if any existing operation is already running on the same cluster and can check its status via odin provided Jenkins.
How to use ?
The user can provide cluster parameter group configs and instance parameter group configs in any combination.
Options
parameter_group_config
JSON
Parameter group config JSON for both Instance and Cluster
{
"parameter_group_config": {
"instance": {
"PARAMETER": "VALUE",
"PARAMETER": VALUE
},
"cluster": {
"PARAMETER": VALUE,
"PARAMETER": "VALUE
}
}
}
immediate_reboot
Boolean
Do you want to apply the changes immediately. If set to True, cluster and instance will be rebooted if parameter requires reboot, else will be applied during maintenance window
{
"immediate_reboot": TRUE_OR_FALSE
}
Command
odin operate component --name [YOUR_COMPONENT_NAME] --service [YOUR_SERVICE_NAME]
--env [YOUR_ENV_NAME]
--operation update_parameter_group
--options '{
"parameter_group_config": {
"instance": {
"PARAMETER": "VALUE",
"PARAMETER": VALUE
},
"cluster": {
"[PARAMETER]": "VALUE,
"[PARAMETER]": VALUE
}
},
"immediate_reboot": TRUE_OR_FALSE
}'
Example:
odin operate component --name deadpool-rds --service deadpool-service --env sr001
--operation update_parameter_group
--options '{
"parameter_group_config": {
"instance": {
"waitTimeout": 600
},
},
"immediate_reboot": True
}'
Update Master Password
What is it?
This operation can be used to update the master password of a RDS cluster
When to use?
This operation can be run only when the cluster is in running
state or when an existing operation is success
. User need to wait if any existing operation is already running on the same cluster and can check its status via odin provided Jenkins.
How to use ?
The user can provide new master password.
Options
master_password
String
New master password
{
"master_password": "NEW_MASTER_PASSWORD"
}
Command
odin operate component --name [YOUR_COMPONENT_NAME] --service [YOUR_SERVICE_NAME]
--env [YOUR_ENV_NAME]
--operation update_master_password
--options '{ "master_password": "NEW_MASTER_PASSWORD"}'
Example:
odin operate component --name deadpool-rds --service deadpool-service --env sr001
--operation update_master_password
--options '{ "master_password": "abR$!4ddsdD" }'
Last updated