Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

nepi-ng - C - managing files

INTRO
C1
C2
C3
C3bis
WRAP UP

Scenario

In this series, we will see how to transfer files between hosts, using the Push and Pull commands in a SshNode.

The version in C3 will perform the following:

  • generate a random file locally, and transfer it using SFTP onto fit01

  • transfer it from fit01 to fit02 over the data network using netcat

  • finally retrieve it locally from fit02 using SFTP again, and compare the result to make sure the file is intact.

The progression from C1 to C3 matches these bullets : C1 just performs the first bullet, and C2 performs the first two bullets.

The last scenario, labelled C3bis, is a variant around C2. It is not crucial to see it when first reading this tutorial. In this scenario, we perform the exact same scenario as in C2, but we see a recipe to start and stop a process in sync with the jobs in a scheduler.

New features

We will meet the LocalNode object that will let use run local commands just like on remote nodes.

We will also take this chance to see that a SshJob object can be defined with several commands, which can be helpful to avoid the need to create long strings of jobs.

We also introduce the Sequence object, that is a convenience tool for creating, well obviously, sequences of jobs, without the hassle of managing the required relationship for each job.

Finally throughtout this series, we will also illustrate another possible way to manage the components of the scheduler: instead of creating the scheduler at the end with all the jobs, we create the scheduler at the very beginning and create the jobs right into the scheduler. Of course the result is exactly the same, it’s just another programming style that is probably worth considering.

Let us start with copying files over to the node (tab C1) with the Push command object.