Skip to content

abapEnvironmentCreateSystem

Creates a SAP BTP ABAP Environment system (aka Steampunk system)

Description

This step creates a SAP BTP ABAP Environment system (aka Steampunk system) via the cloud foundry command line interface (cf CLI). This can be done by providing a service manifest as a configuration file (parameter serviceManifest) or by passing the configuration values directly via the other parameters of this step.

Usage

We recommend to define values of step parameters via .pipeline/config.yml file.
In this case, calling the step is essentially reduced to defining the step name.
Calling the step can be done either in an orchestrator specific way (e.g. via a Jenkins library step) or on the command line.

library('piper-lib-os')

abapEnvironmentCreateSystem script: this
piper abapEnvironmentCreateSystem

Prerequisites

  • On SAP Business Technology Platform (SAP BTP), Cloud Foundry needs to be enabled on subaccount level. This can be done on the Subaccount Overview page. The subaccount is then mapped to a “Cloud Foundry Organization”, for which you must provide a suitable name during the creation. Have a look at the documentation for more details.
  • A (technical) user is required to access the SAP BTP via the cf CLI. The user needs to be a member of the global account and has to have the Space Developer role. The user and password need to be stored in the Jenkins Credentials Store.
  • Please make sure, that there are enough entitlements in the subaccount for the Service Plan, which you want to use for this step.

Parameters

Overview - Step

Name Mandatory Additional information
cfOrg yes
cfSpace yes
password (yes) Vault Secret pass via ENV, Vault or Jenkins credentials (cfCredentialsId)
script (yes) Jenkins only reference to Jenkins main pipeline script
username (yes) Vault Secret pass via ENV, Vault or Jenkins credentials (cfCredentialsId)
abapSystemAdminEmail no
abapSystemDescription no
abapSystemID no
abapSystemIsDevelopmentAllowed no
abapSystemSizeOfPersistence no
abapSystemSizeOfRuntime no
addonDescriptorFileName no
cfApiEndpoint no
cfService no
cfServiceInstance no
cfServicePlan no
includeAddon no
serviceManifest no
verbose no activates debug output

Overview - Execution Environment

Orchestrator-specific only

These parameters are relevant for orchestrator usage and not considered when using the command line option.

Name Mandatory Additional information
containerCommand no Jenkins only
containerShell no Jenkins only
dockerEnvVars no
dockerImage no
dockerName no
dockerOptions no
dockerPullImage no
dockerVolumeBind no Jenkins only
dockerWorkspace no Jenkins only

Details

abapSystemAdminEmail

Admin E-Mail address for the initial administrator of the system

back to overview

Scope Details
Aliases -
Type string
Mandatory no
Default $PIPER_abapSystemAdminEmail (if set)
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

abapSystemDescription

Description for the ABAP Environment system

back to overview

Scope Details
Aliases -
Type string
Mandatory no
Default Test system created by an automated pipeline
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

abapSystemID

The three character name of the system - maps to 'sapSystemName'

back to overview

Scope Details
Aliases -
Type string
Mandatory no
Default H02
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

abapSystemIsDevelopmentAllowed

This parameter determines, if development is allowed on the system

back to overview

Scope Details
Aliases -
Type bool
Mandatory no
Default true
Possible values - true
- false
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

abapSystemSizeOfPersistence

The size of the persistence

back to overview

Scope Details
Aliases -
Type int
Mandatory no
Default 0
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

abapSystemSizeOfRuntime

The size of the runtime

back to overview

Scope Details
Aliases -
Type int
Mandatory no
Default 0
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

addonDescriptorFileName

The file name of the addonDescriptor

back to overview

Scope Details
Aliases -
Type string
Mandatory no
Default $PIPER_addonDescriptorFileName (if set)
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

cfApiEndpoint

Cloud Foundry API endpoint

back to overview

Scope Details
Aliases cloudFoundry/apiEndpoint
Type string
Mandatory no
Default https://api.cf.eu10.hana.ondemand.com
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

cfOrg

Cloud Foundry org

back to overview

