jarvis

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 29, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

README

jarvis

Just A Rather Very Intelligent System

Get

git clone git@github.com:ealebed/jarvis.git

Build

cd jarvis
go install github.com/ealebed/jarvis

or

make install

Build docker image

make image

Use

jarvis -h

Syntax

Use the following syntax to run jarvis commands from your terminal window:

jarvis [command] [subcommand] [flags]
Flags are
flag Description
--config string; path to Spin CLI config file (default $HOME/.spin/config)
--dry-run bool; print output / save generated files without real changing system configuration (default true)
--gate-endpoint string; Gate (API server) endpoint (default "http://localhost:8084")
-h, --help help for selected command
--org string; GitHub source owner organization (default "ealebed")
--version jarvis version
Commands are
command Description
account, acc manage Spinnaker accounts (clusters)
application, app manage Spinnaker application’s lifecycle
help help about any command
manifest manage Kubernetes manifests from remote repository
pipeline, pipe manage Spinnaker pipelines
Account subcommands are
subcommand Description
get returns the specified spinnaker account
list, ls returns list of all spinnaker accounts
Application subcommands are
subcommand Description
delete, del delete the specified application
get returns the specified spinnaker application
list, ls returns list of all spinnaker applications
save, create save/update the provided spinnaker application
save-all, create-all save/update all spinnaker applications from provided GitHub repository
Manifest subcommands are
subcommand Description
delete, del delete yaml manifest(s) for provided application
save, create, generate save/update yaml manifest(s) for provided application
save-all, create-all, generate-all save/update yaml manifest(s) for for all applications from provided GitHub repository
Pipeline subcommands are
subcommand Description
delete, del delete the provided pipeline from the provided spinnaker application
delete-all, prune delete all pipelines in the provided spinnaker application
disable, off disable pipelines in the provided spinnaker application
disable-all disable all pipelines in the provided spinnaker account(cluster)
enable, on enable pipelines in the provided spinnaker application
enable-all enable all pipelines in the provided spinnaker account(cluster)
execute, exec execute the provided pipeline in the provided spinnaker application
execute-all execute all pipelines in the provided spinnaker application or kubernetes cluster
get returns the pipeline with the provided name from the provided spinnaker application
list, ls returns list of all pipelines for the provided spinnaker application
save, create save/update pipeline(s) for the provided spinnaker application
save-all, create-all save/update pipeline(s) for all spinnaker applications from provided GitHub repository

Examples: Common operations

Manage Spinnaker applications
# Create a new (or update existing) Spinnaker application using the definition in configuration.json (from remote GitHub repository).
jarvis application save --name=jarvis-test-application --repo=test-k8s --local=false --dry-run=false

# Create a new (or update existing) Spinnaker application using the definition in configuration.json (from remote GitHub repository and custom branch).
jarvis application save --name=jarvis-test-application --repo=test-k8s --branch=custom --local=false --dry-run=false

# Create a new (or update existing) Spinnaker application using the definition in configuration.json (from local GitHub repository).
jarvis application save --name=jarvis-test-application --dry-run=false

# Create (or update if exist) all Spinnaker applications using the definitions in configuration.json (from remote GitHub repository).
jarvis application save-all --repo=test-k8s --local=false --dry-run=false

# Create (or update if exist) all Spinnaker applications using the definitions in configuration.json (from remote GitHub repository and custom branch).
jarvis application save-all --repo=test-k8s --branch=custom --local=false --dry-run=false

# Create (or update if exist) all Spinnaker applications using the definitions in configuration.json (from local GitHub).
jarvis application save-all --dry-run=false

# List all Spinnaker applications.
jarvis application list

# Retrieve a single Spinnaker application.
jarvis application get --name=jarvis-test-application

# Delete a single Spinnaker application.
jarvis application delete --name=jarvis-test-application --dry-run=false
Manage Kubernetes manifests
# Create a new (or update existing) Kubernetes manifest(s) with custom commit message for provided application using the definitions in configuration.json (from remote GitHub repository).
jarvis manifest save --name=jarvis-test-application --commit-message="Custom message" --repo=test-k8s --local=false --dry-run=false

# Create a new (or update existing) Kubernetes manifest(s) with default commit message for provided application using the definitions in configuration.json (from local GitHub repository).
jarvis manifest save --name=jarvis-test-application --dry-run=false

# Create a new (or update existing) Kubernetes manifests for all applications from configuration.json (from remote GitHub repository and custom branch).
jarvis manifest save-all --repo=test-k8s --branch=custom --local=false --dry-run=false

# Delete Kubernetes manifest(s) for provided application using the definitions in configuration.json (from remote GitHub repository).
jarvis manifest delete --name=jarvis-test-application --repo=test-k8s --local=false --dry-run=false
Manage Spinnaker pipelines
# Create a new (or update existing) Spinnaker pipeline(s) using the definition in configuration.json (from remote GitHub repository).
jarvis pipeline save --name=jarvis-test-application --repo=test-k8s --local=false --dry-run=false

# Create a new (or update existing) Spinnaker pipeline(s) using the definition in configuration.json (from local GitHub repository).
jarvis pipeline save --name=jarvis-test-application --dry-run=false

# Create a new (or update existing) pipeline(s) for all Spinnaker applications using the definition in configuration.json (from remote GitHub repository).
jarvis pipeline save-all --repo=test-k8s --local=false --dry-run=false

# Create a new (or update existing) pipeline(s) for all Spinnaker applications using the definition in configuration.json (from local GitHub repository).
jarvis pipeline save-all --dry-run=false

# List all pipelines in the provided Spinnaker application.
jarvis pipeline list

# Retrieve a single pipeline from the provided Spinnaker application.
jarvis pipeline get --name=jarvis-test-application --pipeline="deploy-gke1-dc(production)"

# Start a single pipeline execution from the provided Spinnaker application.
jarvis pipeline execute --name=jarvis-test-application --pipeline="deploy-gke1-dc(production)" --dry-run=false

# Start all pipelines execution from the provided Spinnaker application.
jarvis pipeline execute-all --name=jarvis-test-application --dry-run=false

# Start all pipelines execution in all Spinnaker applications from the provided Kubernetes cluster.
jarvis pipeline execute-all --account=gke1 --dry-run=false

# Enable pipelines in the provided Spinnaker application.
jarvis pipeline enable --name=jarvis-test-application --dry-run=false

# Enable all pipelines in the provided Spinnaker account(Kubernetes cluster).
jarvis pipeline enable-all --account=sgp1 --dry-run=false

# Disable pipelines in the provided Spinnaker application.
jarvis pipeline disable --name=jarvis-test-application --dry-run=false

# Disable all pipelines in the provided Spinnaker account(Kubernetes cluster).
jarvis pipeline disable-all --account=sgp1 --dry-run=false

# Delete a single pipeline from the provided Spinnaker application.
jarvis pipeline delete --name=jarvis-test-application --pipeline="deploy-gke1-dc(production)" --dry-run=false

# Delete all pipelines from the provided Spinnaker application.
jarvis pipeline delete-all --name=jarvis-test-application --dry-run=false

Sample definition application(s) properties are in configuration.json file repository

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL