Skip to content

Commit d160d99

Browse files
committed
Update JEPSEN_TODO and add CI workflow
1 parent e085964 commit d160d99

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

.github/workflows/jepsen.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Jepsen VM Run
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
time-limit:
7+
description: "Workload runtime seconds"
8+
required: false
9+
default: "60"
10+
rate:
11+
description: "Ops/sec per worker"
12+
required: false
13+
default: "10"
14+
faults:
15+
description: "Comma-separated faults (partition,kill,clock)"
16+
required: false
17+
default: "partition,kill,clock"
18+
19+
jobs:
20+
jepsen:
21+
# Requires a self-hosted runner with VirtualBox + Vagrant and at least 12GB RAM free.
22+
runs-on: [self-hosted, virtualbox]
23+
timeout-minutes: 120
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
with:
28+
submodules: recursive
29+
30+
- name: Set up Go
31+
uses: actions/setup-go@v5
32+
with:
33+
go-version: "1.25.5"
34+
35+
- name: Bring up Jepsen VMs
36+
working-directory: jepsen
37+
run: vagrant up
38+
39+
- name: Run Jepsen workload
40+
working-directory: jepsen
41+
env:
42+
HOME: ${{ github.workspace }}/jepsen/tmp-home
43+
LEIN_HOME: ${{ github.workspace }}/jepsen/.lein
44+
LEIN_JVM_OPTS: -Duser.home=${{ github.workspace }}/jepsen/tmp-home
45+
run: |
46+
vagrant ssh ctrl -c "cd ~/elastickv/jepsen && \
47+
lein run -m elastickv.redis-workload \
48+
--nodes n1,n2,n3,n4,n5 \
49+
--time-limit ${{ github.event.inputs['time-limit'] || github.event.inputs.time-limit }} \
50+
--rate ${{ github.event.inputs['rate'] || github.event.inputs.rate }} \
51+
--faults ${{ github.event.inputs['faults'] || github.event.inputs.faults }} \
52+
--concurrency 10"
53+
54+
- name: Collect Jepsen artifacts
55+
if: always()
56+
working-directory: jepsen
57+
run: |
58+
mkdir -p $GITHUB_WORKSPACE/artifacts
59+
vagrant ssh ctrl -c "cd ~/elastickv/jepsen && tar czf /home/vagrant/results.tgz store/ target/ tmp-home/jepsen.store || true"
60+
vagrant scp ctrl:/home/vagrant/results.tgz $GITHUB_WORKSPACE/artifacts/results.tgz || true
61+
62+
- name: Destroy VMs
63+
if: always()
64+
working-directory: jepsen
65+
run: vagrant destroy -f
66+
67+
- name: Upload artifacts
68+
if: always()
69+
uses: actions/upload-artifact@v4
70+
with:
71+
name: jepsen-results
72+
path: artifacts/results.tgz

0 commit comments

Comments
 (0)