diff --git a/CLOUDNATIVE.md b/CLOUDNATIVE.md new file mode 100644 index 00000000..ae0fc7d2 --- /dev/null +++ b/CLOUDNATIVE.md @@ -0,0 +1,127 @@ +## Chaosblade Operator:在云原生场景下,将 Kubernetes 设计理解与混沌实验模型相结合标准化实现方案 + +![chaosblade operator](https://user-images.githubusercontent.com/3992234/72435800-ed7c5200-37d9-11ea-9224-359d1d9103cb.png) + +[chaosblade-operator](https://github.com/chaosblade-io/chaosblade-operator) 项目是针对 Kubernetes 平台所实现的混沌实验注入工具,遵循上述混沌实验模型规范化实验场景,把实验定义为 Kubernetes CRD 资源,将实验模型中的四部分映射为 Kubernetes 资源属性,很友好的将混沌实验模型与 Kubernetes 声明式设计结合在一起,依靠混沌实验模型便捷开发场景的同时,又可以很好的结合 Kubernetes 设计理念,通过 kubectl 或者编写代码直接调用 Kubernetes API 来创建、更新、删除混沌实验,而且资源状态可以非常清晰的表示实验的执行状态,标准化实现 Kubernetes 故障注入。除了使用上述方式执行实验外,还可以使用 chaosblade cli 方式非常方便的执行 kubernetes 实验场景,查询实验状态等。 +遵循混沌实验模型实现的 chaosblade operator 除上述优势之外,还可以实现基础资源、应用服务、Docker 容器等场景复用,大大方便了 Kubernetes 场景的扩展,所以在符合 Kubernetes 标准化实现场景方式之上,结合混沌实验模型可以更有效、更清晰、更方便的实现、使用混沌实验场景。 +下面通过一个具体的案例来说明 chaosblade-operator 的使用:对 cn-hangzhou.192.168.0.205 节点本地端口 40690 访问模拟 60% 的网络丢包。 +**使用 yaml 配置方式,使用 kubectl 来执行实验** +``` +apiVersion: chaosblade.io/v1alpha1 +kind: ChaosBlade +metadata: + name: loss-node-network-by-names +spec: + experiments: + - scope: node + target: network + action: loss + desc: "node network loss" + matchers: + - name: names + value: ["cn-hangzhou.192.168.0.205"] + - name: percent + value: ["60"] + - name: interface + value: ["eth0"] + - name: local-port + value: ["40690"] +``` +执行实验: +``` +kubectl apply -f loss-node-network-by-names.yaml +``` +查询实验状态,返回信息如下(省略了 spec 等内容): +``` +~ » kubectl get blade loss-node-network-by-names -o json +{ + "apiVersion": "chaosblade.io/v1alpha1", + "kind": "ChaosBlade", + "metadata": { + "creationTimestamp": "2019-11-04T09:56:36Z", + "finalizers": [ + "finalizer.chaosblade.io" + ], + "generation": 1, + "name": "loss-node-network-by-names", + "resourceVersion": "9262302", + "selfLink": "/apis/chaosblade.io/v1alpha1/chaosblades/loss-node-network-by-names", + "uid": "63a926dd-fee9-11e9-b3be-00163e136d88" + }, + "status": { + "expStatuses": [ + { + "action": "loss", + "resStatuses": [ + { + "id": "057acaa47ae69363", + "kind": "node", + "name": "cn-hangzhou.192.168.0.205", + "nodeName": "cn-hangzhou.192.168.0.205", + "state": "Success", + "success": true, + "uid": "e179b30d-df77-11e9-b3be-00163e136d88" + } + ], + "scope": "node", + "state": "Success", + "success": true, + "target": "network" + } + ], + "phase": "Running" + } +} +``` +通过以上内容可以很清晰的看出混沌实验的运行状态,执行以下命令停止实验: +``` +kubectl delete -f loss-node-network-by-names.yaml +``` +或者直接删除此 blade 资源 +``` +kubectl delete blade loss-node-network-by-names +``` +还可以编辑 yaml 文件,更新实验内容执行,chaosblade operator 会完成实验的更新操作。 + +**使用 chaosblade cli 的 blade 命令执行** +``` +blade create k8s node-network loss --percent 60 --interface eth0 --local-port 40690 --kubeconfig config --names cn-hangzhou.192.168.0.205 +``` +如果执行失败,会返回详细的错误信息;如果执行成功,会返回实验的 UID: +``` +{"code":200,"success":true,"result":"e647064f5f20953c"} +``` +可通过以下命令查询实验状态: +``` +blade query k8s create e647064f5f20953c --kubeconfig config + +{ + "code": 200, + "success": true, + "result": { + "uid": "e647064f5f20953c", + "success": true, + "error": "", + "statuses": [ + { + "id": "fa471a6285ec45f5", + "uid": "e179b30d-df77-11e9-b3be-00163e136d88", + "name": "cn-hangzhou.192.168.0.205", + "state": "Success", + "kind": "node", + "success": true, + "nodeName": "cn-hangzhou.192.168.0.205" + } + ] + } +} +``` +销毁实验: +``` +blade destroy e647064f5f20953c +``` +除了上述两种方式调用外,还可以使用 kubernetes client-go 方式执行,具体可参考:[executor.go](https://github.com/chaosblade-io/chaosblade/blob/master/exec/kubernetes/executor.go) 代码实现。 + +通过上述介绍,可以看出在设计 ChaosBlade 项目初期就考虑了云原生实验场景,将混沌实验模型与 Kubernetes 设计理念友好的结合在一起,不仅可以遵循 Kubernetes 标准化实现,还可以复用其他领域场景和 chaosblade cli 调用方式。 + +详细的中文使用文档:https://chaosblade-io.gitbook.io/chaosblade-help-zh-cn/blade-create-k8s diff --git a/Makefile b/Makefile index 830e1573..784745ba 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,7 @@ GO=env $(GO_ENV) $(GO_MODULE) go UNAME := $(shell uname) BUILD_TARGET=target +BUILD_TARGET_FOR_JAVA_CPLUS=build-target BUILD_TARGET_DIR_NAME=chaosblade-$(BLADE_VERSION) BUILD_TARGET_PKG_DIR=$(BUILD_TARGET)/chaosblade-$(BLADE_VERSION) BUILD_TARGET_PKG_NAME=$(BUILD_TARGET)/chaosblade-$(BLADE_VERSION).tar.gz @@ -45,42 +46,13 @@ BLADE_EXEC_DOCKER_BRANCH=master BLADE_OPERATOR_PROJECT=https://github.com/chaosblade-io/chaosblade-operator.git BLADE_OPERATOR_BRANCH=master -# oss url -BLADE_OSS_URL=https://chaosblade.oss-cn-hangzhou.aliyuncs.com/agent/release -# used to transform java class -JVM_SANDBOX_VERSION=1.2.0 -JVM_SANDBOX_NAME=sandbox-$(JVM_SANDBOX_VERSION)-bin.zip -JVM_SANDBOX_OSS_URL=https://ompc.oss-cn-hangzhou.aliyuncs.com/jvm-sandbox/release/$(JVM_SANDBOX_NAME) -JVM_SANDBOX_DEST_PATH=$(BUILD_TARGET_CACHE)/$(JVM_SANDBOX_NAME) -# used to execute jvm chaos -BLADE_JAVA_AGENT_VERSION=0.4.0 -BLADE_JAVA_AGENT_NAME=chaosblade-java-agent-$(BLADE_JAVA_AGENT_VERSION).jar -BLADE_JAVA_AGENT_DOWNLOAD_URL=$(BLADE_OSS_URL)/$(BLADE_JAVA_AGENT_NAME) -BLADE_JAVA_AGENT_DEST_PATH=$(BUILD_TARGET_CACHE)/$(BLADE_JAVA_AGENT_NAME) -# used to invoke by chaosblade -BLADE_JAVA_AGENT_SPEC=chaosblade-jvm-spec-$(BLADE_VERSION).yaml -BLADE_JAVA_AGENT_SPEC_DEST_PATH=$(BUILD_TARGET_CACHE)/$(BLADE_JAVA_AGENT_SPEC) -BLADE_JAVA_AGENT_SPEC_DOWNLOAD_URL=$(BLADE_OSS_URL)/$(BLADE_JAVA_AGENT_SPEC) -# used to java agent attachp -BLADE_JAVA_TOOLS_JAR_NAME=tools.jar -BLADE_JAVA_TOOLS_JAR_DEST_PATH=$(BUILD_TARGET_CACHE)/$(BLADE_JAVA_TOOLS_JAR_NAME) -BLADE_JAVA_TOOLS_JAR_DOWNLOAD_URL=$(BLADE_OSS_URL)/$(BLADE_JAVA_TOOLS_JAR_NAME) -# cplus zip contains jar and scripts -BLADE_CPLUS_ZIP_VERSION=0.0.1 -BLADE_CPLUS_LIB_DIR_NAME=cplus -BLADE_CPLUS_DIR_NAME=chaosblade-exec-cplus-$(BLADE_CPLUS_ZIP_VERSION) -BLADE_CPLUS_ZIP_NAME=$(BLADE_CPLUS_DIR_NAME).zip -BLADE_CPLUS_ZIP_DOWNLOAD_URL=$(BLADE_OSS_URL)/$(BLADE_CPLUS_ZIP_NAME) -BLADE_CPLUS_ZIP_DEST_PATH=$(BUILD_TARGET_CACHE)/$(BLADE_CPLUS_ZIP_NAME) -# cplus jar -BLADE_CPLUS_AGENT_NAME=chaosblade-exec-cplus-$(BLADE_CPLUS_ZIP_VERSION).jar -# important!! the name is related to the blade program -BLADE_CPLUS_AGENT_DEST_NAME=chaosblade-exec-cplus.jar - -# cplus spec is used to invoke by chaosblade -BLADE_CPLUS_AGENT_SPEC=chaosblade-cplus-spec.yaml -BLADE_CPLUS_AGENT_SPEC_DEST_PATH=$(BUILD_TARGET_CACHE)/chaosblade-cplus-spec.yaml -BLADE_CPLUS_AGENT_SPEC_DOWNLOAD_URL=$(BLADE_OSS_URL)/$(BLADE_CPLUS_AGENT_SPEC) +# chaosblade-exec-jvm +BLADE_EXEC_JVM_PROJECT=https://github.com/chaosblade-io/chaosblade-exec-jvm.git +BLADE_EXEC_JVM_BRANCH=master + +# chaosblade-exec-cplus +BLADE_EXEC_CPLUS_PROJECT=https://github.com/chaosblade-io/chaosblade-exec-cplus.git +BLADE_EXEC_CPLUS_BRANCH=master # docker yaml DOCKER_YAML_FILE_NAME=chaosblade-docker-spec-$(BLADE_VERSION).yaml @@ -91,10 +63,25 @@ ifeq ($(GOOS), linux) endif # build chaosblade package and image -build: pre_build build_cli build_os build_docker build_kubernetes +build: pre_build build_cli build_os build_docker build_kubernetes build_java build_cplus # tar package tar zcvf $(BUILD_TARGET_PKG_FILE_PATH) -C $(BUILD_TARGET) $(BUILD_TARGET_DIR_NAME) +# alias +cli: build_cli +os: build_os +os_darwin: build_darwin +docker: build_docker +kubernetes: build_kubernetes +java: build_java +cplus: build_cplus + +# for example: make build_with cli os_darwin +build_with: pre_build + +# for example: make build_with cli os +build_with_linux: pre_build + # build chaosblade cli: blade build_cli: # build blade cli @@ -113,6 +100,18 @@ endif make -C $(BUILD_TARGET_CACHE)/chaosblade-exec-os cp $(BUILD_TARGET_CACHE)/chaosblade-exec-os/$(BUILD_TARGET_BIN)/* $(BUILD_TARGET_BIN) +build_os_darwin: +ifneq ($(BUILD_TARGET_CACHE)/chaosblade-exec-os, $(wildcard $(BUILD_TARGET_CACHE)/chaosblade-exec-os)) + git clone -b $(BLADE_EXEC_OS_BRANCH) $(BLADE_EXEC_OS_PROJECT) $(BUILD_TARGET_CACHE)/chaosblade-exec-os +else +ifdef ALERTMSG + $(error $(ALERTMSG)) +endif + git -C $(BUILD_TARGET_CACHE)/chaosblade-exec-os pull origin $(BLADE_EXEC_OS_BRANCH) +endif + make build_darwin -C $(BUILD_TARGET_CACHE)/chaosblade-exec-os + cp $(BUILD_TARGET_CACHE)/chaosblade-exec-os/$(BUILD_TARGET_BIN)/* $(BUILD_TARGET_BIN) + build_docker: ifneq ($(BUILD_TARGET_CACHE)/chaosblade-exec-docker, $(wildcard $(BUILD_TARGET_CACHE)/chaosblade-exec-docker)) git clone -b $(BLADE_EXEC_DOCKER_BRANCH) $(BLADE_EXEC_DOCKER_PROJECT) $(BUILD_TARGET_CACHE)/chaosblade-exec-docker @@ -131,48 +130,34 @@ endif make -C $(BUILD_TARGET_CACHE)/chaosblade-operator cp $(BUILD_TARGET_CACHE)/chaosblade-operator/$(BUILD_TARGET_BIN)/* $(BUILD_TARGET_BIN) -# create dir or download necessary file -pre_build:mkdir_build_target download_sandbox download_blade_java_agent download_cplus_agent - rm -rf $(BUILD_TARGET_PKG_DIR) $(BUILD_TARGET_PKG_FILE_PATH) - mkdir -p $(BUILD_TARGET_BIN) $(BUILD_TARGET_LIB) - # unzip jvm-sandbox - unzip $(JVM_SANDBOX_DEST_PATH) -d $(BUILD_TARGET_LIB) - # cp chaosblade-java-agent - cp $(BLADE_JAVA_AGENT_DEST_PATH) $(BUILD_TARGET_LIB)/sandbox/module/ - # cp jvm.spec.yaml to bin - cp $(BLADE_JAVA_AGENT_SPEC_DEST_PATH) $(BUILD_TARGET_BIN) - # cp tools.jar to bin - cp $(BLADE_JAVA_TOOLS_JAR_DEST_PATH) $(BUILD_TARGET_BIN) - # unzip chaosblade-exec-cplus - unzip $(BLADE_CPLUS_ZIP_DEST_PATH) -d $(BUILD_TARGET_LIB) - # rename chaosblade-exec-cplus-VERSION.jar to chaosblade-exec-cplus.jar - mv $(BUILD_TARGET_LIB)/$(BLADE_CPLUS_DIR_NAME)/$(BLADE_CPLUS_AGENT_NAME) $(BUILD_TARGET_LIB)/$(BLADE_CPLUS_DIR_NAME)/$(BLADE_CPLUS_AGENT_DEST_NAME) - # rename chaosblade-exec-cplus to cplus - mv $(BUILD_TARGET_LIB)/$(BLADE_CPLUS_DIR_NAME) $(BUILD_TARGET_LIB)/$(BLADE_CPLUS_LIB_DIR_NAME) - # cp chaosblade-cplus-spec.yaml to bin - mv $(BLADE_CPLUS_AGENT_SPEC_DEST_PATH) $(BUILD_TARGET_BIN) - -# download sandbox for java chaos experiment -download_sandbox: -ifneq ($(JVM_SANDBOX_DEST_PATH), $(wildcard $(JVM_SANDBOX_DEST_PATH))) - wget "$(JVM_SANDBOX_OSS_URL)" -O $(JVM_SANDBOX_DEST_PATH) +build_java: +ifneq ($(BUILD_TARGET_CACHE)/chaosblade-exec-jvm, $(wildcard $(BUILD_TARGET_CACHE)/chaosblade-exec-jvm)) + git clone -b $(BLADE_EXEC_JVM_BRANCH) $(BLADE_EXEC_JVM_PROJECT) $(BUILD_TARGET_CACHE)/chaosblade-exec-jvm +else +ifdef ALERTMSG + $(error $(ALERTMSG)) endif + git -C $(BUILD_TARGET_CACHE)/chaosblade-exec-jvm pull origin $(BLADE_EXEC_JVM_BRANCH) +endif + make -C $(BUILD_TARGET_CACHE)/chaosblade-exec-jvm + cp -R $(BUILD_TARGET_CACHE)/chaosblade-exec-jvm/$(BUILD_TARGET_FOR_JAVA_CPLUS)/$(BUILD_TARGET_DIR_NAME)/* $(BUILD_TARGET_PKG_DIR) -# download java agent and spec config file -download_blade_java_agent: -ifneq ($(BLADE_JAVA_AGENT_DEST_PATH), $(wildcard $(BLADE_JAVA_AGENT_DEST_PATH))) - wget "$(BLADE_JAVA_AGENT_DOWNLOAD_URL)" -O $(BLADE_JAVA_AGENT_DEST_PATH) +build_cplus: +ifneq ($(BUILD_TARGET_CACHE)/chaosblade-exec-cplus, $(wildcard $(BUILD_TARGET_CACHE)/chaosblade-exec-cplus)) + git clone -b $(BLADE_EXEC_CPLUS_BRANCH) $(BLADE_EXEC_CPLUS_PROJECT) $(BUILD_TARGET_CACHE)/chaosblade-exec-cplus +else +ifdef ALERTMSG + $(error $(ALERTMSG)) endif -ifneq ($(BLADE_JAVA_TOOLS_JAR_DEST_PATH), $(wildcard $(BLADE_JAVA_TOOLS_JAR_DEST_PATH))) - wget "$(BLADE_JAVA_TOOLS_JAR_DOWNLOAD_URL)" -O $(BLADE_JAVA_TOOLS_JAR_DEST_PATH) + git -C $(BUILD_TARGET_CACHE)/chaosblade-exec-cplus pull origin $(BLADE_EXEC_CPLUS_BRANCH) endif - wget "$(BLADE_JAVA_AGENT_SPEC_DOWNLOAD_URL)" -O $(BLADE_JAVA_AGENT_SPEC_DEST_PATH) + make -C $(BUILD_TARGET_CACHE)/chaosblade-exec-cplus + cp -R $(BUILD_TARGET_CACHE)/chaosblade-exec-cplus/$(BUILD_TARGET_FOR_JAVA_CPLUS)/$(BUILD_TARGET_DIR_NAME)/* $(BUILD_TARGET_PKG_DIR) -download_cplus_agent: -ifneq ($(BLADE_CPLUS_ZIP_DEST_PATH), $(wildcard $(BLADE_CPLUS_ZIP_DEST_PATH))) - wget "$(BLADE_CPLUS_ZIP_DOWNLOAD_URL)" -O $(BLADE_CPLUS_ZIP_DEST_PATH) -endif - wget "$(BLADE_CPLUS_AGENT_SPEC_DOWNLOAD_URL)" -O $(BLADE_CPLUS_AGENT_SPEC_DEST_PATH) +# create dir or download necessary file +pre_build:mkdir_build_target + rm -rf $(BUILD_TARGET_PKG_DIR) $(BUILD_TARGET_PKG_FILE_PATH) + mkdir -p $(BUILD_TARGET_BIN) $(BUILD_TARGET_LIB) # create cache dir mkdir_build_target: @@ -180,6 +165,11 @@ ifneq ($(BUILD_TARGET_CACHE), $(wildcard $(BUILD_TARGET_CACHE))) mkdir -p $(BUILD_TARGET_CACHE) endif +# build dawrin version on mac system +build_darwin: pre_build build_cli build_os_darwin build_docker build_kubernetes build_java build_cplus + # tar package + tar zcvf $(BUILD_TARGET_PKG_FILE_PATH) -C $(BUILD_TARGET) $(BUILD_TARGET_DIR_NAME) + # build chaosblade linux version by docker image build_linux: docker build -f build/image/musl/Dockerfile -t chaosblade-build-musl:latest build/image/musl diff --git a/README.md b/README.md index 8eba1395..a84c2c79 100644 --- a/README.md +++ b/README.md @@ -4,27 +4,42 @@ [![Build Status](https://travis-ci.org/chaosblade-io/chaosblade.svg?branch=master)](https://travis-ci.org/chaosblade-io/chaosblade) [![codecov](https://codecov.io/gh/chaosblade-io/chaosblade/branch/master/graph/badge.svg)](https://codecov.io/gh/chaosblade-io/chaosblade) ![license](https://img.shields.io/github/license/chaosblade-io/chaosblade.svg) + +中文版 [README](README_CN.md) ## Introduction -Chaosblade is an experimental tool that follows the principles of Chaos Engineering and is used to simulate common fault scenarios, helping to improve the recoverability of faulty systems and the fault tolerance of faults. +ChaosBlade is an Alibaba open source experimental injection tool that follows the principles of chaos engineering and chaos experimental models to help enterprises improve the fault tolerance of distributed systems and ensure business continuity during the process of enterprises going to cloud or moving to cloud native systems. -Chaosblade is Alibaba's internal MonkeyKing open source project. It is based on Alibaba's nearly ten years of fault testing and practice, combining the best ideas and practices of the Group's businesses. +Chaosblade is an internal open source project of MonkeyKing. It is based on Alibaba's nearly ten years of failure testing and drill practice, and combines the best ideas and practices of the Group's businesses. -Chaosblade can be compiled and run directly, and the cli command prompt makes it easier to perform chaos engineering experiments. Currently supported experimental areas include os, java, docker and kubernetes, for example, filling disk, killing the process, network delay, Dubbo, MySQL, Servlet and custom class methods of Java application class delay or exception, kill container, kill Pod and so on. You can execute `blade create -h` command to view +ChaosBlade is not only easy to use, but also supports rich experimental scenarios. The scenarios include: +* Basic resources: such as CPU, memory, network, disk, process and other experimental scenarios; +* Java applications: such as databases, caches, messages, JVM itself, microservices, etc. You can also specify any class method to inject various complex experimental scenarios; +* C ++ applications: such as specifying arbitrary methods or experimental lines of code injection delay, tampering with variables and return values; +* Docker container: such as killing the container, the CPU in the container, memory, network, disk, process and other experimental scenarios; +* Cloud-native platforms: For example, CPU, memory, network, disk, and process experimental scenarios on Kubernetes platform nodes, Pod network and Pod itself experimental scenarios such as killing Pods, and container experimental scenarios such as the aforementioned Docker container experimental scenario; -中文使用文档:https://chaosblade-io.gitbook.io/chaosblade-help-zh-cn/ +Encapsulating scenes by domain into individual projects can not only standardize the scenes in the domain, but also facilitate the horizontal and vertical expansion of the scenes. By following the chaos experimental model, the chaosblade cli can be called uniformly. The items currently included are: +* [chaosblade] (https://github.com/chaosblade-io/chaosblade): Chaos experiment management tool, including commands for creating experiments, destroying experiments, querying experiments, preparing experimental environments, and canceling experimental environments. It is the execution of chaotic experiments. Tools, execution methods include CLI and HTTP. Provides complete commands, experimental scenarios, and scenario parameter descriptions, and the operation is simple and clear. +* [chaosblade-spec-go] (https://github.com/chaosblade-io/chaosblade-spec-go): Chaos experimental model Golang language definition, scenes implemented using Golang language are easy to implement based on this specification. +* [chaosblade-exec-os] (https://github.com/chaosblade-io/chaosblade-exec-os): Implementation of basic resource experimental scenarios. +* [chaosblade-exec-docker] (https://github.com/chaosblade-io/chaosblade-exec-docker): Docker container experimental scenario implementation, standardized by calling the Docker API. +* [chaosblade-operator] (https://github.com/chaosblade-io/chaosblade-operator): Kubernetes platform experimental scenario is implemented, chaos experiments are defined by Kubernetes standard CRD method, it is very convenient to use Kubernetes resource operation method To create, update, and delete experimental scenarios, including using kubectl, client-go, etc., and also using the chaosblade cli tool described above. +* [chaosblade-exec-jvm] (https://github.com/chaosblade-io/chaosblade-exec-jvm): Java application experimental scenario implementation, using Java Agent technology to mount dynamically, without any access, zero-cost use It also supports uninstallation and completely recycles various resources created by the Agent. +* [chaosblade-exec-cplus] (https://github.com/chaosblade-io/chaosblade-exec-cplus): C ++ application experimental scenario implementation, using GDB technology to implement method and code line level experimental scenario injection. ## CLI Command +You can download the latest chaosblade toolkit from [Releases] (https://github.com/chaosblade-io/chaosblade/releases) and extract it and use it. If you want to inject Kubernetes related fault scenarios, you need to install [chaosblade-operator] (https://github.com/chaosblade-io/chaosblade-operator/releases). For detailed Chinese usage documents, please see [chaosblade-help-zh-cn ] (https://chaosblade-io.gitbook.io/chaosblade-help-zh-cn/). -Chaosblade's cli tool is a blade that can be used directly after downloading or compiling. The list of blade commands is as follows: +chaosblade supports CLI and HTTP invocation methods. The supported commands are as follows: * **prepare**: alias is p, preparation before the chaos engineering experiment, such as drilling Java applications, you need to attach the java agent. For example, to drill an application whose application name is business, execute `blade p jvm --process business` on the target host. If the attach is successful, return the uid for status query or agent revoke. * **revoke**: alias is r, undo chaos engineering experiment preparation before, such as detaching java agent. The command is `blade revoke UID` -* **create**: alias is c, create a chaos engineering experiment. The command is `blade create [TARGET] [ACTION] [FLAGS]`. For example, if you implement a Dubbo consumer call xxx.xxx.Service interface delay 3s, the command executed is `blade create dubbo delay --consumer --time 3000 -- Service xxx.xxx.Service`, if the injection is successful, return the experimental uid for status query and destroy the experiment. +* **create**: alias is c, create a chaos engineering experiment. The command is `blade create [TARGET] [ACTION] [FLAGS]`. For example, if you implement a Dubbo consumer call xxx.xxx.Service interface delay 3s, the command executed is `blade create dubbo delay --consumer --time 3000 --Service xxx.xxx.Service`, if the injection is successful, return the experimental uid for status query and destroy the experiment. * **destroy**: alias is d, destroy a chaos engineering experiment, such as destroying the Dubbo delay experiment mentioned above, the command is `blade destroy UID` * **status**: alias s, query preparation stage or experiment status, the command is `blade status UID` or `blade status --type create` +* **server**: start the web server, expose the HTTP service, and call chaosblade through HTTP requests. For example, execute on the target machine xxxx: `blade server start -p 9526` to perform a CPU full load experiment:` curl "http://xxxx:9526/chaosblade?Cmd=create%20cpu%20fullload" ` -Use the `blade help [COMMAND]` command to view help - +Use the `blade help [COMMAND]` or `blade [COMMAND] -h` command to view help ## Experience Demo Download the chaosblade demo image and experience the use of the blade toolkit @@ -32,80 +47,58 @@ Download the chaosblade demo image and experience the use of the blade toolkit ![demo.gif](https://chaosblade.oss-cn-hangzhou.aliyuncs.com/agent/release/chaosblade-demo-0.0.1.gif) Download image command: -```bash -docker pull registry.cn-hangzhou.aliyuncs.com/chaosblade/chaosblade-demo:latest +```shell script +docker pull docker pull chaosbladeio/chaosblade-demo ``` - Run the demo container: -```bash -docker run -it registry.cn-hangzhou.aliyuncs.com/chaosblade/chaosblade-demo:latest +```shell script +docker run -it --privileged chaosbladeio/chaosblade-demo ``` - After entering the container, you can read the README.txt file to implement the chaos experiment, Enjoy it. -## Compile -Install [Golang](https://golang.org/doc/install) first, then download the project to `GOPATH`: -```bash -go get github.com/chaosblade-io/chaosblade -``` -This project was downloaded to the `GOPATH/src/github.com/chaosblade-io/chaosblade` directory. You can execute `go env` command to view the `GOPATH` value. +## Cloud Native +[chaosblade-operator] (https://github.com/chaosblade-io/chaosblade-operator) The project is a chaos experiment injection tool for cloud-native platforms. It follows the chaos experiment model to standardize the experimental scenario and defines the experiment as Kubernetes CRD Resources, mapping experimental models to Kubernetes resource attributes, and very friendly combination of chaotic experimental models with Kubernetes declarative design. While relying on chaotic experimental models to conveniently develop scenarios, it can also well integrate Kubernetes design concepts, through kubectl or Write code to directly call the Kubernetes API to create, update, and delete chaotic experiments, and the resource status can clearly indicate the execution status of the experiment, and standardize Kubernetes fault injection. In addition to using the above methods to perform experiments, you can also use the chaosblade cli method to execute kubernetes experimental scenarios and query the experimental status very conveniently. For details, please read the chinese document: [Chaos Engineering Practice under Cloud Native](CLOUDNATIVE.md) -Go to the project root directory(`GOPATH/src/github.com/chaosblade-io/chaosblade`) and execute compile: -```bash +## Compile +This project is written in golang, so you need to install the latest golang version first. The minimum supported version is 1.11. After the Clone project, enter the project directory and execute the following command to compile: +```shell script make ``` - -If you compile the Linux package on the Mac operating system, you can do: -```bash -make build_linux +If on a mac system, compile the current system version, execute: +```shell script +make build_darwin ``` - -If you compile the chaosblade image, you can do: -```bash -make build_image +If you want to compile linux system version on mac system, execute: +```shell script +make build_linux ``` - -Compilation process: -* Create the compilation result folder target and chaosblade version directory in the project root directory, and the compiled file is placed in the target/chaosblade-[version] directory. -* Download the third-party package [jvm-sandbox](https://github.com/alibaba/jvm-sandbox/releases) required by Java Application Chaos Experiment to the cache folder (target/cache) -* Download chaosblade java agent and tools.jar (for attaching jvm), jar package for implementing Java chaos experiments to cache folder (target/cache) -* Unzip the JVM-SANDBOX package to the target/chaosblade-[version]/lib directory; copy the chaosblade java agent jar to the JVM-SANDBOX module directory (target/chaosblade-[version]/lib/sandbox/module) -* Compile the blade (cli command tool) to the target/chaosblade-[version] directory, and other programs needed to implement the chaos experiment will be compiled into the target/chaosblade-[version]/bin directory. -* Compile is complete, you can enter the target/chaosblade-[version] directory, you can use the blade toolkit. - -clean compilation: -```bash -make clean +You can also compile selectively, for example, you only need to compile cli and os scenes, then execute: +```shell script +make build_with cli os +# If it is a mac system, run +make build_with cli os_darwin ``` -## Contributing -We welcome every contribution, even if it is just punctuation. See details of [CONTRIBUTING](CONTRIBUTING.md) - ## Bugs and Feedback -For bug report, questions and discussions please submit [GitHub Issues](https://github.com/chaosblade-io/chaosblade/issues). - -Contact us: chaosblade.io.01@gmail.com - -Gitter room: [chaosblade community](https://gitter.im/chaosblade-io/community) +For bug report, questions and discussions please submit [GitHub Issues](https://github.com/chaosblade-io/chaosblade/issues). +You can also contact us via: +* Dingding group (recommended for chinese): 23177705 +* Gitter room: [chaosblade community] (https://gitter.im/chaosblade-io/community) +* Email: chaosblade.io.01@gmail.com +* Twitter: [chaosblade.io] (https://twitter.com/ChaosbladeI) -## Component Architecture -![component.png](https://user-images.githubusercontent.com/3992234/58927455-2f8fe080-8781-11e9-9a5e-4e251b1e50f9.png) - -* Cli contains create, destroy, status, prepare, revoke, version commands -* Relevant chaos experiment data is stored locally using SQLite (under the chaosblade directory) -* Create and destroy commands are used to create or destroy chaos experiments -* Prepare and revoke commands are used to prepare or revoke experimental environment,such as attaching jvm-sandbox -* Chaos experiment and environment preparation record can be queried by status command - - -## Executor Project -* [chaosblade-exec-jvm](https://github.com/chaosblade-io/chaosblade-exec-jvm): chaosblade executor for Java Applications +## Contributing +We welcome every contribution, even if it is just punctuation. See details of [CONTRIBUTING](CONTRIBUTING.md) +## Business Registration +The original intention of our open source project is to lower the threshold for chaos engineering to be implemented in enterprises, so we highly value the use of the project in enterprises. Welcome everyone here [ISSUE](https://github.com/chaosblade-io/chaosblade/issues/32). After registration, you will be invited to join the corporate mail group to discuss the problems encountered by Chaos Engineering in the landing of the company and share the landing experience. -## Ecosystem Architecture -![ecosystem.png](https://chaosblade.oss-cn-hangzhou.aliyuncs.com/doc/image/ecosystem.png) +## Experiments Landscape +![experiments landscape](https://user-images.githubusercontent.com/3992234/72340872-eb47c400-3703-11ea-830f-062e117c2e95.png) +## Ecosystem +![ecosystem](https://user-images.githubusercontent.com/3992234/72410783-429d7100-37a4-11ea-8314-540560f8a54f.png) ## License Chaosblade is licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for the full license text. diff --git a/README_CN.md b/README_CN.md index cb12c6b1..6e80daa7 100644 --- a/README_CN.md +++ b/README_CN.md @@ -1,82 +1,113 @@ ![logo](https://chaosblade.oss-cn-hangzhou.aliyuncs.com/doc/image/chaosblade-logo.png) -# Chaosblade: 一个简单易用且功能强大的混沌实验实施工具 +# ChaosBlade: 一个简单易用且功能强大的混沌实验实施工具 [![Build Status](https://travis-ci.org/chaosblade-io/chaosblade.svg?branch=master)](https://travis-ci.org/chaosblade-io/chaosblade) [![codecov](https://codecov.io/gh/chaosblade-io/chaosblade/branch/master/graph/badge.svg)](https://codecov.io/gh/chaosblade-io/chaosblade) ![license](https://img.shields.io/github/license/chaosblade-io/chaosblade.svg) -## 项目简介 -Chaosblade 是遵循混沌工程(Chaos Engineering)原理的实验工具,用于模拟常见的故障场景,帮助提升分布式系统的可恢复性和对故障的容错性。 + + +## 项目介绍 +ChaosBlade 是阿里巴巴开源的一款遵循混沌工程原理和混沌实验模型的实验注入工具,帮助企业提升分布式系统的容错能力,并且在企业上云或往云原生系统迁移过程中业务连续性保障。 Chaosblade 是内部 MonkeyKing 对外开源的项目,其建立在阿里巴巴近十年故障测试和演练实践基础上,结合了集团各业务的最佳创意和实践。 -Chaosblade 可直接编译运行,cli 命令提示使执行混沌实验更加简单。目前支持的演练场景有操作系统类的 CPU、磁盘、进程、网络,Java 应用类的 Dubbo、MySQL、Servlet 和自定义类方法延迟或抛异常等以及杀容器、杀 Pod,具体可执行 `blade create -h` 查看: +ChaosBlade 不仅使用简单,而且支持丰富的实验场景,场景包括: +* 基础资源:比如 CPU、内存、网络、磁盘、进程等实验场景; +* Java 应用:比如数据库、缓存、消息、JVM 本身、微服务等,还可以指定任意类方法注入各种复杂的实验场景; +* C++ 应用:比如指定任意方法或某行代码注入延迟、变量和返回值篡改等实验场景; +* Docker 容器:比如杀容器、容器内 CPU、内存、网络、磁盘、进程等实验场景; +* 云原生平台:比如 Kubernetes 平台节点上 CPU、内存、网络、磁盘、进程实验场景,Pod 网络和 Pod 本身实验场景如杀 Pod,容器的实验场景如上述的 Docker 容器实验场景; + +将场景按领域实现封装成一个个单独的项目,不仅可以使领域内场景标准化实现,而且非常方便场景水平和垂直扩展,通过遵循混沌实验模型,实现 chaosblade cli 统一调用。目前包含的项目如下: +* [chaosblade](https://github.com/chaosblade-io/chaosblade):混沌实验管理工具,包含创建实验、销毁实验、查询实验、实验环境准备、实验环境撤销等命令,是混沌实验的执行工具,执行方式包含 CLI 和 HTTP 两种。提供完善的命令、实验场景、场景参数说明,操作简洁清晰。 +* [chaosblade-spec-go](https://github.com/chaosblade-io/chaosblade-spec-go): 混沌实验模型 Golang 语言定义,便于使用 Golang 语言实现的场景都基于此规范便捷实现。 +* [chaosblade-exec-os](https://github.com/chaosblade-io/chaosblade-exec-os): 基础资源实验场景实现。 +* [chaosblade-exec-docker](https://github.com/chaosblade-io/chaosblade-exec-docker): Docker 容器实验场景实现,通过调用 Docker API 标准化实现。 +* [chaosblade-operator](https://github.com/chaosblade-io/chaosblade-operator): Kubernetes 平台实验场景实现,将混沌实验通过 Kubernetes 标准的 CRD 方式定义,很方便的使用 Kubernetes 资源操作的方式来创建、更新、删除实验场景,包括使用 kubectl、client-go 等方式执行,而且还可以使用上述的 chaosblade cli 工具执行。 +* [chaosblade-exec-jvm](https://github.com/chaosblade-io/chaosblade-exec-jvm): Java 应用实验场景实现,使用 Java Agent 技术动态挂载,无需任何接入,零成本使用,而且支持卸载,完全回收 Agent 创建的各种资源。 +* [chaosblade-exec-cplus](https://github.com/chaosblade-io/chaosblade-exec-cplus): C++ 应用实验场景实现,使用 GDB 技术实现方法、代码行级别的实验场景注入。 ## 使用文档 -Chaosblade 的 cli 工具是 blade,下载或编译后可直接使用。blade 命令列表如下: +你可以从 [Releases](https://github.com/chaosblade-io/chaosblade/releases) 地址下载最新的 chaosblade 工具包,解压即用。如果想注入 Kubernetes 相关故障场景,需要安装 [chaosblade-operator](https://github.com/chaosblade-io/chaosblade-operator/releases),详细的中文使用文档请查看 [chaosblade-help-zh-cn](https://chaosblade-io.gitbook.io/chaosblade-help-zh-cn/)。 -* prepare:简写 p,混沌实验前的准备,比如演练 Java 应用,则需要挂载 java agent。要演练应用名是 business 的应用,则在目标主机上执行 `blade p jvm --process business`。如果挂载成功,返回挂载的 uid,用于状态查询或者撤销挂载使用。 +chaosblade 支持 CLI 和 HTTP 两种调用方式,支持的命令如下: +* prepare:简写 p,混沌实验前的准备,比如演练 Java 应用,则需要挂载 java agent。例如要演练的应用名是 business,则在目标主机上执行 `blade p jvm --process business`。如果挂载成功,返回挂载的 uid,用于状态查询或者撤销挂载。 * revoke:简写 r,撤销之前混沌实验准备,比如卸载 java agent。命令是 `blade revoke UID` * create: 简写是 c,创建一个混沌演练实验,指执行故障注入。命令是 `blade create [TARGET] [ACTION] [FLAGS]`,比如实施一次 Dubbo consumer 调用 xxx.xxx.Service 接口延迟 3s,则执行的命令为 `blade create dubbo delay --consumer --time 3000 --service xxx.xxx.Service`,如果注入成功,则返回实验的 uid,用于状态查询和销毁此实验使用。 * destroy:简写是 d,销毁之前的混沌实验,比如销毁上面提到的 Dubbo 延迟实验,命令是 `blade destroy UID` * status:简写 s,查询准备阶段或者实验的状态,命令是 `blade status UID` 或者 `blade status --type create` +* server:启动 web server,暴露 HTTP 服务,可以通过 HTTP 请求来调用 chaosblade。例如在目标机器xxxx上执行:`blade server start -p 9526`,执行 CPU 满载实验:`curl "http:/xxxx:9526/chaosblade?cmd=create%20cpu%20fullload"` + +以上命令帮助均可使用 `blade help [COMMAND]` 或者 `blade [COMMAND] -h` 查看,也可查看[新手指南](https://github.com/chaosblade-io/chaosblade/wiki/%E6%96%B0%E6%89%8B%E6%8C%87%E5%8D%97),或者上述中文使用文档,快速上手使用。 -以上命令帮助均可使用 `blade help [COMMAND]` 查看,也可查看[新手指南](https://github.com/chaosblade-io/chaosblade/wiki/%E6%96%B0%E6%89%8B%E6%8C%87%E5%8D%97),快速上手使用。 - -## Demo 体验 -下载 chaosblade demo 镜像体验 blade 工具的使用。 - +## 快速体验 +如果想不下载 chaosblade 工具包,快速体验 chaosblade,可以拉取 docker 镜像并运行,在容器内体验。 ![demo.gif](https://chaosblade.oss-cn-hangzhou.aliyuncs.com/agent/release/chaosblade-demo-0.0.1.gif) +操作步骤如下: 下载镜像: ```bash -docker pull registry.cn-hangzhou.aliyuncs.com/chaosblade/chaosblade-demo:latest +docker pull docker pull chaosbladeio/chaosblade-demo ``` 启动镜像: ```bash -docker run -it registry.cn-hangzhou.aliyuncs.com/chaosblade/chaosblade-demo:latest +docker run -it --privileged chaosbladeio/chaosblade-demo ``` 进入镜像之后,可阅读 README.txt 文件实施混沌实验,Enjoy it。 -## 本地编译 -在项目根目录下执行以下命令进行编译: -```bash +## 面向云原生 +[chaosblade-operator](https://github.com/chaosblade-io/chaosblade-operator) 项目是针对云原生平台所实现的混沌实验注入工具,遵循混沌实验模型规范化实验场景,把实验定义为 Kubernetes CRD 资源,将实验模型映射为 Kubernetes 资源属性,很友好的将混沌实验模型与 Kubernetes 声明式设计结合在一起,依靠混沌实验模型便捷开发场景的同时,又可以很好的结合 Kubernetes 设计理念,通过 kubectl 或者编写代码直接调用 Kubernetes API 来创建、更新、删除混沌实验,而且资源状态可以非常清晰的表示实验的执行状态,标准化实现 Kubernetes 故障注入。除了使用上述方式执行实验外,还可以使用 chaosblade cli 方式非常方便的执行 kubernetes 实验场景,查询实验状态等。具体请阅读:[云原生下的混沌工程实践](CLOUDNATIVE.md) + +## 编译 +此项目采用 golang 语言编写,所以需要先安装最新的 golang 版本,最低支持的版本是 1.11。Clone 工程后进入项目目录执行以下命令进行编译: +```shell script make ``` - -如果在 mac 操作系统上编译 linux 包,可执行: -```bash +如果在 mac 系统上,编译当前系统的版本,请执行: +```shell script +make build_darwin +``` +如果想在 mac 系统上,编译 linux 系统版本,请执行: +```shell script make build_linux ``` - -如果编译 chaosblade 镜像,可执行: -```bash -make build_image +也可以选择性编译,比如只需要编译 cli、os 场景,则执行: +```shell script +make build_with cli os +# 如果是 mac 系统,执行 +make build_with cli os_darwin ``` -编译过程解析: -* 在项目根目录下创建编译结果文件夹 target 和 chaosblade 版本目录,编译后的文件放在 target/chaosblade-[version] 目录下 -* 下载 Java 应用混沌实验所需要的第三方包 [jvm-sandbox](https://github.com/alibaba/jvm-sandbox/releases) 至编译缓存文件夹中(target/cache) -* 下载 chaosblade java agent 和 tools.jar(用于挂载 jvm),用于实施 Java 混沌实验的 jar 包至编译缓存文件夹(target/cache) -* 解压 JVM-SANDBOX 包至 target/chaosblade-[version]/lib 目录;拷贝 chaosblade java agent jar 到 JVM-SANDBOX 模块目录(target/chaosblade-[version]/lib/sandbox/module) -* 编译 blade(cli 命令工具)到 target/chaosblade-[version] 目录,实施混沌实验所需要的其他程序会编译到 target/chaosblade-[version]/bin 目录下 -* 编译完成,可以进入 target/chaosblade-[version] 目录,即可使用 blade 工具 +## 缺陷&建议 +欢迎提交缺陷、问题、建议和新功能,所有项目(包含其他子项目)的问题都可以提交到[Github Issues](https://github.com/chaosblade-io/chaosblade/issues) +你也可以通过以下方式联系我们: +* 钉钉群(推荐):23177705 +* Gitter room: https://gitter.im/chaosblade-io/community +* 邮箱:chaosblade.io.01@gmail.com +* Twitter: chaosblade.io -清除编译后文件: -```bash -make clean -``` +## 参与贡献 +我们非常欢迎每个 Issue 和 PR,即使一个标点符号,如何参加贡献请阅读 [CONTRIBUTING](CONTRIBUTING.md) 文档,或者通过上述的方式联系我们。 + +## 企业登记 +我们开源此项目的初衷是降低混沌工程在企业中落地的门槛,所以非常看重该项目在企业的使用情况,欢迎大家在此 [ISSUE](https://github.com/chaosblade-io/chaosblade/issues/32) 中登记,登记后会被邀请加入企业邮件组,探讨混沌工程在企业落地中遇到的问题和分享落地经验。 + +## 场景大图 +![experiments landscape](https://user-images.githubusercontent.com/3992234/72340872-eb47c400-3703-11ea-830f-062e117c2e95.png) -## 组件架构 -![component.png](https://chaosblade.oss-cn-hangzhou.aliyuncs.com/doc/image/component.png) +## 项目生态 +![ecosystem](https://user-images.githubusercontent.com/3992234/72410783-429d7100-37a4-11ea-8314-540560f8a54f.png) -* Cli 包含 create、destroy、status、prepare、revoke、version 6 个命令 -* 相关混沌实验数据使用 SQLite 存储在本地(chaosblade 目录下) -* Create 和 destroy 命令调用相关的混沌实验执行器创建或者销毁混沌实验 -* Prepare 和 revoke 命令调用混沌实验准备执行器准备或者恢复实验环境,比如挂载 jvm-sandbox -* 混沌实验和混沌实验环境准备记录都可以通过 status 命令查询 +## 未来规划 +* 增强云原生领域场景 +* Golang 应用混沌实验场景 +* NodeJS 应用混沌实验场景 +* 故障演练控制台 +* 完善 ChaosBlade 各项目的开发文档 +* 完善 chaosblade 工具的英文文档 -## 场景覆盖图 -![ecosystem.png](https://chaosblade.oss-cn-hangzhou.aliyuncs.com/doc/image/ecosystem.png) +## License +Chaosblade 遵循 Apache 2.0 许可证,详细内容请阅读 [LICENSE](LICENSE) diff --git a/build/image/musl/Dockerfile b/build/image/musl/Dockerfile index e862a6f3..96348366 100644 --- a/build/image/musl/Dockerfile +++ b/build/image/musl/Dockerfile @@ -11,10 +11,18 @@ RUN wget http://www.musl-libc.org/releases/musl-1.1.21.tar.gz \ && make install \ && rm -rf musl* +# install maven for java project compiled +RUN wget http://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz \ + && tar -zxvf apache-maven-3.6.3-bin.tar.gz \ + && rm apache-maven-3.6.3-bin.tar.gz \ + && mv apache-maven-3.6.3 /usr/local/apache-maven-3.6.3 + RUN apt-get update \ - && apt-get install unzip + && apt-get install -y unzip openjdk-8-jdk ENV CC /usr/local/musl/bin/musl-gcc ENV GOOS linux +ENV mvn /usr/local/apache-maven-3.6.3/bin +ENV java /usr/bin/java ENTRYPOINT [ "make" ] diff --git a/build/spec/spec.go b/build/spec/spec.go index 78dab566..09f082b0 100644 --- a/build/spec/spec.go +++ b/build/spec/spec.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package main import ( diff --git a/cli/cmd/cli.go b/cli/cmd/cli.go index a0aeb678..da40a20e 100644 --- a/cli/cmd/cli.go +++ b/cli/cmd/cli.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package cmd import ( diff --git a/cli/cmd/cli_test.go b/cli/cmd/cli_test.go index 44da2284..7e91358a 100644 --- a/cli/cmd/cli_test.go +++ b/cli/cmd/cli_test.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package cmd import ( diff --git a/cli/cmd/cmd.go b/cli/cmd/cmd.go index c2f5efc0..54cd07e0 100644 --- a/cli/cmd/cmd.go +++ b/cli/cmd/cmd.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package cmd //import logf "sigs.k8s.io/controller-runtime/pkg/runtime/log" diff --git a/cli/cmd/command.go b/cli/cmd/command.go index ef46fda5..8e0e0217 100644 --- a/cli/cmd/command.go +++ b/cli/cmd/command.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package cmd import ( diff --git a/cli/cmd/command_test.go b/cli/cmd/command_test.go index 9aabd396..9213a691 100644 --- a/cli/cmd/command_test.go +++ b/cli/cmd/command_test.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package cmd import ( diff --git a/cli/cmd/create.go b/cli/cmd/create.go index e97cea2d..4eca1383 100644 --- a/cli/cmd/create.go +++ b/cli/cmd/create.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package cmd import ( diff --git a/cli/cmd/destroy.go b/cli/cmd/destroy.go index 4edce3d5..3a22eaaf 100644 --- a/cli/cmd/destroy.go +++ b/cli/cmd/destroy.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package cmd import ( diff --git a/cli/cmd/destroy_test.go b/cli/cmd/destroy_test.go index 384169b7..68dc95d0 100644 --- a/cli/cmd/destroy_test.go +++ b/cli/cmd/destroy_test.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package cmd import ( diff --git a/cli/cmd/exp.go b/cli/cmd/exp.go index 8f751e2a..a6131b58 100644 --- a/cli/cmd/exp.go +++ b/cli/cmd/exp.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package cmd import ( diff --git a/cli/cmd/prepare.go b/cli/cmd/prepare.go index 51883bb8..e4962eca 100644 --- a/cli/cmd/prepare.go +++ b/cli/cmd/prepare.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package cmd import ( diff --git a/cli/cmd/prepare_cplus.go b/cli/cmd/prepare_cplus.go index f8c1546d..2cab4819 100644 --- a/cli/cmd/prepare_cplus.go +++ b/cli/cmd/prepare_cplus.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package cmd import ( diff --git a/cli/cmd/prepare_jvm.go b/cli/cmd/prepare_jvm.go index 972a5d73..924a3859 100644 --- a/cli/cmd/prepare_jvm.go +++ b/cli/cmd/prepare_jvm.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package cmd import ( diff --git a/cli/cmd/prepare_jvm_test.go b/cli/cmd/prepare_jvm_test.go index cc271961..dbc31607 100644 --- a/cli/cmd/prepare_jvm_test.go +++ b/cli/cmd/prepare_jvm_test.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package cmd import ( diff --git a/cli/cmd/prepare_test.go b/cli/cmd/prepare_test.go index 4e2a9c90..5146a2db 100644 --- a/cli/cmd/prepare_test.go +++ b/cli/cmd/prepare_test.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package cmd import ( diff --git a/cli/cmd/query.go b/cli/cmd/query.go index 94d7d84c..09fadb42 100644 --- a/cli/cmd/query.go +++ b/cli/cmd/query.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package cmd import ( diff --git a/cli/cmd/query_disk.go b/cli/cmd/query_disk.go index 739525a6..efb7d636 100644 --- a/cli/cmd/query_disk.go +++ b/cli/cmd/query_disk.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package cmd import ( diff --git a/cli/cmd/query_disk_test.go b/cli/cmd/query_disk_test.go index 57f9b14f..897f914b 100644 --- a/cli/cmd/query_disk_test.go +++ b/cli/cmd/query_disk_test.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package cmd import ( diff --git a/cli/cmd/query_jvm.go b/cli/cmd/query_jvm.go index b1ab8590..f7b9b917 100644 --- a/cli/cmd/query_jvm.go +++ b/cli/cmd/query_jvm.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package cmd import ( diff --git a/cli/cmd/query_k8s.go b/cli/cmd/query_k8s.go index 40e888d7..c92052f3 100644 --- a/cli/cmd/query_k8s.go +++ b/cli/cmd/query_k8s.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package cmd import ( diff --git a/cli/cmd/query_network.go b/cli/cmd/query_network.go index dc3ff658..b3f7426e 100644 --- a/cli/cmd/query_network.go +++ b/cli/cmd/query_network.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package cmd import ( diff --git a/cli/cmd/query_network_test.go b/cli/cmd/query_network_test.go index 583ad370..1d183d88 100644 --- a/cli/cmd/query_network_test.go +++ b/cli/cmd/query_network_test.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package cmd import ( diff --git a/cli/cmd/revoke.go b/cli/cmd/revoke.go index 8ed01205..5b9edbe8 100644 --- a/cli/cmd/revoke.go +++ b/cli/cmd/revoke.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package cmd import ( diff --git a/cli/cmd/server.go b/cli/cmd/server.go index 0e489343..0e526365 100644 --- a/cli/cmd/server.go +++ b/cli/cmd/server.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package cmd import ( diff --git a/cli/cmd/server_start.go b/cli/cmd/server_start.go index cb48edc1..e094bbaa 100644 --- a/cli/cmd/server_start.go +++ b/cli/cmd/server_start.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package cmd import ( diff --git a/cli/cmd/server_stop.go b/cli/cmd/server_stop.go index 78486c5e..5f1e3e14 100644 --- a/cli/cmd/server_stop.go +++ b/cli/cmd/server_stop.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package cmd import ( diff --git a/cli/cmd/status.go b/cli/cmd/status.go index 3773eee8..655ba718 100644 --- a/cli/cmd/status.go +++ b/cli/cmd/status.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package cmd import ( diff --git a/cli/cmd/version.go b/cli/cmd/version.go index 607cb747..7bc664f0 100644 --- a/cli/cmd/version.go +++ b/cli/cmd/version.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package cmd import ( diff --git a/cli/main.go b/cli/main.go index 423b08e4..bcfc0ff3 100644 --- a/cli/main.go +++ b/cli/main.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package main import ( diff --git a/data/experiment.go b/data/experiment.go index 19d867b6..290164ad 100644 --- a/data/experiment.go +++ b/data/experiment.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package data import ( diff --git a/data/preparation.go b/data/preparation.go index aa7fbe74..824091c2 100644 --- a/data/preparation.go +++ b/data/preparation.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package data import ( diff --git a/data/source.go b/data/source.go index 20a48d78..2df65840 100644 --- a/data/source.go +++ b/data/source.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package data import ( diff --git a/exec/cplus/cplus.go b/exec/cplus/cplus.go index 33ebe14e..7094456b 100644 --- a/exec/cplus/cplus.go +++ b/exec/cplus/cplus.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package cplus import ( diff --git a/exec/cplus/executor.go b/exec/cplus/executor.go index 4c2bf050..66a51da5 100644 --- a/exec/cplus/executor.go +++ b/exec/cplus/executor.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package cplus import ( diff --git a/exec/docker/executor.go b/exec/docker/executor.go index 4bbb372a..d29d0ddb 100644 --- a/exec/docker/executor.go +++ b/exec/docker/executor.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package docker import ( diff --git a/exec/docker/spec.go b/exec/docker/spec.go index 487dfb25..6a2a7c52 100644 --- a/exec/docker/spec.go +++ b/exec/docker/spec.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package docker import "github.com/chaosblade-io/chaosblade-spec-go/spec" diff --git a/exec/jvm/executor.go b/exec/jvm/executor.go index b2f6222b..efbd741f 100644 --- a/exec/jvm/executor.go +++ b/exec/jvm/executor.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package jvm import ( diff --git a/exec/jvm/sandbox.go b/exec/jvm/sandbox.go index 5a31b4a1..54242d5f 100644 --- a/exec/jvm/sandbox.go +++ b/exec/jvm/sandbox.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package jvm import ( diff --git a/exec/kubernetes/executor.go b/exec/kubernetes/executor.go index 0d30e710..7aed5496 100644 --- a/exec/kubernetes/executor.go +++ b/exec/kubernetes/executor.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kubernetes import ( diff --git a/exec/kubernetes/spec.go b/exec/kubernetes/spec.go index 13b0fe47..95cdd444 100644 --- a/exec/kubernetes/spec.go +++ b/exec/kubernetes/spec.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kubernetes import ( diff --git a/exec/os/executor.go b/exec/os/executor.go index b3cc75b8..76cd1baf 100644 --- a/exec/os/executor.go +++ b/exec/os/executor.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package os import ( diff --git a/version/version.go b/version/version.go index 5c9c9e4f..cd12d4eb 100644 --- a/version/version.go +++ b/version/version.go @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2020 Alibaba Group Holding Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package version var (