OCI - Automatic Scale
Up/Down shape of DBCS 2 Node RAC instance
DBCS provides a managed environment where tasks such as backup, patching, and
database parameter configuration are handled seamlessly. Depending on the
allocated Oracle CPU (OCPU), DBCS automatically configures the database memory
parameters to optimize performance.
Along with GUI, OCI has commands to perform all desired functionalities.
Through OCI commands we can perform Scale up/down of DBCS capacity.
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm
In accordance with the requirement, the configuration (OCPU)
of DBCS needs to be adjusted based on business hours. This adjustment aims for
improved cost optimization and resource utilization. When the OCPU is modified,
it triggers a server reboot. Here the database is set up with RAC (Real
Application Cluster), ensuring high availability at the instance level. Server
reboots occur sequentially on the mapped servers, minimizing downtime during
OCPU changes.
Prerequisites
1)
A Bastion host which has connectivity with DBCS
server. The Scale up/down script will be scheduled in this server.
2)
OCI command line utility will be installed in
the Bastion host. Scale up/down activity will be done via command line.
3)
OCI Command line utility will be configured with
User credentials who has access to DBCS environment with privileges to scale
up/down.
Creation of Bastion Host
Bastion host is a compute instance. In this example we will
consider Linux compute instance. This instance should be running 24*7, hence it
could be a Free tier instance or an instance with minimal OCPU and memory
configuration, that will optimize the cost. We need this instance to install
OCI command line and schedule the script execution.
OCI Command Line Installation
OCI Command line (CLI) utility is the platform to execute
all OCI commands. First we need to install OCI CLI and then configure it.
Here’s the example of OCI CLI installation in Linux
instance. The installation has proceeded with default settings (Press Enter key
to go with default settings for the installation.). In the below output Bold
font denotes where our input or Enter key (for default settings) is expected.
[opc@hub-inst
~]$ sudo su -
Last
login: Sun Jul 30 12:21:29 GMT 2023 on pts/0
[root@hub-inst
~]# bash -c "$(curl -L
https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)"
% Total
% Received % Xferd Average
Speed Time Time
Time Current
Dload Upload
Total Spent Left
Speed
100
16926 100 16926 0
0 29539 0 --:--:-- --:--:-- --:--:-- 29487
******************************************************************************
You have started the OCI CLI Installer in
interactive mode. If you do not wish
to run this in interactive mode, please
include the --accept-all-defaults option.
If you have the script locally and would
like to know more about
input options for this script, then you can
run:
./install.sh -h
If you would like to know more about input
options for this script, refer to:
https://github.com/oracle/oci-cli/blob/master/scripts/install/README.rst
******************************************************************************
Downloading
Oracle Cloud Infrastructure CLI install script from
https://raw.githubusercontent.com/oracle/oci-cli/v3.2.1/scripts/install/install.py
to /tmp/oci_cli_install_tmp_btaB.
curl:
(35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to
raw.githubusercontent.com:443
#########################################################################
100.0%
Falling
back to previous install.py script URL -
https://raw.githubusercontent.com/oracle/oci-cli/v2.22.0/scripts/install/install.py
Running
install script.
python3
/tmp/oci_cli_install_tmp_btaB
--
Verifying Python version.
--
Python version 3.6.8 okay.
===>
In what directory would you like to place the install? (leave blank to use
'/root/lib/oracle-cli'):
--
Creating directory '/root/lib/oracle-cli'.
--
We will install at '/root/lib/oracle-cli'.
===>
In what directory would you like to place the 'oci' executable? (leave blank
to use '/root/bin'):
--
Creating directory '/root/bin'.
--
The executable will be in '/root/bin'.
===>
In what directory would you like to place the OCI scripts? (leave blank to
use '/root/bin/oci-cli-scripts'):
--
Creating directory '/root/bin/oci-cli-scripts'.
--
The scripts will be in '/root/bin/oci-cli-scripts'.
===>
Currently supported optional packages are: ['db (will install cx_Oracle)']
What
optional CLI packages would you like to be installed (comma separated names;
press enter if you don't need any optional packages)?:
--
The optional packages installed will be ''.
--
Trying to use python3 venv.
--
Executing: ['/usr/bin/python3', '-m', 'venv', '/root/lib/oracle-cli']
--
Executing: ['/root/lib/oracle-cli/bin/pip', 'install', '--upgrade', 'pip']
Collecting
pip
Downloading
https://files.pythonhosted.org/packages/a4/6d/6463d49a933f547439d6b5b98b46af8742cc03ae83543e4d7688c2420f8b/pip-21.3.1-py3-none-any.whl
(1.7MB)
100% |████████████████████████████████|
1.7MB 931kB/s
Installing
collected packages: pip
Found existing installation: pip 9.0.3
Uninstalling pip-9.0.3:
Successfully uninstalled pip-9.0.3
Successfully
installed pip-21.3.1
You
are using pip version 21.3.1, however version 23.2.1 is available.
You
should consider upgrading via the 'pip install --upgrade pip' command.
--
Executing: ['/root/lib/oracle-cli/bin/pip', 'install', '--cache-dir',
'/tmp/tmpv97gabpx', 'wheel', '--upgrade']
Collecting
wheel
Downloading wheel-0.37.1-py2.py3-none-any.whl
(35 kB)
Installing
collected packages: wheel
Successfully
installed wheel-0.37.1
--
Executing: ['/root/lib/oracle-cli/bin/pip', 'install', '--cache-dir',
'/tmp/tmpv97gabpx', 'oci_cli', '--upgrade']
Collecting
oci_cli
Downloading oci_cli-3.33.3-py3-none-any.whl
(40.8 MB)
|████████████████████████████████| 40.8 MB
39.3 MB/s
Collecting
cryptography<42.0.0,>=3.2.1
Downloading
cryptography-40.0.2-cp36-abi3-manylinux_2_28_x86_64.whl (3.7 MB)
|████████████████████████████████| 3.7 MB
84.9 MB/s
Collecting
PyYAML<=6.0.1,>=5.4
Downloading
PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (677 kB)
|████████████████████████████████| 677 kB
86.3 MB/s
Collecting
pyOpenSSL<24.0.0,>=17.5.0
Downloading pyOpenSSL-23.2.0-py3-none-any.whl
(59 kB)
|████████████████████████████████| 59 kB
13.0 MB/s
Collecting
six>=1.15.0
Downloading six-1.16.0-py2.py3-none-any.whl
(11 kB)
Collecting
prompt-toolkit==3.0.29
Downloading
prompt_toolkit-3.0.29-py3-none-any.whl (381 kB)
|████████████████████████████████| 381 kB
81.2 MB/s
Collecting
click==8.0.4
Downloading click-8.0.4-py3-none-any.whl (97
kB)
|████████████████████████████████| 97 kB
14.2 MB/s
Collecting
pytz>=2016.10
Downloading
pytz-2023.3.post1-py2.py3-none-any.whl (502 kB)
|████████████████████████████████| 502 kB
81.2 MB/s
Collecting
oci==2.112.3
Downloading oci-2.112.3-py3-none-any.whl
(23.0 MB)
|████████████████████████████████| 23.0 MB
83.5 MB/s
Collecting
certifi
Downloading
certifi-2023.7.22-py3-none-any.whl (158 kB)
|████████████████████████████████| 158 kB
88.5 MB/s
Collecting
python-dateutil<3.0.0,>=2.5.3
Downloading
python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
|████████████████████████████████| 247 kB
77.1 MB/s
Collecting
jmespath==0.10.0
Downloading
jmespath-0.10.0-py2.py3-none-any.whl (24 kB)
Collecting
arrow>=1.0.0
Downloading arrow-1.2.3-py3-none-any.whl (66
kB)
|████████████████████████████████| 66 kB
9.8 MB/s
Collecting
terminaltables==3.1.0
Downloading terminaltables-3.1.0.tar.gz (12
kB)
Preparing metadata (setup.py) ... done
Collecting
importlib-metadata
Downloading
importlib_metadata-4.8.3-py3-none-any.whl (17 kB)
Collecting
circuitbreaker<2.0.0,>=1.3.1
Downloading circuitbreaker-1.4.0.tar.gz (9.7
kB)
Preparing metadata (setup.py) ... done
Collecting
wcwidth
Downloading
wcwidth-0.2.8-py2.py3-none-any.whl (31 kB)
Collecting
typing-extensions
Downloading
typing_extensions-4.1.1-py3-none-any.whl (26 kB)
Collecting
cffi>=1.12
Downloading
cffi-1.15.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (402 kB)
|████████████████████████████████| 402 kB
80.3 MB/s
Collecting
pycparser
Downloading
pycparser-2.21-py2.py3-none-any.whl (118 kB)
|████████████████████████████████| 118 kB
91.5 MB/s
Collecting
zipp>=0.5
Downloading zipp-3.6.0-py3-none-any.whl (5.3
kB)
Building
wheels for collected packages: terminaltables, circuitbreaker
Building wheel for terminaltables (setup.py)
... done
Created wheel for terminaltables:
filename=terminaltables-3.1.0-py3-none-any.whl size=15355
sha256=0245771b1bb2c8736599f7b51b5e4c74bab7be3947d94682ee6a465b4da07ad9
Stored in directory:
/tmp/tmpv97gabpx/wheels/86/1b/58/c23af2fe683acd8edc15d5a1268f0242be1ff2cf827fe34737
Building wheel for circuitbreaker (setup.py)
... done
Created wheel for circuitbreaker:
filename=circuitbreaker-1.4.0-py3-none-any.whl size=7506
sha256=e2f78db636915df68f248a876f198e30c4ab352e67608d876f114b64bbaf6e3c
Stored in directory:
/tmp/tmpv97gabpx/wheels/46/17/98/db2eb826e4a98da672cffe66ec16838182cde0cf19ad2c0c70
Successfully
built terminaltables circuitbreaker
Installing
collected packages: pycparser, cffi, zipp, typing-extensions, six,
cryptography, wcwidth, pytz, python-dateutil, pyOpenSSL, importlib-metadata,
circuitbreaker, certifi, terminaltables, PyYAML, prompt-toolkit, oci, jmespath,
click, arrow, oci-cli
Successfully
installed PyYAML-6.0.1 arrow-1.2.3 certifi-2023.7.22 cffi-1.15.1
circuitbreaker-1.4.0 click-8.0.4 cryptography-40.0.2 importlib-metadata-4.8.3
jmespath-0.10.0 oci-2.112.3 oci-cli-3.33.3 prompt-toolkit-3.0.29 pyOpenSSL-23.2.0
pycparser-2.21 python-dateutil-2.8.2 pytz-2023.3.post1 six-1.16.0
terminaltables-3.1.0 typing-extensions-4.1.1 wcwidth-0.2.8 zipp-3.6.0
===>
Modify profile to update your $PATH and enable shell/tab completion now?
(Y/n):
===>
Enter a path to an rc file to update (file will be created if it does not
exist) (leave blank to use '/root/.bashrc'):
--
Backed up '/root/.bashrc' to '/root/.bashrc.backup'
--
Tab completion set up complete.
--
If tab completion is not activated, verify that '/root/.bashrc' is sourced by
your shell.
--
--
** Run `exec -l $SHELL` to restart your shell. **
--
--
Installation successful.
--
Run the CLI with /root/bin/oci --help
[root@hub-inst
~]#
Currently only command line utility is installed. It needs
to be configured with appropriate credentials. Below information is required to
configure it.
User OCID
Tenancy OCID
SSH Public Key/Private Key pair
Home region
User OCID can be collected from user settings
In the user settings page you can find OCID of the user.

In the tenancy details page we can find Tenancy OCID

SSH key pair can be created using SSH-Keygen utility or Lets
the CLI configuration create it for us and we can upload it to our profile
later.
At this stage we have required details. Lets proceed with
CLI configuration.
Configuration can be invoked via oci setup config.
[root@hub-inst
~]# oci setup config
/root/lib/oracle-cli/lib64/python3.6/site-packages/oci/_vendor/httpsig_cffi/sign.py:10:
CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python
core team. Therefore, support for it is deprecated in cryptography. The next
release of cryptography will remove support for Python 3.6.
from cryptography.hazmat.backends import
default_backend # noqa: F401
This command provides a walkthrough of
creating a valid CLI config file.
The following links explain where to find
the information required by this
script:
User API Signing Key, OCID and Tenancy
OCID:
https://docs.cloud.oracle.com/Content/API/Concepts/apisigningkey.htm#Other
Region:
https://docs.cloud.oracle.com/Content/General/Concepts/regions.htm
General config documentation:
https://docs.cloud.oracle.com/Content/API/Concepts/sdkconfig.htm
Enter
a location for your config [/root/.oci/config]:
Enter
a user OCID:
ocid1.user.oc1..aaaaaaaazvaaftljvqenwdcwxxxxxxxxxxxxxxxxxxxxxxxx
Enter
a tenancy OCID:
ocid1.tenancy.oc1..aaaaaaaalylrk6bjiuxqryukd6jrlxgfbwxxxxxxxxxxxxxx
Enter
a region by index or name(e.g.
1:
af-johannesburg-1, 2: ap-chiyoda-1, 3: ap-chuncheon-1, 4: ap-dcc-canberra-1, 5:
ap-hyderabad-1,
6:
ap-ibaraki-1, 7: ap-melbourne-1, 8: ap-mumbai-1, 9: ap-osaka-1, 10: ap-seoul-1,
11:
ap-singapore-1, 12: ap-sydney-1, 13: ap-tokyo-1, 14: ca-montreal-1, 15:
ca-toronto-1,
16:
eu-amsterdam-1, 17: eu-dcc-dublin-1, 18: eu-dcc-dublin-2, 19: eu-dcc-milan-1,
20: eu-dcc-milan-2,
21:
eu-dcc-rating-1, 22: eu-dcc-rating-2, 23: eu-frankfurt-1, 24: eu-frankfurt-2,
25: eu-jovanovac-1,
26:
eu-madrid-1, 27: eu-madrid-2, 28: eu-marseille-1, 29: eu-milan-1, 30:
eu-paris-1,
31:
eu-stockholm-1, 32: eu-zurich-1, 33: il-jerusalem-1, 34: me-abudhabi-1, 35: me-dcc-muscat-1,
36:
me-dubai-1, 37: me-jeddah-1, 38: mx-monterrey-1, 39: mx-queretaro-1, 40:
sa-santiago-1,
41:
sa-saopaulo-1, 42: sa-vinhedo-1, 43: uk-cardiff-1, 44: uk-gov-cardiff-1, 45:
uk-gov-london-1,
46:
uk-london-1, 47: us-ashburn-1, 48: us-chicago-1, 49: us-gov-ashburn-1, 50:
us-gov-chicago-1,
51:
us-gov-phoenix-1, 52: us-langley-1, 53: us-luke-1, 54: us-phoenix-1, 55:
us-sanjose-1): us-ashburn-1
Do
you want to generate a new API Signing RSA key pair? (If you decline you will be asked to supply the path to an existing
key.) [Y/n]:
Enter
a directory for your keys to be created [/root/.oci]:
Enter
a name for your key [oci_api_key]:
Public
key written to: /root/.oci/oci_api_key_public.pem
Enter
a passphrase for your private key ("N/A" for no passphrase):
Repeat
for confirmation:
Private
key written to: /root/.oci/oci_api_key.pem
Fingerprint:
34:0b:9f:1d:f8:6a:9a:ab:4e:39:f3:04:52:df:de:71
Config
written to /root/.oci/config
If you haven't already uploaded your API
Signing public key through the
console, follow the instructions on the
page linked below in the section
'How to upload the public key':
https://docs.cloud.oracle.com/Content/API/Concepts/apisigningkey.htm#How2
In the above example we provided user OCID, tenancy OCID and
then asked CLI to create public and private key pair. This pair is required to
authenticate with OCI before executing commands to make changes in OCI. The key
pairs are stored in the default location /root/.oci/config directory.
[root@hub-inst
~]# cd /root/.oci
[root@hub-inst
.oci]# ls -lrt
total
12
-rw-------.
1 root root 451 Oct 5 09:51 oci_api_key_public.pem
-rw-------.
1 root root 1704 Oct 5 09:51
oci_api_key.pem
-rw-------.
1 root root 296 Oct 5 09:51 config
[root@hub-inst
.oci]# cat config
[DEFAULT]
user=
ocid1.user.oc1..aaaaaaaazvaaftljvqenwdcwxxxxxxxxxxxxxxxxxxxxxxxx
fingerprint=34:0b:9f:1d:f8:6a:9a:ab:4e:39:f3:04:52:df:de:71
key_file=/root/.oci/oci_api_key.pem
tenancy=
ocid1.tenancy.oc1..aaaaaaaalylrk6bjiuxqryukd6jrlxgfbwxxxxxxxxxxxxxx
region=us-ashburn-1
[root@hub-inst
.oci]# cat oci_api_key_public.pem
-----BEGIN
PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1qfhu/XMxICzyB4eh3Vm
Bz3k9yiNZ7IGXu/F06Sb7XWw9bNBib/WzUFmZ3IdoRrGQX0jA0/ZJNhOkCdYFDKt
za3BprhyPMc8sIzukBDaNDS8EUX/HxeQ95KLhWpb/q3iXQfkxxP66QD0fj++tQHJ
nOMkNi2zOp0A7stvdePE4jBHmxDiggPdXYtxTzwah9A9v9NoqeD/UE2RcMqqLcLQ
yq8l0rgRBy1p/myN4uz4wmTGZtz8KpX1LGhZxzEDF4ezziqGpWN4MnB2wT51XtGT
Fy2r5XaYsdiIUr+xlPPBY859Ma2HXvl6qpBf2pgWowZ8SyrF00cIRWJGAGX+8o9L
8QIDAQAB
-----END PUBLIC KEY-----
Copy the public key (oci_api_key_public.pem) contents. Move
to OCI user settings again, there we could find API keys in the resource
section.
Click API Keys, in the right side we can find button to add new API key.
Click Add API Key button and paste the copied Public key.
Click Add button, you can find Configuration File Preview.
The fingerprint value will be same as the value stored in
/root/.oci/config file.
[root@hub-inst
.oci]# cat config
[DEFAULT]
user=
ocid1.user.oc1..aaaaaaaazvaaftljvqenwdcwxxxxxxxxxxxxxxxxxxxxxxxx
fingerprint=34:0b:9f:1d:f8:6a:9a:ab:4e:39:f3:04:52:df:de:71
key_file=/root/.oci/oci_api_key.pem
tenancy=
ocid1.tenancy.oc1..aaaaaaaalylrk6bjiuxqryukd6jrlxgfbwxxxxxxxxxxxxxx
region=us-ashburn-1
At this stage we have configured the OCI command line, now
lets execute the command to scale up/down DBCS. Right now a DBCS instance has 8
cores (2 node each with 4 OCPU), we are scaling down it by 6 cores (2 node each
with 3 OCPU)
[root@scaleup-script ~]# oci db
system update --db-system-id
ocid1.dbsystem.oc1.ap-hyderabad-1.anuhsljr43cggciaxxxxxxxxxxxx --cpu-core-count
6
Db-system-id is
the OCID of the DBCS system
Output of above
command
[root@scaleup-script ~]# oci db system update --db-system-id ocid1.dbsystem.oc1.ap-hyderabad-1.anuhsljr43cggciaxxxxxxxxxxxxxxxx --cpu-core-count
6
/root/lib/oracle-cli/lib64/python3.6/site-packages/oci/_vendor/httpsig_cffi/sign.py:10:
CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python
core team. Therefore, support for it is deprecated in cryptography. The next
release of cryptography will remove support for Python 3.6.
from
cryptography.hazmat.backends import default_backend # noqa: F401
{
"data": {
"availability-domain": "VPLM:AP-HYDERABAD-1-AD-1",
"backup-network-nsg-ids": null,
"backup-subnet-id":
null,
"cluster-name":
"BDB01",
"compartment-id":
"ocid1.compartment.oc1..aaaaaaaaezwwi6bptaaiz6y3x4ykh25xnhhrqxsni5rozgaoptqee56azgsa",
"cpu-core-count": 8,
"data-collection-options": {
"is-diagnostics-events-enabled": true,
"is-health-monitoring-enabled": false,
"is-incident-logs-enabled": true
},
"data-storage-percentage": 80,
"data-storage-size-in-gbs":
256,
"database-edition":
"ENTERPRISE_EDITION_EXTREME_PERFORMANCE",
"db-system-options":
{
"storage-management": "ASM"
},
"defined-tags": {
"Oracle-Tags": {
"AutoDeleteAfterDays": "14",
"CreatedBy":
"oracleidentitycloudservice/XXXXXXXXX",
"CreatedOn":
"2023-09-05T05:46:51.934Z",
"Purpose":
"Personal Learning"
}
},
"disk-redundancy":
"HIGH",
"display-name":
"Trial_Base_DBCS_RAC",
"domain":
"sgtechsubnet.XXXXXXXX",
"fault-domains": [
"FAULT-DOMAIN-3",
"FAULT-DOMAIN-2"
],
"freeform-tags": {},
"hostname":
"bdb",
"id":
"ocid1.dbsystem.oc1.ap-hyderabad-1.anuhsljr43cggxxxxxxxxxxxxxxxxxxxxxxx",
"iorm-config-cache":
null,
"kms-key-id": null,
"last-maintenance-run-id": null,
"last-patch-history-entry-id": null,
"license-model":
"LICENSE_INCLUDED",
"lifecycle-details":
null,
"lifecycle-state":
"UPDATING",
"listener-port":
1521,
"maintenance-window": null,
"memory-size-in-gbs": 128,
"next-maintenance-run-id": null,
"node-count": 2,
"nsg-ids": null,
"os-version": null,
"point-in-time-data-disk-clone-timestamp":
null,
"reco-storage-size-in-gb": 256,
"scan-dns-name":
"bdb-scan.sgtechsubnet.sgtechstudiovcn.oraclevcn.com",
"scan-dns-record-id":
"ocid1.vcndnsrecord.oc1.ap-hyderabad-1.abuhsljrdwnaywqyfloefxxxxxxxxxxxxx",
"scan-ip-ids": [
"ocid1.privateip.oc1.ap-hyderabad-1.aaaaaaaafq3byvycpyqc55244gk26exxxxxxxxxxxxxxxq",
"ocid1.privateip.oc1.ap-hyderabad-1.aaaaaaaaahy6am5zqv2rivwgc6berz7gxxxxxxxxxxxxxq",
"ocid1.privateip.oc1.ap-hyderabad-1.aaaaaaaasuq5xt7rj2umtnd7khv66vxxxxxxxxxxxxxxq"
],
"shape":
"VM.Standard.E4.Flex",
"source-db-system-id": null,
"sparse-diskgroup":
null,
"ssh-public-keys": [
"ssh-rsa
AAAAB3NzaC1yc2EAAAADAQABAAABAQCZYwfG0aNB7aeL1kTyvEP8PuPoKXkq+P6XIqCHWM+i0FLIcrvcuO+1NmQYA+80FdIhScdW65gDz95ljga6hymJvPVd2W2rQuV+8TtuEXNDUqj5L5hwKU9VaoBv7yjOmFjMe/bfwiNe+4SXSuavlTkKGQhOOybHFS68+ZjLQX6e5K6wsfDKAuwMG1G24xzvHFhBybtvoLwBwYQXRhJ8wC8T/9mvjxrJdSgdfSZCVEozxleCclbXfAFxtHIRAgnyPC/QONvad+efVZGObSvdzUfhAIJz3xz9YkQhhX2FR8AlwHyvEofZRLgxJNfekPr1XcFEluO04MpkiEHIetIvnWAr
ssh-key-2023-09-05"
],
"storage-volume-performance-mode":
"HIGH_PERFORMANCE",
"subnet-id":
"ocid1.subnet.oc1.ap-hyderabad-1.aaaaaaaauntg44nn67lmmyjrgbnsslxxxxxxxxxxxxxxxxxxxa",
"time-created":
"2023-09-05T05:46:52.417000+00:00",
"time-zone":
"UTC",
"version":
"19.20.0.0.0",
"vip-ids": [
"ocid1.privateip.oc1.ap-hyderabad-1.aaaaaaaaqymkk3euyc36ypchyxxxxxxxxxxxxxxxxja",
"ocid1.privateip.oc1.ap-hyderabad-1.aaaaaaaa7xvxxk4sgoj755lu2d5xxxxxxxxxxxxa"
],
"zone-id":
"ocid1.dns-zone.oc1.ap-hyderabad-1.aaaaaaaa5zdzgqk6sre5gy4fmpxxxxxxxxxxxxxxxxxxxxxxxxsiq"
},
"etag":
"83319cfa"
}
It will take maximum of 25 minutes to update the Core values
in both the nodes. The above OCI command can be scripted as a batch file and
scheduled via cron job.
[root@scaleup-script
~]# cat /root/scaleup.sh
/root/bin/oci
db system update --db-system-id
ocid1.dbsystem.oc1.ap-hyderabad-1.anuhsljr43cggciapuy2nd2cfbblkxlzf2fgmpgyctohlfjhvkwg7dl3p7pa
--cpu-core-count 8
[root@scaleup-script
~]# cat /root/scaledown.sh
/root/bin/oci
db system update --db-system-id
ocid1.dbsystem.oc1.ap-hyderabad-1.anuhsljr43cggciapuy2nd2cfbblkxlzf2fgmpgyctohlfjhvkwg7dl3p7pa
--cpu-core-count 4
Schedule it via cronjob for the desired timing.
[root@scaleup-script
~]# crontab -l
30
4 * * * /root/scaleup.sh
30
14 * * * /root/scaledown.sh