This topic tells you about 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.
Important 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.
To install and deploy the TAS for VMs [Windows] tile, follow steps 1 and 2 of Installing and Configuring TAS for VMs [Windows].
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.
Go 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, 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
Important 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.
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
. Important 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.
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
and APP-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 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.
To delete the original app:
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](http://cli.cloudfoundry.org/en-US/cf/delete.html) in the Cloud Foundry CLI Reference Guide.
Once you have migrated all of your apps and you are no longer using the TAS for VMs [Windows] 2012 R2 tile, a Operations 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.
Click the TAS for VMs [Windows] tile and review the changes. For more information, see Reviewing pending product changes.
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.