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
Quickly test [Fully Managed Azure Cosmos DB V2 Sink](https://docs.confluent.io/cloud/current/connectors/cc-azure-cosmos-sink-v2.html) connector.
8
+
9
+
## Prerequisites
10
+
11
+
See [here](https://kafka-docker-playground.io/#/how-to-use?id=%f0%9f%8c%a4%ef%b8%8f-confluent-cloud-examples)
12
+
13
+
14
+
## How to run
15
+
16
+
Simply run:
17
+
18
+
```
19
+
$ just use <playground run> command
20
+
```
21
+
22
+
Note if you have multiple [Azure subscriptions](https://github.com/MicrosoftDocs/azure-docs-cli/blob/main/docs-ref-conceptual/manage-azure-subscriptions-azure-cli.md#change-the-active-subscription) make sure to set `AZURE_SUBSCRIPTION_NAME` environment variable to create Azure resource group in correct subscription (for confluent support, subscription is `COPS`).
log "Delete Cosmos DB instance and resource group (it might fail)"
33
+
az cosmosdb delete -g $AZURE_RESOURCE_GROUP -n $AZURE_COSMOSDB_SERVER_NAME --yes
34
+
az group delete --name $AZURE_RESOURCE_GROUP --yes
35
+
set -e
36
+
37
+
log "Creating Azure Resource Group $AZURE_RESOURCE_GROUP"
38
+
az group create \
39
+
--name $AZURE_RESOURCE_GROUP \
40
+
--location $AZURE_REGION \
41
+
--tags owner_email=$AZ_USER
42
+
43
+
sleep 10
44
+
45
+
log "Creating Cosmos DB server $AZURE_COSMOSDB_SERVER_NAME"
46
+
az cosmosdb create \
47
+
--name $AZURE_COSMOSDB_SERVER_NAME \
48
+
--resource-group $AZURE_RESOURCE_GROUP \
49
+
--locations regionName=$AZURE_REGION
50
+
51
+
functioncleanup_cloud_resources {
52
+
set +e
53
+
log "Delete Cosmos DB instance"
54
+
check_if_continue
55
+
az cosmosdb delete -g $AZURE_RESOURCE_GROUP -n $AZURE_COSMOSDB_SERVER_NAME --yes
56
+
57
+
log "Deleting resource group $AZURE_RESOURCE_GROUP"
58
+
check_if_continue
59
+
az group delete --name $AZURE_RESOURCE_GROUP --yes --no-wait
60
+
}
61
+
trap cleanup_cloud_resources EXIT
62
+
63
+
log "Create the database"
64
+
az cosmosdb sql database create \
65
+
--name $AZURE_COSMOSDB_DB_NAME \
66
+
--resource-group $AZURE_RESOURCE_GROUP \
67
+
--account-name $AZURE_COSMOSDB_SERVER_NAME \
68
+
--throughput 400
69
+
70
+
log "Create the container"
71
+
az cosmosdb sql container create \
72
+
--name $AZURE_COSMOSDB_CONTAINER_NAME \
73
+
--resource-group $AZURE_RESOURCE_GROUP \
74
+
--account-name $AZURE_COSMOSDB_SERVER_NAME \
75
+
--database-name $AZURE_COSMOSDB_DB_NAME \
76
+
--partition-key-path "/id"
77
+
78
+
# With the Azure Cosmos DB instance setup, you will need to get the Cosmos DB endpoint URI and primary connection key. These values will be used to setup the Cosmos DB Source and Sink connectors.
- <imgsrc="https://github.com/vdesabou/kafka-docker-playground/raw/master/images/icons/cosmosdb.png"width="15"> [Azure Cosmos DB Sink](https://github.com/vdesabou/kafka-docker-playground/tree/master/ccloud/fm-azure-cosmosdb-sink):ccloud/fm-azure-cosmosdb-sink:
199
+
- <imgsrc="https://github.com/vdesabou/kafka-docker-playground/raw/master/images/icons/cosmosdb.png"width="15"> [Azure Cosmos DB V2 Sink](https://github.com/vdesabou/kafka-docker-playground/tree/master/ccloud/fm-azure-cosmosdb-v2-sink):ccloud/fm-azure-cosmosdb-v2-sink:
199
200
- <imgsrc="https://github.com/vdesabou/kafka-docker-playground/raw/master/images/icons/cosmosdb.png"width="15"> [Azure Cosmos DB Source](https://github.com/vdesabou/kafka-docker-playground/tree/master/ccloud/fm-azure-cosmosdb-source):ccloud/fm-azure-cosmosdb-source:
200
201
- <imgsrc="https://github.com/vdesabou/kafka-docker-playground/raw/master/images/icons/cosmosdb.png"width="15"> [Azure Cosmos DB V2 Source](https://github.com/vdesabou/kafka-docker-playground/tree/master/ccloud/fm-azure-cosmosdb-v2-source):ccloud/fm-azure-cosmosdb-v2-source:
201
202
- <imgsrc="https://github.com/vdesabou/kafka-docker-playground/raw/master/images/icons/data_lake_gen1.png"width="15"> [Azure Data Lake Storage Gen2 Sink](https://github.com/vdesabou/kafka-docker-playground/tree/master/ccloud/fm-azure-data-lake-storage-gen2-sink):ccloud/fm-azure-data-lake-storage-gen2-sink:
0 commit comments