Skip to content

Commit 079a031

Browse files
authored
Merge pull request #516 from NASA-PDS/docs/improve-user-and-connection-docs
Improve user documentation with procedural step-by-step instructions
2 parents c491410 + 60d42d4 commit 079a031

10 files changed

Lines changed: 524 additions & 583 deletions

File tree

docs/source/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
'sphinx.ext.autosectionlabel'
4040
]
4141

42+
autosectionlabel_prefix_document = True
43+
4244
# Add any paths that contain templates here, relative to this directory.
4345
templates_path = ['_templates']
4446

docs/source/connection-setup.rst

Lines changed: 89 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -5,139 +5,153 @@ Connection Setup
55
Overview
66
********
77

8-
This page provides the steps necessary to get going with data ingestion and
9-
querying of the PDS Registry Service on the cloud from the perspective of a Discipline
10-
Node (DN).
8+
Steps to connect a Discipline Node (DN) to the PDS Registry Service for data ingestion and querying.
119

12-
Initial Set-up
13-
**************
1410

15-
To get things going, you should have provided the Engineering Node contact with the following:
11+
Prerequisites
12+
*************
1613

17-
* A list of user email addresses which will be authorized to perform data ingestion.
18-
* A list of IP addresses or blocks of addresses from which data ingestion will occur.
14+
Before starting, contact the Engineering Node (pds-operator@jpl.nasa.gov) and provide:
1915

20-
The IP addresses are added to an access whitelist.
16+
1. A list of user email addresses that need data ingestion access.
17+
2. A list of IP addresses or CIDR blocks from which ingestion will occur.
2118

22-
Opensearch accounts will be set up for each user and their username and (temporary)
23-
password will be sent to them.
19+
The Engineering Node will:
2420

25-
Along with your Opensearch user credentials you will receive configuration inputs for your tools to connect to the registry services.
21+
- Add your IPs to the access whitelist.
22+
- Create OpenSearch accounts and send each user their username and temporary password.
23+
- Send configuration inputs for connecting your tools to the registry.
2624

27-
The following sections provide the steps to follow to have your connection set up.
2825

29-
Changing Your Opensearch Password
30-
*********************************
26+
Change Your OpenSearch Password
27+
********************************
3128

32-
To update your user password click `here <https://pds-prod-nucleus-dum.auth.us-west-2.amazoncognito.com/login?client_id=3rgdgts818hdrkas4q66lebum0&response_type=code&scope=email+openid&redirect_uri=https%3A%2F%2Fnasa-pds.github.io%2Fnucleus%2F>`_ and select "Forgot your password".
29+
1. Go to the `OpenSearch password reset page <https://pds-prod-nucleus-dum.auth.us-west-2.amazoncognito.com/login?client_id=3rgdgts818hdrkas4q66lebum0&response_type=code&scope=email+openid&redirect_uri=https%3A%2F%2Fnasa-pds.github.io%2Fnucleus%2F>`_.
30+
2. Select **Forgot your password** and follow the prompts.
3331

3432

35-
Registry Tools Configurations
36-
******************************
33+
Registry Tools Configuration
34+
*****************************
3735

38-
Have a Secure Directory For Your Configurations
39-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36+
Create a Secure Configuration Directory
37+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4038

41-
Create a secure directory to place config files: Two of the config files you will be creating should be placed in a secure location accessible only by the current user.
39+
Config files containing credentials must be stored in a directory accessible only by the current user.
4240

43-
On **Linux** and Linux-like Operating Systems:
41+
**Linux / macOS:**
4442

45-
Create new ``$HOME/.auth directory``
43+
1. Create the directory:
4644

47-
Change access to this directory to be only current user accessible only:
45+
.. code:: bash
4846
49-
.. code:: bash
47+
mkdir -p $HOME/.pds
5048
51-
chmod 700 $HOME/.auth
49+
2. Restrict access to the current user only:
5250

51+
.. code:: bash
5352
54-
On **Windows**:
53+
chmod 700 $HOME/.pds
5554
56-
Take the necessary precautions so that the directory is not readable by anyone but its owner.
55+
**Windows:**
5756

57+
1. Create the ``%USERPROFILE%\.pds`` directory.
58+
2. Set folder permissions so only your user account has read/write access.
5859

59-
Authentication file
60-
~~~~~~~~~~~~~~~~~~~~
6160

62-
Create Harvest authentication file
63-
Create a ``registry-auth.txt`` file with your username and password, and place it in the secure location created above.
61+
Create the Authentication File
62+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6463

65-
.. code:: javascript
64+
Name the file to include the venue (``dev``, ``test``, or ``prod``) so credentials for each environment are kept separate, e.g. ``registry-auth-prod.txt``.
6665

67-
user = {username sent by Engineering Node}
68-
password = {your password}
66+
1. Create ``$HOME/.pds/registry-auth-{venue}.txt`` with the credentials provided by the Engineering Node:
6967

68+
.. code:: text
7069
71-
Registry Client Environment
72-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70+
user = {username sent by Engineering Node}
71+
password = {your password}
7372
74-
Create Registry Client environment variables file (registry-client.env):
73+
2. Restrict the file to the current user:
7574

76-
Engineering Node (pds-operator@jpl.nasa.gov) will provide you with a config file containing necessary Registry OpenSearch configuration information.
75+
.. code:: bash
7776
78-
On **Linux** and Linux-like Operating Systems:
77+
chmod 600 $HOME/.pds/registry-auth-{venue}.txt
7978
80-
Update this file with your username and password.
8179
82-
As needed, update the setting of the environment variables to match the shell you are using.
80+
Create the Registry Client Environment File
81+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8382

