Application Lifecycle Management

KubeSphere integrates OpenPitrix, an open-source multi-cloud application management platform, to set up the App Store, managing applications throughout their entire lifecycle. The App Store supports two kinds of application deployment:

  • App template provides a way for developers and independent software vendors (ISVs) to share applications with users in a workspace. You can also import third-party app repositories within a workspace.
  • Composing app means users can quickly build a complete application using multiple microservices to compose it. KubeSphere allows users to select existing services or create new services to create a composing app on the one-stop console.

app-store

Using Redis as an example application, this tutorial demonstrates how to manage the app throughout the entire lifecycle, including submission, review, test, release, upgrade and removal.

Prerequisites

Hands-on Lab

Step 1: Create Customized Role and Account

You need to create two accounts first, one for ISVs (isv) and the other (reviewer) for app technical reviewers.

  1. Log in the KubeSphere console with the account admin. Click Platform in the top left corner and select Access Control. In Account Roles, click Create.

    create-role

  2. Set a name for the role, such as app-review, and click Edit Authorization.

    app-review-name

  3. In Apps Management, choose App Templates Management and App Templates View in the authorization list, then click OK.

    create-roles

    Note

    The account granted the role app-review is able to view the App Store on the platform and manage apps, including review and removal.
  4. As the role is ready now, you need to create an account and grant the role of app-review to it. In Accounts, click Create. Provide the required information and click OK.

    create-review-role

  5. Similarly, create another account isv, and grant the role of platform-regular to it.

    account-ready

  6. Invite both accounts created above to an existing workspace such as demo-workspace, and grant them the role of workspace-admin.

Step 2: Upload and Submit Application

  1. Log in KubeSphere as isv and go to your workspace. You need to upload the example app Redis to this workspace so that it can be used later. First, download the app Redis 11.3.4 and click Upload Template in App Templates.

    upload-app

    Note

    In this example, a new version of Redis will be uploaded later to demonstrate the upgrade feature.
  2. In the dialogue that appears, click Upload Helm Chart Package to upload the chart file. Click OK to continue.

    upload-template

  3. Basic information of the app displays under App Info. To upload an icon for the app, click Upload icon. You can also skip it and click OK directly.

    Note

    Maximum accepted resolutions of the app icon: 96 x 96 pixels.

    upload-icon

  4. The app displays in the template list with the status draft after successfully uploaded, which means this app is under development. The uploaded app is visible to all members in the same workspace.

    app-draft

  5. Go to the detail page of the app template by clicking Redis from the list. You can edit the basic information of this app by clicking Edit Info.

    edit-app-template

  6. You can customize the app’s basic information by specifying the fields in the pop-up window.

    edit-app-information

  7. Click OK to save your changes, then you can test this application by deploying it to Kubernetes. Click the draft version to expand the menu and select Test Deploy.

    test-deployment

    Note

    If you don’t want to test the app, you can submit it for review directly. However, it is recommended that you test your app deployment and function first before you submit it for review, especially in a production environment. This helps you detect any problems in advance and accelerate the review process.
  8. Select the cluster and project to which you want to deploy the app, set up different configurations for the app, and then click Deploy.

    deployment-place

    deploying-app

    Note

    Some apps can be deployed with all configurations set in a form. You can use the toggle switch to see its YAML file, which contains all parameters you need to specify in the form.
  9. Wait for a few minutes, then switch to the tab Deployed Instances. You will find that Redis has been deployed successfully.

    deployed-instance-success

  10. After you test the app with no issues found, you can click Submit Review to submit this application for review.

    submit-for-review

    Note

    The version number must start with a number and contain decimal points.
  11. After the app is submitted, the app status will change to Submitted. Now app reviewers can review it.

    submitted-app

Step 3: Review Application

  1. Log out and log back in KubeSphere as reviewer. Click Platform in the top left corner and select App Store Management. On the App Review page, the app submitted in the previous step displays under the tab Unprocessed.

    app-to-be-reviewed

  2. To review this app, click it to inspect the app information, introduction, chart file and update logs from the pop-up window.

    reviewing

  3. It is the responsibility of the reviewer to decide whether the app meets the criteria to be released to the App Store. Click Pass to approve it or Reject to deny an app submission.

