AGS 是阿里雲基因服務的通用命令列工具, 目前主要整合 argo 功能並且適配阿里雲各個產品的 addon功能命令。
AGS 下載和安裝
AGS 預設使用阿里雲ak調用各個服務,目前整合了阿里雲Log Service用於收集Pod日誌。使用此功能請在叢集建立的時候選擇開啟Log Service。
執行如下命令,下載 AGS 工具並配置運行許可權。
wget http://ags-hub.oss-cn-hangzhou.aliyuncs.com/ags-linux && chmod +x ags-linux && mv ags-linux /usr/local/bin/ags
說明
ags config init
根據互動式命令列輸入CLI需要的資訊,初始化完成後,設定檔會被預設儲存到~/.ags/config檔案中。可以通過ags config show
展示配置好的資訊。其中AccessKeySecret會被加密儲存。
如果您需要使用日誌採集功能,則需要配置ags config。另外為了安全考慮,您可以給CLI單獨建立一個ak,賦予Log Service許可權即可。
如果您使用的是Kubernetes 託管版叢集,您可以擷取叢集KubeConfig並通過kubectl工具串連叢集,並執行如下命令,實現通過 CloudShell 使用 ags 命令列工具。
wget http://ags-hub.oss-cn-hangzhou.aliyuncs.com/ags-linux && chmod +x ags-linux && mv ags-linux /usr/local/bin/ags
AGS 功能特性
- 完全相容argo 命令
- Pod被刪除後從阿里雲Log Service拉取日誌查看功能
- 整合kubectl 命令,使用者可以直接使用kubectl命令操作叢集
- 提供install uninstall 命令,一鍵安裝或者卸載所需資源
- get workflow 命令提供資源使用量查看功能
- YAML 模板允許底線等特殊字元
- securityContext 安全支援
- Pod pending/fails 狀態與workflow 狀態同步
- YAML定義自動retry功能
- 基於最近失敗斷點retry整個workflow
- 支援 ECI Serverless Kubernetes 架構
AGS 基本概覽
# ags
ags is the command line interface to Alibaba Cloud Genomics Compute Service
Usage:
ags [flags]
ags [command]
Available Commands:
completion output shell completion code for the specified shell (bash or zsh)
config setup ags client necessary info
delete delete a workflow and its associated pods
get display details about a workflow
help Help about any command
install install ags
kubectl kubectl command
lint validate a file or directory of workflow manifests
list list workflows
logs view logs of a workflow
resubmit resubmit a workflow
resume resume a workflow
retry retry a workflow
submit submit a workflow
suspend suspend a workflow
terminate terminate a workflow
uninstall uninstall ags
version Print version information
wait waits for a workflow to complete
watch watch a workflow until it completes
Flags:
--as string Username to impersonate for the operation
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
-h, --help help for ags
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
--kubeconfig string Path to a kube config. Only required if out-of-cluster
-n, --namespace string If present, the namespace scope for this CLI request
--password string Password for basic authentication to the API server
--request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0")
--server string The address and port of the Kubernetes API server
--token string Bearer token for authentication to the API server
--user string The name of the kubeconfig user to use
--username string Username for basic authentication to the API server
Use "ags [command] --help" for more information about a command.
Install/Uninstall
您可以通過ags install 命令,一鍵安裝AGS所需資源,無需手動安裝。
也可以通過ags uninstall命令, 一鍵卸載AGS所有資源。