top of page
  • Writer's pictureShaked Braimok Yosef

GitOps with Github & AWS CodeBuild [Tutorial Overview]




Here is an overview of the concepts covered in the tutorial and the tutorial itself.

Don't miss the BONUS section ๐Ÿคฉ at the end of the post - how to leverage it for the self-service field?



ย 

What is GitOps?

The first YouTube tutorial is OUT ๐Ÿš€

GitOps is a modern approach to managing and automating software delivery and infrastructure operations. It leverages Git as the single source of truth for declarative infrastructure and application code. With GitOps, changes to infrastructure and application configurations are made through pull requests, enabling version control, traceability, and collaboration. The Git repository becomes the control plane, where changes trigger automated workflows for deployment, monitoring, and rollback. By adopting GitOps, organizations can achieve greater visibility, scalability, and reliability in their software delivery processes.


What is AWS CodeBuild?

AWS CodeBuild is a fully managed continuous integration service offered by Amazon Web Services (AWS). It simplifies the process of building, testing, and deploying applications by providing a scalable and secure environment for compiling source code, running tests, and producing deployable artifacts. With CodeBuild, developers can easily set up automated build pipelines, eliminating the need for manual intervention. It supports a variety of programming languages and build environments and integrates seamlessly with other AWS services like CodeCommit, CodePipeline, and CodeDeploy. CodeBuild helps streamline the software development lifecycle, enabling faster and more reliable application delivery on the AWS cloud.


Why do I like AWS CodeBuild?

There are several compelling reasons to choose AWS CodeBuild for your continuous integration needs:

  1. YAML and Shell: I love them both, and the CodeBuild content (Buildspec.yaml file) is very easy and convenient to edit.

  2. Fully Managed Service: AWS CodeBuild is a fully managed service, meaning that AWS handles the underlying infrastructure, scaling, and maintenance tasks. This allows you to focus on building and delivering your applications without the overhead of managing servers.

  3. Easy Integration: CodeBuild seamlessly integrates with other AWS services such as CodeCommit, CodePipeline, and CodeDeploy. This tight integration enables you to create end-to-end CI/CD pipelines, simplifying the automation and deployment of your applications.

  4. Scalability and Flexibility: CodeBuild provides on-demand scalability, allowing you to handle build workloads of any size. You can easily adjust compute resources based on your project requirements, ensuring fast and efficient builds.

  5. Extensive Language and Environment Support: CodeBuild supports a wide range of programming languages and provides various pre-configured build environments. Whether you're building applications in Java, Python, Node.js, or other popular languages, CodeBuild has you covered.

  6. Security and Compliance: AWS CodeBuild is built on AWS infrastructure, ensuring high levels of security and compliance. You can use AWS Identity and Access Management (IAM) to control user access and implement fine-grained permissions for build operations.

  7. Pay-as-You-Go Pricing: With AWS CodeBuild, you only pay for the compute resources used during your builds. This pay-as-you-go pricing model allows you to optimize costs and eliminate the need for upfront investments in infrastructure.

In the tutorial, I present how to create an AWS CodeBuild project with GitHub integration using a small Terraform module, enabling you to create any automation you want through GitHub events.



Here are 5 automations examples:

  1. CI/CD process - triggered by Pull Requests.

  2. Testing process - including CodeBuild report & S3 upload - triggered by the creation of a Pull Request.

  3. Automated release in your project management tool (e.g., Jira) - triggered by merging to the Master branch or creating a new release.

  4. Release notes - generating and sending via Email / Slack - triggered by the creation of a Github release.

  5. Create branch infrastructure for testing execution - triggered by the creation of a Pull Request.


Take it to the Self-Service field:

CI/CD and testing processes:

By leveraging AWS CodeBuild, developers can have self-service capabilities for building and testing their applications. They gain control over their build processes, reduce dependencies on manual operations, and accelerate their development workflows, resulting in improved productivity and faster time-to-market for their applications.

In short, developers in the organization are able to create and edit any process they need for development, without issues related to knowledge gaps, permissions, etc.


Self-service operations:

CodeBuild projects can be executed manually via the UI button in the AWS console or AWS CLI. This means you can create any operation you want inside CodeBuild and let developers run it anytime they want (And of course, you can manage IAM policies for permissions management, as it's an AWS resource).

Five self-service operation examples:

  1. Add permissions to a tool.

  2. Create a new service (scaffolder/template copy).

  3. Execute API requests you want developers to be able to run in DevOps tools.

  4. Apply Terraform workspace.

  5. Create/delete a complete environment.

Thanks for reading! Don't miss the upcoming tutorials - subscribe to the channel โฌ‡๏ธ https://youtube.com/@DevOpsInAfewMins

bottom of page