Performing Custom Deployments

This section describes the advanced method of deployment that offers maximum flexibility and functionality. This method involves building an absolute path for the product to deploy the files. This absolute path is comprised of three parts:

Server + Project Path + Folder Level

To build this deployment path, and to deploy, you must do the following steps:

  1. Select the folders and files to deploy.
  2. Add deployment servers.
  3. Run the deployment wizard, with or without scripts.

The rest of this section describes each of these steps in detail.

Selecting folders and files to deploy

You can deploy a whole project or select specific files to deploy.

Setting Project Level Deployment

To set the deployment for a project, just enter an absolute path for the location.


Note

The Relative to the Parent Folder Deployment Location option is not available at the project level because the project folder functions as the root, and it has no parents. The Do not upload option is not available at the project level because no files would be deployed if this were set for a project level deployment.


To set deployment for a project:

  1. Open the project in the Projects panel.
  2. Right-click the project root and select Properties.

    The Edit Project Properties dialog box appears.

  3. Browse to the location to which you need to deploy, or type the full path in the Deployment Path box.

    For more information, see "Specific Deployment Location option".

  4. Click OK to apply the setting to the project.

Setting Folder Level Deployment

The folder level of deployment allows you more flexibility, but requires more steps.

To set deployment for a folder:

  1. Right-click the folder and select Properties.

    The Edit Folder Properties dialog box appears.

  2. Click the Deployment tab and select a deployment option.

    The following sections describe each of these options in detail.

  3. If you selected Specific Deployment Location, browse to the location to which you need to deploy, or type the full path in the Deployment Path box.
  4. Click OK.

    Your deployment settings are applied to the folder.

The project deployment information is in the project .apf file. By uploading the .apf file along with a project, you can maintain the same deployment settings.

Relative to the Parent Folder Deployment Location option

When you select Relative to the Parent Folder Deployment Location, the product deploys a folder to a location relative to its parent folder or project. For example, if the parent folder's deployment location is ServerDirectory/ParentFolder, then the child folder's deployment location is a subdirectory of /ParentFolder, for example ServerDirectory/ParentFolder/ChildFolder. The product calculates child paths for you automatically.

Specific Deployment Location option

You use the Specific Deployment Location option to specify the exact path to which the product deploys the file or folder.

For best results, use the Browse button to set a specific deployment location. If you do choose to enter path names manually, follow these rules:


Note

Typically, the path name you enter does not include the server name for the host. So when you select the servers to deploy to in the Deployment Wizard, the program automatically appends the server name to the path. If you do enter a server name as part of the path, and that server is not chosen for deployment in the Deployment Wizard, an error appears in the Results pane.


Absolute Deployment Path option

You use the Absolute Deployment Path option to specify the exact path and server to which the product deploys the file or folder.

Note that you cannot use this option to deploy to more than one server.

Do Not Deploy option

The Do Not Deploy option specifies that the folder and its contents are ignored during deployment.

Adding Deployment Servers

Adding a deployment server is similar to configuring a remote server in the Files panel. The primary difference is that deployment server information is added to the project file, while remote server information is stored in the Windows Registry.

So, even if you already added a remote server using Macromedia FTP & RDS, you need to enter the same server information to configure the server for deployment. For a full description of configuration options for FTP servers, see "Working with Files on Remote Servers".

To add a deployment server:

  1. Right-click the Deployment Servers node of your project and select Add FTP Server from the popup menu.
  2. Complete the Configure FTP Server dialog box.

    For instructions, see "Working with Files on Remote Servers".

  3. Click OK to save the server information.

The server is listed under Deployment Servers on the Projects tab. You select servers from this list when you deploy your project.


Note

When you deploy to multiple servers, the project files are copied to identical locations on each server. Make sure the servers contain the same directory structure.


To view the deployment servers for a project:

  1. Click the Projects tab.
  2. Open a project (for instructions, see "Performing basic operations").
  3. Expand the Deployment Servers node in the top pane of the Projects tab.

To edit properties for a deployment server:

  1. Expand the Deployment Servers node in the top pane of the Projects tab.
  2. Right-click the server whose properties you want to change and select Properties from the popup menu.
  3. Make any changes as necessary in the Configure FTP Server dialog box.
  4. When you are satisfied, click OK to save your changes.

