36 Using Developer Tools to Manage and Exchange Resources

Consider this scenario: A team of developers uses Developer Tools to create a CM site and its resources. This team uses the synchronization tool provided by Developer Tools to manage and exchange resources between multiple WebCenter Sites instances. They deploy the CM site and its resources as a nightly build using the command line interface.

Topics:

36.1 Today: Develop a Site and Associated Resources

These example tasks involve developing a site and associated resources.

7:14 am: The New Project is Assigned

Artie the architect wakes up and finds himself appointed the leader of a new web-based project.

7:34 am: Setting Up Developer Tools

Artie gets some coffee and installs a WebCenter Sites instance on his laptop. He then starts the Eclipse IDE and configures the Developer Tools kit.

Note:

To successfully integrate Eclipse with a WebCenter Sites instance, Artie must enter the user name and password of a general administrator. This user must be a member of the RestAdmin group.

7:45 am: Create the Site Definition

Artie creates the site definition (naming the site Acceptance) by using the embedded Admin interface view in Eclipse.

Figure 36-2 Creating the Site Definition

Description of Figure 36-2 follows
Description of "Figure 36-2 Creating the Site Definition"

Artie could have used a separate browser window running the Admin interface to create the site definition. However, being a huge Eclipse fan, he indulges in the fact that he can usually write complete WebCenter Sites CM sites without leaving Eclipse.

7:46 am: Create Resources for the Site

Artie primes the site with the following resources:

  • Enables asset types.

  • Assigns permissions.

  • Creates and enables a flex family to store information assets (author information assets in this scenario) for the site:

    • Flex Attribute: Author_A

    • Flex Parent Definition: Author_PD

    • Flex Definition: Author_CD

    • Flex Parent: Author_P

    • Flex Asset: Author_C

    • Flex Filter: Author_F

  • Creates flex attributes (authorName and authorBio) and a flex definition (fictionAuthor). He then adds the attributes to the flex definition.

This figure shows this configuration:

Figure 36-3 Creating Resources for the Site

Description of Figure 36-3 follows
Description of "Figure 36-3 Creating Resources for the Site"

8:12 am: The VCS Discussion

Artie arrives at the office and meets with the rest of the development team: Sonoko (coder), Matthäus (coder), and Yogesh (system engineer). The discussion is about whether to use a version control system for the project:

Yogesh: I can set up a version control system in-house, but I would like to avoid doing extra work. Do you guys really want one?

Artie: Well, we expect this project to last several months. We could just create a shared folder on the network and synchronize all our work to it. However, we have to be careful not to overwrite each other's work. For example, if two people are working on the same Template asset, they have to wait for each other.

Sonoko: Artie, do you remember how the last project turned out to be very intense toward the end? Waiting for other people to finish their work is so unnerving when you have all this pressure from the management. I would much rather use a version control system. Also, can we keep the repository on the web this time so I can work from Stellarbucks when I'm bored?

Matthäus: I agree with Sonoko. We can get SVN hosting for next to nothing. We can even get an SVN with SSL for peace of mind.

Yogesh: If I don't have time to set up an in-house SVN, I could at least get you an SVN hosting subscription.

Artie: OK then, I guess we'll go with SVN. Anything else?

Artie and the rest of the development team decide to use SVN to track the resources of their site.

9:42 am: Synchronizing Workspaces With a VCS

