DataKitchen DataOps Documention

CLI Quickstart1

This quickstart covers an overview of DataOps orchestration via DKCloudCommand, DataKitchen's command line tool. You will learn about the following topics.

  • The master kitchen
  • Parent and child kitchen relationships
  • Viewing lists of kitchens and recipes
  • Creating kitchens and recipes
  • Getting local copies of kitchens and recipes
  • Reviewing a recipe's structure
  • Local versus remote recipe copies
  • Updating local file changes to remote
  • Cooking orders of recipe & variation pairs
  • Previewing kitchen merges
  • Merging kitchens: parent-to-child and child-to-parent
  • Tearing down development kitchens

Super-Fast CLI Quickstart1

Super-Fast CLI Quickstart1

Advanced users, who do not need detailed steps to get started with the DataKitchen DataOps platform, can jump to the SUPER-FAST QUICKSTART1 tab of this guide's Synopsis for a menu of abridged commands.

Local Directory Prerequisite

You will use a directory on your local machine to perform all of the quickstart exercises. This directory will house the local copies of the kitchens and recipes you will create and use.

  1. In your command-line shell or terminal window, create a /Kitchens directory on your local machine.
  2. Change your context to that new directory.
~ $ mkdir Kitchens
~ $ cd Kitchens
~/Kitchens $

The Master Kitchen

Each DataKitchen customer has a master kitchen. All other kitchens created in a company's account branch from the master kitchen, either directly or via proxy.

View the Kitchen List

The kitchen-list command returns a list of all kitchens available for a customer account.

~/Kitchens $ dk kitchen-list
~/Kitchens $ dk kl

Output: kitchen-list command

YYYY-MM-DD HH:MM:SS - Getting the list of kitchens
kitchen-list returned 1 kitchen

master

Child Kitchens

Understand Parent/Child Kitchens

Think of the master kitchen as the top-level parent kitchen. By default, child kitchens inherit everything defined in their parent kitchen, including recipes, kitchen staff, and kitchen overrides. These settings for a child kitchen can be edited during its creation.

The roles that typically manage a company's master kitchen include IT, DevOps Engineers, and DataOps Engineers. These staff also manage a child kitchen, often named Production. The Production kitchen will eventually contain rigorously-tested recipes built by staff working downstream in the data analytic pipeline.

The downstream staff, like Data Scientists and Business Analysts, work in Dev_Sprint and Feature_Sprint child kitchens and subsequently merge their work into the Production kitchen.

Create Child Kitchens

  1. Use the kitchen-create command to create a child kitchen named Production with the master kitchen as its parent.

Create Uniquely-Named Kitchens

When creating kitchens, append your name to the kitchen names so that you can have your own, segregated working environments. For example, if your name is Chef, you should create the following kitchens:

Production_Chef
Dev_Sprint_1_Chef
Feature_Sprint_1_Chef

~/Kitchens $ dk kitchen-create --parent master Production
~/Kitchens $ dk kc -p master Production

Output: kitchen-create command

YYYY-MM-DD HH:MM:SS - Creating kitchen Production from parent kitchen master
DKCloudCommand.create_kitchen created Production.
  1. Create a child kitchen named Dev_Sprint_1 with the Production kitchen as its parent kitchen.
    Dev_Sprint kitchens are intended to capture the cumulative work performed by a team over some period of time.
~/Kitchens $ dk kitchen-create --parent Production Dev_Sprint_1
~/Kitchens $ dk kc -p Production Dev_Sprint_1

Output: kitchen-create command

YYYY-MM-DD HH:MM:SS - Creating kitchen Dev_Sprint_1 from parent kitchen Production
DKCloudCommand.create_kitchen created Dev_Sprint_1
  1. Create another child kitchen named Feature_Sprint_1 with the Dev_Sprint_1 kitchen serving as parent kitchen.
    The Feature_Sprint_1 kitchen is the environment where an individual team member might perform work on a specific feature during her team's weekly development sprint.
~/Kitchens $ dk kitchen-create --parent Dev_Sprint_1 Feature_Sprint_1
~/Kitchens $ dk kc -p Dev_Sprint_1 Feature_Sprint_1

Output: kitchen-create command

YYYY-MM-DD HH:MM:SS - Creating kitchen Feature_Sprint_1 from parent kitchen Dev_Sprint_1
DKCloudCommand.create_kitchen created Feature_Sprint_1
  1. Check your work by issuing the kitchen-list command.
~/Kitchens $ dk kitchen-list
~/Kitchens $ dk kl

Output: kitchen-list command

YYYY-MM-DD HH:MM:SS - Getting the list of kitchens
kitchen-list returned 4 kitchens
+---- master
    +---- Production
            +---- Dev_Sprint_1
                    +---- Feature_Sprint_1

Local Work in a Kitchen

You have created three kitchens that reside solely in the cloud as remote copies. To build recipes and iterate on them using DKCloudCommand, you must get a local copy of the Feature_Sprint_1 kitchen.

Get Local Kitchen Copy

  1. Use the kitchen-get command to get a local copy of Dev_Sprint_1.
    You will do all of your quickstart work in Feature_Sprint kitchens. Later, you will merge your work into the Dev_Sprint_1 kitchens.
~/Kitchens $ dk kitchen-get Dev_Sprint_1
~/Kitchens $ dk kg Dev_Sprint_1

Output: kitchen-get command

YYYY-MM-DD HH:MM:SS - Getting kitchen 'Dev_Sprint_1'
Got Kitchen 'Dev_Sprint_1'
  1. Use the kitchen-get command to get a local copy of Feature_Sprint_1.
~/Kitchens $ dk kitchen-get Feature_Sprint_1
~/Kitchens $ dk kg Feature_Sprint_1

Output: kitchen-get command

YYYY-MM-DD HH:MM:SS - Getting kitchen 'Feature_Sprint_1'
Got Kitchen 'Feature_Sprint_1'

Recipes

You have not yet created any recipes in your customer account. Had one or more recipes been present in the master kitchen, they would have been inherited by the Production, Dev_Sprint_1, and Feature_Sprint_1 kitchens upon their creation.

In this section of the quickstart, you will build a recipe in the Feature_Sprint_1 kitchen and, later, merge this recipe up the kitchen hierarchy.

View a Recipe List

  1. Use the recipe-list command to view a list of recipes in the Feature_Sprint_1 kitchen.

Demo Recipes & Ingredients

