Dataskope Configuration
Configuring Data Touch to Connect to Dataskope DAM and Elasticsearch¶
Before running Data Touch for the first time, you must configure the connection to:
- The Dataskope DAM REST API.
- The Elasticsearch cluster.
Use the provided script to set up these configurations and verify connectivity.
1. DAM Configuration¶
The first step is to configure and test the connection to the Dataskope DAM REST API.
Required Variables:¶
- DAM_URL: The URL of the Dataskope DAM REST API.
- DAM_USERNAME: The username for DAM authentication.
- DAM_PASSWORD: The password for DAM authentication.
Steps¶
Run the Script¶
Use the following command to start the configuration process:
./config.sh connect_dataskope
All sensitive information is encrypted.
This script securely retrieves your DAM_USERNAME, DAM_PASSWORD, DAM_ELASTIC_USERNAME, and DAM_ELASTIC_PASSWORD values and encrypts them before writing them to the .env file.
Enter Configuration Values¶
The script will prompt you to enter the following values. If you press Enter without providing a value, the script will use the default values shown in parentheses:
The DAM URL must be entered in the specified format.
- DAM_URL: Default is
https://192.168.185.111:8443 - DAM_USERNAME: Default is
dev - DAM_PASSWORD: Default is
VqByiI7tJJZX65uP2jDxVA==
Test DAM Connection¶
The script will test connectivity to the DAM REST API by attempting to authenticate using the supplied credentials.
- If authentication is successful, the script will display a success message:
Text Only
✅ Successfully authenticated with DAM endpoint - If authentication fails:
- You will be prompted to retry with different credentials.
- You can retry up to 3 times before the script exits with an error.
Example Output¶
Below is an example of the script output during the DAM configuration process:
=== DAM Configuration ===
Enter DAM_URL (default: https://192.168.185.111:8443):
Enter DAM_USERNAME (default: dev):
Enter DAM_PASSWORD (default: VqByiI7tJJZX65uP2jDxVA==):
Testing DAM REST endpoint connectivity... (Attempt 1/3)
Attempting to obtain authentication token...
Response from DAM endpoint:
----------------------------------------
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "Bearer",
"expires_in": 3600
}
----------------------------------------
✅ Successfully authenticated with DAM endpoint
2. Elasticsearch Configuration¶
The second step is to configure and test the connection to the Elasticsearch cluster.
Required Variables¶
- DAM_ELASTIC_HOSTNAME: The hostname or URL of the Elasticsearch cluster.
- DAM_ELASTIC_USERNAME: The username for Elasticsearch authentication.
- DAM_ELASTIC_PASSWORD: The password for Elasticsearch authentication.
Steps¶
Enter Configuration Values¶
After completing the DAM configuration, the script will prompt you to enter the following Elasticsearch variables. If you press Enter without providing a value, the script will use the default values shown in parentheses:
- DAM_ELASTIC_HOSTNAME: Default is
http://192.168.185.111:9200 - DAM_ELASTIC_USERNAME: Default is
elastic - DAM_ELASTIC_PASSWORD: Default is
BTb0vkkbYzdM0ejsKYrg
Test Elasticsearch Connection¶
The script will test connectivity to the Elasticsearch cluster by querying the cluster health endpoint.
- If the connection is successful, the script will display a success message:
Text Only
✅ Successfully connected to Elasticsearch - If the connection fails:
- You will be prompted to retry with different credentials.
- You can retry up to 3 times before the script exits with an error.
Example Output¶
Below is an example of the script output during the Elasticsearch configuration process:
=== Elasticsearch Configuration ===
Enter DAM_ELASTIC_HOSTNAME (default: http://192.168.185.111:9200):
Enter DAM_ELASTIC_USERNAME (default: elastic):
Enter DAM_ELASTIC_PASSWORD (default: BTb0vkkbYzdM0ejsKYrg):
Testing Elasticsearch connectivity... (Attempt 1/3)
Response from Elasticsearch:
----------------------------------------
{
"cluster_name": "elasticsearch",
"status": "green",
"number_of_nodes": 3,
"active_shards": 10
}
----------------------------------------
✅ Successfully connected to Elasticsearch
Finalizing the Configuration¶
Once both the DAM and Elasticsearch configurations are successfully completed, the script will automatically update the .env file with the provided values.
Example Output¶
=== Final Configuration ===
DAM_URL: https://192.168.185.111:8443
DAM_USERNAME: dev
DAM_PASSWORD: VqByiI7tJJZX65uP2jDxVA==
DAM_ELASTIC_HOSTNAME: http://192.168.185.111:9200
DAM_ELASTIC_USERNAME: elastic
DAM_ELASTIC_PASSWORD:
Updating .env with encrypted passwords...
✅ Environment has been updated successfully with encrypted passwords!
Updating .env¶
The following values will be updated in the .env file:
DAM_URLDAM_USERNAMEDAM_PASSWORDDAM_ELASTIC_HOSTNAMEDAM_ELASTIC_USERNAMEDAM_ELASTIC_PASSWORD
Ensure the docker-compose.yml file is present in the same directory as the script before running it.
Error Handling¶
-
DAM Connection Errors
- If authentication with the DAM REST API fails, you will have up to 3 retries to enter updated credentials.
- After the 3rd failed attempt, the script will exit with an error.
-
Elasticsearch Connection Errors
- If the connection to Elasticsearch fails, you will have up to 3 retries to enter updated credentials.
- After the 3rd failed attempt, the script will exit with an error.