Skip to content

Commit f6a26ed

Browse files
committed
Draft etcd, localfileio, typed config
1 parent 2ee0368 commit f6a26ed

File tree

95 files changed

+3655
-1018
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+3655
-1018
lines changed

.bin/docker-build-ice

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ for q in "" "debug-"; do
4040
docker manifest create "$image_name:$q$IMAGE_TAG" \
4141
--amend "$image_name:$q$IMAGE_TAG-amd64" \
4242
--amend "$image_name:$q$IMAGE_TAG-arm64"
43-
docker manifest push "$image_name:$q$IMAGE_TAG"
43+
docker manifest push --purge "$image_name:$q$IMAGE_TAG"
4444
done
4545

4646
regctl image copy "$image_name:$IMAGE_TAG" "$image_name:latest"

.bin/docker-build-ice-rest-catalog

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ for q in "" "debug-" "debug-with-ice-"; do
4343
docker manifest create "$image_name:$q$IMAGE_TAG" \
4444
--amend "$image_name:$q$IMAGE_TAG-amd64" \
4545
--amend "$image_name:$q$IMAGE_TAG-arm64"
46-
docker manifest push "$image_name:$q$IMAGE_TAG"
46+
docker manifest push --purge "$image_name:$q$IMAGE_TAG"
4747
done
4848

4949
regctl image copy "$image_name:$IMAGE_TAG" "$image_name:latest"

.bin/local-ice

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33
DIR="$(dirname "${BASH_SOURCE[0]}")/.."
4-
exec "$DIR/mvnw" -f "$DIR/pom.xml" -q -Pno-check -pl ice compile exec:java -Dexec.mainClass=com.altinity.ice.Main -Dexec.args="$*" # FIXME: $*
4+
exec "$DIR/mvnw" -f "$DIR/pom.xml" -q -Pno-check -am -pl ice compile exec:java -Dexec.mainClass=com.altinity.ice.cli.Main -Dexec.args="$*" # FIXME: $*

.bin/local-ice-rest-catalog

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33
DIR="$(dirname "${BASH_SOURCE[0]}")/.."
4-
exec "$DIR/mvnw" -f "$DIR/pom.xml" -q -Pno-check -pl ice-rest-catalog compile exec:java -Dexec.mainClass=com.altinity.ice.rest.catalog.Main -Dexec.args="$*" # FIXME: $*
4+
exec "$DIR/mvnw" -f "$DIR/pom.xml" -q -P ice-rest-catalog-exec -Pno-check -am -pl ice-rest-catalog compile exec:java -Dexec.mainClass=com.altinity.ice.rest.catalog.Main -Dexec.args="$*" # FIXME: $*

.bin/local-pyiceberg-insert-ns1-table1-dataset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
3-
cd "$(dirname "${BASH_SOURCE[0]}")/../ice-rest-catalog/pyiceberg-test"
3+
cd "$(dirname "${BASH_SOURCE[0]}")/../ice-rest-catalog/src/test/pyiceberg"
44

55
uv run ice_create_table.py ns1.table1 --location=s3://bucket1/ns1/table1 --schema-from-parquet \
66
https://d37ci6vzurychx.cloudfront.net/trip-data/yellow_tripdata_2025-01.parquet

.bin/local-pyiceberg-scan

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
3-
cd "$(dirname "${BASH_SOURCE[0]}")/../ice-rest-catalog/pyiceberg-test"
3+
cd "$(dirname "${BASH_SOURCE[0]}")/../ice-rest-catalog/src/test/pyiceberg"
44

