Book Image

Implementing DevOps on AWS

By : Vaselin Kantsev
Book Image

Implementing DevOps on AWS

By: Vaselin Kantsev

Overview of this book

Knowing how to adopt DevOps in your organization is becoming an increasingly important skill for developers, whether you work for a start-up, an SMB, or an enterprise. This book will help you to drastically reduce the amount of time spent on development and increase the reliability of your software deployments on AWS using popular DevOps methods of automation. To start, you will get familiar with the concept of IaC and will learn to design, deploy, and maintain AWS infrastructure. Further on, you’ll see how to design and deploy a Continuous Integration platform on AWS using either open source or AWS provided tools/services. Following on from the delivery part of the process, you will learn how to deploy a newly created, tested, and verified artefact to the AWS infrastructure without manual intervention. You will then find out what to consider in order to make the implementation of Configuration Management easier and more effective. Toward the end of the book, you will learn some tricks and tips to optimize and secure your AWS environment. By the end of the book, you will have mastered the art of implementing DevOps practices onto AWS.
Table of Contents (17 chapters)
Implementing DevOps on AWS
About the Author
About the Reviewer
Customer Feedback
Free Chapter
What is DevOps and Should You Care?
Build, Test, and Release Faster with Continuous Integration

Writing Configuration Management code

For SaltStack to help us configure our node as a web server, we need to tell it what one of those should look like. In Configuration Management terms, we need to describe the desired state of the machine.

In our example, we will be using a combination of SaltStack States, Pillars, Grains, and Top files to describe the processes of:

  • Creating Linux user accounts

  • Installing services (NGINX and PHP-FPM)

  • Configuring and running the installed services


A State contains a set of instructions which we would like to be applied to our EC2 minion(s). We will use /srv/salt/states on the minion as the root of the Salt State tree. States can be stored in there in the form of a single file, for example /srv/salt/states/mystate.sls, or organized into folders like so /srv/salt/states/mystate/init.sls . Later on, when we request that mystate is executed, Salt will look for either a state_name.sls or a state_name/init.sls in the root of the State Tree. I find the second...