Note that other recipes may have been added to your master kitchen for demonstrative purposes. For clarity, you may delete these recipes from the Dev_Sprint_1 and Feature_Sprint_1 kitchens using the recipe-delete command.

~/Kitchens $ cd Feature_Sprint_1
~/Kitchens/Feature_Sprint_1 $ dk recipe-list
~/Kitchens $ cd Feature_Sprint_1
~/Kitchens/Feature_Sprint_1 $ dk rl
~/Kitchens $ dk rl -k Feature_Sprint_1

Output: recipe-list command

YYYY-MM-DD HH:MM:SS - Getting the list of Recipes for Kitchen 'Feature_Sprint_1'
list_recipe - elapsed: 0
DKCloudCommand.list_recipe returned 0 recipes

Create a Recipe

You will create a new recipe in the Feature_Sprint_1 kitchen using a template argument built for this quickstart. The recipe generated is fully executable as-is and helps demonstrate how the DataKitchen platform orchestrates DataOps.

  1. Use the recipe-create command with the template option to create a remote copy of a recipe named Recipe_Template in the Feature_Sprint_1 kitchen.
    • Ensure that you add the --template option with the pre-built qs1 argument.
~/Kitchens/Feature_Sprint_1 $ dk recipe-create --template qs1 Recipe_Template
~/Kitchens/Feature_Sprint $ dk re -tm qs1 Recipe_Template
~/Kitchens $ dk re -k Feature_Sprint_1 -tm qs1 Recipe_Template

Output: recipe-create command

YYYY-MM-DD HH:MM:SS - Creating Recipe Recipe_Template for Kitchen 'Feature_Sprint_1'
list_recipe - elapsed: 1
DKCloudCommand.recipe_create created recipe Recipe_Template
  1. Run the recipe-list command again to see your new recipe.
~/Kitchens/Feature_Sprint_1 $ dk recipe-list
~/Kitchens/Feature_Sprint_1 $ dk rl
~/Kitchens $ dk rl -k Feature_Sprint_1
~/Kitchens $ cd Feature_Sprint_1

Output: recipe-list command

YYYY-MM-DD HH:MM:SS - Getting the list of Recipes for Kitchen 'Feature_Sprint_1'
list_recipe - elapsed: 0
DKCloudCommand.list_recipe returned 1 recipes
  Recipe_Template

Get Local Recipe Copy

The recipe you created is a cloud-based remote copy. In order to work on that recipe, you need to copy it to your local directory structure.

  1. Use the recipe-get command to get a local copy of the Recipe_Template recipe.
~/Kitchens/Feature_Sprint_1 $ dk recipe-get Recipe_Template
~/Kitchens/Feature_Sprint_1 $ dk rg Recipe-Template

Output: recipe-get command

YYYY-MM-DD HH:MM:SS - Getting the latest version of Recipe 'Recipe_Template' in Kitchen 'Feature_Sprint_1'
DKCloudCommand.get_recipe has 4 sections
  Recipe_Template
  Recipe_Template/placeholder-node1
  Recipe_Template/placeholder-node2
  Recipe_Template/resources

View Recipe Variations

Variations define a specific set of parameters to be used when compiling a recipe at runtime. By default, new recipes contain a single recipe variation named Variation1.

  1. Use the recipe-variation-list command to view a list of all of a given recipe's variations.
~/Kitchens/Feature_Sprint_1 $ cd Recipe_Template
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk recipe-variation-list
~/Kitchens/Feature_Sprint_1 $ cd Recipe_Template
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk rvl

Output: recipe-variation-list command

YYYY-MM-DD HH:MM:SS - Listing variations for recipe Recipe_Template in Kitchen Feature_Sprint_1
Variations:
    Variation1

Recipe Structure

All DataKitchen Recipes are built from a standard directory structure.

~/Kitchens/Feature_Sprint_1/Recipe_Template $ ls

Output: list command

description.json    placeholder-node1        placeholder-node2
resources        variables.json        variations.json
~/Kitchens/Feature_Sprint_1/Recipe_Template $ ls -R */

Output: list directory tree command

./placeholder-node1:
description.json.         notebook.json

./placeholder-node2:
description.json.         notebook.json

./resources:
README.txt

Hidden Files and Folders

You can ignore the hidden /.dk folder and its contents in each local copy of a kitchen. These are DataKitchen configuration files that should not be edited or moved.

Description

The description.json recipe configuration file denotes the recipe's name, description, and recipe-level alerts settings.

Note that to follow best practices, users can set temporary alerts in recipes but should set permanent alert recipients at the kitchen level in the web app. See Alerts for more information.

Jinja Templating

Note that the email addresses for alerts are not hard-coded but rather parameterized with Jinja templating, which uses a double-brace syntax {{variable}}. The values for these variables are defined in a recipe's variables.json file.

~/Kitchens/Feature_Sprint_1/Recipe_Template $ cat description.json

Output: concatenate command for a recipe's description.json file

{
    "description": "",
    "recipe-emails": {
        "email-delivery-service": "aws-email",
        "recipe-startup-email-recipients": "{{alerts.start}}",
        "recipe-complete-email-recipients": "{{alerts.success}}",
        "recipe-error-email-recipients": "{{alerts.error}}",
    }
}

Nodes

A recipe is essentially a directed acyclic graph composed of nodes and edges. Each node in a recipe graph has its own subdirectory within the recipe, containing its own description.json file.

The Recipe_Template recipe you created contains two placeholder nodes. This type of node is a Synchronize Node; the code refers to this node type as DKNode_NoOp.

You will build additional nodes to the recipe graph in CLI Quickstart2 and CLI Quickstart3.

~/Kitchens/Feature_Sprint_1/Recipe_Template $ cat placeholder-node1/description.json

Output: concatenate command for a node's description.json file

{
   "type" : "DKNode_NoOp",
   "description": "placeholder-node1"
}

Resources

In the /resources directory of a recipe you will find a README.txt file with important DataKitchen web links. You can use this file to provide useful notes regarding your recipes. The /resources directory is also where files that perform actions in your data pipeline, like SQL files, reside.

~/Kitchens/Feature_Sprint_1/Recipe_Template $ cat resources/README.txt

Output: concatenate command

DKCloudCommand - DataKitchen's DataOps Command Line Tool

