Step 1. Drop
- Drop the Bash component on a compute node.
Step 2. Write a script and upload to the editor
- Go to achieve content (on the left panel). This section displays the file directory of the application topology.
- Write a bash script (e.g.,
In this exmple, the script uses some environment variables, for instance
ip_address, which print the component name (e.g.,
Bash_1), the hosted compute node (e.g.,
Compute_1), the IP address of the hosted compute node at runtime, respectively.
The environment variables of the Bash component are available in the configuration script for convenience. For more environment variables, see this section)
configure.shto the achieve content.
Step 3. Choose an artifact
- Click on the Bash component, go to the Artifacts section. In this section, you can control the lifecycle of the Bash component by providing configuration scripts.
- Click configure / Select artifact and select the script
configure.shwhich you uploaded to the archieve content (in step 2).
During the deployment, the deployment logs will print the following message when Bash_1 is configured on the compute node: