How to Build a serverless CI/CD system for your Angular 8 using AWS

How to Build a serverless CI/CD system for your Angular 8 using AWS

This guide will show you how to build a serverless CI/CD system for your Angular project using AWS CodePipeline to automate your continuous integration and deployment.. CI/CD with Angular 8, GitHub, and AWS CodePipeline

This guide will show you how to build a serverless CI/CD system for your Angular project using AWS CodePipeline to automate your continuous integration and deployment. Automate continuous delivery pipelines for fast and reliable updates

Prerequisite
  • You have an existing Angular 2+ project
  • It’s already deployed as a static website in S3
  • The source code is in GitHub
Step 1: Create AWS CodePipeline

Create AWS CodePipeline

Choose your pipeline name. This will also create a new role name. For the advanced setting, use the default settings.

Step 2: Select GitHub as Source Provider

Select GitHub as Source provider

Select Github as the source provider and choose the repository and branch that you want to use. For the detection option, make sure that GitHub webhooks is chosen.

Step 3: Add Build Provider

This is a very important step. If you skip this step, you won’t be able to build your app. In other words, this is the “Continuous Integration” stage.

Add Build Stage and Create Project

Make sure you select AWS CodeBuild as the build provider.

Clicking Create Project will open up a new page.

Step 3a: Create AWS CodeBuild Project

AWS CodeBuild

Choose a new project name for the CodeBuild project.

Use the following settings:

  • Managed Image (Environment Image)
  • Ubuntu (Operating System)
  • Standard (Runtime)
  • aws/codebuild/standard:2.0 (Image)
  • Always use the latest image for this runtime version (Image Version)
  • Create a new service role.
Step 3b: Insert Angular Buildspec Commands

Select “Insert build commands” and “Switch to editor”.

Paste in the following snippet and rename the s3_bucket value.

version: 0.2

env:
    variables:
        CACHE_CONTROL: "86400"
        S3_BUCKET: "{{your_url}}"
        BUILD_FOLDER: "dist"
phases:
  install:
    runtime-versions:
        nodejs: 10
    commands:
        - echo Installing source NPM dependencies...
        - npm install
        - npm install -g @angular/cli
  build:
    commands:
        - echo Build started 
        - ng build
artifacts:
    files:
        - '**/*'
    base-directory: 'dist*'
    discard-paths: yes

Completing this will automatically return you to finish configuring your pipeline.

Step 4: Add Deploy Stage S3

Add Deploy Stage

Select Amazon S3 as your deploy provider, the region, and the bucket that you’re currently hosting the static website on.

Make sure to check “Extract file before deploy” ✅.

Step 5: Review

Review Pipeline

In the review stage, make sure that what you have is similar to the screenshot above. There should be something in each step. Create Pipeline to finish the setup — this would automatically trigger the CI/CD!

Finished!

That’s it! Congrats if you made it through the entire tutorial — this is not easy stuff. You’ve just successfully build a CI/CD for your Angular project with AWS CodePipeline. If there’s an error with your build stage, it might be due to granting permission to modify S3 Buckets for the new roles that were created earlier.

Try giving AWS CodePipeline a shot. If you have another way of doing this or you have any problems with examples above, just drop a comment below to let me know.

Thanks you for reading !

AWS DevOps: Introduction to DevOps on AWS

AWS DevOps: Introduction to DevOps on AWS

AWS DevOps: Introduction to DevOps on AWS

This is the story of how DevOps met AWS, and how their union can benefit you.

Technology has evolved over time. And with technology, the ways and needs to handle technology have also evolved. The last two decades have seen a great shift in computation and software development lifecycles. We have seen a huge demand for online DevOps training and AWS certification.

This blog focuses on the following points:

  1. What Is DevOps?
  2. What Is AWS?
  3. AWS DevOps
What Is DevOps?

In these fast-paced times, we see more emphasis being placed on faster delivery of software deployment. In order to stay competitive in the market, companies are expected to deploy quality software in defined timelines. Thus, the roles of software developers and system admins have become very important. A lot of juggling of responsibilities happens between the two teams. Let us take a look at how do these individuals contribute to the deployment process.

A programmer or a software developer is responsible for developing the software. In simple words he is supposed to develop a software which has:

  • New features
  • Security Upgrades
  • Bug Fixes

But a developer may have to wait for weeks for the product to get deployed which is also known as** “**time to market” in business terms. This delay may put pressure on the developer because he is forced to re-adjust his dependent activities like:

  • Pending code
  • Old code
  • New products
  • New features

When the product is put into the production environment, the product may show some unforeseen errors. This is because the developer writes code in the development environment, which may be different from the production environment.

Let us go ahead and take a look at this process from the operations point of view. Now the operations team or the system administrating team is responsible for maintaining and ensuring the uptime of the production environment. As the company invests time and money in more products and services, the number of servers admins have to take care of also keeps growing.

This gives rise to more challenges because the tools that were used to manage the previous number of servers may not be sufficient to cater to the needs of upcoming and growing number of servers. The operations team also needs to make slight changes to the code so that it fits into the production environment. Hence, the need to schedule these deployments accordingly also grows, which leads to time delays.

