|
| 1 | +--- |
| 2 | +title: Control-tower customisation |
| 3 | +author: User |
| 4 | +date: 2024-05-28 12:00:00 +0800 |
| 5 | +categories: [Performance, Tutorial] |
| 6 | +tags: [carrier, cloud, instance-type, configuration] |
| 7 | +render_with_liquid: false |
| 8 | +--- |
| 9 | + |
| 10 | +## Overview |
| 11 | + |
| 12 | +This guide outlines the steps required to change the instance type in Carrier's Control Tower, allowing for customization of resources to meet various performance and cost needs. |
| 13 | + |
| 14 | +### Prerequisites |
| 15 | + |
| 16 | +Before proceeding, ensure you have: |
| 17 | + |
| 18 | +- Access to Carrier's GitHub repository. |
| 19 | +- Administrative access to the Carrier installation platform. |
| 20 | + |
| 21 | +### Step-by-Step Instructions |
| 22 | + |
| 23 | +#### Step 1: Download Control Tower Configuration |
| 24 | + |
| 25 | +Begin by downloading the latest `control-tower.zip` package from the official [Carrier repository](https://github.com/carrier-io/control_tower/blob/master/package/control-tower.zip). |
| 26 | +  |
| 27 | + |
| 28 | +#### Step 2: Extract the Package |
| 29 | + |
| 30 | +After downloading, extract the `control-tower.zip` to a new folder. Once extraction is complete, delete the ZIP file to clean up your workspace. |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | +#### Step 3: Modify Instance Type Configuration |
| 35 | + |
| 36 | +1. Navigate to the extracted `control-tower` folder, then to the `\control_tower\cloud` directory. |
| 37 | + |
| 38 | +2. Open the `aws.py` file and locate line 34. |
| 39 | +3. Modify the `"InstanceType"` attribute to one of the following, depending on your requirements: |
| 40 | + - `t2.medium` |
| 41 | + - `t2.large` |
| 42 | + - `t2.xlarge` |
| 43 | + - `m5.large` |
| 44 | + - `m5.xlarge` |
| 45 | + - `m5.2xlarge` |
| 46 | + - `m5.4xlarge` |
| 47 | + - `m5.8xlarge` |
| 48 | + - `m5.12xlarge` |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | +#### Step 4: Repackage the Control Tower |
| 53 | + |
| 54 | +Zip the `control-tower` folder again after making the necessary changes, preparing it for upload. |
| 55 | +  |
| 56 | +#### Step 5: Upload Modified Package |
| 57 | + |
| 58 | +1. Navigate to the Carrier configuration portal at `https://${CARRIER_HOST}/-/configuration/artifacts/`. |
| 59 | +2. Click **tasks**. |
| 60 | + |
| 61 | +3. Drag and drop the new `control-tower.zip` file into the appropriate section to upload it. |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | +#### Step 6: Deploy Changes |
| 66 | + |
| 67 | +Deploy the new configuration through the Carrier portal to apply the changes. |
| 68 | + |
| 69 | +#### Step 7: Run Your Tests |
| 70 | + |
| 71 | +After deployment, run your tests to validate that the new instance type settings are functioning correctly. |
| 72 | + |
| 73 | + > You can use this [Carrier guide](https://getcarrier.io/posts/backend-test-configuration/#overview) to config yor first backend test |
| 74 | +{: .prompt-info } |
| 75 | + |
| 76 | +### Conclusion |
| 77 | + |
| 78 | +By following these steps, you have successfully customized the instance type used by Carrier's Control Tower. This adjustment can lead to better performance and cost management based on your specific needs. |
| 79 | + |
| 80 | +For further customization or troubleshooting, refer to the Carrier documentation or contact support. |
0 commit comments