Coder Social home page Coder Social logo

sap-samples / btp-setup-automator Goto Github PK

View Code? Open in Web Editor NEW
94.0 14.0 43.0 13.61 MB

Automate the setup of your SAP BTP account with the SAP BTP CLI and other CLI tools.

License: Apache License 2.0

Dockerfile 3.90% Python 93.71% Shell 0.84% Batchfile 0.60% PowerShell 0.94%
cloud-foundry-cli sap-btp-cli docker-image btp-use-cases kyma

btp-setup-automator's Introduction

Setup Automator for SAP Business Technology Platform

REUSE status Release Docker ImageDev Docker Image

⚠ ARCHIVED - NO MAINTENANCE ⚠

📢 Please be aware that with tool is no longer maintained and the repository is archived

As an alternative for the btp-setup-automator we recommend to use the Terraform Provider for SAP BTP as tool for the setup of infrastructure on the SAP BTP available in the Hashicorp Terraform registry.

Description

This repository provides the user with a script to automate the setup of an SAP Business Technology Platform (SAP BTP) account and to learn how this is done with the various command line interfaces and tools that run inside a Docker container. It uses JSON configuration files to automate this setup of SAP BTP accounts or do other administrative tasks.

This includes:

  • Setup of your SAP BTP account
  • Entitlement of services
  • Subscriptions to applications and creation of service instances with service keys
  • Addition of administrator users to global account and sub accounts
  • Setup of roles and role collections, assignment of roles collections to users
  • Deployment of complete applications
  • Unrolling created setup

Quick Overview

Get a quick overview & demo of the btp-setup-automator through this video: Ask-the-expert video recording

Documentation

Started as a small helper for basic SAP BTP setups the tool has grown since its start. This documentation should support you in getting started quickly and then dive into the depths of the btp-setup-automator. The documentation has the following outline:

Code of conduct

Checkout the CODE_OF_CONDUCT.md file for more details on the code of conduct for this open source project.

License

Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.

btp-setup-automator's People

Contributors

alexrieder avatar alperdedeoglu avatar andre68723 avatar btbernard avatar bvarwig avatar dependabot[bot] avatar fabianleh avatar ilyabelozerovsap avatar jsangeetha avatar lechnerc77 avatar madevr avatar martinfrick avatar maxstreifeneder avatar murkutenidhi avatar phong78 avatar qmacro avatar rand0mf avatar rui1610 avatar rui8472 avatar yevgentrukhin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

btp-setup-automator's Issues

[FEATURE REQUEST] Custom Role Collection Support

Which area is mainly impacted

Configuration

Requested Feature

The request is to allow the creation of custom role collections within the BTP Setup Automator

Use Case/Scenario

The use for this would be creating a custom role such as 'HCADeveloper' in our team, and assigning multiple existing role collections such as "Cloud Connector Administrator", "Business_Application_Studio_Administrator", "Launchpad Admin", etc.

This feature is presently available in the UI, but not supported in the automator. I am happy to help test this, or provide additional scoping/detail.

Screen Shot 2022-10-18 at 2 16 21 PM

Would you like to support us?

  • Yes, I would like to support you

Anything else?

No response

[FEATURE REQUEST] Enable "Global" Environment for the whole usecase

Which area is mainly impacted

Configuration

Requested Feature

Hi,

I would like to collect various parameters from the user which should happen in the "executeBeforeAccountSetup" block. Once the account setup is done I would like to use the collected input in our deployment which happens in the "executeAfterAccountSetup" block.

Thanks
Alex

Use Case/Scenario

We would require that feature for our kyma usecase.

Would you like to support us?

  • Yes, I would like to support you

Anything else?

No response

[FEATURE REQUEST] evolve this project to a Terraform plugin

Which area is mainly impacted

CLI in general

Requested Feature

It would be great if this project could evolve to a Terraform plugin, which is the de facto standard for cloud infrastructure in Infrastructure as Code (IaC).

I believe more people would be able to help as there're heaps of documentation and examples for Terraform.

https://www.terraform.io/plugin

Use Case/Scenario

No response

Would you like to support us?

  • Yes, I would like to support you

Anything else?

No response

[FEATURE REQUEST] Automate creation of sub-account within a directory

Which area is mainly impacted

Configuration

Requested Feature

I have not seen how to create a sub-account within a provided directory? We need to create sub-accounts within Customer directories (to help organize our efforts) and would prefer to not manually have to move sub-accounts once created with the automator.

196739346-90473bac-8e5d-47bb-8850-5428a318ec03

Preferred expectation using automator:

196739346-90473bac-8e5d-47bb-8850-5428a318ec03

Use Case/Scenario

