Step 1. Drop
- Drop the Bash component on a compute.
Step 2. Write a script and upload to the editor
- 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 (e.g.,
Compute_1), the IP address of the compute at runtime, respectively.
For more environment variables, see this section)
- Go to Archive content. This section displays the file directory of the application topology.
configure.shto the Archive 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 executed on the compute: