wundergraph/cosmo

How to run a router without controlplain?

Closed this issue · 8 comments

Component(s)

router

Is your feature request related to a problem? Please describe.

We don't use controlplane, we build our own config.json and decide what to run the router with
After trying to run a new version of cosmo, an error pops up that controlplane must be specified.
In the documentation controlplane became mandatory for some reason.
Screenshot 2024-08-01 at 15 58 08

With what configuration is it now correct to run just the router (without other movable parts like controlplane)?
What config to use?

Describe the solution you'd like

Describe alternatives you've considered

No response

Additional context

No response

WunderGraph commits fully to Open Source and we want to make sure that we can help you as fast as possible.
The roadmap is driven by our customers and we have to prioritize issues that are important to them.
You can influence the priority by becoming a customer. Please contact us here.

It feels like I now have to use the router_registration config, which is not described in the documentation

Definitely not intentional. We're taking a look.

Hi @flymedllva, please share your whole router config.

All the Issues I send were with the same config (below), but it stopped running and I haven't figured out how to run in the same config after the changes

version: "1"

# General router options
graph:
  name: "production"
  token: ""

log_level: "info"
listen_addr: "localhost:3002"
playground_enabled: true
introspection_enabled: true
json_log: true
shutdown_delay: 15s
grace_period: 20s
poll_interval: 10s
health_check_path: "/health"
readiness_check_path: "/health/ready"
liveness_check_path: "/health/live"
router_config_path: "config.json"

cors:
  allow_origins: ["*"]
  allow_methods:
    - HEAD
    - GET
    - POST
  allow_headers:
    - Origin
    - Content-Length
    - Content-Type
  allow_credentials: true
  max_age_minutes: 5m

# Config for custom modules   
# See "https://cosmo-docs.wundergraph.com/router/custom-modules" for more information   
modules:
  myModule:
    # Arbitrary values, unmarshalled by the module
    value: 1

cors max_age_minutes is also missing, but it doesn't really bother me

I think there should be an example in the documentation how to quickly start a router with local config.json without moving parts

@StarpTech
Everything is back to normal, thank you!