- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
You may create your own Managed Node Types for use within your Tenant. Tenant Managed Node Types can be used to:
- Implement local, custom or insecure protocols.
- Implement remote functionality, including local providing user interfaces.
- Delivering a server to a remote location. Such a serer could support a database and an API, all accessible locally.
- Etc...
Creating
Creating the Docker image
Requirements:
- The imageUri that you specify when creating a Tenant Managed Node Type must reference either an Amazon ECR Public or an Amazon ECR Private repository.
- The Docker container created by starting the image at your imageUri will be started with no arguments.
- The Docker container will be started with the following environment variables set:
Variable | Description |
---|---|
APPSYNC_ENDPOINT | The URL for the EchoStream API. |
CLIENT_ID | The Amazon Cognito Client ID. Required for logging into EchoStream |
NAME | The name of the Node that your container is representing. |
PASSWORD | The password for the user in Amazon Cognito. Required for logging into EchoStream. |
TENANT | the name of the Tenant that the Node your container is representing is a part of. |
USER_POOL_ID | the Amazon Cognito User Pool ID. Required for logging into EchoStream. |
USER_NAME | The username of the user in Amazon Cognito. Required for logging into EchoStream. |
- All logging for the Docker container started with your imageUri will be done by the Managed App. Simply write any logs that you wish to be recorded to standard out or standard error.
- The Docker container started with you imageUri must run until the Managed App terminates it. Any container that terminates prior to this will be considered an error, and the Managed App will continuously try to restart it.
- Your Docker image must first log into EchoStream, then call
GetAwsCredentials
on your Managed App, and then use those credentials to access the EchoStream Cloud resources assigned to your Node.
Updating
Because there may be Managed Nodes created using your Managed Node Type, the only meaningful attribute that you may update is the imageUri
. Updating the imageUri
will result in a restart and pull of the new image of all Managed Nodes that were created using the Managed Node Type.
Note - the Docker image at the new imageUri must be backwards-compatible with the Docker image it is replacing regarding mount, port and config requirements.
Deleting
You may only delete a Managed Node Type from your Tenant if it is not in use by any Managed Nodes.
Best Practices
- If you are familiar with Python, build the executable in your Docker image using the echostream-node package that EchoStream publishes to PyPI. This is by far the fastest way to create a Managed Node Type.
- Limit the processing in your Managed Node Type's Docker image to those things that only it can do. This will make your Managed Node Types more flexible and reusable. For example, a Managed Node Type that reads files from a local FTP server and sends those as
echo.file
objects is more flexible and reusable than one that reads the same files and performs a conversion of all CSV files to JSON files (the latter being capability that you can compose in your Tenant's processing network). - Only create a Managed Node Type when you need to deploy Node functionality to a network that you do not control or you will be deploying/updating the same functionality across many Nodes in your Tenant. Otherwise, create External Nodes.