Create Software Stack for Target Nodes
By default, SOCA does not provide any target node images. Customers can create their own bundle (called Software Stacks) using Amazon Images (AMI) and let their user choose what type of software they want use.
Prepare User Data¶
Target Nodes are simple EC2 instance using public or private AMIs. There is no additional SOCA logic being executed, you simply get the AMI as-is. However, you can configure custom User Data to be automatically executed during the node deployment.
As a SOCA admin, navigate to Admin > Advanced Settings > User Data Templates
Fill out the form, including the template name, description, as well as the user data that will be executed on the EC2 nodes.
Note the following:
- User data script is operating system-specific: Linux requires a Bash script, while Windows expects a PowerShell script.
- For Linux user data, we recommend starting the script with: #!/bin/bash
- For Windows user data, we recommend starting the script with:
and close it with - User data is limited to 16 KB
- User data supports Jinja templating
SOCA will automatically generate variables (SOCA_USER
and SOCA_USER_PUBLIC_KEYS
) you can re-use in your templates. Additionally, you will also be able to create your own variables during the software stack registration.
Prepare your Target Node Software Stack Profile¶
A Target Node Profile controls the list of EC2 instance types, maximum storage size as well as approved subnet ids for your Software Stacks. SOCA creates one by default, or you can create your own if needed.
Register your Target Node Software Stack¶
To create a new software stack, navigate to Admin > Software Stacks > Target Node
Fill out the following information:
- AMI ID
- Software Stack Name
- Minimal Disk Size
- Target Node Profile to associate to the stack
- Target Node User Data to associate to the stack
- Additional User Data variables specific to the stack
- Thumbnail
- Launch Tenancy / Host information
Additionally, you have the possibility to customize the Connection String of your stack. Connection String is what will be visible to the end-user when their target nodes are operational. You can use the following variables:
{{ SOCA_USER }}
Name of the current SOCA user requesting the target node{{ SOCA_NODE_INSTANCE_PRIVATE_IP }}
Private IP of the target node{{ SOCA_NODE_INSTANCE_PRIVATE_DNS }}
Private DNS of the target node{{ SOCA_NODE_INSTANCE_ID }}
Instance ID of the target node{{ SOCA_NODE_INSTANCE_TYPE }}
Instance type of the target node{{ SOCA_NODE_INSTANCE_ARCH }}
Architecture (x86_64/ aarch64) of the target node{{ AWS_REGION }}
AWS Region of the target node
Connection string also supports HTML formatting. For example:
Connection String | Result |
---|---|
<strong>Instance IP:</strong> {{ SOCA_NODE_INSTANCE_PRIVATE_IP }} <br> <strong>Instance ID:</strong> {{ SOCA_NODE_INSTANCE_ID }} |
![]() |
Once ready, click Create Software Stack button.
Important
By default, new Software Stack are not visible to users. Add your newly created Software Stack to a SOCA Project first.
Now go back to the Target Node section and You should be able to see and launch your newly create image