From 4519a5a89844b18b8fad4aa02de2d2eceb012227 Mon Sep 17 00:00:00 2001 From: Collen <collen@gitlab.com> Date: Thu, 9 Apr 2020 13:35:43 +0000 Subject: [PATCH] Update auto scaling steps --- doc/install/aws/img/choose_ami.png | Bin 4888 -> 0 bytes doc/install/aws/index.md | 113 ++++++++++------------------- 2 files changed, 39 insertions(+), 74 deletions(-) delete mode 100644 doc/install/aws/img/choose_ami.png diff --git a/doc/install/aws/img/choose_ami.png b/doc/install/aws/img/choose_ami.png deleted file mode 100644 index a07d42dd6fb3b480bc6a7c2da3f43fa5744b7ee6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4888 zcmZuVcTm$^kQAj#Q4lGDh<qTZsEB~lA))s!Js?d8y;tc-FCt(BrAA6by0jo&0wf@v z2%(2wLJcLqW9I(4ncLZYZ)di>dAmEavmbP|RT$_v>Bz{)7}Qij`ebC}yH~sw4dvA- z)8GmtBcmkK)ieYHSFnw^qF)EV0RX5dt1JKj2m}HEA~2E)EWiO^0vQB?EdXAiE9K!p zkXeEbD0%ow4Cp9>9YJ1L0I1mpKxUr+;7>FPi0rz|oB|*=p8){>eF0EYH^?@-@^<AF z2>{sXEK>*s0uY<L8?T}rBpSNouk=>&I?&pkoo&^a{x@JS2n2Cbc7nhcrl%$<@qmt% z7m^74gW0O;TMq-kTLZO9N6^I8`-nsrJ1Y>#Gu1#D*simDV+>4Y0q6vCUG@2<MBubH z;1{vpLj}OXwtlz*2fvP*{6gCgFv&*IVC8K9IL20j43q4l8<r~UZOkn|U|n}rBiIbU zdh1qiw3bfFu%<!s<-xLZ8D2p~@{MCyY;+WHu@%50LX|-_Ad}h<<F$nm<J7TtAhm7c zIqvE^4r<G$j$B<`(|eY|q3xJ+pwiu9X=W$^MKZDTQ1fm8>9_;?<0YttL_=d`)fn@S z)90AXwqSitkR5=BJH9K^HuNO@i3U0UfWQ{sfk9qnW9BfdNkYGxWwfndniE*ZwRXz@ z?0nks9w1J1b^P8Nga5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8J3Z?3j1$dMM5ki-zbDYJswB}yA_OUz$PJwj(`TzJxN+f%BW*Il07KFU1M zbm3SXeK=)Rqspaz^cYFsa7QHLsX6v;r%0(@dM`0#?50%NK)sgid|+(PQSU7Vd#O}w z@jfbFYDTp-a}&iR+9;3VMAiCVbFV1UWv9sgny*1E=SqTRJ2>FdyWF^;Ntbq!FNuZg z-|{))PCr(NG(*}1p!1RW%BCL9_0}DQs#86pYQ^;izpQGJc1+0JP#hW(@+EGJOT+L- z;92QVm5MZ6FfnE>80vR^!R;nbjkM}gWeLL5fX-|vRd<2N(&vCu)4E=xIxkVnM!NN- mn^&VI?==PH|BDw=Bq}`!Z~jb%6aH%BMWzPU2K`X9iToc6B_NIf diff --git a/doc/install/aws/index.md b/doc/install/aws/index.md index 128d0746df2f0..92a5286a1321a 100644 --- a/doc/install/aws/index.md +++ b/doc/install/aws/index.md @@ -580,90 +580,55 @@ On the EC2 dashboard: Now we have a custom AMI that we'll use to create our launch configuration the the next step. -## Deploying GitLab inside an auto scaling group +## Deploy GitLab inside an auto scaling group -We'll use AWS's wizard to deploy GitLab and then SSH into the instance to -configure the PostgreSQL and Redis connections. +### Create a launch configuration -The Auto Scaling Group option is available through the EC2 dashboard on the left -sidebar. - -1. Click **Create Auto Scaling group**. -1. Create a new launch configuration. - -### Choose the AMI - -Choose the AMI: - -1. Go to the Community AMIs and search for `GitLab EE <version>` - where `<version>` the latest version as seen on the - [releases page](https://about.gitlab.com/releases/). - -  - -### Choose an instance type - -You should choose an instance type based on your workload. Consult -[the hardware requirements](../requirements.md#hardware-requirements) to choose -one that fits your needs (at least `c5.xlarge`, which is enough to accommodate 100 users): - -1. Choose the your instance type. -1. Click **Next: Configure Instance Details**. - -### Configure details - -In this step we'll configure some details: - -1. Enter a name (`gitlab-autoscaling`). -1. Select the IAM role we created. -1. Optionally, enable CloudWatch and the EBS-optimized instance settings. -1. In the "Advanced Details" section, set the IP address type to - "Do not assign a public IP address to any instances." -1. Click **Next: Add Storage**. - -### Add storage - -The root volume is 8GB by default and should be enough given that we won't store any data there. - -### Configure security group - -As a last step, configure the security group: - -1. Select the existing load balancer security group we have [created](#load-balancer). -1. Select **Review**. - -### Review and launch - -Now is a good time to review all the previous settings. When ready, click -**Create launch configuration** and select the SSH key pair with which you will -connect to the instance. - -### Create Auto Scaling Group - -We are now able to start creating our Auto Scaling Group: - -1. Give it a group name. -1. Set the group size to 2 as we want to always start with two instances. -1. Assign it our network VPC and add the **private subnets**. -1. In the "Advanced Details" section, choose to receive traffic from ELBs - and select our ELB. -1. Choose the ELB health check. -1. Click **Next: Configure scaling policies**. +From the EC2 dashboard: -This is the really great part of Auto Scaling; we get to choose when AWS -launches new instances and when it removes them. For this group we'll -scale between 2 and 4 instances where one instance will be added if CPU +1. Select **Launch Configurations** from the left menu and click **Create launch configuration**. +1. Select **My AMIs** from the left menu and select the `GitLab` custom AMI we created above. +1. Select an instance type best suited for your needs (at least a `c5.xlarge`) and click **Configure details**. +1. Enter a name for your launch configuration (we'll use `gitlab-ha-launch-config`). +1. **Do not** check **Request Spot Instance**. +1. From the **IAM Role** dropdown, pick the `GitLabAdmin` instance role we [created earlier](#creating-an-iam-ec2-instance-role-and-profile). +1. Leave the rest as defaults and click **Add Storage**. +1. The root volume is 8GiB by default and should be enough given that we won’t store any data there. Click **Configure Security Group**. +1. Check **Select and existing security group** and select the `gitlab-loadbalancer-sec-group` we created earlier. +1. Click **Review**, review your changes, and click **Create launch configuration**. +1. Acknowledge that you have access to the private key or create a new one. Click **Create launch configuration**. + +### Create an auto scaling group + +1. As soon as the launch configuration is created, you'll see an option to **Create an Auto Scaling group using this launch configuration**. Click that to start creating the auto scaling group. +1. Enter a **Group name** (we'll use `gitlab-auto-scaling-group`). +1. For **Group size**, enter the number of instances you want to start with (we'll enter `2`). +1. Select the `gitlab-vpc` from the **Network** dropdown. +1. Add both the private [subnets we created earlier](#subnets). +1. Expand the **Advanced Details** section and check the **Receive traffic from one or more load balancers** option. +1. From the **Classic Load Balancers** dropdown, Select the load balancer we created earlier. +1. For **Health Check Type**, select **ELB**. +1. We'll leave our **Health Check Grace Period** as the default `300` seconds. Click **Configure scaling policies**. +1. Check **Use scaling policies to adjust the capacity of this group**. +1. For this group we'll scale between 2 and 4 instances where one instance will be added if CPU utilization is greater than 60% and one instance is removed if it falls to less than 45%.  -Finally, configure notifications and tags as you see fit, and create the +1. Finally, configure notifications and tags as you see fit, review your changes, and create the auto scaling group. -You'll notice that after we save the configuration, AWS starts launching our two -instances in different AZs and without a public IP which is exactly what -we intended. +As the auto scaling group is created, you'll see your new instances spinning up in your EC2 dashboard. You'll also see the new instances added to your load balancer. Once the instances pass the heath check, they are ready to start receiving traffic from the load balancer. + +Since our instances are created by the auto scaling group, go back to your instances and terminate the [instance we created manually above](#install-gitlab). We only needed this instance to create our custom AMI. + +### Log in for the first time + +Using the domain name you used when setting up [DNS for the load balancer](#configure-dns-for-load-balancer), you should now be able to visit GitLab in your browser. The very first time you will be asked to set up a password +for the `root` user which has admin privileges on the GitLab instance. + +After you set it up, login with username `root` and the newly created password. ## Health check and monitoring with Prometheus -- GitLab