xenon-cli

Perform files and jobs operations with Xenon library from command line

https://github.com/xenon-middleware/xenon-cli

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 7 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.8%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Perform files and jobs operations with Xenon library from command line

Basic Info
  • Host: GitHub
  • Owner: xenon-middleware
  • License: apache-2.0
  • Language: Java
  • Default Branch: master
  • Homepage: http://nlesc.github.io/Xenon/
  • Size: 580 KB
Statistics
  • Stars: 2
  • Watchers: 5
  • Forks: 3
  • Open Issues: 21
  • Releases: 20
Created about 9 years ago · Last pushed about 5 years ago
Metadata Files
Readme Changelog License Citation Zenodo

README.md

Xenon Command Line Interface

Build Status Build status Quality Gate Status Coverage DOI Anaconda-Server Badge

Command line interface which uses the Xenon library to perform job and file operations.

Install

Dependencies:

  • Java runtime version 11 or greater

Goto releases and download a tarball (or zipfile). The tarball can be installed with:

bash tar -xf build/distributions/xenon*.tar xenon*/bin/xenon --help

Add xenon*/bin to your PATH environment variable for easy usage.

Or install with ananconda:

bash conda install -c conda-forge -c nlesc xenon-cli

Usage

```bash

List files on local filesystem

xenon filesystem file list /etc

List files on remote filesystem using sftp

xenon filesystem sftp --location localhost list /etc

Copy local file to remote filesystem

xenon filesystem sftp --location localhost upload /etc/passwd /tmp/copy-of-passwd

Execute a program remotely using ssh

xenon scheduler ssh --location localhost exec /bin/hostname

Pipe to a remote file

echo "sleep 30;echo Hello" | xenon sftp --location localhost upload - /tmp/myjob.sh

Submit to a remote Slurm batch scheduler

xenon scheduler slurm --location ssh://localhost submit /bin/sh /tmp/myjob.sh ```

The above commands use your current username and keys from ~/.ssh.

To keep password or passphrase invisible in process list put the password in a text file (eg. 'password.txt') and then use '@password.txt' as argument. For example:

sh xenon filesystem sftp --location localhost --username $USER --password @password.txt list $PWD/src

Build

sh ./gradlew build

Generates application tar/zip in build/distributions/ directory.

Tests

Requirements for the integration tests:

The unit and integration tests can be run with:

sh ./gradlew check

Release

  1. Bump version in build.gradle, conda/xenon-cli/meta.yaml files, add version to CHANGELOG.md and commit/push
  2. Run ./gradlew build to build distributions
  3. Create a new GitHub release
  4. Upload the files in build/distributions/ directory to that release
  5. Publish release
  6. Edit Zenodo entry, add Xenon doi as is referenced by this upload.
  7. Create conda release, see conda/README.md

Docker

Run Xenon CLI as a Docker container.

The Docker image can be build with

sh ./gradlew docker

Generates a xenonmiddleware/xenon-cli Docker image.

To use local files use volume mounting (watch out as the path should be relative to mount point):

sh docker run -ti --rm xenonmiddleware/xenon-cli --user $USER -v $PWD:/work --adaptor ssh upload --source /work/somefile.txt --location localhost --path /tmp/copy-of-somefile.txt

Common Workflow Language

Run Xenon CLI using a cwl-runner or as a tool in a Common Workflow Language workflow.

Requires xenonmiddleware/xenon-cli Docker image to be available locally.

Example to list contents of /etc directory via a ssh to localhost connection with cwl-runner:

```sh ./xenon-ls.cwl --adaptor sftp --location $USER@172.17.0.1 --certfile ~/.ssh/id_rsa --path /etc

Copy file from localhost to working directory inside Docker container

./xenon-upload.cwl --adaptor sftp --certfile ~/.ssh/id_rsa --location $USER@172.17.0.1 --source $PWD/README.md --target /tmp/copy-of-README.md

Copy file inside Docker container to localhost

./xenon-download.cwl --adaptor sftp --certfile ~/.ssh/id_rsa --location $USER@172.17.0.1 --source /etc/passwd --target $PWD/copy-of-passwd ```

(Replace <user>@<host> with actual username and hostname + expects docker with default network range)

Owner

  • Name: xenon-middleware
  • Login: xenon-middleware
  • Kind: organization

Citation (CITATION.cff)

# YAML 1.2
# Metadata for citation of this software according to the CFF format (https://citation-file-format.github.io/)
cff-version: "1.0.3"
message: "If you use this software, please cite it as below."
title: Xenon command line interface
doi: 10.5281/zenodo.3246245
authors:
- given-names: Stefan
  family-names: Verhoeven
  affiliation: Nederlands eScience Center
  orcid: https://orcid.org/0000-0002-5821-2060
- given-names: Jurriaan
  family-names: Spaaks
  name-particle: H.
  affiliation: Netherlands eScience Center
  orcid: "https://orcid.org/0000-0002-7064-4069"
version: "3.0.5"
date-released: 2020-03-23
repository-code: https://github.com/xenon-middleware/xenon-cli
license: Apache-2.0
references:
- type: software
  doi: 10.5281/zenodo.597993
  title: Xenon
  authors:
  - given-names: Jason
    family-names: Maassen
    affiliation: Netherlands eScience Center
  - given-names: Stefan
    family-names: Verhoeven
    affiliation: Nederlands eScience Center
  - given-names: Joris
    family-names: Borgdorff
    affiliation: '@thehyve'
  - given-names: Niels
    family-names: Drost
    affiliation: Netherlands eScience Center
  - given-names: Jurriaan
    family-names: Spaaks
    name-particle: H.
    affiliation: Netherlands eScience Center
  - given-names: Christiaan
    family-names: Meijer
    affiliation: Netherlands eScience Center
  - given-names: Rob
    family-names: van Nieuwpoort
    name-particle: V.
    affiliation: Netherlands eScience center
  - given-names: Atze
    family-names: van der Ploeg
    affiliation: Netherlands eScience center
  - given-names: Piter
    family-names: de Boer
    name-particle: T.
    affiliation: Netherlands eScience center
  - given-names: Ben
    family-names: van Werkhoven
    affiliation: Netherlands eScience Center
  - given-names: Arnold
    family-names: Kuzniar
    affiliation: Netherlands eScience Center
    orcid: "https://orcid.org/0000-0003-1711-7961"

GitHub Events

Total
Last Year