Migrating Apps to TAS for VMs [Windows]
Page last updated:
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:
Log in to the Cloud Foundry Command Line Interface (cf CLI) by running:
cf login
Choose your org and space.
Navigate to the location of your app.
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
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.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, ifexample.com
is your domain and you want the URL to your app to behttp://my-app.example.com
, then specifymy-app
as theHOSTNAME
.
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 thiscf 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 aboutcf push
, see cf push in the Cloud Foundry CLI Reference Guide.Note: The
windows
stack is a renaming of the oldwindows2016
stack. These stacks are identical and differ in name only. If thewindows
stack is available, specify-s windows
. Otherwise, specify-s windows2016
. In TAS for VMs [Windows] v2.5 and later, thewindows2016
stack is deprecated. For more information, see Deprecation of the windows2016 Stack in VMware Tanzu Application Service for VMs [Windows] v2.5 Release Notes.
To configure the router so all incoming requests go to both
APP-NAME
andAPP-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, ifexample.com
is your domain and you want the URL to your app to behttp://my-app.example.com
, then specifymy-app
as theHOSTNAME
.Note: When using the
For additional information aboutcf map-route
command, you must specify domain name after specifying app name.cf map-route
, see cf map-route in the Cloud Foundry CLI Reference Guide.
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.To confirm that both your
APP-NAME
andAPP-NAME-green
apps are running, run:cf apps
If you experience a problem, see Troubleshooting App Deployment and Health.
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 withAPP-NAME-green
.DOMAIN
is your domain name, for example,example.com
.HOSTNAME
is the name of your app’s subdomain. For example, ifexample.com
is your domain and the existing app is currently accessed using the URLhttp://my-app.example.com
, then specifymy-app
as theHOSTNAME
.
For additional information aboutcf-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:
Run:
cf delete APP-NAME
Where
APP-NAME
is the name of the app that you have replaced withAPP-NAME-green
.Note: To also delete any mapped routes, run the command with the
For additional information about-r
flag.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:
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.
Click Review Pending Changes.
Select the TAS for VMs [Windows] tile and review the changes. For more information, see Reviewing Pending Product Changes.
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.