Skip to content

Commit 1a752b4

Browse files
authored
Merge pull request #180 from erabil-mdb/DOCSP-31036
(DOCSP-31036) Adds example data federation config file.
2 parents 4d42a90 + 5bc9d0a commit 1a752b4

File tree

4 files changed

+189
-0
lines changed

4 files changed

+189
-0
lines changed

snooty.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ toc_landing_pages = [
2525

2626
[constants]
2727
aagent = "Automation Agent"
28+
adf = "Atlas Data Federation"
2829
atlas-cli = "Atlas CLI"
2930
atlas-cli-full = "MongoDB Atlas CLI"
3031
atlas-cli-version = "1.9.1"
@@ -42,6 +43,9 @@ data-lake-store = "data store"
4243
database-deployment = "database deployment"
4344
database-deployments = "database deployments"
4445
default-profile = ":ref:`default profile <mcli-profiles>`"
46+
df = "Data Federation"
47+
FDI = "Federated Database Instance"
48+
fdi = "federated database instance"
4549
mcli = "MongoDB CLI"
4650
mcli-long = "MongoDB Command Line Interface (``mongocli``)"
4751
mcli-version = "1.23.1"
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"cloudProviderConfig": {
3+
"aws": {
4+
"externalId": "2fe853d3-4b5b-4le0-9414-s3b6ab040ccb",
5+
"iamAssumedRoleARN": "arn:aws:iam::123456789012:root",
6+
"roleId": "MY_ROLE"
7+
}
8+
},
9+
"dataProcessRegion": {
10+
"cloudProvider": "AWS",
11+
"region": "SYDNEY_AUS"
12+
},
13+
"groupId": "32y6e74b3g91947azb20e3b8",
14+
"hostnames": [
15+
"federateddatabaseinstance5-0ywks.a.query.myhost.com:37017"
16+
],
17+
"name": "FederatedDatabaseInstance0",
18+
"state": "ACTIVE",
19+
"storage": {
20+
"databases": [
21+
{
22+
"collections": [
23+
{
24+
"dataSources": [
25+
{
26+
"allowInsecure": false,
27+
"collection": "my-collection",
28+
"collectionRegex": "^list",
29+
"database": "my-database",
30+
"databaseRegex": ".*",
31+
"defaultFormat": ".avro",
32+
"path": "/foo/path",
33+
"provenanceFieldName": "my-prov",
34+
"storeName": "my-store",
35+
"urls": [
36+
"https://atlas-data-lake.s3.amazonaws.com/json/sample_airbnb/listingsAndReviews.json","https://atlas-data-lake.s3.amazonaws.com/json/sample_weatherdata/data.json"
37+
]
38+
}
39+
],
40+
"name": "my-collection-mdb"
41+
}
42+
],
43+
"maxWildcardCollections": 100,
44+
"name": "my-database-mdb",
45+
"views": [
46+
{
47+
"name": "my-view",
48+
"pipeline": "[{"$group": {"_id": "$status","count": {"$sum": 1 }},"text": { "$push": "$text" }}},{ "$sort": {"count": 1 }}]",
49+
"source": "my-source-collection"
50+
}
51+
]
52+
}
53+
],
54+
"stores": [
55+
{
56+
"name": "egAtlasStore",
57+
"provider": "atlas",
58+
"additionalStorageClasses": [
59+
"STANDARD"
60+
],
61+
"bucket": "sample-data-atlas",
62+
"delimiter": "/",
63+
"includeTags": false,
64+
"prefix": "/sample",
65+
"public": false,
66+
"region": "US_GOV_WEST_1"
67+
}
68+
]
69+
}
70+
}

source/reference/json.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ you can pass a configuration file when using the {+atlas-cli+} to:
1919
- :ref:`Update a cloud backup schedule <atlas-backups-schedule-update>`.
2020
- :ref:`Create <atlas-clusters-search-indexes-create>` or
2121
:ref:`update an Atlas Search Index <atlas-clusters-search-indexes-update>`.
22+
- :ref:`Create a {+df+} database <atlas-dataFederation-create>`.
2223

2324
Usage
2425
-----
@@ -53,6 +54,9 @@ command. The commands you can use include but are not limited to:
5354
* - :ref:`atlas-clusters-search-indexes-update`
5455
- :oas-atlas-op:`Update One Atlas Search Index </updateAtlasSearchIndex>`
5556

