Skip to content

Commit

Permalink
Merge pull request #67 from KingsonKai/main
Browse files Browse the repository at this point in the history
feature: chaosmetad support containerd
  • Loading branch information
KingsonKai authored Sep 15, 2023
2 parents 72ffe8e + f3d60c3 commit 965f2c3
Show file tree
Hide file tree
Showing 15 changed files with 378 additions and 48 deletions.
9 changes: 5 additions & 4 deletions chaosmeta-deploy/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ BASE_DIR=$(
pwd
)

mkdir -p ${BASE_DIR}/yamls
# param check
OP=$1
NAMESPACE=$2
Expand All @@ -27,10 +28,10 @@ for ((i = 3; i <= $#; i++)); do
done

if [ "$OP" == "-h" ] || [ "$OP" == "--help" ] || [ -z "$OP" ] || [ ${#COMPONENT_LIST[@]} -eq 0 ]; then
echo "format: sh deploy.sh [operation] [namespace] [component list]"
echo "operation support: ${OP_INSTALL},${OP_UNINSTALL}"
echo "component support: ${COMPONENT_ALL} ${COMPONENT_PLATFORM} ${COMPONENT_WORKFLOW} ${COMPONENT_INJECT} ${COMPONENT_MEASURE} ${COMPONENT_FLOW} ${COMPONENT_DAEMON}"
echo "example: sh deploy.sh install default ${COMPONENT_PLATFORM} ${COMPONENT_WORKFLOW} ${COMPONENT_INJECT} ${COMPONENT_DAEMON}"
echo -e "\nformat: sh deploy.sh [operation] [namespace] [component list]"
echo -e "example: sh deploy.sh install default ${COMPONENT_PLATFORM} ${COMPONENT_WORKFLOW} ${COMPONENT_INJECT} ${COMPONENT_DAEMON}\n"
echo "operation support: ${OP_INSTALL} ${OP_UNINSTALL}"
echo -e "component support: ${COMPONENT_ALL} ${COMPONENT_PLATFORM} ${COMPONENT_WORKFLOW} ${COMPONENT_INJECT} ${COMPONENT_MEASURE} ${COMPONENT_FLOW} ${COMPONENT_DAEMON}\n"
exit 1
fi

Expand Down
2 changes: 1 addition & 1 deletion chaosmeta-deploy/templates/chaosmeta-daemon-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
# chaos-role.chaosmeta.io: chaosmeta-daemon
containers:
- name: chaosmeta-daemon
image: registry.cn-hangzhou.aliyuncs.com/chaosmeta/chaosmeta-daemon:v0.1.1
image: registry.cn-hangzhou.aliyuncs.com/chaosmeta/chaosmeta-daemon:v0.2.0
securityContext:
privileged: true
volumeMounts:
Expand Down
2 changes: 1 addition & 1 deletion chaosmeta-deploy/templates/chaosmeta-inject-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ data:
"executor": {
"mode": "daemonset",
"executor": "chaosmetad",
"version": "0.1.1",
"version": "0.2.0",
"agentConfig": {
"agentPort": 29595
},
Expand Down
2 changes: 1 addition & 1 deletion chaosmeta-inject-operator/config/chaosmeta-inject.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"executor": {
"mode": "daemonset",
"executor": "chaosmetad",
"version": "0.1.1",
"version": "0.2.0",
"agentConfig": {
"agentPort": 29595
},
Expand Down
1 change: 1 addition & 0 deletions chaosmeta-platform/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
github.com/onsi/ginkgo/v2 v2.9.4 h1:xR7vG4IXt5RWx6FfIjyAtsoMAtnc3C/rFXBBd2AjZwE=
github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE=
github.com/panjf2000/ants v1.3.0 h1:8pQ+8leaLc9lys2viEEr8md0U4RN6uOSUCE9bOYjQ9M=
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# docker build -t registry.cn-hangzhou.aliyuncs.com/chaosmeta/chaosmeta-daemon:v0.1.1 -f chaosmeta-daemonset.Dockerfile .
# docker build -t registry.cn-hangzhou.aliyuncs.com/chaosmeta/chaosmeta-daemon:v0.2.0 -f chaosmeta-daemonset.Dockerfile .
From centos:centos7
ENV CHAOSMETAD_VERSION=0.1.1
ENV CHAOSMETAD_VERSION=0.2.0
ADD ./chaosmetad-$CHAOSMETAD_VERSION.tar.gz /opt/chaosmeta
CMD while true; do if [ ! -d "/tmp/chaosmetad-$CHAOSMETAD_VERSION" ]; then cp -r /opt/chaosmeta/chaosmetad-$CHAOSMETAD_VERSION /tmp/chaosmetad-$CHAOSMETAD_VERSION; fi; sleep 600; done
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# docker build -t registry.cn-hangzhou.aliyuncs.com/chaosmeta/chaosmetad-demo:v0.1.1 .
# docker build -t registry.cn-hangzhou.aliyuncs.com/chaosmeta/chaosmetad-demo:v0.2.0 -f chaosmetad-demo.Dockerfile .
From centos:centos7
ADD ./jdk-8u361-linux-x64.tar.gz /usr/local
RUN yum install -y iproute && yum clean all
ENV CHAOSMETAD_VERSION=0.1.1
ENV CHAOSMETAD_VERSION=0.2.0
ADD ./chaosmetad-$CHAOSMETAD_VERSION.tar.gz /opt/chaosmeta
RUN echo 'export JAVA_HOME=/usr/local/jdk1.8.0_361' >> /etc/profile && echo 'export PATH=$PATH:$JAVA_HOME/bin' >> /etc/profile && echo 'export PATH=$PATH:/opt/chaosmeta/chaosmetad-'${CHAOSMETAD_VERSION} >> /etc/profile
2 changes: 1 addition & 1 deletion chaosmetad/build/ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fi

# base info
BUILD_NAME="chaosmetad"
VERSION="0.1.1"
VERSION="0.2.0"
BUILD_DATE=$(date "+%Y-%m-%d %H:%M:%S")

# env var
Expand Down
21 changes: 18 additions & 3 deletions chaosmetad/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ require (
github.com/alibaba/pouch v0.0.0-20221109061116-9caf9bae0b23
github.com/bndr/gotabulate v1.1.2
github.com/containerd/cgroups v1.0.4
github.com/containerd/containerd v1.6.12
github.com/docker/docker v20.10.21+incompatible
github.com/google/uuid v1.3.0
github.com/gorilla/mux v1.8.0
github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417
github.com/shirou/gopsutil v3.21.11+incompatible
github.com/sirupsen/logrus v1.9.0
github.com/spf13/cobra v1.5.0
Expand All @@ -21,11 +24,15 @@ require (
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef // indirect
github.com/containerd/containerd v1.6.12 // indirect
github.com/containerd/continuity v0.3.0 // indirect
github.com/containerd/fifo v1.0.0 // indirect
github.com/containerd/ttrpc v1.1.0 // indirect
github.com/containerd/typeurl v1.0.2 // indirect
github.com/contiv/executor v0.0.0-20180626233236-d263f4daa3ad // indirect
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
github.com/docker/distribution v2.8.1+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-openapi/analysis v0.21.2 // indirect
Expand All @@ -38,24 +45,28 @@ require (
github.com/go-openapi/swag v0.21.1 // indirect
github.com/go-openapi/validate v0.22.1 // indirect
github.com/godbus/dbus/v5 v5.0.6 // indirect
github.com/gogo/googleapis v1.4.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/klauspost/compress v1.13.6 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/mattn/go-sqlite3 v1.14.15 // indirect
github.com/mitchellh/mapstructure v1.4.1 // indirect
github.com/moby/locker v1.0.1 // indirect
github.com/moby/sys/mount v0.3.3 // indirect
github.com/moby/sys/mountinfo v0.6.2 // indirect
github.com/moby/sys/signal v0.6.0 // indirect
github.com/moby/term v0.0.0-20221128092401-c43b287e0e0f // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect
github.com/opencontainers/runc v1.1.4 // indirect
github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 // indirect
github.com/opencontainers/selinux v1.10.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/tklauser/go-sysconf v0.3.10 // indirect
Expand All @@ -65,10 +76,14 @@ require (
go.opencensus.io v0.23.0 // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.2.0 // indirect
golang.org/x/tools v0.1.12 // indirect
google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 // indirect
google.golang.org/grpc v1.47.0 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gotest.tools/v3 v3.4.0 // indirect
)
Loading

0 comments on commit 965f2c3

Please sign in to comment.