Documentation:      https://datakitchen.readme.io/docs/dkcloudcommand
DataKitchen GUI:    https://cloud.datakitchen.io/dk/#/welcome
DataKitchen Home:   https://datakitchen.io/dk/
The DataOps Blog:   https://medium.com/data-ops
@DataKitchen_io:    https://twitter.com/datakitchen_io
DataOps Manifesto:  http://dataopsmanifesto.org/
GitHub Repository:  https://github.com/DataKitchen/DKCloudCommand
DKCC on PyPI:       https://pypi.python.org/pypi/DKCloudCommand

Resource Files & Nodes Using Containers

Resource files for recipe graph nodes using containers are located within the node itself rather than the recipe's /resources directory.

Variables

The variables.json configuration file defines the variables that are leveraged when running an Order of a recipe variation. The variable values defined here are applied via Jinja templating when a recipe is compiled to generate an Order Run.

~/Kitchens/Feature_Sprint_1/Recipe_Template $ cat variables.json

Output: concatenate command

{
    "variable-list": {
        "alerts": {
            "start": "[YOUR EMAIL HERE]", 
            "success": "[YOUR EMAIL HERE]", 
            "error": "[YOUR EMAIL HERE]"
        }
    }
}

Variations

The variations.json configuration file defines important recipe settings.

  • Variation Settings: Help define the variations; identifies the graphs for each variation
  • Graph Settings: Defines nodes and edges, specific to a recipe variation
  • Override Settings: Define overrides to specific recipe parameters; overrides are optional
  • Mesos Settings: Provides runtime elasticity and scheduling

This file also lists all variations of a recipe.

~/Kitchens/Feature_Sprint_1/Recipe_Template $ cat variations.json

Output: concatenate command

{
    "variation-list": {
        "variation1": {
            "graph-setting": "placeholder-graph"
        }
    }
, 
    "graph-setting-list": {
        "placeholder-graph": [
            [
                "placeholder-node1", 
                "placeholder-node2"            ]        ]
    }
, 
    "override-setting-list": {
        "production-overrides": {
            "override1": "override-value1"
        }
    }
}

Current Local Status

Now that you understand the recipe file structure, you can return to interacting with the DataKitchen DataOps platform.

Identify Local Kitchen

  1. Use the kitchen-which command to confirm the local kitchen in which you are working .
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk kitchen-which
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk kw

Output: kitchen-which command

You are in kitchen 'Feature_Sprint_1'

Confirm Local Recipe Status

You should confirm that the local version of your recipe still matches the remote copy.

  1. Use the recipe-status command to view file changes.
    You can expect that all files are unchanged, as you have not yet modified the local copy of the Recipe_Template recipe.
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk recipe-status
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk rs

Output: recipe-status command

YYYY-MM-DD HH:MM:SS - Getting the status of Recipe 'Recipe_Template' in Kitchen 'Feature_Sprint_1'
    versus directory '~/Kitchens/Feature_Sprint_1/Recipe_Template'
8 files are unchanged

Recipe Update: Local to Remote

In this step, you will make a change to your local copy of your recipe, then push that change to the remote copy of the recipe.

Typically, you would set alerts at the kitchen level in the UI using the Alerts feature, but you will set an alert here to practice modifying a recipe-level variable.

Modify the Local Recipe

  1. Find and open the variables.json configuration file in your local Recipe_Template recipe.
  2. Edit this file by updating the values in all alerts strings. Replace all instances of [YOUR EMAIL HERE] with a destination email address.
  3. Save the file.

Configuring Multiple Emails

You can configure multiple email addresses to receive order run feedback emails by separating them with commas.

"start": "[email protected],[email protected],[email protected]"
"error": "[email protected],[email protected]"

  1. Execute another recipe-status command to see how your local copy of Recipe_Template now differs from the remote copy.
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk recipe-status
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk rs

Output: recipe-status command

YYYY-MM-DD HH:MM:SS - Getting the status of Recipe 'Recipe_Template' in Kitchen 'Feature_Sprint_1'
    versus directory '~/Kitchens/Feature_Sprint_1/Recipe_Template'
1 files are modified on local:
    variables.json

7 files are unchanged

Update the Remote Recipe

  1. Use the file-update command to push your local change to the remote copy of the recipe.
    Important: Ensure that you include the required change message, as shown below.
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk file-update --message "Push email value update within variables.json" variables.json
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk fu -m "Push email value update within variables.json" variables.json
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cd ../..
~/Kitchens $ dk fu -k Feature_Sprint_1 -r Recipe_Template -m "Push email value update within variables.json" variables.json

Output: file-update command

YYYY-MM-DD HH:MM:SS - Updating File(s) (('variables.json',)) in Recipe (Recipe_Template) in Kitchen(Feature_Sprint_1) with message (Push email value update within variables.json)
DKCloudCommand.update_file for variables.json succeeded
  1. Confirm that the update was successful by executing another recipe-status command.
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk recipe-status
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk rs

Output: recipe-status command

YYYY-MM-DD HH:MM:SS - Getting the status of Recipe 'Recipe_Template' in Kitchen 'Feature_Sprint_1'
    versus directory '~/Kitchens/Feature_Sprint_1/Recipe_Template'
8 files are unchanged

Order Run

Running a recipe in the DataKitchen DataOps platform is referred to as running an Order. Each run of an order is known as an Order Run, which is associated with a specific Recipe and Variation combination.

Run an Order

  1. You may want to view a list of your recipe's variations to identify the variation you want to designate in running an order. Use the recipe-variations-list command.

Recipe Variations

DataKitchen provides runtime flexibility via recipe variations, which dictate what nodes are processed in a recipe graph during an order run, and in which pattern. Variations also stipulate what variable overrides should be applied when generating an order run.

~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk recipe-variation-list
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk rvl

Output: recipe-variation-list command

Getting variations from local . . . 
YYYY-MM-DD HH:MM:SS - Listing variations for recipe Recipe_Template in Kitchen Feature_Sprint_1
Variations:
    Variation1
  1. Use the order-run command to cook an order and generate your order run.
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk order-run Variation1 --yes
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk or Variation1 -y
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cd ../..
~/Kitchens $ dk or -k Feature_Sprint_1 -r Recipe_Template Variation1 -y

Output: order-run command

YYYY-MM-DD HH:MM:SS - Create an Order:
    Kitchen: Feature_Sprint_1
    Recipe: Recipe_Template
    Variation: Variation1

Order ID is: #f868645e-83da-12fa-9aa9-c24b7c061f54