This will allow the new sub-account to be created directly within a Customer space within the Global Account (our use case has a 3 sub accounts (dev, qa, preprod) for all customers to aid in organization, and distinct spaces for our different environments (and in some cases customer contractual requirements)

This will limit manual effort to go back in and manually move the newly created sub account from the root directory, to their designated space.

Would you like to support us?

  • Yes, I would like to support you

Anything else?

No response

[FEATURE REQUEST] Type Ahead support and validation of cfLandscape parameter

Which area is mainly impacted

Configuration

Requested Feature

The parameetr cfLandscape in the parameters.json file is currently missing support of type-ahead and validation. This should be enhanced using the region specified in the parameters.json file.

See also issue #271

Use Case/Scenario

Creation of Cloud Foundry org in a dedicated landscape

Would you like to support us?

  • Yes, I would like to support you

Anything else?

No response

[FEATURE REQUEST] need tool 'jq' installed in container

Which area is mainly impacted

Docker Image (Build or Run)

Requested Feature

We need to have jq as well in container, it will help manipulating btp cli commands and parsing json output. It could be used for debugging or development purposes.

Use Case/Scenario

debugging/development

Would you like to support us?

  • Yes, I would like to support you

Anything else?

No response

[FEATURE REQUEST] give command line parameters higher priority than the ones in parameters.json file

Which area is mainly impacted

Configuration

Requested Feature

Currently the parameters defined in the parameters.json file have a higher priority than the ones provided via command line. This behaviours should be turned around.

Use Case/Scenario

Take the issue #77 as a basis. The user provided a parameter via the command line, but that one was over-ruled by the respective parameter in the parameters.json file.

Would you like to support us?

  • Yes, I would like to support you

Anything else?

No response

[BUG] CF Login not working anymore

Is there an existing issue for this?

  • I have searched the existing issues

Which area is mainly impacted

Cloud Foundry setups

Current Behavior

I ran into issues while testing again. First, it seems that if I give "cfspacename": "dev-eu10" in parameters.json, the login does not work.
Earlier, this worked, although not really – the login stopped and asked me to select a space.

Now, I get an error w/o having the chance to do anything:
image

If I remove the cfspacename from parameters.json, I get the same result.
Looked at the code, and I have to admit I don’t quite understand it: https://github.com/SAP-samples/btp-setup-automator/blob/main/libs/python/helperCommandExecution.py#L34

To me it looks like the command variable is overwritten if the cfspacename is present. But “-s $cfspacename” could be added to the original login command. However, it seems that command is not overwritten, because the login is being executed per the cmd output in the screenshot.
So maybe cfspacename is not picket up at all? Also no success via command line argument.

Expected Behavior

Login works (and ideally, space is targeted immediately as well).

Steps To Reproduce

No response

Logs available?

No response

Anything else?

No response

[BUG] Your login has expired when using SSO

Is there an existing issue for this?

  • I have searched the existing issues

Are you using the latest docker image for BTPSA?

  • I'm using the latest docker image for BTPSA.

Which area is mainly impacted

Security

Current Behavior

When authenticating with SSO I get authentication errors in the steps following the login, se log below. I have removed my subdomain, but in the terminal it was correct.

`
Connecting to CLI server at https://cpcli.cf.eu10.hana.ondemand.com...

Opening browser for authentication at: https://cpcli.cf.eu10.hana.ondemand.com/login/v2.18.0/browser/

Failed to open browser. Please authenticate manually.
Waiting for user authentication to complete (use Ctrl+C to abort)...

Login successful
We stored your configuration file at: /home/user/.config/btp/config.json

Current target:
Global account (subdomain: )

Tips:
Commands are executed in the current target. To change this target, use 'btp target'.
For an explanation of the targeting mechanism, use 'btp help target'.

OK

####################################################################################################

Get accountdetails for your global account with subdomain id ><

####################################################################################################
[2022-05-02 09:20:42] INFO : Get global account details for account with subdomain ID ><
[2022-05-02 09:20:42] RUN COMMAND: btp --format json get accounts/global-account --global-account ''
####################################################################################################

ERROR

####################################################################################################

####################################################################################################

ERROR

####################################################################################################
Authorization failed

Your login has expired. Please log in again.

ERROR

`

Expected Behavior

No response

Steps To Reproduce

  • Run ./btpsa with loginmethod set to SSO in parameters.json
  • Set subdomain
  • Copy and paste the login URL to your web browser

Logs and configuration files available?

{
  "usecasefile": "usecases/released/cap_app_launchpad.json",
  "region": "eu10",
  "globalaccount": "<domain>",
  "myemail": "[email protected]",
  "loginmethod": "sso",
  "subaccountname": null,
  "orgid": null,
  "cfspacename": "development",
  "suffixinstancename": null,
  "iashost": null,
  "envvariables": {
    "BTPSA_YOUR_OWN_ENV_VARIABLE1": "Hi! I'm BTPSA!",
    "BTPSA_YOUR_OWN_ENV_VARIABLE2": "How are you doing?",
    "BTPSA_YOUR_OWN_ENV_VARIABLE3": "You can use these variables in any command 
within the `executeBeforeAccountSetup` and `executeAfterAccountSetup` section by
 accessing (and manupulating) them as an OS environment variable!"
  }
}

Anything else?

No response

[FEATURE REQUEST] Better handling of "Unexpected server error" from BTP CLI

Which area is mainly impacted

CLI in general

Requested Feature

We should add a better handling of the "Unexpected server error" from the BTP CLI.

Use Case/Scenario

If a "Unexpected server error" is thrown by the BTP CLI, the btpsa should wait for a few seconds (5 - 10) and try the same command again. Maybe a couple of times (3 - 5 max). Only then the btpsa should throw an error.

Would you like to support us?

  • Yes, I would like to support you

Anything else?

No response

[BUG] Existence check fails due to defaulted org in AccountMetadata

Is there an existing issue for this?

  • I have searched the existing issues

Are you using the latest docker image for BTPSA?

  • I'm using the latest docker image for BTPSA.

Which area is mainly impacted

Cloud Foundry setups

Current Behavior

If the BTP subaccount does not have a CF environment enabled the creation of a service instance in CF should create the environment. To check the state the code checks if an environment exists (https://github.com/SAP-samples/btp-setup-automator/blob/main/libs/python/btp_cli.py#L256). This method implies that the orgID in the account metadata does not exist (see https://github.com/SAP-samples/btp-setup-automator/blob/main/libs/python/helperEnvCF.py#L30 => Check against orgid).
However, this parameter is available in the metadata due to a defaulting at https://github.com/SAP-samples/btp-setup-automator/blob/main/libs/python/btp_cli.py#L246.

This will cause a failure in the helperEnvCF as the value is NONE in case that the org is not existing,

Expected Behavior

CF environment get created if not existing

Steps To Reproduce

  1. Start the BTP Setup Automator
  2. Use the DSAG TT 22 Usecase

Logs and configuration files available?

No response

Anything else?

No response

[FEATURE REQUEST] Clone / copy subaccount (with content + settings)

Which area is mainly impacted

Other

Requested Feature

There should be a possibility to clone / copy a subaccount with its content (e.g. application) settings.
Or at least a script to compare BTP subaccounts to see were might be differences in content / configuration.

Use Case/Scenario

Customers want to move their subaccount from one region to another region (eg from eu10 eu11 for EU access only reasons, or switch of underlying cloud provider aka hyperscaler or for just for testing / validation purposes /spin up a test environment easily). As of now, it is not possible to easily move subaccount from one region to another region or re-create a subaccount out of an existing one. This is a manual "migration" task (thus time consuming and error prone). It would be helpful to build a script / use case where all available settings (enabled services, applications, ...) of subaccount1 is read and subaccount2 is set up based on this. Sure, there are a lot of things to be considered as the procedure might differ from enabled service / runtime / subaccount settings etc.

Would you like to support us?

  • Yes, I would like to support you

Anything else?

No response

[BUG] JSON Parsing for CF Environment

Is there an existing issue for this?

  • I have searched the existing issues

Are you using the latest docker image for BTPSA?

  • I'm using the latest docker image for BTPSA.

Which area is mainly impacted

Cloud Foundry setups

Current Behavior

After the following command the program expects a json with available environments:

btp --format json list accounts/environment-instances --subaccount 

The keys for this JSON can have different format (I suppose for different cloud versions). You already process this difference in helperEnvCF.py (line 38):

            org = labels.get("Org Name:")
            if org is None:
                org = labels.get("Org Name")

But not in btp_cli.py (line 380):

                            thisOrgId = labels["Org ID:"]
                            thisOrg = labels["Org Name:"]

Which causes an error:

####################################################################################################
# ERROR
####################################################################################################
  File "/home/user/libs/python/btp_cli.py", line 380, in create_environments
    thisOrgId = labels["Org ID:"]

NoneType: None

Expected Behavior

No error is expected :)

Steps To Reproduce

No response

Logs and configuration files available?

No response

Anything else?

No response

[FEATURE REQUEST] Enable JSON Schema for the parameters.json

Which area is mainly impacted

Configuration

Requested Feature

Would be nice to enable a JSON scheme in VS Code by default for parameters.json. This will help to get fast the type, purpose and default values of parameters + it will validate the json. For the moment I use a small script to convert /libs/json/paramBtpSetupAutomator.json to JSON scheme and then activate it in workspace settings:
"json.schemas": [ { "fileMatch": [ "/parameters.json" ], "url": "/libs/json/parametersSchema.json" } ]

But the source file is not detailed enough. There could be regex for some parameters (email/host values) or some other stuff.

Use Case/Scenario

User fills in parameters.json

Would you like to support us?

  • Yes, I would like to support you

Anything else?

No response

[BUG] cicd-app is not supported for my usecase although it is available

Is there an existing issue for this?

  • I have searched the existing issues

Are you using the latest docker image for BTPSA?

  • I'm using the latest docker image for BTPSA.

Which area is mainly impacted

CLI in general

Current Behavior

In my usecase I want to use the Continous Integration and Delivery Service Application with plan free. Although I can see it in my subaccount the script says the usecase is not supported.

Usecase can be found here:
https://github.com/SAP-samples/btp-setup-automator/blob/main/usecases/released/discoverycenter/3999-kyma-day2-operations/usecase.json

My assumption is that there is a problem as there is an application named cicd-app which has the plan free and there exists a service which has also the name cicd-app which only offers the default plan. Also the syntax highlighting in the usecase says that free is not allowed as value.

Expected Behavior

Usecase can be executed.

Steps To Reproduce

  1. In a global account on the live landscape
  2. Run the following usecase: https://github.com/SAP-samples/btp-setup-automator/blob/main/usecases/released/discoverycenter/3999-kyma-day2-operations/usecase.json
  3. The error will show up while checking if the account is sufficient for the usecase

Logs and configuration files available?

Services.txt

Anything else?

No response

[BUG] Error authenticating CF instance (wrong CF API endpoint)

Is there an existing issue for this?

  • I have searched the existing issues

Are you using the latest docker image for BTPSA?

  • I'm using the latest docker image for BTPSA.

Which area is mainly impacted

Cloud Foundry setups

Current Behavior

I'm trying to setup one "sample" BTP env with the default settings in the image container (default.json settings). At the time of connecting to the CF endpoint and connect to the auto-created org, I receive an error indicating that the ORG (just created, and exists) does not exists ERROR : Organization 'cf-btp-setup-automator-us10-998b9f87-fa30-4934-9295-6903ab7f' not found.

After investigating the issue, I found that the code refers to the CF API endpoint as: https://api.cf.us10.hana.ondemand.com , but the real actual CF endpoint is: https://api.cf.us10**-001**.hana.ondemand.com/

It seems it added to the API URI an "landscapelabel" (001) that is referenced in the btp_cli.py file (from line 323 envLandscape = selectEnvironmentLandscape(self, environment)

Effectively running the command (from cli) btp --format json list accounts/available-environment --subaccount <my account> I see a property "landscapeLabel": "cf-us10-001" , but as far I can understand, is not used to properly format the CF API URL (I searched for but I haven't found anything about th eproperty "landscapeLabel")

Expected Behavior

No response

Steps To Reproduce

1 I'm using the latest docker image container (commit id: 0724fc0)
2 run ./btpsa with default settings (by using the default parameters.json file and default usecases/released/default.json)

Logs and configuration files available?

[2022-10-15 10:05:42] RUN COMMAND: cf login -a 'https://api.cf.us10.hana.ondemand.com' -o 'cf-btp-setup-automator-us10-998b9f87-fa30-4934-9295-6903ab7f' -u '[email protected]' -p 'xxxxxxxxxxxxxxxxx
[2022-10-15 10:05:45] ERROR : API endpoint: https://api.cf.us10.hana.ondemand.com

Authenticating...
OK

API endpoint: https://api.cf.us10.hana.ondemand.com
API version: 3.123.0
user: [email protected]
No org or space targeted, use 'cf target -o ORG -s SPACE'
FAILED

[2022-10-15 10:05:45] ERROR : Organization 'cf-btp-setup-automator-us10-998b9f87-fa30-4934-9295-6903ab7f' not found.

Anything else?

No response

Issue with cloudfoundry service in usecase.json

  Hi Rui- This issue still persists this morning, and I cannot proceed- 

ERROR : service >saplaunchpad< with plan >standard< in region >eu10< IS NOT AVAILABLE

These are the three entitlements I'm trying to add in right now, and I also have an error about the 'standard' plan for CF is not available, only free, yet when I configure manually, I have the standard option.

{
            "name": "sapappstudio",
            "plan": "standard-edition",
            "category": "APPLICATION",
            "entitleonly": true
        },
        {
            "name": "cloudfoundry",
            "plan": "standard",
            "category": "ENVIRONMENT",
            "entitleonly": true
        },
        {
            "name": "saplaunchpad",
            "plan": "standard",
            "category": "APPLICATION",
            "entitleonly": true
        }

Another issue I encountered this morning, trying to add CloudFoundry:

[2022-10-13 15:35:28] INFO       : Check for available environment landscapes in subaccount >07f9e26d-ed9d-44e8-bcb4-8d19c9da3aaa< and region >eu10< (try 5 - trying again in 3s)
[2022-10-13 15:35:28] RUN COMMAND: btp --format json list accounts/available-environment --subaccount '07f9e26d-ed9d-44e8-bcb4-8d19c9da3aaa'
[2022-10-13 15:35:34] ERROR      : Traceback (most recent call last):

NoneType: None
[2022-10-13 15:35:34] ERROR      :   File "/home/user/./btpsa", line 32, in <module>
    myBtpUseCase.initialize_environments()

NoneType: None
[2022-10-13 15:35:34] ERROR      :   File "/home/user/libs/python/btp_cli.py", line 287, in initialize_environments
    self.create_environments()

NoneType: None
[2022-10-13 15:35:34] ERROR      :   File "/home/user/libs/python/btp_cli.py", line 323, in create_environments
    envLandscape = selectEnvironmentLandscape(

NoneType: None
[2022-10-13 15:35:34] ERROR      :   File "/home/user/libs/python/btp_cli.py", line 1488, in selectEnvironmentLandscape
    environment["name"] + "< for >" + region + "<")

NoneType: None
[2022-10-13 15:35:34] ERROR      : TypeError: 'BTPSERVICE' object is not subscriptable

NoneType: None
[2022-10-13 15:35:34] ERROR      : 'BTPSERVICE' object is not subscriptable
NoneType: None

Unsure if they are bugs, or simply my lack of knowing how everything is keyed in, even when looking at docs. I can start logging issues thought!

My teams end goal is an end-to-end automation for starting with the global account creation, and then the sub account with entitlements, users, permissions (which are also not applying), CF org members, etc. It may be either A, I'm missing knowledge, or B, it's not possible. We are migrating all of our former COLO customers onto BTP, and the manual effort is staggering..

Originally posted by @dachtera in #20 (reply in thread)

[FEATURE REQUEST] Support K8S service creation

Which area is mainly impacted

Other

Requested Feature

It would be great if btp-sa would also support service creation for K8S (documentation for reference). Ideally as a native type for a usecase.json.

Use Case/Scenario

Setup service for K8S environments on BTP.

Would you like to support us?

  • Yes, I would like to support you

Anything else?

No response

[FEATURE REQUEST] Could add new changes in a new branch?

Which area is mainly impacted

Docker Image (Build or Run)

Requested Feature

Hello,

But we're trying to use it and we can check that is appearing different errors when you add new changes (currently we have an issue in a python file). This is a problem because when we're trying to use and is appearing different errors. Could be possible create a stable branch which all working and new changes in another different branch?

Thanks

Use Case/Scenario

Its using the image from docker

http://ghcr.io/sap-samples/btp-setup-automator:main

Would you like to support us?

  • Yes, I would like to support you

Anything else?

No response

[BUG] Users are added as Global Account admins

Is there an existing issue for this?

  • I have searched the existing issues

Are you using the latest docker image for BTPSA?

  • I'm using the latest docker image for BTPSA.

Which area is mainly impacted

Security

Current Behavior

Users from the admin section of the usecase file are added as:

  • Subaccount admins
  • Org admins (when using CF)
  • Space admins (when using CF)
  • Global Account administrators

Expected Behavior

Users from the admin section of the usecase file should be added as:

  • Subaccount admins
  • Org admins (when using CF)
  • Space admins (when using CF)

Steps To Reproduce

Running any usecase with emails in the admin section, the users will be added as Global Account admins.

Logs and configuration files available?

No response

Anything else?

The Global Account is the backend of BTP. Admins are able to create subaccounts and assign entitlements. The GA admins should be a small and controlled population.

Adding all users as GA admins shouldn't be the default behavior, as this jeopardizes any effort on keeping the GA admins under control.

Currently btp-setup-automator doesn't add users as GA admins for trial environments. Could I use this block to add a flag (maybe in parameters?) to choose whether to add users or not? Is there any specific reason for doing this?

Thanks,
Pedro

[BUG] adding in SAPLaunchpad entitlement loops infinitely when configuring.

Is there an existing issue for this?

  • I have searched the existing issues

Are you using the latest docker image for BTPSA?

  • I'm using the latest docker image for BTPSA.

Which area is mainly impacted

Cloud Foundry setups

Current Behavior

When attempting to add the SAP Launchpad service with btpsa, the process will loop infinitely until aborted, with no success

Expected Behavior

Entitlement addition should complete.

Steps To Reproduce

Using the following in the json parameters,

"services": [
{
            "name": "SAPLaunchpad",
            "plan": "standard",
            "category": "APPLICATION",
            "entitleonly": true
        }

This was generated from the type-ahead functionality.

Logs and configuration files available?

No response

Anything else?

Output that repeats until manually halted.

####################################################################################################
# Track creation of service instances and app subscriptions
####################################################################################################
[2022-10-13 15:48:36] INFO       : check status of app subscriptions
[2022-10-13 15:48:36] RUN COMMAND: btp --format json list accounts/subscription --subaccount '07f9e26d-ed9d-44e8-bcb4-8d19c9da3aaa'
[2022-10-13 15:48:43] INFO       : check status of app subscriptions
[2022-10-13 15:48:43] RUN COMMAND: btp --format json list accounts/subscription --subaccount '07f9e26d-ed9d-44e8-bcb4-8d19c9da3aaa'
[2022-10-13 15:48:50] INFO       : check status of app subscriptions
[2022-10-13 15:48:50] RUN COMMAND: btp --format json list accounts/subscription --subaccount '07f9e26d-ed9d-44e8-bcb4-8d19c9da3aaa'
[2022-10-13 15:48:56] INFO       : check status of app subscriptions
[2022-10-13 15:48:56] RUN COMMAND: btp --format json list accounts/subscription --subaccount '07f9e26d-ed9d-44e8-bcb4-8d19c9da3aaa'
[2022-10-13 15:49:03] INFO       : check status of app subscriptions
[2022-10-13 15:49:03] RUN COMMAND: btp --format json list accounts/subscription --subaccount '07f9e26d-ed9d-44e8-bcb4-8d19c9da3aaa'
[2022-10-13 15:49:09] INFO       : check status of app subscriptions
[2022-10-13 15:49:09] RUN COMMAND: btp --format json list accounts/subscription --subaccount '07f9e26d-ed9d-44e8-bcb4-8d19c9da3aaa'
[2022-10-13 15:49:16] INFO       : check status of app subscriptions
[2022-10-13 15:49:16] RUN COMMAND: btp --format json list accounts/subscription --subaccount '07f9e26d-ed9d-44e8-bcb4-8d19c9da3aaa'
[2022-10-13 15:49:22] INFO       : check status of app subscriptions
[2022-10-13 15:49:22] RUN COMMAND: btp --format json list accounts/subscription --subaccount '07f9e26d-ed9d-44e8-bcb4-8d19c9da3aaa'
[2022-10-13 15:49:29] INFO       : check status of app subscriptions
[2022-10-13 15:49:29] RUN COMMAND: btp --format json list accounts/subscription --subaccount '07f9e26d-ed9d-44e8-bcb4-8d19c9da3aaa'
[2022-10-13 15:49:35] INFO       : check status of app subscriptions
[2022-10-13 15:49:35] RUN COMMAND: btp --format json list accounts/subscription --subaccount '07f9e26d-ed9d-44e8-bcb4-8d19c9da3aaa'
[2022-10-13 15:49:42] INFO       : check status of app subscriptions
[2022-10-13 15:49:42] RUN COMMAND: btp --format json list accounts/subscription --subaccount '07f9e26d-ed9d-44e8-bcb4-8d19c9da3aaa'

[BUG] Documentation of parameters

Is there an existing issue for this?

  • I have searched the existing issues

Are you using the latest docker image for BTPSA?

  • I'm using the latest docker image for BTPSA.

Which area is mainly impacted

Documentation

Current Behavior

The documentation of the parameters for the usecase.jsonand theparameters.json file are not easy to digest.
The information on what they do and how to use them is available in the JSON schemas and can be derived from the sample use case, but a markdown documentation is desirable.

This area needs to be improved in order to ease the adoption of the tool

Expected Behavior

Dedicated and consistent documentation on the parameters as a README file.

Steps To Reproduce

na

Logs and configuration files available?

na

Anything else?

No response

[BUG] Support of Subscription of custom SaaS without plan

Is there an existing issue for this?

  • I have searched the existing issues

Are you using the latest docker image for BTPSA?

  • I'm using the latest docker image for BTPSA.

Which area is mainly impacted

Other

Current Behavior

SaaS aetups with custom apps fail, if no plan is supplied.
Custom apps do not necessarily need a plan attached to an application.

A workaround can be the "executeafteraccountsetup" section, but the price is that then also the role assignment must be done manually

Expected Behavior

SaaS applications of custom aps without plans should be supported.

Steps To Reproduce

  1. add a custom SaaS app without plan to the usecase.json
  2. execute btpsa
    => error

Logs and configuration files available?

No response

Anything else?

No response

[FEATURE REQUEST] Add HANA SQL Endpoint to metadata_log.json

Which area is mainly impacted

Other

Requested Feature

I would like to have the HANA SQL Endpoint as part of the metadata_log.json

Use Case/Scenario

As we deploy our application to the created kyma cluster we would need to have the SQL Endpoint available during deployment. Currently the value is given by the user during execution of the script. If it would be available in the mtadata_log.json we could do the deployment without user interaction.

Would you like to support us?

  • Yes, I would like to support you

Anything else?

No response

[FEATURE REQUEST] Reference between defined service resources

Which area is mainly impacted

Cloud Foundry setups

Requested Feature

While considering the usage of the btp setup automator in a project the following situation showed up. There is maybe a way to achieve this I'm missing but take this as a possible suggestion.

On the scenario I'm building I will instantiate a SAP launchapd service to host some site. I would want to also use the Cloud Transport Management service. I have created instances for both the Launchpad and the Cloud Transport Management in my use case. When creating the Cloud Transport Management service I generate a service key that will be required in a ctms_destination destination that needs to be setup.

I also create the destination in the use case but I would need to reference the service key credentials from the service key that gets generated when instantiating the Cloud Transport Management service. Is there a way to reference artifacts generated on another service on the description of another service in the use case? What I'd be thinking of would be that the use case references the service key parameters from an object that is generated in a previous step., in this case referencing the service key that gets generated in the Cloud Transport Management service in a destination that gets generated at a later stage in the same use case.

Use Case/Scenario

{
"aboutThisUseCase": {
"name": "Setup CF Environment Example",
"description": "This use case serves to show an example of need to reference service attributes from another service",
"author": "raiatdeloitte",
"testStatus": "to be tested",
"usageStatus": "IN DEVELOPMENT",
"relatedLinks": [
]
},
"services": [
{
"name": "SAPLaunchpad",
"plan": "standard",
"category": "APPLICATION"
},
{
"name": "transport",
"plan": "standard",
"category": "SERVICE",
"createServiceKeys": [
"transport-ServiceKey" // This line is the one generating a service key
]
},
{
"name": "destination",
"plan": "lite",
"category": "SERVICE",
"parameters": {
"cfspacename":"$cf_space",
"HTML5Runtime_enabled": "true",
"init_data": {
"subaccount": {
"existing_destinations_policy": "fail",
"destinations": [
{
"Name": "cmts_destination",
"Type": "HTTP",
"URL": "http://sap.com",
"tokenServiceURL": "/oauth/token",
"Authentication": "OAuth2ClientCredentials",
"ProxyType": "Internet",
"Description": "Cloud Transport Management destination",
"clientId": "transport-sk-user", // I'd like to be able to reference the result of the execution of the generation of transport-ServiceKey here
"clientSecret": "transport-sk-pass", // I'd like to be able to reference the result of the execution of the generation of transport-ServiceKey here
"tc.languages": "en-GB,es-ES"
}
]
}
}
}
}
]
}

Would you like to support us?

  • Yes, I would like to support you

Anything else?

Take this as a suggestion of a nice to have. Not saying it should be implemented right away or as proposed. Also, maybe it's already possible and I missed the point.

[BUG] Entitlement servicePlan can differ from provisioning servicePlan

Is there an existing issue for this?

  • I have searched the existing issues

Which area is mainly impacted

CLI in general

Current Behavior

When adding redis with the plan v4.0-dev the btpsa will print this error:

image

I think this is because the provisioning for this plan needs an entitlement of another plan: 'dev'

When trying with the plan 'dev' the btpsa can run and manage the entitlement successfully but fails at the service creation (obviously)
image

The command works with cf cli cf create-service redis v4.0-dev test-redis

Expected Behavior

If a service with plan v4.0-dev is to be provisioned, btpsa should figure out that the related entitlement servicePlan is dev.

Steps To Reproduce

  1. run the script at any environment with redis assignment on the globalaccount
  2. add this config to the usecase
"services": [
    {
      "category": "SERVICE",
      "name": "redis",
      "plan": "v4.0-dev",
      "instancename": "test-redis"
    }
  ],

Logs available?

No response

Anything else?

[FEATURE REQUEST] Enable global default default for cluster region in Kyma setup

Which area is mainly impacted

Configuration

Requested Feature

When provisioning a Kyma runtime in SAP BTP two regions need to be specified:

  • Region of subaccount
  • Region of cluster

There is no defaulting possible as the relation between subaccount region and cluster region is not unique. Currently the cluster region must be specified in the use case file.
It would be good to have the definition available in the parameters file to keep information in one place for basic setups.

Use Case/Scenario

  • Provisioning of a Kyma cluster
  • Definition of cluster region

Would you like to support us?

  • Yes, I would like to support you

Anything else?

No response

[FEATURE REQUEST] Move "admins" from usecase to parameters file

Which area is mainly impacted

Configuration

Requested Feature

Currently the admins section is defined in the usecase configuration. This should be modified.

The usecase configuration should be rather independent from the actual user calling the use case. Therefore, it makes more sense to have the admins section inside the parameters.json file.

Use Case/Scenario

This request applies to all use cases.

Would you like to support us?

  • Yes, I would like to support you

Anything else?

I've already started do develop the change and will send a pull request soon.

[BUG] GH Actions - Deprecation of `set-output` and `save-state`

Is there an existing issue for this?

  • I have searched the existing issues

Are you using the latest docker image for BTPSA?

  • I'm using the latest docker image for BTPSA.

Which area is mainly impacted

Other

Current Behavior

According to https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ the set-output command will be deprecated lates in 2023.
The GH actions must be adjusted to the new functionality of GITHUB_STATE and GITHUB_OUTPUT environment files

Expected Behavior

Usage of GITHUB_STATE and GITHUB_OUTPUT environment files for intermediate output

Steps To Reproduce

Execute GitHub Action in this repo that build temporary containers

Logs and configuration files available?

n/a

Anything else?

No response

[FEATURE REQUEST] Enhancement of service testing

Which area is mainly impacted

CLI in general

Requested Feature

Currently the btpsa allows to create (and purge) service instances as well as service keys/bindings on the different environments of SAP BTP (cloudfoundry, kyma, others). This validates if the mechanics to provision a service on an environment works.
However, a more decent test of the service would be useful to not only create services, but also to make authenticated calls to the services leveraging the service keys/bindings.
Currently the workaround is to use the bash steps in the usecase file to implement the requirement.

The requested feature is to make this flow more convenient as an integral part of btpsa. For that the following enhancements are needed:

  • usecase: per service additional parameters are needed to identify which APIs to call (endpoints, way of authentication etc.
  • btpsa core: Enhancement of processing logic to execute the API calls after provisioning the services including logging of results per service call

Use Case/Scenario

The main use case is to test the services on BTP from a more holistic perspective i.e. not only creating services on different environments but also executing an authenticated call to an endpoint that is provided by the service.

Would you like to support us?

  • Yes, I would like to support you

Anything else?

Sample for the usecase enhancement:

{
    "api_resource_uri": [
        {
            "servicename": "auditlog",
            "plan": "standard",
            "testapi": "/",
            "apiBaseUrlPathKey": "data.url",
            "oauthurlPathkey": "",
            "clientId_basicUN_PathKey": "data.user",
            "clientSecret_basicPW_PathKey": "data.password",
            "authMethod": "basic",
            "APITest": "yes",
            "serviceID": "xyz"
        },
        {
            "servicename": "auditlog",
            "plan": "oauth2",
            "testapi": "/",
            "apiBaseUrlPathKey": "data.url",
            "oauthurlPathkey": "",
            "clientId_basicUN_PathKey": "data.user",
            "clientSecret_basicPW_PathKey": "data.password",
            "authMethod": "basic",
            "APITest": "yes",
            "serviceID": "xyz"
        },
        {
            "servicename": "enterprise-messaging",
            "plan": "default",
            "testapi": "/messagingrest/v1/subscriptions",
            "apiBaseUrlPathKey": "data.messaging.2.uri",
            "oauthurlPathkey": "data.uaa.url",
            "clientId_basicUN_PathKey": "data.uaa.clientid",
            "clientSecret_basicPW_PathKey": "data.uaa.clientsecret",
            "authMethod": "oauth",
            "APITest": "yes",
            "serviceID": "xyz"
        }
    ]
}

[FEATURE REQUEST] Change subdomain nameing

Which area is mainly impacted

Configuration

Requested Feature

Currently the subdomain of a subaccount is created by using the display name and adding the global account id as suffix. For our usecase this can lead to problems while creating the api rule in kyma as we use the subdomain as name of the api rule which is exceeding more than 63 characters.

Use Case/Scenario

https://github.com/SAP-samples/btp-setup-automator/tree/main/usecases/released/discoverycenter/3638-kyma-multitenant
https://github.com/SAP-samples/btp-setup-automator/tree/main/usecases/released/discoverycenter/3999-kyma-day2-operations
https://github.com/SAP-samples/btp-setup-automator/tree/main/usecases/released/discoverycenter/4000-kyma-identity-management

Would you like to support us?

  • Yes, I would like to support you

Anything else?

No response

[BUG] SSO not working

Is there an existing issue for this?

  • I have searched the existing issues

Are you using the latest docker image for BTPSA?

  • I'm using the latest docker image for BTPSA.

Which area is mainly impacted

Security

Current Behavior

I want to log on using SSO, but calling ./btpsa -loginmethod sso still asks me for a password

[2022-05-01 08:01:16] WARNING : YOU NEED TO PROVIDE YOUR BTP PASSWORD Please enter your BTP password (hit Enter when done):

Expected Behavior

Something similar to when using the CF or BTP CLI
Temporary Authentication Code ( Get one at https://login.cf.us10.hana.ondemand.c om/passcode ):

Steps To Reproduce

  1. In the latest docker environment
  2. Call ./btpsa -loginmethod sso

Logs and configuration files available?

No response

Anything else?

No response

[FEATURE REQUEST] Confusing looging when service creation/deletion is checked

Which area is mainly impacted

CLI in general

Requested Feature

As of now when creating/deleting a service instance the check if the action was successful logs the iterations without further context. For services that take a long time to be created/deleted this can lead to the impression to be in an endless loop.

The logging should be improved that this context information is available, and a filtering should be done in case of deletion that once a service instance is deleted, it is no longer checked and logged.

Use Case/Scenario

long-running creation and deletion of service instances.

Would you like to support us?

  • Yes, I would like to support you

Anything else?

This could be checked via the sap graph service (free tier) that takes longer to be created and deleted

[FEATURE REQUEST] Enable Subscription of own applications

Which area is mainly impacted

Configuration

Requested Feature

Currently it is only possible to subscribe to applications which are listed as entiltments in the global account. In cases where there is an own application deployed which can be subscribed from within that global account the usecase check that happens in the beginning will fail.
It would be good if the we could decide per serivce/application if that should be taken into account for the prerequisites check.

Use Case/Scenario

In our scenario we would like to subacribe to an application that has been deployed by a previous run of the setup automator. With that we can completely automate the setup of a multitenancy application including the creation of a consumer subaccount and the subscription to the application.

Would you like to support us?

  • Yes, I would like to support you

Anything else?

No response

[BUG] Entitlement setup sometimes uses wrong amount

Is there an existing issue for this?

  • I have searched the existing issues

Which area is mainly impacted

Cloud Foundry setups

Current Behavior

Regarding entitlements – it seems that if the automator falls back to using “amount”, it takes the wrong amount sometimes. See the below logs, I double checked, the amount for cloud logging is set to 1. Maybe it wrongfully takes the amount of the previous service?

[2022-04-07 10:36:32] WARNING : this entitlement wasn't sucesssfull. Trying to entitle with amount parameter instead.
[2022-04-07 10:36:32] INFO : Try again to assign entitlement for >auditlog< and plan >oauth2< with amount parameter set to 1.
[2022-04-07 10:36:32] RUN COMMAND: btp --format json assign accounts/entitlement --to-subaccount "2d2dfaf0-0227-4d7d-b89d-9fa262f3488d" --for-service "auditlog" --plan "oauth2" --auto-distribute-amount 2 --amount 2
[2022-04-07 10:36:34] INFO : Assign entitlement for >cloud-logging< and plan >standard<
[2022-04-07 10:36:34] RUN COMMAND: btp --format json assign accounts/entitlement --to-subaccount "2d2dfaf0-0227-4d7d-b89d-9fa262f3488d" --for-service "cloud-logging" --plan "standard" --distribute --enable
[2022-04-07 10:36:35] WARNING : this entitlement wasn't sucesssfull. Trying to entitle with amount parameter instead.
[2022-04-07 10:36:35] INFO : Try again to assign entitlement for >cloud-logging< and plan >standard< with amount parameter set to 1.
[2022-04-07 10:36:35] RUN COMMAND: btp --format json assign accounts/entitlement --to-subaccount "2d2dfaf0-0227-4d7d-b89d-9fa262f3488d" --for-service "cloud-logging" --plan "standard" --auto-distribute-amount 2 --amount 2

Expected Behavior

No response

Steps To Reproduce

No response

Logs available?

No response

Anything else?

No response

[BUG] Container Build fails on WSL - home directory not created?

Is there an existing issue for this?

  • I have searched the existing issues

Are you using the latest docker image for BTPSA?

  • I'm using the latest docker image for BTPSA.

Which area is mainly impacted

Docker Image (Build or Run)

Current Behavior

Executing the run script on WSL fails during container build with:

...

Step 52/71 : RUN cf install-plugin -f https://github.com/cloudfoundry-incubator/multiapps-cli-plugin/releases/latest/download/multiapps-plugin.linux32
---> Running in 69edce9a1520
mkdir /home/user/.config: permission denied
FAILED
The command '/bin/sh -c cf install-plugin -f https://github.com/cloudfoundry-incubator/multiapps-cli-plugin/releases/latest/download/multiapps-plugin.linux32' returned a non-zero code: 1
...

Expected Behavior

Build works fine.

Steps To Reproduce

On WSL2 on Windows, run the ./run script

Logs and configuration files available?

No response

Anything else?

I noticed that the dockerfile executes adduser with option --no-create-home, and also didn't find any other instruction that would create the home directory.

I removed the --no-create-home option and afterwards the run script worked fine, is there a reason to not create a home directory for the "user"-user?

Script fails creating CF on an existing Sub Account

Hi Rui

Was just having a test with this against my Trial BTP account. Ran it against an existing Sub Account (DEV) - this already has CF enabled.

Get this error

####################################################################################################

CREATE ENVIRONMENT >CLOUDFOUNDRY<

####################################################################################################
[2022-03-03 12:41:58] INFO: Check for available environment landscapes in subaccount >403a2e30-2cdb-48f4-b193-c4d3e6127e41< and region >us10<
[2022-03-03 12:41:58] RUN COMMAND: btp --format json list accounts/available-environment --subaccount "403a2e30-2cdb-48f4-b193-c4d3e6127e41"
[2022-03-03 12:42:03] INFO: Create cloudfoundry environment >cloudfoundry-dev-fbdd308c-4173-4be2-831a-565202a91915<
[2022-03-03 12:42:03] RUN COMMAND: btp --format json create accounts/environment-instance --subaccount "403a2e30-2cdb-48f4-b193-c4d3e6127e41" --environment cloudfoundry --service cloudfoundry --plan standard --parameters '{"instance_name": "cloudfoundry-dev-fbdd308c-4173-4be2-831a-565202a91915"}' --landscape "cf-us10"
[2022-03-03 12:42:08] ERROR:
[2022-03-03 12:42:08] ERROR: {
"error": "Environment instances limit for this type has exceeded [Error: 41001/409]"
}

FAILED

Should I not use it against existing Subaccounts? I tried to get it to create a new one from scratch but kept getting entitlement errors.

Thx!

[FEATURE REQUEST] Need to select which endpoint CF is deployed to

Which area is mainly impacted

Cloud Foundry setups

Requested Feature

BTP is running out of resources in the standard eu10 endpoint.

We are being told we can no longer create Cloud Foundry space in api.cf.eu10.hana.ondemand.com, and must select the API Endpoint: https://api.cf.eu10-004.hana.ondemand.com/ when setting up. How we can select an alternate endpoint in the automator that is possible when manually creating the CF space?

At this point, the automator is unhelpful, as 50% of the effort is still needing to be performed manually for creating the CF landscape, adding instances, subscriptions and org members.

This would be considered a high priority, and if needed, I can involve Sr. Leadership to assist in setting the level of urgency with this need.

Screen Shot 2022-10-20 at 7 00 27 AM

Use Case/Scenario

No response

Would you like to support us?

  • Yes, I would like to support you

Anything else?

No response

[BUG] Not able to add entitlement of cloudfoundry MEMORY Plan

Is there an existing issue for this?

  • I have searched the existing issues

There was a issue which looks similar(#28) but this is little different.

Are you using the latest docker image for BTPSA?

  • I'm using the latest docker image for BTPSA.

Which area is mainly impacted

Cloud Foundry setups

Current Behavior

Getting the below error when i tried to add the entitlement.

image

Expected Behavior

Able to add entitlement for cloudfoundry MEMORY plan
image

also able to set the number of MEMORY units to it
image

Steps To Reproduce

Please run this usecase file by adding your email id in admins
`
{
"aboutThisUseCase": {
"name": "Setup the account for riskmanagement scenario execution",
"description": "This will create subaccount and add required entitlement",
"author": "[email protected]",
"testStatus": "tested successfully",
"usageStatus": "READY TO BE USED",
"relatedLinks": [
"https://pages.github.tools.sap/CPES/CPAppDevelopment/"
]
},
"admins": ["YOUR_EMAIL_ID" ],
"services": [
{
"name": "cloudfoundry",
"plan": "standard",
"category": "ENVIRONMENT"
},
{
"name": "cloudfoundry",
"plan": "MEMORY",
"category": "SERVICE",
"entitleonly": true
}
],

"assignrolecollections": [
{
"name": "Global Account Administrator",
"type": "account",
"level": "global account",
"assignedUserGroupsFromParameterFile": [
"admins"
]
},
{
"name": "Subaccount Administrator",
"type": "account",
"level": "sub account",
"assignedUserGroupsFromParameterFile": [
"admins"
]
},
{
"name": "Subaccount Service Administrator",
"type": "account",
"level": "sub account",
"assignedUserGroupsFromParameterFile": [
"admins"
]
},
{
"name": "SpaceManager",
"type": "cloudfoundry",
"level": "space",
"assignedUserGroupsFromParameterFile": [
"admins",
"developers"
]
},
{
"name": "SpaceDeveloper",
"type": "cloudfoundry",
"level": "space",
"assignedUserGroupsFromParameterFile": [
"admins",
"developers"
]
},
{
"name": "SpaceAuditor",
"type": "cloudfoundry",
"level": "space",
"assignedUserGroupsFromParameterFile": [
"admins",
"developers"
]
},
{
"name": "OrgManager",
"type": "cloudfoundry",
"level": "org",
"assignedUserGroupsFromParameterFile": [
"admins",
"testers"
]
},
{
"name": "OrgAuditor",
"type": "cloudfoundry",
"level": "org",
"assignedUserGroupsFromParameterFile": [
"admins",
"auditors"
]
}
]
}
`

Logs and configuration files available?

parameters.json

{ "usecasefile": "usecases/inDevelopment/risk_management.json", "region": "eu12", "globalaccount": "GLOBAL_ID", "btpcliapihostregion":"sap", "myemail": "YOUR_EMAIL_ID", "loginmethod": "sso", "subaccountname": "rmexecution", "envvariables": { } }

usecase.json

`
{
"aboutThisUseCase": {
"name": "Setup the account for riskmanagement scenario execution",
"description": "This will create subaccount and add required entitlement",
"author": "[email protected]",
"testStatus": "tested successfully",
"usageStatus": "READY TO BE USED",
"relatedLinks": [
"https://pages.github.tools.sap/CPES/CPAppDevelopment/"
]
},
"admins": ["YOUR_EMAIL_ID" ],
"services": [
{
"name": "cloudfoundry",
"plan": "standard",
"category": "ENVIRONMENT"
},
{
"name": "cloudfoundry",
"plan": "MEMORY",
"category": "SERVICE",
"entitleonly": true
}
],

"assignrolecollections": [
{
"name": "Global Account Administrator",
"type": "account",
"level": "global account",
"assignedUserGroupsFromParameterFile": [
"admins"
]
},
{
"name": "Subaccount Administrator",
"type": "account",
"level": "sub account",
"assignedUserGroupsFromParameterFile": [
"admins"
]
},
{
"name": "Subaccount Service Administrator",
"type": "account",
"level": "sub account",
"assignedUserGroupsFromParameterFile": [
"admins"
]
},
{
"name": "SpaceManager",
"type": "cloudfoundry",
"level": "space",
"assignedUserGroupsFromParameterFile": [
"admins",
"developers"
]
},
{
"name": "SpaceDeveloper",
"type": "cloudfoundry",
"level": "space",
"assignedUserGroupsFromParameterFile": [
"admins",
"developers"
]
},
{
"name": "SpaceAuditor",
"type": "cloudfoundry",
"level": "space",
"assignedUserGroupsFromParameterFile": [
"admins",
"developers"
]
},
{
"name": "OrgManager",
"type": "cloudfoundry",
"level": "org",
"assignedUserGroupsFromParameterFile": [
"admins",
"testers"
]
},
{
"name": "OrgAuditor",
"type": "cloudfoundry",
"level": "org",
"assignedUserGroupsFromParameterFile": [
"admins",
"auditors"
]
}
]
}`

Anything else?

No response

[FEATURE REQUEST] Issues with new accounts registered under SAP Universal ID

Which area is mainly impacted

CLI in general

Requested Feature

New users registered for a SAP BTP trial account are registered using the SAP Universal ID which causes the execution of the btpsa script to fail authentication. The feature to be requested would be that the SAP Universal ID users are able to login when using the script to run the automation.

Use Case/Scenario

I have just created a new SAP BTP trial user in order to do some testing with the SAP BTP setup automator and this user has been created using the SAP Universal ID.

When running the SAP BTP automator the BTP account credentials are failing due to my user being linked to the SAP Universal ID. I have seen that this is due to the underlying CLI not supporting it in a background mode. An option exists that would prompt a web browser by specifying -sso manual but after trying that one on console it doesn't seem to work either.

I guess this is more of a CLI issue but if al new users on SAP BTP trial are going to be linked to the SAP Universal ID then this can be a blocker for the setup automator as the login process on the image and the btpsa script will fail to authenticate.

Would you like to support us?

  • Yes, I would like to support you

Anything else?

No response

[BUG] Parameters not read from parameters.json

Is there an existing issue for this?

  • I have searched the existing issues

Are you using the latest docker image for BTPSA?

  • I'm using the latest docker image for BTPSA.

Which area is mainly impacted

CLI in general

Current Behavior

Since the pull request #87 it seems parameters in Parameters.json is ignored. When I call ./btpsa with no parameters I get the error

####################################################################################################
# ERROR
####################################################################################################
Can't open json file >usecases/usecase.json<
####################################################################################################
# ERROR
####################################################################################################
Can't run the use case before the error(s) mentioned above are not fixed

It also for example ignores my change from loginmethod basicauthentication to sso

Expected Behavior

If no parameters are given I expected it to read from parameters.json

Steps To Reproduce

  1. Use the latest image, with PR #87 merged
  2. Make no updates to parameters.json
  3. run ./btpsa

Logs and configuration files available?

No response

Anything else?

I'm not good at scripts, but I will try to debug and see if I can find the issue

[BUG] For already existing cloudfoundry environment it tries to create new environment

Is there an existing issue for this?

  • I have searched the existing issues

Which area is mainly impacted

CLI in general

Current Behavior

Lets say i have created already certain setup GA/subaccount before, now i want to run the script to add functionality. It is not possible because at the beginning of script it keeps trying to create an environment instance with prepopulated name, the provided subdomain name is not being used as environment instance name.

76f1b"
[2022-03-24 16:03:15] INFO: Create cloudfoundry environment >cloudfoundry-c4uconsumerdevaws<
[2022-03-24 16:03:15] RUN COMMAND: btp --format json create accounts/environment-instance --subaccount "XXXX" --environment cloudfoundry --service cloudfoundry --plan standard --parameters '{"instance_name": "cloudfoundry-c4uconsumerdevaws"}' --landscape "cf-eu10"
[2022-03-24 16:03:17] ERROR:
[2022-03-24 16:03:17] ERROR: {
"error": "Environment instances limit for this type has exceeded [Error: 41001/409]"
}

FAILED

Expected Behavior

parameter file:
"subaccountname": "AWS [DEV]",
"subdomain": "c4uconsumerdevaws", <---

It should use exactly the name supplied in subdomain and not adding 'cloudfoundry-' prefix. it should check if it exists, dont create it.

Steps To Reproduce

No response

Logs available?

No response

Anything else?

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.