Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Command Line Processor helps customer to invoke OpsEra services through command line interface. This OpsEra CLI gives support for Creating, Executing OpsEra pipelines from customer’s local machine using YAML. Customers can download OpsEra CLI and able to install it in their local machine just like Maven & Ant.

Package Prerequisites

  • Node should be installed on the Customer machine to pull OpsEra CLI from NPM repository.

  • Customer has to run the below command to make it work.

npm install opsera -g

OpsEra CLI Commands

opsera --help
opsera --version
opsera configure

opsera get pipelines
opsera get pipelines --out=<fileName>
opsera get pipelines --out <fileName>
opsera get pipelines -o=<fileName>
opsera get pipelines -o <fileName>
opsera get pipelines >> <fileName>

opsera get tools
opsera get tools --out=<fileName>
opsera get tools -o=<fileName>
opsera get tools >> <fileName>

opsera run pipeline --pipeline-id=<pipelineId>
opsera run pipeline -p=<pipelineId>

opsera stop pipeline --pipeline-id=<pipelineId>

opsera reset pipeline --pipeline-id=<pipelineId>

opsera status pipeline --pipeline-id=<pipelineId>
opsera status pipeline --pipeline-id=<pipelineId> --run-count=<runCount>
opsera status pipeline -p=<pipelineId>
opsera status pipeline -p=<pipelineId> -c=<runCount>

opsera summary pipeline --pipeline-id=<pipelineId>
opsera summary pipeline --pipeline-id=<pipelineId> --out=<fileName>

opsera summary tool --tool-id=<toolId>
opsera summary tool --tool-id=<toolId> --out=<fileName>

opsera summary tool --tool-id=<toolId>
opsera summary tool --tool-id=<toolId> --out=<fileName>

opsera logs pipeline --pipeline-id=<pipelineId>
opsera logs pipeline --pipeline-id=<pipelineId> --run-count=<runCount>
opsera logs pipeline --pipeline-id=<pipelineId> --run-count=<runCount> --out=<fileName>

OpsEra Help Command

This command helps to see the list of available options and its usage

OpsEra Version Command

Helps to see the current version of CLI

OpsEra Configure Command

This command helps to set Access token in users machine and it will be used for Authentication during command executions similar to AWS CLI. We can also set workspace as YAML files location by default it takes current working directory as workspace.

Also, we can update by executing the same command.

OpsEra config file created under users and we manually also can make an entry instead of calling configure Command.

OpsEra Create Command

This command helps to create pipelines by reading pipeline.yaml file from the workspace. Just like set config command here also YAML parser service has to be called before making node call for field validation and YAML conversion.

Headers

Authorization: <OpsEra Access Token>

Payload

{
        "projects": [],
        "tags": [],
        "accounts": [],
        "tool_tagging": [],
        "name": "Bit Bucket Server Raj",
        "description": "",
        "tool_identifier": "bitbucket",
        "costCenter": "",
        "compliance": [],
        "licensing": [],
        "location": [],
        "classification": "",
        "contacts": [],
        "applications": [],
        "organization": [],
        "external_reference": [],
        "active": true,
        "roles": [],
        "status": "",
        "tool_type_identifier": "source",
        "owner": "5e1cbf251c26d68f7ce6361e",
        "account": "org-opsera-dnd-acc0",
        "jobs": [],
        "actions": [],
        "configuration": {}
}

Other Pipeline Commands

These commands will make corresponding call to node to get, run, reset, stop, summary & logs of a pipeline.

opsera get pipelines
opsera run pipeline --pipeline-id=<pipelineId>
opsera stop pipeline --pipeline-id=<pipelineId>
opsera reset pipeline --pipeline-id=<pipelineId>
opsera status pipeline --pipeline-id=<pipelineId> --run-count=<runCount>
opsera summary pipeline --pipeline-id=<pipelineId> --out=<fileName>
opsera logs pipeline --pipeline-id=<pipelineId> --run-count=<runCount>

Related Links

https://docs.google.com/document/d/15KGWYbVZqspk9JfQb6XUgb83eDffY-_a/edit

  • No labels