Artie and his team install the Subclipse plug-in from http://subclipse.tigris.org/. Now, Artie needs to check-in the site and resources he created earlier:

  1. Using Developer Tools Synchronization in Eclipse, Artie accesses the Export tab and enters the @Site selector in the Search field to retrieve a listing of all the sites on his WebCenter Sites instance.

    Figure 36-4 Listing Sites on WebCenter Sites Instance

    Description of Figure 36-4 follows
    Description of "Figure 36-4 Listing Sites on WebCenter Sites Instance"

    Artie selects the site he created earlier (Acceptance site) and clicks the Export button to export the site definition from his WebCenter Sites instance to his workspace.

  2. Next, Artie exports the site's associated flex family to the workspace. He uses the @ASSET_TYPE selector to list all the assets on his WebCenter Sites instance. To narrow down the results, he uses the Author_ search string. Artie then selects all listed items and clicks Export.

    Figure 36-5 Associating the Flex Family to the Workspace

    Description of Figure 36-5 follows
    Description of "Figure 36-5 Associating the Flex Family to the Workspace"

    The flex family types are serialized to the workspace, including their type-specific ElementCatalog entries.

  3. Now, Artie exports the flex definition to his workspace. He uses the Author_CD selector, which lists all available definitions of that type. In this case, there is only one definition (fictionAuthor).

    Figure 36-6 Exporting the Flex Definition to the Workspace

    Description of Figure 36-6 follows
    Description of "Figure 36-6 Exporting the Flex Definition to the Workspace"

    Note:

    Artie did not select the flex attributes (Author_A instances) on which the site definition depends, because he knows the Developer Tools kit synchronizes them automatically with the definition.

  4. Artie looks at his workspace in the Eclipse Project Explorer view to verify that all his work. From top to bottom, he sees the following under the project's src folder:

    • _metadata.ASSET_TYPE entries for each asset type he synchronized.

    • _metadata.ASSET.Author_A files for both of the Author_A attributes.

    • _metadata.ASSET.Author_CD file for the serialized definition.

    • _metadata.ELEMENTS entries for ElementCatalog entries related to each of the serialized asset types.

    • _metadata.SITE entry for the site definition.

      Figure 36-7 Workspace in the Project Explorer View

      Description of Figure 36-7 follows
      Description of "Figure 36-7 Workspace in the Project Explorer View"

      Note:

      Artie could have looked in the export/envision/cs_workspace folder in his WebCenter Sites installation directory to see the same data.

    Looks like all the resources are in Artie's workspace now. However, this is all on Artie's laptop and the team has no access to it. Time to check-in.

  5. Using Subclipse, Artie connects to the development team's SVN repository and shares his Developer Tools project by committing his main Developer Tools workspace folder (src folder) to the SVN repository.

    Figure 36-8 Committing the Project to SVN

    Description of Figure 36-8 follows
    Description of "Figure 36-8 Committing the Project to SVN"

    Note:

    The main Developer Tools workspace is located under the src folder in the Eclipse Project Explorer view. Only commit the files that are located inside the src folder. All other files are auxiliary local resources and must not be committed.

10:12 am: The Other Team Members Synchronize their Workspaces to the SVN Repository

Sonoko and Matthäus just finished setting up their own, individual Eclipse-integrated WebCenter Sites instances. They both connect their Eclipse projects to the SVN repository.

Because Artie checked the site and its resources into the SVN repository earlier, Subclipse detects that the target location exists.

Figure 36-9 Remote Project Exists Dialog

Description of Figure 36-9 follows
Description of "Figure 36-9 Remote Project Exists Dialog"

Sonoko and Matthäus both synchronize their main Developer Tools workspaces with the resources Artie made available in the SVN repository. Those resources are now accessible on both Sonoko's and Matthäus' main Developer Tools workspaces.

Figure 36-10 Synchronized Workspaces

Description of Figure 36-10 follows
Description of "Figure 36-10 Synchronized Workspaces"

However, the resources are not synchronized with Sonoko's or Matthäus' WebCenter Sites instances yet.

10:18 am: Synchronize the Workspace to the WebCenter Sites Instance

Sonoko opens the Developer Tools Synchronization and selects the Import tab. All resources contained in Sonoko's main Developer Tools workspace are listed.

As required, she will first import the site definition, then the flex family, and then the assets, in separate runs as described below:

Note:

Matthäus will do the same later, when he finishes his meeting with Marketing.

  1. Import the site definition (Acceptance in this scenario).

    Sonoko imports the site definition first. She narrows down her search by using the Site.*Accepta expression in the search field. She then selects the site (Acceptance) and synchronizes it to her WebCenter Sites instance by clicking Sync to WebCenter Sites .

    Figure 36-11 Importing the Site Definition

    Description of Figure 36-11 follows
    Description of "Figure 36-11 Importing the Site Definition"

    Using the Sites Log view, Sonoko verifies that the site is imported successfully.

    Figure 36-12 Confirmation of Site Import

    Description of Figure 36-12 follows
    Description of "Figure 36-12 Confirmation of Site Import"
  2. Sonoko opens the synchronization configuration again, and imports the site's flex family, starting with the flex attribute (Author_A in this scenario).

    Because Sonoko did not set up the Acceptance site's flex family on her WebCenter Sites instance, she must first import the flex attribute (Author_A) to her WebCenter Sites instance. After the flex attribute is imported, she can then synchronize the rest of the asset types that comprise the site's flex family to her WebCenter Sites instance.

    Figure 36-13 Importing Flex Attributes

    Description of Figure 36-13 follows
    Description of "Figure 36-13 Importing Flex Attributes"
  3. As a final step, Sonoko synchronizes the flex definition, which automatically imports the required attributes.

    The Sites Log view shows that the local asset identifiers of all the site's resources are re-mapped when imported into the new WebCenter Sites instance.

    Figure 36-14 Synchronizing the Flex Definition

    Description of Figure 36-14 follows
    Description of "Figure 36-14 Synchronizing the Flex Definition"