Scope Details
Aliases cloudFoundry/org
Type string
Mandatory yes
Default $PIPER_cfOrg (if set)
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

cfService

Parameter for Cloud Foundry Service to be used for creating Cloud Foundry Service

back to overview

Scope Details
Aliases cloudFoundry/service
Type string
Mandatory no
Default $PIPER_cfService (if set)
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

cfServiceInstance

Parameter for naming the Service Instance when creating a Cloud Foundry Service

back to overview

Scope Details
Aliases cloudFoundry/serviceInstance
Type string
Mandatory no
Default $PIPER_cfServiceInstance (if set)
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

cfServicePlan

Parameter for Cloud Foundry Service Plan to be used when creating a Cloud Foundry Service

back to overview

Scope Details
Aliases cloudFoundry/servicePlan
Type string
Mandatory no
Default $PIPER_cfServicePlan (if set)
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

cfSpace

Cloud Foundry Space

back to overview

Scope Details
Aliases cloudFoundry/space
Type string
Mandatory yes
Default $PIPER_cfSpace (if set)
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

containerCommand

Jenkins-specific: Used for proper environment setup.

Kubernetes only: Allows to specify start command for container created with dockerImage parameter to overwrite Piper default (/usr/bin/tail -f /dev/null).

back to overview

Scope Details
Aliases -
Type string
Mandatory no
Default
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

containerShell

Jenkins-specific: Used for proper environment setup.

Allows to specify the shell to be executed for container with containerName.

back to overview

Scope Details
Aliases -
Type string
Mandatory no
Default
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

dockerEnvVars

Jenkins-specific: Used for proper environment setup.

Environment variables to set in the container, e.g. [http_proxy: "proxy:8080"].

back to overview

Scope Details
Aliases -
Type map[string]string
Mandatory no
Default
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

dockerImage

Jenkins-specific: Used for proper environment setup.

Name of the docker image that should be used. If empty, Docker is not used and the command is executed directly on the Jenkins system.

back to overview

Scope Details
Aliases -
Type string
Mandatory no
Default ppiper/cf-cli:v12
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

dockerName

Jenkins-specific: Used for proper environment setup.

Kubernetes only: Name of the container launching dockerImage. SideCar only: Name of the container in local network.

back to overview

Scope Details
Aliases -
Type string
Mandatory no
Default cf
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

dockerOptions

Jenkins-specific: Used for proper environment setup.

Docker options to be set when starting the container.

back to overview

Scope Details
Aliases -
Type []string
Mandatory no
Default
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

dockerPullImage

Jenkins-specific: Used for proper environment setup.

Set this to 'false' to bypass a docker image pull. Useful during development process. Allows testing of images which are available in the local registry only.

back to overview

Scope Details
Aliases -
Type bool
Mandatory no
Default true
Possible values - true
- false
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

dockerVolumeBind

Jenkins-specific: Used for proper environment setup.

Volumes that should be mounted into the docker container.

back to overview

Scope Details
Aliases -
Type map[string]string
Mandatory no
Default
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

dockerWorkspace

Jenkins-specific: Used for proper environment setup.

Kubernetes only: Specifies a dedicated user home directory for the container which will be passed as value for environment variable HOME.

back to overview

Scope Details
Aliases -
Type string
Mandatory no
Default
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

includeAddon

Must be set to true to install the addon provided via 'addonDescriptorFileName'

back to overview

Scope Details
Aliases -
Type bool
Mandatory no
Default false
Possible values - true
- false
Secret no
Configuration scope
  • ☒ parameter
  • ☐ general
  • ☐ steps
  • ☒ stages
Resource references none

password

Password for Cloud Foundry User

back to overview

Scope Details
Aliases -
Type string
Mandatory yes
Default $PIPER_password (if set)
Secret yes
Configuration scope
  • ☒ parameter
  • ☐ general
  • ☒ steps
  • ☒ stages
Resource references Jenkins credential id:
  id: cfCredentialsId
  reference to: password

