Skip to content

Latest commit

 

History

History
62 lines (48 loc) · 1.95 KB

08-01-provisioning-kyma-environment.md

File metadata and controls

62 lines (48 loc) · 1.95 KB
title type
Provision Kyma Runtime using KEB
Tutorials

This tutorial shows how to provision Kyma Runtime on Azure using Kyma Environment Broker.

Prerequisites

  • Compass with:
    • Runtime Provisioner configured for Azure provider
    • Kyma Environment Broker configured and chosen overrides set up

Steps

  1. Export these values as environment variables:

    export BROKER_URL={KYMA_ENVIRONMENT_BROKER_URL}
    export INSTANCE_ID={INSTANCE_ID}
    export GLOBAL_ACCOUNT_ID={GLOBAL_ACCOUNT_ID}
    export NAME={RUNTIME_NAME}
    export USER_ID={USER_ID}

    NOTE: INSTANCE_ID and NAME must be unique. It is recommended to use UUID as an INSTANCE_ID.

  2. Get the access token. Export this variable based on the token you got from the OAuth client:

    export AUTHORIZATION_HEADER="Authorization: Bearer $ACCESS_TOKEN"
  3. Make a call to the Kyma Environment Broker to create a Runtime on Azure. Find the list of possible request parameters here.

    curl --request PUT "https://$BROKER_URL/oauth/v2/service_instances/$INSTANCE_ID?accepts_incomplete=true" \
    --header 'X-Broker-API-Version: 2.14' \
    --header 'Content-Type: application/json' \
    --header "$AUTHORIZATION_HEADER" \
    --data-raw "{
        \"service_id\": \"47c9dcbf-ff30-448e-ab36-d3bad66ba281\",
        \"plan_id\": \"4deee563-e5ec-4731-b9b1-53b42d855f0c\",
        \"context\": {
            \"globalaccount_id\": \"$GLOBAL_ACCOUNT_ID\"
            \"user_id\": \"$USER_ID\"
        },
        \"parameters\": {
            \"name\": \"$NAME\"
        }
    }"

A successful call returns the operation ID:

{
    "operation":"8a7bfd9b-f2f5-43d1-bb67-177d2434053c"
}
  1. Check the operation status as described here.