Skip to content
/ oci2pg Public

Dump OCI cloud config to Postgres for your query pleasure.

License

Notifications You must be signed in to change notification settings

krilor/oci2pg

Repository files navigation

oci2pg

The sole purpose of this project is to establish the capability to dump Oracle Cloud Infrastructure (OCI) config to a Postgres database. Once it's in the database the data can be used for whatever purpose you want.

  • Ad-hoc queries
  • Local rest API, e.g. with PostgREST

Why would you want to dump OCI config in a Postgres database?

The project is still just an idea of exploring the usefulness of of such a capability. It was spawned by a need to do ad-hoc queries on OCI config to answer questions or produce overviews and inventories. While OCI CLI and SDK allows you to do, but it's not as ergonomic as a good'ol SQL querey (to me, at least).

Give it a spin

This project uses the just command runner.

# spin up a postgres docker container
just pg

# add tables and views
just up

# set up dotenv file - change the vars to fit your setup
cp .env.sample .env

# run the oci2pg tool
./oci2pg.py

Requirements

Made with python 3.8.10 - it will probably work with newer versions of Python 3.

Python requirements are defined in requirements.txt. Install dependencies:

pip install -r requirements.txt

About

Dump OCI cloud config to Postgres for your query pleasure.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors