||
Skip to end of metadata
Go to start of metadata

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 it can synchronize with the cartridge to 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 at GitHub

A webhook needs to be set at the GitHub, so that the Stratos Manager will be notified when new/updated artifacts have been deployed. 

To set a webhook at the GitHub:

  1. Send the GitHub repository URL based on the type of the application.
    • If you are deploying a single tenant application, define the GitHub URL within the application definition, and deploy the application. 
      For more information on how to define the GitHub URL in the application definition, see Application Resource Definition.
       
    • If you are deploying a multi-tenant application, initially deploy the application, and thereafter provide your GitHub URL when signing up to the application.
      For more information on how to define the GitHub URL in the application sign up definition, see Application Sign Up Resource Definition.
  2. Go to the the GitHub website.
    https://github.com/lakwarus/wordpress.git
  3. Select repository.
  4. Click Goto Settings.
  5. Click Webhooks & Services.
    The list of available service hooks will appear.
  6. Add the payload URL in the Payload URL text-box.
    For example:  
    https://admin:admin@<PRIVATE_PAAS_HOST>:9443/api/repo/notify
  7. Choose application/vnd.github.v3+json, as the payload version.
  8. Disable SSL verification.
  9. Click Update webhook.

Enabling auto_checkout

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 puppet/modules/agent/manifest/init.pp file.

  • No labels