oci-dbm-provision
Skill3 starsChanged 7 months agoMITView on GitHub
Provisions a new Autonomous Database (ADB) with private endpoint and TLS-only access. Skipped automatically by oci-dbm-commission if the ADB already exists. Trigger when a user says "create an ADB for DBM", "provision a new autonomous database", or when oci-dbm-commission directs here for fresh provisioning.
In this repository8 other files it gives its agents.
- oci-dbm-commissionSkill
- oci-dbm-enableSkill
- oci-dbm-jobsSkill
- oci-dbm-networkSkill
- oci-dbm-serverSkill
- oci-dbm-vaultSkill
- oci-dbm-workloadSkill
- oci-setupSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 35
Call DatabaseClient.list_autonomous_databases(compartment_id=compartment_ocid, display_name=display_name) and filter for results with …
- Very specific: line 37
If a matching ADB is found: print its OCID and lifecycle state, confirm with the user, and skip creation.
- Distinctive: line 38
If not found, proceed to Step 2.
- Very specific: line 42
Call DatabaseClient.create_autonomous_database() with CreateAutonomousDatabaseDetails containing:
- Very specific: line 58
Do NOT pass vault_id, secret_id, or any secret-related fields to CreateAutonomousDatabaseDetails — those fields are not used for the admin …
- Very specific: line 65
Fail fast: if lifecycle_state is TERMINATED or FAILED — print the error and stop.
- Distinctive: line 97
Before handing off, verify:
- Distinctive: line 101
Do not proceed if either check fails.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
oci-dbm-provision
This skill is a worker in the oci-dbm-commission chain. It does NOT generate scripts. It uses the OCI Python SDK directly to provision a new Autonomous Database configured for private endpoint access and TLS-only connectivity.
This skill is skipped automatically by oci-dbm-commission when the target ADB already exists. If the ADB is found, this skill confirms its OCID and outputs it without creating anything.
Inputs
These values are passed by oci-dbm-commission (or supplied directly by the user):
| Input | Description | Default |
compartment_ocid | OCID of the compartment to create the ADB in | required |
db_name | Short alphanumeric database name (no spaces, max 14 chars) | required |
display_name | Human-readable display name for the ADB | required |
admin_password | Password for the ADMIN user — used directly at creation time | required |
subnet_ocid | OCID of the private subnet for the ADB private endpoint | required |
compute_count | Number of ECPUs | 2 |
storage_tbs | Storage in terabytes | 1 |
workload | Workload type: OLTP, DW, AJD, or APEX | OLTP |
What This Skill Executes
Step 1 — Check Whether ADB Already Exists
Call DatabaseClient.list_autonomous_databases(compartment_id=compartment_ocid, display_name=display_name) and filter for results with lifecycle_state not in ['TERMINATED', 'TERMINATING'].
- If a matching ADB is found: print its OCID and lifecycle state, confirm with the user, and skip creation. Output the existing
adb_ocidand proceed to Step 4 to collect connection details. - If not found, proceed to Step 2.
Step 2 — Create the ADB
Call DatabaseClient.create_autonomous_database() with CreateAutonomousDatabaseDetails containing:
| Field | Value | Reason |
compartment_id | compartment_ocid | target compartment |
db_name | db_name | short name |
display_name | display_name | human label |
admin_password | admin_password | set at creation — NOT via vault |
subnet_id | subnet_ocid | places ADB in VCN via private endpoint |
compute_model | 'ECPU' | required — OCPU is deprecated |
compute_count | compute_count (min 2) | ECPU count |
data_storage_size_in_tbs | storage_tbs | storage allocation |
db_workload | workload | e.g. 'OLTP' |
is_mtls_connection_required | False | TLS-only; recommended with PE |
license_model | 'LICENSE_INCLUDED' | standard licensing |
Do NOT pass vault_id, secret_id, or any secret-related fields to CreateAutonomousDatabaseDetails — those fields are not used for the admin password and will cause errors.
Step 3 — Poll Until Available
Poll DatabaseClient.get_autonomous_database(adb_id=adb_ocid) every 2.5 minutes (150 seconds).
- Continue until
lifecycle_state == 'AVAILABLE'. - Fail fast if
lifecycle_stateisTERMINATEDorFAILED— print the error and stop. - Print status on each poll:
[HH:MM:SS] lifecycle_state = PROVISIONING ...
Step 4 — Print and Output Connection Details
Once the ADB is AVAILABLE (or was pre-existing), retrieve:
adb.id— the ADB OCIDadb.private_endpoint_ip— private IP within the VCNadb.private_endpoint— private hostnameadb.connection_strings.medium— the full qualified service name for DBM enablement
Print all four values clearly.
The connection_strings.medium value has the format:
<prefix>_<dbname>_medium.adb.oraclecloud.comExample: ep8c8t82piuc9mv_dbmdemo_medium.adb.oraclecloud.com
Output the following values for the next skill:
adb_ocid: <ocid>
full_service_name: <connection_strings.medium value>
compartment_ocid: <ocid>
provision_complete: trueConfirmation Before Finishing
Before handing off, verify:
DatabaseClient.get_autonomous_database()returnslifecycle_state = AVAILABLEconnection_strings.mediumis non-empty and contains the expected<dbname>substring
Do not proceed if either check fails.
What This Skill Hands Back
Outputs passed to oci-dbm-commission (and subsequently to oci-dbm-enable):
adb_ocid— OCID of the available ADBfull_service_name— the full qualified service name fromconnection_strings.mediumcompartment_ocid— unchanged, forwarded for downstream skillsprovision_complete: true— signal that this step completed successfully
Gotchas
Gotcha 1 — Always use ECPU, never OCPU.
compute_model='OCPU' is deprecated for new ADB creation. Use compute_model='ECPU' with compute_count set to a minimum of 2. Passing OCPU may succeed today but will be rejected in future API versions without warning.
Gotcha 2 — Do NOT pass vault/secret fields for the admin password.
CreateAutonomousDatabaseDetails does have vault-related fields, but they are for a different feature (customer-managed encryption keys), not for the ADMIN password. Pass admin_password directly as a plain string. Mixing these up produces cryptic 400 or 412 errors.
Gotcha 3 — Save connection_strings.medium — you will need it in oci-dbm-enable.
The DBM enablement API requires the full qualified service name, not the short db_name. This value is only reliably obtained from adb.connection_strings.medium after the ADB is provisioned. If it is lost, you must call get_autonomous_database() again to retrieve it before running oci-dbm-enable.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

