create

Usegreymatter create to create a specific object in the Grey Matter mesh. Objects can be zones, proxies, domains, routes, shared_rules, and clusters.

Usage

greymatter [GLOBAL OPTIONS] create [OPTIONS] <object type>

Sample Usage

Create from JSON File

Resources can be created directly from files on disk through shell redirects like shown below. Using the file listener-catalog.json with the following content:

{
    "zone_key": "zone-default-zone",
    "name": "catalog",
    "ip": "0.0.0.0",
    "port": 8080,
    "protocol": "http_auto",
    "domain_keys": ["domain-*"],
    "tracing_config": null,
    "checksum": "5e3f86011c958c05fbb51a51f9363bd014bef5aa4505728daf4dd35db440ff01"
}

greymatter create domain will create the domain object from the given spec.

Interactive Editor

By setting the EDITOR environment variable, the greymatter tool will open the editor of choice and let the user create the object directly.

After editing the JSON directly in vim, the returned object will look something like the below (depending on the user input).

Help

To list available commands run with the global help flag, greymatter create --help:

Questions?

Last updated

Was this helpful?