Go to file
Zheng Xi Zhou a5b3ed93dd
Fix app:status issue (#140)
* Show trait type in `app:ls`

Use trait type instead of its name in application list.
Fix app:status issue and refactor code
Fix #90

* followed comments to move some basic traits related functions to system.go

* Fix app:status issue

When the ApplicationConfiguration status haven't shown up,
it will hit an issue.
2020-08-11 17:38:34 +08:00
.github remove oam runtime workaround and complete some TODOs 2020-08-10 11:48:54 +08:00
api/types pretty help 2020-08-07 23:39:45 +08:00
cmd/vela Show trait type in `app:ls` (#136) 2020-08-11 15:14:14 +08:00
config/samples Show trait type in `app:ls` (#136) 2020-08-11 15:14:14 +08:00
dashboard Create Dashboard folder for front-end code repo 2020-07-16 12:49:55 +08:00
design address the comments 2020-08-07 17:20:18 -07:00
e2e Fix app:status issue (#140) 2020-08-11 17:38:34 +08:00
hack init rudrx 2020-07-07 00:12:13 +08:00
pkg Fix app:status issue (#140) 2020-08-11 17:38:34 +08:00
version fix vela system:init info 2020-08-09 18:34:01 +08:00
.gitignore remove binary and add it to .gitignore 2020-08-10 10:44:43 +08:00
DEVELOPMENT.md update new rudr run command and add ginkgo test to makefile 2020-08-10 10:14:39 +08:00
Dockerfile init rudrx 2020-07-07 00:12:13 +08:00
Makefile exclue e2e testw folder in case those test suites are triggerred by unit-test 2020-08-10 10:17:22 +08:00
PROJECT rename rudrx/rudr to vela 2020-08-07 13:40:20 +08:00
README.md update readme and fix admin:init builtin resource 2020-08-07 23:48:51 +08:00
go.mod rename rudrx/rudr to vela 2020-08-07 13:40:20 +08:00
go.sum Temporarily fix oam kubernetes runtime CRD issue 2020-08-10 10:17:22 +08:00

README.md

Vela

Vela is a command-line tool to use OAM based micro-app engine.

Develop

Check out DEVELOPMENT.md to see how to develop with RudrX

Install vela binary

git clone git@github.com:cloud-native-application/RudrX.git
cd RudrX
make
mv bin/vela /usr/local/bin

Vela commands

help

$ vela -h
✈️  A Micro App Plafrom for Kubernetes.

Usage:
  vela [flags]
  vela [command]

Available Commands:

  Getting Started:
    env       	List all environments
    env:delete	Delete environment
    env:init  	Create environment and switch to it
    env:sw    	switch to another environment
    version   	Prints out build version information

  Applications:
    app:delete [APPLICATION_NAME]	Delete OAM Applications
    app:ls                       	List applications with workloads, traits, status and created time
    app:status                   	get status of an application, including its workload and trait

  Workloads:
    containerized:run <appname> [args]	Run containerized workloads
    deployment:run <appname> [args]   	Run deployment workloads

  Traits:
    manualscaler <appname> [args]	Attach manualscaler trait to an app
    manualscaler:detach <appname>	Detach manualscaler trait from an app
    rollout <appname> [args]     	Attach rollout trait to an app
    rollout:detach <appname>     	Detach rollout trait from an app
    route <appname> [args]       	Attach route trait to an app
    route:detach <appname>       	Detach route trait from an app

  Release:


  Others:
    addon:config	Set the addon center, default is local (built-in ones)
    addon:ls    	List addons of workloads and traits

  System:
    completion [bash|zsh]	Output shell completion code for the specified shell (bash or zsh...
    refresh              	Refresh and sync definition files from cluster
    system:info          	show vela client and cluster version
    system:init [flags]  	Install OAM runtime and vela builtin capabilities.

Use "vela [command] --help" for more information about a command.

env

$ vela env:init test --namespace test
Create env succeed, current env is test

$ vela env test
NAME	NAMESPACE
test	test

$ vela env
NAME   	NAMESPACE
default	default
test   	test

$ vela env:sw default
Switch env succeed, current env is default

$ vela env:delete test
test deleted

$ vela env:delete default
Error: you can't delete current using default

workload run

$ vela containerized:run app123 -p 80 --image nginx:1.9.4
Creating AppConfig app123
SUCCEED

app

$ vela app:ls
NAME       	WORKLOAD             	TRAITS                     	STATUS	CREATED-TIME
app123     	ContainerizedWorkload	app123-manualscaler-trait  	False 	2020-08-05 20:19:03 +0800 CST
poc08032042	ContainerizedWorkload	                           	True  	2020-08-03 20:43:02 +0800 CST
poc1039    	ContainerizedWorkload	poc1039-manualscaler-trait 	False 	2020-08-02 10:39:54 +0800 CST


$ vela app:status app123
status: "False"
trait:
- apiVersion: core.oam.dev/v1alpha2
  kind: ManualScalerTrait
  metadata:
    creationTimestamp: null
    name: app123-manualscaler-trait
  spec:
    definitionRef:
      name: ""
workload:
  apiVersion: core.oam.dev/v1alpha2
  kind: ContainerizedWorkload
  metadata:
    creationTimestamp: null
    name: app123
  spec:
    definitionRef:
      name: ""


$ vela app:delete app123
Deleting AppConfig "app123"
DELETE SUCCEED

WorkloadDefinitions/TraitDefinitions

$ vela traits
NAME                              	ALIAS	DEFINITION                        	APPLIES TO                                                  	STATUS
manualscalertraits.core.oam.dev   	     	manualscalertraits.core.oam.dev   	core.oam.dev/v1alpha2.ContainerizedWorkload                 	-
simplerollouttraits.extend.oam.dev	     	simplerollouttraits.extend.oam.dev	core.oam.dev/v1alpha2.ContainerizedWorkload, deployments....	-

$ vela workloads
NAME                               	SHORT	DEFINITION
containerizedworkloads.core.oam.dev	     	containerizedworkloads.core.oam.dev
deployments.apps                   	     	deployments.apps

Auto-Completion

bash
To load completions in your current shell session:
$ source <(vela completion bash)

To load completions for every new session, execute once:
Linux:
  $ vela completion bash > /etc/bash_completion.d/vela
MacOS:
  $ vela completion bash > /usr/local/etc/bash_completion.d/vela
zsh
To load completions in your current shell session:
$ source <(vela completion zsh)

To load completions for every new session, execute once:
$ vela completion zsh > "${fpath[1]}/_vela"