Implementing a DevOps cycle for a Web project

DTS Solutions
5 min readSep 18, 2020

--

DevOps is a new term that primarily focuses on improved collaboration, communication, and integration between software developers and IT operations. It’s an umbrella term that some describe as a philosophy, cultural change, and paradigm shift.

AWS provides a set of flexible services designed to enable companies to more rapidly and reliably build and deliver products using AWS and DevOps practices. These services simplify provisioning and managing infrastructure, deploying application code, automating software release processes, and monitoring your application and infrastructure performance.

In this implementation we will use the following continuous implementation methodologies:

  • Continuous deployment:

Continuous deployment is another core concept in a DevOps strategy. Its primary goal is to enable the automated deployment of production-ready application code. Sometimes continuous deployment is referred to as continuous delivery. The only difference is that continuous deployment usually refers to production deployments. By using continuous delivery practices and tools, software can be deployed rapidly, repeatedly, and reliably. If a deployment fails, it can be automatically rolled back to previous version.

  • Continuous Delivery:

Continuous Delivery is the ability to get changes of all types — including new features, configuration changes, bug fixes and experiments — into production, or into the hands of users, safely and quickly in a sustainable way.

The AWS services that we will use to implement a DevOps cycle are the following:

  • AWS CodeCommit:

AWS CodeCommit is a fully-managed source control service that makes it easy for companies to host secure and highly scalable private Git repositories. You can use CodeCommit to securely store anything from source code to binaries, and it works seamlessly with your existing Git tools.

  • AWS CodeBuild:

AWS CodeBuild is a fully managed build service that compiles source code, runs tests, and produces software packages that are ready to deploy. With CodeBuild, you don’t need to provision, manage, and scale your own build servers. CodeBuild scales continuously and processes multiple builds concurrently, so your builds are not left waiting in a queue.

  • AWS CodePileline

AWS CodePipeline is a continuous integration and continuous delivery service for fast and reliable application and infrastructure updates. CodePipeline builds, tests, and deploys your code every time there is a code change, based on the release process models you define. This enables you to rapidly and reliably deliver features and updates.

  • AWS CodeDeploy:

AWS CodeDeploy automates code deployments to any instance, including Amazon EC2 instances and on-premises servers. AWS CodeDeploy makes it easier for you to rapidly release new features, helps you avoid downtime during application deployment, and handles the complexity of updating your applications.

Next we will implement a Devops cycle for a Serverless WEB site

  • Step 1: We will create a Git repository for out project in CodeCommit:
  • Step 2: In your workspace, clone the CodeCommit repository you created earlier:

git clone https://git-codecommit.us-east-1.amazonaws.com/v1/repos/MyRepoDemo

  • Step 3: for the compilation phase we will create a file called builspec.yml

The location of a build-specification .yml file in the source code project. If not specified, the default settings expect a file named buildspec.yml to be at the root of the source code folder structure. You need to specify a file with any other name or location. The environment variables available to the build environment in which buildspec.yml runs.

The build specification has the following syntax:

  • Step 4: Now we will create the pipeline to make the CI / CD
  • First we give our project a name and create the role that will allow it to carry out the pipeline:
  • We select the repository that we created in Codecommit previously:
  • We select a Codebuild project or create one, to carry out the compilation phase:
  • And finally we select the destination for the deployment of our application:
  • Step 5: In our local repository, we use the following GIT commands to perform a commit and have this run our pipeline in an automated way:

$ cd my-Demo-App
$ git add -A
$ git commint -a -m “initial code checkin”
$ git push origin master

  • Step 6: Validate that all phases of our pipeline are completed correctly, in each phase it shows us the respective operation data

Adopting Continuous Integration and automation tools is not enough to ensure the quality of software development, a change in culture or philosophy is also needed that allows the correct adoption and use of all tools and, more importantly, constant communication between all those involved in the development and production of an application.

At DTS Solutions we have embraced DevOps as a lifestyle, helping us to ensure that the software development cycle occurs with the quality that our customers deserve.

--

--