If you want to use the
SAP BTP cli to create a Kyma runtime instance, here’s the complete flow. I assume that you are logged on to a Global Account, and at least one plan for Kyma runtime is entitled to that Global Account.
1. First, you create a subaccount, for example, using the following command:
btp create accounts/subaccount --display-name <DISPLAY_NAME> \
--region <REGION> --subdomain <SUBDOMAIN>
2. Then you need to entitle the subaccount with the respective Kyma plan:
btp assign accounts/entitlement --to-subaccount <SUBACCOUNT_ID> \
--for-service kymaruntime --plan <KYMA_PLAN_NAME> --amount 1
You can look-up the subaccount ID via
btp list accounts/subaccount
Afterwards, you could set a "target" for all following commands to the particular, so that you can drop the repetition of the subaccount ID parameter. This can be achieved with the command
btp target --subaccount <ID>
The different plan names can be found in
SAP Help Portal. Alternatively, call
btp list accounts/entitlement
to get a list of all services the global account is entitled to use, including their plans. For a particular subaccount, you can use
btp list accounts/entitlement --subaccount <ID>
3. After setting this entitlement, you can trigger the Kyma runtime provisioning with the following SAP BTP cli command:
btp create accounts/environment-instance --subaccount <SUBACCOUNT_ID> \
--display-name <DISPLAY_NAME> --environment kyma --service kymaruntime \
--plan <PLAN_NAME> --parameters '{"name": "<RUNTIME_NAME>", \
<FURTHER_PARAMETERS_DEPENDING_ON_SERVICE_PLAN>}'
Parameters for the environment
The required parameters for Kyma runtime depend on the plan that you are using. Production-grade setups and the "test, demo, development"-setup for partners provide the most flexibility. The "free" plan lets you set the hyperscaler region but no sizing; and the "trial" plan lets you only set the runtime name.
Available Plans in the Kyma Environment shows which parameters you can set for each plan. Look up the available values in the SAP BTP cockpit, because machine types and region names are dependent on the hyperscaler you chose. The region names can be found as well in the table
Cluster Regions in the
BTP Regions documentation.
Examples
Let me provide three sample commands for the three different levels of flexibility that are possible:
Plans “azure”, “aws”, “gcp”, and “azure_lite”, where you need to consider the respective machine type and region name:
btp create accounts/environment-instance --subaccount <SUBACCOUNT_ID> \
--display-name blogpost --environment kyma --service kymaruntime --plan azure \
--parameters '{"autoScalerMax": 3, "autoScalerMin": 2, \
"machineType": "Standard_D8_v3", "name": "cli-blog-post", "region": "eastus"}'
"Free" plan, where you only need to consider the available AWS regions (the “free” plan is only available on AWS as of today):
btp create accounts/environment-instance --subaccount <SUBACCOUNT_ID> \
--display-name blogpost --environment kyma --service kymaruntime \
--plan free --parameters '{"name": "cli-blog-post", "region": "eu-west-2"}'
"Trial", where you can only set the instance name and not influence any other parameter:
btp create accounts/environment-instance --subaccount <SUBACCOUNT_ID> \
--display-name blogpost --environment kyma --service kymaruntime \
--plan trial --parameters '{"name": "cli-blog-post"}'