{"id":19655,"date":"2016-08-18T10:44:57","date_gmt":"2016-08-18T14:44:57","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/?p=19655"},"modified":"2019-02-14T17:33:44","modified_gmt":"2019-02-15T01:33:44","slug":"deploying-an-azure-red-hat-linux-vm-running-apache-tomcat-for-use-with-visual-studio-team-services-and-team-foundation-server","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/devops\/deploying-an-azure-red-hat-linux-vm-running-apache-tomcat-for-use-with-visual-studio-team-services-and-team-foundation-server\/","title":{"rendered":"Deploying an Azure Red Hat Linux VM Running Apache Tomcat for use with Visual Studio Team Services and Team Foundation Server"},"content":{"rendered":"<p><a href=\"https:\/\/www.visualstudio.com\/products\/visual-studio-team-services-vs\">Visual Studio Team Services<\/a> and <a href=\"https:\/\/www.visualstudio.com\/products\/tfs-overview-vs\">Team Foundation Server (TFS)<\/a>\u00a0now has at least three mechanisms (i.e. deployment and utility\u00a0tasks) for deploying to a Linux host or virtual machine (VM).\u00a0 This walkthrough will show specifically how to setup and configure an\u00a0Red Hat (v. 7.2)\u00a0VM on <a href=\"https:\/\/azure.microsoft.com\/\">Azure <\/a>to run Tomcat and other necessary services to support three different and distinct Team Services deployment tasks to enable continuous integration and deployment.\u00a0 We will\u00a0configure the VM to enable the Apache Tomcat Deployment task, the Copy Files\u00a0over SSH\u00a0task, and the FTP Upload task (using ftps) to enable deployment of web applications from Team Services.<\/p>\n<p>The <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-vscs-rm.apachetomcat\">Apache Tomcat Deployment task<\/a> is available on the <a href=\"https:\/\/marketplace.visualstudio.com\/vsts\">Visual Studio Marketplace<\/a>.\u00a0 The\u00a0Copy Files over SSH\u00a0and FTP Upload tasks have just been released with their respective blog announcements below:<\/p>\n<ul>\n<li><a href=\"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/2016\/08\/18\/copy-files-over-ssh-during-continuous-integration-and-deployment\/\"><span style=\"color: #000000\">https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/2016\/08\/18\/copy-files-over-ssh-during-continuous-integration-and-deployment\/<\/span><\/a><\/li>\n<li><a href=\"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/2016\/08\/18\/upload-files-with-ftp-ftps\/\"><span style=\"color: #000000\">https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/2016\/08\/18\/upload-files-with-ftp-ftps\/<\/span><\/a><\/li>\n<\/ul>\n<h2>Get going quickly<\/h2>\n<p>If you want a quick and simple method for deploying an Azure Red Hat Linux VM with Tomcat, SSH and FTP for use with Visual Studio Team Services and TFS, then you can use the Azure QuickStart ARM template found here:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/Azure\/azure-quickstart-templates\/tree\/master\/vsts-tomcat-redhat-vm\">https:\/\/github.com\/Azure\/azure-quickstart-templates\/tree\/master\/vsts-tomcat-redhat-vm<\/a><\/li>\n<\/ul>\n<p>Using the above template and script, you can configure and deploy a new Azure Red Hat Tomcat server in a matter of minutes by providing a few required parameters.\u00a0 Be sure to allow the full Azure deployment to complete before logging into the VM (as logging in to soon can cause permission issues).<\/p>\n<p>On the other hand, if you want to setup and tailor\u00a0the Azure Red Hat VM yourself, then follow the detailed instructions below.\u00a0 Following these instructions, you can setup Tomcat for deploying from Team Services \/ TFS with either or all of the Apache Tomcat extension deployment task, the built-in Copy Files over SSH deployment task or the built-in FTP Upload task.<\/p>\n<p>If you would prefer to setup an Azure\u00a0Ubuntu VM (instead of or in addition to\u00a0Red Hat)\u00a0running Tomcat, then follow the instructions in this sister blog post:<\/p>\n<ul>\n<li><a href=\"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/2016\/08\/18\/deploying-an-azure-ubuntu-linux-vm-running-apache-tomcat-for-use-with-visual-studio-team-services-and-team-foundation-server\"><span style=\"color: #000000\">https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/2016\/08\/18\/deploying-an-azure-ubuntu-linux-vm-running-apache-tomcat-for-use-with-visual-studio-team-services-and-team-foundation-server<\/span><\/a><\/li>\n<\/ul>\n<h2>Deploy a Linux Red Hat VM on Azure<\/h2>\n<p>The first step for our walkthrough is to create a Linux Red Hat VM running in Azure.\u00a0 If you don&#8217;t yet have an Azure account, you can <a href=\"https:\/\/azure.microsoft.com\/en-us\/free\/\">sign up for one free<\/a>.<\/p>\n<p>Login to Azure and go to the Azure Portal, <a href=\"https:\/\/portal.azure.com\">https:\/\/portal.azure.com<\/a>.\u00a0\u00a0 In the left-hand navigation panel, click on Virtual machines.\u00a0 Under the Virtual Machines panel, click &#8220;+ Add&#8221;.\u00a0 This brings up the Virtual Machines marketplace window.\u00a0 In the search window (by the magnifying glass), enter &#8220;Red Hat&#8221; and press Enter.\u00a0 Find and click on the line containing &#8220;Redhat Enterprise Linux 7.2&#8221;.\u00a0\u00a0\u00a0 Ensure the &#8220;Resource Manager&#8221; deployment model is selected and press the &#8220;Create&#8221; button.<\/p>\n<p>Under the &#8220;Basics&#8221; panel,\u00a0\u00a0choose and enter a &#8220;Name&#8221; for your VM and a\u00a0&#8220;User name&#8221;.\u00a0 Select &#8220;Password&#8221; as the Authentication type, and enter and confirm a password for your VM.\u00a0 Create a new Resource group (e.g. &#8220;demo&#8221;) and select a Location nearest to your physical location.\u00a0 Other values can remain as their defaults.\u00a0 When you are ready, press the &#8220;OK&#8221; button.<\/p>\n<p>Under the &#8220;Choose a size&#8221; panel, click on the option to &#8220;View all.&#8221;\u00a0 For the purposes of this walkthrough, we recommend choosing a size of &#8220;F1S Standard&#8221; but any will work.\u00a0 It is easy to upgrade to a more powerful VM later if you like.\u00a0 Click on the size you want to use and then press the &#8220;Select&#8221; button at the bottom of the panel.<\/p>\n<p>Under the &#8220;Settings&#8221; panel, the defaults should all work for this demo, so just press the &#8220;OK&#8221; button at the bottom of the panel.<\/p>\n<p>Assuming all the parameters for the VM are OK, you should see a blue banner stating &#8220;Validation passed&#8221;.\u00a0 If you are satisfied with the setup displayed, press the &#8220;OK&#8221; button at the bottom of the panel to actually start the deployment of the VM.<\/p>\n<p>To view the progress with deploying the VM, you can click on the bell looking icon in the upper right of the dark blue menu bar and then click on the &#8220;Deployment started&#8230;&#8221; message.\u00a0 A panel will be displayed showing the status of the deployment, likely with a blue banner stating the VM is &#8220;Deploying.&#8221;\u00a0 You can &#8220;Refresh&#8221; to see current status or even &#8220;Cancel&#8221; the request to create the VM from this panel.\u00a0 After a few minutes, press &#8220;Refresh&#8221; to see of the deployment is finished (i.e. Status is Succeeded).\u00a0 Once the VM is deployed, click on the &#8220;Virtual machines&#8221; in the far-left navigation panel and then click on your newly created VM in the list under the Virtual machines panel.<\/p>\n<p>Note (and record) the Public UP address of your new VM.\u00a0 We will use it to login and configure the VM.\u00a0 If you like, you can give your VM a public DNS name.\u00a0 To do this, click on the word &#8220;&lt;none&gt;&#8221; which appears beside the public IP address.\u00a0 Then click on &#8220;Configuration&#8221;, and finally enter the DNS name label in the text box provided.\u00a0 You should write down and note the name you entered as well as the data center (i.e. myVM.southcentralus.cloudapp.azure.com).\u00a0 When you have entered the name of your choosing, press &#8220;Save&#8221; by the disk icon near the top of the panel.\u00a0 You can use either the public IP address or DNS name to refer to your VM using popular tools.\u00a0 If you have noted and saved\u00a0the IP and DNS names, you can close the Azure portal in the web browser.<\/p>\n<h2><\/h2>\n<h2>Login to your Apache Tomcat Azure Linux Red Hat VM<\/h2>\n<p>Using a tool of your choosing, log in to your newly created Red Hat\u00a07.2Server VM using the User name and Password you selected above when deploying the VM.\u00a0 Free tools are available such as <a href=\"http:\/\/mobaxterm.mobatek.net\/download.html\">MobaXterm<\/a>.\u00a0 You can also use a Windows Command prompt and use the command:\u00a0 <em><span style=\"color: #000000\">ssh &lt;hostname&gt; -l &lt;username&gt;<\/span><\/em><\/p>\n<p>You will need to know how to use a basic text editor (such as &#8216;vi&#8217;, &#8216;vim&#8217; or &#8216;nano&#8217;)\u00a0in order to edit files to configure your server.<\/p>\n<h2><\/h2>\n<h2>0.\u00a0 Install\u00a0Apache Tomcat On\u00a0Your Azure Linux Redhat VM<\/h2>\n<p>On Red Hat Linux on Azure, by default you will need to enter your password when executing the &#8216;sudo&#8217; command.\u00a0 To keep from having to enter your password for every sudo command in this walkthrough, let&#8217;s start by configuring passwordless su privileges for your account.<\/p>\n<p><span style=\"text-decoration: underline\">0.0:<\/span>\u00a0 Edit the file \/etc\/sudoers.d\/waagent (e.g. sudo vi \/etc\/sudoers.d\/waagent) and edit the one line there to read:<\/p>\n<p><em>azureuser ALL = (ALL) <span style=\"color: #ff0000\">NOPASSWD<\/span>: ALL<\/em><\/p>\n<p>azureuser is where you substitute the\u00a0User name\u00a0you chose when you setup and logged into the machine.\u00a0 Save the file (if using &#8216;vi&#8217;, you may have to use w! to write the file if you get a warning that the file is read only).<\/p>\n<p>&nbsp;<\/p>\n<p>To get Tomcat running, we will install the standard\u00a0Apache2 and Tomcat7 packages, and download and build the\u00a0mod-jk package (thus also requiring gcc, c++ and http-devel).<\/p>\n<p><span style=\"text-decoration: underline\">0.1:\u00a0<\/span> From a terminal window running on your newly created Red Hat 7.2\u00a0Server, enter the following commands (you will need to allow each command to complete before entering the next command):<\/p>\n<p><em><strong>sudo yum install -y httpd<\/strong><\/em><\/p>\n<p><em><strong>sudo yum install -y tomcat<\/strong><\/em><\/p>\n<p><em><strong>sudo yum install -y tomcat-webapps tomcat-admin-webapps<\/strong><\/em><\/p>\n<p><em><strong>sudo yum install -y gcc<\/strong><\/em><\/p>\n<p><em><strong>sudo yum install -y gcc-c++<\/strong><\/em><\/p>\n<p><em><strong>sudo yum install -y httpd-devel<\/strong><\/em><\/p>\n<p><em><strong>cd<\/strong><\/em><\/p>\n<p><em><strong>wget http:\/\/www-us.apache.org\/dist\/tomcat\/tomcat-connectors\/jk\/tomcat-connectors-1.2.41-src.tar.gz<\/strong><\/em><\/p>\n<p><em><strong>tar xvfz tomcat-connectors-1.2.41-src.tar.gz<\/strong><\/em><\/p>\n<p><em><strong>cd tomcat-connectors-1.2.41-src\/native\/<\/strong><\/em><\/p>\n<p><em><strong>.\/configure &#8211;with-apxs=\/usr\/bin\/apxs<\/strong><\/em><\/p>\n<p><em><strong>make<\/strong><\/em><\/p>\n<p><em><strong>sudo make install<\/strong><\/em><\/p>\n<p>Now that the required packages are installed on your VM, you need to configure the services.<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline\">0.2<\/span>:\u00a0 Create a new file mod_jk.conf in the \/etc\/httpd\/conf directory with the following content (e.g. sudo vi \/etc\/httpd\/conf\/mod_jk.conf):<\/p>\n<p><em># Load mod_jk module<\/em>\n<em> # Specify the filename of the mod_jk lib<\/em>\n<em> LoadModule jk_module modules\/mod_jk.so<\/em><\/p>\n<p><em># Where to find workers.properties<\/em>\n<em> JkWorkersFile conf\/workers.properties<\/em><\/p>\n<p><em># Where to put jk logs<\/em>\n<em> JkLogFile \/var\/log\/httpd\/mod_jk.log<\/em><\/p>\n<p><em># Set the jk log level [debug\/error\/info]<\/em>\n<em> JkLogLevel info<\/em><\/p>\n<p><em># Select the log format<\/em>\n<em> JkLogStampFormat &#8220;[%a %b %d %H:%M:%S %Y]&#8221;<\/em><\/p>\n<p><em># JkOptions indicates to send SSK KEY SIZE<\/em>\n<em> JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories<\/em><\/p>\n<p><em># JkRequestLogFormat<\/em>\n<em> JkRequestLogFormat &#8220;%w %V %T&#8221;<\/em><\/p>\n<p><em># Mount your applications<\/em>\n<em> JkMount \/* worker1<\/em><\/p>\n<p><em>JkShmFile \/var\/run\/mod_jk\/jk-runtime-status<\/em><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline\">0.3:<\/span>\u00a0 Create a new file \/etc\/httpd\/conf\/workers.properties (e.g. sudo vi \/etc\/httpd\/conf\/workers.properties ) and<\/p>\n<p>Add\/insert the following\u00a010 lines and save the file:<\/p>\n<p><em># Define 1 real worker using ajp13<\/em><\/p>\n<p><em>worker.list=worker1<\/em><\/p>\n<p><em>worker.worker1.type=ajp13<\/em><\/p>\n<p><em>worker.worker1.host=localhost<\/em><\/p>\n<p><em>worker.worker1.port=8009<\/em><\/p>\n<p><em>worker.worker1.socket_keepalive=true<\/em><\/p>\n<p><em>worker.worker1.lbfactor=1<\/em><\/p>\n<p><em>worker.worker1.connection_pool_size=50<\/em><\/p>\n<p><em>worker.worker1.connect_timeout=5000<\/em><\/p>\n<p><em>worker.worker1.prepost_timeout=5000<\/em><\/p>\n<p><em>\u00a0<\/em><\/p>\n<p><span style=\"text-decoration: underline\">0.4:\u00a0<\/span> Edit the file \/etc\/httpd\/conf\/httpd.conf (e.g. <span>sudo vi \/etc\/httpd\/conf\/httpd.conf ) and<\/span><\/p>\n<p>Change the line containing ServerName to point to the name of your Azure VM and uncomment the line:<\/p>\n<p><em>ServerName raisaredhat.southcentralus.cloudapp.azure.com:80<\/em><\/p>\n<p>And add the following\u00a0two lines at the end of the file:<\/p>\n<p><em># Include mod_jk&#8217;s specific configuration file<\/em>\n<em> Include conf\/mod_jk.conf<\/em><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline\">0.5<\/span>:\u00a0 Edit the file \/usr\/share\/tomcat\/conf\/server.xml (e.g. sudo vi \/usr\/share\/tomcat\/conf\/server.xml):<\/p>\n<p>Change the line<\/p>\n<p>&lt;Engine name=&#8221;Catalina&#8221; defaultHost=&#8221;localhost&#8221;&gt;<\/p>\n<p>to<\/p>\n<p>&lt;Engine name=&#8221;Catalina&#8221;\u00a0 defaultHost=&#8221;localhost&#8221;\u00a0 <span style=\"color: #ff0000\">jvmRoute=&#8221;worker1<\/span>&#8220;&gt;<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000\"><span style=\"text-decoration: underline\">0.6:<\/span>\u00a0 Update the permissions on the Tomcat webapps and install directory:<\/span><\/p>\n<p><span style=\"color: #000000\"><em><strong>sudo chown -R tomcat.tomcat \/var\/lib\/tomcat\/webapps<\/strong><\/em><\/span><\/p>\n<p><span style=\"color: #000000\"><em><strong>sudo chown tomcat.tomcat \/usr\/share\/tomcat<\/strong><\/em><\/span><\/p>\n<p><strong><span style=\"color: #ff6600\"><span style=\"text-decoration: underline\"><span style=\"color: #000000\"><em>sudo chown tomcat.tomcat \/var\/lib\/tomcat<\/em><\/span><\/span><\/span><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline\">0.7<\/span>:\u00a0 Set the default umask for Tomcat:<\/p>\n<p>Edit the file \/usr\/libexec\/tomcat\/server (e.g. sudo vi \/usr\/libexec\/tomcat\/server):<\/p>\n<p>Add the following umask line on a separate line\u00a0just before the &#8220;run start&#8221; line and save the file:<\/p>\n<p><em>umask 002<\/em><\/p>\n<p>Then reload the daemon definitions:<\/p>\n<p><em><strong>sudo systemctl daemon-reload<\/strong><\/em><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline\">0.8:<\/span>\u00a0 Configure <span style=\"color: #ff6600\"><span style=\"color: #000000\">SELinux<\/span> <\/span>to allow mod_jk to work:<\/p>\n<p><em><strong>sudo yum install -y policycoreutils-python<\/strong><\/em><\/p>\n<p><em><strong>sudo mkdir \/var\/run\/mod_jk<\/strong><\/em><\/p>\n<p><em><strong>sudo semanage fcontext -a -t httpd_var_run_t &#8220;\/var\/run\/mod_jk(\/.*)?&#8221;<\/strong><\/em><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline\">0.9:\u00a0<\/span> Remove unnecessary http modules (that create warnings in the logs):<\/p>\n<p><em><strong>sudo vi \/etc\/httpd\/conf.modules.d\/00-proxy.conf<\/strong><\/em><\/p>\n<p>Add a &#8216;#&#8217; as the first character to comment out the line containing the &#8220;heartbeat_module&#8221;, then save the file.<\/p>\n<p><em># LoadModule lbmethod_heartbeat_module modules\/mod_lbmethod_heartbeat.so<\/em><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline\">0.10:<\/span>\u00a0 Configure the system to run httpd and tomcat every time the server is booted:<\/p>\n<p><em><strong>sudo systemctl enable httpd<\/strong><\/em><\/p>\n<p><em><strong>sudo systemctl enable tomcat<\/strong><\/em><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline\">0.11:<\/span>\u00a0 Restart the Tomcat7 and Apache2 servers:<\/p>\n<p><em><strong>sudo service httpd start<\/strong><\/em><\/p>\n<p><em><strong>sudo service tomcat start<\/strong><\/em><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline\">\u00a00.12:<\/span> Open Red Hat software firewall for port 80:<\/p>\n<p><em><strong>sudo firewall-cmd &#8211;zone=public &#8211;add-port=80\/tcp &#8211;permanent<\/strong><\/em><\/p>\n<p><em><strong>sudo firewall-cmd &#8211;reload<\/strong><\/em><\/p>\n<p>&nbsp;<\/p>\n<p>Each service should have reported OK for the above restart commands when they started successfully.<\/p>\n<p><span style=\"text-decoration: underline\">0.13:<\/span>\u00a0 Your Redhat Server is now running Tomcat, but Azure needs to be configured to allow incoming traffic to reach your server.\u00a0 To do this:<\/p>\n<ol>\n<li>Open Azure portal: <a href=\"https:\/\/portal.azure.com\">https:\/\/portal.azure.com<\/a><\/li>\n<li>Select &#8220;Virtual machines&#8221; in the left-hand navigation panel (not Virtual machines (classic))<\/li>\n<li>Under the &#8220;Virtual machines&#8221; panel, select the machine you want to update<\/li>\n<li>Click on &#8220;Network interfaces&#8221; under Settings<\/li>\n<li>Click on the network interface to be updated<\/li>\n<li>Click on &#8220;Network security group&#8221; under Settings<\/li>\n<li>Click on the network security group to be updated<\/li>\n<li>Click on &#8220;Inbound security rules&#8221; under Settings<\/li>\n<li>&#8220;+Add&#8221; a new rule with Name &#8220;default-allow-tomcat&#8221; on Destination port range 80, and click the &#8220;OK&#8221; button.\u00a0 The other default values should be sufficient.<\/li>\n<\/ol>\n<p>The VM will show as &#8220;Updating&#8221; and then reports back the rule has been added.\u00a0\u00a0 Your Azure Redhat 16 Server is now fully configured for Tomcat.<\/p>\n<p>The image below shows the final state for the Inbound Security Rules at the completion of this entire walkthrough.\u00a0 Only the first two rules\u00a0(default-allow-ssh and default-allow-tomcat) will be configured initially after step 0.13 is completed.\u00a0 The &#8220;default-allow-ftps&#8221; and &#8220;default-allow-ftp&#8221; rules are configured later in steps 3.6 &#8211; 3.8 and are only needed if you want to deploy using FTP (ftps).<\/p>\n<p><img decoding=\"async\" width=\"879\" height=\"311\" class=\"size-large wp-image-19635 aligncenter\" alt=\"Azure inbound security rules\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2016\/08\/Azure-inbound-security-rules-1024x362.png\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline\">0.13:<\/span>\u00a0 To verify the operation, open a web browser window pointing to your new server&#8230;<\/p>\n<p>Example:\u00a0 http:\/\/raisatomcat.southcentralus.cloudapp.azure.com\/<\/p>\n<p>The webpage should display a Apache Tomcat\/7.0.54 welcome page.\u00a0 If not, go back and make sure all of the above steps were completed in the order specified.<\/p>\n<p><img decoding=\"async\" width=\"879\" height=\"641\" class=\"size-large wp-image-19786 aligncenter\" alt=\"Redhat.Tomcat.Welcome\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2016\/08\/Redhat.Tomcat.Welcome-1024x747.png\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>In the next sections, we will describe three different deployment methods for deploying web applications\u00a0to this Tomcat server in Azure from Team Services (or TFS).\u00a0 Each section is independent of the other section so you can choose to configure only one option, any two options, or all three as your needs require.\u00a0 That is, Option 2 is not dependent on Option 1, Option 3 is not dependent on Options 2 and 3, etc.<\/p>\n<h2>Option 1:\u00a0 Configure Tomcat Azure VM for Web UI Manager\u00a0Access\u00a0and the Team Services Apache Tomcat Deployment Task<\/h2>\n<p>Add permissions to be able to access the Tomcat manager (Web UI and\/or Team Services task).<\/p>\n<p><span style=\"text-decoration: underline\">1.1:<\/span>\u00a0<em> <\/em>Edit the file <span>\/etc\/tomcat\/tomcat-users.xml<\/span> \u00a0(e.g. sudo vi <span>\/etc\/tomcat\/tomcat-users.xml<\/span>) and add the following lines\u00a0just above the final\u00a0&lt;\/tomcat-users&gt; tag near the bottom of the file\u00a0\u00a0and save the file:<\/p>\n<p><em>&lt;role rolename=&#8221;tomcat&#8221;\/&gt;<\/em><\/p>\n<p><em>&lt;role rolename=&#8221;manager-script&#8221;\/&gt;<\/em><\/p>\n<p><em>&lt;role rolename=&#8221;manager-gui&#8221;\/&gt;<\/em><\/p>\n<p><em>&lt;role rolename=&#8221;manager&#8221;\/&gt;<\/em><\/p>\n<p><em>&lt;role rolename=&#8221;admin-gui&#8221;\/&gt;<\/em><\/p>\n<p><em>&lt;user username=&#8221;tomcat&#8221; password=&#8221;tomcat&#8221; roles=&#8221;tomcat&#8221;\/&gt;<\/em><\/p>\n<p><em>&lt;user username=&#8221;<span style=\"color: #ff0000;text-decoration: underline\"><strong>manager<\/strong><\/span>&#8221; password=&#8221;<span style=\"color: #ff0000;text-decoration: underline\"><strong>bitnami<\/strong><\/span>&#8221; roles=&#8221;tomcat,manager-script,manager-gui,admin-gui&#8221;\/&gt;<\/em><\/p>\n<p>Use your own values for the Tomcat <span style=\"color: #ff0000\">username<\/span> and <span style=\"color: #ff0000\">password<\/span>.\u00a0 You will need to note and save these values as you will need to them to access the Tomcat manager web UI and also to setup Team Services to deploy with the Tomcat Deployment Task.<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline\">1.2:<\/span>\u00a0 Restart the Tomcat7 and Apache2 servers:<\/p>\n<p><em><strong>sudo service tomcat restart<\/strong><\/em><\/p>\n<p><em><strong>sudo service httpd restart<\/strong><\/em><\/p>\n<p>Each service should have reported OK for the above commands when they started successfully.<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline\">1.3<\/span>:\u00a0 To verify you have Tomcat manager permissions configured, open a web browser to the your host&#8217;s URL but add &#8220;manager&#8221; to the end&#8230;<\/p>\n<p>Example:\u00a0 http:\/\/raisatomcat.southcentralus.cloudapp.azure.com\/manager<\/p>\n<p>When prompted, enter the username and password you used when editing the <span>\/etc\/tomcat\/tomcat-users.xml<\/span>\u00a0\u00a0file above.<\/p>\n<p>The webpage should successfully\u00a0display the Tomcat Web Application Manager page similar to what is partially shown below:<\/p>\n<p><img decoding=\"async\" width=\"879\" height=\"389\" class=\"size-large wp-image-19645 aligncenter\" alt=\"Tomcat Manager\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2016\/08\/Tomcat-Manager-1024x453.png\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>You can now install the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-vscs-rm.apachetomcat\">Apace Tomcat Deployment<\/a> task from on Team Services project to deploy to your Tomcat server:<\/p>\n<p><img decoding=\"async\" width=\"695\" height=\"533\" class=\"size-full wp-image-19575 aligncenter\" alt=\"tomcat install\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2016\/08\/tomcat-install.png\" \/><\/p>\n<p>Then create a build or release definition containing the Deploy Application to a Tomcat Server deployment task &#8212; you <span style=\"text-decoration: underline\">should not<\/span> specify port 8080 as the task documentation mentions (you do not need to specify a port at all) and use the username and password\u00a0from step 1.1 above (note: most applications have an Application Context of &#8220;\/&#8221; which is different than what is shown below):<\/p>\n<p><span style=\"color: #ff0000\"><img decoding=\"async\" width=\"511\" height=\"391\" class=\"size-full wp-image-19565 aligncenter\" alt=\"tomcat deploy\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2016\/08\/tomcat-deploy.png\" \/><\/span><\/p>\n<h2>Option 2:\u00a0 Configure Tomcat Azure VM\u00a0for Team Services Built-in <em>Copy Files Over SSH<\/em> Deployment Task<\/h2>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline\">2.1:<\/span><strong><\/strong><em><strong>\u00a0 <\/strong><\/em>Edit the file \/etc\/ssh\/sshd_config (e.g. sudo vi \/etc\/ssh\/sshd_config\u00a0)and ensure password authentication is disabled and set the default umaks to 002:<\/p>\n<p>Change PasswordAuthentication from yes to no:<\/p>\n<p><em>PasswordAuthentication no<\/em><\/p>\n<p>and then add the following two lines at the end of the file and save the file:<\/p>\n<p><em>Match User tcdeploy<\/em>\n<em>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ForceCommand internal-sftp -u 002<\/em><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline\">2.2:<\/span>\u00a0 Create an account (tcdeploy)\u00a0on the server with the same group ID as the Tomcat service to enable easier deployments into the Tomcat webapps directory:<\/p>\n<p><em><strong>sudo adduser -g tomcat tcdeploy<\/strong><\/em><\/p>\n<p><em><strong>sudo passwd tcdeploy<\/strong><\/em><\/p>\n<p>(select a password, and make a note of the account &#8220;tcdeploy&#8221; and the password)<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline\">2.3:\u00a0<\/span> Configure the default umask for SSH to enable RW for user and group<\/p>\n<p><em><strong>sudo vi \/etc\/pam.d\/sshd<\/strong><\/em><\/p>\n<p>Add the following line at the end of the file then save the file:<\/p>\n<p><em>session\u00a0optional\u00a0pam_umask.so umask=002<\/em><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline\">2.4:<\/span>\u00a0 Then\u00a0start the SSH daemon:<\/p>\n<p><strong>sudo systemctl daemon-reload<\/strong><\/p>\n<p><strong>sudo systemctl start sshd.service<\/strong><\/p>\n<p><strong>sudo systemctl enable sshd.service<\/strong><\/p>\n<p><em><strong>\u00a0<\/strong><\/em><\/p>\n<p><span style=\"text-decoration: underline\">2.5<\/span>:\u00a0 Open Red Hat software\u00a0firewall for port 22:<\/p>\n<p><em><strong>sudo firewall-cmd &#8211;zone=public &#8211;add-port=22\/tcp &#8211;permanent<\/strong><\/em><\/p>\n<p><em><strong>sudo firewall-cmd &#8211;reload<\/strong><\/em><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline\">2.6:<\/span>\u00a0 Create an RSA public and private key for SSH:<\/p>\n<p><em><strong><span>su tcdeploy <\/span><\/strong><\/em>(enter password you selected for the tcdeploy account above)<\/p>\n<p><em><strong>cd<\/strong><\/em><\/p>\n<p><em><strong>ssh-keygen <\/strong><\/em>(use defaults for all prompts except DO\u00a0pick a passphrase and choose one that you will remember)<\/p>\n<p><em><strong>cd .ssh<\/strong><\/em><\/p>\n<p><em><strong>cp id_rsa.pub authorized_keys<\/strong><\/em><\/p>\n<p><em><strong>cat id_rsa<\/strong><\/em><\/p>\n<p>You will need to <span style=\"text-decoration: underline\">cut-n-paste this RSA private key to save later<\/span>.\u00a0 You will need this private key and the passphrase when setting\u00a0up your SSH endpoint in Team Services.<\/p>\n<p>The key will look something like this:<\/p>\n<p>&#8212;&#8211;BEGIN RSA PRIVATE KEY&#8212;&#8211;\nProc-Type: 4,ENCRYPTED\nDEK-Info: AES-128-CBC,D4E587DECFADB218703A5431F7CFD6F7<\/p>\n<p>PwkwPlFpm7JAT8Oc7pLpTzXEL9bl8LiDl8nnhuC9VZSOU58+cyR5m\/e+6Odfx9eU\nRUyhInyFm2D9y9ud79GgCW9aUR2aH61L1TgoZjM1aNWlIYvDr+Eq63yNfZHvz1C\/\nplDkEPp0qOrmYdzL38hxG8c8y8TPjpqSxeITVu9Ql+S5Jz\/BodNQPvqOnR\/\/3SgI\nE3ur2XxSkgvLg02k4XS8q4J3jJksZ5SW+qvkdpeGIl1GwBeHBlqBs9xjcRoZhdOZ\n6\/QSor0RkbKaUUCQ9cLouSkIKCqVzDqecjOsIC4QdcXI6jP1MBQSdmsRylIa1KXC\nhtxyBpB4sQc+wnEBiMy7dzPC9mBKb5Yc816jPTS54kfUZgvOsJNpe\/5GMDjyV5r8\nMjNkyguEFC35fgNeTBXZFI\/JumQcWRt8A8myFv73ETUKRZ9\/\/tICclTO3uE6ZJD+\nK6KohoYWRvj3dMrPPu\/PP2091ygwO2BRO4vEC3qIoIis4tR0X3jM\/HOtzARDXdVG\n6k13CSQDq7zBj4zmHu4XVoaIA1mFpYuqYOR5hRMDhV5UTIEiKKDCh+YREaD6EEFE\nlB6cy4tuLnbcOdj7xphXkCh+tWUD+MVAPmBk\/EcDH1efKl8Iv4RK2UYRJyQi5nx\/\nbhU621WlO8jQTs9yHWjkc4\/eJIzCPvmfZDFYpF+vSDQz9U\/X\/XhFfJQs0JCIBQgU\n\/ZLIdIrQiSylVsviQmQKfxLtO28YxvVYWZZwqVWwnviDF3XCWCin6FNSGOXRzchS\ncvTp+Srp5i3ON0I+ZlVI4JW7EccrjTQa+ZK\/1p1s06JhBbt8dlL8rgbbGBeJ\/L3w\no878ZRq+LRjlCCwwS4xhSQJkOtd9sJ\/kzfOB+UIEkp6nGUmTjp9uC+Ca5T6EYn6Z\na7AZyZrkW9gM0CFiBG\/aVTnE70bcTKxLwi4CppUGddyVBjY+7LcD9fPEtqujxr6z\nf+ARCuJpwlRa7PVdfKrOHOHppZfbnRObWFu7qjhIan02hm3lUiZ4ndVThcjsXVD+\nc\/XEWVbqd1w1tGzJ2FJC8yLxCb4cY7H0Uoi8\/iq0vLs912Wi8Fe6J0f4\/3Mh1c\/y\nYgvIUNZi8keJhxONgBjKCRDrtn6LB\/\/VmBYfLlTY6G9rMoPrjDM4Q5DA60X7nUbI\nFyieUIV46KZhk1RrPKtvF8NhJhZcHHTlbd1yUCKRR58ygMwBuKtwvhTjvf\/dkm\/6\ntaBED4hhjPCJ\/1fF0zcYmcbAMzB6wY1+EHuUgPyOouvZvagTipJBe6o\/6R1gSCIE\nglNXmTozK4Gz1D42JnNog2O3p\/5NdCZ6vdiwQLNFHOM38z9OM6l0SXuxgEXBImoC\ntmRMbuM8ag+PtN8LnZGDDgv4ez7B1UQ5b0V7aZ6Dk5biU6YrGLAD6d\/7BN5MWgSL\n+ZoF7SUYJF\/E8FUy0i6ZLtMHnLEnlroCOH0D4p\/yJuCbgTKyrnn+taW6lNNKxaFT\nxERRRIaV+bdo07NkHpFTBYNy6biTR5Mht1uZmBZbDqDhCcP1uCJCTUUqSh5tMSNi\nAHajG40V+sJjDCvlOmbvd0rTK8XRMn4WAEnbHWoZx93GuZNMhQdLfsDRPKZshpTV\n&#8212;&#8211;END RSA PRIVATE KEY&#8212;&#8211;<\/p>\n<p>Your VM is now setup and configured to enable deployment using the Team Services Copy Files Over SSH built-in deployment task.<\/p>\n<p>To learn more about the Copy Files Over SSH task, read the <strong><a href=\"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/2016\/08\/18\/copy-files-over-ssh-during-continuous-integration-and-deployment\/\"><span style=\"color: #000000\">announcement blog<\/span><\/a>\u00a0<\/strong>and the <a href=\"https:\/\/youtu.be\/9R027dWJjqo\"><strong>how-to video<\/strong><\/a>.<\/p>\n<p>To use\u00a0Copy Files over SSH\u00a0with this server in Team Services, first, setup an SSH endpoint (using the SSH endpoint option) &#8211; make sure to use User Name &#8220;tcdeploy&#8221; (from step 2.2 above), the passphrase you chose in step 2.6 above, and cut-n-paste the entire RSA private key you generated in step 2.6 above into the Private key field:<\/p>\n<p><img decoding=\"async\" width=\"680\" height=\"610\" class=\"size-full wp-image-19527 aligncenter\" alt=\"SSH endpoint\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2016\/08\/SSH-endpoint.png\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Then create a build or release definition containing the Copy Files over SSH deployment task &#8211; make sure the\u00a0Target folder\u00a0is &#8220;\/var\/lib\/tomcat\/webapps&#8221; to deploy to the Tomcat server:<\/p>\n<p><img decoding=\"async\" width=\"545\" height=\"372\" class=\"size-full wp-image-19796 aligncenter\" alt=\"Redhat.scp upload\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2016\/08\/Redhat.scp-upload.png\" \/><\/p>\n<h2><span style=\"color: #ff9900\"><span style=\"color: #ff0000\">\u00a0<\/span><\/span><\/h2>\n<h2>Option 3:\u00a0 Configure Tomcat Azure VM for Team Services Built-in FTP (ftps)\u00a0Upload Utility Task<\/h2>\n<p><span style=\"text-decoration: underline\">3.0<\/span>:\u00a0 ONLY IF you are proceeding here as a continuation from Option 2, make sure you have &#8220;exited&#8221; the shell for the tcdeploy account login:<\/p>\n<p><em><strong>exit<\/strong><\/em><\/p>\n<p><em><strong>whoami<\/strong><\/em><\/p>\n<p>The output of the whoami command should indicate you are the Username you initially selected when you setup the VM (not &#8216;tcdeploy&#8217;).<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline\">SKIP<\/span> this next step <span style=\"text-decoration: underline\">IF<\/span> you already created the tcdeploy account as the first step in Option 2 (i.e. Step 2.2) above&#8230;<\/p>\n<p><span style=\"text-decoration: underline\">3.1:<\/span>\u00a0Create an account (tcdeploy)\u00a0on the server with the same group ID as the Tomcat service to enable easier deployments into the Tomcat webapps directory:<\/p>\n<p><em><strong>sudo adduser -g tomcat tcdeploy<\/strong><\/em><\/p>\n<p><em><strong>sudo passwd tcdeploy<\/strong><\/em><\/p>\n<p>(select a password, and make a note of the account &#8220;tcdeploy&#8221; and the password)<\/p>\n<p>You have now configured &#8220;tcdeploy&#8221; to be your ftps username and the password you entered in this step as your ftps password.<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline\">3.2:\u00a0<\/span> Install the vsftp package (i.e. FTP) and create some needed directories:<\/p>\n<p><em><strong>sudo yum\u00a0install\u00a0-y vsftpd<\/strong><\/em><\/p>\n<p><em><strong>cd \/etc\/vsftpd<\/strong><\/em><\/p>\n<p><em><strong>sudo\u00a0mv vsftpd.conf vsftpd.orig.conf<\/strong><\/em><\/p>\n<p><em><strong>sudo mkdir \/var\/run\/vsftpd<\/strong><\/em><\/p>\n<p><em><strong>sudo mkdir \/var\/run\/vsftpd\/empty<\/strong><\/em><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline\">3.3<\/span>:\u00a0 Generate an SSL self-signed certificate:<\/p>\n<p><em><strong>sudo mkdir \/etc\/ssl\/private<\/strong><\/em><\/p>\n<p><em><strong>sudo openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout \/etc\/ssl\/private\/vsftpd.pem -out \/etc\/ssl\/private\/vsftpd.pem<\/strong><\/em><\/p>\n<p>(answer all relevant questions when prompted as to your organization, name, etc.)<\/p>\n<p>You will use the new SSL certificate filename you just created in two locations (shown in red)\u00a0below when setting up the configuration file.<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline\">3.4:<\/span>\u00a0 Create the new vsftpd configuration file \/etc\/vsftpd\/vsftpd.conf\u00a0to ensure the following parameters are set in the file (e.g. sudo vi \/etc\/vsftpd\/vsftpd.conf):<\/p>\n<p><em>listen=NO<\/em><\/p>\n<p><em>listen_ipv6=YES<\/em><\/p>\n<p><em>anonymous_enable=NO<\/em><\/p>\n<p><em>local_enable=YES<\/em><\/p>\n<p><em>write_enable=YES<\/em><\/p>\n<p><em>local_umask=002 # this is different than the default 022<\/em><\/p>\n<p><em>dirmessage_enable=YES<\/em><\/p>\n<p><em>use_localtime=YES<\/em><\/p>\n<p><em>xferlog_enable=YES<\/em><\/p>\n<p><em>connect_from_port_20=YES<\/em><\/p>\n<p><em>xferlog_file=\/var\/log\/vsftpd.log<\/em><\/p>\n<p><em>ls_recurse_enable=YES<\/em><\/p>\n<p><em>secure_chroot_dir=\/var\/run\/vsftpd\/empty<\/em><\/p>\n<p><em>pam_service_name=vsftpd<\/em><\/p>\n<p><em># ftps\/ssl specific cofig stuff below this line<\/em><\/p>\n<p><em>rsa_cert_file<span style=\"color: #ff0000\">=\/etc\/ssl\/private\/vsftpd.pem<\/span><\/em><\/p>\n<p><em>rsa_private_key_file<span style=\"color: #ff0000\">=\/etc\/ssl\/pr<\/span><\/em><em><span style=\"color: #ff0000\">ivate\/vsftpd.pem<\/span><\/em><\/p>\n<p><em>ssl_enable=YES<\/em><\/p>\n<p><em>allow_anon_ssl=NO<\/em><\/p>\n<p><em>force_local_data_ssl=YES<\/em><\/p>\n<p><em>force_local_logins_ssl=YES<\/em><\/p>\n<p><em>ssl_tlsv1=YES<\/em><\/p>\n<p><em>ssl_sslv2=NO<\/em><\/p>\n<p><em>ssl_sslv3=NO<\/em><\/p>\n<p><em>require_ssl_reuse=NO<\/em><\/p>\n<p><em>ssl_ciphers=HIGH<\/em><\/p>\n<p><em>debug_ssl=YES<\/em><\/p>\n<p><em>pasv_enable=YES<\/em><\/p>\n<p><em>pasv_address=<strong><span style=\"color: #ff0000\">168.61.54.109<\/span><\/strong><\/em><\/p>\n<p><em>pasv_min_port=13450<\/em><\/p>\n<p><em>pasv_max_port=13454<\/em><\/p>\n<p>Make sure to use the path\/name of the self-signed certificate you created in step 3.3 above on the rsa_cert_file and ras_private_key_file lines in this config file.<\/p>\n<p>Make sure to use the public IP address of your VM on the pasv_address line in the config file.<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline\">3.5:<\/span>\u00a0 Restart the ftp service:<\/p>\n<p><em><strong>sudo service vsftpd restart<\/strong><\/em><\/p>\n<p><strong><em>sudo systemctl enable vsftpd<\/em>\u00a0<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>3.6 Configure SELinux to use Linux ACL&#8217;s for file protection<\/p>\n<p><em><strong>sudo setsebool -P allow_ftpd_full_access 1<\/strong><\/em><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline\">3.6:<\/span>\u00a0 Open ports 13450-13454 on the Azure VM using a similar process to that used above as the final step (i.e. Step 0.13)\u00a0in setting up Tomcat on your server.<\/p>\n<p>Name the inbound security rule &#8220;default-allow-ftps&#8221; and set the allowed Destination port range to be 13450-13454 and specify &#8220;Any&#8221; protocol.<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline\">3.7:<\/span>\u00a0 Open port 21 as well using the inbound security rule name &#8220;default-allow-ftp&#8221; and set the Protocol to &#8220;TCP&#8221; and the Destination port range to 21.<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline\">3.8<\/span>:\u00a0 Open the ftp ports on the Red Hat software firewall:<\/p>\n<p><em><strong>sudo firewall-cmd &#8211;zone=public &#8211;add-port=21\/tcp &#8211;permanent<\/strong><\/em><\/p>\n<p><em><strong>sudo firewall-cmd &#8211;zone=public &#8211;add-port=13450\/tcp &#8211;permanent<\/strong><\/em><\/p>\n<p><strong><em>sudo firewall-cmd &#8211;zone=public &#8211;add-port=13451\/tcp &#8211;permanent<\/em><\/strong><\/p>\n<p><strong><em>sudo firewall-cmd &#8211;zone=public &#8211;add-port=13452\/tcp &#8211;permanent<\/em><\/strong><\/p>\n<p><strong><em>sudo firewall-cmd &#8211;zone=public &#8211;add-port=13453\/tcp &#8211;permanent<\/em><\/strong><\/p>\n<p><strong><em>sudo firewall-cmd &#8211;zone=public &#8211;add-port=13454\/tcp &#8211;permanent<\/em><\/strong><\/p>\n<p><em><strong>sudo firewall-cmd &#8211;reload<\/strong><\/em><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline\">3.9:<\/span>\u00a0 To verify your system is configured correctly, use a tools such as FileZilla to connect to your server using ftps.\u00a0 You would specify the Host name of your VM, the username of &#8220;tcdeploy&#8221; and the password you used when creating the tcdeploy account above in the first step in this section.<\/p>\n<p>Your VM is now setup and configured to enable deployment using the Team Services FTP Upload built-in utility task.<\/p>\n<p>To learn more about the FTP Upload task, read the <span style=\"color: #000000\"><a href=\"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/2016\/08\/18\/upload-files-with-ftp-ftps\/\"><strong>announcement blog<\/strong><\/a>\u00a0<\/span>and the <a href=\"https:\/\/youtu.be\/oPnVyXlku4I\"><span style=\"color: #000000\"><strong>how-to video<\/strong><\/span><\/a>.<\/p>\n<p>To use ftps with this server in Team Services, first, setup an sftp endpoint (using the Generic endpoint option) &#8211; make sure to prefix the Server URL to your server with &#8220;ftps&#8221; to use secure ftp:<\/p>\n<p><img decoding=\"async\" width=\"547\" height=\"307\" class=\"size-full wp-image-19515 aligncenter\" alt=\"sftp endpoint\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2016\/08\/sftp-endpoint.png\" \/><\/p>\n<p>Then create a build or release definition containing the FTP Upload utility task &#8211; make sure the Remote directory is &#8220;\/var\/lib\/tomcat\/webapps&#8221; to deploy to the Tomcat server and also that the &#8220;Trust server certificate&#8221; Advanced option is selected so that your self-signed certificate (from step 3.3 above)\u00a0will be trusted:<\/p>\n<p><img decoding=\"async\" width=\"683\" height=\"498\" class=\"size-full wp-image-19805 aligncenter\" alt=\"Redhat.ftps upload\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2016\/08\/Redhat.ftps-upload.png\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Visual Studio Team Services and Team Foundation Server (TFS)\u00a0now has at least three mechanisms (i.e. deployment and utility\u00a0tasks) for deploying to a Linux host or virtual machine (VM).\u00a0 This walkthrough will show specifically how to setup and configure an\u00a0Red Hat (v. 7.2)\u00a0VM on Azure to run Tomcat and other necessary services to support three different [&hellip;]<\/p>\n","protected":false},"author":173,"featured_media":45953,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[224,253,226,1,225,249],"tags":[],"class_list":["post-19655","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure","category-azure-devops-server","category-ci","category-devops","category-git","category-open-source"],"acf":[],"blog_post_summary":"<p>Visual Studio Team Services and Team Foundation Server (TFS)\u00a0now has at least three mechanisms (i.e. deployment and utility\u00a0tasks) for deploying to a Linux host or virtual machine (VM).\u00a0 This walkthrough will show specifically how to setup and configure an\u00a0Red Hat (v. 7.2)\u00a0VM on Azure to run Tomcat and other necessary services to support three different [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/19655","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/users\/173"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/comments?post=19655"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/19655\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media\/45953"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media?parent=19655"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/categories?post=19655"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/tags?post=19655"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}