copyright | lastupdated | ||
---|---|---|---|
|
2017-04-19 |
{:new_window: target="_blank"} {:shortdesc: .shortdesc} {:prereq: .prereq} {:download: .download} {:pre: .pre} {:app_name: data-hd-keyref="app_name"} {:app_key: data-hd-keyref="app_key"} {:app_secret: data-hd-keyref="app_secret"} {:app_url: data-hd-keyref="app_url"} {:host: data-hd-keyref="host"} {:org_name: data-hd-keyref="org_name"} {:route: data-hd-keyref="route"} {:space_name: data-hd-keyref="space_name"} {:service_name: data-hd-keyref="service_name"} {:service_instance_name: data-hd-keyref="service_instance_name"} {:user_ID: data-hd-keyref="user_ID"}
Use {{site.data.keyword.Bluemix_notm}} command line interface to download, modify, and redeploy your Cloud Foundry applications and service instances. {:shortdesc}
Before you begin, download and install the {{site.data.keyword.Bluemix_notm}} command line interface.
Restriction: The command line tool is not 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" title="(Opens in a new tab or window)"><img class="image" src="images/btn_starter-code.svg" alt="Download application code" /> </a>
- Change to the directory where your code is located.
cd your_new_directory
- Make changes to your app code as you see fit. For example, if you are using a {{site.data.keyword.Bluemix}} 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 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. You can [read more about the manifest file](https://docs.cloudfoundry.org/devguide/deploy-apps/manifest.html){: new_window} in the Cloud Foundry documentation.
Also pay attention to the `README.md` file, which contains details such as build instructions if applicable.
Note: If your application is a Liberty app, you must build it before redeploying.
- Connect and log in to {{site.data.keyword.Bluemix_notm}}.
bluemix api https://api.DomainName
bluemix login -u username -o org_name -s space_name
If you are using a federated ID, use the -sso
option.
bluemix login -o org_name -s space_name -sso
- From your_new_directory, redeploy your app to {{site.data.keyword.Bluemix_notm}} by using the
bluemix app push
command. For more information about thebx app push
command, see Uploading your application.
bluemix app push app_name
- Access your app by browsing to https://app_url.AppDomainName.