Reader small image

You're reading from  Oracle Linux Cookbook

Product typeBook
Published inJan 2024
Reading LevelBeginner
PublisherPackt
ISBN-139781803249285
Edition1st Edition
Languages
Tools
Right arrow
Authors (3):
Erik Benner
Erik Benner
author image
Erik Benner

Erik Benner is the VP of Enterprise Transformation and an Oracle ACE director. He is an expert strategist for customers across the United States. His customer engagements range from enterprise cloud transformations to data center consolidation and modernization. He frequently presents at conferences such as Oracle CloudWorld, ASCEND, BLUEPRINT 4D, and FOSSY. Having worked with Oracle and Sun Systems since the mid-90s, Erik is well-versed in most of the core Oracle technologies, including Oracle Cloud, Oracle Linux, and Oracle Database. When not flying to far points of the country from the Metro Atlanta area, he enjoys spending time with his family at their observatory, where the telescopes outnumber the people.
Read more about Erik Benner

Erik B. Thomsen
Erik B. Thomsen
author image
Erik B. Thomsen

Erik B. Thomsen is a Principal Sales Consultant passionate about Linux, cloud-native technologies, and “Everything as Code.” He is an innovative strategist with extensive experience working in multiple facets of IT, including DevSecOps, product management for databases and Linux, and platform engineering, where he led the development of an enterprise Kubernetes container platform. He has many years of consulting experience working for numerous Fortune 500 companies. Often described as a “visionary” or “thought leader” by his peers, Erik leverages his expertise in technology with his creative development and automation skills to help customers design, deploy, and manage cutting-edge IT solutions.
Read more about Erik B. Thomsen

Jonathan Spindel
Jonathan Spindel
author image
Jonathan Spindel

Jonathan Spindel is a highly skilled and experienced technology leader and evangelist with a strong emphasis on Oracle ecosystems cloud infrastructure and automation. With over 23 years in the industry, he possesses a comprehensive understanding of managing, designing, and deploying multi-tenant enterprise systems and cloud solutions to address business needs and enhance operational processes. Jonathan excels in providing end-to-end management and technical turnkey cloud solutions that drive increased business productivity and reduce operational costs, ultimately delivering timely returns on investment. His hands-on approach and deep expertise in Oracle and mainstream infrastructure and cloud technologies enable him to optimize performance and streamline operations, while his proficiency in automation ensures efficient and error-free processes.
Read more about Jonathan Spindel

View More author details
Right arrow

Navigating Ansible Waters

In this chapter, we’ll walk through several recipes that will expand your knowledge on installing Oracle Linux Automation Manager (OLAM), managing its foundation, creating playbooks, maximizing those playbooks, and helping you understand the capabilities of OLAM. Each recipe will open your eyes to the full scope of what automation can accomplish; from patching to deploying fully functional hybrid cloud environments, OLAM can change the direction in which you think of computing and open your mind to a new world of rinse and repeat. The following are the touch points of a small subsection of what automation can simplify.

Figure 12.1 – Automation touch points

Figure 12.1 – Automation touch points

In this chapter, the following recipes will cover the installation, configuration, and usability of the OLAM platform:

  • Installing OLAM
  • Zip through configuring and managing OLAM from the foundation up
  • OLAM isn’t fantasy football, but they...

Installing OLAM

Since the dawn of time we, as the human race, have tried to make things easier, quicker, and more efficient. However, I’m sure most of us have heard from our parents, “Never take shortcuts," or “When I was a kid, I had to walk to and from school uphill, in the snow, with one leg, both ways.” These anecdotes really never change; they evolve as we get to our parent’s age, and we try to pass on our wisdom to the next generation. Well, what if I told you that you could have your cake and eat it too? Automation is the evolution of computing and the automation of repeatable tasks. Now, of course, we can’t automate everything, and there are certain tasks that aren’t worth the effort to automate, because they’re not repeatable or the factors change to the point that automation would break the process.

The dictionary definition of automation is “the application of technology, programs, robotics, or process...

Zip through configuring and managing OLAM from the foundation up

Managing OLAM can be done either through the UI or via the CLI. Here, we’ll be working through the UI. Think of it this way – OLAM is the platform on which you’ll be managing your projects, inventories, playbooks, and automation through either your UI or CLI. Projects are at the top layer, and the hierarchy descends from there to playbooks and, eventually, triggering automations. Whether you use the UI or CLI, you’ll have granular control over your key environments.

Figure 12.15 – The OLAM hierarchy

Figure 12.15 – The OLAM hierarchy

This recipe will walk you through viewing, understanding, and executing basic commands in your OLAM environment, creating projects, managing groups, and adding to inventories.

Getting ready

As shown in the following figure, and in the previous recipe, you’ll want to log in to your OLAM environment:

Figure 12.16 – OLAM first-time login

Figure 12.16 –...

OLAM isn’t fantasy football, but they both use playbooks