Order IDs & Order Run IDs

Note that each order and order run generates a unique ID. The order ID shown in the sample output will not match the ID you generate in this quickstart.

Orders may contain multiple order run IDs (all for the same recipe and variation combination) in the cases where an order run is stopped and resumed, or when an order run is scheduled to process automatically at some interval. For example, if an order run is scheduled to be cooked each week after new data sources have been landed, the single order ID would contain multiple order run IDs.

View Order Run Details

The status of an order run will change as the order is queued up and executed.

  1. Use the orderrun-info command to view information on the last order run for the specified kitchen.
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk orderrun-info
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk ori
~/Kitchens  $ dk ori -k Feature_Sprint_1

Output: orderrun-info command

YYYY-MM-DD HH:MM:SS - Display Order-Run details from kitchen Feature_Sprint_1

ORDER RUN SUMMARY

Order ID:      f868645e-83da-12fa-9aa9-c24b7c061f54
Order Run ID:  fe1fha0a-83da-12fa-a7bf-2ac6fc086018
Status:        COMPLETED_SERVING
Kitchen:       Feature_Sprint_1
Recipe:        Recipe_Template
Variation:     Variation1
Start time:    YYYY-MM-DD  HH:MM:SS
Run duration:    HH:MM:SS (H:M:S)

Receive Order-Run Emails

Certain events associated with an order run of a recipe can trigger alert emails.

  • Order-Run starts
  • Order-Run completes
  • Order-Run encounters an error
  1. Look for emails received by the email addresses you configured above as alert recipients.
    You will receive Order Run Started and Order Run Completed emails.
Alert emails confirming that the order run started, then completed successfully.

Alert emails confirming that the order run started, then completed successfully.

Order Run Tests

Note that the email confirming that the order run completed successfully includes information regarding timings and tests. In CLI Quickstart2, you will implement automated tests for each node in your recipe graph. Tests can be built into your data pipeline for each Key that exists within each recipe node.

Merge: Parent to Child

Now that you successfully ran an order in the Feature_Sprint_1 kitchen, you can merge the work you did on the Recipe_Template recipe into its parent kitchen, Dev_Sprint_1. First, however, you will merge down from the parent to the child kitchen to account for any changes that may have been made in the parent kitchen.

Changes in a parent kitchen are likely to occur while you work in a child kitchen, especially if you are part of a large team.

Preview your Kitchen Merge

  1. Use the kitchen-merge-preview command to identify any files that will be changed due to the merge, and more importantly, any files with conflicts that you will need to manually resolve.
    • Use the --clean_previous_run option to clear the temporary merge files on your local machine that may still exist due to a previously aborted kitchen merge.

You should expect no changes to merge and no conflicts, since no changes have occurred in the Dev_Sprint_1 Kitchen in this quickstart.

~/Kitchens/Feature_Sprint_1/Recipe_Template $ cd ../../Dev_Sprint_1
~/Kitchens/Dev_Sprint_1 $ dk kitchen-merge-preview --target_kitchen Feature_Sprint_1 --clean_previous_run
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cd ../../Dev_Sprint_1
~/Kitchens/Dev_Sprint_1 $ dk kmp -tk Feature_Sprint_1 --cpr
~/Kitchens $ dk kmp -sk Dev_Sprint_1 -tk Feature_Sprint_1 -cpr

Output (abridged): kitchen-merge-preview command

YYYY-MM-DD HH:MM:SS - Previewing merge Kitchen Dev_Sprint_1 into Kitchen Feature_Sprint_1

--- Merge Preview Results (only changed files are being displayed): ---
Nothing to merge.
-----------------------------------------------------------------------

Kitchen merge preview done.

Kitchen Merge Best Practices

When a kitchen merge preview indicates that there is nothing to merge it is not necessary to perform a kitchen merge. Yet, to reinforce best practices, you should complete the parent-to-child kitchen merge next.

Merge the Parent Kitchen Down

  1. Use the kitchen-merge command to perform the merge.
    • Designate the target kitchen as your child kitchen, Feature_Sprint_1.
    • Use the yes option to force all prompts during the merge process to continue.
~/Kitchens/Dev_Sprint_1 $ dk kitchen-merge --target_kitchen Feature_Sprint_1 --yes
~/Kitchens/Dev_Sprint_1 $ dk km -tk Feature_Sprint_1 -y
~/Kitchens $ dk km -sk Dev_Sprint_1 -tk Feature_Sprint_1 -y

Output (abridged): kitchen-merge command

YYYY-MM-DD HH:MM:SS - Merging Kitchen Dev_Sprint_1 into Kitchen Feature_Sprint_1
looking for manually merged files in temporary directory {USER_HOME}/.dk/merges/Dev_Sprint_1_to_Feature_Sprint_1
Calling Merge ...
Merge done.

Updating Recipes in the local version of Target Kitchen Feature_Sprint_1 to receive merged changes applied to remote...
{USER_HOME}/Kitchens/dk/Feature_Sprint_1 kitchen has been updated

Kitchen Merge Temporary Local Files

When completing a kitchen merge and manually resolving file conflicts, DKCloudCommand saves temporary files on your local machine in a /merges sub-directory:

{USER_HOME}/.dk/{CONTEXT_NAME}/merges

Multiple versions of these files are saved with specific extensions:

  • .left (file from source kitchen)
  • .right (file from target kitchen)
  • .base (base file)
  • .merge (file with conflicts highlighted)
  • .resolved (resolved file written post file-resolve command)

When a user runs the kitchen-merge command, the .resolved temporary local file is used to resolve the file conflicts which cannot be automatically resolved.

Child Test Order

Another best practice is to run an order in the child kitchen after a merge sourced from its parent. This order run confirms that any changes promoted to the Dev_Sprint_1 kitchen since you branched off do not break the work you completed in the Feature_Sprint_1 kitchen.

Child Kitchen Tests, Post-Merge

If no changes were merged from the parent to child kitchen, you do not need to run a post-merge child kitchen order to generate tests. Yet, to reinforce best practices, you should run an order next.

  1. Use the order-run command to start a test order in your child kitchen.
~/Kitchens $ cd ../Feature_Sprint_1/Recipe_Template
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk order-run Variation1 --yes
~/Kitchens $ cd ../Feature_Sprint_1/Recipe_Template
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk or Variation1 -y
~/Kitchens $ dk or -k Feature_Sprint_1 -r Recipe_Template Variation1 -y

