Setting up a deployment plan

Last modified by Danniar Firdausy on 2024/09/09 15:46

In this microlearning, we’ll explore setting up a deployment plan within eMagiz, covering key considerations and steps to ensure a smooth deployment process. By considering various environment needs and best practices, you’ll learn to configure your deployment plan effectively.

Should you have any questions, please contact academy@emagiz.com.

1. Prerequisites

  • Basic knowledge of the eMagiz platform
  • Understand eMagiz releases in basics
  • Have an environment where you can add operational releases to try out the deployment plan

2. Key concepts

This microlearning centers around the Deployment plan. The deployment plan is a series of steps that must be executed on a TAP environment to deploy the (active) release. The release is active in that all changes made to it compared to the running environment are applied effectively before executing the deployment.

The Deployment plan is defined in the Deployment Plan section under Deploy. Each Test, Acceptance, and Production environment has its plan, which may vary across the environments. The deployment plan is executed from the release itself using Release options.

crashcourse-platform-deploy-setup-deployment-plan-pic1.png

3. Defining the Deployment plan

Below is a screenshot of a basic Deployment plan. In the next section, we'll look at the configuration options available. As seen below, these steps can be added with the button New.

crashcourse-platform-deploy-setup-deployment-plan--default-deployment-plan-gen3.png

Running a deployment plan means machines are stopped, and new images are deployed. eMagiz does this by comparing your currently running release and the recent release you have activated. To learn more about how eMagiz determines whether a runtime has changed, check out this microlearning. Consequently, the runtimes are unavailable shortly.

3.1 Disable triggers

One of the steps available to you is to disable all triggers that are defined in the Manage phase. You can find this step under the “Monitoring Trigger“ step type. During the execution of the deployment plan, depending on the alerting approach, some specific alerts can be triggered that may lead to false-positive alerts. To prevent this, this step is set as one of the first steps in any deployment plan. There are two configurations available within this step:

  • The "Disable" option under this step type comes with two options.
    • End Action. Here, you can opt for the following three options
      • Auto-enable triggers
      • Send email
      • Both
    • Duration. Here, you can define a waiting period that states how long eMagiz should wait before executing the end action. The value of this field needs to lie between 15 and 120 minutes. Note that the timer starts when your deployment plan's "disable" step is finished.

release-229-disable-option.png

Warning

Note that when you disable triggers, no alerting will be triggered; consequently, no notifications will be sent. Note that the end action is only triggered when the deployment plan cannot complete all steps. When all steps are completed, the timer is stopped.

3.2 Enable triggers

The last step of your default plan will re-enable triggers automatically. In case you don't have this step you can add it manually or revert back to the default plan by pressing the "Default Plan" button.

Warning

Should your deployment get stuck before it is able to finish all steps there are various mechanisms in place that will automatically re-enable triggers via eMagiz.

  • Triggers are automatically enabled once you move away from the page showing the deployment plan execution.
    • Consequently, this also means that the triggers will not be enabled when you stay on that page for a long time after the deployment is finished.
  • Utilize the functionality on the "Disable trigger" step that automatically re-enables triggers after a certain period of time.

3.3 Deploy Machine

In Architecture, you can deploy the machine for every separate machine defined in your Deploy Architecture. You also have the option to start, stop, or restart machines that run in the AWS Cloud.

  • Deploy Machine
  • Start Machine (only AWS)
  • Stop Machine (only AWS)
  • Restart Machine (only AWS)

crashcourse-platform-deploy-setup-deployment-plan--deploy-machine-options.png

When you execute actions via Deploy Architecture, you can manually disable the triggers by going to Manage -> Alerting -> Triggers -> Notification Settings and pressing "Pause Notifications." Alternatively, you can start a deployment but don't continue with it beyond the "disable triggers" step.

Information

Note that when you alter the configuration of a machine (i.e., add or remove a runtime), all runtimes on that machine need to be redeployed. Downtime depends on the runtime size and necessary changes for that runtime.

3.4 Manual steps

All the above options are automated steps. In case a specific action needs to be taken before the next automated step, a manual step can be added. The description helps to describe it, and the deployment steps will halt at this part. It is, however, often used for pre-deployment and post-deployment reminders.

3.5 Keep the deployment plan up to date

The following ways will help to keep the plan up to date:

  • Use the Default plan option to handle 90% of all cases so that every new runtime is automatically added
  • Copy the plan to the following environment to align all plans similarly.
  • Prepare the deployment step in your work definition (sprint) and improve the deployment at each iteration.

4. Key takeaways

  • The deployment plan is part of the Release Management feature set of eMagiz
  • Using the deployment plan, you are always sure that the release defined is the release that runs on any environment (notably the production environment)
  • The deployment plan is a must-have to deploy all the changes in an active release on an environment
  • Keeping the plan current is easy and takes away the manual effort to deploy flows at different runtimes.

5. Suggested Additional Readings