Most of us know about fantasy football, where we follow teams, draft players, and bet on winners and losers. Well, we’re not betting anything here, other than whether our environment will work, but we are using something called a playbook. Consider a playbook much like that used by a football coach to train their team; it’s the same concept. We’re predefining an environment or event, and programmatically architecting it to behave in the way we tell it, creating or changing the environment we are defining, or even reclaiming resources (taking back CPU, RAM, and disk space from decommissioned environments). Whatever we define within the constraints of OLAM, we can execute.

In order to create our playbook, we need to figure out who, what, where, when, and maybe even why:

  • Who – What resources groups are we targeting?
  • What – What kind of resources are we targeting? A VM? A physical...

Controlling the patching chaos

Patching is a curse word to many, a comfort to some, and necessary to all. There is certainly a rational fear regarding patching on when to patch, how to patch, and what to patch. The who, what, where, when, and how words apply here too. These concerns are legitimate; I mean who wants to patch? It can be messy, and it’s time-consuming. We may not be able to mitigate the concerns, but we can shorten the time taken to automate. This is one aspect where automation helps to speed up operations, and it eases the frustration of having to patch multiple environments.

A common automation question is, "What can we do to minimize what we can, and what do we have to do manually?" The concept that we’ll be able to create a playbook for anything and automate everything is simply not realistic. Firstly, there are some things we wouldn’t want to automate, and that depends on who you work for, or your organization’s policies and...

Look beyond automation

Before we can create any resources, we need to have a place to create those resources. In this case, we’re using OCI as our incubator, so obviously, we need to add OCI to our OLAM instance. In order to do this, we need to create credentials to allow OLAM to access OCI. This doesn’t stop at OCI. OLAM is your doorway into hybrid cloud solutions. You can deploy on-premises solutions through virtualization fabrics and HCI solutions such as VxRail, VMware, and OpenStack. We won’t be covering hybrid cloud solutions in this recipe, although we did cover hybrid cloud in past recipes, such as migrating a virtual machine as a template into OCI or uploading an image to create an AMI image in AWS. These techniques can also be used in hybrid cloud scenarios, working with and moving workloads’ ingress and egress to cloud service providers (CSPs). As you can see, the possibilities are there, and they are endless.

To delve a little further into...

Set it and forget it

In Ansible playbooks, loops provide flexibility and efficiency to automate Oracle Linux environments or any Linux environment through OLAM. Users can define dictionaries in their playbooks and use loop statements. Dictionaries are like books, with all your infrastructure or applications in lists, and they can be used to describe variables in an automation. This allows a set of tasks to be executed for each item in the loop, reducing the need for repetitive coding and making playbooks more concise and manageable.

For instance, if you want to install multiple packages on a group of Oracle Linux servers without loops, you would need to write separate tasks for each package and server. However, by using loops in OLAM with Ansible, you can define a list of packages and a list of servers and iterate over them, installing the packages on each server in a single task.

Getting ready

In the previous recipe, we’ve shown that OLAM has additional features and...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Oracle Linux Cookbook
Published in: Jan 2024Publisher: PacktISBN-13: 9781803249285
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (3)

author image
Erik Benner

Erik Benner is the VP of Enterprise Transformation and an Oracle ACE director. He is an expert strategist for customers across the United States. His customer engagements range from enterprise cloud transformations to data center consolidation and modernization. He frequently presents at conferences such as Oracle CloudWorld, ASCEND, BLUEPRINT 4D, and FOSSY. Having worked with Oracle and Sun Systems since the mid-90s, Erik is well-versed in most of the core Oracle technologies, including Oracle Cloud, Oracle Linux, and Oracle Database. When not flying to far points of the country from the Metro Atlanta area, he enjoys spending time with his family at their observatory, where the telescopes outnumber the people.
Read more about Erik Benner

author image
Erik B. Thomsen

Erik B. Thomsen is a Principal Sales Consultant passionate about Linux, cloud-native technologies, and “Everything as Code.” He is an innovative strategist with extensive experience working in multiple facets of IT, including DevSecOps, product management for databases and Linux, and platform engineering, where he led the development of an enterprise Kubernetes container platform. He has many years of consulting experience working for numerous Fortune 500 companies. Often described as a “visionary” or “thought leader” by his peers, Erik leverages his expertise in technology with his creative development and automation skills to help customers design, deploy, and manage cutting-edge IT solutions.
Read more about Erik B. Thomsen

author image
Jonathan Spindel

Jonathan Spindel is a highly skilled and experienced technology leader and evangelist with a strong emphasis on Oracle ecosystems cloud infrastructure and automation. With over 23 years in the industry, he possesses a comprehensive understanding of managing, designing, and deploying multi-tenant enterprise systems and cloud solutions to address business needs and enhance operational processes. Jonathan excels in providing end-to-end management and technical turnkey cloud solutions that drive increased business productivity and reduce operational costs, ultimately delivering timely returns on investment. His hands-on approach and deep expertise in Oracle and mainstream infrastructure and cloud technologies enable him to optimize performance and streamline operations, while his proficiency in automation ensures efficient and error-free processes.
Read more about Jonathan Spindel