Environments

Environments

 

Introduction

Catalyst provides two work environments in the Catalyst web console for your applications:

  1. Development: The Development environment enables you to create, configure, test, and host Catalyst features and components in a local development mode, similar to a sandbox. When your Catalyst application is still in the development phase, you can use the Development environment to build it and perform iterative testing on it.
  2. Production: The Production environment is the live mode that is accessible to the end users of your application. When you complete the development and testing of your Catalyst application and it is ready to be made live, you can easily deploy your application from the Development to the Production environment from the web console.

The deployment process migrates the data and configurations of one environment to the other. After your application has been deployed, you will be able to switch between the Development and Production environments in the Catalyst console easily.

Catalyst offers the development environment permanently, at no cost. You can work in the Development environment of all your Catalyst applications and use all Catalyst features for free. Once you have deployed your Catalyst application to the Production environment, you will be billed for the API calls that you make in your live Catalyst application. You can learn more about this from the Billing help page.

This document explains the deployment process, as well as how to use Catalyst in both environments.

 

The Development Environment

When you create a project in Catalyst, it is created in the Development environment by default. All actions that you perform in Catalyst, such as creating a table, configuring an Event Listener, integrating your GitHub account, and hosting a mobile app are only reflected in the application's Development environment.

The actions performed from the Catalyst CLI such as creating a function or deploying a web client are also only reflected in the Development environment. Similarly, when you perform actions using the APIs, they will be reflected only in the Development environment.

After you deploy your application to production, you can switch to the Development environment any time to work on your application without affecting the live production mode. All feature creations, changes, deployments, testing that you perform in the Development environment, and data that you create will not be reflected in your live application until you deploy them.

 

Function URL and Web App URL in the Development Environment

When you host a web app in the Development environment, the web app URL that is generated for the web app will be of the format: https://project_domain_name.development.zohocatalyst.com

The invocation URL of Basic I/O functions will be of the format: https://project_domain_name.development.zohocatalyst.com/baas/v1/project/project_ID/function/function_name/execute

Similarly, the invocation URL of Advanced I/O functions will be of the format: https://project_domain_name.development.zohocatalyst.com/server/function_name/

You can obtain the development web app URL from the Environment settings or from Web Client Hosting, and the function URLs from the respective function's page.

Note: The value of ZAID is different in the Development and Production environments for a project. The value of API Key is common for the Development environment of all your projects, but different for the Production environments of each project.

After you deploy your application to the Production environment, the Production URL endpoints for all of your Basic I/O and Advanced I/O functions, and the web client, will be generated.

 

Deployment Types

There are two deployment types available in Catalyst:

  1. Development to Production
  2. Production to Development

When you are deploying your application for the first time in Catalyst, you can only deploy it from the Development to the Production environment. In the subsequent deployments, you can deploy features from Development to Production, or from Production to Development.

There are certain actions that you can perform in the Production environment. These changes can be migrated to the Development environment using the Production to Development deployment. You will learn about the features available in the Production environment later on in this document.

 

Deploying your Project to Production for the First Time

As mentioned earlier, you can only deploy your application from the Development to Production environment during the first deployment.

You will also not be able to select the features to deploy during the first deployment. All features, components, and data available in your Catalyst application will be deployed automatically.

Note: Before you deploy your application to the Production environment, you must have your Payment method set-up in Catalyst.

To deploy your project for the first time in Catalyst:

  1. Click the Deploy to Production button in the Catalyst web console.

    This will redirect you to the Environment settings. You can also directly open Settings and click Environments under Project Settings.

    You can select a different project from the dropdown list, if required.
  2. Click the Deployments tab and click Deploy.
  3. Click Yes, Proceed in the confirmation window.

    If you have not set up your Payment method in Catalyst yet, you will receive a prompt to add your card in Catalyst.

    Upon clicking Add Card, you will be redirected to the Catalyst Payments portal. You can configure your payment method there and provide the required information. Once you set up your payment, you can retry the deployment process.
    The deployment process will now be initiated.

Once the deployment is completed, you will receive a notification alerting you of its success or failure. The deployment will also be listed in the Deployments section, along with details.

The commit message is auto-generated by Catalyst for the first deployment.

You can view the details of the deployment by opening it.

Note: The first deployment does not create a diff generation, which is a report of differences between the source environment and the migrated environment. You will learn more about this later on in this document.
 

The Production Environment

The Production environment will now be available for your Catalyst application, and in your project in the console. A banner alerting you that you are using the Production environment will constantly be displayed on top.

