Skip to content

Commit

Permalink
feat: adding spicedb setup with docker and with kind
Browse files Browse the repository at this point in the history
  • Loading branch information
akoserwal committed Feb 8, 2024
1 parent 1bfa8b5 commit 41cfa94
Show file tree
Hide file tree
Showing 28 changed files with 5,824 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .gitleaks.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[allowlist]
description = "Global Allowlist"

# Ignore based on any subset of the file path
paths = [
# Ignore all example certs
'''\/example.*\.pem$''',

# Ignore anything with the word funkymonkey anywhere in the path
'''foobar''','''yPsw5e6ab4bvAGe5H''',

# Ignore some long path
'''examples\/some\/long\/path\/server.key$''',
]

# Ignore based on any subset of the line
regexes = [
# Ignore lines containing pickles
'''yPsw5e6ab4bvAGe5H''',
]
25 changes: 25 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,31 @@ all:
make config;
make generate;


db:
./spicedb/start-postgresql.sh
.PHONY: db

spicedb:
./spicedb/start-spicedb.sh
.PHONY: spicedb

rebac:
./spicedb/start-insights-rebac.sh
.PHONY: rebac

rebac/teardown:
./spicedb/teardownrebac.sh
.PHONY: rebac/teardown

spicedb/teardown:
./spicedb/teardown.sh
.PHONY: spicedb/teardown

kind/spicedb:
./spicedb-kind-setup/setup.sh
.PHONY: kind/spicedb

# show help
help:
@echo ''
Expand Down
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,23 @@ cd cmd/server
wire
```

## Spicedb using docker/podman

# Run the postgresql db
`make db`

## Run the spicedb
`make spicedb`

## Run the insights-rebac with docker compose
`make rebac`

## teardown spicedb and postgresql db
`make spicedb/teardown`

## Spicedb using kind/kubernetes
`make kind/spicedb`

## Docker
```bash
# build
Expand Down
13 changes: 13 additions & 0 deletions spicedb-kind-setup/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Setup Spicedb-operator with Postgres in local kind kubernetes with monitoring stack

# Run the setup
`./setup.sh`

## Testing grpc end-point
`grpcurl -plaintext spicedb-grpc.127.0.0.1.nip.io:80 list`
```# authzed.api.v1.ExperimentalService
# authzed.api.v1.PermissionsService
# authzed.api.v1.SchemaService
# authzed.api.v1.WatchService
# grpc.health.v1.Health
# grpc.reflection.v1alpha.ServerReflection
15 changes: 15 additions & 0 deletions spicedb-kind-setup/install-operator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Install Spicedb-operator

# Create Spicedb namespace
```kubectl create namespace spicedb-operator```

# Deploy the Spicedb operator
```
kubectl apply --server-side -f https://github.com/authzed/spicedb-operator/releases/latest/download/bundle.yaml -n spicedb
```

# Create namespace spicedb

```kubectl create namespace spicedb```


5 changes: 5 additions & 0 deletions spicedb-kind-setup/kind-kube/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Create a Kubernetes cluster
`kind create cluster --config kind-ingress.config`

# Configure Conture
kubectl apply -f contour.yaml
Loading

0 comments on commit 41cfa94

Please sign in to comment.