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 nodes 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. Initially, the deployment synchronization process will take place automatically at the time of subscribing to a cartridge. However, after subscribing to a cartridge there may be situations where the artifacts in the Git repository and the cartridge differ due to one of the following reasons: In such instances it is important that all the changes made in the Git repository are propagated into the respective cartridge. Deployment Synchronization can be done either automatically or manually.
In such instances it is important that all the changes made in the Git repository are propagated into the respective cartridge. Deployment Synchronization can be done either automatically or manually.
The deployments process can be automated with the use of a webhook or by enabling auto checkout. For more information, see setting a webhook and enabling auto_checkout. When there is continuous development in the Git repository, it is best to use the automated deployment synchronization process. The GIT repository that is configured with a cartridge, should have the correct folder structure to enable artifacts to be added, so that they can synchronize with the cartridge and also it will add the artifacts to the correct location of the server to be deployed. For example, PHP cartridge users have to create a folder named
www inside the GIT repository to be able to upload PHP artifacts.
Setting a webhook
A webhook needs to be set at the Git repository to inform Stratos Manager with regard to the new/updated applications that have been deployed. The following are the steps required to set a webhook at a GitHub repository:
- Subscribe to a cartridge with a GitHub repository URL.
- Go to the the GitHub website.
- Select repository.
- Click Goto Settings.
- Click Webhooks & Services.
The list of available service hooks will appear.
- Add the payload URL in the Payload URL text-box.
application/vnd.github.v3+json, as the payload version.
- Disable SSL verification.
- Click Update webhook.
There may be situations where the admin does not have the required permission to set a webhook in the Git repository. In such situations auto checkout can be used to automate the deployment synchronization process. The cartridge agent will be configured to pull updates from the Git repository periodically when auto checkout is enabled. Auto checkout can be enabled by setting the
auto_checkout property to
true in the