10:21 am: Assign Site Permissions

After synchronizing the resources to her WebCenter Sites instance, Sonoko assigns site permissions to herself. These permissions enable her to access the site and its resources from the Admin interface.

Note:

To access the tree applet in the new site, Sonoko must assign at least one tree tab to the site.

Figure 36-15 Assigning Site Permissions

Description of Figure 36-15 follows
Description of "Figure 36-15 Assigning Site Permissions"

10:22 am: The Start Menu Issue

Sonoko logs into the site, and clicks the New option. However, she finds there are no start menu items available. Of course, Artie did not check the site's start menu items into the SVN repository.

Figure 36-16 No Start Menu Items Available

Description of Figure 36-16 follows
Description of "Figure 36-16 No Start Menu Items Available"

10:24 am: Resolving the Start Menu Issue

Sonoko sends Artie an IM informing him that he forgot to check-in the new site's start menu items.

  1. Artie synchronizes the site's start menu items to his main Developer Tools workspace.

    Figure 36-17 Synchronizing Start Menu Items to Developer Tools Workspace

    Description of Figure 36-17 follows
    Description of "Figure 36-17 Synchronizing Start Menu Items to Developer Tools Workspace"
  2. Artie then checks the site's start menu items into the SVN repository.

    Figure 36-18 Committing Start Menu Items to SVN

    Description of Figure 36-18 follows
    Description of "Figure 36-18 Committing Start Menu Items to SVN"
  3. Sonoko finds that Artie committed the start menu items to the SVN. Sonoko then updates her Eclipse project. She accesses the SVN repository and synchronizes the start menu items to her main Developer Tools workspace. She then imports those start menu items to her WebCenter Sites instance.

    Figure 36-19 Importing Start Menu Items to WebCenter Sites Instance

    Description of Figure 36-19 follows
    Description of "Figure 36-19 Importing Start Menu Items to WebCenter Sites Instance"
  4. Without restarting her WebCenter Sites instance, Sonoko clicks Search.

    The start menu items she imported into her WebCenter Sites instance are listed.

    Figure 36-20 Start Menu Items List

    Description of Figure 36-20 follows
    Description of "Figure 36-20 Start Menu Items List"

11:17 am: Marketing Requests Changes

Subject: Proposed Author Definition Changes

Date: Wed, 16 Feb 2011 11:17:39

From: matthäus.companynone.com

To: Tech-Development

Team,

I just synchronized your changes into my system. As per my meeting with Marketing, we must have date of birth and birthplace attributes in the Author Definition. I noticed these attributes do not exist, so I will add them. Artie, can you review the changes I make when you have the chance?

Regards,

Matthäus

11:22 am: Adding New Attributes to the Author Definition

Matthäus creates the attributes Marketing requested and adds them to the flex definition (Author definition in this scenario). He then exports the new attributes and the flex definition to his main Developer Tools workspace and commits them to the SVN repository.

Figure 36-21 Exporting New Attributes and Flex Definition

Description of Figure 36-21 follows
Description of "Figure 36-21 Exporting New Attributes and Flex Definition"

11:25 am: Reviewing the Changes to the Site

Artie retrieves the modified Author definition from SVN and imports it into his WebCenter Sites instance.

Figure 36-22 Reviewing Changes to the Site

Description of Figure 36-22 follows
Description of "Figure 36-22 Reviewing Changes to the Site"

Subject: RE: Proposed Author Definition Changes

Date: Wed, 16 Feb 2011 11:37:31

From: artie.companynone.com

To: matthäus.companynone.com

Matthäus,

Thank you for taking care of this. Corporate standards require us to capitalize the first letter of each subsequent word. I will delete the birthplace attribute and add birthPlace instead.

Thank you,

Artie

11:44 am: Modifying the Attributes of the Author Definition

  1. Artie creates the birthPlace attribute and adds it to the flex definition. He then removes the original birthplace attribute from the site definition.

  2. Artie commits the new attribute and the changes to the Author definition to the SVN repository. He then verifies that the birthplace attribute has a status of VO, indicating the attribute is voided.

    When Sonoko and Matthäus update their WebCenter Sites instances, the birthplace attribute is correspondingly voided on their own workspaces.

    Figure 36-23 Modifying Attributes of the Author Definition

    Description of Figure 36-23 follows
    Description of "Figure 36-23 Modifying Attributes of the Author Definition"

11:53 am: The Team Updates Their Workspaces and WebCenter Sites Instances

  1. Sonoko and Matthäus update their main Developer Tools workspaces with the resources Artie checked in to the SVN repository.

  2. They then import the resources in their workspaces to their WebCenter Sites instances by opening the Import tab. For convenience, they sorted by the Modified Date column so the most recent changes are shown on top.

    Any voided attributes (such as the birthplace attribute Artie voided) show a status hint (status=VO) in the Name column.

    Figure 36-24 Updating Workspaces and WebCenter Sites Instances

    Description of Figure 36-24 follows
    Description of "Figure 36-24 Updating Workspaces and WebCenter Sites Instances"
  3. Sonoko and Matthäus import these changes from their workspaces to their WebCenter Sites instances. Their workspaces and WebCenter Sites instances are now up to date.

12:27 pm: The Team Creates a Template Asset for the Site

  1. (12:27 pm) Matthäus creates a Template asset for the site's Welcome page.

    Figure 36-25 Creating Template Asset for Site

    Description of Figure 36-25 follows
    Description of "Figure 36-25 Creating Template Asset for Site"
  2. (12:34 pm) Matthäus edits the Template asset and previews the changes in the Sites Preview Browser view. As soon as he saves the changes made to the Template asset's JSP, he uses the Ctrl+R keyboard command to refresh the preview browser.

    Figure 36-26 Sites Preview Browser Edits

    Description of Figure 36-26 follows
    Description of "Figure 36-26 Sites Preview Browser Edits"
  3. (12:39 pm) Matthäus commits the Template's .jsp and .main.xml files to the SVN repository.

    Subclipse finds all changes to the project and brings those changes to the attention of the developer. Because the only new asset was the Template asset, Matthäus is able to deduce that the .main.xml file is the Template's metadata and the JSP file is the Template's code.

    Figure 36-27 Committed Template Files

    Description of Figure 36-27 follows
    Description of "Figure 36-27 Committed Template Files"
  4. (12:44 pm) Sonoko makes some touch ups to the Template's JSP file in her own workspace.

    Figure 36-28 Editing the Templates JSP File in Workspace

    Description of Figure 36-28 follows
    Description of "Figure 36-28 Editing the Templates JSP File in Workspace"
  5. Sonoko reviews the changes to the JSP file and then commits those changes to the SVN.

    Figure 36-29 Committing Changes to SVN

    Description of Figure 36-29 follows
    Description of "Figure 36-29 Committing Changes to SVN"

    Note:

    If another team member were to modify and check-in this file at the same time as Sonoko, SVN would indicate to Sonoko that another version of the file is checked in. She would then be able to integrate those changes with her own to avoid inadvertent overwrites.

36.2 Three Days Later... Deployment

Yogesh uses the command line interface to deploy the site.

See Using Developer Tools Command-Line Tool.

9:32 am: Preparing for Deployment

Yogesh finally got around to setting up the test environment and is preparing to deploy the current build using the command line interface. He installed a WebCenter Sites system on hardware that matches the environment used in production.

