Skip to content

Commit

Permalink
Fix run make targets (#101)
Browse files Browse the repository at this point in the history
* Update quay image for kind deployment.

* Update default spicedb endpoint fix docker compose override.

* Update go.mod and go.sum for make generate.

* Update README.md.
  • Loading branch information
merlante authored Jun 17, 2024
1 parent 791e3ba commit d063e89
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 6 deletions.
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ See also:

`make build`

(Configs must be specified to run binary, e.g. `./bin/ciam-rebac -conf configs`, or run make target, below.)

### Run

`make run`
Expand Down Expand Up @@ -49,6 +51,10 @@ go build -o ./bin/ ./...
```
# Generate API files (include: pb.go, http, grpc, validate, swagger) by proto file
make api
# Generate config code
make config
# Generate all files
make all
```
Expand All @@ -66,18 +72,27 @@ wire

## Spicedb using docker/podman

### Run the spicedb
### Run spicedb and postgresql db with docker/podman compose

`make spicedb`

### Run the insights-rebac with docker compose
This is a good option for keeping spicedb running in the background while the rebac service is run via
`make run`, the binary or via the IDE (run/debug) during local development.

### Run the insights-rebac and spicedb with docker/podman compose

`make rebac`

### teardown spicedb and postgresql db
This runs everything and is a good option for testing a built rebac container image with the running binary.

### Teardown spicedb and postgresql db (brought up with docker/podman compose, as above)

`make spicedb/teardown`

### Teardown rebac and dependencies (brought up with docker/podman compose, as above)

`make rebac/teardown`

### Deploy Rebac and Spicedb using kind/kubernetes

`make kind/rebac`
Expand Down
2 changes: 1 addition & 1 deletion configs/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ server:
data:
spiceDb:
useTLS: false
endpoint: "${ENDPOINT:spicedb:50051}"
endpoint: "${ENDPOINT:0.0.0.0:50051}"
token: "${PRESHARED}" # token takes precedence over tokenFile
tokenFile: "${PRESHARED_FILE:.secrets/local-spicedb-secret}"
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
environment:
- "SPICEDB_PRESHARED=${SPICEDB_GRPC_PRESHARED_KEY}"
# - "SPICEDB_PRESHARED_FILE=/run/secrets/spicedb_pre_shared"
- "ENDPOINT=spicedb:50051"
- "SPICEDB_ENDPOINT=spicedb:50051"
build:
dockerfile: Dockerfile
profiles: ["rebac"]
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ require (
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-playground/form/v4 v4.2.0 // indirect
github.com/google/subcommands v1.2.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/mux v1.8.1 // indirect
github.com/gotestyourself/gotestyourself v2.2.0+incompatible // indirect
Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/subcommands v1.2.0 h1:vWQspBTo2nEqTUFita5/KeEWlUL8kQObDFbub/EN9oE=
github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
Expand Down
2 changes: 1 addition & 1 deletion spicedb-kind-setup/rebac/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
spec:
containers:
- name: relationships
image: quay.io/ciam_authz/insights-rebac:latest
image: quay.io/cloudservices/kessel-relations:latest
ports:
- containerPort: 8000
- containerPort: 9000
Expand Down

0 comments on commit d063e89

Please sign in to comment.