Skip to content

Commit 9893a83

Browse files
committed
feat: add local docker compose
1 parent 7692916 commit 9893a83

File tree

3 files changed

+23
-19
lines changed

3 files changed

+23
-19
lines changed

docker-compose-gcs-distributed-test.yaml

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,15 @@ services:
1313
ports:
1414
- "8000:8000"
1515
environment:
16-
- P_S3_URL=http://minio:9000
17-
- P_S3_ACCESS_KEY=parseable
18-
- P_S3_SECRET_KEY=supersecret
19-
- P_S3_REGION=us-east-1
20-
- P_S3_BUCKET=parseable
16+
- P_GCS_BUCKET=parseable-test-gcs-local
2117
- P_STAGING_DIR=/tmp/data
2218
- P_USERNAME=parseableadmin
2319
- P_PASSWORD=parseableadmin
2420
- P_CHECK_UPDATE=false
2521
- P_PARQUET_COMPRESSION_ALGO=snappy
2622
- P_MODE=query
2723
- RUST_LOG=warn
24+
- GOOGLE_APPLICATION_CREDENTIALS=/parseable/svc/mpt-randd-8217aef869fd.json
2825
networks:
2926
- parseable-internal
3027
healthcheck:
@@ -36,7 +33,9 @@ services:
3633
restart_policy:
3734
condition: on-failure
3835
delay: 20s
39-
max_attempts: 3
36+
max_attempts:
37+
volumes:
38+
- "/home/opeyemi/Downloads/:/parseable/svc/:ro,z"
4039
# ingest server one
4140
parseable-ingest-one:
4241
container_name: parseable-ingest-one
@@ -48,11 +47,7 @@ services:
4847
ports:
4948
- "8000"
5049
environment:
51-
- P_S3_URL=http://minio:9000
52-
- P_S3_ACCESS_KEY=parseable
53-
- P_S3_SECRET_KEY=supersecret
54-
- P_S3_REGION=us-east-1
55-
- P_S3_BUCKET=parseable
50+
- P_GCS_BUCKET=parseable-test-gcs-local
5651
- P_STAGING_DIR=/tmp/data
5752
- P_USERNAME=parseableadmin
5853
- P_PASSWORD=parseableadmin
@@ -61,6 +56,7 @@ services:
6156
- P_MODE=ingest
6257
- P_INGESTOR_ENDPOINT=parseable-ingest-one:8000
6358
- RUST_LOG=warn
59+
- GOOGLE_APPLICATION_CREDENTIALS=/parseable/svc/mpt-randd-8217aef869fd.json
6460
networks:
6561
- parseable-internal
6662
healthcheck:
@@ -76,6 +72,8 @@ services:
7672
condition: on-failure
7773
delay: 20s
7874
max_attempts: 3
75+
volumes:
76+
- "/home/opeyemi/Downloads/:/parseable/svc/:ro,z"
7977

8078
quest:
8179
platform: linux/amd64
@@ -90,10 +88,10 @@ services:
9088
"20",
9189
"10",
9290
"5m",
93-
"minio:9000",
94-
"parseable",
95-
"supersecret",
96-
"parseable",
91+
"storage.googleapis.com",
92+
"GOOG1ESWXFI3QEE6X2SEYKIQDK6PONOW3QPKDD3HJZOBE34H6PWQWWQHYYBSI",
93+
"1Cfhir7cep9ej56UlLX6RKmkuV2BMcC2+BDFoSoa",
94+
"parseable-test-gcs-local",
9795
"http://parseable-ingest-one:8000",
9896
"parseableadmin",
9997
"parseableadmin",
@@ -105,8 +103,6 @@ services:
105103
condition: service_healthy
106104
parseable-ingest-one:
107105
condition: service_healthy
108-
minio:
109-
condition: service_healthy
110106
deploy:
111107
restart_policy:
112108
condition: on-failure

src/parseable/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,8 @@ impl Parseable {
249249
return "S3 bucket";
250250
} else if self.storage.name() == "blob_store" {
251251
return "Azure Blob Storage";
252+
} else if self.storage.name() == "gcs" {
253+
return "Google Object Store";
252254
}
253255
"Unknown"
254256
}

src/storage/gcs.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,13 @@ use super::{
6969

7070
pub struct GCSConfig {
7171
/// The endpoint to GCS or compatible object storage platform
72-
#[arg(long, env = "P_S3_URL", value_name = "url", required = true)]
72+
#[arg(
73+
long,
74+
env = "P_GCS_URL",
75+
value_name = "url",
76+
default_value = "https://storage.googleapis.com",
77+
required = false
78+
)]
7379
pub endpoint_url: String,
7480

7581
/// The GCS or compatible object storage bucket to be used for storage
@@ -107,7 +113,7 @@ impl GCSConfig {
107113
backoff: BackoffConfig::default(),
108114
};
109115

110-
let builder = GoogleCloudStorageBuilder::new()
116+
let builder = GoogleCloudStorageBuilder::from_env()
111117
.with_bucket_name(&self.bucket_name)
112118
.with_retry(retry_config);
113119

0 commit comments

Comments
 (0)