VK Cloud logo

Uploading a service package to the store

Upload scheme

The service package is uploaded to the store using the deployment system via the Infra API service. The upload scheme is shown in figure 1.

pic1
Figure 1 — Service package upload scheme

The description of the main scheme elements is provided in table 1.

Table 1 — Description of the main scheme elements

Name

Description

Infra API

Serves as the integration point between the store and the cloud platform for deploying image-based applications. Infra API verifies the data of the user uploading a service package or deploying a service instance. After successful verification, Infra API gets access to inter-service communication to create the resources described in the Terraform manifest. Infra API interacts with the deployment system and the configuration management service

Deployment system

Provides deployment of an image-based application on VMs in the cloud platform. Manages the service infrastructure and software

Image-based broker

Manages the life cycle of a service instance and includes tenants. Tenants combine image-based applications of a single vendor (vendor)

Configuration management service (Configuration system)

A server that stores:

  • The configuration described in Terraform manifests.
  • The results of script execution.
  • The current configuration of the service instance.

Provides access to the current version of the agent installed on a VM

Marketplace agent (Agent)

Software installed on a VM during service deployment (for more information, see the section Marketplace agent)

Service package (VK Cloud product package)

A structured set of YAML files and Terraform manifests

The test (NameSpace_test) and public (NameSpace_public) namespaces of the store for each service are specified in the service key.

Procedure for uploading a service package to the store

  1. Perform the steps described in Preparatory operations.

  2. Test the Terraform manifests locally (for more information, see the section Local testing of the Terraform manifest).

  3. Test the Terraform manifests with the deployment system (for more information, see the section Testing manifests with the deployment system).

  4. Make sure the service package files are filled in and their structure matches the version of the JSON file generator in use (for more information, see the section Service package structure).

  5. Make sure the combination of ID and revision of each tariff plan is unique within the service package.

  6. Pack the service package (the <SERVICE_NAME> directory with the service configuration files and Terraform manifests) into a zip archive. The archive size must not exceed 30 MB.

  7. Upload the archive to the store in one of the following ways:

    1. Go to the VK Cloud personal dashboard.
    2. In the Application store section, click the Go to vendor dashboard button.
    3. On the Service management tab, click the Add service button.
    4. Select the zip archive on your device to upload it to the system.
    5. Click the Add button.

    After that, the added service appears in the list of services with the Hidden status. The uploaded archive file is sent for validation.

    A service package uploaded to the store first goes to the test namespace and, after publication, to the public one.

  8. After the service upload is complete, log in to the cloud platform dashboard and make sure the service is displayed in the store. The uploaded service will be available only to users of the store test namespaces specified in the service key.

Testing the uploaded service before publication

To check how the service will operate in the cloud platform, after uploading the service package, test the service in the test namespace of the store:

  1. Go to the VK Cloud personal dashboard.

  2. Make sure the configuration wizard of each tariff plan is displayed correctly.

  3. Connect the service. Make sure the service instance has been deployed successfully.

    If a resource described in the manifest fails to be created during service instance deployment, the deployment system will restart the service deployment process. Retry attempts may take up to 1.5 hours and can be disabled in the settings.yaml file (for more information, see the section Файл settings.yaml).

  4. Update the service instance:

    1. Change the values of the tariff options of the current tariff plan.

    2. Switch to a new tariff plan.

      Changing the parameters of resources described in the manifest triggers the service instance reinstallation process, during which only the changed resources are updated. If the deployment system fails to update the resources, it will retry updating them. The process of updating the service instance configuration, including retries, may take up to 1.5 hours. Retry attempts can be disabled in the settings.yaml file (for more information, see the section Файл settings.yaml).

  5. Check the main user scenarios of the service.

  6. Delete the service instance.

  7. If necessary, make changes to the service configuration (for more information, see the section Updating an image-based application).

  8. If changes were made to the service package during testing, make sure the service revision has been updated.

Viewing the logs of a service instance

  1. Go to the VK Cloud personal dashboard.

  2. Go to the Application store section.

  3. Open the console and obtain the store authorization JWT token:

    curl -X POST https://cloud.vk.ru/marketplace/api/um/v1/tokens/sid \--cookie 'sid=<SID>'

    Here <SID> is the value of the sid cookie file in the web browser.

    The command response will display the JWT token.

  4. Get the log of the service instance:

    curl -v https://cloud.vk.ru/marketplace/api/notifications/api/v1/instance?uuid=<UUID> \-H 'Authorization: Bearer <JWT_TOKEN>'

    Here:

    • <UUID> — the identifier of the service instance. The value is displayed in the cloud platform dashboard on the service instance page — the ID parameter.
    • <JWT_TOKEN> — the authorization JWT token obtained in the previous step.
Was this article helpful?