Upgrading Datastore simulator if you used it before the August 10 2020 release

(Scott Hall) #1

If you used the Datastore simulator before 10 August 2020 and you were not using Node/npm and you were not using the friendly CLI commands to simulate blueprints, we advise starting from a clean slate using the following steps:

  1. Make sure you have the latest Docker, node (version 12+), and npm (version 6+) installed

  2. Use Docker to clean up old Datastore artifacts (if any exist)
    2.1 Run docker ps -a to list all (running and not running) containers and remove any containers with image or name labels containing “coordinator”, “dds”, “dxp”, “squiz”, “datastore”, or “simulator”
    2.2 Run docker image ls to list all repository images and remove any images with labels containing “coordinator”, “dds”, “dxp”, “squiz”, “datastore”, or “simulator”’

  3. Check your bash_profile and remove any “dxp” aliases

  4. Uninstall the DXP CLI and Datastore plugin by running the following commands:
    4.1 dxp plugin remove @squiz/dxp-plugin-datastore
    4.2 npm uninstall --global @squiz/dxp-cli
    4.3 rm -rf ~/.config/dxp/

  5. Then reinstall DXP CLI and Datastore plugin again by running the following commands:
    5.1 npm install --global @squiz/dxp-cli
    5.2 dxp plugin add @squiz/dxp-plugin-datastore

  6. Confirm the Datastore plugin is above version 0.6.2
    6.1 Run: cat ~/.config/dxp/plugins/package-lock.json | grep datastore
    6.2 The results should be similar to: "resolved": ".../dxp-plugin-datastore-X.XX.X.tgz" where X.XX.X is the plugin version number.

  7. Confirm there is a path to the “dxp”
    7.1 Run: which dxp
    7.2 The results should be similar to: /usr/local/bin/dxp (this may be different if your using NVM e.g. /usr/npm/bin/dxp)

  8. Review all blueprint API files you may be using and search and replace any instances of “x-dds” with “x-datastore” within API YAML files
    8.1 If these are already simulated, then all you need to do is save the file and the simulator should just work

  9. If you are using the tutorial event app then
    9.1 backup/rename your existing “datastore-tutorial” folder
    9.2 follow the tutorial steps (again) to setup the new version of the tutorial code