Skip to content

Deploying Kelda

This guide will quickly get you up and running with your own instance of Kelda. We will deploy Kelda to a Kubernetes cluster, install the CLI, and deploy the same application used in the Quickstart.

Dependencies

This guide assumes that you have:

  • Installed kubectl.
  • Downloaded your Kelda license. This should have been emailed to you by the Kelda team.

Setup

  1. Create the Kubernetes cluster that Kelda will run on

    We recommend a cluster with at least 4CPUs and 8GB of RAM.

    Create the cluster using one of the options here.

    Once you've created the cluster, make sure that it's accessible via kubectl. The cluster should show up under kubectl config get-contexts, and once you switch to it with kubectl config use-context <context name>, kubectl get nodes should run successfully.

  2. Install the latest Kelda release

    Paste the following into your shell to download the latest Kelda release:

    curl -fsSL 'https://kelda.io/install.sh' | sh
    

    You should see the following output:

    Downloading the latest Kelda release...
    ################################################################# 100.0%
    The latest Kelda release has been downloaded to the current working directory.
    Please install Kelda to your desired location, or use the snippet below to install it to /usr/local/bin.
    
        sudo cp ./kelda /usr/local/bin
    

    Use the provided snippet to install Kelda into /usr/local/bin. If the directory doesn't already exist, run sudo mkdir -p /usr/local/bin before copying.

  3. Download the Magda example project

    Use the following commands to download the Magda example project:

    curl -Lo magda-demo.tar.gz 'https://update.kelda.io/?file=demo&release=latest&token=install'
    
    tar -xvzf magda-demo.tar.gz
    
    cd magda
    

    The rest of this guide assumes you are running commands from the root of the magda folder.

  4. Run the quickstart setup script

    Execute the quickstart setup script by running the following command.

    ./bin/setup-cluster.sh <path_to_license>
    

    This command will deploy the Kelda minion to your Kubernetes cluster, set up the registry credentials for pulling Magda images, and run kelda config to setup a user-specific configuration for Kelda, which will ask you a couple of questions.

    If this step succeeds, you should see the following in the output after completing the prompts:

    Done! You can type `kelda dev ./magda-web-server` to start trying Kelda!
    
  5. Start Kelda

    kelda dev ./magda-web-server
    

    kelda dev will deploy the Magda service to the remote cluster and boot all application dependencies. You will see a new screen in your terminal with information about the cluster.

    Kelda

    Wait for all the services to become Ready. The first boot may take several minutes because the Docker images need to be pulled.

  6. View the Bug

    Navigate to localhost:8080 in your browser. You should see a website with a search box. Try searching for any string — you should notice a red error message pop up on the bottom right portion of the screen complaining about a SyntaxError in JSON.

  7. Fix the SyntaxError bug

    Fix this bug by editing your local copy of magda-web-server/src/index.js, and replacing this_value_is_wrong with v0 on line 104.

    You will notice that Kelda will automatically sync your change and restart the affected containers. The Development Status portion of the Kelda terminal application informs you of all of the changes that are occurring in real time.

    Kelda Syncing Info

    If you refresh the page in your browser, you should see the SyntaxError go away, and search results begin to appear.

Cleanup

  1. Exit Kelda

    You can exit Kelda by entering Ctrl + c into the terminal window where the Kelda CLI is running.

Congratulations! You've now seen setup your own instance of Kelda that can be used to run your applications. You can keep exploring with this sample application, or move on to the rest of our documentation to learn how to start using Kelda with your own application.