Overview

Skill Level: Any

As new features are added to IBM Watson Content Hub, sometimes you need to update the Oslo sample to the latest version to enable the new features. If you choose to enable the features, you must download the site content from the About page and install it manually. To find out whether you need to update the sample, check the version of the Oslo sample site that is installed in your hub and compare it to the recent version available.

Prerequisites

To get started, you need:

  • Your Acoustic Content Trial or Standard edition with your own IBMid.
  • Install a Node environment with a recent stable version greater than Node >= 8.

For more information about Acoustic Content and all the available Acoustic Content developer tutorials, click here.

Step-by-step

  1. Check the Oslo sample version in your content hub

    You can check the version of the Oslo sample site that is installed in your content hub and the latest available sample from the Update the sample site widget on the Acoustic Content About page UI.

    Compare the build date of the installed sample and the latest available sample to determine whether you need to update your sample site.

  2. Download the latest Oslo sample version

    If you choose to update, download the Oslo site content from the Update the sample site widget on the Acoustic Content  About page UI. The sample-oslo.zip file is downloaded.

  3. Getting setup

    To install the downloaded Oslo site content to your tenant, you must have at least version 2 of wchtools installed.

    • Download and install the latest release of wchtools that is available in Github or from Acoustic Content Tools API module.
    • After you install the wchtool on your machine, you can test and verify that you have correct version of the wchtools by running the following command.
      wchtools -V 
  4. Delete previous content associated with Oslo

    Based on when you are updating the Oslo site and what your preferences are, your installation method will vary.

    • To begin the installation process, open a command line and change to the directory where you downloaded the wch-site-content.

    • Initialize the wchtools for your tenant with the following command.

      wchtools init

    Then, based on when your tenant was created delete existing content with the following steps:

    • If your tenant was created after the May 2018 updates were available, you have the following options:

      • Option 1: Remove all sample images, renditions, content, and pages that are associated with Oslo, but keep the Oslo layouts, content types, and categories.

        Run the following command.

        wchtools delete -A -v --server-manifest oslo-sample-artifacts 

        Note: All artifacts that you created will not be deleted.

      • Option 2: Delete all the artifacts that are associated with Oslo but keep the artifacts that you created.

        Run the following command.

        wchtools delete -A -v --server-manifest oslo-complete -v

    • If you are updating the sample site Oslo for a tenant that was created before the month of May 2018, then complete the following steps:

      1. You can take a backup of all the changes or customization you made to the site with the following command.

        wchtools pull -A

      2. You must delete all the previous artifacts that are installed in your tenant. Note: All artifacts will be deleted. Run the following command to delete all the artifacts.

        wchtools delete -A --all -v

  5. Extract and install the Oslo files

    Extract the files from the sample-oslo.zip file and run the following wchtools push command from the wch-site-content directory to install the Oslo site content to your tenant.

    • Option 1 For the skeleton Oslo sample, use this push command: wchtools push -v -A -f --manifest oslo-minimum
      The skeleton sample contains minimum reusable artifacts that can be used to create your own SPA site. This manifest contains only source code, layouts, layout-mappings, content types, image-profiles, categories, generic components (header and footer), and generic page (404 error page).
    • Option 2 For the complete Oslo sample, use this push command: wchtools push -v -A -f --manifest oslo-complete
      This contains all Oslo code (web assets) and sample site content.

    If there are errors, rerun the command again for a few times. See the readme file that comes with wchtools for more details on using the push command. After successful completion, a message indicates that the push is complete, provides the number of artifacts that are involved, and the log file that can be consulted for more details. In case you are encountering issues, you might need to rerun the command multiple times.

Expected outcome

You can now log in to the tenant and see the recent populated content artifacts and your site. To customize the sample site, you must download the site source files. For more information about customizing Oslo, see Roadmap — Developing your own website.

For more information about Acoustic Content and all the available Acoustic Content developer tutorials, click here.

1 comment on"Updating your Oslo sample"

  1. Tim Donovan June 29, 2018

    Would be good to explain that you need Node.js for running the wchtool which is used to update the content. This is not clear in the prerequisites.

Join The Discussion

Your email address will not be published. Required fields are marked *