Giter VIP home page Giter VIP logo

artipie-cli's Introduction

artipie-cli

Command line instrument for managing Artipie server

artipie-cli's People

Contributors

g4s8 avatar orlovm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

orlovm shilion

artipie-cli's Issues

Get repository command

Add get repository command to list all repositories (in optional organization) where current user has access:

  • artictl get repository - works in a "flat" mode
  • articlt get repository orgname - for "org" mode

The output could include these fields: name, type, user access mode, e.g.

NAME          |    TYPE  | ACCESS
my-registry   |  docker  | RW
mvn           |   maven  | R
js            |      npm | RW

API documentation is here: https://github.com/artipie/maven-adapter/

Ticket: #2

Configuration

Artipie CLI should parse configuration file and same global configuration options.

File

The file could be checked in order $HOME/.config/artictl/config.yaml, /etc/artictl/config.yaml. File should contain different context sections (for different servers), and ID of current context. Each context should have mandatory endpoint URI and authentication options. Endpoint is just a URI string, authentication options could be different, it's either user+password or auth token.

Example:

currentContext: "default"
contexts:
  default:
    auth:
      token: "123456"
    endpoint: https:/central.artipie.com
  myLocal:
    auth:
      username: test
      password: qwerty
    endpoint: http://artipie.local/artipie

CLI uses currentContext but can choose another one: articl --context=myLocal get repo

Options

The same parameters could be provided as global options for CLI:

  • endpoint for endpoint URI
  • auth-user user for auth
  • auth-password password for auth
  • auth-token token for auth

CLI options has higher priority that config file options and CLI should use options on conflict.
auth-user and auth-password should be used only together.
It should be not possible to use auth-token with auth-user or auth-password.

Examples:

artictl --endpoint=https://central.artipie.com get repo
artictl --auth-token=12345 get repo
artictl --auth-user=test --auth-password=qwerty get repo

Artipie CLI MVP

Solution for #1 meta proposal.

Let's implement a CLI for Artipie with required commands to manage Artipie resources, such as repositories, users, permissions, storages.

Each resource type initially support these commands (but may support some additional commands too):

  • get - to show information about resource or list resources
  • update - to create or update resource configuration
  • delete - delete resource

Initial resource to be supported:

  • repositories - artifact repositories
  • users - names, credentials, authentication
  • permissions - user permissions for repositories, authorization
  • storages - storage configurations, could be used as repository storage aliases

Current scope of work:

  • repositories:
    • get #3
    • update #2
    • delete
  • users:
    • get
    • update
    • delete
  • permissions:
    • get
    • update
    • delete
  • storages:
    • get
    • update
    • delete

Artipie API reference: https://github.com/artipie/management-api/blob/master/REST_API.md

Throubleshooting instumentation

For now, there is no way for a user to troubleshoot a common problems he faces by himself. Artipie should definitely have it. A command-line utility, plugins for various IDEs and text editors, direct feedback in the logs would improve it.

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.