Give us feedback
automatic-deployment
Web icon

Automatic Deployment

Stable version 2.1.0 (Compatible with OutSystems 11)
Other versions available for 10
Uploaded on 11 January 2022 by 
4.9
 (12 ratings)
automatic-deployment

Automatic Deployment

Documentation
2.1.0

Automatic Deployment Plugin

Download and install the Automatic Deployment plugin from the Forge.


Part 1: Change the endpoint in ServiceCenter.

  • The web service in ServiceCenter is pointing to one of my servers and should point to the server in your environment where LifeTime is installed.
  • Go to ServiceCenter > Factory > eSpaces > AutomaticDeployment > tab Integrations.
    Here you can change the consumed Webservice URL to the LifeTime API of your LifeTime: HTTPS://<your server>/lifetimeapi/rest/v2


Part 2: Create a Service Account

  • Go to the User Management > Service Accounts
  • Create a new Service Account
  • Give a descriptive Username
  • Give a role that is allowed to publish from your selected source to your selected destination
  • Is Active should be switched on
  • Add a description of where you use this account
  • Save the Service Account
  • Store the private key from the Authentication Parameter popup in a separate file
  • Update the “Token” Site Property of the Automatic Deployment eSpace with the private key


Part 3: Create an Automatic Deployment Configuration

  • Go to LifeTime and click on More > Automatic Deployment
  • When an error is shown, then the private key is not correct or the Service Account doesn’t have enough rights.
  • Create a new Automatic Deployment
  • Give a descriptive name
  • Select a source and a destination  server
  • If you want to deploy automatically following a specific schedule, check the "Deploy via Schedule".
  • If you want to receive an email after deployment (successful or not), fill in the "Send confirmation to?" with one or more comma-separated emailaddresses.
  • Select the applications you want to schedule for automatic deployment
  • Save the configuration
  • Store the GUID from the overview


-- START -- Only when you want to automatically deploy from inside LifeTime --

Part 4: Configure your timer in ServiceCenter.

  • Go to ServiceCenter of your LifeTime environment > https://<your-server>/servicecenter
  • Open Application Automatic Deployment
  • Open Module AutomaticDeployment
  • Go to the tab timers and open Timer_DeployAutomatically
  • Change the Timer schedule to your preference.

-- END -- Only when you want to automatically deploy from inside LifeTime --


-- START -- Only when you want to deploy from an External Service (For instance Jenkins) --

Part 4: Create the url for the deployment webservice

  • URL: https://{lifetime-server}/AutomaticDeployment/rest/AutomaticDeployment/Deploy
  • HTTP Method: GET
  • ContentType: Application/JSON
  • Header: AuthenticationToken
  • Value: {private key from the Service Account}
  • Header: ConfigurationGuid
  • Value: {Guid from the Automatic Deployment Configuration}


Part 5: Configure the automation tool that can call web services and reads the response.

  • Implement a deployment step where the web service is called and the response is validated before continuing to the next step in your automated deployment plan.

-- END -- Only when you want to deploy from an External Service (For instance Jenkins) --


Possible Outputs of the Deploy API

  • Deployed successfully
  • Nothing to deploy
  • Deployed with warnings
  • Deployed with errors
  • User intervention needed
  • Error occurred before deployment started
  • Manually aborted the deployment
  • Unknown deployment status returned: {statuscode}


Site Properties

  • CheckStatusInterval: Default 1 minute (when 0, the interval will be 30 seconds)
  • TimeFormat: Default: dd-MM-yyyy HH:mm (used in emails)
  • RedeployVersions: False (when True, all applications are always added to the deployment plan)
  • RequestTimeout: Default 60 minutes (make sure your deployment finishes within this timeframe)
  • Token: Default empty, should be filled with a token from a Service Account
  • ValidatingStepTimeout: Default: 15 minutes (make sure your validation step is finished within this timeframe)