跳转到主要内容

Vertica命令行界面

项目描述

(c) 版权所有 2021 Micro Focus 或其关联公司

Vertica Accelerator命令行客户端

Vertica Accelerator命令行界面(VCLI)是管理Vertica Accelerator数据库的替代客户端。

先决条件

  • 您必须是Vertica Accelerator的客户或试用用户,并拥有有效账户才能使用VCLI。
  • 您可以联系项目维护者或Vertica Accelerator支持以获取所需的 "accelerator_client_id",以便使用此软件包

安装

安装最新版本

$ pip3 install vertica-accelerator-cli

$ python3 -m pip install dist/vertica-accelerator-cli-0.1.0.tar.gz --upgrade

从源安装

$ pip3 install git+https://github.com/vertica/vertica-accelerator-cli.git@master

自动完成

要启用VCLI的自动完成功能,请安装和配置argcomplete

$ sudo python3 -m pip install argcomplete
$ sudo activate-global-python-argcomplete

软件包发布流程

  1. 创建一个虚拟环境
$ python3 -m venv env
$ source venv/bin/activate
$ export PYTHONPATH=.
$ mkdir ./python-packages/
  1. 创建软件包
$ python3 -m pip install --upgrade build
$ python3 -m build

安装后配置

您可以创建配置文件来管理多个身份。

  1. 运行交互式配置以创建一个名为 accelerator-profile 的新配置文件
$ va config --profile accelerator-profile
  1. 您必须使用 va login --profile 登录到一个配置文件以执行VCLI命令。登录有效期为一小时。如需帮助,请运行 va login -h
$ va login --profile accelerator-profile
Login success
  1. 创建一个文件 ~/.vcli/credentials,格式如下
[default]
username = example@example.com
password = example_password
client_id = example_client_id
auth_endpont = https://vertica.okta.com
access_token_file = sample_access_token

[accelerator-profile]
username = accelerator-profile@domain.com
password = accelerator-profile_password
client_id = accelerator_client_id
auth_endpont = https://vertica.okta.com
access_token_file = accelerator-profile_access_token
  1. 创建一个文件 ~/.vcli/config,格式如下
[default]
service_endpoint = https://accelerator.vertica.com
max_attempts = 3

[vaas-test]
service_endpoint = https://accelerator.vertica.com
max_attempts = 3
verify_ssl=false

上下文相关帮助

如需帮助,请运行 va --helpva -h

$ va --help
usage: va [-h] {config,login,logout,database,database-config,subcluster,backup,session,task,cron,report,dns}

Vertica Command Line Interface (VCLI) is a tool to manage Vertica Accelerator databases.

positional arguments:
  {config,login,logout,database,database-config,subcluster,backup,session,task,cron,report,dns}
    config              Configure VCLI to access Vertica Accelerator.
    login               Log in to Vertica Accelerator.
    logout              Log out from Vertica Accelerator.
    database            Manage the Database.
    database-config     Manage the Database Configuration.
    subcluster          Manage subclusters.
    backup              Backup and restore the database.
    session             Manage sessions.
    task                Manage tasks.
    cron                Manage the scheduler.
    report              Show and generate reports.
    dns                 Manage DNS.

optional arguments:
  -h, --help            show this help message and exit

您还可以在任意位置参数后运行 --help-h 以获取该参数的详细信息。

  • 查看 va database 选项

    $ va database -h
    usage: va database [-h] {create,list,get,start,stop,hibernate,revive,drop,increase,decrease,rescale,upgrade,update-network-config}
    
    positional arguments:
      {create,list,get,start,stop,hibernate,revive,drop,increase,decrease,rescale,upgrade,update-network-config}
        create                 Create a new database.
        list                   View a list of the databases and their properties.
        get                    View details of a particular database and its subclusters.
        start                  Start the database.
        stop                   Stop the database.
        hibernate              Hibernate the database.
        revive                 Revive the database.
        drop                   Drop an existing database.
        increase               Increase the number of nodes for the database.
        decrease               Decrease the number of nodes for the database.
        rescale                Change the instance type of the nodes.
        upgrade                Upgrade a database.
        update-network-config  Update the external access CIDR block.
    
    optional arguments:
      -h, --help            show this help message and exit
    
  • 查看 va database create 选项

    $ va database create -h
    usage: va database create [-h] --name <value> --password <value> --nodes <value>
                                   --region <value> --availability_zone <value> 
                                   --instance_type <value> [--external_access_cidr_block <value>]
                                   [--vertica_version <value>] [--profile <value>]
    
    optional arguments:
      -h, --help            show this help message and exit
      --name <value>        The name of the database. The database name must consist of
                            1 to 18 alpha-numeric characters and start with a letter.
      --password <value>    The password for the database. The password must consist of
                            8 to 30 upper-case, lower-case, numeric, and special characters.
      --nodes <value>       The number of primary cluster nodes for the database. Valid values: [3, 6, 12]
      --region <value>      The region of the database. For example: 'us-east-1'
      --availability_zone <value>
                            The availability zone of the database. For example: 'us-east-1a'
      --instance_type <value>
                            The instance type of the database. 
                            Valid values: ['i3.2xlarge', 'i3.4xlarge', 'i3.8xlarge', 'i3.16xlarge']
      --external_access_cidr_block <value>
                            The IPv4 external access CIDR block(s) of the database, which acts as a whitelist
                            for a range of IP addresses that can access the database as a client. For example,
                            the CIDR block 192.0.2.0/24 allows clients to connect from 192.0.2.0 through 192.0.2.255.
                            Separate multiple CIDR blocks with a comma: 192.0.2.0/24,192.0.2.0/32
      --vertica_version <value>
                            The AMI version of the Vertica database. Valid values: ['10.1.0-1', '10.1.0-2', '11.0.0-1']
      --profile <value>     Use a specific profile from the credentials file (default path: "~/.vcli/credentials").
                            If you don't specify a profile, VCLI defaults to the 'default' profile when
                            communicating with Vertica Accelerator services.
    

维护者

  • 郝洋
  • 何晓静
  • 基尔坦·查夫达
  • 苏梅特·凯斯瓦尼

项目详情


下载文件

下载适用于您的平台文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源代码分发

vertica-accelerator-cli-0.0.3.tar.gz (83.4 kB 查看哈希值)

上传时间 源代码

构建分发

vertica_accelerator_cli-0.0.3-py3-none-any.whl (278.7 kB 查看哈希值)

上传时间 Python 3

由支持