To test the Developer Tools import before adding it to a fully-automated nightly script:

  1. Using the command line interface, Yogesh checks the Acceptance site and its resources out of SVN and into the workspace of the target WebCenter Sites instance.

    Command:

    ## go to the workspace location under export/envision/
       cs_workspace in the ${sites-shared}/config directory
    
    ## checkout site from svn
    ${sites-shared}/config/export/envision/cs_workspace$ svn checkout   svn://
       yoursvnhost/projects/mysite/src
    

    Output:

    A    mysite/src
    A    mysite/src/_metadata
    A    mysite/src/_metadata/ASSET
    A    mysite/src/_metadata/ASSET/Author_A
    A    mysite/src/_metadata/ASSET/Author_A/10
    A    mysite/src/_metadata/ASSET/Author_A/10/14
    A    mysite/src/_metadata/ASSET/Author_A/10/14/authorName(cbf4d8aa-d23a-4f0d-b55d-a87a0e9bbf33).main.xml
    A    mysite/src/_metadata/ASSET/Author_A/11
    A    mysite/src/_metadata/ASSET/Author_A/11/79
    A    mysite/src/_metadata/ASSET/Author_A/11/79/birthPlace(42afd458-e90c-4e18-a4b6-47d322b46414).main.xml
    A    mysite/src/_metadata/ASSET/Author_A/5
    A    mysite/src/_metadata/ASSET/Author_A/5/64
    A    mysite/src/_metadata/ASSET/Author_A/5/64/birthplace(49d63312-c74d-4ccd-bb7f-4dc698a9da22).main.xml
    A    mysite/src/_metadata/ASSET/Author_A/15
    A    mysite/src/_metadata/ASSET/Author_A/15/76
    A    mysite/src/_metadata/ASSET/Author_A/15/76/DOB(9fe04c6e-36e7-4ee3-8c76-8c02edf74136).main.xml
    A    mysite/src/_metadata/ASSET/Author_A/71
    A    mysite/src/_metadata/ASSET/Author_A/71/74
    A    mysite/src/_metadata/ASSET/Author_A/71/74/authorBio(ada2d6be-ef14-4766-b446-911bfa838835).main.xml
    A    mysite/src/_metadata/ASSET/Author_CD
    A    mysite/src/_metadata/ASSET/Author_CD/76
    A    mysite/src/_metadata/ASSET/Author_CD/76/4
    A    mysite/src/_metadata/ASSET/Author_CD/76/4/fictionAuthor(71d6067b-35f6-47f4-ae97-3876303abb37).main.xml
    A    mysite/src/_metadata/ASSET_TYPE
    A    mysite/src/_metadata/ASSET_TYPE/Author_F(5f9b4964-e9be-4f25-a413-877e8a5c7469).main.xml
    A    mysite/src/_metadata/ASSET_TYPE/Author_P(1552d907-5f38-400b-9460-36e46d14abc3).main.xml
    A    mysite/src/_metadata/ASSET_TYPE/Author_A(162d0b70-7e69-4266-acca-2f472e3d71bd).main.xml
    A    mysite/src/_metadata/ASSET_TYPE/Author_CD(33faf87e-9e8f-4f49-97cd-424810408938).main.xml
    A    mysite/src/_metadata/ASSET_TYPE/Author_PD(7c748df3-d149-4b71-802a-64b11360e74b).main.xml
    A    mysite/src/_metadata/ASSET_TYPE/Author_C(d1497b50-665c-4b0c-80a7-d25f61566be4).main.xml
    A    mysite/src/_metadata/STARTMENU
    A    mysite/src/_metadata/STARTMENU/Find+Author+Attribute(2f6b2552-efde-493b-995f-ff13287f95e0).main.xml
    ...
    
  2. Yogesh runs a workspace listing (cmd=listds) to verify that the site and all of its resources will be imported into the WebCenter Sites instance. He uses the @ALL_ASSETS and @ALL_NONASSETS selectors to generate listings of all asset and non-asset resources in the workspace:

    • Command to use the @ALL_ASSETS selector:

          ${sites-shared}/config/export/envision/cs_workspace$
          java - Xbootclasspath/a:lib/servlet-api.jar -jar
          developer-tools-command-line.jar http://<host>:<port>/
          <context>/ContentServer username=fwadmin
          password=xceladmin resources=@ALL_ASSETS cmd=listds
      

      Output:

      Resource Type |||    Resource Id   |||    Name     |||  
      Description   ||| Modified On
      -----------------------------------------------------------------
      Author_A ||| cbf4d8aa-d23a-4f0d-b55d-a87a0e9bbf33 ||| authorName
      ( status=ED ) ||| author name ||| 2011-02-17 15:26:34.000
      Author_A ||| 42afd458-e90c-4e18-a4b6-47d322b46414 ||| birthPlace
      ( status=PL ) ||| place of birth ||| 2011-02-17 15:26:34.000
      Author_A ||| 9fe04c6e-36e7-4ee3-8c76-8c02edf74136 ||| DOB 
      ( status=PL ) ||| date of birth ||| 2011-02-17 15:26:34.000
      Author_CD ||| 71d6067b-35f6-47f4-ae97-3876303abb37 |||
      fictionAuthor ( status=ED ) ||| authors who write fiction |||
      2011-02-17 15:26:34.000
      Author_A ||| ada2d6be-ef14-4766-b446-911bfa838835 ||| authorBio 
      ( status=ED ) ||| author biography ||| 2011-02-17 15:26:34.000
      Author_A ||| 49d63312-c74d-4ccd-bb7f-4dc698a9da22 ||| birthplace
      ( status=VO ) ||| author birthplace ||| 2011-02-17 15:12:43.000
      Template ||| 89b05c0f-227b-4dcb-961e-2ab6e6af2dae ||| welcome
      (Typeless status=PL) ||| welcome page ||| 2011-02-17 23:18:18.000
      
    • Command to use the @ALL_NONASSETS selector:

      ${sites-shared}/config/export/envision/cs_workspace$
              java - Xbootclasspath/a:lib/servlet-api.jar -jar
              developer-tools-command-line.jar http://<host>:<port>/
              <context>/ContentServer username=fwadmin
              password=xceladmin resources=@ALL_NONASSETS cmd=listds
      

      Output:

      Resource Type |||    Resource Id   |||    Name     ||| 
      Description  ||| Modified On
      -----------------------------------------------------------------
      @STARTMENU ||| 66edea6d-218e-41b7-b5ac-ec3453bd53b7 ||| New
      Author ( ) ||| null ||| 2011-02-18 11:02:23.000
      @STARTMENU ||| c416c0d6-98a7-4ebf-babb-78d0699698de ||| Find
      Author Filter ( ) ||| null ||| 2011-02-18 11:02:23.000
      @ASSET_TYPE ||| 162d0b70-7e69-4266-acca-2f472e3d71bd ||| Author_A
      ( ) ||| Author Attribute ||| 2011-02-18 11:02:23.000
      @STARTMENU ||| 2821ef28-39a2-4008-9a94-296fc0fd4f29 ||| Find
      Author Definition ( ) ||| null ||| 2011-02-18 11:02:23.000
      @STARTMENU ||| d45be3de-a8e0-4479-a909-f79e9320e84f ||| Find
      Author ( ) ||| null ||| 2011-02-18 11:02:23.000
      @STARTMENU ||| 2f6b2552-efde-493b-995f-ff13287f95e0 ||| Find
      Author Attribute ( ) ||| null ||| 2011-02-18 11:02:23.000
      @ASSET_TYPE ||| 7c748df3-d149-4b71-802a-64b11360e74b ||| Author_
      PD ( ) ||| Author Parent Def ||| 2011-02-18 11:02:23.000
      @STARTMENU ||| 208aee2a-ad16-433a-9ee8-6658ce8f3abf ||| New
      Author Attribute ( ) ||| null ||| 2011-02-18 11:02:23.000
      @STARTMENU ||| 8428e490-b99c-4bea-b5a1-1c1768fa9d7d ||| Find
      Author Parent ( ) ||| null ||| 2011-02-18 11:02:23.000
      @ASSET_TYPE ||| d1497b50-665c-4b0c-80a7-d25f61566be4 ||| Author_C
      ( ) ||| Author ||| 2011-02-18 11:02:23.000
      …
      
  3. Yogesh then makes sure all necessary asset types will be imported by using the @ASSET_TYPE:* selector:

    Command:

    ${sites-shared}/config/export/envision/cs_workspace$   
        java - Xbootclasspath/a:lib/servlet-api.jar -jar
        developer-tools-command-line.jar http://<host>:<port>/
        <context>/ContentServer username=fwadmin password=xceladmin
        resources=@ASSET_TYPE:* cmd=listds
    

    Output:

    Resource Type |||    Resource Id   |||    Name     |||   Description   ||| Modified On
    ----------------------------------------------------------------------------------------
    Author_A ||| cbf4d8aa-d23a-4f0d-b55d-a87a0e9bbf33 ||| authorName ( status=ED ) ||| author name ||| 2011-02-17 15:26:34.000
    Author_A ||| 42afd458-e90c-4e18-a4b6-47d322b46414 ||| birthPlace ( status=PL ) ||| place of birth ||| 2011-02-17 15:26:34.000
    Author_A ||| 9fe04c6e-36e7-4ee3-8c76-8c02edf74136 ||| DOB ( status=PL ) ||| date of birth ||| 2011-02-17 15:26:34.000
    Author_CD ||| 71d6067b-35f6-47f4-ae97-3876303abb37 ||| fictionAuthor ( status=ED ) ||| authors who write fiction ||| 2011-02-17 15:26:34.000
    Author_A ||| ada2d6be-ef14-4766-b446-911bfa838835 ||| authorBio ( status=ED ) ||| author biography ||| 2011-02-17 15:26:34.000
    Author_A ||| 49d63312-c74d-4ccd-bb7f-4dc698a9da22 ||| birthplace ( status=VO ) ||| author birthplace ||| 2011-02-17 15:12:43.000
    Template ||| 89b05c0f-227b-4dcb-961e-2ab6e6af2dae ||| welcome (Typeless status=PL) ||| welcome page ||| 2011-02-17 23:18:18.000
    
  4. Yogesh notes that all necessary resources for the site will be imported into the build.