55
uv run ice_scan.py "$@"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
A suite of tools aimed at making [Iceberg](https://iceberg.apache.org/) REST Catalogs more approachable.
44

5-
- [ice-rest-catalog](ice-rest-catalog/) - A Kubernetes-ready Iceberg REST catalog backed by [etcd](https://etcd.io/) (WIP).
6-
Starts with a one-liner: `ice-rest-catalog -c config.yaml`.
5+
- [ice-rest-catalog](ice-rest-catalog/) - A Kubernetes-ready Iceberg REST catalog backed by [etcd](https://etcd.io/).
6+
Run locally with a one-liner: `ice-rest-catalog -c config.yaml`.
77

88
- [ice](ice/) - A CLI for interacting with Iceberg REST catalogs.
99
Create/delete tables, insert data with `ice insert -p ns1.table1 file://example.parquet`, etc.

examples/docker-compose/.ice.yaml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
catalog:
2-
default:
3-
uri: http://localhost:5000
4-
header.authorization: bearer foo
5-
s3.endpoint: http://localhost:8999
6-
client.region: mino
7-
ice.http.cache: var/cache/ice/http
1+
uri: http://localhost:5000
2+
bearerToken: foo
3+
s3:
4+
endpoint: http://localhost:8999

examples/docker-compose/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,17 @@ In the example below, we:
1111
# feel free to skip it if you have clickhouse client installed already
1212
devbox shell
1313

14-
docker compose down -v && sudo rm -rf docker-compose.volumes/
15-
docker compose up # spins up ice-rest-catalog + clickhouse
14+
docker compose down -v && sudo rm -rf data/
15+
docker compose up # spin up minio, ice-rest-catalog & clickhouse
1616

1717
ice insert nyc.taxis -p \
1818
https://d37ci6vzurychx.cloudfront.net/trip-data/yellow_tripdata_2025-01.parquet
1919

2020
clickhouse client --query 'select count(*) from ice.`nyc.taxis`;'
2121
```
22+
23+
### Troubleshooting
24+
25+
1. `docker compose up` fails with `ERROR: Invalid interpolation format for "content" option in config "clickhouse-init": "#!/bin/bash`
26+
27+
Solution: Upgrade docker/docker compose to v2.

examples/docker-compose/docker-compose.yaml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ services:
2626
depends_on:
2727
- minio
2828
ice-rest-catalog:
29-
image: altinity/ice-rest-catalog:latest
29+
image: altinity/ice-rest-catalog:${ICE_REST_CATALOG_TAG:-latest}
3030
restart: unless-stopped
3131
ports:
3232
- '5000:5000' # iceberg/http
@@ -35,7 +35,7 @@ services:
3535
target: /etc/ice/ice-rest-catalog.yaml
3636
volumes:
3737
# for access to /var/lib/ice-rest-catalog/db.sqlite
38-
- ./docker-compose.volumes/ice-rest-catalog/var/lib/ice-rest-catalog:/var/lib/ice-rest-catalog
38+
- ./data/docker-compose/ice-rest-catalog/var/lib/ice-rest-catalog:/var/lib/ice-rest-catalog
3939
depends_on:
4040
- minio-init
4141
clickhouse:
@@ -51,7 +51,7 @@ services:
5151
target: /docker-entrypoint-initdb.d/init-db.sh
5252
volumes:
5353
# for access to clickhouse-logs
54-
- ./docker-compose.volumes/clickhouse/var/log/clickhouse-server:/var/log/clickhouse-server
54+
- ./data/docker-compose/clickhouse/var/log/clickhouse-server:/var/log/clickhouse-server
5555
depends_on:
5656
- ice-rest-catalog
5757
configs:
@@ -68,16 +68,19 @@ configs:
6868
SETTINGS catalog_type = 'rest',
6969
auth_header = 'Authorization: Bearer foo',
7070
storage_endpoint = 'http://minio:8999',
71-
warehouse = 's3://bucket1/';
71+
warehouse = 's3://bucket1';
7272
"
7373
ice-rest-catalog-yaml:
7474
content: |
75-
uri: "jdbc:sqlite:file:/var/lib/ice-rest-catalog/db.sqlite?journal_mode=WAL&synchronous=OFF&journal_size_limit=500"
75+
uri: jdbc:sqlite:file:/var/lib/ice-rest-catalog/db.sqlite?journal_mode=WAL&synchronous=OFF&journal_size_limit=500
7676
warehouse: s3://bucket1
77-
s3.endpoint: http://minio:8999
78-
s3.access-key-id: "miniouser"
79-
s3.secret-access-key: "miniopassword"
80-
ice.s3.region: minio
81-
ice.token: foo
77+
s3:
78+
endpoint: http://minio:8999
79+
pathStyleAccess: true
80+
accessKeyID: miniouser
81+
secretAccessKey: miniopassword
82+
region: minio
83+
bearerTokens:
84+
- value: foo
8285
volumes:
8386
minio:

0 commit comments

Comments
 (0)