Automated SCP file transfers can be orchestrated in your Flux workflow using SCPAction. This action supports file uploads or downloads using SCP. SCP is basically a remote copy (rcp) through a SSH tunnel. It is easy to setup key-based SSH login for your systems, here is one article describing the steps for Mac. You could also run arbitrary system commands or scripts using this action.
Here is a screen shot showing SCPAction configuration that downloads logs from a linux host.
Here is a screen shot showing SCPAction configuration that executes a remote disk check command for a linux host.
A sample test case that shows how this action could be integrated within a Flux workflow using Java API.
Maven users could just drop this dependency in your POM to use this plugin in your project.
<dependency> <groupId>com.fluxcorp.plugins</groupId> <artifactId>scp-action</artifactId> <version>1.0.3.SNAPSHOT</version> </dependency>
Make sure you include this maven repository where the plugin snapshots are deployed.
<repository> <id>sonatype-nexus-snapshots</id> <name>sonatype-nexus-snapshots</name> <url>https://oss.sonatype.org/content/repositories/snapshots/</url> </repository>
Possibly Related Posts:
- Parallel Looping Constructs in Java (revisited)
- Java 8 – This ain’t your grandpa’s Java
- Implementing a light weight web service trigger in Flux
- Invoking Web Services from your Flux Workflow
- Lambda expressions in Java 8 adopts C# style syntax