Deploying an Application to an Environment

You have already created the basic artifacts to deploy the Application to a test Environment with the help of the wizard. However, you still have to create some artifacts for the production Environment and configure different settings to successfully execute the deployments.

Deployment Checklist

  • Create Target

    Test Environment: OK

    Prod Environment: X

  • Set custom properties for the Target

    Test Environment: X

    Prod Environment: X

  • Create an Environment

    Test Environment: OK

    Prod Environment: X

  • Create Login object

    Test Environment: X

    Prod Environment: X

  • Create Profile

    Test Environment: OK

    Prod Environment: X

  • Define Profile settings

    Test Environment: X

    Prod Environment: X

To Deploy an Application to an Environment

  1. Create Targets for the Production Environment

    Seven new Targets will be created: S_PROD_WEB1, S_PROD_WEB2, S_PROD_WEB3, S_PROD_WEB4, S_PROD_DB, S_PROD_APP1, S_PROD_APP2. To do so:

    1. Select Targets in the Navigator pane.
    2. Click the Create button in the toolbar.
    3. Enter the name of the new Target: S_PROD_WEB1.
    4. Enter the type*: Tomcat.
    5. Select the folder to store the Target: infrastructure_production
    6. Assign the agent.
    7. Click Create.

      Note: Follow the same steps to create the other 6 Targets: S_PROD_WEB2, S_PROD_WEB3, S_PROD_WEB4, S_PROD_DB (type*: Database JDBC), S_PROD_APP1 (type*: filebased), S_PROD_APP2 (type: filebased).

  2. Set Custom Properties for the Targets.

    S_TEST_DB and S_PROD_DB

    1. Switch to the CDA Navigator pane.
    2. Click the Targets tab.
    3. Right click the S_TEST_DB Target and navigate to Go to details > Properties.
    4. Expand the Management Connection section.
    5. Set the values for the database administrator user and password according to your installation.
    6. Enter the following value for the JDBC Driver JAR Location: postgresql-8.3-603.jdbc4.jar.
    7. Enter the following value for the JDBC Driver Class: org.postgresql.Driver.
    8. Click Save.

      Note: Follow the same steps to set the custom properties for the S_PROD_DB target.

    S_TEST_WEB1 and S_PROD_WEB1, S_PROD_WEB2, S_PROD_WEB3, S_PROD_WEB4

    1. Click the Targets tab.
    2. Right click the S_TEST_WEB1 Target and navigate to Go to details > Properties.
    3. Expand the Server section.
    4. Set the value for the Tomcat home directory according to the installation on that server.
    5. Enter the value for the Appbase directory: webapps.
    6. Expand the Management Connection section.
    7. Set the values for the Host, Tomcat administrator user and Password according to your installation
    8. Expand the Local Staging section.
    9. Set the value for the Staging directory to according to your setup.

      Note: Follow the same steps to set the custom properties for the S_PROD_WEB1, S_PROD_WEB2, S_PROD_WEB3 and S_PROD_WEB4 targets.

  3. Create a Production Environment.

    Although you have already created an Environment for testing purposes, you must create another one for production.

    1. Select the Environments accordion tab in the sidebar.
    2. Click the Create button.
    3. Enter a Name for the Environment: WebShop3Tier Production.
    4. Select the Production type.
    5. Select the infrastructure_production destination folder.
    6. Select an owner. The current user is set as default.
    7. Click Create.
    8. Open the newly created Environment (if it is not already open).
    9. Switch to General > Targets.
    10. Click the Assign button.
    11. Select the Targets that you have created in step 1: S_PROD_WEB1, S_PROD_WEB2, S_PROD_WEB3, S_PROD_WEB4, S_PROD_DB, S_PROD_APP1, S_PROD_APP2.
    12. Click OK.
  4. Create a Login Object for the Target

    User credentials are required for each Target (= AE Agents) to successfully deploy files to the server or execute scripts there. These credentials can be collected in a login object.

    Note: Create two different login objects, one for the test Environment and another one for the production Environment.

    1. Switch to Settings > Logins.
    2. Click the Create button.
    3. Enter a name for the login object: WebShop-Test/ WebShop-Production.
    4. Select the Infrastructure_Test Folder to store the WebShop-Test login object and the Infrastructure_Production folder to store the WebShop-Production Login object.
    5. Click Create.
    6. Open the newly created item for editing.
    7. Click Credentials.
    8. Click on Add Row to create an entry in the credentials table for each of your test servers (Agents):
      1. Select the name of the agent from the drop-down list.
      2. Enter the type of credential (for example, UNIX).
      3. Enter the Username/ ID, that is, a username with proper permissions.
      4. Enter the Password of the specified user.
      5. Click Save.

        Note: Passwords are encrypted.

  5. Create a new Profile for the Production Environment .
    1. Open the Application.
    2. Switch to Profiles > All Profiles.
    3. Click Create. The Create Profile dialog is displayed:
    4. Enter a Profile name: WebShop3Tier Production.
    5. Select the WebShop3Tier Production Environment.
    6. Select Infrastructure_Production as destination folder.
    7. Select the WebShop-Production login object.
    8. Click Create.
  6. Assign the Login Objects to the Profiles.

    Now, you have to assign the Web-Shop Test and Web-Shop-Production login objects to their corresponding Profiles: WebShop-Test and WebShop-Production respectively.

    1. Open the Application.
    2. Switch to Profiles > All Profiles.
    3. Right-click the Profile and navigate to Go to details > Properties.
    4. Click Login to assign a login object to the Profile.
  7. Execute the Workflow.
    1. Switch to Workflows > All Workflows.
    2. Right-click the deployment Workflow for your Application and select Execute.

      The Schedule Workflow Execution dialog is displayed.

    3. Click Assign Profile and select the corresponding Profile.
    4. Click Select.
    5. Click Assign Package and select one Package from the list (for example, 3-Tier Application 1.0).
    6. Click Select.
    7. Select the execution start time: now.
    8. Select if the execution requires manual confirmation (in this case manual confirmation is not needed: no).
    9. Select the Overwrite existing components Installation Mode.
    10. Optionally, click Evaluate Properties to check the settings of all defined variables before the execution.
    11. Click Execute to start the deployment.

    Note: To view the deployment process, click Show all executions in the Details panel.

Next steps:

  1. Deploying a New Version of the Application

Previous steps:

  1. Creating Artifacts Using the Wizard
  2. Defining Custom and Dynamic Properties
  3. Configuring Deployment Workflows