You don’t have to learn Docker in order to use it), and it’s going to fill up the space really fast (Which you’ll have to give maintenance over time, and delete the images, more on that later). GitLab CI can use Docker (And it’s going to be the method we’re going to use.
HOW TO INSTALL GITLAB ON AWS EC2 FREE
Add as much SSD as the free tier gives you. You can read more about EC2 Spot Instances, here.ĭo not underestimate the next step. I recommend you to do it, since it can save you some money. In here, you have the option to “Request Spot Instances”. Then, select “Next: Configure Instance Details” For occasional commits (1–2 per day) you won’t die) If you need more power and speed, go ahead and enable the better instances. You don’t need a lot of power (This is just at first. You want to select the t2.micro since it could potentially give you a free tier. The version of Linux you choose doesn’t matter. On the next screen select the Ubuntu Server 64-bit, which has a free tier (If you’re applicable). Let’s go to the EC2 Dashboard You can arrive here, by clicking “Services” on the top and then clicking “EC2” It’s the runner that communicates to GitLab, not the other way around. You do not need to assign an Elastic IP to the spot instance or the dedicated one that the GitLab runner is using. You’re more than welcome to create a dedicated instance, and shut it down when it doesn’t need to. You can just rent it per limited time frames (Spot Instances), and you’ll be good to go. Basically, since the runner will not always run (It only runs when someone with the CI config file pushes to the server), you don’t need to have a server that is 100% active. You can run them in micro, nano, and even spot instances! If you’re not familiar with the latter, Amazon has what they call Spot Instances. The good news is that they’re cheap to run. I wouldn’t recommend it anyways, since GitLab is resource-intensive by its own. They can also be installed in your current machine and do the process there. Yes, they usually reside in a different server than your GitLab installation (Yup, another additional server to spin). It’s basically a scipt that is executed to run the CI jobs.
HOW TO INSTALL GITLAB ON AWS EC2 HOW TO
I will make a future tutorial on how to set it up with Google Cloud Platform.įor GitLab to use the CI, it needs help from what it calls a GitLab runner. This will cover running a separate Docker instance that will run the CI. Kubernetes is an open-source container management platform (You can deploy Docker images inside it). GitLab introduced a Kubernetes Cluster that allows you to run CI in there. Things have changed ever since GitLab 10.3. You went ahead, and created or imported a project (Please, do this after you assign an Elastic IP to the GitLab instance).But if you’ve made it this far, pat yourself in the back and let’s continue! If you’re here for the .gitlab-ci.yml file and how to use it, go here.įrom the first part: you learned how to set up GitLab on AWS EC2 instance… But what about GitLab CI? Well, it’s a long process as well. Feedback is appreciated, in case something needs clarification. I will go through each one of those steps. Configure GitLab CI on AWS EC2 Using Docker (This Post).Installing GitLab, GitLab CI on AWS EC2 from Zero.In this post, I continue from Installing GitLab, GitLab CI on AWS EC2 from Zero, and show you how to use a Docker runner with GitLab. And the reason is that you need to go through hoops such as configuring a “Runner”, and then create a file which you barely know what to put inside. GitLab CI can be very cryptic to learn, even if the maintainers say that it’s easy.