Skip to main content

Revert/Rollback Version

Introduction

This document explain the work of how to rollback Arkademi Web App version on ECS.

Overview

This applies to the case where the deployed application has an error and it is important to revert to a previous version.

The AWS

https://us-east-1.console.aws.amazon.com/cloudfront/v3/home?region=ap-southeast-1#/distributions

Admin Panel

https://admin.arkademi.com/aws/create

How To

First do an update on AWS then do caching invalidation on the Arkademi admin.

Revert or Rollback

  1. Visit the AWS console AWS
  2. Access the search bar to input ecs and choose Elastic Container Service search bar You will see that there are 2 clusters: production and staging. search bar
  3. For example, we will revert the production cluster, so select the production cluster. It will show the following display. search bar search bar
  4. Then select next-frontend-service, you can select it directly or from the search results. search bar From the previous process, a page like the following will be displayed, then click Update Service search bar
  5. The Revision field indicates the current version, which is 127. search bar
  6. So to do a revert or rollback, you choose a downgrade (Can choose any version). search bar
  7. For example, choose version 126 search bar
  8. Scroll down, then click update search bar
  9. If it has been updated, a notification of the updated service display will appear as below. When viewed from Tasks (2 Desired) there are 2 Pending | 2 Running search bar
  10. Move to the Tasks tab section to see if the previous version is running or not. revert-13 From the picture above there are 4 running tasks, 2 tasks revision 127 and 2 tasks revision 126, which later if revision 126 has run and there are no issues / problems after running, revision 127 will automatically be terminated and replaced by revision 126 as below. revert-14
  11. If the rollback has been done, check on web production
info

If you have issues such as white blanks (or others) after doing a rollback, it might be caused by cloudfront caching which still applies the css/js version. To solve this by doing a clear/invalidate cache frontend production

Invalidate Cloudfront

info

This can be done through the AWS console or through the admin panel.

  1. Visit the admin panel and open the AWS Invalidation menu revert-14
  2. Enter the distribution ID and path as shown below, then click Start Invalidation. revert-14
  3. If successful, there will be a notification revert-14
  4. Done