Always free autonomous database with OCI CLI
- Get link
- X
- Other Apps
OGB Appreciation Day: Always free autonomous database with OCI CLI
To be part of the OGB Appreciation Day I have written a Blog Post to show you how easy it is to create an always free Autonomous Database with the OCI CLI.
Probably not everyone noticed it but the oci-cli does support always free databases in the Oracle Cloud.
According to my google search the version 2.6.7 of the oci-cli is required to create and manage always free databases via cli.
As soon as you have configured the oci-cli client (https://docs.cloud.oracle.com/iaas/Content/API/SDKDocs/cliconfigure.htm) you are able to play.
With the newest version of the oci-cli client you have the following option to create a always free ADW or ATP:
--is-free-tier
This leads into following command for the DB creation:
oci db autonomous-database create --compartment-id <YOUR_COMPARTMENT_ID> --is-free-tier TRUE --db-name test --admin-password <STRONG_PASSWORD> --cpu-core-count 1 --data-storage-size-in-tbs 1
Please be aware that the parameters –cpu-core-count and –data-storage-size-in-tbs are required parameters and if you list your autonomous databases after the creation you will notice that the output will show 1TB storage and 1 CPU core count.
[julian@localhost .oci]$ oci db autonomous-database list --compartment-id ocid1.tenancy.oc1..qq7uvn6gmea
{
"data": [
{
"autonomous-container-database-id": null,
"compartment-id": "ocid1.tenancy.oc1..pqq7uvn6gmea",
"connection-strings": {
"all-connection-strings": {
"HIGH": "adb.eu-...",
"LOW": "adb.eu-...",
"MEDIUM": "adb.eu-",
"TP": "adb.eu-",
"TPURGENT": "adb.eu-"
},
"dedicated": null,
"high": "adb.eu-",
"low": "adb.eu-,
"medium": "adb.eu-"
},
"connection-urls": null,
"cpu-core-count": 1,
"data-storage-size-in-tbs": 1,
"db-name": "test",
"db-version": "18c",
"db-workload": "OLTP",
"defined-tags": {},
"display-name": "autonomousdatabase20191010070625",
"freeform-tags": {},
"id": "ocid1.autonomousdatabase.oc1.eu-frankfurt-1.",
"is-auto-scaling-enabled": false,
"is-dedicated": false,
"is-free-tier": true,
"is-preview": false,
"license-model": "LICENSE_INCLUDED",
"lifecycle-details": null,
"lifecycle-state": "AVAILABLE",
"service-console-url": "https://adb.eu-...service_type=ATP",
"system-tags": {
"orcl-cloud": {
"free-tier-retained": "true"
}
},
"time-created": "2019-10-10T07:06:25.341000+00:00",
"time-deletion-of-free-autonomous-database": null,
"time-reclamation-of-free-autonomous-database": "2019-10-17T07:12:40.135000+00:00",
"used-data-storage-size-in-tbs": 1,
"whitelisted-ips": null
},
But if you take a look at the service console (the url is in the list output) you will notice that there is only 20GB space available. Therefore don’t worry about the output of the list command. The important parameter of the list command is:
"is-free-tier": true,
- Get link
- X
- Other Apps
Comments