When deploying a product to test or production stage you'll need to follow some key steps to get it to workaround.

In order to achieve so, please make sure you meet the following.

cloud-storage.png

Built app data is present in S3

rotating-arrow.png

The Orchestrator is up to date

approve.png

Check everything is working out well

Preparing the product app info

First, you’ll need to gather the following information about the product/app:

Ex. WhatsApp

⚠️ When working in prod environment, you should use a CNAME.

Ex.

Ex. @masivapp/masivapp-whatsapp

Ex. /whatsapp

Verify app data in S3

You need to make sure all the built application required files are present in the product S3 Bucket, especially the import.json file.

❗Please make sure the URL in import.json is pointing to the app CloudFront either for test or production stage.

If this is the first time you upload the app and have not created the S3 bucket, please follow along Creating S3 bucket

Add the app to the orchestrator

Once you're done gathering the information above, you can go to the orchestrator application project and register the new product by adding the product in the oasis-app-view-orchestrator.js file in this way:

registerApplication({
  name: "@masivapp/masivapp-whatsapp",
  app: () => System.import("@masivapp/masivapp-whatsapp"),
  activeWhen: ["/whatsapp"],
});

Deploying the changes

Before deploying the orchestrator, we need to make sure our repo and git branches are correctly synced. To commit the changes to the orchestrator, create a new branch called *feature/{ yourProductName }*, then commit and create a Pull Request to the master branch.

After changes are approved and merged we’re ready to deploy. With the master branch updated locally in your machine follow these steps:

  1. Run the script npm run *build:[ENVIRONMENT],* depending on the environment you want to deploy, example: npm build:prod
  2. Verify it creates a dist folder containing the oasis-app-view-orchestrator.js and oasis-app-view-orchestrator.js.map files.