Skip to content

Commit

Permalink
Simplify file names and update README
Browse files Browse the repository at this point in the history
  • Loading branch information
mpenick committed Apr 1, 2022
1 parent a961c5d commit c723971
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 16 deletions.
31 changes: 19 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,34 @@
* Add two keyspaces in the Astra DB UI via "Add Keyspace": `temporal` and `temporal_visibility`
* Create a new Astra token and get your DB's identifier
* Update `.env` with your Astra token and DB identifier
* Clone this repo
```sh
git clone https://github.com/mpenick/temporal-astra-cql-proxy.git
cd temporal-astra-cql-proxy
```

* Update the Temporal schema by running `./schema.sh` or:
```sh
docker-compose -f docker-compose-cqlproxy-schema.yml run temporal-admin-tools \
docker-compose -f docker-compose-schema.yaml run temporal-admin-tools \
-ep cql-proxy -k temporal setup-schema -v 0.0
docker-compose -f docker-compose-cqlproxy-schema.yml run temporal-admin-tools \
docker-compose -f docker-compose-schema.yaml run temporal-admin-tools \
-ep cql-proxy -k temporal update-schema -d schema/cassandra/temporal/versioned/

docker-compose -f docker-compose-cqlproxy-schema.yml run temporal-admin-tools \
docker-compose -f docker-compose-schema.yaml run temporal-admin-tools \
-ep cql-proxy -k temporal_visibility setup-schema -v 0.0
docker-compose -f docker-compose-cqlproxy-schema.yml run temporal-admin-tools \
docker-compose -f docker-compose-schema.yaml run temporal-admin-tools \
-ep cql-proxy -k temporal_visibility update-schema -d schema/cassandra/visibility/versioned/
```

Note: This setup currently has issues because the clustering order does contain the full clustering
key. The Temporal Cassandra schema has been copied to this repo and modified to work. This change
should be pushed upstream because the schema is technically underspecified.
* Start up Temporal!
```sh
docker-compose up
```

*Note:* The current version of the Temporal schema has issues because the clustering order does
contain the full clustering key. The Temporal Cassandra schema has been copied to this repo and
modified to work with Astra. This change should be pushed upstream because the schema is technically
underspecified.

```diff
diff --git a/schema/cassandra/visibility/versioned/v1.0/schema.cql b/schema/cassandra/visibility/versioned/v1.0/schema.cql
Expand All @@ -45,8 +57,3 @@ index 5fcad40cc..de8b4fe2e 100644
'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
}
```

* Start up Temporal!
```sh
docker-compose -f docker-compose-cqlproxy.yml up
```
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions schema.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

docker-compose -f docker-compose-cqlproxy-schema.yml run temporal-admin-tools -ep cql-proxy -k temporal setup-schema -v 0.0
docker-compose -f docker-compose-cqlproxy-schema.yml run temporal-admin-tools -ep cql-proxy -k temporal update-schema -d schema/cassandra/temporal/versioned/
docker-compose -f docker-compose-schema.yaml run temporal-admin-tools -ep cql-proxy -k temporal setup-schema -v 0.0
docker-compose -f docker-compose-schema.yaml run temporal-admin-tools -ep cql-proxy -k temporal update-schema -d schema/cassandra/temporal/versioned/

docker-compose -f docker-compose-cqlproxy-schema.yml run temporal-admin-tools -ep cql-proxy -k temporal_visibility setup-schema -v 0.0
docker-compose -f docker-compose-cqlproxy-schema.yml run temporal-admin-tools -ep cql-proxy -k temporal_visibility update-schema -d schema/cassandra/visibility/versioned/
docker-compose -f docker-compose-schema.yaml run temporal-admin-tools -ep cql-proxy -k temporal_visibility setup-schema -v 0.0
docker-compose -f docker-compose-schema.yaml run temporal-admin-tools -ep cql-proxy -k temporal_visibility update-schema -d schema/cassandra/visibility/versioned/

0 comments on commit c723971

Please sign in to comment.