Skip to content

Commit 4b874fe

Browse files
committedJan 11, 2024
cleanup
Signed-off-by: Naoki MATSUMOTO <[email protected]>
1 parent 4aef232 commit 4b874fe

19 files changed

+36
-75
lines changed
 

‎.github/workflows/test.yaml

+21-21
Original file line numberDiff line numberDiff line change
@@ -41,29 +41,29 @@ jobs:
4141
path: /tmp/test-image.tar.zst
4242
lookup-only: true
4343

44-
- name: setup lxd (v5.19)
44+
- name: setup lxd
4545
id: s1
4646
if: steps.cache-restore.outputs.cache-hit != 'true'
47-
run: ./setup_lxd.sh
47+
run: ./test/setup_lxd.sh
4848

4949
- name: launch lxc container
50-
id: s6
50+
id: s2
5151
if: steps.s1.conclusion == 'success'
52-
run: ./launch_test_lxc.sh
52+
run: ./test/launch_test_lxc.sh
5353

5454
- name: install dependencies and build
55-
id: s7
56-
if: steps.s6.conclusion == 'success'
55+
id: s3
56+
if: steps.s2.conclusion == 'success'
5757
run: sudo lxc exec test -- sudo --login --user ubuntu /host/test/init_test.sh
5858

5959
- name: export image
60-
id: s8
61-
if: steps.s7.conclusion == 'success'
62-
run: ./export_lxc_image.sh test
60+
id: s4
61+
if: steps.s3.conclusion == 'success'
62+
run: ./test/export_lxc_image.sh test
6363

6464
- uses: actions/cache/save@v3
65-
id: s11
66-
if: steps.s8.conclusion == 'success'
65+
id: s5
66+
if: steps.s4.conclusion == 'success'
6767
with:
6868
key: lxc-image-base-${{ hashFiles('go.sum', 'test/init_test.sh') }}
6969
path: /tmp/test-image.tar.zst
@@ -74,8 +74,8 @@ jobs:
7474
timeout-minutes: 20
7575
steps:
7676
- uses: actions/checkout@v4.1.1
77-
- name: setup lxd (v5.19)
78-
run: ./setup_lxd.sh
77+
- name: setup lxd
78+
run: ./test/setup_lxd.sh
7979
- uses: actions/cache/restore@v3
8080
id: cache-restore
8181
with:
@@ -85,12 +85,12 @@ jobs:
8585
- name: load lxc image
8686
run: sudo lxc image import /tmp/test-image.tar.zst --alias test-export
8787
- name: launch lxc container
88-
run: ./launch_test_lxc.sh test-export
88+
run: ./test/launch_test_lxc.sh test-export
8989
- name: run test
9090
run: sudo lxc exec test -- sudo --login --user ubuntu /bin/bash -c "sleep 3 && /home/ubuntu/bypass4netns/test/run_test.sh SYNC"
9191
# some source codes may be updated. re-export new image.
9292
- name: export image
93-
run: sudo lxc image alias delete test-export && rm -f /tmp/test-image.tar.zst && ./export_lxc_image.sh test
93+
run: sudo lxc image alias delete test-export && rm -f /tmp/test-image.tar.zst && ./test/export_lxc_image.sh test
9494
- uses: actions/cache/save@v3
9595
with:
9696
key: lxc-image-${{ github.sha }}
@@ -107,8 +107,8 @@ jobs:
107107
script: ["iperf3/iperf3_host", "iperf3/iperf3", "postgres/postgres", "redis/redis", "block/block", "memcached/memcached", "rabbitmq/rabbitmq", "etcd/etcd", "mysql/mysql"]
108108
steps:
109109
- uses: actions/checkout@v4.1.1
110-
- name: setup lxd (v5.19)
111-
run: ./setup_lxd.sh
110+
- name: setup lxd
111+
run: ./test/setup_lxd.sh
112112
- uses: actions/cache/restore@v3
113113
id: cache-restore
114114
with:
@@ -118,7 +118,7 @@ jobs:
118118
- name: load lxc image
119119
run: sudo lxc image import /tmp/test-image.tar.zst --alias test-export
120120
- name: launch lxc container
121-
run: ./launch_test_lxc.sh test-export
121+
run: ./test/launch_test_lxc.sh test-export
122122
- name: run benchmark (${{ matrix.script }})
123123
run: sudo lxc exec test -- sudo --login --user ubuntu /bin/bash -c "sleep 3 && /home/ubuntu/bypass4netns/benchmark/${{ matrix.script }}.sh"
124124
- name: upload plot
@@ -147,8 +147,8 @@ jobs:
147147
script: ["iperf3/iperf3", "postgres/postgres", "redis/redis", "block/block", "memcached/memcached", "rabbitmq/rabbitmq", "etcd/etcd", "mysql/mysql"]
148148
steps:
149149
- uses: actions/checkout@v4.1.1
150-
- name: setup lxd (v5.19)
151-
run: ./setup_lxd.sh
150+
- name: setup lxd
151+
run: ./test/setup_lxd.sh
152152
- uses: actions/cache/restore@v3
153153
id: cache-restore
154154
with:
@@ -158,7 +158,7 @@ jobs:
158158
- name: load lxc image
159159
run: sudo lxc image import /tmp/test-image.tar.zst --alias test-export
160160
- name: launch lxc container
161-
run: ./launch_test_lxc.sh test-export
161+
run: ./test/launch_test_lxc.sh test-export
162162
- name: run benchmark (${{ matrix.script }})
163163
run: ./benchmark/${{ matrix.script }}_multinode.sh
164164
- name: upload plot