Output: order-run command

YYYY-MM-DD HH:MM:SS - Create an Order:
    Kitchen: Feature_Sprint_1
    Recipe: Recipe_Template
    Variation: Variation1

Order ID is: 85a791f8-83ec-12fa-85ff-66d30ae29605
  1. Use the orderrun-info command to view information on your test order run.
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk orderrun-info
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk ori
~/Kitchens $ dk ori -k Feature_Sprint_1

Output: orderrun-info command

YYYY-MM-DD HH:MM:SS - Display Order-Run details from kitchen Feature_Sprint_1

ORDER RUN SUMMARY

Order ID:    85a791f8-83ec-12fa-85ff-66d30ae29605
Order Run ID:    8a596738-83ec-12fa-867b-aa89bf970aad
Status:        COMPLETED_SERVING
Kitchen:    Feature_Sprint_1
Recipe:        Recipe_Template
Variation:    Variation1
Start time:    YYYY-MM-DD HH:MM:SS
Run duration:    0:00:05 (H:M:S)

Your order in the child kitchen ran successfully, so you can now merge your changes up from child to parent.

Merge: Child to Parent

Before merging your work up to the parent kitchen in this quickstart, you should confirm that the parent Dev_Sprint_1 contains no recipes. Following the merge, you can expect to see a copy of your Recipe_Template recipe in that parent kitchen.

List Recipes in Parent Kitchen

  1. Use the recipe-list command to confirm that there are no recipes in the parent kitchen.
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cd ../../Dev_Sprint_1
~/Kitchens/Dev_Sprint_1 $ dk recipe-list
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cd ../../Dev_Sprint_1
~/Kitchens/Dev_Sprint_1 $ dk rl
~/Kitchens $ dk rl -k Dev_Sprint_1

Output: recipe-list command

YYYY-MM-DD HH:MM:SS - Getting the list of Recipes for Kitchen 'Dev_Sprint_1'
DKCloudCommand.list_recipe returned 0 recipes

Preview the Merge

  1. Use the kitchen-merge-preview command to identify all changed files, including those with conflicts, that will result due to the kitchen merge.

You should expect all merged files to change with no conflicts because the Dev_Sprint_1 parent kitchen contains no recipes.

~/Kitchens/Dev_Sprint_1 $ cd ../Feature_Sprint_1
~/Kitchens/Feature_Sprint_1 $ dk kitchen-merge-preview --target_kitchen Dev_Sprint_1 --clean_previous_run
~/Kitchens/Dev_Sprint_1 $ cd ../Feature_Sprint_1
~/Kitchens/Feature_Sprint_1 $ dk kkmp -tk Dev_Sprint_1 -cpr
~/Kitchens $ dk kmp -sk Feature_Sprint_1 -tk Dev_Sprint_1 -cpr

Output: kitchen-merge-preview command

YYYY-MM-DD HH:MM:SS - Previewing merge Kitchen Feature_Sprint_1 into Kitchen Dev_Sprint_1

--- Merge Preview Results (only changed files are being displayed): ---
      ok        Recipe_Template/variables.json
      ok        Recipe_Template/placeholder-node1/notebook.json
      ok        Recipe_Template/placeholder-node1/description.json
      ok        Recipe_Template/resources/README.txt
      ok        Recipe_Template/placeholder-node2/description.json
      ok        Recipe_Template/description.json
      ok        Recipe_Template/placeholder-node2/notebook.json
      ok        Recipe_Template/variations.json
-----------------------------------------------------------------------

Kitchen merge preview done.

Merge Kitchen Up to Parent

  1. Use the kitchen-merge command, now with the parent kitchen, Dev_Sprint_1, acting as the target_kitchen.
    The response includes details regarding the merged changes.
~/Kitchens/Feature_Sprint_1 $ dk kitchen-merge --target_kitchen Dev_Sprint_1 --yes
~/Kitchens/Feature_Sprint_1 $ dk km -tk Dev_Sprint_1 -y
~/Kitchens $ dk km -sk Feature_Sprint_1 -tk Dev_Sprint_1 -y

Output: kitchen-merge command

YYYY-MM-DD HH:MM:SS - Merging Kitchen Feature_Sprint_1 into Kitchen Dev_Sprint_1
looking for manually merged files in temporary directory {USER_HOME}/.dk/{USER_CONTEXT}/merges/Feature_Sprint_1_to_Dev_Sprint_1
Calling Merge ...                                                                                                                                                                                                               
Merge done.

Updating Recipes in the local version of Target Kitchen Dev_Sprint_1 to receive merged changes applied to remote...
/{USER_HOME}/Kitchens/{USER_CONTEXT}/Dev_Sprint_1 kitchen has been updated
  1. Repeat the recipe-list command to confirm that the Recipe_Template recipe has now been merged into the Dev_Sprint_1 kitchen.
~/Kitchens/Feature_Sprint_1 $ cd ../Dev_Sprint_1
~/Kitchens/Dev_Sprint_1 $ dk recipe-list
~/Kitchens/Feature_Sprint_1 $ cd ../Dev_Sprint_1
~/Kitchens/Dev_Sprint_1 $ dk rl
~/Kitchens $ dk rl -k Dev_Sprint_1

Output: recipe-list command

YYYY-MM-DD HH:MM:SS - Getting the list of Recipes for Kitchen 'Dev_Sprint_1'
DKCloudCommand.list_recipe returned 1 recipes
  Recipe_Template

Parent Test Order

Confirm that the merge was successful by cooking an order run of the updated Recipe_Template recipe in the Dev_Sprint_1 kitchen.

Note that since order runs are generated from remote copies of recipes, you do not need to get a local copy of the recipe.

  1. Use the order-run command to test the Recipe_Template recipe in the parent kitchen.
~/Kitchens/Dev_Sprint_1 $ dk order-run --recipe Recipe_Template Variation1 --yes
~/Kitchens/Dev_Sprint_1 $ dk or -r Recipe_Template Variation1 -y
~/Kitchens $ dk or -k Dev_Sprint_1 -r Recipe_Template Variation1 -y

Output: order-run command

YYYY-MM-DD HH:MM:SS - Create an Order:
    Kitchen: Dev_Sprint_1
    Recipe: Recipe_Template
    Variation: Variation1

Order ID is: 4850b2ec-83f3-12fa-88a3-c24b7c061f54
  1. Use the orderrun-info command to view information on your test order run.
