Skip to content

Commit

Permalink
update version to 0.3.2
Browse files Browse the repository at this point in the history
Signed-off-by: tiny-x <185120555@qq.com>
  • Loading branch information
tiny-x committed Mar 19, 2021
1 parent f336cc7 commit d519740
Show file tree
Hide file tree
Showing 92 changed files with 154 additions and 119 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ FROM openjdk:8

WORKDIR /app

COPY ./chaosblade-box-web/target/chaosblade-box-web-0.3.1.jar .
COPY ./chaosblade-box-web/target/chaosblade-box-web-0.3.2.jar .

ENTRYPOINT ["java", "-Duser.timezone=Asia/Shanghai", "-jar", "chaosblade-box-web-0.3.1.jar"]
ENTRYPOINT ["java", "-Duser.timezone=Asia/Shanghai", "-jar", "chaosblade-box-web-0.3.2.jar"]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: build clean

export CHAOS_PLATFORM_VERSION=0.3.1
export CHAOS_PLATFORM_VERSION=0.3.2
SRC_ROOT=$(shell pwd)

# chaosblade-box-fe
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ Notes: You must replace the follow parameters: DATASOURCE_URL, DATASOURCE_USERNA
Then run the application, run method is as follows:

```bash
nohup java -Duser.timezone=Asia/Shanghai -jar chaosblade-box-web-0.3.1.jar --spring.datasource.url=DATASOURCE_URL --spring.datasource.username=DATASOURCE_USERNAME --spring.datasource.password=DATASOURCE_PASSWORD > chaosblade-box.log 2>&1 &
nohup java -Duser.timezone=Asia/Shanghai -jar chaosblade-box-web-0.3.2.jar --spring.datasource.url=DATASOURCE_URL --spring.datasource.username=DATASOURCE_USERNAME --spring.datasource.password=DATASOURCE_PASSWORD > chaosblade-box.log 2>&1 &
```

You can use a browser to access the http://127.0.0.1:8080 website to use the platform.

If you're deployed on kubernetes, the usage method is as follows:

```bash
helm install chaosblade-box chaosblade-box-0.3.1.tgz --set spring.datasource.password=DATASOURCE_PASSWORD --namespace chaosblade
helm install chaosblade-box chaosblade-box-0.3.2.tgz --set spring.datasource.password=DATASOURCE_PASSWORD --namespace chaosblade
```

