Deploy

If you came here looking for the Web Services Deploy Tool, you can find it at https://deploy.it.purdue.edu/

If you are looking for information about the Web Services Deploy Tool, read on.

The Deploy Tool

In compliance with best security practices and Internal Audit requirements, Web Services does not allow direct access to the QA (Quality Assurance) or Production tiers of our services. Developers are expected to put their site content on a Development tier server and then use controlled access tools to move that content to the higher tiers. The Web Services Deploy Tool provides this controlled access.

Using the Deploy Tool, developers can move their content through the progression from development to qa (if provided) to production in a controlled, auditable fashion, 24 hours per day, 7 days per week, 365 days per year. It is a simple web-based tool that helps to ensure not only controlled access to the higher tiers, but consistent content on multi-server clusters.

When the developer users the Deploy Tool, they select the site to which they want to promote code, submit a request through the tool, and the tool then calculates what changes (adds, changes, removals) need to be made to make the target system look exactly like the source. It presents those changes to the developer for confirmation, and, once confirmed, makes them happen. After, a report of what it did is emailed to the developer (a log is also kept on the server for several months for auditing and troubleshooting). Of course, the developer may choose to abort the Deploy operation if the proposed changes do not match what they expected.

Basic Instructions

These instructions assume default Deploy Tool settings. You can read about customizing your preferences and using Advanced mode below.

  1. Go to https://deploy.it.purdue.edu/
  2. Click the button Get Started
  3. Login with your Career Account and Password
  4. Under Deploy to Website, select the site where you wish to deploy content (the destination). For example, if you wanted to deploy content from Development to QA for the Production site at www.purdue.edu/example-site, you would select qa.www.purdue.edu/example-site
  5. Click Deploy. The Deploy Tool will check to see what will be changed by the requested deployment.
  6. Review the information presented, showing how many files will be deployed and/or deleted. If everything looks correct, click Confirm to commit your deployment. If anything looks off, click Cancel to safely back out.
  7. After clicking Confirm, Deploy will commit changes to the destination site, which can take a minute or more. Progress will be displayed, and you’ll be shown and emailed the results.
  8. If you want to deploy another website or another tier of this website, click the Deploy Another Site button. If you’re done, you can close out of Deploy.

Important Things to Keep In Mind:

  • Deploy can only deploy changes to QA that have been first published or uploaded to Development. Visit your Development site to see if your changes are visible if there is any question.
  • Deploy can only deploy changes to Production that have been first deployed to QA in environments with a QA tier (which is most environments). Visit your QA site to confirm a successful deployment before deploying to Production.
  • Some deployments can take a long time to finish. Please be patient and wait for the results display before continuing.
  • Deploy will state “Deploy Failed” if there was any error in the process, even an inconsequential error. Review the report emailed to you (or displayed on-screen in Verbose mode) to see exactly what happened, and contact Web Services with any questions.

Advanced Operation

If you need more control over what files or folders get Deployed to your site, you can switch over to the Advanced Options mode. In this mode, you can drill down into your site or sub-site and select individual files or folders to be Deployed. Please note that when you select a folder, everything under that folder will also be Deployed. The default is “Entire Site” which is just like Simple Mode.

This view supports various interactions:

  • Double-click a directory name in the file browser to navigate into it.
  • Double-click the “-Parent Directory-” entry in the file browser to go back up one level.
  • Select/deselect multiple items by holding CTRL (Windows/Linux) or Command (Mac).
  • Move selected items from the file browser to your deployment list by selecting them and then using the >> button. You can do this multiple times in multiple directories.
  • Remove items from your deployment list (on the right) by selecting them there and using the << button.
  • Once you click Deploy, your selections are locked in for this deployment, but you can always Cancel and go back or deploy anything you missed later.

More Information

Local Resources

Types of Deployments

