GithubHelp home page GithubHelp logo

spacectl's Introduction

spacectl


Getting Started with spacectl

The SpaceONE command-line tool, spacectl, allows you to run commands against resources managed by SpaceONE.

API Reference: https://spaceone-dev.gitbook.io/spaceone-apis

Install and Set Up spacectl

Install the latest release with the command from PyPI using pip:

sudo pip install --upgrade pip 
sudo pip install spacectl

There are a few variants on getting helps. A list of global options and supported commands are available with --help:

spacectl --help

Accessing for the first time with spacectl:

The following commands run spacectl to set your own configurations and endpoints. It handles setting the environments, authenticating and targets. Run it like these:

  • Set up spacectl configuration

    spacectl config init # input environment on shell
    spacectl config set api_key <api_key>
    spacectl config endpoint add <service> <endpoint>
    
  • (OR) Import a configuration file which you downloaded at SpaceONE console

    spacectl config init -f <import_file>
    

The <import_file> looks like

api_key: <JWT_API_KEY>
endpoints:
  identity: grpc://identity:50051
  inventory: grpc://inventory:50051
  plugin: grpc://plugin:50051
  repository: grpc://repository:50051
  secret: grpc://secret:50051
  ...

if you want to see a sample configuration file, try examples/configuration.yaml.

Discovering builtin services:

The following commands list all available spacectl APIs. Run it like this:

spacectl api-resources

Examples

Case 1: List Servers:

spacectl list server

Case 2: Create Project Group:

spacectl exec create project_group -p name=<project_group_name>

Advanced Guides

Command Details and Guides

  • get: Show details of a specific resource
  • list: Display one or many resources
  • apply: Get, list, create or update various resources and execute other tasks
  • stat: Querying statistics for resources
  • exec: Execute a method to resource
  • template: Manage resource templates

Configuration Details

The following details are documented in docs/configuration.md

  • Config Concept
  • Quick Start
  • Manage Endpoints
  • Switch the Environment

spacectl's People

Contributors

whdalsrnt avatar umi0410 avatar ku524 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.