Skip to content

Commit cb85a97

Browse files
committed
Adjust cassandra init script
1 parent d7caf8e commit cb85a97

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/go.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,20 @@ jobs:
3535
cassandra:
3636
image: cassandra:4.0
3737
env:
38-
CASSANDRA_USER: admin
39-
CASSANDRA_PASSWORD: password
38+
CASSANDRA_USER: cassandra
39+
CASSANDRA_PASSWORD: cassandra
40+
CASSANDRA_CLUSTER_NAME: test_cluster
41+
CASSANDRA_DC: datacenter1
42+
CASSANDRA_RACK: rack1
4043
ports:
4144
- "9042:9042"
4245
# Health check to wait until Cassandra is ready
4346
options: >-
44-
--health-cmd="cqlsh -u cassandra -p cassandra -e 'describe keyspaces'"
47+
--health-cmd="cqlsh -u cassandra -p cassandra -e 'describe keyspaces' localhost 9042"
4548
--health-interval=10s
4649
--health-timeout=5s
4750
--health-retries=10
51+
--health-start-period=30s
4852
4953
postgres:
5054
image: ankane/pgvector:v0.5.1
@@ -116,11 +120,11 @@ jobs:
116120
117121
- name: Create Cassandra keyspace
118122
run: |
119-
until cqlsh -u cassandra -p cassandra -e 'describe keyspaces' > /dev/null 2>&1; do
123+
until cqlsh -u cassandra -p cassandra -e 'describe keyspaces' localhost 9042 > /dev/null 2>&1; do
120124
echo "Waiting for Cassandra to be ready..."
121125
sleep 5
122126
done
123-
cqlsh -u cassandra -p cassandra -e "CREATE KEYSPACE IF NOT EXISTS perfkit_db_ci WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};"
127+
cqlsh -u cassandra -p cassandra -e "CREATE KEYSPACE IF NOT EXISTS perfkit_db_ci WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};" localhost 9042
124128
125129
- name: Create vector extension
126130
run: PGPASSWORD=password psql -h localhost -U root -d perfkit_pg_vector_db_ci -c "CREATE EXTENSION vector;"

0 commit comments

Comments
 (0)