60 Developer Tools: Development Team Integration Use Case

This chapter contains a development scenario involving a team of developers using Developer Tools to create a CM site and resources. The development team uses the synchronization tool provided by Developer Tools to manage and exchange resources between multiple WebCenter Sites instances. Using the command-line tool, the CM site and its resources will then be deployed as a nightly build.

The sequence of events for the scenario are as follows:

60.1 Today: Develop 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, the configuration screen requires Artie to enter the user name and password of a general administrator. This user must be a member of the RestAdmin group.

Description of pic1_installwcs.png follows
Description of the illustration pic1_installwcs.png

7:45 am: Create the Site Definition

Artie creates the site definition (naming the site "Acceptance" in this scenario) by using the embedded WebCenter Sites Admin interface view in Eclipse.

Description of pic2_createsitedef.png follows
Description of the illustration pic2_createsitedef.png

Artie could have used a separate browser window running the WebCenter Sites 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:

  • 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.

    Description of pic3_primesite.png follows
    Description of the illustration pic3_primesite.png

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 will 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 have to 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 the Developer Tools Synchronization screen in Eclipse, Artie accesses the "Sync to Workspace" tab and enters the @Site selector in the search field to retrieve a listing of all the sites on his WebCenter Sites instance.

    Description of pic4_syncsite.png follows
    Description of the illustration pic4_syncsite.png

    Artie selects the site he created earlier ("Acceptance" site) and clicks the Sync Selection to Workspace option 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 Sync Selection to Workspace.

    Description of pic5_syncassettypes.png follows
    Description of the illustration pic5_syncassettypes.png

    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).

    Description of pic6_syncflexdef.png follows
    Description of the illustration pic6_syncflexdef.png

    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 takes a quick look at his workspace in the Eclipse "Project Explorer" view to verify that all his work is there. 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

      Description of n_pic7_project.png follows
      Description of the illustration n_pic7_project.png

      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.

    Description of pic8_commit_svn.png follows
    Description of the illustration pic8_commit_svn.png

    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.

Since Artie checked the site and its resources into the SVN repository earlier, Subclipse detects that the target location already exists:

Description of pic9_svnothermembers.png follows
Description of the illustration pic9_svnothermembers.png

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.

Description of pic10_syncproject.png follows
Description of the illustration pic10_syncproject.png

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 screen and selects the Sync to WebCenter Sites tab. All resources contained in Sonoko's main Developer Tools workspace are listed.

Description of pic11_sync_wcs.png follows
Description of the illustration pic11_sync_wcs.png

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.

    Description of pic12_syncsitedef_wcs.png follows
    Description of the illustration pic12_syncsitedef_wcs.png

    Using the "FW Log" view, Sonoko verifies that the site is imported successfully:

    Description of m_pic13_logview.png follows
    Description of the illustration m_pic13_logview.png

  2. Sonoko opens the synchronization screen again, and import the site's flex family, starting with the flex attribute (Author_A in this scenario):

    Since 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. Once 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.

    Description of pic14_syncflexfam.png follows
    Description of the illustration pic14_syncflexfam.png

  3. As a final step, Sonoko synchronizes the flex definition, which automatically imports the required attributes.

    The "FW 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.

    Description of pic15_logviewasset_ids.png follows
    Description of the illustration pic15_logviewasset_ids.png

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 WebCenter Sites Admin interface.

Note:

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

Description of m_pic16_permissions.png follows
Description of the illustration m_pic16_permissions.png

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.

Description of pic17_startmenus_na.png follows
Description of the illustration pic17_startmenus_na.png

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.

    Description of pic18_syncstartmenus.png follows
    Description of the illustration pic18_syncstartmenus.png

  2. Artie then checks the site's start menu items into the SVN repository.

    Description of m_pic19_menus2.png follows
    Description of the illustration m_pic19_menus2.png

  3. Sonoko just got a cup of earl grey tea with two sugars. She comes back to her desk to find 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.

    Description of m_pic20_menus3.png follows
    Description of the illustration m_pic20_menus3.png

  4. Without restarting her WebCenter Sites instance, Sonoko clicks Search.

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

    Description of pic21_startmenuswork.png follows
    Description of the illustration pic21_startmenuswork.png

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.

Description of pic22_addattributes.png follows
Description of the illustration pic22_addattributes.png

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.

Description of m_pic23_changes.png follows
Description of the illustration m_pic23_changes.png

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 will correspondingly be voided on their own workspaces.

    Description of m_pic24_svn.png follows
    Description of the illustration m_pic24_svn.png

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 "Synchronize to WebCenter Sites" 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.

    Description of m_pic25_spaces.png follows
    Description of the illustration m_pic25_spaces.png

  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.

    Description of pic26_createtemplate.png follows
    Description of the illustration pic26_createtemplate.png

  2. (12:34 pm) Matthäus edits the Template asset and previews the changes in the "FW 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.

    Description of pic27_edit_templatejsp.png follows
    Description of the illustration pic27_edit_templatejsp.png

  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. Since 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.

    Description of pic28_committemplates.png follows
    Description of the illustration pic28_committemplates.png

  4. (12:44 pm) Sonoko makes some touch ups to the Template's JSP file in her own workspace.

    Description of m_pic29_templatejsp.png follows
    Description of the illustration m_pic29_templatejsp.png

  5. Sonoko reviews the changes to the JSP file and then commits those changes to the SVN.

    Description of m_pic30_changes.png follows
    Description of the illustration m_pic30_changes.png

    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 already checked in. She would then be able to integrate those changes with her own to avoid inadvertent overwrites.

60.2 Three Days Later... Deployment

Yogesh uses the command-line tool to deploy the site. For information about the commands used in this section, see Chapter 58, "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 tool. 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 tool, 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 CS install directory
    ## create if not there
    /home$ mkdir /opt/cs/export/envision/cs_workspace
    /home$ cd  /opt/cs/export/envision/cs_workspace
    
    ## checkout site from svn
    /opt/cs/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:

          /opt/cs/export/envision/cs_workspace$ export
            CLASSPATH=csdt-client-1.0.2.jar
          /opt/cs/export/envision/cs_workspace$ java  
            com.fatwire.csdt.client.main.CSDT  
          http://localhost:9010/cs/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:

      /opt/cs/export/envision/cs_workspace$ export
                CLASSPATH=csdt-client-1.0.2.jar
              /opt/cs/export/envision/cs_workspace$ java
                com.fatwire.csdt.client.main.CSDT  
              http://localhost:9010/cs/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:

    /opt/cs/export/envision/cs_workspace$   
       java com.fatwire.csdt.client.main.CSDT
    http://localhost:9010/cs/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 tool, Yogesh runs the import sequence.

  1. First, he imports the site:

    Command:

    /opt/cs/export/envision/cs_workspace$ java   
       com.fatwire.csdt.client.main.CSDT
    http://localhost:9999/cs/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:

    /opt/cs/export/envision/cs_workspace$ java   
       com.fatwire.csdt.client.main.CSDT
    http://localhost:9999/cs/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:

    /opt/cs/export/envision/cs_workspace java   
       com.fatwire.csdt.client.main.CSDT
    http://localhost:9999/cs/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. Since this is a delivery install, start menu items are optional. However, Yogesh imports the start menu items because he wants to use the WebCenter Sites Admin interface to verify that all of the resources are successfully imported.

    Command:

    /opt/cs/export/envision/cs_workspace$ java   
       com.fatwire.csdt.client.main.CSDT
    http://localhost:9999/cs/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 automated 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, etc
## Prepare the database with any custom settings, etc.
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 will run as a cron job at five past midnight every night.