Skip to content

App Lifecycle

App lifecycle

graph LR classDef default fill:#FFFFFF; classDef red fill:#FF8A8A; classDef green fill:#8AFF8A; A(Empty App) -->|Publish| B(App v1) -->|Successful Install|C(App v1 Installed) B -->|Failed Install| D(App v1 Bad Installation) A2(App v1) -->|Publish| B2(App v2) -->|Successful Upgrade|C2(App v2 Installed) B2 -->|Failed upgrade| D2(App v2 Bad Installation) class C green; class C2 green; class D red; class D2 red;

App Creation

Creating a contrail app (contrail app create) reserves the app's identifier globally. Since no two apps can share the same identifier, and app identifier can not be altered after creation, it is important to be diligent about choosing the correct identifier for your app.

contrail app create
# authorizing user...
# getting config from file system
# populating auth config from fs config...
# refreshing current user org...
# What is the Name of your app? Hello World by me@vibeiq.com
# App Identifier (must be unique): me@vibeiq.com/hello-world
# App description: Hello world app by me@vibeiq.com
#  ✔ Copy template files
#  ✔ Install dependencies

Publishing Apps

Once created, your app will need some code to run. Once you have edited the code in your actions (src/actions/) you can update your app on the contrail cloud. We call this step publishing an app (contrail app publish). Once an app is published, it becomes available for organizations to view.

cd ~/hello-world-app
contrail app publish
# START Deploying Application. kamal@vibeiq.com/hello-world
# authorizing user...
# getting config from file system
# populating auth config from fs config...
# refreshing current user org...
# APP      Updating existing app.
# Installing production dependencies started...
# Installing production dependencies done.
# Building package...
# Building package done.
# Zipping package...
# Zipping package done.
# Uploading package to S3...
# cleaning up
# APP      Updated app: Hello World by kamal@vibeiq.com
# ACTION  Deploying actions.
# ACTION  Deploying action: logItem
# APP      Created new action definition: logItem
# WORKFLOW DEFINITION     Deploying workflow definitions.
# WORKFLOW DEFINITION     Deploying workflow definitions: logItemUpdate
# WORKFLOW DEFINITION      Created new workflow definition definitions: logItemUpdate
# COMPLETE Deployment Complete

Installing Apps

After publishing an app, it can then be installed by users on the contrail platform, either through the App Marketplace or through the CLI directly (contrail app install). The visibility of the app controls who can install it.

contrail app install
# getting config from file system
# populating auth config from fs config...
# refreshing current user org...
# Installed Apps:
# ? Which app would you like to install? kamal@vibeiq.com/hello-world
# ? [App config] API Host (string):
# APP INSTALLATION Installing apps .....
# APP INSTALLATION App installed
# ? Would you like to install the Workflows associated with this app? No
# APP INSTALLATION Not installing associated app workflows

App visibility

Private apps

By default, all apps are private. Private apps can only be installed by the org to which they are published (the same org the developer logs in to when using the CLI at publish time). It is recommended to keep apps private during the development and testing stage.

app.yml
visibility: private # default setting is private
Public apps

Once you have confidence in your apps reliability and robustness, you may request your app to be published on the public App Marketplace by sending a request to kamal@vibeiq.com.

app.yml
visibility: public # this can be set after approval by vibeiq marketplace team
Public hidden apps

If you would like to limit the exposure of your public app, you can set it to be hidden. Hidden apps are not visible on the marketplace and can only be installed using the CLI (contrail app install --hidden). Only public apps can be hidden. Hidden apps are useful if you want to install your app across multiple orgs but do not want to expose them on the marketplace.

app.yml
visibility: public # this can be set after approval by vibeiq marketplace team
hidden: true # example of a public but hidden app.