anchor.diff:  ns4-**.azure-dns.info.
   ```
   
  -From your domain registrar, delegate DNS authority for your hosted zone to the
  -four Azure name servers. To do this, change the default nameservers provided by your domain registrar to Azure name servers listed in Azure DNS Zone.
  -
  -After a few minutes, your system domain should resolve to your Azure application gateway.
  +From your domain registrar, delegate DNS authority for your hosted zone to the four Azure name servers. To do this, change the default nameservers provided by your domain registrar to Azure name servers listed in Azure DNS Zone.
  +
  +After a few minutes, your system domain should resolve to your Azure app gateway.
  +
   
   ## <a id="connect-bosh-director"></a> Step 5: Connect to the BOSH Director
   
  -Run the following to connect to the BOSH Director:
  -
  -<pre class="terminal">
  -$ eval "$(bbl print-env)"
  -</pre>
  -
  -## <a id="destroy-environment"></a> Destroy the BOSH Resources ##
  -
  -You can use <code>bbl destroy</code> to delete the BOSH Director infrastructure in your Azure environment.
  -Use this command if `bbl up` does not complete successfully and you want to reset your environment, or if you want to destroy the resources created by bosh-bootloader for any other reason.
  -
  -* Run the following commands to delete only the load balancers:
  -    <pre class="terminal">
  -    $ bbl plan
  -    $ bbl up
  -    </pre>
  -
  -* Run the following commands to delete the infrastructure, BOSH Director, and load balancers:
  -    <pre class="terminal">
  -    $ bbl destroy
  -    </pre>
  +To connect to the BOSH Director:
  +
  +1. Run:
  +
  +    ```
  +    eval "$(bbl print-env)"
  +    ```
  +
  +
  +## <a id="destroy-environment"></a> Destroy the BOSH Resources
  +
  +You can run `bbl destroy` to delete the BOSH Director infrastructure in your Azure environment. Use this command if `bbl up` does not complete successfully and you want to reset your environment, or if you want to destroy the resources created by bosh-bootloader for any other reason.
  +
  +* To delete only the load balancers, run:
  +    
  +    ```
  +    bbl plan
  +    bbl up
  +    ```
  +
  +* To delete the infrastructure, BOSH Director, and load balancers, run:
  +    
  +    ```
  +    bbl destroy
  +    ```
  
positive.code: owner: Release Integration
  ---
  
  
  <html class="list-style-none"></html>
  
  This topic describes how to use the [bosh-bootloader](https://github.com/cloudfoundry/bosh-bootloader)
  command-line tool to set up an environment for Cloud Foundry on Azure and deploy a [BOSH Director](https://bosh.io/docs/bosh-components.html#director).
  
  ## <a id='overview'></a>Overview
  
  After completing this topic, you will have the following:
  
  1. A BOSH Director instance
  
  1. A set of randomly generated BOSH Director credentials
  
  1. A generated key pair that allows you to SSH into the BOSH Director and any instances that BOSH deploys
  
  1. A copy of the manifest used to deploy the BOSH Director
      <p class="note"><strong>Note</strong>: A <a href="https://bosh.io/docs/deployment-manifest.html">manifest</a> is a YAML file that defines the components and properties of a BOSH deployment.</p>
  
  1. A basic cloud config 
      <p class="note"><strong>Note</strong>: A <a href="https://bosh.io/docs/cloud-config.html">cloud config</a> is a YAML file that defines IaaS-specific configuration for BOSH.</p>
  
  1. An application gateway
      <p class="note"><strong>Note</strong>: bosh-bootloader creates the application gateway, but you must still configure DNS to point your domains to the application gateway. See the <a href="../common/dns_prereqs.html">Setting Up DNS for Your Environment</a> topic for more information.</p>
  
  ## <a id='downloads'></a> Step 1: Download Dependencies
  
  Perform the following steps to download the required dependencies for bosh-bootloader:
  
  1. Download [Terraform](https://www.terraform.io/downloads.html) v0.9.1 or later. Unzip the file and move it to somewhere in your PATH:
      <pre class="terminal">
      $ tar xvf ~/Downloads/terraform*
      $ sudo mv ~/Downloads/terraform /usr/local/bin/terraform
      </pre>
  
  1. Download the [BOSH CLI v2](https://bosh.io/docs/cli-v2.html#install). Make the binary executable and move it to somewhere in your PATH:
      <pre class="terminal">
      $ chmod +x ~/Downloads/bosh-cli-*
      $ sudo mv ~/Downloads/bosh-cli-* /usr/local/bin/bosh
      </pre>
  
  1. Perform one of the following procedures to download and install bosh-bootloader:
      * On Mac OS X, use Homebrew:
          <pre class="terminal">$ brew install cloudfoundry/tap/bbl</pre>
      * Download the latest bosh-bootloader from [GitHub](https://github.com/cloudfoundry/bosh-bootloader/releases/latest). Make the binary executable and move it to somewhere in your PATH:
          <pre class="terminal">
          $ chmod +x ~/Downloads/bbl-*
          $ sudo mv ~/Downloads/bbl-* /usr/local/bin/bbl
          </pre>
  
  1. Download and install the [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest). 
  
  ## <a id='create-service-principal'></a> Step 2: Create a Service Principal
  
  Perform the following steps to create the service principal that bosh-bootloader needs to interact with Azure:
  
  1. If you installed the Azure CLI for the first time, enter `az login` on the command line and follow the instructions to log in:
      <pre class="terminal">
      $ az login
      To sign in, use a web browser to open the page
      http<span>s:</span>//microsoft.com/devicelogin and enter the code YOURCODE to authenticate.
      </pre>
  
  1. Enter `az account list` to list subscriptions.
      <pre class="terminal">
      $ az account list
      </pre>
  
  1. From the list of your subscriptions, run `az account set --subscription SUBSCRIPTION-ID-OR-SUBSCRIPTION-NAME` to select a preferred subscription.
      <pre class="terminal">
      $ az account set --subscription SUBSCRIPTION-ID-OR-SUBSCRIPTION-NAME
      </pre>
  
  1. Enter `az ad sp create-for-rbac` to create the service principal for bosh-bootloader with the Azure CLI.
      <pre class="terminal">
      $ az ad sp create-for-rbac
      </pre>
  
  1. You will receive a JSON format object:
      <pre class="terminal">
      {
        "appId": "YOUR-CLIENT-ID",
        "displayName": "YOUR-SERVICE-PRINCIPAL-DISPLAY-NAME",
  
negative.code:       --lb-cert YOUR-CERTIFICATE.crt \
        --lb-key YOUR-KEY.key \
        --lb-domain YOUR-SYSTEM-DOMAIN<br/>
      bbl up
      ```
      Where:
      * `YOUR-SUBSCRIPTION-ID` is the subscription ID you selected in the previous section.
      * `YOUR-TENANT-ID` is the **tenant** field of your service principal credential.
      * `YOUR-CLIENT-ID` is the **appID** field of your service principal credential.
      * `YOUR-CLIENT-SECRET` is the **password** field of your service principal credential.
      * `YOUR-AZURE-REGION` is the region where your resource is to be created, such as `eastus`. For more information, see [Azure Regions](https://azure.microsoft.com/en-us/global-infrastructure/regions/) in the Microsoft Azure documentatio.
      * `YOUR-CERTIFICATE.crt` and `YOUR-KEY.key` are the path to your Certificate Authority (CA) certificate and key. This enables SSL/TLS termination at your app gateway. For instructions on creating them, see [Getting Started: Microsoft Azure](https://github.com/cloudfoundry/bosh-bootloader/blob/master/docs/getting-started-azure.md) in the bosh-bootloader documentation.
        <p class='note'><strong>Note:</strong> For test and development environments, you can generate your own CA certificate and key with a tool such as For more information about certstrap, see the <a href="https://github.com/square/certstrap">certstrap</a> repository on GitHub.</p>
      * `YOUR-SYSTEM-DOMAIN` is the DNS domain name for your <%= vars.platform_name %> instance. <%= vars.platform_name %> uses this domain name when deploying apps. For example, if you select the name `cloud.example.com`, <%= vars.platform_name %> deploys each of your apps as `APP-NAME.cloud.example.com`.
  
  The `bbl up` command takes twenty to thirty minutes to complete.
  
  When you run `bbl plan` or `bbl up`, bosh-bootloader creates, modifies, or deletes files in the `--state-dir` or present working directory.
  
  <p class="note"><strong>Note:</strong> The <strong>bbl state directory</strong> contains credentials and other metadata related to your BOSH Director and infrastructure. Copy this directory to a secure location.</p>
  
  ### <a id='view-list'></a> View List of Values from the State File
  
  To view the full list of environmental details you can extract from the state file:
  
  1. Navigate to the directory that contains `bbl-state.json`.
  
  1. Run:
  
      ```
      bbl
      ```
  
  For more information about `bbl` commands, see the [usage.go](https://github.com/cloudfoundry/bosh-bootloader/blob/master/commands/usage.go) file in the bosh-bootloader repository on GitHub.
  
  ### <a id='extract-info'></a> Extract Information from the bbl State
  
  To extract information from the bbl state:
  
  1. Navigate to the directory that contains `bbl-state.json`.
  
  1. Run:
  
      ```
      bbl ENVIRONMENT-DETAIL
      ```
      Where:
      * `ENVIRONMENT-DETAIL` is the name of one of the environmental details listed when you run the `bbl` command.
      <br>
      <br>
      For example, to obtain your BOSH Director address, run:
      ```
      bbl director-address
      ```
  
  
  ## <a id='update-dns'></a> Step 4: Update DNS Records
  
  If you specify the `--lb-domain` flag, `bbl` creates an Azure DNS Zone in your resource group. You can view the records in the zone.
  
  The nameservers have the following format:
  
  