Skip to content

order-run

Shortcut: or

Help option

Usage: dk order-run [OPTIONS] VARIATION
  Run an order: cook a recipe variation
  Examples:
          1) run an order
          dk or -y -k myKitchen myVariation
          2) run an order with just one node
          dk or -y -k myKitchen -n myNode myVariation
          3) run an order now
          dk or -y --now -k myKitchen myVariation
          4) run an order with parameters
          dk or -y -k myKitchen -p "{\"my-key\":\"my-value\"}" myVariation
          5) run an order with parameters (example using apostrophes)
          dk or -y -k myKitchen -p "{\"my-key\":\"value with 'quoted text'\"}" myVariation
  Note that:
          if a node is selected, as in example 2, variation's schedule will be overridden and the
          node will be executed immediately.
          In examples 4 and 5, variable 'my-key' will be added to running order, and will have
          highest precedence in case variable already exists in the recipe.
Options:
  -k, --kitchen TEXT  kitchen name
  -r, --recipe TEXT   recipe name
  -n, --node TEXT     Name of the node to run
  -w, --now           Run the order now
  -y, --yes           Force yes
  -p, --params TEXT   Overrides passed as parameters
  --help              Show this message and exit.

Run an order with contextual options

~Kitchens/Dev_Sprint/Recipe1 $ dk order-run Variation1


Current context is: default
Are you sure you want to create an Order with:
    Kitchen: Dev_Sprint
    Recipe: Recipe1
    Variation: Variation1 ? [yes/No] yes
YYYY-MM-DD HH:MM:SS - Create an Order:
    Kitchen: Dev_Sprint
    Recipe: Recipe1
    Variation: Variation1

Order ID is: c9dc1bd2-4ef6-11e8-a766-080027aceabc

Run order with contextual options with pre-defined recipe override applied

~Kitchens/Dev_Sprint/Recipe1 $ dk order-run Variation1


Current context is: default
Are you sure you want to create an Order with:
    Kitchen: Dev_Sprint
    Recipe: Recipe1
    Variation: Variation1 ? [yes/No] yes
YYYY-MM-DD HH:MM:SS - Create an Order:
    Kitchen: Dev_Sprint
    Recipe: Recipe1
    Variation: Variation1

Order ID is: c9dc1bd2-4ef6-11e8-a766-080027aceabc
The following variables will be overridden:
VARIABLE_NAME

Run order now

~Kitchens/Dev_Sprint/Recipe1 $ dk order-run -y --now Variation1


Current context is: default
YYYY-MM-DD HH:MM:SS - Create an Order:
        Kitchen: Dev_Sprint
        Recipe: Recipe1
        Variation: Variation1

CREATE ORDER
Order ID is: c9dc1bd2-4ef6-11e8-a762-080027aceabc
The following variables will be overridden:
schedule: now

Run order with explicit options, shortcuts, and force

~ $ dk or -k Dev_Sprint -r Recipe1 Variation1 -y


Current context is: default
YYYY-MM-DD HH:MM:SS - Create an Order:
    Kitchen: Dev_Sprint
    Recipe: Recipe1
    Variation: Variation1

Order ID is: c9dc1bd2-4ef6-11e8-a766-080027aceabc

Run order for a single, designated recipe graph node

~ $ dk or -k Dev_Sprint -r Receipe1 Variation1 -n node2 -y


Current context is: default
YYYY-MM-DD HH:MM:SS - Create an Order:
    Kitchen: Dev_Sprint
    Recipe: Recipe1
    Variation: Variation1
    Node: node2

Order ID is: c9dc1bd2-4ef6-11e8-a766-080027aceabc

Run order using explicit options, shortcuts, and force that passes parameters to override pre-defined variables

~ $ dk or -k Dev_Sprint -r Recipe1 Variation1 -p "{\"email\":\"runtime_override_email@datakitchen.io\",\"schema\":\"alt_schema\"}" -y


Current context is: default
YYYY-MM-DD HH:MM:SS - Create an Order:
    Kitchen: Dev_Sprint
    Recipe: Recipe1
    Variation: Variation1
The following variables will be overridden:
schema: alt_schema
email: runtime_override_email@datakitchen.io
Order ID is: c9dc1bd2-4ef6-11e8-a766-080027aceabc

Run order using contextual options that passes variable override using single quotes

~Kitchens/Dev_Sprint/Recipe1 $ dk order-run Variation2 -p "{\"variable1\":\"value with 'quoted text'\"}"


Current context is: default
YYYY-MM-DD HH:MM:SS - Create an Order:
        Kitchen: Dev_Sprint
        Recipe: Recipe1
        Variation: Variation2

CREATE ORDER
Order ID is: 7a2044f2-4083-11eb-9e58-02fb13cd9124
The following variables will be overridden:
variable1: value with 'quoted text'