Book Image

Practical OneOps

By : Nilesh Nimkar
Book Image

Practical OneOps

By: Nilesh Nimkar

Overview of this book

Walmart’s OneOps is an open source DevOps platform that is used for cloud and application lifecycle management. It can manage critical and complex application workload on any multi cloud-based infrastructure and revolutionizes the way administrators, developers, and engineers develop and launch new products. This practical book focuses on real-life cases and hands-on scenarios to develop, launch, and test your applications faster, so you can implement the DevOps process using OneOps. You will be exposed to the fundamental aspects of OneOps starting with installing, deploying, and configuring OneOps in a test environment, which will also come in handy later for development and debugging. You will also learn about design and architecture, and work through steps to perform enterprise level deployment. You will understand the initial setup of OneOps such as creating organization, teams, and access management. Finally, you will be taught how to configure, repair, scale, and extend applications across various cloud platforms.
Table of Contents (18 chapters)
Practical OneOps
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Preface

OneOps is complex yet easy to use PaaS Application Lifecycle Management software built by Walmart Labs, which is owned by Walmart. Walmart uses OneOps to manage its e-commerce infrastructure sites, such as walmart.com and Sam's Club. However, before switching to OneOps any updates to Walmart's infrastructure were huge tasks and required complex planning and execution. Updates were done every two months, required hundreds of manual steps and considerable resources, and left a lot of room for errors. This also made testing quite difficult. This is common scenario in a lot of organizations where legacy products can run and become bloated and monolithic to the point of being unmanageable. Organizations become complacent and are either afraid of or are resistant to change, opting instead to maintain the status quo, most of the time at a terrible cost to productivity. This all started to change with the advent of DevOps. While DevOps is about fostering a cooperative culture among teams, it begins by giving increased control to developers over their own applications. DevOps is also about enabling rapid changes across all environments at the speed of development. Walmart used OneOps to implement the DevOps paradigm, allowing them to move from their monolithic bi-monthly deployments to rapidly evolving 1000 deployments per day across their global e-commerce infrastructure. OneOps abstracts the underlying cloud infrastructure from the developers irrespective of the tools and technologies they use. OneOps also allows developers to define their application along with the infrastructure requirements in a easy to use generic GUI, which it then translates to whichever cloud the application gets deployed to. This avoids being locked in to a cloud vendor, allowing companies to benefit from having redundancies for their applications and to also benefit from competitive cloud vendor technologies and pricing. OneOps also provides services such as monitoring, auto-scaling, and auto-repair for deployed applications. And best of all, it's available for free under open source.

In this book, we will explore the practical aspects of OneOps from the point of view of a DevOps engineer. Irrespective of whether you have been asked to evaluate OneOps as a potential technology to implement as an abstraction on your cloud infrastructure or if you are doing a enterprise deployment of OneOps, you will find something useful in this book. We will start with the basics such as various ways of installing a test installation of OneOps. We will then look at the architecture of OneOps and the various components that comprise the backend. We will then see how to create and deploy and assembly. We will also look at a few practical deployment scenarios. By the end of the book you should not only understand how to install and configure OneOps, but also be comfortable with the architecture and various components of OneOps. You will also learn advanced tasks, such as how to add new components to OneOps, how to add unsupported and custom clouds, and how to interact with OneOps using the REST API.  

What this book covers

Chapter 1, Getting Started with OneOps, shows various ways to install OneOps as a standalone system. It shows how to use the Amazon Machine Image as well as the Vagrant Image to install your own OneOps copy as a sandbox for development, testing or even production. It will also introduce you to some key OneOps concepts.

Chapter 2, Understanding the OneOps Architecture, gives a detailed view of the OneOps backend architecture. It gives an overview of all the backend services, their purposes, and how they all work together. It will also introduce you to a couple of handy utilities that will enable you to look at the backend CMS data.

Chapter 3, OneOps Application Life Cycle, takes you on your first steps towards Application Lifecycle Management using OneOps. You will take your first steps in OneOps by creating and configuring a cloud and adding services under it. You will then design an assembly by using readymade packs provided by OneOps. You will also learn how to create environments and how to transition your assembly across the environments.  Finally, you will learn how to monitor your assembly.

Chapter 4, OneOps Enterprise Deployment, deals with enterprise deployment of OneOps. It will show you the things you will have to consider before planning an enterprise deployment. It will also show you how to use OneOps to install an enterprise version of OneOps, which parameters to configure, how to configure backups, among other things. You will also learn more about the configuration of individual services.

