Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: Test Framework and Update Docker Compose Configuration #701

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
15fb14c
[200~Refactor Test Framework and Update Docker Compose Configuration
rohansx Mar 16, 2024
d9607f9
Merge branch 'master' of https://github.com/rohansx/Xline
rohansx Mar 16, 2024
ffc737c
[200~Refactor Test Framework and Update Docker Compose Configuration
rohansx Mar 16, 2024
4139b87
Refactor: Test Framework and Update Docker Compose Configuration
rohansx Mar 16, 2024
6817913
fix: quick-start readme corrected pem file path
ChaudharyRaman Mar 15, 2024
96134ac
Merge branches 'master' and 'master' of https://github.com/rohansx/Xline
rohansx Mar 16, 2024
c32cfa1
fix: trailing space and bug
rohansx Mar 17, 2024
ce9bfe1
fix: trailing space and bug
rohansx Mar 17, 2024
20d686f
feat: test framework and update docker compose configuration
rohansx Mar 17, 2024
71e827a
fix: adjust port configurations for xLine nodes and add client contai…
rohansx Mar 21, 2024
d6c0471
Merge branch 'xline-kv:master' into master
rohansx Mar 21, 2024
dd385cc
Merge branch 'test-framework'
rohansx Mar 21, 2024
c183c2e
fix: update client container image for CI validation process
rohansx Mar 21, 2024
71c19af
fix: fix port number for node2
rohansx Mar 24, 2024
edd7f22
fix: fix port number for node3
rohansx Mar 24, 2024
81a22ae
Merge branch 'xline-kv:master' into master
rohansx Mar 24, 2024
702d34b
fix: fix port number for node2
rohansx Mar 24, 2024
55b0158
chore: mount LOG_PATH as xline container log dir
Phoenix500526 Feb 29, 2024
33203c3
fix: trailing space and bug
rohansx Mar 17, 2024
95ae436
fix: trailing space and bug
rohansx Mar 17, 2024
eaea991
Merge branch 'xline-kv:master' into master
rohansx Mar 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions ci/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
version: "3.9"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The version is obsolete, please remove this line. FYI: mailcow/mailcow-dockerized#5797


services:
node1:
image: ghcr.io/xline-kv/xline:latest
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add container_name to specify the container name.

networks:
xline_network:
ipv4_address: 172.22.0.2
volumes:
- ./fixtures:/mnt
ports:
- "2479:2379" # No change for node1
environment:
RUST_LOG: curp=debug,xline=debug
command: >
xline
rohansx marked this conversation as resolved.
Show resolved Hide resolved
--name node1
--members node1=http://172.22.0.2:2379,node2=http://172.22.0.3:2379,node3=http://172.22.0.4:2379
--storage-engine rocksdb
--data-dir /usr/local/xline/data-dir
--auth-public-key /mnt/public.pem
--auth-private-key /mnt/private.pem
--client-listen-urls http://172.22.0.2:2379
--peer-listen-urls http://172.22.0.2:2380

node2:
image: ghcr.io/xline-kv/xline:latest
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

networks:
xline_network:
ipv4_address: 172.22.0.3
volumes:
- ./fixtures:/mnt
ports:
- "2480:2379" # Changed from 2479:2379 to avoid conflict
environment:
RUST_LOG: curp=debug,xline=debug
command: >
xline
--name node2
--members node1=http://172.22.0.2:2379,node2=http://172.22.0.3:2379,node3=http://172.22.0.4:2379
--storage-engine rocksdb
--data-dir /usr/local/xline/data-dir
--auth-public-key /mnt/public.pem
--auth-private-key /mnt/private.pem
--client-listen-urls http://172.22.0.3:2379
--peer-listen-urls http://172.22.0.3:2380

node3:
image: ghcr.io/xline-kv/xline:latest
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

networks:
xline_network:
ipv4_address: 172.22.0.4
volumes:
- ./fixtures:/mnt
ports:
- "2381:2379" # No conflict here
environment:
RUST_LOG: curp=debug,xline=debug
command: >
xline
--name node3
--members node1=http://172.22.0.2:2379,node2=http://172.22.0.3:2379,node3=http://172.22.0.4:2379
--storage-engine rocksdb
--data-dir /usr/local/xline/data-dir
--auth-public-key /mnt/public.pem
--auth-private-key /mnt/private.pem
--client-listen-urls http://172.22.0.4:2379
--peer-listen-urls http://172.22.0.4:2380

client:
image: ghcr.io/xline-kv/etcdctl:v3.5.9
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

depends_on:
- node1
- node2
- node3
networks:
- xline_network
command: sh -c "while true; do sleep 30; done" # Keeps the client running

rohansx marked this conversation as resolved.
Show resolved Hide resolved
networks:
xline_network:
driver: bridge
ipam:
config:
- subnet: "172.22.0.0/16"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep this subnet unify with the subnet in validation_test.sh

28 changes: 28 additions & 0 deletions ci/fixtures/private.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCnAxxSXJYWZCKr
6f6j0HRUwkhX/0+GXjEclWoLA5+KZAuWMSu8bz6X+IScv4vNwORlGSWOnrz+8mb2
I0F6teVZWfWFqsnyWk7IxM+h9yTg7aY/8685YfWTL7fpWq1/3Fniz4QbsYFuzB1V
gaZ5fD2CSYIKzSD+qVSlXF25JDFHV7b2OdHrX0UKZOTWY/VE//STt+PJKdX9R3pl
kGwAzJIkkcAZy0vhvqT3ASTgXchNeN8wGYYb3YirkqIsQB5Xcs1R1W+yz+IrVa6/
0WMcyE6qtJPZ0lviyT0nHV/pZjXuD4B0aja/1fk/HmXDPMjpK1BuCBTStM/KlcrA
oAxo+YDhAgMBAAECggEAIyJhY+Y8YMuCC753JkklH+ubQn/gX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tMkycfAQqUHYcXhW1HNjyGbbg/sl13yddnPQqig
+ObtQNSIqGZWCc/HIqM//pPI3MHPhWARMOmAbk0I1mT0QKhuFfSugV2xb1Dj/Rvf
0VdB8txY+5Wz6zP1F2g46gM=
-----END PRIVATE KEY-----
9 changes: 9 additions & 0 deletions ci/fixtures/public.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApwMcUlyWFmQiq+n+o9B0
VMJIV/9Phl4xHJVqCwOfimQLljErvG8+l/iEnL+LzcDkZRkljp68/vJm9iNBerXl
WVn1harJ8lpOyMTPofck4O2mP/OvOWH1ky+36Vqtf9xZ4s+EG7GBbswdVYGmeXw9
gkmCCs0g/qlUpVxduSQxR1e29jnR619FCmTk1mP1RP/0k7fjySnV/Ud6ZZBsAMyS
JJHAGctL4b6k9wEk4F3ITXjfMBmGG92Iq5KiLEAeV3LNUdVvss/iK1Wuv9FjHMhO
qrST2dJb4sk9Jx1f6WY17g+AdGo2v9X5Px5lwzzI6StQbggU0rTPypXKwKAMaPmA
4QIDAQAB
-----END PUBLIC KEY-----
Loading
Loading