Initial OCI Data Safe ADB inventory tool
This commit is contained in:
91
INSTRUCOES_USO.md
Executable file
91
INSTRUCOES_USO.md
Executable file
@@ -0,0 +1,91 @@
|
||||
# Instrucoes de Uso
|
||||
|
||||
## O que este pacote faz
|
||||
|
||||
Gera um inventario de Autonomous Databases e indica se cada banco esta cadastrado no Oracle Data Safe.
|
||||
|
||||
Script recomendado:
|
||||
|
||||
```text
|
||||
adb_datasafe_inventory.py
|
||||
```
|
||||
|
||||
Saidas principais:
|
||||
|
||||
- `adb_datasafe_inventory.csv`: inventario completo.
|
||||
- `adb_in_datasafe.csv`: apenas ADBs cadastrados no Data Safe.
|
||||
- `adb_not_in_datasafe.csv`: apenas ADBs nao cadastrados no Data Safe.
|
||||
|
||||
## Linux
|
||||
|
||||
```bash
|
||||
cd oci-datasafe-adb-inventory
|
||||
python3 -m pip install -r requirements.txt
|
||||
|
||||
python3 ./adb_datasafe_inventory.py \
|
||||
--profile DEFAULT \
|
||||
--region sa-saopaulo-1 \
|
||||
--workers 3 \
|
||||
--retries 8 \
|
||||
--retry-base-sleep 5 \
|
||||
--split-outputs \
|
||||
--output ./adb_datasafe_inventory.csv
|
||||
```
|
||||
|
||||
## Windows PowerShell
|
||||
|
||||
```powershell
|
||||
cd .\oci-datasafe-adb-inventory
|
||||
python -m pip install -r .\requirements.txt
|
||||
|
||||
python .\adb_datasafe_inventory.py `
|
||||
--profile DEFAULT `
|
||||
--region sa-saopaulo-1 `
|
||||
--workers 3 `
|
||||
--retries 8 `
|
||||
--retry-base-sleep 5 `
|
||||
--split-outputs `
|
||||
--output .\adb_datasafe_inventory.csv
|
||||
```
|
||||
|
||||
Se `python` nao existir no Windows, use `py` no lugar.
|
||||
|
||||
## OCI Cloud Shell
|
||||
|
||||
```bash
|
||||
unzip oci-datasafe-adb-inventory.zip
|
||||
cd oci-datasafe-adb-inventory
|
||||
python3 -m pip install --user -r requirements.txt
|
||||
|
||||
python3 ./adb_datasafe_inventory.py \
|
||||
--region sa-saopaulo-1 \
|
||||
--workers 3 \
|
||||
--retries 8 \
|
||||
--retry-base-sleep 5 \
|
||||
--split-outputs \
|
||||
--output ./adb_datasafe_inventory.csv
|
||||
```
|
||||
|
||||
## Opcoes uteis
|
||||
|
||||
- Trocar regiao: `--region us-ashburn-1`
|
||||
- Rodar mais de uma regiao: `--regions sa-saopaulo-1,us-ashburn-1`
|
||||
- Gerar todas as regioes subscribed: `--all-regions`
|
||||
- Rodar apenas em um compartment: `--compartment-id ocid1.compartment.oc1..aaaa`
|
||||
- Rodar em um compartment e seus subcompartments: `--compartment-id ocid1.compartment.oc1..aaaa --compartment-subtree`
|
||||
- Reduzir throttling: use `--workers 2`
|
||||
- Desativar barra de progresso: `--no-progress`
|
||||
- Gerar somente cadastrados: `--filter registered`
|
||||
- Gerar somente nao cadastrados: `--filter not_registered`
|
||||
|
||||
## Compactar para envio
|
||||
|
||||
No Linux ou Cloud Shell:
|
||||
|
||||
```bash
|
||||
cd ..
|
||||
zip -r oci-datasafe-adb-inventory.zip oci-datasafe-adb-inventory \
|
||||
-x "oci-datasafe-adb-inventory/*.csv" \
|
||||
-x "oci-datasafe-adb-inventory/*.json" \
|
||||
-x "oci-datasafe-adb-inventory/__pycache__/*"
|
||||
```
|
||||
Reference in New Issue
Block a user