Vault paths:
  • $(vaultPath)/cloudfoundry-$(org)-$(space)
  • $(vaultBasePath)/$(vaultPipelineName)/cloudfoundry-$(org)-$(space)
  • $(vaultBasePath)/GROUP-SECRETS/cloudfoundry-$(org)-$(space)

script

Jenkins-specific: Used for proper environment setup.

The common script environment of the Jenkinsfile running. Typically the reference to the script calling the pipeline step is provided with the this parameter, as in script: this. This allows the function to access the commonPipelineEnvironment for retrieving, e.g. configuration parameters.

back to overview

Scope Details
Aliases -
Type Jenkins Script
Mandatory yes
Default
Secret no
Configuration scope
  • ☐ parameter
  • ☐ general
  • ☐ steps
  • ☐ stages
Resource references none

serviceManifest

Path to Cloud Foundry Service Manifest in YAML format for multiple service creations that are being passed to a Create-Service-Push Cloud Foundry cli plugin

back to overview

Scope Details
Aliases - cloudFoundry/serviceManifest
- cfServiceManifest
Type string
Mandatory no
Default $PIPER_serviceManifest (if set)
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

username

User or E-Mail for CF

back to overview

Scope Details
Aliases -
Type string
Mandatory yes
Default $PIPER_username (if set)
Secret yes
Configuration scope
  • ☒ parameter
  • ☐ general
  • ☒ steps
  • ☒ stages
Resource references Jenkins credential id:
  id: cfCredentialsId
  reference to: username

Vault paths:
  • $(vaultPath)/cloudfoundry-$(org)-$(space)
  • $(vaultBasePath)/$(vaultPipelineName)/cloudfoundry-$(org)-$(space)
  • $(vaultBasePath)/GROUP-SECRETS/cloudfoundry-$(org)-$(space)

verbose

verbose output

back to overview

Scope Details
Aliases -
Type bool
Mandatory no
Default false
Possible values - true
- false
Secret no
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages
Resource references none

cfCredentialsId

Jenkins-specific: Used for proper environment setup. See using credentials for details.

Jenkins 'Username with password' credentials ID containing user and password to authenticate to the Cloud Foundry API.

back to overview

Scope Details
Aliases cloudFoundry/credentialsId
Type string
Configuration scope
  • ☒ parameter
  • ☒ general
  • ☒ steps
  • ☒ stages

Example: Configuration in the config.yml

The recommended way to configure your pipeline is via the config.yml file. In this case, calling the step in the Jenkinsfile is reduced to one line:

abapEnvironmentCreateSystem script: this

The configuration values for the system can be passed through the config.yml file:

steps:
  abapEnvironmentCreateSystem:
    cfCredentialsId: 'cfCredentialsId'
    cfApiEndpoint: 'https://test.server.com'
    cfOrg: 'cfOrg'
    cfSpace: 'cfSpace'
    cfServiceInstance: 'H02_Q_system'
    cfService: 'abap'
    cfServicePlan: 'standard'
    abapSystemAdminEmail: 'user@example.com'
    abapSystemDescription: 'ABAP Environment Q System'
    abapSystemIsDevelopmentAllowed: true
    abapSystemID: 'H02'
    abapSystemSizeOfPersistence: 4
    abapSystemSizeOfRuntime: 1

Example: Configuration in the Jenkinsfile

The step, including all parameters, can also be called directly from the Jenkinsfile. In the following example, a configuration file is used.

abapEnvironmentCreateSystem (
  script: this,
  cfCredentialsId: 'cfCredentialsId',
  cfApiEndpoint: 'https://test.server.com',
  cfOrg: 'cfOrg',
  cfSpace: 'cfSpace',
  cfServiceManifest: 'manifest.yml'
)

The file manifest.yml would look like this:

---
create-services:
- name:   "H02_Q_system"
  broker: "abap"
  plan:   "standard"
  parameters: "{ \"admin_email\" : \"user@example.com\", \"description\" : \"ABAP Environment Q System\", \"is_development_allowed\" : true, \"sapsystemname\" : \"H02\", \"size_of_persistence\" : 4, \"size_of_runtime\" : 1 }"