Skip to content

Latest commit

 

History

History
542 lines (327 loc) · 16.4 KB

File metadata and controls

542 lines (327 loc) · 16.4 KB

deploy

Deploying an application publishes it to SAP BTP. Use the optional parameters to make some specific configurations of the deployed application.

Remember:

SAP Business Technology Platform, Neo environment will sunset on December 31, 2028, subject to terms of customer or partner contracts.

For more information, see SAP Note 3351844.

Tip:

This documentation refers to SAP Business Technology Platform, Neo environment. If you are looking for documentation about other environments, see SAP Business Technology Platform ↗️.

neo deploy --host <host> --account <subaccount_technical_name> --application <application_name> 
--source <file_location> --user <e-mail_or_user>
  

To list all parameters available for this command, execute neo help deploy in the command line.

Required

-a, --account

Subaccount technical name

Type: string (up to 30 characters; lowercase letters and numbers, starting with a letter)

-b, --application

Application name

Type: string (up to 30 characters; lowercase letters and numbers, starting with a letter)

Note:

When the sum of the characters of the subaccount technical name and the application name exceeds 30, the default application URL is truncated. This means that parts of the subaccount name and the application name will be missing from the application URL:

Example:

Subaccount name: mycompanyextensionspoc

Application name: myappsimplesimplereq

Application URL: https://myappsimplemycompanyextensions.us1.hana.ondemand.com

-s, --source

A comma-separated list of file locations, pointing to WAR files, or folders containing them

Note:

The size of an application can be up to 1.5 GB. If the application is packaged as a WAR file, the size of the unzipped content is taken into account.

If you want to deploy more than one application on one and the same application process, put all WAR files in the same folder and execute the deployment with this source, or specify them as a comma-separated list.

Type: file location

-h, --host

Enter a region host.

Type: URL. For acceptable values, see Regions ↗️.

To deploy an application in more than one region, execute the deploy separately for each region host.

-p, --password

To protect your password, enter it only when prompted by the console client and not explicitly as a parameter in the properties file or the command line.

Type: string

-u, --user

Use your email, SAP ID, or username.

Type: string

Optional

Command-specific parameters

--connections

The number of connections used to deploy an application.

Use it to speed up deployment of application archives bigger than 5 MB in slow networks. Choose the optimal number of connections depending on the overall network speed to the cloud.

Default: 2

Acceptable values: 1-6

Type: integer

--delta

Deploys only the changes between the provided source and the deployed content. New content will be added; missing content will be deleted. Recommended for development use to speed up the deployment.

Acceptable values: None

--ev

Environment variables for configuring the environment in which the application runs.

Note:

For security reasons, do not specify any confidential information in plain text format, such as usernames and passwords. You can either encrypt such data, or store it in a secure manner. For more information, see Keystore Service.

Sets one environment variable by removing the previously set value; can be used multiple times in one execution.

Type: --ev <KEY1>=<VALUE1> --ev <KEY2>=<VALUE2> , where a key-value pair specifies one environment variable

If you provide a key without any value (--ev <KEY1>=), the –ev parameter is ignored.

For a value that contains spaces, use quotation marks.

-j, --java-version

Java/JRE major version number.

Default: see the default Java/JRE version for each runtime in Application Runtime Container.

Each runtime has its own set of supported Java/JRE versions. See Application Runtime Container.

Type: version number of Java/JRE.

For more information, see Choose JRE Version.

-m, ``

Minimum number of application processes, on which the application can be started

Default: 1

-M, --maximum-processes

Maximum number of application processes, on which the application can be started

Default: 1

-V, --vm-arguments

Java Virtual Machine arguments

System properties (-D<name>=<value>) separated with space that will be used when starting the application process.

Memory settings of your compute units. You can set the following memory parameters: -Xms, -Xmx, -XX:PermSize, -XX:MaxPermSize.

We recommend that you use the default memory settings. Change them only if necessary and note that this may impact the application performance or its ability to start.