## Bugs and Feedback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>chaosblade-box-collector</artifactId>
<groupId>com.alibaba.chaosblade</groupId>
<version>0.3.1</version>
<version>0.3.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>chaosblade-box-collector</artifactId>
<groupId>com.alibaba.chaosblade</groupId>
<version>0.3.1</version>
<version>0.3.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>chaosblade-box-collector</artifactId>
<groupId>com.alibaba.chaosblade</groupId>
<version>0.3.1</version>
<version>0.3.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion chaosblade-box-collector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>chaosblade-box</artifactId>
<groupId>com.alibaba.chaosblade</groupId>
<version>0.3.1</version>
<version>0.3.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion chaosblade-box-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>chaosblade-box</artifactId>
<groupId>com.alibaba.chaosblade</groupId>
<version>0.3.1</version>
<version>0.3.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion chaosblade-box-dao/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>chaosblade-box</artifactId>
<groupId>com.alibaba.chaosblade</groupId>
<version>0.3.1</version>
<version>0.3.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion chaosblade-box-invoker/chaosblade-box-invoker-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>chaosblade-box-invoker</artifactId>
<groupId>com.alibaba.chaosblade</groupId>
<version>0.3.1</version>
<version>0.3.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>chaosblade-box-invoker</artifactId>
<groupId>com.alibaba.chaosblade</groupId>
<version>0.3.1</version>
<version>0.3.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,19 @@ public CompletableFuture<ResponseCommand> invoke(RequestCommand requestCommand)
new ApiCallback() {
@Override
public void onFailure(ApiException e, int statusCode, Map responseHeaders) {
ResponseCommand responseCommand;
if (statusCode == 404) {
ResponseCommand responseCommand = ResponseCommand.builder().success(true)
responseCommand = ResponseCommand.builder().success(true)
.result(requestCommand.getName()).build();
completableFuture.complete(responseCommand);
} else {
ResponseCommand responseCommand = ResponseCommand.builder()
responseCommand = ResponseCommand.builder()
.success(false)
.code(String.valueOf(statusCode))
.result(e.getMessage())
.error(e.getResponseBody())
.build();
completableFuture.complete(responseCommand);
}
completableFuture.complete(responseCommand);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion chaosblade-box-invoker/chaosblade-box-invoker-http/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>chaosblade-box-invoker</artifactId>
<groupId>com.alibaba.chaosblade</groupId>
<version>0.3.1</version>
<version>0.3.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>chaosblade-box-invoker</artifactId>
<groupId>com.alibaba.chaosblade</groupId>
<version>0.3.1</version>
<version>0.3.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import com.alibaba.chaosblade.box.invoker.litmus.kubeapi.crd.engine.*;
import com.alibaba.chaosblade.box.scenario.litmus.model.ChaosExperiment;
import com.alibaba.chaosblade.box.scenario.litmus.model.experiments.ChaosExperimentDefinitionEnv;
import com.alibaba.chaosblade.box.invoker.litmus.kubeapi.crd.engine.*;
import io.kubernetes.client.openapi.ApiCallback;
import io.kubernetes.client.openapi.ApiException;
import io.kubernetes.client.openapi.apis.CoreV1Api;
Expand Down Expand Up @@ -192,6 +191,9 @@ public CompletableFuture<ResponseCommand> invoke(RequestCommand requestCommand)
.kind(Constants.CHAOS_ENGINE)
.metadata(v1ObjectMeta)
.spec(ChaosEngineSpec.builder()
.appinfo(ChaosEngineSpecAppinfo.builder()
.appns(requestCommand.getArguments().get("appns"))
.build())
.chaosServiceAccount(serviceAccount)
.engineState("active")
.monitoring(false)
Expand Down
2 changes: 1 addition & 1 deletion chaosblade-box-invoker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>chaosblade-box</artifactId>
<groupId>com.alibaba.chaosblade</groupId>
<version>0.3.1</version>
<version>0.3.2</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion chaosblade-box-metric/chaosblade-box-metric-aliyun/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>chaosblade-box-metric</artifactId>
<groupId>com.alibaba.chaosblade</groupId>
<version>0.3.1</version>
<version>0.3.2</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion chaosblade-box-metric/chaosblade-box-metric-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>chaosblade-box-metric</artifactId>
<groupId>com.alibaba.chaosblade</groupId>
<version>0.3.1</version>
<version>0.3.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>chaosblade-box-metric</artifactId>
<groupId>com.alibaba.chaosblade</groupId>
<version>0.3.1</version>
<version>0.3.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public void completed(HttpResponse httpResponse) {
if (value != null) {
return metric.contains(value);
}
return false;
return true;
}).findFirst().ifPresent(deviceMeta -> {
metricChartLineResponse.setMetricChartLines(metricChartLines);
metricChartLineResponse.setDeviceMeta(deviceMeta);
Expand Down
2 changes: 1 addition & 1 deletion chaosblade-box-metric/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>chaosblade-box</artifactId>
<groupId>com.alibaba.chaosblade</groupId>
<version>0.3.1</version>
<version>0.3.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>chaosblade-box-scenario</artifactId>
<groupId>com.alibaba.chaosblade</groupId>
<version>0.3.1</version>
<version>0.3.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>chaosblade-box-scenario</artifactId>
<groupId>com.alibaba.chaosblade</groupId>
<version>0.3.1</version>
<version>0.3.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>chaosblade-box-scenario</artifactId>
<groupId>com.alibaba.chaosblade</groupId>
<version>0.3.1</version>
<version>0.3.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion chaosblade-box-scenario/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>chaosblade-box</artifactId>
<groupId>com.alibaba.chaosblade</groupId>
<version>0.3.1</version>
<version>0.3.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion chaosblade-box-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>chaosblade-box</artifactId>
<groupId>com.alibaba.chaosblade</groupId>
<version>0.3.1</version>
<version>0.3.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,10 @@
import com.alibaba.chaosblade.box.dao.QueryWrapperBuilder;
import com.alibaba.chaosblade.box.dao.mapper.DevicePodMapper;
import com.alibaba.chaosblade.box.service.model.device.*;
import com.alibaba.chaosblade.box.dao.model.*;
import com.alibaba.chaosblade.box.dao.page.PageUtils;
import com.alibaba.chaosblade.box.service.model.device.*;
import com.alibaba.chaosblade.box.service.model.tools.ToolsResponse;
import com.alibaba.chaosblade.box.service.probes.ProbesInstallSuccessEvent;
import com.alibaba.chaosblade.box.service.probes.heartbeats.Heartbeats;
import com.alibaba.chaosblade.box.dao.repository.*;
import com.fasterxml.jackson.core.type.TypeReference;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ public ExperimentResponse getExperimentById(ExperimentRequest experimentRequest)
.dimension(experimentDO.getDimension())
.createTime(experimentDO.getGmtCreate())
.modifyTime(experimentDO.getGmtModified())
.taskCount(experimentTaskRepository.selectByExperimentId(experimentDO.getId()).size())
.build();

if (StrUtil.isNotBlank(experimentDO.getMetric())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,15 @@ private SceneParamResponse sceneParamCover(SceneParamResponse sceneParamResponse
sceneParamResponse.getComponent().setEditable(false);
}
}
if ("TARGET_CONTAINER".equals(sceneParamResponse.getName())) {
sceneParamResponse.setValue(sceneRequest.getMachines().stream().map(KubernetesDevice::getContainerName).distinct()
.collect(Collectors.joining(",")));
if (sceneParamResponse.getComponent() == null) {
sceneParamResponse.setComponent(Component.builder().editable(false).build());
} else {
sceneParamResponse.getComponent().setEditable(false);
}
}
case POD:
if ("namespace".equals(sceneParamResponse.getName())) {
sceneParamResponse.setValue(sceneRequest.getMachines().stream().map(KubernetesDevice::getNamespace).findFirst().get());
Expand All @@ -481,6 +490,14 @@ private SceneParamResponse sceneParamCover(SceneParamResponse sceneParamResponse
sceneParamResponse.getComponent().setEditable(false);
}
}
if ("appns".equals(sceneParamResponse.getName())) {
sceneParamResponse.setValue(sceneRequest.getMachines().stream().map(KubernetesDevice::getNamespace).findFirst().get());
if (sceneParamResponse.getComponent() == null) {
sceneParamResponse.setComponent(Component.builder().editable(false).build());
} else {
sceneParamResponse.getComponent().setEditable(false);
}
}
if ("names".equals(sceneParamResponse.getName())) {
sceneParamResponse.setValue(sceneRequest.getMachines().stream().map(KubernetesDevice::getPodName)
.collect(Collectors.joining(",")));
Expand All @@ -490,6 +507,15 @@ private SceneParamResponse sceneParamCover(SceneParamResponse sceneParamResponse
sceneParamResponse.getComponent().setEditable(false);
}
}
if ("TARGET_PODS".equals(sceneParamResponse.getName())) {
sceneParamResponse.setValue(sceneRequest.getMachines().stream().map(KubernetesDevice::getPodName)
.collect(Collectors.joining(",")));
if (sceneParamResponse.getComponent() == null) {
sceneParamResponse.setComponent(Component.builder().editable(false).build());
} else {
sceneParamResponse.getComponent().setEditable(false);
}
}
break;
case NODE:
if ("names".equals(sceneParamResponse.getName())) {
Expand All @@ -501,6 +527,15 @@ private SceneParamResponse sceneParamCover(SceneParamResponse sceneParamResponse
sceneParamResponse.getComponent().setEditable(false);
}
}
if ("TARGET_NODES".equals(sceneParamResponse.getName())) {
sceneParamResponse.setValue(sceneRequest.getMachines().stream().map(KubernetesDevice::getNodeName)
.collect(Collectors.joining(",")));
if (sceneParamResponse.getComponent() == null) {
sceneParamResponse.setComponent(Component.builder().editable(false).build());
} else {
sceneParamResponse.getComponent().setEditable(false);
}
}
break;
}
return sceneParamResponse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ sub.execute.success=子任务运行完成,任务ID: {0},阶段:{1}, 子任
sub.execute.error=子任务运行失败,任务ID: {0},阶段:{1}, 子任务ID: {2}
sub.execute.executing=子任务运行中,任务ID: {0},阶段:{1}, 子任务ID: {2}, 当前机器: {3}, 是否成功: {4}, 失败原因: {5}
experiment.wait.of.before=演练阶段执行前等待, 任务ID:{0}, 子任务ID: {1} 等待时间:{2} 毫秒
experiment.wait.of.after=演练阶段完成后等待, 任务ID:{o}, 子任务ID: {1}, 等待时间:{2} 毫秒
experiment.wait.of.after=演练阶段完成后等待, 任务ID:{0}, 子任务ID: {1}, 等待时间:{2} 毫秒
recover.check.sub.task.status=恢复任务阶段, 检查任务状态,任务ID: {0},任务状态: {1}
recover.phase.unable.execute=恢复任务阶段不可执行,状态不为 STOPPING 的任务,任务ID: {0}
sub.task.complete=子任务运行完成, 任务ID:{0}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ sub.execute.success=子任务运行完成,任务ID: {0},阶段:{1}, 子任
sub.execute.error=子任务运行失败,任务ID: {0},阶段:{1}, 子任务ID: {2}
sub.execute.executing=子任务运行中,任务ID: {0},阶段:{1}, 子任务ID: {2}, 当前机器: {3}, 是否成功: {4}, 失败原因: {5}
experiment.wait.of.before=演练阶段执行前等待, 任务ID:{0}, 子任务ID: {1} 等待时间:{2} 毫秒
experiment.wait.of.after=演练阶段完成后等待, 任务ID:{o}, 子任务ID: {1}, 等待时间:{2} 毫秒
experiment.wait.of.after=演练阶段完成后等待, 任务ID:{0}, 子任务ID: {1}, 等待时间:{2} 毫秒
recover.check.sub.task.status=恢复任务阶段, 检查任务状态,任务ID: {0},任务状态: {1}
recover.phase.unable.execute=恢复任务阶段不可执行,状态不为 STOPPING 的任务,任务ID: {0}
sub.task.complete=子任务运行完成, 任务ID:{0}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>chaosblade-box-toolsmgr</artifactId>
<groupId>com.alibaba.chaosblade</groupId>
<version>0.3.1</version>
<version>0.3.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>chaosblade-box-toolsmgr</artifactId>
<groupId>com.alibaba.chaosblade</groupId>
<version>0.3.1</version>
<version>0.3.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>chaosblade-box-toolsmgr</artifactId>
<groupId>com.alibaba.chaosblade</groupId>
<version>0.3.1</version>
<version>0.3.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Loading

0 comments on commit d519740

Please sign in to comment.