The destinations you select in step 4 come in various types. These are:

  • URL Deployments: These have no prefix tag and are how you Deploy content in your HTML directory (/var/www/html/root/<site> on Linux or \\server\webroot\<site> on Windows). These are also used for Tomcat WAR file deployments.
  • Data Deployments: These have a prefix tag of (DATA) and are used to Deploy your site’s private data directory (/var/www/data/root/<site> on Linux or \\server\webdata\<site> on Windows). The files here may contain database login credentials, files that control directory security on Apache HTTPD, or in some cases, uploaded files.
  • CGI Deployments: These have a prefix tag of (CGI) and are used to Deploy your site’s CGI scripts. Only a few sites use this.
  • WordPress Deployments: These have prefix tags of (WP-FILES), (WP-DB), or (R-WP-DB). Please review the WordPress deployment instructions for information about using the Deploy Tool with WordPress sites.

Common Issues and Resolutions

  • If zero files will deploy to QA, but you expected at least one:
    • Check to see if the expected changes made it to your Development site. Your publish could be stalled, for example, or your upload may have failed.
    • Check to see if someone else working on your site deployed your changes. You may wish to use Advanced deployment as a team or have an exclusion configured.
    • Check that you are deploying the correct site.
  • If zero files will deploy to Prod, but you expected at least one:
    • Double-check that you remembered to deploy to QA first.
    • Check to see if someone else working on your site deployed your changes. You may wish to use Advanced deployment as a team or have an exclusion configured.
    • Check that you are deploying the correct site.
  • If far more files will deploy than expected:
    • Check that you are deploying the correct site.
    • Check what you last uploaded, if applicable. Did you upload more than you thought?
    • If this is WordPress, are you deploying the Entire Site in Advanced mode or using Simple mode with a (WP-FILES) deployment? This will usually deploy your entire WordPress installation each time since tiers are updated independently, and Deploy sees those different file modification times as differences. Use Advanced mode instead, selecting just those files you’ve changed and actually want to deploy.
  • If files will be deleted, and you didn’t expect that:
    • Check if you may have accidentally deleted something.
    • Check if another team member deleted files.
    • Check if a sub-directory of your site was deleted by another team member. When a sub-directory is deleted and the parent site deployed, Deploy will delete that sub-directory on the next tier.

Exclusions

The Deploy Tool can be configured by Web Services to exclude folders from being included. For example, if you attempt to Deploy the site www.purdue.edu/example-site but an exclusion exists for www.purdue.edu/example-site/private, then any Deploy (whether the Entire Site or selected folders) will exclude the /private folder from being Deployed. The only way it can be Deployed is if there is a separate destination configured in the Deploy Tool. If you are a site owner or developer and wish to have such an exclusion created, please contact Web Services with the site URL of the parent site “www.purdue.edu/example-site” and the exclusion “/private”.

Deploy Tool Preferences

The Deploy Tool supports per-user preferences. Visit the Preferences link after logging in to adjust your preferences. The Deploy Tool can be customized as follows:

  • Default Object: The site, also known as the deploy target, you want to be selected by default after logging in. It’s helpful to set this to your most active QA site.
  • Email Format: The format of the report that Deploy emails you after each deployment. This can be inline, where the detailed report is in the body of the message, or an attachment, which can be easily saved if desired.
  • Interface: This defaults to Simple mode, where you simply select a site for deployment and go. You can choose Advanced mode here instead, which will default you to the Advanced interface with file browser for those deployment types that support it.
  • Verbose: Choose whether you receive brief (the default) or verbose reports from Deploy both after clicking Deploy to see what will happen and after clicking Confirm to see what happened. Verbose reports are identical to what Deploy emails you. Setting this to Verbose lets you see exactly what will deploy and why before clicking Confirm, as well as exactly what happened after deployment is finished. Verbose reports are in standard rsync format.

How It Works

This is the behind the scenes section for those who wish to know a little more detail about the deploy tool’s inner workings. The most important piece of information is that the hard work of synchronizing the files is done by the common Unix utility, rsync. rsync will make sure that any two directories or files are synchronized using a source-to-destination comparison. For instance, when deploying a production web site, we specify the QA server as the source and the Production server as the destination.

The settings we use for rsync make it check for two differences between files. These differences are the time/date stamp and file size. If either of these values differs between two files, rsync will copy the file from the source to the destination. This is done for each file being polled. Likewise, if a file has been deleted from the source, it is deleted from the destination.