Skip to content

Commit

Permalink
(DOCSP-35915): Edge Server: Update configuration details (mongodb#665)
Browse files Browse the repository at this point in the history
* Update the Edge Server configuration details

* Fix syntax and remove link
  • Loading branch information
dacharyc authored and MongoCaleb committed Jun 3, 2024
1 parent 2919e12 commit 148449c
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 10 deletions.
47 changes: 40 additions & 7 deletions source/edge-server/configure.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
Configure Edge Server
=====================

.. meta::
:keywords: code example
:description: Learn how to download, install, configure, and run a MongoDB Edge Server.

.. facet::
:name: genre
:values: tutorial

.. contents:: On this page
:local:
:backlinks: none
Expand Down Expand Up @@ -187,7 +195,8 @@ Set up and run the Edge Server on the host.
"clientAppId": "YOUR-APP-ID",
"query": "*",
"cloudSyncServerAuthSecret": "YOUR-AUTH-SECRET",
"hostname": "YOUR-EDGE-SERVER-DOMAIN",
"httpListenPort": 80,
"wireprotocolListenPort": 27021,
"tls" : {
"enabled": false,
"certificates": [
Expand Down Expand Up @@ -254,10 +263,14 @@ Set up and run the Edge Server on the host.
Representative provided when you contacted them to get
Edge Server enabled for your App.

* - ``hostname``
- The public DNS of your host. This should resemble something
like ``ec2-13-58-70-88.us-east-2.compute.amazonaws.com``.
For localhost, set this value to ``localhost:80``.
* - ``httpListenPort``
- The port on which Edge Server listens for HTTP connections. The
default value is ``80``.

* - ``wireprotocolListenPort``
- The port on which Edge Server listens for MongoDB wireprotocol
connections, such as connections from a MongoDB Driver. The
default value is ``27021``.

* - ``tls``
- A configuration object that includes the Transport Layer
Expand All @@ -282,7 +295,6 @@ Set up and run the Edge Server on the host.

The following example shows an Edge Server configuration file that:

- Runs on an EC2 instance.
- Syncs data with two collections: ``Item`` and ``Project``.
The ``Project`` collection has a list property that represents
a :ref:`to-many relationship <relationships-to-many>` to the
Expand All @@ -299,7 +311,8 @@ Set up and run the Edge Server on the host.
"Project": "truepredicate"
},
"cloudSyncServerAuthSecret": "3814f3fb7befe2eef66ee01781ae245a",
"hostname": "ec2-13-58-70-88.us-east-2.compute.amazonaws.com",
"httpListenPort": 80,
"wireprotocolListenPort": 27021,
"tls" : {
"enabled": true,
"certificates": [
Expand Down Expand Up @@ -332,6 +345,26 @@ Set up and run the Edge Server on the host.
in the :file:`README.md` in the ``edge_server`` directory. Follow the
instructions to install the required dependencies.

.. step:: Specify Additional Configuration Details (Optional)

You can run ``make`` to build the Edge Server. This creates a
``build/`` directory that contains an :file:`edge_config.json`
file. This configuration contains many additional fields you can change
if you need to customize Edge Server configuration details.

For example, an Edge Server running on EC2 would set the ``"baseURL"``
for applications to connect to the Edge Server to the public DNS of the
EC2 instance, similar to
``"http://ec2-13-58-70-88.us-east-2.compute.amazonaws.com"``.

The default configuration values let you run an Edge Server instance
on local hardware, and connect to it through ``http://localhost:80``.

While Edge Server is still in Private Preview, the configuration and
accepted values are expected to change. When Edge Server is available
for Public Preview, the configuration details are expected to be more
stable and documentation will be added with these details.

.. _start-and-stop-edge-server:

Start and Stop the Edge Server
Expand Down
9 changes: 6 additions & 3 deletions source/edge-server/connect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
Connect to an Edge Server
=========================

.. meta::
:keywords: code example
:description: Connect to a MongoDB Edge Server from Atlas Device SDK or a MongoDB Driver.

.. facet::
:name: genre
:values: tutorial
Expand Down Expand Up @@ -36,8 +40,7 @@ Connect to the Edge Server from the Device SDK
To connect to the Edge Server from a Device SDK client, your app must:

- Set the Sync URL on the App configuration to the public-accessible DNS
address you set in the Edge Server
:ref:`config's <edge-server-install-and-configure>` ``hostname``
address you set in the Edge Server :file:`edge_config.json` ``baseURL``
field.
- If TLS is not enabled, use HTTP over port 80.

Expand Down Expand Up @@ -83,7 +86,7 @@ modifications you can make to the :github:`Swift template app
- The public-accessible DNS of your Edge Server's host.
This is ``http://``, or if TLS is enabled, ``https://``,
followed by the same value you set in your Edge Server
config's ``hostname`` field.
:file:`edge_config.json` ``baseURL`` field.

* - ``appId``
- The App ID of your App Services App that has Edge Server
Expand Down

0 comments on commit 148449c

Please sign in to comment.