<commit_before>---
title: Deploying Cloud Foundry on OpenStack using BOSH
---

This topic describes the process for deploying Cloud Foundry to an OpenStack
environment using BOSH.

<p class="note"><strong>Note</strong>: Run all the commands in this topic from the <code>~/deployments</code> directory that you created in the <a href="../../bosh/deploy-microbosh-to-openstack.html">Deploying MicroBOSH on OpenStack</a> topic.</p>

##<a id="prerequisites"></a>Prerequisites ##

To deploy Cloud Foundry to OpenStack, you must first complete the following steps:

* Install the [BOSH Command Line Interface (CLI)](../../bosh/bosh-cli.html).
* Confirm that your OpenStack instance includes three flavors that correspond with the OpenStack default flavor names `m1.small`, `m1.medium`, and `m1.large` and have the following listed specifications, at minimum:
    <table class="nice">
      <tr>
	    <th>OpenStack Flavor Name</th>
	    <th>CPU</th>
	    <th>Disk (GB)</th>
	    <th>RAM (GB)</th>
      </tr>
      <tr>
	    <td>m1.small</td>
	    <td>1</td>
	    <td>30</td>
	    <td>2</td>
	  </tr>
	  <tr>
        <td>m1.medium</td>
        <td>2</td>
        <td>50</td>
        <td>4</td>
      </tr>
      <tr>
        <td>m1.large</td>
	    <td>4</td>
	    <td>90</td>
	    <td>8</td>
	  </tr>
    </table>

* [Validate your OpenStack Instance](validate_openstack.html).
* Provision an IP address and set your DNS to map `*` records to this IP
	address.
	For example, if you use `mycloud.com` domain as the base domain for
	your Cloud Foundry deployment, set a `*` A record for this zone mapping to
	the IP address that you provision.
* Create an OpenStack security group named `cf`.
	Configure the `cf` security group as follows:
	* Open all ports of the VMs in the `cf` security group to all other VMs in
		the `cf` security group. This allows the VMs in the `cf` security group
		to communicate with each other.
    * Open port 22 for administrator SSH access.
	* Open port 80 for HTTP traffic.

##<a id="target"></a>Target the BOSH Director ##

Use the `bosh target` command with the IP address of the BOSH Director to
connect to the BOSH Director.
Log in with the default user name and password, `admin` and `admin`, or use the
user name and password that you set when you installed BOSH.

<pre class="terminal">
$ bosh target https://192.168.109.81:25555
Target set to `bosh'
Your username: admin
Enter password: *****
Logged in as 'admin'
</pre>

##<a id="uuid"></a>Record the BOSH Director UUID ##

Use the `bosh status` command to view information about your BOSH deployment.
Record the UUID of the BOSH Director. You use the UUID when [Customizing the Cloud Foundry Deployment Manifest Stub for OpenStack](../cf-stub-openstack.html).

<pre class="terminal">
$ bosh status
Config
             /home/me/.bosh_config

Director
  Name       bosh_openstack
  URL        https://192.168.109.81:25555
  Version    1.2710.0 (00000000)
  User       admin
  UUID       abcdef12-3456-7890-abcd-ef1234567890
  CPI        openstack
  dns        enabled (domain_name: bosh)
  compiled_package_cache disabled
  snapshots  disabled

Deployment
  not set
</pre>

##<a id="stemcell"></a>Upload a Stemcell ##

1. Use the `bosh public stemcells` command to view a list of available public
stemcells.

    <pre class="terminal">
    $ bosh public stemcells
    +-------------------------------------------------------------+
    | Name                                                        |
    +-------------------------------------------------------------+
	| bosh-stemcell-2754-openstack-kvm-ubuntu-trusty-go_agent.tgz |
	| bosh-stemcell-2710-vsphere-esxi-ubuntu-lucid-go_agent.tgz   |
	| bosh-stemcell-2751-aws-xen-centos-go_agent.tgz              |
	| bosh-stemcell-2710-vcloud-esxi-ubuntu-lucid-go_agent.tgz    |
    +-------------------------------------------------------------+
    To download use `bosh download public stemcell &lt;stemcell_name&gt;'. For full url use --full.
    </pre>

1. Use the `bosh download public stemcell` command to download the latest
stemcell for `openstack` with `ubuntu`.

    <pre class="terminal">
    $ bosh download public stemcell bosh-stemcell-2754-openstack-kvm-ubuntu-trusty-go_agent.tgz
    </pre>

1. Use the `bosh upload stemcell` command to upload the stemcell to the BOSH
Director.

    <pre class="terminal">
    $ bosh upload stemcell ./bosh-stemcell-2754-openstack-kvm-ubuntu-trusty-go_agent.tgz
    </pre>

##<a id="create-stub"></a>Create a Deployment Manifest Stub ##

