copyright | lastupdated | ||
---|---|---|---|
|
2018-11-29 |
{:new_window: target="_blank"} {:shortdesc: .shortdesc} {:screen: .screen} {:codeblock: .codeblock} {:pre: .pre} {:tip: .tip} {:note: .note}
{: #deploy}
You can deploy your apps with a toolchain or a command line interface. A toolchain is a set of tool integrations. The command line interface is a simple way to deploy your apps and service instances. {: shortdesc}
{: #toolchains_getting_started}
Open toolchains are available in the Public and Dedicated environments on {{site.data.keyword.Bluemix}}. You can create a toolchain in two ways: use a template to create a toolchain or create a toolchain from an app. To learn more about toolchains, see Creating toolchains.
With a properly configured toolchain, deploying your app is trivial: a build-deploy cycle will automatically start with each merge to the Master branch in your repo.
{: #cli}
IBM Cloud provides a robust CLI as well as plug-ins and developer tool extensions that integrate with the CLI.
Use {{site.data.keyword.Bluemix_notm}} command line interface to deploy your apps and service instances. {:shortdesc}
Before you begin, download and install the {{site.data.keyword.Bluemix_notm}} command line interface.
Restriction: The command line tool isn’t supported by Cygwin. Use the tool in a command line window other than the Cygwin command line window. {:prereq}
After you install the command line interface, you can get started:
- {: download} Download the code for your app to a new directory to set up your development environment.
<a class="xref" href="http://bluemix.net" target="_blank" img class=“image” src=“images/btn_starter-code.svg” alt=“Download application code” title="(Opens in a new tab or window)"></a>
- Change to the directory where your code is located.
cd your_new_directory
- Make changes to your app code. For example, if you're using a {{site.data.keyword.Bluemix_notm}} sample application and your app contains the
src/main/webapp/index.html
file, you can modify it and edit "Thanks for creating ..." to say something new. Ensure that the app runs locally before you deploy it back to {{site.data.keyword.Bluemix_notm}}.
Take note of the `manifest.yml` file. When deploying your app back to {{site.data.keyword.Bluemix_notm}}, this file is used to determine your application’s URL, memory allocation, number of instances, and other crucial parameters.
Also pay attention to the `README.md` file, which contains details such as build instructions if applicable.
If your application is a Liberty app, you must build it before redeploying. {: note}
- Connect and log in to {{site.data.keyword.Bluemix_notm}}.
ibmcloud api https://api.DomainName
ibmcloud login -u username -o org_name -s space_name
If you use a federated ID, add the -sso
option.
ibmcloud login -o org_name -s space_name -sso
If the value contains a space, you must add single or double quotation marks around username
, org_name
, and space_name
, for example, -o "my org"
.
{: note}
- From your_new_directory, redeploy your app to {{site.data.keyword.Bluemix_notm}} by using the
ibmcloud dev deploy
command. For more information, see the CLI documentation.
ibmcloud dev deploy app_name
- Access your app by browsing to https://app_url.AppDomainName.