Unknown macro: {next_previous_link3}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

An artifact is a deployable unit that is supported by a specific Cartridge type (e.g.,  a PHP file in a PHP Cartridge,  a web app (.war ) in an Application Server Cartridge etc.). Artifact Distribution Coordinator (ADC) is responsible for distributing artifacts among the cartridge instances. The artifact distribution process is referred to as Deployment Synchronization.

Deployment synchronization

Users in the Private PaaS environment typically upload their artifacts to a remote Git repository, which is specified at the time of subscribing to a cartridge. The deployed artifact must be synchronized from the Git repository across the relevant cartridge instance node(s), to deploy the relevant artifact in the relevant cartridge instance node. Deployment Synchronization refers to the latter mentioned synchronization process. While, the Deployment Synchronizer is the component that provides this capability. Deployment Synchronization can be done either manually or automatically.

Automated Artifact Update

The diagram below explains the process involved in uploading an artifact to a cartridge instance automatically.  A Webhook needs to be added to the remote Git repository for the deployment synchronization process to take place automatically.

 

When a tenant user needs to upload an artifact, they will push the artifact into their remote Git repository by issuing a git push. This will make the GitRepo send a "push" event to Stratos Manager.  When a git push triggers the ADC, it will publish a "Artifact Update" event to the “Instance Notifier” topic, which is within the Message Broker. Thereafter, the relevant cartridge instances will subscribe to the Artifact Update message and update its artifacts by issuing a git pull to the tenant user's remote Git repository.   

Manual Artifact Update

The diagram below explains the flow involved in uploading an artifact to a cartridge instance manually:

When a tenant user needs to upload an artifact, they will initially issue a git commit to update their local repository and then they will push the artifact into their remote Git repository by issuing a git push. Thereafter, the tenant user will carryout the deployment  synchronization process manually using one of the following methods: CLI tool, Private PaaS Console (UI) or REST API. This will trigger the "Artifact Update" event to be published to the "Instance Notifier" topic, which is within the Message Broker. Thereafter, the relevant cartridge instances will subscribe to the "Artifact Update" message and update its artifacts by  issuing a git pull to the tenant user's remote Git repository.

Auto Commit

Generally, upstream commits from the instance to the Git repository will not take place. However, if Auto Commit is enabled, the instance will automatically push commits to the respective remote Git repository. Auto Commit is an optional feature.

Single tenant and multi-tenant cartridges can be present in any of the following cartridge types: Data cartridge, Framework cartridge and Application cartridge. If required, Auto Commit can only be enabled for single tenant framework cartridges or multi-tenant framework cartridges, as application cartridges and data cartridges do not use Git repositories. In single tenant cartridges, Auto Commit is enabled at the time of subscribing to a cartridge instance. Therefore, for a single tenant framework cartridge based on the mode of subscription, Auto Commit can be enabled as follows:

Subscription ModeMethod of Enabling Auto Commit
Stratos Manager Console (UI)By checking the  Auto Commit  checkbox.
CLIBy specifying the  -cm  flag in the CLI command.
REST APIBy specifying the following in the REST API request payload:
"commitsEnabled" : "true",

In multi-tenant cartridges, Auto Commit is enabled at the time of deploying the service. Therefore, if Auto Commit needs to be enabled for a multi-tenant framework cartridge, it needs to be specified in the cartridge definition JSON as follows: 

    {
     "name": "payload_parameter.COMMIT_ENABLED",
     "value": "true"
    }

 

  • No labels