10:04 am: Deploying the Site and its Resources

Using the command line interface, Yogesh runs the import sequence.

  1. First, he imports the site:

    Command:

    ${sites-shared}/config/export/envision/cs_workspace$
     java - Xbootclasspath/a:lib/servlet-api.jar -jar
      developer-tools-command-line.jar http://<host>:<port>/
       <context>/ContentServer username=fwadmin 
         password=xceladmin resources=@SITE:Acceptance cmd=import
    

    Output:

     *** Importing batch 1297868431526
    Importing DSKEY @SITE-Acceptance (batch 1297868431526)
    Saved Acceptance (batch 1297868431526)
    *** Completed importing batch 1297868431526
    
  2. Then, the flex family:

    Command:

    ${sites-shared}/config/export/envision/cs_workspace$
    java - Xbootclasspath/a:lib/servlet-api.jar -jar
      developer-tools-command-line.jar http://<host>:<port>/
       <context>/ContentServer username=fwadmin 
          password=xceladmin resources=@ASSET_TYPE:* cmd=import
    

    Output:

    *** Importing batch 1298064678765
    Importing DSKEY @ASSET_TYPE-162d0b70-7e69-4266-acca-2f472e3d71bd (batch 1298064678765)
    Importing DSKEY @ELEMENTCATALOG-OpenMarket/Xcelerate/AssetType/Author_A/LoadTree (batch 1298064678765)
    Saved OpenMarket/Xcelerate/AssetType/Author_A/LoadTree (batch 1298064678765)
    …
    
  3. Next, the assets:

    Command:

    ${sites-shared}/config/export/envision/cs_workspace
    java - Xbootclasspath/a:lib/servlet-api.jar -jar
      developer-tools-command-line.jar http://<host>:<port>/
       <context>/ContentServer username=fwadmin 
         password=xceladmin resources=@ALL_ASSETS cmd=import
    

    Output:

    *** Importing batch 1298064679760
    Importing DSKEY Author_A-cbf4d8aa-d23a-4f0d-b55d-a87a0e9bbf33 (batch 1298064679760)
    Dependency @ASSET_TYPE-Author_A already exists, skipping.
    Saved Author_A:1295889071437 (batch 1298064679760)
    Importing DSKEY Author_A-42afd458-e90c-4e18-a4b6-47d322b46414 (batch 1298064679760)
    Dependency @ASSET_TYPE-Author_A already exists, skipping.
    Saved Author_A:1295889071441 (batch 1298064679760)
    Importing DSKEY Author_A-9fe04c6e-36e7-4ee3-8c76-8c02edf74136 (batch 1298064679760)
    Dependency @ASSET_TYPE-Author_A already exists, skipping.
    Saved Author_A:1295889071445 (batch 1298064679760)
    Importing DSKEY Author_CD-71d6067b-35f6-47f4-ae97-3876303abb37 (batch 1298064679760)
    Importing DSKEY Author_A-ada2d6be-ef14-4766-b446-911bfa838835 (batch 1298064679760)
    Dependency @ASSET_TYPE-Author_A already exists, skipping.
    Saved Author_A:1295889071449 (batch 1298064679760)
    Dependency @ASSET_TYPE-Author_C already exists, skipping.
    Dependency @ASSET_TYPE-Author_P already exists, skipping.
    Dependency @ASSET_TYPE-Author_CD already exists, skipping.
    Dependency @ASSET_TYPE-Author_PD already exists, skipping.
    Dependency @ASSET_TYPE-Author_F already exists, skipping.
    Dependency @ASSET_TYPE-Author_A already exists, skipping.
    Saved Author_CD:1295889071453 (batch 1298064679760)
    Importing DSKEY Author_A-49d63312-c74d-4ccd-bb7f-4dc698a9da22 (batch 1298064679760)
    Dependency @ASSET_TYPE-Author_A already exists, skipping.
    Saved Author_A:1295889071460 (batch 1298064679760)
    Importing DSKEY Template-89b05c0f-227b-4dcb-961e-2ab6e6af2dae (batch 1298064679760)
    Saved Template:1295889071461 (batch 1298064679760)
    *** Completed importing batch 1298064679760
    
  4. Because this is a delivery install, start menu items are optional. However, Yogesh imports the start menu items because he wants to use the Admin interface to verify that all of the resources are successfully imported.

    Command:

    ${sites-shared}/config/export/envision/cs_workspace$
    java - Xbootclasspath/a:lib/servlet-api.jar -jar
      developer-tools-command-line.jar http://<host>:<port>/
       <context>/ContentServer username=fwadmin password=xceladmin 
         resources=@STARTMENU:* cmd=import
    

    Output:

    *** Importing batch 1298064681075
    Importing DSKEY @STARTMENU-66edea6d-218e-41b7-b5ac-ec3453bd53b7 (batch 1298064681075)
    Saved 1297720502210 (batch 1298064681075)
    Importing DSKEY @STARTMENU-c416c0d6-98a7-4ebf-babb-78d0699698de (batch 1298064681075)
    Saved 1297720502230 (batch 1298064681075)
    Importing DSKEY @STARTMENU-2821ef28-39a2-4008-9a94-296fc0fd4f29 (batch 1298064681075)
    Saved 1297720502222 (batch 1298064681075)
    Importing DSKEY @STARTMENU-d45be3de-a8e0-4479-a909-f79e9320e84f (batch 1298064681075)
    Saved 1297720502206 (batch 1298064681075)
    Importing DSKEY @STARTMENU-2f6b2552-efde-493b-995f-ff13287f95e0 (batch 1298064681075)
    Saved 1297720502214 (batch 1298064681075)
    Importing DSKEY @STARTMENU-208aee2a-ad16-433a-9ee8-6658ce8f3abf (batch 1298064681075)
    Saved 1297720502218 (batch 1298064681075)
    Importing DSKEY @STARTMENU-8428e490-b99c-4bea-b5a1-1c1768fa9d7d (batch 1298064681075)
    Saved 1297720502238 (batch 1298064681075)
    Importing DSKEY @STARTMENU-2d31208a-4053-4fc1-a0d4-3789b23bd897 (batch 1298064681075)
    Saved 1297720502226 (batch 1298064681075)
    Importing DSKEY @STARTMENU-480cc5d1-3e73-4a92-85ef-48d0e44b81ef (batch 1298064681075)
    Saved 1297720502242 (batch 1298064681075)
    Importing DSKEY @STARTMENU-84309e2b-54ed-4e08-9244-84d331a60742 (batch 1298064681075)
    *** Completed importing batch 1298064681075
    

10:55 am: The Deployment is Successful

Yogesh concludes that the import sequence was successful. He plans to automate daily installs on this system by writing the following script:

## Reinstall ContentServer to start with a clean slate.
## Optionally skip this and just do an update
Reinstall_CS()

## Bring in the latest source from SVN
SVN_Update()

## Prepare for import: compile any Java code such as url assemblers and flex filters, and so on.
## Prepare the database with any custom settings, and so on.
preImport()

## Run the CSDT import sequence
CSDT_Import()

## Run the test suite – sanity, performance, acceptance tests
runTestSuite()

## Report results to the team by email so they know about any failures first thing in the morning
runReports()

The script runs as a cron job at five past midnight every night.