You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The steps below show how to create an Autonomous Database using the Azure CLI.
@@ -29,6 +29,8 @@ You can run the scripts independently or run `create-all-resources.sh`. Simply u
29
29
|[create-all-resources.sh](create-all-resources.sh)|Creates your resource group, network, ADB and VM|
30
30
|[create-data-lake-storage.sh](create-data-lake-storage.sh)|Creates an Azure Data Lake Gen 2 storage account, a container and uploads sample data into that container|
31
31
|[delete-all-resources.sh](delete-all-resources.sh)|Deletes your resource group, network, ADB and VM|
32
+
|[show-adb-info.sh](show-adb-info.sh)|Shows information about your ADB - including you JDBC connection details to the HIGH service|
33
+
|[show-data-lake-storage-info.sh](show-data-lake-storage-info.sh)|Shows information about your data lake storage - including the storage endpoint URL|
32
34
33
35
### Configuration file
34
36
The Azure cli deployment scripts rely on settings found in the config file. These resources **will be created** by the scripts. Update the config file prior to running any of the scripts.
@@ -80,6 +82,8 @@ Connect to your Autonomous Database!
80
82
* Use these great VS Code extensions that help you develop and debug your database apps:
81
83
* SQL Developer for VS Code ([Learn More](https://www.oracle.com/database/sqldeveloper/vscode/) | [Marketplace](https://marketplace.visualstudio.com/items?itemName=Oracle.sql-developer))
82
84
* Oracle Developer Tools for VS Code ([Learn More](https://docs.oracle.com/en/database/oracle/developer-tools-for-vscode/getting-started/gettingstarted.html) | [Marketplace](https://marketplace.visualstudio.com/items?itemName=Oracle.oracledevtools))
85
+
*[Use the sample scripts](../../sql/README.md) to learn how to use different features - like Select AI, data lake integration, JSON, and more.
86
+
83
87
84
88
#### JDBC Example:
85
89
JDBC is a common way to connect to Autonomous Database. For example, you can use the **Custom JDBC URL** in the VS Code SQL Developer Extension:
# Storage accounts require a unique name across azure. Enter your unique name below.
32
-
STORAGE_ACCOUNT_NAME="your-storage-account"
41
+
# example: devadbstorageacct
42
+
STORAGE_ACCOUNT_NAME=""
33
43
STORAGE_CONTAINER_NAME="adb-sample"
34
44
35
45
## IDENTITIES
36
46
# This identity will be used for your VM. The password will also be used for the database ADMIN user
37
47
USER_NAME="adb"
38
-
--The password must be between 12 and 30 characters long and must include at least one uppercase letter, one lowercase letter, and one numeric character
48
+
# The password must be between 12 and 30 characters long and must include at least one uppercase letter, one lowercase letter, and one numeric character
# Storage accounts require a unique name across azure. Enter your unique name below.
32
-
STORAGE_ACCOUNT_NAME="your-storage-account"
41
+
# example: devadbstorageacct
42
+
STORAGE_ACCOUNT_NAME=""
33
43
STORAGE_CONTAINER_NAME="adb-sample"
34
44
35
45
## IDENTITIES
36
46
# This identity will be used for your VM. The password will also be used for the database ADMIN user
37
47
USER_NAME="adb"
38
-
--The password must be between 12 and 30 characters long and must include at least one uppercase letter, one lowercase letter, and one numeric character
48
+
# The password must be between 12 and 30 characters long and must include at least one uppercase letter, one lowercase letter, and one numeric character
* Using the Google Command Line Interace (gcloud CLI)
6
6
7
-
The steps below show how to create an Autonomous Database using the Azure CLI.
7
+
8
+
The steps below show how to create an Autonomous Database using the gcloud CLI.
8
9
9
10
## Prerequisites:
10
-
*[Install the Azure CLI](https://learn.microsoft.com/en-us/cli/azure/)
11
-
*[Subscribe to Oracle Database@Azure](https://www.youtube.com/watch?v=MEB8kB_TI2I)
12
-
* Ensure you have the appropriate user groups and privileges. See [details for onboarding Autonomous Database](https://learn.microsoft.com/en-us/azure/oracle/oracle-db/onboard-oracle-database)
11
+
*[Install the gcloud CLI](https://cloud.google.com/sdk/docs/install)
12
+
*[Onboard Oracle Database@Google Cloud](https://docs.oracle.com/en-us/iaas/Content/database-at-gcp/oagcp-onboard.htm#oagcp_onboard). Onboarding includes subscribing to the service using a Pay as You Go or private offer, setting up permissions, and more.
13
13
14
14
## Deploy your Autonomous Database and your infrastructure
15
-
Use the following scripts to deploy your infrastructure and Autonomous Database:
15
+
The gcloud CLI scripts will deploy the following infrastructure:
16
+
* A VPC Network with a client subnet
17
+
* An Oracle Autonomous Database. It is deployed to a private subnet on that VPC Network. That private subnet is managed by Oracle Database@Google Cloud.
18
+
* A Windows-based Virtual Machine is deployed to the client subnet. You can RDP to that VM to develop your apps and access Autonomous Database.
19
+
* A Cloud Storage bucket with sample data
20
+
* Sample code will use Google Gemini. Ensure the API is enabled.
21
+
22
+
23
+

16
24
17
-

25
+
**Note:** Gemini is used by the samples - but the scripts do not set up access to the resource. See the [Generative AI on Vertex Quickstart](https://cloud.google.com/vertex-ai/generative-ai/docs/start/quickstarts/quickstart-multimodal?authuser=1)
18
26
19
-
**Note:** Azure OpenAI is used by the samples - but the scripts do not deploy the resource.
20
-
f
21
27
You can run the scripts independently or run `create-all-resources.sh`. Simply update the [`config`](#configuration-file) prior to running the scripts:
22
28
23
29
|Script|Description|
24
30
|----|---|
25
-
|[create-resource-group.sh](create-resource-group.sh)|Create a resource group|
26
-
|[create-network.sh](create-network.sh)|Create virtual cloud network. <br><br>ADB must be deployed to a delegated subnet. In addition, ADB access is thru a private endpoint. This means it must be accessed from either the same VCN or another privileged network.|
31
+
|[create-network.sh](create-network.sh)|Creates a VPC Network and subnet with required firewall rules. ADB is accessed thru a private endpoint on this network. The VM is deployed to this network and can be used to work with ADB.|
27
32
|[create-adb.sh](create-adb.sh)|Create an Autonomous Database|
28
-
|[create-compute-vm.sh](create-compute-vm.sh)|Create a VM in that VCN|
29
-
|[create-all-resources.sh](create-all-resources.sh)|Creates your resource group, network, ADBand VM|
30
-
|[create-data-lake-storage.sh](create-data-lake-storage.sh)|Creates an Azure Data Lake Gen 2 storage account, a container and uploads sample data into that container|
33
+
|[create-compute-vm.sh](create-compute-vm.sh)|Create a VM in that VPC. By default, a Windows VM is created and can be accessed via RDP. After running this script, you can set up the password by running: <br>`source config`<br>`gcloud compute reset-windows-password $VM_NAME --zone=$REGION-a`|
34
+
|[create-all-resources.sh](create-all-resources.sh)|Creates your network, ADB, VM and Cloud Storage bucket.|
35
+
|[create-data-lake-storage.sh](create-data-lake-storage.sh)|Creates a bucket on Cloud Storage and uploads sample data into that bucket|
31
36
|[delete-all-resources.sh](delete-all-resources.sh)|Deletes your resource group, network, ADB and VM|
37
+
|[show-adb-info.sh](show-adb-info.sh)|Shows information about your ADB - including you JDBC connection details to the HIGH service|
38
+
|[show-data-lake-storage-info.sh](show-data-lake-storage-info.sh)|Shows information about your data lake storage - including the storage endpoint URL|
32
39
33
40
### Configuration file
34
-
The Azure cli deployment scripts rely on settings found in the config file. These resources **will be created** by the scripts. Update the config file prior to running any of the scripts.
41
+
The gcloud CLI deployment scripts rely on settings found in the config file. These resources **will be created** by the scripts. Update the config file prior to running any of the scripts.
35
42
36
43
>**IMPORTANT:** This file will contain a password that is used to connect to Autonomous Database and the virtual machine. Set the file's permissions so that only the file's owner can view its contents:
37
44
```bash
@@ -40,30 +47,30 @@ chmod 600 config
40
47
41
48
|Setting|Description|Example|
42
49
|----|----|----|
43
-
|LOCATION|Region where resources will be deployed. [See documentation](https://docs.oracle.com/en-us/iaas/Content/database-at-azure/oaa_regions.htm) for regions where Oracle Database 23ai is available|"eastus"|
44
-
|RESOURCE_GROUP|Target resource group for new resources|"development"|
50
+
|REGION|Region where resources will be deployed. [See documentation](https://docs.oracle.com/en-us/iaas/Content/database-at-gcp/oagcp-regions.htm) for region availability|"us-east4"|
51
+
|PROJECT|Target Google Cloud project for new resources|"development"|
52
+
|USER_PASSWORD|The password for the Autonomous Database admin user|"watchS0meMovies#"|
45
53
|ADB_NAME|Autonomous Database name. This name must be unique within a region location|"quickstart"|
46
-
|VNET_NAME|Virtual network|"dev-vnet"|
54
+
|SUBNET_DB_IP_RANGE|IP address range used for ADB. It can not overlap with the client subnet range. It can overlap with other ADB instances.|"192.168.11.0/24"|
55
+
|VPC_NETWORK_NAME|Name of the VPC Network|"dev-network"|
47
56
|VNET_PREFIX|CIDR range for the virtual network|"192.168.0.0/16"|
48
-
|SUBNET_NAME|Delegated subnet where the database will be deployed|"dev-sn-db"|
49
-
|SUBNET_PREFIX|CIDR range for the delegated subnet|"192.168.1.0/24"|
50
-
|SUBNET2_NAME|Client subnet. The VM will be deployed to this subnet|"dev-sn-client"|
51
-
|SUBNET2_PREFIX|CIDR range for the client subnet|"192.168.2.0/24"|
52
-
|NSG_NAME|Name of the network security group used by the client subnet|$SUBNET2_NAME-nsg|
53
-
|VM_NAME|Name of the virtual machine|"adb-vm-client"|
54
-
|VM_PREFERRED_SIZES|A list of VM sizes. Change these values based on region availability. The script will attempt to create a VM based on the order listed|( "Standard_GS1" "Standard_DC1s_v2" "Standard_DC2s_v2" "Standard_DC2ads_v5" "Standard_L4s" )|
55
-
|VM_IMAGE|The image used by the VM|"MicrosoftWindowsDesktop:Windows-11:win11-22h2-pro:latest"|
56
-
|STORAGE_ACCOUNT_NAME|The name of an Azure Data Lake Storage Gen 2 account. This name must be unique across Azure. Sample data files will be uploaded into this storage account.|"mytenancysamplestorageaccount"|
57
-
|STORAGE_CONTAINER_NAME|The name of the container where files will be uploaded|"adb-sample"|
58
-
|USER_NAME|The name of the user for the virtual machine|"adb"|
59
-
|USER_PASSWORD|The password for both the VM and the Autonomous Database admin user|"Welcome1234#abcd"|
57
+
|SUBNET_CLIENT_NAME|Name of the client subnet where the VM is deployed|"dev-sn-client"|
58
+
|SUBNET_CLIENT_IP_RANGE|CIDR range for the client subnet|"192.168.10.0/24"|
59
+
|VM_NAME|Name of the virtual machine|"dev-vm-client"|
60
+
|VM_IMAGE_FAMILY|The image deployed to the VM |"windows-2022"|
61
+
|VM_MACHINE_TYPE|The type of VM deployed|"e2-standard-4"|
62
+
|BUCKET_NAME|The name of the cloud storage bucket where sample files will be uploaded.|"adb-sample-quickstart"|
63
+
60
64
61
65
### Using the scripts
62
-
Log into azure: after updating the config file:
66
+
Make sure that you have enabled APIs for your project. [See the documentation](https://cloud.google.com/endpoints/docs/openapi/enable-api) for details.
63
67
68
+
Log into Google Cloud from the CLI:
64
69
```bash
65
-
az login
70
+
gcloud auth login
66
71
```
72
+
73
+
Update the config file
67
74
Then, run your scripts. The following will deploy a complete environment, but you can also install independent components. Just make sure you install dependencies (e.g. a VCN prior to Autonomous Database):
68
75
69
76
Creating all of the resources will take approximately 15-20 minutes.
@@ -80,6 +87,8 @@ Connect to your Autonomous Database!
80
87
* Use these great VS Code extensions that help you develop and debug your database apps:
81
88
* SQL Developer for VS Code ([Learn More](https://www.oracle.com/database/sqldeveloper/vscode/) | [Marketplace](https://marketplace.visualstudio.com/items?itemName=Oracle.sql-developer))
82
89
* Oracle Developer Tools for VS Code ([Learn More](https://docs.oracle.com/en/database/oracle/developer-tools-for-vscode/getting-started/gettingstarted.html) | [Marketplace](https://marketplace.visualstudio.com/items?itemName=Oracle.oracledevtools))
90
+
*[Use the sample scripts](../../sql/README.md) to learn how to use different features - like Select AI, data lake integration, JSON, and more.
91
+
83
92
84
93
#### JDBC Example:
85
94
JDBC is a common way to connect to Autonomous Database. For example, you can use the **Custom JDBC URL** in the VS Code SQL Developer Extension:
# Copyright (c) 2024 Oracle and/or its affiliates.
2
+
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
3
+
4
+
# update the values below to match your requirements
5
+
# example: us-east4
6
+
REGION=""
7
+
PROJECT=""
8
+
9
+
## IDENTITIES
10
+
# The password must be between 12 and 30 characters long and must include at least one uppercase letter, one lowercase letter, and one numeric character
11
+
# example: watchS0meMovies#
12
+
USER_PASSWORD=""
13
+
14
+
## ADB properties
15
+
# Database name. This will be used for the display name as well.
16
+
ADB_NAME="quickstart"
17
+
18
+
# ADB IP range. It can not overlap with the client subnet range
# Copyright (c) 2024 Oracle and/or its affiliates.
2
+
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
3
+
4
+
# update the values below to match your requirements
5
+
# example: us-east4
6
+
REGION=""
7
+
PROJECT=""
8
+
9
+
## IDENTITIES
10
+
# The password must be between 12 and 30 characters long and must include at least one uppercase letter, one lowercase letter, and one numeric character
11
+
# example: watchS0meMovies#
12
+
USER_PASSWORD=""
13
+
14
+
## ADB properties
15
+
# Database name. This will be used for the display name as well.
16
+
ADB_NAME="quickstart"
17
+
18
+
# ADB IP range. It can not overlap with the client subnet range
0 commit comments