Migrating Apps to PAS for Windows

This topic describes the process of migrating apps running on PAS for Windows 2012R2 cells to run on PAS for Windows cells, which run Windows Server 2016.

Pivotal recommends you use the blue-green deployment method for high availability. For more information about blue-green deployments, see Using Blue-Green Deployment to Reduce Downtime and Risk.

Step 1: Install and Deploy PAS for Windows Tile

To install and deploy the PAS for Windows tile, follow steps 1 and 2 of Installing and Configuring PAS for Windows.

Step 2: Push App to PAS for Windows Cells

Perform the following steps to redeploy a running app with zero downtime using the blue-green method:

  1. Run cf login to log in to the Cloud Foundry Command Line Interface (cf CLI).

  2. Choose your org and space.

  3. Navigate to the location of your app.

  4. Run cf apps to find the name of the app, ORIGINAL_APP_NAME, that you are migrating from PAS for Windows 2012R2 to PAS for Windows. Create a new name for the app to replace it. Pivotal recommends you append -green to your app name, APP_NAME-green.

  5. Run cf push to push the renamed app APP_NAME-green, passing in -s windows2016, --no-route, and --no-start.

    $ cf push APP_NAME-green -s windows2016 -b BUILDPACK -n HOSTNAME --no-start --no-route

    • For BUILDPACK, enter your custom buildpack by name or Git URL with an optional branch or tag.
    • For HOSTNAME, enter the subdomain name you are pushing to.
    • -s windows2016 runs the app in a Windows Server 2016-based cell.
    • --no-start creates the instance VMs but does not start the app.
    • --no-route prevents the push command from automatically mapping a route to the app.
    • For more command options, see cf push.
  6. Switch the router so all incoming requests go to ORIGINAL_APP_NAME and APP_NAME-green using the cf map-route command. The command requires you enter your domain name after the app name. For example, example.com.

    $ cf map-route APP_NAME-green DOMAIN -n HOSTNAME 
    

  7. Start the green app.

    $ cf start APP_NAME-green 
    

  8. Run cf apps to confirm that both your ORIGINAL_APP_NAME and APP_NAME-green are running. If you experience a problem, see Troubleshooting Application Deployment and Health.

  9. Unmap the original app’s route by running the cf unmap-route command.

    $ cf unmap-route ORIGINAL_APP_NAME DOMAIN -n HOSTNAME 

Step 3: Delete App from Windows 2012R2 Server Cells

To delete the ORIGINAL_APP_NAME, run the cf delete command. To also delete any mapped routes, run the command with the -r flag.

$ cf delete ORIGINAL_APP_NAME -r

Step 4: (Optional) Uninstall Old Tile

Once you have migrated all of your apps and you are no longer using the Windows 2012R2 tile, a PCF operator can perform the following steps:

  1. From the Installation Dashboard, click the trash icon on the tile to remove that product. In the Delete Product dialog box that appears, click Confirm.

  2. In the Pending Changes view, click Apply Changes.

    After you delete a product, the product tile is removed from the installation and the Installation Dashboard. However, the product appears in the Available Products view.

Create a pull request or raise an issue on the source for this page in GitHub