cfy-go

command
v0.0.0-...-f8139d8 Latest Latest
Warning

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

Go to latest
Published: May 2, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

cfy-go implements CLI for cloudify client. If we compare to official cfy command cfy-go has implementation for only external commands.

Usage:

$ cfy-go -h
Supported commands:
	blueprints        Handle blueprints on the manager
	deployments       Handle deployments on the Manager
	scaling-groups    Handle scale groups on the Manager
	events            Show events from workflow executions
	executions        Handle workflow executions
	node-instances    Handle a deployment's node-instances
	nodes             Handle a deployment's nodes
	plugins           Handle plugins on the manager
	status            Show manager status
	kubernetes        Additional kubernetes operations
	version           Show client version.
	tenants           Show tenants on the manager

Common parameters for commands required network communication:

-debug
	Manager debug or CFY_DEBUG in env
-host string
	Manager host name or CFY_HOST in env (default "localhost")
-password string
	Manager user password or CFY_PASSWORD in env (default "secret")
-tenant string
	Manager tenant or CFY_TENANT in env (default "default_tenant")
-user string
	Manager user name or CFY_USER in env (default "admin")

Example:

cfy-go status version -host <your manager host> -user admin -password secret -tenant default_tenant

Not implemeted commands:

agents: Handle a deployment's agents
install-plugins: Install plugins [locally]
bootstrap: Bootstrap a manager.
cluster: Handle the Cloudify Manager cluster
dev: Run fabric tasks [manager only].
groups: Handle deployment groups
init: Initialize a working env
install: Install an application blueprint [manager only].
ldap: Set LDAP authenticator.
logs: Handle manager service logs.
maintenance-mode: Handle the manager's maintenance-mode.
profiles: Handle Cloudify CLI profiles Each profile can...
rollback: Rollback a manager to a previous version.
secrets: Handle Cloudify secrets (key-value pairs).
snapshots: Handle manager snapshots.
ssh: Connect using SSH [manager only].
teardown: Teardown a manager [manager only]
uninstall: Uninstall an application blueprint [manager only]
user-groups: Handle Cloudify user groups (Premium feature)
users: Handle Cloudify users
workflows: Handle deployment workflows

Bluprint

For use blueprint related command use cfy-go blueprints, it provide fuctionality for manage blueprints on the manager:

create-requirements - Create pip-requirements. Not Implemented.

delete - Delete a blueprint [manager only]

	cfy-go blueprints delete blueprint

download - Download a blueprint [manager only]

	cfy-go blueprints download blueprint

get - Retrieve blueprint information [manager only]

	cfy-go blueprints list -blueprint blueprint

inputs - Retrieve blueprint inputs [manager only]. Not Implemented.

list - List blueprints [manager only]

	cfy-go blueprints list

	Paggination by:
		`-offset`:  the number of resources to skip.
		`-size`: the max size of the result subset to receive.

package - Create a blueprint archive. Not Implemented.

upload - Upload a blueprint [manager only].
	cfy-go blueprints upload new-blueprint -path <blueprint directory>/<blueprint name>.yaml

validate - Validate a blueprint. Not Implemented.

Container

container - Run command in container

Run: Run command in container

	cfy-go container run -base container-place/base -- cfy profile use local

Deployments

deployments - Handle deployments on the Manager

create - Create a deployment [manager only]. Partially implemented, you can set inputs only as json string.

	cfy-go deployments create deployment  -blueprint blueprint --inputs '{"ip": "b"}'

delete - Delete a deployment [manager only]
	cfy-go deployments delete  deployment

inputs - Show deployment inputs [manager only]. Not Implemented.

list - List deployments [manager only].
	cfy-go deployments list

Paggination by:
	`-offset`:  the number of resources to skip.
	`-size`: the max size of the result subset to receive.

outputs - Show deployment outputs [manager only]

	cfy-go deployments outputs -deployment deployment

update - Update a deployment [manager only]. Not Implemented.

scaling-groups - check limits for scaling group

	cfy-go deployments scaling-groups -deployment <deployment_name>

groups - list of node groups

	cfy-go deployments groups -deployment <deployment_name>

Events

events - Show events from workflow executions

delete - Delete deployment events [manager only]. Not Implemented.

list - List deployments events [manager only]

	cfy-go events list

Paggination by:
	`-offset`:  the number of resources to skip.
	`-size`: the max size of the result subset to receive.

Supported filters:
	`blueprint`: The unique identifier for the blueprint
	`deployment`: The unique identifier for the deployment
	`execution`: The unique identifier for the execution

