Skip to content

Commit

Permalink
action: clear the benchmark in someke test
Browse files Browse the repository at this point in the history
move the same steps to the benchmark shell

Signed-off-by: Desiki-high <[email protected]>
  • Loading branch information
Desiki-high committed Apr 21, 2023
1 parent 1769ea7 commit 504655b
Showing 1 changed file with 12 additions and 101 deletions.
113 changes: 12 additions & 101 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ on:

env:
CARGO_TERM_COLOR: always
SNAPSHOOTER_VERSION: 0.7.3
NERDCTL_VERSION: 1.3.0
CNI_PLUGINS_VERSION: 1.2.0
IMAGE: wordpress

jobs:
Expand Down Expand Up @@ -148,23 +145,12 @@ jobs:
with:
name: nydusify-artifact
path: contrib/nydusify/cmd
- name: Prepare Nerdctl Environment
- name: Prepare OCI Environment
run: |
sudo install -D -m 755 contrib/nydusify/cmd/nydusify /usr/local/bin
sudo install -D -m 755 target/release/nydusd target/release/nydus-image /usr/local/bin
sudo wget https://github.com/containerd/nerdctl/releases/download/v${{env.NERDCTL_VERSION}}/nerdctl-${{env.NERDCTL_VERSION}}-linux-amd64.tar.gz
sudo tar -xzvf nerdctl-${{env.NERDCTL_VERSION}}-linux-amd64.tar.gz -C /usr/local/bin
sudo mkdir -p /opt/cni/bin
sudo wget https://github.com/containernetworking/plugins/releases/download/v${{env.CNI_PLUGINS_VERSION}}/cni-plugins-linux-amd64-v${{env.CNI_PLUGINS_VERSION}}.tgz
sudo tar -xzvf cni-plugins-linux-amd64-v${{env.CNI_PLUGINS_VERSION}}.tgz -C /opt/cni/bin
sudo install -D misc/benchmark/cni_bridge.conf /etc/cni/net.d/bridge.conf
- name: Prepare OCI Registry Environment
run: |
sudo docker run -d --restart=always -p 5000:5000 --name registry registry
sudo install -D -m 755 misc/benchmark/prepare_env.sh prepare_env.sh
sudo ./prepare_env.sh oci
sudo docker pull ${{env.IMAGE}} && docker tag ${{env.IMAGE}}:latest localhost:5000/${{env.IMAGE}}:latest
sudo docker push localhost:5000/${{env.IMAGE}}:latest
git clone https://github.com/magnific0/wondershaper.git
sudo install -D -m 755 wondershaper/wondershaper /usr/local/bin
- name: BenchMark Test
run: |
cd misc/benchmark
Expand Down Expand Up @@ -193,32 +179,13 @@ jobs:
path: contrib/nydusify/cmd
- name: Prepare Nydus Environment
run: |
sudo install -D -m 755 contrib/nydusify/cmd/nydusify /usr/local/bin
sudo install -D -m 755 target/release/nydusd target/release/nydus-image /usr/local/bin
wget https://github.com/containerd/nydus-snapshotter/releases/download/v${{env.SNAPSHOOTER_VERSION}}/nydus-snapshotter-v${{env.SNAPSHOOTER_VERSION}}-x86_64.tgz
tar zxvf nydus-snapshotter-v${{env.SNAPSHOOTER_VERSION}}-x86_64.tgz
sudo install -D -m 755 nydus-snapshotter/containerd-nydus-grpc /usr/local/bin/
sudo wget https://github.com/containerd/nerdctl/releases/download/v${{env.NERDCTL_VERSION}}/nerdctl-${{env.NERDCTL_VERSION}}-linux-amd64.tar.gz
sudo tar -xzvf nerdctl-${{env.NERDCTL_VERSION}}-linux-amd64.tar.gz -C /usr/local/bin
sudo mkdir -p /opt/cni/bin
sudo wget https://github.com/containernetworking/plugins/releases/download/v${{env.CNI_PLUGINS_VERSION}}/cni-plugins-linux-amd64-v${{env.CNI_PLUGINS_VERSION}}.tgz
sudo tar -xzvf cni-plugins-linux-amd64-v${{env.CNI_PLUGINS_VERSION}}.tgz -C /opt/cni/bin
sudo install -D misc/benchmark/cni_bridge.conf /etc/cni/net.d/bridge.conf
sudo install -D misc/benchmark/nydusd_config.json /etc/nydus/config.json
sudo install -D misc/benchmark/containerd_config.toml /etc/containerd/config.toml
sudo systemctl restart containerd
sudo install -D misc/benchmark/nydus-snapshotter.service /etc/systemd/system/nydus-snapshotter.service
sudo systemctl start nydus-snapshotter
- name: Prepare Nydus Registry Environment
run: |
sudo docker run -d --restart=always -p 5000:5000 --name registry registry
sudo install -D -m 755 misc/benchmark/prepare_env.sh prepare_env.sh
sudo ./prepare_env.sh nydus
sudo DOCKER_CONFIG=$HOME/.docker nydusify convert \
--source ${{env.IMAGE}}:latest \
--target localhost:5000/${{env.IMAGE}}:latest_nydus \
--fs-version 6 \
--platform linux/amd64,linux/arm64
git clone https://github.com/magnific0/wondershaper.git
sudo install -D -m 755 wondershaper/wondershaper /usr/local/bin
- name: BenchMark Test
run: |
cd misc/benchmark
Expand Down Expand Up @@ -247,32 +214,13 @@ jobs:
path: contrib/nydusify/cmd
- name: Prepare Nydus Environment
run: |
sudo install -D -m 755 contrib/nydusify/cmd/nydusify /usr/local/bin
sudo install -D -m 755 target/release/nydusd target/release/nydus-image /usr/local/bin
wget https://github.com/containerd/nydus-snapshotter/releases/download/v${{env.SNAPSHOOTER_VERSION}}/nydus-snapshotter-v${{env.SNAPSHOOTER_VERSION}}-x86_64.tgz
tar zxvf nydus-snapshotter-v${{env.SNAPSHOOTER_VERSION}}-x86_64.tgz
sudo install -D -m 755 nydus-snapshotter/containerd-nydus-grpc /usr/local/bin/
sudo wget https://github.com/containerd/nerdctl/releases/download/v${{env.NERDCTL_VERSION}}/nerdctl-${{env.NERDCTL_VERSION}}-linux-amd64.tar.gz
sudo tar -xzvf nerdctl-${{env.NERDCTL_VERSION}}-linux-amd64.tar.gz -C /usr/local/bin
sudo mkdir -p /opt/cni/bin
sudo wget https://github.com/containernetworking/plugins/releases/download/v${{env.CNI_PLUGINS_VERSION}}/cni-plugins-linux-amd64-v${{env.CNI_PLUGINS_VERSION}}.tgz
sudo tar -xzvf cni-plugins-linux-amd64-v${{env.CNI_PLUGINS_VERSION}}.tgz -C /opt/cni/bin
sudo install -D misc/benchmark/cni_bridge.conf /etc/cni/net.d/bridge.conf
sudo install -D misc/benchmark/nydusd_config.json /etc/nydus/config.json
sudo install -D misc/benchmark/containerd_config.toml /etc/containerd/config.toml
sudo systemctl restart containerd
sudo install -D misc/benchmark/nydus-snapshotter.service /etc/systemd/system/nydus-snapshotter.service
sudo systemctl start nydus-snapshotter
- name: Prepare Nydus Registry Environment
run: |
sudo docker run -d --restart=always -p 5000:5000 --name registry registry
sudo install -D -m 755 misc/benchmark/prepare_env.sh prepare_env.sh
sudo ./prepare_env.sh nydus
sudo DOCKER_CONFIG=$HOME/.docker nydusify convert \
--source ${{env.IMAGE}}:latest \
--target localhost:5000/${{env.IMAGE}}:latest_nydus \
--fs-version 6 \
--platform linux/amd64,linux/arm64
git clone https://github.com/magnific0/wondershaper.git
sudo install -D -m 755 wondershaper/wondershaper /usr/local/bin
- name: BenchMark Test
run: |
cd misc/benchmark
Expand Down Expand Up @@ -301,25 +249,8 @@ jobs:
path: contrib/nydusify/cmd
- name: Prepare Nydus Environment
run: |
sudo install -D -m 755 contrib/nydusify/cmd/nydusify /usr/local/bin
sudo install -D -m 755 target/release/nydusd target/release/nydus-image /usr/local/bin
wget https://github.com/containerd/nydus-snapshotter/releases/download/v${{env.SNAPSHOOTER_VERSION}}/nydus-snapshotter-v${{env.SNAPSHOOTER_VERSION}}-x86_64.tgz
tar zxvf nydus-snapshotter-v${{env.SNAPSHOOTER_VERSION}}-x86_64.tgz
sudo install -D -m 755 nydus-snapshotter/containerd-nydus-grpc /usr/local/bin/
sudo wget https://github.com/containerd/nerdctl/releases/download/v${{env.NERDCTL_VERSION}}/nerdctl-${{env.NERDCTL_VERSION}}-linux-amd64.tar.gz
sudo tar -xzvf nerdctl-${{env.NERDCTL_VERSION}}-linux-amd64.tar.gz -C /usr/local/bin
sudo mkdir -p /opt/cni/bin
sudo wget https://github.com/containernetworking/plugins/releases/download/v${{env.CNI_PLUGINS_VERSION}}/cni-plugins-linux-amd64-v${{env.CNI_PLUGINS_VERSION}}.tgz
sudo tar -xzvf cni-plugins-linux-amd64-v${{env.CNI_PLUGINS_VERSION}}.tgz -C /opt/cni/bin
sudo install -D misc/benchmark/cni_bridge.conf /etc/cni/net.d/bridge.conf
sudo install -D misc/benchmark/nydusd_config.json /etc/nydus/config.json
sudo install -D misc/benchmark/containerd_config.toml /etc/containerd/config.toml
sudo systemctl restart containerd
sudo install -D misc/benchmark/nydus-snapshotter.service /etc/systemd/system/nydus-snapshotter.service
sudo systemctl start nydus-snapshotter
- name: Prepare Nydus Registry Environment
run: |
sudo docker run -d --restart=always -p 5000:5000 --name registry registry
sudo install -D -m 755 misc/benchmark/prepare_env.sh prepare_env.sh
sudo ./prepare_env.sh nydus
sudo docker pull ${{env.IMAGE}} && docker tag ${{env.IMAGE}}:latest localhost:5000/${{env.IMAGE}}:latest
sudo docker push localhost:5000/${{env.IMAGE}}:latest
sudo DOCKER_CONFIG=$HOME/.docker nydusify convert \
Expand All @@ -328,8 +259,6 @@ jobs:
--fs-version 6 \
--oci-ref \
--platform linux/amd64,linux/arm64
git clone https://github.com/magnific0/wondershaper.git
sudo install -D -m 755 wondershaper/wondershaper /usr/local/bin
- name: BenchMark Test
run: |
cd misc/benchmark
Expand Down Expand Up @@ -358,32 +287,13 @@ jobs:
path: contrib/nydusify/cmd
- name: Prepare Nydus Environment
run: |
sudo install -D -m 755 contrib/nydusify/cmd/nydusify /usr/local/bin
sudo install -D -m 755 target/release/nydusd target/release/nydus-image /usr/local/bin
wget https://github.com/containerd/nydus-snapshotter/releases/download/v${{env.SNAPSHOOTER_VERSION}}/nydus-snapshotter-v${{env.SNAPSHOOTER_VERSION}}-x86_64.tgz
tar zxvf nydus-snapshotter-v${{env.SNAPSHOOTER_VERSION}}-x86_64.tgz
sudo install -D -m 755 nydus-snapshotter/containerd-nydus-grpc /usr/local/bin/
sudo wget https://github.com/containerd/nerdctl/releases/download/v${{env.NERDCTL_VERSION}}/nerdctl-${{env.NERDCTL_VERSION}}-linux-amd64.tar.gz
sudo tar -xzvf nerdctl-${{env.NERDCTL_VERSION}}-linux-amd64.tar.gz -C /usr/local/bin
sudo mkdir -p /opt/cni/bin
sudo wget https://github.com/containernetworking/plugins/releases/download/v${{env.CNI_PLUGINS_VERSION}}/cni-plugins-linux-amd64-v${{env.CNI_PLUGINS_VERSION}}.tgz
sudo tar -xzvf cni-plugins-linux-amd64-v${{env.CNI_PLUGINS_VERSION}}.tgz -C /opt/cni/bin
sudo install -D misc/benchmark/cni_bridge.conf /etc/cni/net.d/bridge.conf
sudo install -D misc/benchmark/nydusd_config.json /etc/nydus/config.json
sudo install -D misc/benchmark/containerd_config.toml /etc/containerd/config.toml
sudo systemctl restart containerd
sudo install -D misc/benchmark/nydus-snapshotter.service /etc/systemd/system/nydus-snapshotter.service
sudo systemctl start nydus-snapshotter
- name: Prepare Nydus Registry Environment
run: |
sudo docker run -d --restart=always -p 5000:5000 --name registry registry
sudo install -D -m 755 misc/benchmark/prepare_env.sh prepare_env.sh
sudo ./prepare_env.sh nydus
sudo DOCKER_CONFIG=$HOME/.docker nydusify convert \
--source ${{env.IMAGE}}:latest \
--target localhost:5000/${{env.IMAGE}}:latest_nydus \
--fs-version 6 \
--platform linux/amd64,linux/arm64
git clone https://github.com/magnific0/wondershaper.git
sudo install -D -m 755 wondershaper/wondershaper /usr/local/bin
- name: BenchMark Test
run: |
cd misc/benchmark
Expand Down Expand Up @@ -448,6 +358,7 @@ jobs:
printf "| %s | %s | %s | %s | %s |\n" "$filename" "$pull" "$create" "$run" "$total"
done >> $GITHUB_STEP_SUMMARY
done
nydus-unit-test:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 504655b

Please sign in to comment.