You can switch between the Development and Production environments in the console by clicking the environment in the dropdown box on top. Clicking Manage Environments will redirect you to the Environment settings.

As mentioned earlier, the actions that you can perform in the Production environment are restricted to avoid accidental modifications or deletions of data and features that could affect your live application.

In general, you will not be able to create a new resource or add new data in the Production environment. For example, you cannot create a function or configure an Event Listener. However, certain actions can be performed.

The following features and actions are available in the Production environment for each component:

  • User Management: Inviting a new user
  • Cache: Renaming, deleting, and creating a new Cache Item in the Default segment
  • Push Notifications: Configuring iOS push notifications, testing Web and iOS push notifications from the console
  • Zia: Testing Object Character Recognition and Object Recognition in the console
  • ZCQL: Executing ZCQL test queries in the console
  • Domain Mapping: Adding a new domain
  • Device Management: Uploading an Android or iOS app
  • Collaborators: Creating a collaborator, editing collaborator details
  • Billing: Creating a budget, modifying payment details

The features and actions that are not available in the Production environment will be disabled in the Catalyst console.

However, you can still view the features and data that were made available in Production during the last migration.

You can also view statistics and reports from Logs, Metrics, Crashes, Audit, and other components, and access code templates for Search integration, Zia, and Sign-In Method.

Note: Only the features and data that were migrated to Production in the last deployment will be displayed. Any changes made in the Development environment after the last deployment will not be available in Production until they are deployed again.
 

Function URL and Web App URL in the Production Environment

After you deploy your application to the Production environment, the web app URL for the Production environment will be created in the format: https://project_domain_name.zohocatalyst.com.

The invocation URL of Basic I/O functions will be of the format: https://project_domain_name.zohocatalyst.com/baas/v1/project/project_ID/function/function_name/execute

Similarly, the invocation URL of Advanced I/O functions will be of the format: https://project_domain_name.zohocatalyst.com/server/function_name/

You can view the web app URL in the Environments settings page or from Web Client Hosting, and the function URLs from the respective function's page.

Note: The value of ZAID is different in the Development and Production environments for a project. The value of API Key is common for the Development environment of all your projects, but different for the Production environments of each project.
 

Disabling and Re-enabling the Production Environment

You can disable the Production environment any time, and instead only use the Development environment of your Catalyst application. You can disable it if you no longer need to provide access to your live application.

Note: Disabling the Production environment will remove the live application. The Production URL endpoints generated for accessing the web client or any of the functions will not work. Therefore, ensure that your application users will not be accessing the live application any longer, before disabling the Production.

To disable the Production environment for your Catalyst application:

  1. Navigate to Settings and then Environments.
  2. Click Disable in the Production Environment box.
  3. Type "DISABLE" in the confirmation pop-up window and click Confirm.

The Production environment will be disabled, and a confirmation will be displayed.

You can open the Development environment to continue working on your project.

You can click Enable Again in this confirmation or from the Environments settings to enable Production again. The last instance of the Production environment will be available when you enable it again.

 

Deploying Features after the First Time

As mentioned earlier, after the first deployment you will be able to customize the deployment type, select the features and data to be migrated, and provide a commit message.

Once you select the features to be deployed, Catalyst will be able to process the diff generation. The diff generation analyzes and displays a report of differences in features between the source environment and the migrated environment.

When the diff is generated, Catalyst will show the count of the following activities for the features that you deploy:

  • Added: Number of instances of the feature that were added since the last deployment
  • Updated: Number of instances of the feature that were updated since the last deployment
  • Deleted: Number of instances of the feature that were deleted since the last deployment
  • Total Changes: Total number of changes made in the feature

To deploy features and data from one environment to the other in Catalyst:

  1. Navigate to Settings and then Environments.
  2. Click the Deployments tab and click Create Deployment.
  3. Enter a commit message and select the deployment type in the pop-up window, and click Create.
  4. Select the features to be deployed.
    All features are selected by default. Unselect any features that you don't wish to deploy.
  5. Click Save and Next.

    Catalyst will begin the diff generation.
  6. Once the diff is generated, verify the number of changes in each feature that will be deployed.

    After you verify, click Begin Deployment to proceed. To cancel the deployment process, click Abort. To edit the features selected, click Back.
  7. A confirmation window will open to begin the deployment. Click Yes, Proceed.

    The console will display the progress.

    If the deployment is successful, the console will display a success message.

You will also receive a notification alert. You can click on View Details to view the summary of your deployment process.

You can access these details any time by opening the deployment from the Deployment section.

If you abort the process, the status will say "Aborted". You can resume the deployment process any time after you abort it.

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohocatalyst.com