For more information, see Configure VM Arguments.

-z, --size

Compute unit size

Acceptable values: lite, pro, prem, prem-plus

Default: the smallest size from the subaccount quotas

For more information, see Compute Units.

--runtime

Application runtime

Use the parameter if you want to choose an application runtime container different from the one coming with your SDK. To view all available runtime containers, use list-runtimes.

For more information, see Application Runtime Container.

If you specify --runtime, you also have to specify --runtime-version.

Note:

The deployment with a deprecated or unsupported runtime will fail with an error message.

--runtime-version

The runtime version on which the application will be started and will run on the same version after a restart. Otherwise, by default, the application is started on the latest minor version (of the same major version) which is backward compatible and includes the latest corrections (including security patches), enhancements, and updates. Note that choosing this option does not affect already started application processes.

You can view the recommended versions by executing the list-runtime-versions command.

This is a mapping between the runtime and the respective version:

Note:

If you choose your runtime version, consider its expiration date and plan updating to a new version regularly.

For more information, see Choose Application Runtime Version.

Tomcat connector attributes

--compression

Enable or disable gzip response compression

Default: off

Possible values: on (allow compression), off(disable compression), force (forces compression for all responses) or aninteger (which enables compression and specifies the compression-min-size value in bytes).

For more information, see Enable and Configure Gzip Response Compression

--compressible-mime-type

A comma separated list of MIME types for which compression is used

Default: text/html, text/xml, text/plain

Condition: applicable if compression is enabled

--compression-min-size

Responses bigger than this value get compressed

Condition: applicable if compression is enabled

--connection-timeout

Defines the number of milliseconds to wait for the request URI line to be presented after accepting a connection.

Default: 20000

Tip:

You can use this option to mitigate the threat of slow HTTP attacks by applying the appropriate timeout value for your network setup. See Protection from Web Attacks.

--max-threads

Specifies the maximum number of simultaneous requests that can be handled

Default: 200

--uri-encoding

Specifies the character encoding used to decode the URI bytes on application request

Default: ISO-8859-1

For more information, see the encoding sets supported by Java SE 6 and Java SE 7.

Here are examples of some additional configurations. If your application is already started, stop it and start it again for the changes to take effect.

You can deploy an application on a host different from the default one by specifying the host parameter. For example, to use the region (host) located in the United States, execute:

neo deploy --host us1.hana.ondemand.com --account mysubaccount --application myapp --source samples/deploy_war/example.war 
--user [email protected] 

Choose compute unit size

To specify the compute unit size on which you want the application to run, use the --size parameter with one of the following values:

  • lite - Lite Edition
  • pro - Professional edition
  • prem - Premium edition
  • prem-plus - Premium Plus edition

Available sizes depend on your subaccount type and what options you have purchased. For trial accounts, only the Lite edition is available.

For more information, see Compute Units.

For example, if you have an enterprise account and have purchased a package with Premium edition compute units, then you can run your application on a Premium compute unit size, by executing the following command:


neo deploy --size prem myapp.properties

Set the context root of an application

When deploying an application, name the WAR file with the desired context root.

For example, if you want to deploy your WAR in context root "/hello" then rename your WAR to hello.war.

If you want to deploy it in the "/" context root then rename your WAR to ROOT.war.

Note:

The context root is case-sensitive.

Specify character encoding

Using the–uri-encoding parameter, you can define the character encoding that will be used to decode the URI bytes on application request. For example, to use the UTF-8 encoding that can represent every character in the Unicode character set, execute


neo deploy --uri-encoding UTF-8 myapp.properties

Related Information

Console Client for the Neo Environment

Choose Application Runtime Version

Choose JRE Version

Configure VM Arguments

Enable and Configure Gzip Response Compression

Scale Applications

Update Application Properties

Deploying and Updating Java Applications

Use Delta Deployment

Org Administration Using the Cockpit ↗️

list-applications