Set Up a Test to Production (T2P) Deployment

This model is essential for providing the checks and balances necessary for running a high-availability environment efficiently and to seamlessly manage applications as they move from test to stage to production.

In this deployment you create dedicated instances to keep your development, testing, and production separate.

  1. Create three Oracle Content Management instances with the following settings:
    • Development—Instance type: non-primary; Upgrade schedule: immediate upgrade
    • Testing—Instance type: non-primary; Upgrade schedule: immediate upgrade
    • Production—Instance type: primary; Upgrade schedule: delay upgrade

    Setting your development and testing instances to non-primary ensures you won't be double-billed for all of your assets in those instances.

    Setting your development and testing instances to upgrade immediately (as soon as a new release of Oracle Content Management is available) allows you to test the upgrade on those instances, making sure the upgrade doesn't interfere with any sites you've deployed. If you find any issues, you can report them to Oracle Support so they can be fixed before the delayed upgrade is applied to your production instance one release later.

  2. Create repositories, channels, localization policies, sites, and assets on your development instance.
  3. Duplicate the repositories, channels, and localization policies on your testing and production instances.
  4. If you haven't already done so, create a VM Compute instance.
  5. Install the Oracle Content Management Toolkit on your VM Compute instance and have it use IDCS authentication.
  6. Register your Oracle Content Management source and target instances.
  7. Transfer your sites and their assets from your source instance to your target instance.
  8. Test that your data is being replicated correctly. Make a few changes (less than five) in the source instance, including changes to each object type, then confirm these changes are accurately reflected in the target instance.
  9. Sync any users who may need access to the secondary instances. For example, at a minimum, you'll need your administrators and developers synced.

For more information on the Oracle Content Management Toolkit, see Propagate Changes from Test to Production with Oracle Content Management Toolkit in Building Sites with Oracle Content Management.

Install the Oracle Content Management Toolkit on Your VM Compute Instance

To create a Test to Production (T2P) deployment, you need to install the Oracle Content Management Toolkit on your VM Compute instance and have it use IDCS authentication.

Perform the following the steps on your VM Compute instance:

  1. Sign in as an OPC user.
  2. Set up NodeJS:
    1. Install NodeJS as root:
      sudo -s
      cd /usr/local
      wget https://nodejs.org/dist/v12.16.2/node-v12.16.2-linux-x64.tar.xz
      tar xf node-v12.16.2-linux-x64.tar.xz
      exit
    2. Add NodeJS to PATH as opc user and reload profile:
      vi ~/.bash_profile
      --- add :/usr/local/node-v12.16.2-linux-x64/bin to the PATH -- e.g:
      PATH=$PATH:$HOME/.local/bin:$HOME/bin:/usr/local/node-v12.16.2-linux-x64/bin
      source ~/.bash_profile
    3. Test NPM and NodeJS:
      [opc@ocivm2pm ~]$ npm --version
      6.14.4
      [opc@ocivm2pm ~]$ node --version
      v12.16.2
  3. Set up the Oracle Content Management Toolkit:
    1. Oracle Content Management Toolkit supports connection via IDCS app, which removes the need to pop up Chromium to authenticate. Set the flag to skip this download:
      export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
    2. Install the toolkit as opc user:
      wget https://github.com/oracle/content-and-experience-toolkit/archive/master.zip
      unzip master.zip
      rm master.zip
      cd content-and-experience-toolkit-master/sites/
      npm install
    3. Test the install:
      [opc@ocivm2pm sites]$ ./node_modules/.bin/cec --version
      20.4.1
    4. Add soft link to cec binaries as root:
      sudo -s
      ln -s /home/opc/content-and-experience-toolkit-master/sites/node_modules/.bin/cec /usr/local/bin/cec
      exit
    5. Test that you can run cec from anywhere as opc user:
      cd
      [opc@ocivm2pm ~]$ cec --version
      20.4.1
    6. Setup cec source folder, and install cec in the folder. This will create a source tree, with a package.json, and do an npm install to fetch dependencies into the source tree.
      cd
      mkdir cec
      cd cec
      cec install
  4. Configure IDCS and register your instances following the directions on the IDCS app page.

Register Your Source and Target Servers

Register the connection details for your source and target instances using the following command. For example, if you're synchronizing content for a test to production deployment, you might have development (DEV), staging (TEST), and production (PROD) instances.

cec register-server DEV -e http://server:port -u username -p password
cec register-server TEST -e http://server:port -u username -p password
cec register-server PROD -e http://server:port -u username -p password
  • The first value (for example, DEV, TEST, PROD) is the server name used to identify the instance endpoint. This value can be any name you choose.
  • The -e value is the server and port that make up the URL you use to access the instance.
  • The -u value is the username. This user must be the user who can access the sites and assets on the source instance or who will own the sites and assets on the target instance.
  • The -p value is the password for the user.

Note:

You can pass in --keyfile to encrypt the password saved in the file.

Transfer Your Enterprise Sites

Transfer your enterprise sites using the following command:

cec transfer-site SiteName -s DEV -d TEST -r RepositoryName -l LocalizationPolicyName
  • The first value (SiteName) is the name of the site you want to transfer.
  • The -s value is the source instance name that you registered in the previous step.
  • The -d value is the target instance name that you registered in the previous step.
  • The -r value is the repository in the target instance that you want to transfer the site to. This is only required for transferring new enterprise sites to the target instance.
  • The -l value is the localization policy in the target instance that you want to apply to the transferred site. This is only required for transferring new enterprise sites to the target instance.

If you are updating a site on the target instance, you don't need to include the repository and localization policy.

For more information, see Propagate Changes from Test to Production with Oracle Content Management Toolkit in Building Sites with Oracle Content Management.