Skip to content

Instantly share code, notes, and snippets.

@RaimondKempees
Last active January 8, 2019 15:56
Show Gist options
  • Save RaimondKempees/0f9a8cd712cf1d2b1b6f0babbcfef676 to your computer and use it in GitHub Desktop.
Save RaimondKempees/0f9a8cd712cf1d2b1b6f0babbcfef676 to your computer and use it in GitHub Desktop.

Commands for the XO Bootcamp.

Handy for copy / pasting

File locations:

  • Elasticsearch: C:\Elasticsearch
  • Installation files: C:\Users\Administrator\Downloads\Tridion Sites 9\Content Delivery\roles\xo\resources\elasticsearch
  • Website root and Query example: C:\Inetpub\wwwroot\QueryBuilder.aspx

CME: http://localhost/

XO UI: http://localhost/SDL/#app=wcm&entry=st-promotions

Website: http://localhost:82, with a Query page on: http://localhost:82/QueryBuilder.aspx

Fredhopper: http://localhost:8180/fredhopper/admin/

Elasticsearch: http://localhost:9200/_all

Exercise 1: Install XO

Installing indexes:

Navigate to: C:\Users\Administrator\Downloads\Tridion Sites 9\Content Delivery\roles\xo\resources\elasticsearch

Run:

.\installElasticsearchIndexes.ps1

Installing the XO Management service

  1. Copy the installation files from C:\Users\Administrator\Downloads\Tridion Sites 9\Content Delivery\roles\xo\xo-management to C:\UDP\

  2. Go to the bin directory

  3. Enter:

.\installService.ps1 --auto-register

Installing the XO Query service

  1. Copy the installation files from C:\Users\Administrator\Downloads\Tridion Sites 9\Content Delivery\roles\xo\xo-query to C:\UDP\

  2. Go to the bin directory

  3. Enter:

.\installService.ps1 --auto-register

Verifying the installation

  1. Verify that the installation is working by accessing the Targeting section of the CME:
  1. Then check that the website is returning fallback content and no errors:

Create a new Promotion: Name: First Test Run Where -> Publications: Bootcamp Publication Where -> Page Regions: Sidebar What to display -> Select content by Folder -> Building Blocks -> Sidebar Promotions Folder Check that the Promotion shows up in the Sidebar region of the website.

Exercise 2: Migrate Fredhopper Data

Start Fredhopper

  1. Start the Fredhopper instance Deployment Agent:
  2. Navigate to: C:\Fredhopper> and enter:

bin\deployment-agent

  1. Start the SmartTarget instance: C:\Fredhopper> and enter:

bin\instance SmartTarget

Note: The command must be run in a command prompt from the Fredhopper directory, not bin.

Migrate

  1. Navigate to the migration directory:
  • Downloads\Tridion Sites 9\Content Delivery\roles\xo\migration
  1. (Optional) Have a look at migration.properties. You may need to modify the properties in that file when doing a customer migration.
  2. Run the migration tool:

Export:

java -jar smarttarget-migrate.jar -config=migration.properties -export

Import:

java -jar smarttarget-migrate.jar -config=migration.properties -import

  1. Verify that the migration worked by accessing the Targeting section of the CME: http://localhost/SDL/#app=wcm&entry=st-promotions. Have a look through the Promotions that were migrated.

  2. Then check that the website is returning the migrated Promotions: http://localhost:82/

Stop Fredhopper

  1. Stop the SmartTarget instance. Go back to C:\Fredhopper> and enter:

bin\instance SmartTarget stop

  1. Stop the Fredhopper instance Deployment Agent by pressing CTRL+C in its command prompt window

Exercise 3: Editing promotions and using the API

Query the API by editing the file C:\Inetpub\wwwroot\QueryBuilder.aspx and view it in a browser at http://localhost:82/QueryBuilder.aspx

Exploring Elasticsearch

View index status (health): GET http://localhost:9200/_cat/indices?v

View all data: GET http://localhost:9200/_all

View Promotions: GET http://localhost:9200/xo-promotions/_search?size=1000

View Experiments: GET http://localhost:9200/xo-experiments/_search?size=1000

View trigger types (definitions): GET http://localhost:9200/xo-triggertypes/_search?size=1000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment