Need advice about which tool to choose?Ask the StackShare community!
AWS CloudFormation vs GitLab: What are the differences?
Introduction:
In this article, we will explore the key differences between AWS CloudFormation and GitLab, two popular tools used in the development and deployment of applications. Both tools provide ways to automate infrastructure management, but they have different features and functionalities.
AWS CloudFormation: AWS CloudFormation is a service provided by Amazon Web Services that allows users to define and provision infrastructure resources in a declarative manner. CloudFormation uses templates written in JSON or YAML to describe the desired state of the infrastructure. It supports a wide range of AWS resources and services, including EC2 instances, load balancers, RDS databases, and more. CloudFormation is tightly integrated with other AWS services, making it easy to provision and manage resources in an AWS environment.
GitLab: GitLab, on the other hand, is a complete DevOps platform that provides a suite of tools for the entire software development lifecycle. GitLab includes features for version control, continuous integration and delivery (CI/CD), container registry, and more. While GitLab does not offer the same level of infrastructure management capabilities as AWS CloudFormation, it provides a powerful platform for collaboration and automation in the software development process. GitLab also supports the use of infrastructure-as-code tools like Terraform for managing infrastructure resources.
Integration with Cloud Providers: AWS CloudFormation is tightly integrated with the AWS ecosystem, allowing users to provision and manage AWS resources easily. It provides native support for a wide range of AWS services, and changes made to the CloudFormation templates can be automatically applied to the corresponding resources. GitLab, on the other hand, is a more agnostic tool and can be used with any cloud provider or on-premises infrastructure. It provides flexibility in choosing infrastructure management tools and allows integration with different cloud providers through its extensive plugin ecosystem.
Sophistication of Infrastructure Management: AWS CloudFormation provides a comprehensive set of features for managing infrastructure resources in an AWS environment. It supports advanced features like rolling updates, change sets, and drift detection, which make it easier to manage and update infrastructure stacks. GitLab, while not as feature-rich in infrastructure management, focuses more on providing collaborative development tools and streamlining the CI/CD process. It offers simpler infrastructure management capabilities through its integration with tools like Terraform.
Scope of Automation: AWS CloudFormation allows users to automate the entire infrastructure provisioning process. Users can define infrastructure resources, specify dependencies, and configure parameters and outputs in the CloudFormation templates. CloudFormation enables the creation of reusable templates and stacks, making it easy to scale and manage infrastructure resources. GitLab, on the other hand, focuses more on automation within the software development process. It provides features like CI/CD pipelines, integration with containerization tools, and built-in code quality testing, enabling end-to-end automation of the development workflow.
Multi-Cloud Support: AWS CloudFormation is primarily designed for managing infrastructure resources in the AWS environment. While it supports some degree of multi-cloud deployment, it is more tightly integrated with AWS services. GitLab, on the other hand, is a more versatile tool that can be used with multiple cloud providers. It provides a consistent platform for managing infrastructure and application code across different environments, making it easier to adopt a multi-cloud strategy.
In summary, AWS CloudFormation is a specialized tool for infrastructure management in the AWS environment, offering extensive integration with AWS services and sophisticated features for infrastructure provisioning and management. GitLab, on the other hand, is a broader DevOps platform that provides collaboration, automation, and integration capabilities throughout the software development lifecycle, supporting multi-cloud deployments and infrastructure-as-code practices.
Do you review your Pull/Merge Request before assigning Reviewers?
If you work in a team opening a Pull Request (or Merge Request) looks appropriate. However, have you ever thought about opening a Pull/Merge Request when working by yourself? Here's a checklist of things you can review in your own:
- Pick the correct target branch
- Make Drafts explicit
- Name things properly
- Ask help for tools
- Remove the noise
- Fetch necessary data
- Understand Mergeability
- Pass the message
- Add screenshots
- Be found in the future
- Comment inline in your changes
Read the blog post for more detailed explanation for each item :D
What else do you review before asking for code review?
Using an inclusive language is crucial for fostering a diverse culture. Git has changed the naming conventions to be more language-inclusive, and so you should change. Our development tools, like GitHub and GitLab, already supports the change.
SourceLevel deals very nicely with repositories that changed the master branch to a more appropriate word. Besides, you can use the grep linter the look for exclusive terms contained in the source code.
As the inclusive language gap may happen in other aspects of our lives, have you already thought about them?
One of the magic tricks git performs is the ability to rewrite log history. You can do it in many ways, but git rebase -i
is the one I most use. With this command, It’s possible to switch commits order, remove a commit, squash two or more commits, or edit, for instance.
It’s particularly useful to run it before opening a pull request. It allows developers to “clean up” the mess and organize commits before submitting to review. If you follow the practice 3 and 4, then the list of commits should look very similar to a task list. It should reveal the rationale you had, telling the story of how you end up with that final code.
Out of most of the VCS solutions out there, we found Gitlab was the most feature complete with a free community edition. Their DevSecops offering is also a very robust solution. Gitlab CI/CD was quite easy to setup and the direct integration with your VCS + CI/CD is also a bonus. Out of the box integration with major cloud providers, alerting through instant messages etc. are all extremely convenient. We push our CI/CD updates to MS Teams.
Gitlab as A LOT of features that GitHub and Azure DevOps are missing. Even if both GH and Azure are backed by Microsoft, GitLab being open source has a faster upgrade rate and the hosted by gitlab.com solution seems more appealing than anything else! Quick win: the UI is way better and the Pipeline is way easier to setup on GitLab!
Because Pulumi uses real programming languages, you can actually write abstractions for your infrastructure code, which is incredibly empowering. You still 'describe' your desired state, but by having a programming language at your fingers, you can factor out patterns, and package it up for easier consumption.
We use Terraform to manage AWS cloud environment for the project. It is pretty complex, largely static, security-focused, and constantly evolving.
Terraform provides descriptive (declarative) way of defining the target configuration, where it can work out the dependencies between configuration elements and apply differences without re-provisioning the entire cloud stack.
AdvantagesTerraform is vendor-neutral in a way that it is using a common configuration language (HCL) with plugins (providers) for multiple cloud and service providers.
Terraform keeps track of the previous state of the deployment and applies incremental changes, resulting in faster deployment times.
Terraform allows us to share reusable modules between projects. We have built an impressive library of modules internally, which makes it very easy to assemble a new project from pre-fabricated building blocks.
DisadvantagesSoftware is imperfect, and Terraform is no exception. Occasionally we hit annoying bugs that we have to work around. The interaction with any underlying APIs is encapsulated inside 3rd party Terraform providers, and any bug fixes or new features require a provider release. Some providers have very poor coverage of the underlying APIs.
Terraform is not great for managing highly dynamic parts of cloud environments. That part is better delegated to other tools or scripts.
Terraform state may go out of sync with the target environment or with the source configuration, which often results in painful reconciliation.
I personally am not a huge fan of vendor lock in for multiple reasons:
- I've seen cost saving moves to the cloud end up costing a fortune and trapping companies due to over utilization of cloud specific features.
- I've seen S3 failures nearly take down half the internet.
- I've seen companies get stuck in the cloud because they aren't built cloud agnostic.
I choose to use terraform for my cloud provisioning for these reasons:
- It's cloud agnostic so I can use it no matter where I am.
- It isn't difficult to use and uses a relatively easy to read language.
- It tests infrastructure before running it, and enables me to see and keep changes up to date.
- It runs from the same CLI I do most of my CM work from.
At DeployPlace we use self-hosted GitLab, we have chosen GitLab as most of us are familiar with it. We are happy with all features GitLab provides, I can’t imagine our life without integrated GitLab CI. Another important feature for us is integrated code review tool, we use it every day, we use merge requests, code reviews, branching. To be honest, most of us have GitHub accounts as well, we like to contribute in open source, and we want to be a part of the tech community, but lack of solutions from GitHub in the area of CI doesn’t let us chose it for our projects.
Pros of AWS CloudFormation
- Automates infrastructure deployments43
- Declarative infrastructure and deployment21
- No more clicking around13
- Any Operative System you want3
- Atomic3
- Infrastructure as code3
- CDK makes it truly infrastructure-as-code1
- Automates Infrastructure Deployment1
- K8s0
Pros of GitLab
- Self hosted508
- Free431
- Has community edition339
- Easy setup242
- Familiar interface240
- Includes many features, including ci137
- Nice UI113
- Good integration with gitlabci84
- Simple setup57
- Has an official mobile app35
- Free private repository34
- Continuous Integration31
- Open source, great ui (like github)23
- Slack Integration18
- Full CI flow15
- Free and unlimited private git repos11
- All in one (Git, CI, Agile..)10
- User, group, and project access management is simple10
- Intuitive UI8
- Built-in CI8
- Full DevOps suite with Git6
- Both public and private Repositories6
- Integrated Docker Registry5
- So easy to use5
- CI5
- Build/pipeline definition alongside code5
- It's powerful source code management tool5
- Dockerized4
- It's fully integrated4
- On-premises4
- Security and Stable4
- Unlimited free repos & collaborators4
- Not Microsoft Owned4
- Excellent4
- Issue system4
- Mattermost Chat client4
- Great for team collaboration3
- Free private repos3
- Because is the best remote host for git repositories3
- Built-in Docker Registry3
- Opensource3
- Low maintenance cost due omnibus-deployment3
- I like the its runners and executors feature3
- Beautiful2
- Groups of groups2
- Multilingual interface2
- Powerful software planning and maintaining tools2
- Review Apps feature2
- Kubernetes integration with GitLab CI2
- One-click install through DigitalOcean2
- Powerful Continuous Integration System2
- It includes everything I need, all packaged with docker2
- The dashboard with deployed environments2
- HipChat intergration2
- Many private repo2
- Kubernetes Integration2
- Published IP list for whitelisting (gl-infra#434)2
- Wounderful2
- Native CI2
- Supports Radius/Ldap & Browser Code Edits1
Sign up to add or upvote prosMake informed product decisions
Cons of AWS CloudFormation
- Brittle4
- No RBAC and policies in templates2
Cons of GitLab
- Slow ui performance28
- Introduce breaking bugs every release9
- Insecure (no published IP list for whitelisting)6
- Built-in Docker Registry2
- Review Apps feature1