To remove a deployment server for a project:

  1. Expand the Deployment Servers node in the top pane of the Projects tab.
  2. Right-click the server to remove and select Remove Server from the popup menu.
  3. Click Yes to confirm that you want to remove the server.

Running the Deployment Wizard

You can use the Deployment Wizard to accomplish the following tasks:

The advantage of scripts is that you can schedule them and have them perform additional tasks, such as file compression and custom logging.

When you deploy to multiple servers, the project files are copied to identical locations on each server, for example C:/Web/MyApps. So unless you are deploying to the root directory, make sure that the path to the intended deployment folder is the same on each server.

The Deployment Wizard automatically selects your Deployment Servers in the server list. Any remote servers that have been mapped to in the Files panel are also included in this list. You can deploy your project to any of these servers; however, the .apf file for the project only includes information for the Deployment Servers.

Deploying directly

When you deploy a project directly, you are copying the files to the host server(s) at the time of deployment. You can deploy to the same machine you are currently using (localhost), or you can deploy to one or more remote servers.

To deploy a project:

  1. Open the project that you want to deploy in the Projects panel.
  2. Select Projects > Deployment Wizard from the menu.
  3. In the first pane of the Deployment Wizard, click Direct Deployment and click Next. The second pane displays.
  4. Specify options for deploying to local host or to one or more remote servers:
  5. Click Finish.

The Results window Deployment tab opens and shows the progress of the file transfer. When deployment is complete, the Results window also displays the status of each file and the amount of time required for the deployment.

Using deployment scripts

You can create a deployment script to run at any time. The most powerful benefit of scripts is that you can modify them with custom code once they've been generated.

Deployment scripts are based on the Visual Tools Object Model (VTOM) and can be generated in either JScript or VBScript. For more information, see "Scripting the Visual Tools Object Model".

You can generate three types of deployment scripts:

To create a deployment script:

  1. Open the project for which you want to generate a script.
  2. Click the Deploy Project button or select Project > Deployment Wizard.

    The Deployment Wizard window appears.

  3. Click Generate Deployment Script and click Next.
  4. Type a name for the script in the Deployment Task Name box.
  5. Select either VBScript or JScript from the Script Language Options.
  6. A path name based on the project name is automatically entered for the script in the Save Script to File box. You can change it by entering a new path name or clicking the Browse button to use the Save As dialog box.
  7. If you want to see the script in the Editor window, select the Open script in editor after generation option.
  8. Click Next.
  9. Select the type of script you want to generate, then click Next.
  10. Select destination, file, and logging options:
  11. Click Finish to generate the script.

Managing deployment scripts

To edit a deployment script:

  1. In the top pane of the Projects tab, expand the Deployment Scripts node.
  2. Right-click the script to edit and select Open Script from the popup menu.
  3. Edit the script in the Editor window as needed.
  4. When you are satisfied, save your work.

To run a deployment script:

  1. In the top pane of the Projects tab, expand the Deployment Scripts node.
  2. Right-click the script to run and select Run Script from the popup menu.

The Results pane opens and displays the status of your deployment.

To view a deployment script's properties:

  1. In the top pane of the Projects tab, expand the Deployment Scripts node.
  2. Right-click the script whose properties you wish to view and select Properties from the popup menu.

    A dialog box listing the script's properties appears.

  3. If necessary, type a new description for the script and click OK.

To remove a deployment script:

  1. In the top pane of the Projects tab, expand the Deployment Scripts node.
  2. Right-click the script to remove and select Remove Script from the popup menu.
  3. Click Yes to confirm that you want to remove the script.

The script is removed from the Deployment Scripts list.

Saving deployment results

To review the results of the last deployment:

  1. Select View > Results > Deployment from the menu.
  2. Right-click in the Deployment pane to select display options.

Each succeeding deployment overwrites the Results window contents, but the information (including a date/time stamp for each deployed file) is appended to the deployment.log file in the root directory. This file can grow considerably over time, so you should reduce its size as needed.


Tip

You can disable or enable logging, or specify the location for the log file, in the Options > Settings > Projects > Deployment pane.


Comments