When the code is deployed, the operations team is also responsible for handling code changes or minor errors to the code. At times, the operation team may feel pressured and it may seem like developers have pushed their responsibilities to operations’ side of the responsibility wall. As you may come to realize, none of the sides can be held as the culprit.

What if these two teams could work together? What if they:

  • Could break down silos?
  • Share responsibilities?
  • Start thinking alike?
  • Work as a team?

Well, this is what DevOps does. It helps you get software developers and operations in sync to improve productivity. DevOps is the process of integrating development and operations teams in order to improve collaborations and productivity. This is done with automation of workflows and productivity and continuous measurement of application performance.

DevOps focuses on automating everything that lets them write small chunks of code that can be tested, monitored and deployed in hours, which is different from writing large chunks of codes that takes weeks to deploy. Let us move ahead and understand more about AWS and how it forms a crucial pairing with DevOps to give you AWS DevOps.


What Is AWS?

If you go back a decade, the scenario of handling and storing data was different. Companies preferred storing data using their private servers. However, with more and better usage of the internet, the trend has seen a paradigm shift for companies, as they are moving their data to the cloud. This enables companies to focus more on core competencies and stop worrying about storing and computation.

For example, Netflix is a popular video streaming service which the whole world uses today. Back in 2008, Netflix suffered a major database corruption, and for three days their operations were halted. The problem was scaling up, which is when they realized the need for a highly reliable, horizontally scalable, distributed systems in the cloud. They began using cloud services, and since then their growth has been off the charts.

Gartner says that by 2020, a corporate “no-cloud” policy will be as rare as a “no-internet” policy today. Interesting, isn’t it?

Almost every company has started to adopt cloud services, and AWS, in particular, is the leading cloud service provider in the market. Let us understand more about it.


AWS

Amazon’s AWS makes its customer base strong from small-scale companies to big enterprises like D-Link.


AWS DevOps

AWS is one of the best cloud service providers and DevOps is the popular and efficient implementation of the software development lifecycle, making AWS DevOps a highly popular amalgamation.


AWS CloudFormation

DevOps teams are required to create and release cloud instances and services more frequently than traditional development teams. AWS CloudFormation enables you to do just that. Templates of AWS resources like EC2 instances, ECS containers, and S3 storage buckets let you set up the entire stack without you having to bring everything together yourself.


AWS EC2

AWS EC2 speaks for itself. You can run containers inside EC2 instances, so you can leverage the AWS Security and management features, yet another reason why AWS DevOps is a lethal combo.


AWS CloudWatch

This monitoring tool lets you track every resource that AWS has to offer. Plus it makes it very easy to use third-party tools for monitoring.


AWS CodePipeline

CodePipeline is one popular feature from AWS which simplifies the way you manage your CI/CD toolset. It lets you integrate with tools like GitHub, Jenkins, and CodeDeploy, enabling you to visually control the flow of app updates from build to production.


Instances In AWS

AWS frequently creates and adds new instances to their list and the level of customization with these instances allow you to make it easy to use AWS DevOps together.

All these reasons make AWS one of the best platforms for DevOps.


Originally published by Vishal Padghan at https://dzone.com

AWS Training Online Course - Best AWS Certification - Intellipaat

AWS Training Online Course - Best AWS Certification - Intellipaat

Enroll for best AWS training course with AWS Certification online and placement support. Learn Amazon web services AWS course from certified AWS experts. Enroll Now!

Enroll for best AWS training course with AWS Certification online and placement support. Learn Amazon web services AWS course from certified AWS experts. Enroll Now!

AWS DevOps Training | AWS DevOps Integration | AWS DevOps Tutorial for Beginners

AWS DevOps Training | AWS DevOps Integration | AWS DevOps Tutorial for Beginners

🔥Intellipaat AWS DevOps training : https://intellipaat.com/aws-devops-certification-training/ In this aws devops tutorial for beginners video you will learn ...

In this aws devops tutorial for beginners video you will learn what is aws & what is devops, aws devops developer tools available and also aws devops integration in detail.

Why should you watch this AWS DevOps tutorial?

You can learn AWS DevOps much faster than any other cloud services and this tutorial helps you do just that. AWS is a platform which helps businesses scale and grow by offering secure cloud services like compute power, content delivery, database storage, and other functionality. We are offering the top AWS DevOps tutorial and that can be watched by anybody to gain knowledge in AWS.

Why AWS is important?

There are various upcoming companies who have leveraged AWS cloud solutions for their growth. AWS was the first company which started to provide cloud solutions on a large scale. It has consistently grown and developed itself to be at the top today. It is ranked as the foremost cloud provider by Gartner in terms of completeness of vision and ability to execute. The Intellipaat AWS services demo tutorial is easy to understand, has real world AWS examples and thus makes you understand why AWS is so important and why you should go for an AWS career.

Why DevOps is important?

DevOps implementation is going through the roof with most of the largest software organizations around the world invested heavily in its implementation. The core values of devops is effectively based on the Agile Manifesto but with one slight change which moves the focus from creating a working software to one that is more interested in the end-to-end software service mechanism and delivery.