~/Kitchens/Dev_Sprint_1 $ dk orderrun-info
~/Kitchens/Dev_Sprint_1 $ dk ori
~/Kitchens $ dk ori -k Dev_Sprint_1

Output: orderrun-info command

YYYY-MM-DD HH:MM:SS - Display Order-Run details from kitchen Dev_Sprint_1

ORDER RUN SUMMARY

Order ID:       4850b2ec-83f3-12fa-88a3-c24b7c061f54
Order Run ID:    4e349080-83f3-12fa-b7d7-9e6faaf6e73e
Status:         COMPLETED_SERVING
Kitchen:        Dev_Sprint_1
Recipe:         Recipe-Template
Variation:      Variation1
Start time:     YYYY-MM-DD HH:MM:SS
Run duration:   0:00:05 (H:M:S)
  1. Optionally, confirm that the order run was successful by viewing an alert email.
  1. You can also verify that an order run completed successfully by navigating to the relevant Order Run Details page in DataKitchen's DataOps web app.

Kitchen Summary

In this quickstart, you created a child kitchen of the default master named Production. From there, you created two addition kitchen generations with the Dev_Sprint_1 and Feature_Sprint_1 kitchens.

master >>> Production >>> Dev_Sprint_1 >>> Feature_Sprint_1

You made changes in your recipe in the Feature_Sprint_1 kitchen, then merged them up to the parent Dev_Sprint_1.

~/Kitchens/Dev_Sprint_1 $ cd ..
~/Kitchens $ dk kitchen-list
~/Kitchens/Dev_Sprint_1 $ cd ..
~/Kitchens $ dk kl

Output: kitchen-list command

YYYY-MM-DD HH:MM:SS - Getting the list of kitchens
kitchen-list returned 4 kitchens
+---- master
    +---- Production
            +---- Dev_Sprint_1
                    +---- Feature_Sprint_1

Teardown Child Kitchen

Now you can delete your child kitchen Feature_Sprint_1 because you completed your changes and merged them up to the parent. You will also tear down the cloud resources associated with your child kitchen.

  1. Use the kitchen-delete command to remove the remote copy of your child kitchen.

Local Version of the Feature_Sprint_1 Kitchen

Note that the command below only deletes the remote copy of the Feature_Sprint_1 kitchen. The local copy of Feature_Sprint_1 remains available for reference.

~/Kitchens $ dk kitchen-delete Feature_Sprint_1 --yes
~/Kitchens $ dk kd Feature_Sprint_1 -y

Output: kitchen-delete command

No child kitchens found.
YYYY-MM-DD HH:MM:SS - Deleting remote copy of kitchen Feature_Sprint_1. Local files will not change.
Kitchen Feature_Sprint_1 has been deleted

Wrap Up

This CLI Quickstart1 provided an overview of DataOps orchestration via DKCloudCommand, DataKitchen's command line tool. Specific topics covered include:

  • The master kitchen
  • Parent and child kitchen relationships
  • Viewing lists of kitchens and recipes
  • Creating kitchens and recipes
  • Getting local copies of kitchens and recipes
  • Reviewing a recipe's structure
  • Local versus remote recipe copies
  • Updating local file changes to remote
  • Cooking orders of recipe & variation pairs
  • Previewing kitchen merges
  • Merging kitchens: parent-to-child and child-to-parent
  • Tearing down development kitchens

The nodes in the Recipe-Template recipe you built do not perform any actions; they serve as placeholders. In the next quickstarts, you will build out your recipe graph into a robust analytic pipeline. To do this work, you will create a new development child kitchen named Feature_Sprint_2, with the Dev_Sprint_1 kitchen serving as parent.

Synopsis

PRE-HEAT THE OVEN
~ $ mkdir Kitchens
~ $ cd Kitchens

MASTER KITCHEN
~/Kitchens $ dk kitchen-list

CREATE CHILD KITCHENS
~/Kitchens $ dk kitchen-create --parent master Production
~/Kitchens $ dk kitchen-create --parent Production Dev_Sprint_1
~/Kitchens $ dk kitchen-create --parent Dev_Sprint_1 Feature_Sprint_1
~/Kitchens $ dk kitchen-list

GET KITCHEN TO LOCAL
~/Kitchens $ dk kitchen-get Dev_Sprint_1
~/Kitchens $ dk kitchen-get Feature_Sprint_1
 
LIST RECIPES
~/Kitchens $ cd Feature_Sprint_1
~/Kitchens/Feature_Sprint_1 $ dk recipe-list

CREATE RECIPE & GET LOCAL COPY
~/Kitchens/Feature_Sprint_1 $ dk recipe-create --template qs1 Recipe_Template
~/Kitchens/Feature_Sprint_1 $ dk recipe-list
~/Kitchens/Feature_Sprint_1 $ dk recipe-get Recipe_Template

VIEW RECIPE VARIATIONS
~/Kitchens/Feature_Sprint_1 $ cd Recipe_Template
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk recipe-variation-list

EXAMINE RECIPE STRUCTURE
~/Kitchens/Feature_Sprint_1/Recipe_Template $ ls -R */
~/Kitchens/Feature_Sprint_1/Recipe_Template $ ls resources
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cat resources/README.txt
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cat placeholder-node1/description.json
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cat placeholder-node2/description.json
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cat description.json
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cat variables.json
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cat variations.json

WHICH KITCHEN?
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk kitchen-which

RECIPE STATUS
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk recipe-status

LOCAL RECIPE CHANGE
[REPLACE VARIABLES.JSON EMAIL VALUES WITH YOUR PREFERRED EMAIL ADDRESS]
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk recipe-status

UPDATE: LOCAL TO REMOTE
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk file-update --message "Change message" variables.json
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk recipe-status

RUN AN ORDER OF A RECIPE VARIATION
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk recipe-variation-list
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk order-run Variation1 --yes

VIEW ORDER-RUN DETAILS
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk orderrun-info
[CHECK INBOX FOR ORDER RUN EMAILS; START AND COMPLETION]

MERGE PARENT TO CHILD
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cd ../../Dev_Sprint_1
~/Kitchens/Dev_Sprint_1 $ dk kitchen-merge-preview --target_kitchen Feature_Sprint_1 --clean_previous_run
~/Kitchens/Dev_Sprint_1 $ dk kitchen-merge --target_kitchen Feature_Sprint_1 --yes

