How to deploy a file or a folder to a target compute node?
How to deploy a file?
During the deployment of a software component, sometimes we need to deploy an external file on the target compute node. In such a case, we can define an artifacts
in the node definition as below:
The orchestrator will send the file (available at the path scripts/helloworld.js
) to the compute node, on which the software component is deployed.
In the interface implementation, we can get the location of the artifact as follows:
In the editor, you can also upload and overwrite the artifact hello_script
for a given topology:
Figure 1: Click "Select Artifact" to replace an artifact
How to deploy a folder?
The artifact can be a folder as well:
In the interface implementation, we can get the path to the folder in the same way:
note
The orchestration engine is responsible for copying the artifact to the compute node and makes its path available as the environment variable (i.e., the artifact name) in the configuration script for you.
Full example
- See example