57+
* - :ref:`atlas-dataFederation-create`
58+
- :oas-atlas-op:`Create One Federated Database Instance in One Project </createFederatedDatabase>`
59+
5660
When you run the command in your terminal, specify the ``--file`` option
5761
and provide the path to the |json| configuration file that defines your
5862
desired settings.
@@ -109,9 +113,17 @@ To learn more about |fts| index configuration files, see
109113
:ref:`atlas-cli-search-index-config-file`. For a sample file,
110114
see :ref:`example-search-index-config-file`.
111115

116+
{+adf+} Configuration File
117+
----------------------------------------
118+
119+
To learn more about {+adf+} configuration files, see
120+
:ref:`atlas-cli-data-federation-config-file`. For a sample file,
121+
see :ref:`example-fdi-config-file`.
122+
112123
.. toctree::
113124
:titlesonly:
114125

115126
/reference/json/cluster-config-file
116127
/reference/json/cloud-backup-schedule-config-file
128+
/reference/json/data-federation-config-file
117129
/reference/json/search-index-config-file
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
.. _atlas-cli-data-federation-config-file:
2+
3+
========================================
4+
{+adf+} Configuration File
5+
========================================
6+
7+
.. contents:: On this page
8+
:local:
9+
:backlinks: none
10+
:depth: 1
11+
:class: singlecol
12+
13+
You can use an {+adf+} configuration file to specify the required
14+
settings for :ref:`creating a federated database
15+
<atlas-dataFederation-create>` using the {+atlas-cli+}. The
16+
{+atlas-cli+} accepts ``.json`` {+df+} configuration files.
17+
18+
Use the following resources to:
19+
20+
- Learn the :ref:`required settings <required-fdi-settings>` you
21+
can specify in the {+cluster+} configuration file.
22+
- View and copy :ref:`sample configuration files
23+
<example-fdi-config-file>`.
24+
25+
.. _required-fdi-settings:
26+
27+
Required {+adf+} Settings
28+
---------------------------------------
29+
30+
|service| requires the following settings to create a {+fdi+} with
31+
the {+atlas-cli+}. You must specify these {+fdi+} settings either in the configuration
32+
file or as flags in the command:
33+
34+
.. list-table::
35+
:header-rows: 1
36+
:widths: 20 10 70
37+
38+
* - Field
39+
- Type
40+
- Description
41+
42+
* - ``cloudProviderConfig.``
43+
``aws``
44+
- object
45+
- Cloud provider linked to this {+fdi+}.
46+
47+
* - ``cloudProviderConfig.``
48+
``aws.``
49+
``roleId``
50+
- string
51+
- Unique identifier of the role that the {+fdi+} can use to access the data stores.
52+
Required if specifying ``cloudProviderConfig``.
53+
54+
* - ``cloudProviderConfig.``
55+
``aws.``
56+
``testS3Bucket``
57+
- string
58+
- Name of the |s3| data bucket that the provided role ID is authorized to access. Required if specifying ``cloudProviderConfig``.
59+
60+
* - ``dataProcessRegion.``
61+
``cloudProvider``
62+
- string
63+
- Name of the cloud service that hosts the {+fdi+}\'s data stores. For example, ``AWS``, ``GCP``, ``AZURE``, ``TENANT``, or ``SERVERLESS``.
64+
65+
* - ``dataProcessRegion.``
66+
``region``
67+
- string
68+
- Name of the region to which the {+fdi+} routes client connections. For the full
69+
list of available regions, see :ref:`Cloud Providers and Regions <create-cluster-cloud-provider-region>`.
70+
71+
* - ``name``
72+
- string
73+
- Human-readable label that identifies the {+fdi+}.
74+
75+
* - ``storage.``
76+
``stores.``
77+
``name``
78+
- string
79+
- Human-readable label that identifies the data store.
80+
The ``databases.[n].collections.[n].dataSources.[n].storeName`` field references
81+
this value as part of the mapping configuration. To use |service| as a data store,
82+
the {+fdi+} requires a serverless instance or an ``M10`` or higher {+cluster+}.
83+
84+
* - ``storage.``
85+
``stores.``
86+
``provider``
87+
- string
88+
- The :ref:`type of data store <config-adf>`. For example, ``atlas``, ``http``, ``online_archive``, ``s3``, or ``DataLakeAzureBlobStore``.
89+
90+
91+
For a full list of available settings, see
92+
the request body schema in the API specification:
93+
:oas-atlas-op:`Create One Federated Database Instance in One Project </createFederatedDatabase>`.
94+
95+
.. _example-fdi-config-file:
96+
97+
Example {+adf+} Configuration File
98+
------------------------------------------------
99+
100+
To create a {+fdi+}, specify the
101+
fields you want to update as shown in the following example file:
102+
103+
.. literalinclude:: /includes/data-federation-instance-config-file.json

0 commit comments

Comments
 (0)