KKING
06/13/2024, 8:25 AMzed:
image: authzed/zed:latest-debug
environment:
- ZED_KEYRING_PASSWORD=somerandomkeyhere
command: |
context set dev spicedb:50051 somerandomkeyhere \
schema write ./zed/schema.zed \
schema read \
volumes:
- ./spicedb/schema.zed:/zed/schema.zed
depends_on:
- "spicedb"
The zed container doesnt like the way the commands are being formatted here and cant seem to figure out how to successfully parse them into the container to run in sequence.
Can anyone help ?vroldanbet
06/13/2024, 10:08 AMzed import
, using the playground YAML format (play.authzed.com). It can load it from a URL or from the local filesystem. You also don't need to set the context, you can pass the context parameters as parameters to zed import
vroldanbet
06/13/2024, 10:09 AMUsage:
zed import <url> [flags]
Examples:
From a gist:
zed import https://gist.github.com/ecordell/8e3b613a677e3c844742cf24421c08b6
From a playground link:
zed import https://play.authzed.com/s/iksdFvCtvnkR/schema
From pastebin:
zed import https://pastebin.com/8qU45rVK
From a devtools instance:
zed import https://localhost:8443/download
From a local file (with prefix):
zed import file:///Users/zed/Downloads/authzed-x7izWU8_2Gw3.yaml
From a local file (no prefix):
zed import authzed-x7izWU8_2Gw3.yaml
Only schema:
zed import --relationships=false file:///Users/zed/Downloads/authzed-x7izWU8_2Gw3.yaml
Only relationships:
zed import --schema=false file:///Users/zed/Downloads/authzed-x7izWU8_2Gw3.yaml
With schema definition prefix:
zed import --schema-definition-prefix=mypermsystem file:///Users/zed/Downloads/authzed-x7izWU8_2Gw3.yaml
vroldanbet
06/13/2024, 10:09 AMFlags:
--batch-size int import batch size (default 1000)
-h, --help help for import
--relationships import relationships (default true)
--schema import schema (default true)
--schema-definition-prefix string prefix to add to the schema's definition(s) before importing
--workers int number of concurrent batching workers (default 1)
Global Flags:
--certificate-path string path to certificate authority used to verify secure connections
--endpoint string spicedb gRPC API endpoint
--hostname-override string override the hostname used in the connection to the endpoint
--insecure connect over a plaintext connection
--log-format string format of logs ("auto", "console", "json") (default "auto")
--log-level string verbosity of logging ("trace", "debug", "info", "warn", "error") (default "info")
--no-verify-ca do not attempt to verify the server's certificate chain and host name
--permissions-system string permissions system to query
--request-id string optional id to send along with SpiceDB requests for tracing
--skip-version-check if true, no version check is performed against the server
--token string token used to authenticate to SpiceDB
yetitwo
06/13/2024, 2:27 PMzed context set dev <stuff> schema write
yetitwo
06/13/2024, 2:28 PMzed
yetitwo
06/13/2024, 2:28 PMzed
cli but is otherwise like an alpine container or something that runs a shellyetitwo
06/13/2024, 2:35 PMzed
container declarations in docker-compose and chain them using depends_on
(though that may end up having race conditions)