CHILD KITCHEN TEST ORDER
~/Kitchens $ cd ../Feature_Sprint_1/Recipe_Template
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk order-run Variation1 --yes
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk orderrun-info

MERGE CHILD TO PARENT
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cd ../../Dev_Sprint_1
~/Kitchens/Dev_Sprint_1 $ dk recipe-list
~/Kitchens/Dev_Sprint_1 $ cd ../Feature_Sprint_1
~/Kitchens/Feature_Sprint_1 $ dk kitchen-merge-preview --target_kitchen Dev_Sprint_1 --clean_previous_run
~/Kitchens/Feature_Sprint_1 $ dk kitchen-merge --target_kitchen Dev_Sprint_1 --yes
~/Kitchens/Feature_Sprint_1 $ cd ../Dev_Sprint_1
~/Kitchens/Dev_Sprint_1 $ dk recipe-list

PARENT KITCHEN TEST ORDER
~/Kitchens/Dev_Sprint_1 $ dk order-run --recipe Recipe-Template Variation1 --yes
~/Kitchens/Dev_Sprint_1 $ dk orderrun-info
[CHECK INBOX FOR ORDER RUN EMAILS; START AND COMPLETION]
[LOGIN TO https://cloud.datakitchen.io TO VIEW CORRESPINDING ORDER RUN]

KITCHEN SUMMARY
~/Kitchens/Dev_Sprint_1 $ cd ..
~/Kitchens $ dk kitchen-list

TEARDOWN CHILD KITCHEN
~/Kitchens $ dk kitchen-delete Feature_Sprint_1 --yes
PRE-HEAT THE OVEN
~ $ mkdir Kitchens
~ $ cd Kitchens

MASTER KITCHEN
~/Kitchens $ dk kl

CREATE CHILD KITCHENS
~/Kitchens $ dk kc -p master Production
~/Kitchens $ dk kc -p Production Dev_Sprint_1
~/Kitchens $ dk kc -p Dev_Sprint_1 Feature_Sprint_1
~/Kitchens $ dk kl

GET KITCHEN TO LOCAL
~/Kitchens $ dk kg Dev_Sprint_1
~/Kitchens $ dk kg Feature_Sprint_1
 
LIST RECIPES
~/Kitchens $ cd Feature_Sprint_1
~/Kitchens/Feature_Sprint_1 $ dk rl

CREATE RECIPE & GET LOCAL COPY
~/Kitchens/Feature_Sprint_1 $ dk re -tm qs1 Recipe_Template
~/Kitchens/Feature_Sprint_1 $ dk rl
~/Kitchens/Feature_Sprint_1 $ dk rg Recipe_Template

VIEW RECIPE VARIATIONS
~/Kitchens/Feature_Sprint_1 $ cd Recipe_Template
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk rvl

EXAMINE RECIPE STRUCTURE
~/Kitchens/Feature_Sprint_1/Recipe_Template $ ls -R */
~/Kitchens/Feature_Sprint_1/Recipe_Template $ ls resources
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cat resources/README.txt
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cat placeholder-node1/description.json
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cat placeholder-node2/description.json
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cat description.json
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cat variables.json
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cat variations.json

WHICH KITCHEN?
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk kw

RECIPE STATUS
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk rs

LOCAL RECIPE CHANGE
[REPLACE VARIABLES.JSON EMAIL VALUE WITH YOUR PREFERRED EMAIL ADDRESS]
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk rs

UPDATE: LOCAL TO REMOTE
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk fu -m "Change message" variables.json
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk rs

RUN AN ORDER OF A RECIPE VARIATION
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk rvl
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk or Variation1 -y

VIEW ORDER-RUN DETAILS
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk ori
[CHECK INBOX FOR ORDER RUN EMAILS; START AND COMPLETION]

MERGE PARENT TO CHILD
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cd ../../Dev_Sprint_1
~/Kitchens/Dev_Sprint_1 $ dk kmp -tk Feature_Sprint_1 -cpr
~/Kitchens/Dev_Sprint_1 $ dk km -tk Feature_Sprint_1 -y

CHILD KITCHEN TEST ORDER
~/Kitchens/Dev_Sprint_1 $ cd ../Feature_Sprint_1/Recipe_Template
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk or Variation1 -y
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk ori

MERGE CHILD TO PARENT
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cd ../../Dev_Sprint_1
~/Kitchens/Dev_Sprint_1 $ dk rl
~/Kitchens/Dev_Sprint_1 $ cd ../Feature_Sprint_1
~/Kitchens/Feature_Sprint_1 $ dk kmp -tk Dev_Sprint_1 -cpr
~/Kitchens/Feature_Sprint_1 $ dk km -tk Dev_Sprint_1 -y
~/Kitchens/Feature_Sprint_1 $ cd ../Dev_Sprint_1
~/Kitchens/Dev_Sprint_1 $ dk rl

PARENT KITCHEN TEST ORDER
~/Kitchens/Dev_Sprint_1 $ dk or -r Recipe_Template Variation1 -y
~/Kitchens/Dev_Sprint_1 $ dk ori
[CHECK INBOX FOR ORDER RUN EMAILS; START AND COMPLETION]
[LOGIN TO https://cloud.datakitchen.io TO VIEW CORRESPINDING ORDER RUN]

KITCHEN SUMMARY
~/Kitchens/Dev_Sprint_1 $ cd ..
~/Kitchens $ dk kl

TEARDOWN CHILD KITCHEN
~/Kitchens $ dk kd Feature_Sprint_1 -y
PRE-HEAT THE OVEN
~ $ mkdir Kitchens
~ $ cd Kitchens

MASTER KITCHEN
~/Kitchens $ dk kl

CREATE CHILD KITCHENS
~/Kitchens $ dk kc -p master Production
~/Kitchens $ dk kc -p Production Dev_Sprint_1
~/Kitchens $ dk kc -p Dev_Sprint_1 Feature_Sprint_1
~/Kitchens $ dk kl

GET KITCHEN TO LOCAL
~/Kitchens $ dk kg Feature_Sprint_1
 
LIST RECIPES
~/Kitchens $ dk rl -k Feature_Sprint_1

CREATE RECIPE & GET LOCAL COPY
~/Kitchens $ dk re -k Feature_Sprint_1 -tm qs1 Recipe-Template
~/Kitchens $ dk rl -k Feature_Sprint_1
~/Kitchens $ cd Feature_Sprint_1
~/Kitchens/Feature_Sprint_1 $ dk rg Recipe_Template

VIEW RECIPE VARIATIONS
~/Kitchens/Feature_Sprint_1 $ cd Recipe_Template
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk rvl

EXAMINE RECIPE STRUCTURE
~/Kitchens/Feature_Sprint_1/Recipe_Template $ ls -R */
~/Kitchens/Feature_Sprint_1/Recipe_Template $ ls resources
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cat resources/README.txt
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cat placeholder-node1/description.json
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cat placeholder-node2/description.json
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cat description.json
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cat variables.json
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cat variations.json

WHICH KITCHEN?
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk kw

RECIPE STATUS
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk rs

LOCAL RECIPE CHANGE
[REPLACE VARIABLES.JSON EMAIL VALUE WITH YOUR PREFERRED EMAIL ADDRESS]
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk rs

UPDATE: LOCAL TO REMOTE
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cd ../..
~/Kitchens $ dk fu -k Feature_Sprint_1 -r Recipe_Template -m "Change message" Feature_Sprint_1/Recipe_Template/variables.json
~/Kitchens $ cd Feature_Sprint_1/Recipe_Template
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk rs

RUN AN ORDER OF A RECIPE VARIATION
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk rvl
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cd ../..
~/Kitchens $ dk or -k Feature_Sprint_1 -r Recipe_Template Variation1 -y

VIEW ORDER-RUN DETAILS
~/Kitchens $ dk ori -k Feature_Sprint_1
[CHECK INBOX FOR ORDER RUN EMAILS; START AND COMPLETION]

MERGE PARENT TO CHILD
~/Kitchens $ dk km -sk Dev_Sprint_1 -tk Feature_Sprint_1 -cpr
~/Kitchens $ dk km -sk Dev_Sprint_1 -tk Feature_Sprint_1 -y

CHILD KITCHEN TEST ORDER
~/Kitchens $ dk or -k Feature_Sprint_1 -r Recipe_Template Variation1 -y
~/Kitchens $ dk ori -k Feature_Sprint_1

MERGE CHILD TO PARENT
~/Kitchens $ dk rl -k Dev_Sprint_1 -r Recipe_Template
~/Kitchens $ dk km -sk Feature_Sprint_1 -tk Dev_Sprint_1 -cpr
~/Kitchens $ dk km -sk Feature_Sprint_1 -tk Dev_Sprint_1 -y
~/Kitchens $ dk rl -k Dev_Sprint_1 -r Recipe_Template

PARENT KITCHEN TEST ORDER
~/Kitchens $ dk or -k Dev_Sprint_1 -r Recipe_Template Variation1 -y
~/Kitchens $ dk ori -k Dev_Sprint_1
[CHECK INBOX FOR ORDER RUN EMAILS; START AND COMPLETION]
[LOGIN TO https://cloud.datakitchen.io TO VIEW CORRESPINDING ORDER RUN]

KITCHEN SUMMARY
~/Kitchens $ dk kl

TEARDOWN CHILD KITCHEN
~/Kitchens $ dk kd Feature_Sprint_1 -y
PRE-HEAT THE OVEN
~ $ mkdir Kitchens
~ $ cd Kitchens

MASTER KITCHEN
~/Kitchens $ dk kl

CREATE CHILD KITCHENS
~/Kitchens $ dk kc -p master Production
~/Kitchens $ dk kc -p Production Dev_Sprint_1
~/Kitchens $ dk kc -p Dev_Sprint_1 Feature_Sprint_1
~/Kitchens $ dk kl

GET KITCHEN TO LOCAL
~/Kitchens $ dk kg Feature_Sprint_1

LIST RECIPES
~/Kitchens $ dk rl -k Feature_Sprint_1

CREATE RECIPE & GET LOCAL COPY
~/Kitchens $ dk re -k Feature_Sprint_1 -tm qs1 Recipe_Template
~/Kitchens $ dk rl -k Feature_Sprint_1
~/Kitchens $ cd Feature_Sprint_1
~/Kitchens/Feature_Sprint_1 $ dk rg Recipe_Template

VIEW RECIPE VARIATIONS
~/Kitchens/Feature_Sprint_1 $ cd Recipe_Template
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk rvl

WHICH KITCHEN?
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk kw

RECIPE STATUS
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk rs

LOCAL RECIPE CHANGE
[REPLACE VARIABLES.JSON EMAIL VALUE WITH YOUR PREFERRED EMAIL ADDRESS]
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk rs

UPDATE: LOCAL TO REMOTE
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk fu -m "Change message" variables.json
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk rs

RUN AN ORDER OF A RECIPE VARIATION
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk rvl
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk or Variation1 -y

VIEW ORDER-RUN DETAILS
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk ori
[CHECK INBOX FOR ORDER RUN EMAILS; START AND COMPLETION]

MERGE PARENT TO CHILD
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cd ../../Dev_Sprint_1
~/Kitchens/Dev_Sprint_1 $ dk kmp -tk Feature_Sprint_1 -cpr
~/Kitchens/Dev_Sprint_1 $ dk km -tk Feature_Sprint_1 -y

CHILD KITCHEN TEST ORDER
~/Kitchens/Dev_Sprint_1 $ cd ../Feature_Sprint_1/Recipe_Template
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk or Variation1 -y
~/Kitchens/Feature_Sprint_1/Recipe_Template $ dk ori

MERGE CHILD TO PARENT
~/Kitchens/Feature_Sprint_1/Recipe_Template $ cd ../..
~/Kitchens $ dk kmp -sk Feature_Sprint_1 -tk Dev_Sprint_1 -cpr
~/Kitchens $ dk km -sk Feature_Sprint_1 -tk Dev_Sprint_1 -y
~/Kitchens $ dk rl -k Dev_Sprint_1

PARENT KITCHEN TEST ORDER
~/Kitchens $ dk or -k Dev_Sprint_1 -r Recipe_Template Variation1 -y
~/Kitchens $ dk ori -k Dev_Sprint_1
[CHECK INBOX FOR ORDER RUN EMAILS; START AND COMPLETION]
[LOGIN TO https://cloud.datakitchen.io TO VIEW CORRESPINDING ORDER RUN]

KITCHEN SUMMARY
~/Kitchens $ dk kl

TEARDOWN CHILD KITCHEN
~/Kitchens $ dk kd Feature_Sprint_1 -y

Updated 6 days ago


CLI Quickstart1


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.