Executions

executions - Handle workflow executions

cancel: Cancel a workflow execution [manager only]. Not Implemented.

get: Retrieve execution information [manager only]. Not Implemented.

list: List deployment executions [manager only].

	cfy-go executions list
	cfy-go executions list -deployment deployment

Paggination by:
	`-offset`:  the number of resources to skip.
	`-size`: the max size of the result subset to receive.

start: Execute a workflow [manager only]. Partially implemented, you can set params only as json string.

	cfy-go executions start uninstall -deployment deployment

Status

status - Show manager status [manager only].

Manager state: Show service list on manager

	cfy-go status state

Manager version: Show manager version

	cfy-go status version

Kubernetes: Show diagnostic for current installation [deployment-id is optional]
	Show diagnostic for all current installation
		cfy-go status diag [-deployment deployment-id]
		cfy-go status diag -all [-deployment deployment-id]

	Show diagnostic only for Kubernetes nodes
		cfy-go status diag -node [-deployment deployment-id]

	Show diagnostic only for Kubernetes load balancer
		cfy-go status diag -load [-deployment deployment-id]

Node Instances

node-instances - Handle a deployment's node-instances.

get: Retrieve node-instance information [manager only]

	cfy-go node-instances list -deployment deployment

list: List node-instances for a deployment [manager only]

	cfy-go node-instances list -deployment deployment

started: check started instances in deployment (all, without filter by scaling group) [node-type is optional]

	cfy-go node-instances started -deployment <deployment_name> -node-type <nodeType>

alive: check created instances in deployment (all, without filter by scaling group)

	cfy-go node-instances alive -deployment <deployment_name>

by-type: check created instances in deployment by node type

	cfy-go node-instances alive -deployment <deployment_name> -node-type <nodeType>

loadbalancer: return list of loadbalancers, by default returned free nodes [node-type is optional]

	cfy-go node-instances alive -deployment <deployment_name> -node-type <nodeType>

host-grouped: list instances grouped by hostID

	cfy-go node-instances host-grouped

Kubernetes

kubernetes - related commands:

init - Return json in kubernetes format for use as init script responce

	cfy-go kubernetes init

mount - Return json in kubernetes format for use as mount script responce

	cfy-go kubernetes mount /tmp/someunxists '{"kubernetes.io/fsType":"ext4",... "volumegroup":"kube_vg"}' -deployment slave -instance kubenetes_slave_*

unmount - Return json in kubernetes format for use as unmount script responce

	cfy-go kubernetes unmount /tmp/someunxists -deployment slave -instance kubenetes_slave_*

Nodes

nodes - Handle a deployment's nodes

get: Retrieve node information [manager only] [node-type is optional]

	cfy-go nodes list -node server -deployment deployment -node-type <nodeType>

list: List nodes for a deployment [manager only] [node-type is optional]

	cfy-go nodes list -node-type <nodeType>

group: List nodes for a deployment [manager only], with groups names [node-type is optional]

	cfy-go nodes group -node-type <nodeType>

started - check started nodes in deployment (all, without filter by scaling group) [node-type is optional]

	cfy-go nodes started -deployment deployment -node-type <nodeType>

Plugins

plugins - Handle plugins on the manager

delete: Delete a plugin [manager only].

	cfy-go plugins delete -plugin-id <plugin-id>

download: Download a plugin [manager only].

	cfy-go plugins download -plugin-id <plugin-id>

get: Retrieve plugin information [manager only].

	cfy-go plugins list -plugin-id <plugin-id>

list: List plugins [manager only]

	cfy-go plugins list

upload: Upload a plugin [manager only].

	cfy-go plugins upload -host 172.16.168.176 -plugin-path <plugin-path>.wgn -yaml-path <yaml-path>.yaml

Scaling Groups

scaling-groups - operations related to Scaling Groups

groups: check nodes in group - recheck code used in get scaling group by instance(hostname) in autoscale [node-type is optional]

	cfy-go scaling-groups groups -deployment <deployment_name> -node-type <nodeType>

nodes: check nodes in group in autoscale, check that we have node in scaling group [node-type is optional]

	cfy-go scaling-groups nodes -deployment <deployment_name> -scalegroup <scale_group_name> -node-type <nodeType>

instances: check instances in group in autoscale [node-type is optional]

	cfy-go scaling-groups instances -deployment <deployment_name> -scalegroup <scale_group_name> -node-type <nodeType>

Jump to

Keyboard shortcuts

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