Create a manifest stub file named `cf-stub.yml`. [Customize the manifest stub](../cf-stub-openstack.html) for your environment.

##<a id="deploy-cf"></a>Deploy Cloud Foundry ##
<commit_msg>update install_cf_openstack with new stemcell instructions<commit_after>---
title: Deploying Cloud Foundry on OpenStack using BOSH
---

This topic describes the process for deploying Cloud Foundry to an OpenStack
environment using BOSH.

<p class="note"><strong>Note</strong>: Run all the commands in this topic from the <code>~/deployments</code> directory that you created in the <a href="../../bosh/deploy-microbosh-to-openstack.html">Deploying MicroBOSH on OpenStack</a> topic.</p>

##<a id="prerequisites"></a>Prerequisites ##

To deploy Cloud Foundry to OpenStack, you must first complete the following steps:

* Install the [BOSH Command Line Interface (CLI)](../../bosh/bosh-cli.html).
* Confirm that your OpenStack instance includes three flavors that correspond with the OpenStack default flavor names `m1.small`, `m1.medium`, and `m1.large` and have the following listed specifications, at minimum:
    <table class="nice">
      <tr>
	    <th>OpenStack Flavor Name</th>
	    <th>CPU</th>
	    <th>Disk (GB)</th>
	    <th>RAM (GB)</th>
      </tr>
      <tr>
	    <td>m1.small</td>
	    <td>1</td>
	    <td>30</td>
	    <td>2</td>
	  </tr>
	  <tr>
        <td>m1.medium</td>
        <td>2</td>
        <td>50</td>
        <td>4</td>
      </tr>
      <tr>
        <td>m1.large</td>
	    <td>4</td>
	    <td>90</td>
	    <td>8</td>
	  </tr>
    </table>

* [Validate your OpenStack Instance](validate_openstack.html).
* Provision an IP address and set your DNS to map `*` records to this IP
	address.
	For example, if you use `mycloud.com` domain as the base domain for
	your Cloud Foundry deployment, set a `*` A record for this zone mapping to
	the IP address that you provision.
* Create an OpenStack security group named `cf`.
	Configure the `cf` security group as follows:
	* Open all ports of the VMs in the `cf` security group to all other VMs in
		the `cf` security group. This allows the VMs in the `cf` security group
		to communicate with each other.
    * Open port 22 for administrator SSH access.
	* Open port 80 for HTTP traffic.

##<a id="target"></a>Target the BOSH Director ##

Use the `bosh target` command with the IP address of the BOSH Director to
connect to the BOSH Director.
Log in with the default user name and password, `admin` and `<PASSWORD>`, or use the
user name and password that you set when you installed BOSH.

<pre class="terminal">
$ bosh target https://192.168.109.81:25555
Target set to `bosh'
Your username: admin
Enter password: *****
Logged in as 'admin'
</pre>

##<a id="uuid"></a>Record the BOSH Director UUID ##

Use the `bosh status` command to view information about your BOSH deployment.
Record the UUID of the BOSH Director. You use the UUID when [Customizing the Cloud Foundry Deployment Manifest Stub for OpenStack](../cf-stub-openstack.html).

<pre class="terminal">
$ bosh status
Config
             /home/me/.bosh_config

Director
  Name       bosh_openstack
  URL        https://192.168.109.81:25555
  Version    1.2710.0 (00000000)
  User       admin
  UUID       abcdef12-3456-7890-abcd-ef1234567890
  CPI        openstack
  dns        enabled (domain_name: bosh)
  compiled_package_cache disabled
  snapshots  disabled

Deployment
  not set
</pre>

##<a id="stemcell"></a>Upload a Stemcell ##

1. Open [https://bosh.io/stemcells](https://bosh.io/stemcells) in a web browser
to view a list of publicly available BOSH stemcells.
The list displays the most recent builds of BOSH stemcell organized by operating system, target IaaS, and hypervisor.

1. Download a BOSH stemcell for OpenStack by clicking on its version number.

1. In a terminal window, use the `bosh upload stemcell` command to upload the
stemcell to the BOSH Director.

    <pre class="terminal">
    $ bosh upload stemcell ./bosh-stemcell-2754-openstack-kvm-ubuntu-trusty-go_agent.tgz
    </pre>

##<a id="create-stub"></a>Create a Deployment Manifest Stub ##

Create a manifest stub file named `cf-stub.yml`.
[Customize the manifest stub](../cf-stub-openstack.html) for your environment.

##<a id="deploy-cf"></a>Deploy Cloud Foundry ##

{'fraction_non_alphanumeric': 0.13392552101127433, 'fraction_numerical': 0.023915271609156134, 'mean_word_length': 2.9737556561085974, 'pattern_counts': {'":': 0, '<': 144, '<?xml version=': 0, '>': 144, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7376439', 'n_tokens_mistral': 2997, 'n_tokens_neox': 2764, 'n_words': 980}