Migrating Apps to TAS for VMs [Windows]

This topic describes the process of migrating apps running on VMware Tanzu Application Service for VMs [Windows] 2012 R2 stemcells to run on TAS for VMs [Windows] stemcells, which run Windows Server 2019.

Note: TAS for VMs [Windows] 2012 R2 has reached its end of availability (EoA) and is no longer generally available.

VMware 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 the TAS for VMs [Windows] Tile

To install and deploy the TAS for VMs [Windows] tile, follow steps 1 and 2 of Installing and Configuring TAS for VMs [Windows].

Step 2: Push App to TAS for VMs [Windows] Diego Cells

To redeploy a running app with zero downtime using the blue-green method:

  1. Log in to the Cloud Foundry Command Line Interface (cf CLI) by running:

    cf login
    
  2. Choose your org and space.

  3. Navigate to the location of your app.

  4. To find the name of the existing TAS for VMs [Windows] 2012 R2 app you are migrating to TAS for VMs [Windows] Diego, run:

    cf apps
    
  5. Create a name for the replacement TAS for VMs [Windows] app. VMware recommends you append -green to your existing app name, using the following format:

    APP-NAME-green
    

    Where APP-NAME is the name of the existing TAS for VMs [Windows] Diego 2012 R2 app.

  6. To push your app to a TAS for VMs [Windows] Diego Cell using your newly created name, run:

    cf push APP-NAME-GREEN -s windows -b BUILDPACK -n HOSTNAME --no-start --no-route
    

    Where:

    • APP-NAME-GREEN is the newly created “green” name for your app.
    • BUILDPACK is your custom buildpack. Specify the buildpack either by name or GitHub URL with an optional branch or tag.
    • HOSTNAME is the name of your app’s subdomain. For example, if example.com is your domain and you want the URL to your app to be http://my-app.example.com, then specify my-app as the HOSTNAME.
      For example:
      C:\Users\admin> cf push ExampleApp-green -s windows ^
      -b https://github.com/cloudfoundry/binary-buildpack.git ^
      -n my-app --no-start --no-route
      

      Note: The --no-start and --no-route parameters included in this cf push command are required for the this procedure. --no-start is used to create the instance VMs and not start the app, and --no-route is used to prevent the push command from automatically mapping a route to the app. For more information about cf push, see cf push in the Cloud Foundry CLI Reference Guide.

      Note: The windows stack is a renaming of the old windows2016 stack. These stacks are identical and differ in name only. If the windows stack is available, specify -s windows. Otherwise, specify -s windows2016. In TAS for VMs [Windows] v2.5 and later, the windows2016 stack is deprecated. For more information, see Deprecation of the windows2016 Stack in VMware Tanzu Application Service for VMs [Windows] v2.5 Release Notes.

  7. To configure the router so all incoming requests go to both APP-NAME and APP-NAME-green, run:

    cf map-route APP-NAME-green DOMAIN -n HOSTNAME
    

    Where:

    • APP-NAME-green is the name of the new “green” version of your app.
    • DOMAIN is your domain name. For example, example.com.
    • HOSTNAME is the name of your app’s subdomain. For example, if example.com is your domain and you want the URL to your app to be http://my-app.example.com, then specify my-app as the HOSTNAME.

      Note: When using the cf map-route command, you must specify domain name after specifying app name.

      For additional information about cf map-route, see cf map-route in the Cloud Foundry CLI Reference Guide.
  8. To start the green app, run:

    cf start APP-NAME-green
    

    Where APP-NAME-green is the name of the new “green” version of your app.

  9. To confirm that both your APP-NAME and APP-NAME-green apps are running, run:

    cf apps
    

    If you experience a problem, see Troubleshooting App Deployment and Health.

  10. To unmap the original app’s route, run:

    cf unmap-route APP-NAME DOMAIN -n HOSTNAME
    

    Where:

    • APP-NAME is the name of the existing version of your app you want to replace with APP-NAME-green.
    • DOMAIN is your domain name, for example, example.com.
    • HOSTNAME is the name of your app’s subdomain. For example, if example.com is your domain and the existing app is currently accessed using the URL http://my-app.example.com, then specify my-app as the HOSTNAME.
      For additional information about cf-unmap-route, see cf unmap-route in the Cloud Foundry CLI Reference Guide.

Step 3: Delete App from TAS for VMs [Windows] 2012 R2 Server Diego Cells

To delete the original app:

  1. Run:

    cf delete APP-NAME
    

    Where APP-NAME is the name of the app that you have replaced with APP-NAME-green.

    Note: To also delete any mapped routes, run the command with the -r flag.

    For additional information about cf delete, see cf delete in the Cloud Foundry CLI Reference Guide.

Step 4: (Optional) Uninstall Old Tile

Once you have migrated all of your apps and you are no longer using the TAS for VMs [Windows] 2012 R2 tile, a Ops Manager operator uninstall the tile.

To uninstall the tile:

  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. Click Review Pending Changes.

  3. Select the TAS for VMs [Windows] tile and review the changes. For more information, see Reviewing Pending Product Changes.

  4. Click Apply Changes.

    Note: 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.