84-
Place in the secure location created above.
83+
The Engineering Node will provide a ``registry-client.env`` file with OpenSearch connection settings. Rename it to include the venue (e.g. ``registry-client-prod.env``) before placing it in ``$HOME/.pds/``.
8584

86-
On **Windows**:
85+
**Linux / macOS:**
8786

88-
The environment variables noted will need to be set manually through the Windows console.
87+
1. Open the provided ``registry-client-{venue}.env`` file.
88+
2. Update the ``user`` and ``password`` fields with your credentials.
89+
3. Adjust the environment variable export syntax if needed for your shell (``bash``, ``zsh``, etc.).
90+
4. Place the file in ``$HOME/.pds/``.
8991

90-
OpenSearch Connection Configuration File, For Harvest and Registry Manager
91-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
92+
**Windows:**
9293

93-
Create OpenSearch connection configuration file, e.g. sbn_mcp_prod.xml or sbn_mcp_test.xml.
94+
1. Open the provided ``registry-client-{venue}.env`` file.
95+
2. Set each variable listed in the file as a Windows environment variable via **System Properties → Environment Variables**.
96+
97+
98+
Create the OpenSearch Connection Configuration File
99+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
100+
101+
The Engineering Node will send you this file, already named using the pattern ``registry-config-{node}-{venue}.xml`` (e.g. ``registry-config-sbn-dev.xml``, ``registry-config-sbn-test.xml``, ``registry-config-sbn-prod.xml``).
102+
103+
1. Place the file in ``$HOME/.pds/``.
94104

95105
.. note::
96-
Engineering Node (pds-operator@jpl.nasa.gov) will provide you with the content of the file.
106+
Contact pds-operator@jpl.nasa.gov if you have not received this file.
107+
97108

109+
Next Steps
110+
~~~~~~~~~~
98111

99-
Run Registry Tools on AWS
100-
~~~~~~~~~~~~~~~~~~~~~~~~~
112+
Once setup is complete, proceed to:
101113

102-
You can run harvest on AWS, on ECS or EC2 directly.
114+
- :doc:`Install </install/install>`
115+
- :doc:`User Tasks </user/tasks>`
103116

104-
Run Harvest On EC2
105-
-------------------
117+
.. note::
118+
If you are running Harvest on AWS EC2 or ECS, see :ref:`connection-setup:Additional Setup for AWS` before proceeding.
106119

107-
You can run Harvest on EC2, as anywhere else, using the Cognito authentication and configurations described above.
108120

109-
However, to be able to access the PDS Registry which is also hosted on AWS, on a different AWS account, you must disable “Private DNS names” in the VPC endpoint of the API gateway, otherwise the PDS Registry API gateway requests will be redirected to your own account and fail.
121+
Additional Setup for AWS
122+
************************
110123

111-
See the AWS console screenshot, you should have **No** instead of **Yes** here:
124+
Run Harvest on EC2
125+
~~~~~~~~~~~~~~~~~~
112126

113-
.. image:: _static/images/aws_console_vpc.png
127+
Harvest on EC2 uses the same Cognito authentication and config files described above.
114128

115-
If you need to change that in your AWS account, double check that all your other applications still work.
129+
If your EC2 instance is on a **different AWS account** than the PDS Registry, you must disable **Private DNS names** on the VPC endpoint for the API gateway. Without this change, API gateway requests are redirected to your own account and will fail.
116130

131+
1. In the AWS Console, open the VPC endpoint for the API gateway.
132+
2. Set **Enable private DNS names** to **No**.
117133

134+
.. image:: _static/images/aws_console_vpc.png
118135

119-
Run Harest On ECS
120-
-------------------
136+
3. Verify that your other applications still function after this change.
121137

122-
You can run harvest on ECS, as on EC2 using the Cognito authentication.
123138

124-
Alternatively if you run harvest, on ECS, on the same AWS account as the Registry service, you can also configure the connexion to the Registry without Cognito authentication, as follows:
139+
Run Harvest on ECS
140+
~~~~~~~~~~~~~~~~~~
125141

126-
.. code:: xml
142+
**Option A — Cognito authentication (cross-account or external):**
127143

128-
<?xml version="1.0" encoding="UTF-8"?>
129-
<registry_connection index="en-registry">
130-
<ec2_credential_url endpoint="https://<abcdefg>.us-west-2.aoss.amazonaws.com">http://169.254.170.2/AWS_CONTAINER_CREDENTIALS_RELATIVE_URI</ec2_credential_url>
131-
</registry_connection>
144+
Use the same Cognito authentication and config files described above.
132145

133-
vThe ECS task role must give you access to the Registry Opensearch Serverless Collection.
146+
**Option B — IAM role authentication (same AWS account as the Registry):**
134147

148+
1. Configure the connection file as follows, replacing the endpoint with the one provided by the Engineering Node:
135149

136-
Next steps
137-
~~~~~~~~~~~
150+
.. code:: xml
138151
139-
Once the above setup is complete, the Registry Tools are used to process and ingest product
140-
metadata into the Registry. Details on how to install and run these tools are found in:
152+
<?xml version="1.0" encoding="UTF-8"?>
153+
<registry_connection index="en-registry">
154+
<ec2_credential_url endpoint="https://<abcdefg>.us-west-2.aoss.amazonaws.com">http://169.254.170.2/AWS_CONTAINER_CREDENTIALS_RELATIVE_URI</ec2_credential_url>
155+
</registry_connection>
141156
142-
- :doc:`Install </install/install>`
143-
- :doc:`User Tasks </user/tasks>`
157+
2. Ensure the ECS task role has access to the Registry OpenSearch Serverless Collection.

0 commit comments

Comments
 (0)