Advertisement
Guest User

Untitled

a guest
Aug 25th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.08 KB | None | 0 0
  1. # Dalton 2016.3.0 Deployment Guide
  2.  
  3. ## Summary
  4.  
  5. This guide documents the steps needed to deploy this release of Dalton. This document assumes that a deployment already exists in the target environment; therefore, only incremental changes are captured here.
  6.  
  7. Major changes included:
  8.  
  9. PostgreSQL Update
  10.  
  11. ### Contents ###
  12.  
  13. ### Pre Deployment ####
  14.  
  15. [1. Upgrade the PostgreSQL Version](#1-upgrade-the-postgresql-version)
  16.  
  17. [2. Upgrade the Node Sizes](#2-upgrade-the-node-sizes)
  18.  
  19. [3. Increase Scaling Policy](#3-increase-scaling-policy)
  20.  
  21. [4. Update Databag Values](#4-update-databag-values)
  22.  
  23. #### Deployment ####
  24.  
  25. OOTB 12 Factor Medistrano Deployment after successful node convergence
  26.  
  27. #### Post Deployment ####
  28. [1. Run the Dalton Smoke test](#1-run-the-dalton-smoke-test)
  29.  
  30. ### Pre Deployment ###
  31.  
  32. ### 1. Upgrade the PostgreSQL Version ###
  33.  
  34. Dalton writes will now only work properly with Postgres 9.5. Due to AWS limitations, it's necessary to do two incremental upgrades in order to get there from the version currently in production, first to 9.4 and then 9.5.
  35.  
  36. **Note: This WILL cause downtime for Dalton.**
  37.  
  38. - First, follow [these instructions](../internal_only/read_only_mode.md#turn-read_only-mode-on) to put Dalton in read-only mode.
  39. - Once Dalton is confirmed to be set in read-only mode, then take a snapshot of Dalton's database. This step is incredibly important. **DO NOT PROCEED** until you have confirmed that the snapshot has been created. It is NOT enough that the snapshot is creating. The snapshot must have **FINISHED** creating before you can proceed to the next step.
  40. - Navigate to Dalton's database instance in Medistrano and select `Modify RDS Instance`.
  41. * Switch the `RDS Engine Version` to "9.4.7".
  42. * Switch the `RDS Instance class` size to "db.m4.10xlarge".
  43. * Select the radio button (_at the bottom of the page_) for `Apply Immediately`.
  44. * Click `Modify RDS Instance` to persist the changes.
  45. - Confirm that the database upgrade is completed and the instance is status available.
  46.  
  47. **Note: This may take up to an hour to finish updating the instance, or could probably take about 15 minutes.**
  48.  
  49. - Repeat the above steps again, but this time to upgrade the database PostgreSQL version to 9.5.2.
  50. - After the upgrade is finish, you will need to reboot the RDS instance.
  51. - Confirm that the database has been successfully upgraded to version 9.5.2 and is status available.
  52. - Now we can terminate the existing Dalton's read-only replica and re-create a new read-only replica for the new version 9.5.2 instance.
  53. - Confirm that read-only replica is successfully created and is status available.
  54. - Now, take another database snapshot of the new version 9.5.2 primary RDS instance.
  55. - After both Dalton's primary and read-only replica databases have been confirmed to be version 9.5.2, follow [these instructions](../internal_only/read_only_mode.md#turn-read_only-mode-off) to take Dalton out of read-only mode.
  56.  
  57. ### 2. Upgrade the Node Sizes ###
  58.  
  59. Edit Corral
  60.  
  61. - Edit Corral and update the "Instance type" to the new size as defined in the table below:
  62.  
  63. | Corral | New Size |
  64. | -------------- | --------- |
  65. | VPC_app | c4.xlarge |
  66. | VPC_background | c4.large |
  67.  
  68. ##### Launch new nodes #####
  69.  
  70. - The old nodes will be running with the existing node size, so new nodes will need to be launched for the new size.
  71. The suggested method for doing so is to edit the Scaling Policy and up the min capacity so additional nodes will be launched.
  72. This will minimize any service interruptions.
  73. - After new nodes have launched, converged, and are serving traffic, the old nodes may be terminated one at a time,
  74. allowing new nodes to converge in between terminations.
  75. - After all nodes are in service and running with the new size, return the Scaling Policy to its original settings.
  76.  
  77. ### 3. Increase Scaling Policy ###
  78.  
  79. Edit Scaling Policy
  80.  
  81. - Update the scaling policy with the following values:
  82.  
  83. **VPC_App Corral**
  84.  
  85. | Attribute | Value |
  86. | ---------------- | ------ |
  87. | Min Capacity | 2 |
  88. | Max Capacity | 20 |
  89. | Desired Capacity | 15 |
  90.  
  91. **VPC_background Corral**
  92.  
  93. | Attribute | Value |
  94. | ---------------- | ------ |
  95. | Min Capacity | 4 |
  96. | Max Capacity | 5 |
  97. | Desired Capacity | 4 |
  98.  
  99. ### 4. Update Databag Values ###
  100.  
  101. Update the following databag values:
  102.  
  103. | Corral | Section | Value | Action |
  104. | --------- | --------- | ---------------------------------------------- | ------ |
  105. | Background | cmd_release | "bundle exec whenever --update-crontab dalton" | Add |
  106.  
  107. **Note: Don't forget to also update the databag with the latest tag for this release.**
  108.  
  109. ## Deployment ##
  110.  
  111. OOTB 12 Factor Medistrano Deployment after successful node convergence.
  112.  
  113. #### Post Deployment ####
  114.  
  115. ### 1. Run the Dalton Smoke Test
  116. - Run the smoke-test and ensure that it passes. On Dalton's Medistrano stage, run a rake task as follows:
  117. - Select `deploy:execute` from the **All tasks:** drop down
  118. - Add `authorization:deployment_smoke_test` as the `Config: generic_rake_task_name_and_args value`
  119. - Check only *one* app node as the target host, and then click the **Execute Task** button.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement