restatedev / restate

Restate is the platform for building resilient applications that tolerate all infrastructure faults w/o the need for a PhD.
https://docs.restate.dev
Other
1.59k stars 36 forks source link

`restate-server` Config parsing error. #2183

Open 10thfloor opened 2 days ago

10thfloor commented 2 days ago

I'm trying to use a custom config file for my restate-server deployment. I'm using the config.toml from the docs unmodified, but restate whoami refuses to parse it. After placing the config file in the restate-server config directory, it is failing with this error:

I tried everything (fixing line endings, invisible characters...etc)

restate whoami

Error:TOML parse error at line 1, column 9
|
1 | roles = ["worker", "admin", "metadata-store"]
|         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
invalid type: sequence, expected a map
in root/.config/restate/config.tomlTOML file 

linux-x86 and MacOS

Restate v1.1

10thfloor commented 2 days ago

Also tried copy/pasting the output of restate-server --dump-config into the toml file and still get the same error.

tillrohrmann commented 2 days ago

Thanks for reporting this issue @10thfloor. .config/restate/config.toml is the configuration of the CLI where the CLI records environment information. The linked config.toml is the configuration for the server and won't be understood by the CLI. Normally you don't have to touch .config/restate/config.toml yourself. Instead, we recommend using the restate config subcommand to edit it.

If you want to configure the restate-server deployment, then you can start restate-server --config <PATH_TO_SERVER_CONFIG>. You can also configure the restate server passing environment variables. Here you can find a few more details.

10thfloor commented 1 day ago

@tillrohrmann Thanks for the reply. It makes more sense now.

I'm trying to self-host the restate-server via the Docker image (docker.io/restatedev/restate:1.1), on Fly.io. It's working however I can't invoke my services I've deployed to AWS. I was trying to figure out how to set the Environment ID for my restate-server deployment to provide to the AWS trust-policy (restate-server "labmda invoker" IAM role).

I realize now that the procedure for setting up a production instance of restate-server is not documented, because that is something you will provide via your own infrastructure, ie. restate-cloud.

I am VERY excited about restate, and the possibilities it can unlock for smaller teams, especially when combined with tools like SST for managing AWS infrastructure. Thanks for your excellent work!

tillrohrmann commented 3 hours ago

Glad to hear that you find Restate useful 😊 We try to continually improve it so that it becomes more powerful.

If you are referring to the environment ID used in Restate's CLI, then this is indeed only relevant if you are interacting with a cloud-managed Restate server.

While I haven't deployed Restate server on Fly.io, I think this deployment setup should be possible. You probably need to provide the credentials to the process to talk to your services running on AWS. Maybe this resource can help in setting things up: https://fly.io/blog/oidc-cloud-roles/. I am also pulling in @pcholakov who knows a lot more than I about AWS and how to set up the right credentials.