Chapter 5, Practical Deployment Scenario, will show you a very common and practical deployment scenario and walk you through it. You will be using OneOps to deploy a load balanced website consisting of Apache HTTPD, Tomcat, and Mysql. We will build on top of this architecture to add SSL to the website. After adding SSL, we will then be adding autorepair and autoscaling and enabling the applications to be deployed to multiple clouds. We will also look at various common errors and get a feel for how to resolve them.

Chapter 6, Managing Your OneOps, will show you how to upgrade your OneOps installation with minimal downtime. You will learn how to upgrade OneOps both for Standalone and Enterprise installation. You will also learn how to configure database backups. This chapter will also show you how to handle and configure security groups.

Chapter 7, Working with Functional Components, tells you in detail about the functional components of OneOps, namely the circuit and inductor. You will find out how to build, install, and configure an inductor. You will also get an introduction to circuits and learn how to configure them.

Chapter 8, Building Components for OneOps, starts with a brief recap of OneOps architecture. It will show you how OneOps can be extended by creating your own components by introducing components to you. You will also get familiar with the concepts of platforms and assemblies in this chapter.

Chapter 9, Adding and Managing OneOps Components, will have you create a new OneOps component step by step and add it to your OneOps instance. You will also be installing and testing the new component and updating the CMS to reflect it. You will also be creating a new platform pack. This chapter will also teach you how to maintain your components, maintain your platform packs, and add monitoring to your components.

Chapter 10, Adding Your Own Cloud to OneOps, teaches you to add a previously unsupported cloud to OneOps. Although OneOps comes with quite a few clouds supported out of the box, this chapter shows you how to add an unsupported cloud step by step. It will tell you all the things you need to consider when adding a custom cloud and then show you how to add a compute instance by adding support for DigitalOcean droplets. It will also show you how to add monitoring for your droplets.

Chapter 11, Integrating with OneOps Using API, shows how you can leverage the functionality of OneOps from other applications using the REST API. It shows you how to create and transition an assembly using easy to understand scripts written in Ruby that calls the REST API provided by OneOps.

What you need for this book

This book assumes you have basic knowledge of Linux Operating System. It also assumes you have basic knowledge of DevOps practices. This book will go from the basic setup to the advanced setup of OneOps and its related functions. All the configurations and tasks mentioned in this book will work on a basic standalone setup and have been tested as such. So, to run anything from this book you will need at least a standalone setup on your desktop, laptop, or in the cloud. The most common way to set up is, as mentioned in Chapter 1, Getting Started with OneOps, to install VirtualBox and then Vagrant and then follow the instructions provided by OneOps. The following hardware resources are required to run OneOps:

  • CPUs: 4 cores

  • Memory: 16 GB

  • Disk space: 80 GB

The following software is needed to run OneOps:

  • Linux Operating System: Centos 7.x

  • VirtualBox

  • AWS or Azure account

Internet connectivity is required to connect to, install, and manager other clouds.

Who this book is for

This book is for those who want to accelerate their deployments. This book is for those who want to get away from monolithic builds and deployments. This book is for those who want to give more control to developers while making developers responsible for their own applications in all environments. This book is for those who want more visibility in their application process across the spectrum. This book is for those who love automation. This book is for those who want to embrace DevOps, or for those who just want to take it for a drive. No prior knowledge of anything is assumed.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "The next lines of code read the link and assign it to the to the BeautifulSoup function."

A block of code is set as follows:

monitors => {
'Log' => {:description => 'Log',
:source => '',
:chart => {'min' => 0, 'unit' => ''},

Any command-line input or output is written as follows:

$ aws ec2 create-key-pair --key-name OneOpsAuth --query 
'KeyMaterial' --output 'text' > OneOpsAuth.pem

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Select a region you want to add. Currently supported regions are US-East-1, US-West-1, and US-West-2"

Note

Warnings or important notes appear in a box like this.

Note

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book-what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of. To send us general feedback, simply e-mail [email protected], and mention the book's title in the subject of your message. If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support  and register to have the files e-mailed directly to you.

You can download the code files by following these steps:

  1. Log in or register to our website using your e-mail address and password.

  2. Hover the mouse pointer on the SUPPORT tab at the top.

  3. Click on Code Downloads & Errata.

  4. Enter the name of the book in the Search box.

  5. Select the book for which you're looking to download the code files.

  6. Choose from the drop-down menu where you purchased this book from.

  7. Click on Code Download.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR / 7-Zip for Windows

  • Zipeg / iZip / UnRarX for Mac

  • 7-Zip / PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Practical-OneOps. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Downloading the color images of this book

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from https://www.packtpub.com/sites/default/files/downloads/PracticalOneOps_ColorImages.pdf.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books-maybe a mistake in the text or the code-we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support  and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at [email protected] with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at [email protected], and we will do our best to address the problem.