‎benchmark/block/block_multinode.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
cd $(dirname $0)
4-
. ../../util.sh
4+
. ../../test/util.sh
55

66
set +e
77
NAME="test" exec_lxc sudo nerdctl rm -f block-server

‎benchmark/etcd/etcd_multinode.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
cd $(dirname $0)
4-
. ../../util.sh
4+
. ../../test/util.sh
55

66
set +e
77
NAME="test" exec_lxc sudo nerdctl rm -f etcd-server

‎benchmark/iperf3/iperf3_multinode.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
cd $(dirname $0)
4-
. ../../util.sh
4+
. ../../test/util.sh
55

66
set +e
77
NAME="test" exec_lxc sudo nerdctl rm -f iperf3-server

‎benchmark/memcached/memcached_multinode.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
cd $(dirname $0)
4-
. ../../util.sh
4+
. ../../test/util.sh
55

66
set +e
77
NAME="test" exec_lxc sudo nerdctl rm -f memcached-server

‎benchmark/mysql/mysql.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ BENCH_IMAGE="mysql-bench"
88

99
source ~/.profile
1010
cd $(dirname $0)
11-
. ../../util.sh
11+
. ../../test/util.sh
1212
. ../param.bash
1313

1414
# sometimes fail to pull images

‎benchmark/mysql/mysql_multinode.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
cd $(dirname $0)
4-
. ../../util.sh
4+
. ../../test/util.sh
55

66
set +e
77
NAME="test" exec_lxc sudo nerdctl rm -f mysql-server

‎benchmark/postgres/postgres.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ POSTGRES_IMAGE="postgres:$POSTGRES_VERSION"
77

88
source ~/.profile
99
cd $(dirname $0)
10-
. ../../util.sh
10+
. ../../test/util.sh
1111
. ../param.bash
1212

1313
sudo nerdctl pull --quiet $POSTGRES_IMAGE

‎benchmark/postgres/postgres_multinode.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
cd $(dirname $0)
4-
. ../../util.sh
4+
. ../../test/util.sh
55

66
set +e
77
NAME="test" exec_lxc sudo nerdctl rm -f psql-server

‎benchmark/rabbitmq/rabbitmq_multinode.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
cd $(dirname $0)
4-
. ../../util.sh
4+
. ../../test/util.sh
55

66
set +e
77
NAME="test" exec_lxc sudo nerdctl rm -f rabbitmq-server

‎benchmark/redis/redis_multinode.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
cd $(dirname $0)
4-
. ../../util.sh
4+
. ../../test/util.sh
55

66
set +e
77
NAME="test" exec_lxc sudo nerdctl rm -f redis-server

‎debug.sh

-39
This file was deleted.

‎enter.sh ‎test/enter.sh

File renamed without changes.
File renamed without changes.

‎launch_test_lxc.sh ‎test/launch_test_lxc.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ cd $(dirname $0)
77

88
# lxd init --auto --storage-backend=btrfs
99
sudo lxc launch -c security.privileged=true -c security.nesting=true $IMAGE test
10-
sudo lxc config device add test share disk source=$(pwd) path=/host
10+
sudo lxc config device add test share disk source=$(cd ../; pwd) path=/host
1111
sudo lxc exec test -- /bin/bash -c "echo 'ubuntu ALL=NOPASSWD: ALL' | EDITOR='tee -a' visudo"
1212
# let user services running
1313
# this sometimes fails, retry until success

‎test/multinode.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
cd $(dirname $0)
4-
. ../util.sh
4+
. ./util.sh
55

66
set +e
77
NAME="test" exec_lxc nerdctl rm -f vxlan

‎setup_lxd.sh ‎test/setup_lxd.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ set -eux -o pipefail
44

55
cd $(dirname $0)
66

7-
#sudo snap remove --purge lxd && sudo snap install lxd --revision=26093
87
sudo modprobe vxlan
9-
cat test/lxd.yaml | sudo lxd init --preseed
8+
cat lxd.yaml | sudo lxd init --preseed
109
sudo sysctl -w net.ipv4.ip_forward=1
10+
1111
#https://andreas.scherbaum.la/post/2023-01-18_fix-lxc-network-issues-in-ubuntu-22.04/
1212
sudo iptables -I DOCKER-USER -i lxdbr0 -o eth0 -j ACCEPT
1313
sudo iptables -I DOCKER-USER -o lxdbr0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT

‎test/setup_vxlan.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
cd $(dirname $0)
4-
. ../util.sh
4+
. ./util.sh
55

66
set -eux -o pipefail
77

‎util.sh ‎test/util.sh

File renamed without changes.

0 commit comments

Comments
 (0)
Please sign in to comment.