Skip to content

Commit

Permalink
Update default blob-addr to use filesystem (for docker-compose and …
Browse files Browse the repository at this point in the history
…k8s) (#1666)

* update docker compose and k8s with persistent volume

Signed-off-by: pxp928 <parth.psu@gmail.com>

* add no_tmp_dir to fix local file blob store

Signed-off-by: pxp928 <parth.psu@gmail.com>

* fix typo

Signed-off-by: pxp928 <parth.psu@gmail.com>

---------

Signed-off-by: pxp928 <parth.psu@gmail.com>
  • Loading branch information
pxp928 committed Jan 29, 2024
1 parent a6c67d3 commit b0969e3
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 8 deletions.
2 changes: 1 addition & 1 deletion container_files/arango/guac.yaml
Expand Up @@ -2,7 +2,7 @@
pubsub-addr: nats://nats:4222

# blob store setup. Setup with blob store of choice via https://gocloud.dev/howto/blob/
blob-addr: file:///path/to/dir
blob-addr: file:///tmp/blobstore?no_tmp_dir=true

# collect-sub
csub-addr: guac-collectsub:2782
Expand Down
2 changes: 1 addition & 1 deletion container_files/ent/guac.yaml
Expand Up @@ -2,7 +2,7 @@
pubsub-addr: nats://nats:4222

# blob store setup. Setup with blob store of choice via https://gocloud.dev/howto/blob/
blob-addr: file:///path/to/dir
blob-addr: file:///tmp/blobstore?no_tmp_dir=true

# collect-sub
csub-addr: guac-collectsub:2782
Expand Down
2 changes: 1 addition & 1 deletion container_files/guac/guac.yaml
Expand Up @@ -2,7 +2,7 @@
pubsub-addr: nats://nats:4222

# blob store setup. Setup with blob store of choice via https://gocloud.dev/howto/blob/
blob-addr: file:///path/to/dir
blob-addr: file:///tmp/blobstore?no_tmp_dir=true

# collect-sub
csub-addr: guac-collectsub:2782
Expand Down
2 changes: 1 addition & 1 deletion container_files/neo4j/guac.yaml
Expand Up @@ -2,7 +2,7 @@
pubsub-addr: nats://nats:4222

# blob store setup. Setup with blob store of choice via https://gocloud.dev/howto/blob/
blob-addr: file:///path/to/dir
blob-addr: file:///tmp/blobstore?no_tmp_dir=true

# collect-sub
csub-addr: guac-collectsub:2782
Expand Down
2 changes: 1 addition & 1 deletion container_files/redis/guac.yaml
Expand Up @@ -2,7 +2,7 @@
pubsub-addr: nats://nats:4222

# blob store setup. Setup with blob store of choice via https://gocloud.dev/howto/blob/
blob-addr: file:///path/to/dir
blob-addr: file:///tmp/blobstore?no_tmp_dir=true

# collect-sub
csub-addr: guac-collectsub:2782
Expand Down
2 changes: 1 addition & 1 deletion container_files/tikv/guac.yaml
Expand Up @@ -2,7 +2,7 @@
pubsub-addr: nats://nats:4222

# blob store setup. Setup with blob store of choice via https://gocloud.dev/howto/blob/
blob-addr: file:///path/to/dir
blob-addr: file:///tmp/blobstore?no_tmp_dir=true

# collect-sub
csub-addr: guac-collectsub:2782
Expand Down
6 changes: 6 additions & 0 deletions docker-compose.yml
Expand Up @@ -57,6 +57,7 @@ services:
condition: service_healthy
volumes:
- ./container_files/guac:/guac:z
- blobstore:/tmp/blobstore

oci-collector:
networks: [ frontend ]
Expand All @@ -69,6 +70,7 @@ services:
condition: service_healthy
volumes:
- ./container_files/guac:/guac:z
- blobstore:/tmp/blobstore

depsdev-collector:
networks: [ frontend ]
Expand All @@ -83,6 +85,7 @@ services:
condition: service_healthy
volumes:
- ./container_files/guac:/guac:z
- blobstore:/tmp/blobstore
ports:
- "9091:9091" # for prometheus metrics

Expand All @@ -101,3 +104,6 @@ services:
networks:
frontend:
driver: bridge

volumes:
blobstore:
2 changes: 1 addition & 1 deletion guac.yaml
Expand Up @@ -21,7 +21,7 @@ neptune-realm: neptune
pubsub-addr: nats://localhost:4222

# blob store setup. Setup with blob store of choice via https://gocloud.dev/howto/blob/
blob-addr: file:///path/to/dir
blob-addr: file:///tmp/blobstore?no_tmp_dir=true

# CSub setup
csub-addr: localhost:2782
Expand Down
52 changes: 52 additions & 0 deletions k8s/k8s.yaml
Expand Up @@ -13,6 +13,10 @@ spec:
labels:
app: guac-collectsub
spec:
volumes:
- name: pv-storage
persistentVolumeClaim:
claimName: pv-claim
containers:
- name: guac-collectsub
image: local-organic-guac
Expand Down Expand Up @@ -107,6 +111,10 @@ spec:
labels:
app: guac-ingestor
spec:
volumes:
- name: pv-storage
persistentVolumeClaim:
claimName: pv-claim
containers:
- name: guac-ingestor
image: local-organic-guac
Expand All @@ -115,6 +123,9 @@ spec:
env:
- name: GUAC_PUBSUB_ADDR
value: nats://nats:4222
volumeMounts:
- mountPath: "/tmp/blobstore"
name: pv-storage
---
apiVersion: apps/v1
kind: Deployment
Expand All @@ -130,6 +141,10 @@ spec:
labels:
app: oci-collector
spec:
volumes:
- name: pv-storage
persistentVolumeClaim:
claimName: pv-claim
containers:
- name: oci-collector
image: local-organic-guac
Expand All @@ -140,6 +155,9 @@ spec:
value: nats://nats:4222
- name: GUAC_CSUB_ADDR
value: guac-collectsub:2782
volumeMounts:
- mountPath: "/tmp/blobstore"
name: pv-storage
---
apiVersion: apps/v1
kind: Deployment
Expand All @@ -155,6 +173,10 @@ spec:
labels:
app: depsdev-collector
spec:
volumes:
- name: pv-storage
persistentVolumeClaim:
claimName: pv-claim
containers:
- name: depsdev-collector
image: local-organic-guac
Expand All @@ -165,3 +187,33 @@ spec:
value: nats://nats:4222
- name: GUAC_CSUB_ADDR
value: guac-collectsub:2782
volumeMounts:
- mountPath: "/tmp/blobstore"
name: pv-storage
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-volume
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 1Gi
accessModes:
- ReadWriteMany
hostPath:
path: "/tmp"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pv-claim
spec:
storageClassName: manual
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
2 changes: 1 addition & 1 deletion pkg/cli/store.go
Expand Up @@ -58,7 +58,7 @@ func init() {
set.String("neo4j-realm", "neo4j", "realm to connect to graph db")

// blob store address
set.String("blob-addr", "file:///path/to/dir", "gocloud connection string for blob store configured via https://gocloud.dev/howto/blob/")
set.String("blob-addr", "file:///tmp/blobstore?no_tmp_dir=true", "gocloud connection string for blob store configured via https://gocloud.dev/howto/blob/ (default: filesystem)")

set.String("neptune-endpoint", "localhost", "address to neptune db")
set.Int("neptune-port", 8182, "port used for neptune db connection")
Expand Down

0 comments on commit b0969e3

Please sign in to comment.