Skip to main content

A command line to assist McCloud users.

Project description

Intro

mccloud_cli is a command line interface to the McCloud service. McCloud provides a simple means to start a Shasta assembly in the cloud. mccloud_cli currently provides an easy means to generate presigned URLs for use with the McCloud web UI, and the capability to submit McCloud jobs from the command line.

Quick start

  1. [optional] we highly suggest you run all python programs in a virtual environment.
  2. pip install mccloud-cli
  3. mccloud_cli --help

Presigned URLs example

mccloud_cli will generate AWS presigned URLs. This is useful when you want to store your data in your own AWS S3 bucket (ie, privately), but want to temporarily grant McCloud access to read input data, and write results back to your bucket.

Usage:

$ mccloud_cli generate-s3-presigned-url --help
Usage: mccloud_cli generate-s3-presigned-url [OPTIONS]

Options:
  --profile TEXT             Use a specific profile from your AWS credential file.
  --no-confirmation BOOLEAN  Perform requested actions without user confirmation.
  -i, --input-url TEXT       S3 URL which will be presigned to allow READ (input) access.
  -o, --output-url TEXT      S3 URL which will be presigned to allow WRITE (output) access.
  --expires-in INTEGER       Number of seconds until the pre-signed URLs expire.  [default: 28800]
  --help                     Show this message and exit.

For example:

$ mccloud_cli generate-s3-presigned-url --profile my-aws-profile -i s3://my-bucket/reads.fasta.gz -o s3://my-bucket/results.tar.gz

This action will generate AWS S3 presigned URLs for the input and output URLs you have specified, with an expiration time 28800 seconds [8 hours] from now.

Read (input) URLs:
------------------
s3://my-bucket/reads.fasta.gz

Write (output) URLs:
--------------------
s3://my-bucket/results.tar.gz

Do you wish to proceed? [y/N]: Y

Your presigned URLs will expire in 8 hours.

Please launch the McCloud job with these URLs.

Presigned INPUT URLs:
---------------------
https://s3.amazonaws.com/my-bucket/reads.fasta.gz?AWSAccessKeyId=...

Presigned OUTPUT URLs:
----------------------
https://s3.amazonaws.com/my-bucket/results.tar.gz?AWSAccessKeyId=...

Job submission example

mccloud_cli will also submit jobs directly from the command line. Input and output URLs must be https URLs or s3 URLs in a bucket you have access to.

Usage:

$ mccloud_cli submit-job --help
Usage: mccloud_cli submit-job [OPTIONS]

Options:
  --mcat TEXT                     McCloud Access Token, ie, MCAT-****.  [required]
  --email EMAIL ADDRESS           Email address for job notifications.  [required]
  -i, --input-url TEXT            S3 URL which will be presigned to allow READ (input) access.  [required]
  -o, --output-url TEXT           A single S3 URL which will be presigned to allow WRITE (output) access.  [required]
  --shasta-version TEXT           [required]
  --shasta-config TEXT            [required]
  --shasta-cli-opts TEXT
  --I-have-read-and-agree-to-McCloud-terms-of-use
                                  Confirm that you have read, and agree to, the McCloud terms of use, available at
                                  https://mccloud.czi.technology/terms-of-use
  --tail-job-log                  After job is submitted, print out job log messages.
  --profile TEXT                  Use a specific profile from your AWS credential file.
  --help                          Show this message and exit.

For example:

$ mccloud_cli submit-job --mcat 'MCAT-XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' --email my@email.com --profile my-aws-profile -i s3://my-bucket/reads.fasta.gz -o s3://my-bucket/output.tar.gz --shasta-version 0.7.0 --shasta-config Nanopore-Sep2020
I have read and agree to mccloud terms of use [y/N]: Y
Starting McCloud job, id = ec39baa4-ea68-4c1e-8040-40277b2a48a0
You can view logs at https://mccloud.czi.technology/jobs/ec39baa4-ea68-4c1e-8040-40277b2a48a0/monitor

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mccloud_cli-0.0.5.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

mccloud_cli-0.0.5-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file mccloud_cli-0.0.5.tar.gz.

File metadata

  • Download URL: mccloud_cli-0.0.5.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for mccloud_cli-0.0.5.tar.gz
Algorithm Hash digest
SHA256 841f918f99212bc0b249ce46a290a380bb1a2470d903b19770ae26ca7c66513c
MD5 6ef1c7ff14da1d75e4fbff4a26b1e628
BLAKE2b-256 caab8079c274fd1c6b088d236849ee6104e0d2f662e05c87d51769cc724c5956

See more details on using hashes here.

Provenance

File details

Details for the file mccloud_cli-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: mccloud_cli-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for mccloud_cli-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 916a20cf39526e51833bdf970171d726ccb5b77657d90d66eaf7895b3f43f73b
MD5 b762562f9e2d86240369925952c1bd4f
BLAKE2b-256 4a7aab71b7abc360851e12de4fb714d0200a1787015c8b51b2f1e0a2b0c93df7

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page