Step 4: Release Application to App Store

After the app is approved, isv can release the Redis application to the App Store, allowing all users on the platform to find and deploy this application.

  1. Log out and log back in KubeSphere as isv. Go to your workspace and click Redis on the App Templates page. On its detail page, expand the version menu, then click Release to Store. In the pop-up prompt, click OK to confirm.

    app-templates-page

  2. Under Audit Records, you can see the app status. Active means it is available in the App Store.

    app-active

  3. Click View in Store to go to its App Info page in the App Store. Alternatively, click App Store in the top left corner and you can also see the app.

    redis

    Note

    You may see two Redis apps in the App Store, one of which is a built-in app in KubeSphere. Note that a newly-released app displays at the beginning of the list in the App Store.
  4. Now, users in the workspace can deploy Redis from the App Store. To deploy the app to Kubernetes, click the app to go to its App Info page, and click Deploy.

    deploy-redis

Step 5: Create App Category

reviewer can create multiple categories for different types of applications based on their function and usage. It is similar to setting tags and categories can be used in the App Store as filters, such as Big Data, Middleware, and IoT.

  1. Log in KubeSphere as reviewer. To create a category, go to the App Store Management page and click the plus icon in App Categories.

    app-category

  2. Set a name and icon for the category in the dialogue, then click OK. For Redis, you can input Database for the field Category Name.

    set-app-type

    Note

    Usually, an app reviewer creates necessary categories in advance and ISVs select the category in which an app appears before submitting it for review. A newly-created category has no app in it.
  3. As the category is created, you can assign the category to your app. In Uncategorized, select Redis and click Change Category.

    set-category-for-app

  4. In the dialogue, select the category (Database) from the drop-down list and click OK.

    confirm-category

  5. The app displays in the category as expected.

    app-in-category-list-expected

Step 6: Add New Version

To allow workspace users to upgrade apps, you need to add new app versions to KubeSphere first. Follow the steps below to add a new version for the example app.

  1. Log in KubeSphere as isv again and navigate to App Templates. Click the app Redis in the list.

    redis-new-version

  2. Download Redis 12.0.0, which is a new version of Redis for demonstration in this tutorial. In the tab Versions, click New Version on the right to upload the package you just downloaded.

    new-version-redis

  3. Click Upload Helm Chart Package and click OK after it is uploaded.

    upload-new-redis-version

  4. The new app version displays in the version list. You can click it to expand the menu and test the new version. Besides, you can also submit it for review and release it to the App Store, which is the same as the steps shown above.

    uploaded-new-version

    see-new-version

Step 7: Upgrade

After a new version is released to the App Store, all users can upgrade this application to the new version.

Note

To follow the steps below, you must deploy an app of one of its old versions first. In this example, Redis 11.3.4 was already deployed in the project demo-project and its new version 12.0.0 was released to the App Store.
  1. Log in KubeSphere as project-regular, navigate to the Applications page of the project, and click the app to be upgraded.

    app-to-be-upgraded

  2. Under App Template, select Version Info. You can see all released app versions in the list. The app version you are using currently is marked with Current Version. To upgrade your app to a specific version, click Upgrade on the right of the version number.

    Note

    You must move your cursor onto the app version to see the Upgrade button.

    upgrade-an-app

  3. On the Applications page, you can see that the app is being upgraded. The status will change to active when the upgrade finishes.

    version-upgraded

    upgrade-finish

Step 8: Suspend App

You can choose to remove an app entirely from the App Store or suspend a specific app version.

  1. Log in KubeSphere as reviewer. Click Platform in the top left corner and go to App Store Management. On the App Store page, click Redis.

    remove-app

  2. On the detail page, click Suspend App and select OK in the dialogue to confirm the operation to remove the app from the App Store.

    suspend-app

    Note

    Removing an app from the App Store does not affect tenants who are using the app.
  3. To make the app available in the App Store again, click Activate App.

    activate-app

  4. To suspend a specific app version, expand the version menu and click Suspend Version. In the dialogue that appears, click OK to confirm.

    suspend-version

    Note

    After an app version is suspended, this version is not available in the App Store. Suspending an app version does not affect tenants who are using this version.
  5. To make the app version available in the App Store again, click Activate Version.

    activate-version