Professional Documents
Culture Documents
Full Chapter The Linux Devops Handbook Customize and Scale Your Linux Distributions To Accelerate Your Devops Workflow Wojslaw PDF
Full Chapter The Linux Devops Handbook Customize and Scale Your Linux Distributions To Accelerate Your Devops Workflow Wojslaw PDF
https://textbookfull.com/product/devops-for-networking-boost-
your-organizations-growth-by-incorporating-networking-in-the-
devops-culture-armstrong/
https://textbookfull.com/product/building-tools-with-github-
customize-your-workflow-1st-edition-chris-dawson/
https://textbookfull.com/product/linux-for-developers-jumpstart-
your-linux-programming-skills-william-bo-rothwell/
https://textbookfull.com/product/the-phoenix-project-a-novel-
about-it-devops-and-helping-your-business-win-kim/
Mastering Linux Administration : Take your sysadmin
skills to the next level by configuring and maintaining
Linux systems 2nd Edition Alexandru Calcatinge & Julian
Balog
https://textbookfull.com/product/mastering-linux-administration-
take-your-sysadmin-skills-to-the-next-level-by-configuring-and-
maintaining-linux-systems-2nd-edition-alexandru-calcatinge-
julian-balog/
https://textbookfull.com/product/mastering-kali-linux-for-
advanced-penetration-testing-secure-your-network-with-kali-linux-
the-ultimate-hackers-arsenal-second-edition-velu/
https://textbookfull.com/product/digital-forensics-with-kali-
linux-enhance-your-investigation-skills-by-performing-network-
and-memory-forensics-with-kali-linux-3rd-edition-parasram/
https://textbookfull.com/product/achieving-devops-a-novel-about-
delivering-the-best-of-agile-devops-and-microservices-1st-
edition-dave-harrison/
https://textbookfull.com/product/linux-and-lpic-1-guide-to-linux-
certification-5th-edition-jason-w-eckert/
The Linux DevOps Handbook
Damian Wojsław
Grzegorz Adamowicz
BIRMINGHAM—MUMBAI
The Linux DevOps Handbook
Copyright © 2023 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted
in any form or by any means, without the prior written permission of the publisher, except in the case
of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information
presented. However, the information contained in this book is sold without warranty, either express
or implied. Neither the authors, nor Packt Publishing or its dealers and distributors, will be held liable
for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and
products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot
guarantee the accuracy of this information.
ISBN 978-1-80324-566-9
www.packtpub.com
To my wife, my kids, and all the people who have helped me on my journey to become the best version
of me.
– Damian Wojsław
To my mum and dad, who supported me with all my interests, including computers. To my wife and
daughter, who are my biggest supporters and motivation in all endeavors.
– Grzegorz Adamowicz
Contributors
I would like to thank my wife and kids for their patience and support.
Grzegorz Adamowicz has been working in the IT industry since 2006 in a number of positions,
including systems administrator, backend developer (PHP and Python), systems architect, and site
reliability engineer. Professionally, he is focused on building tools and automations for the projects
he is involved in. He also engages with the professional community by organizing events such as
conferences and workshops. Grzegorz has worked in many industries, including oil and gas, hotel,
Fintech, DeFI, automotive, and space.
I want to thank my wife, Agnieszka, for her never-ending support, and everyone I’ve had the pleasure
of working with throughout my career – most of what I know professionally, I’ve learned from you.
About the reviewer
Marcin Juszkiewicz is a seasoned software engineer on a journey since 2004. Over the years, he has
worked on building and optimizing code in various projects. His career has spanned from embedded
Linux systems to ARM servers. In his spare time, Marcin dons the hat of a system admin, a role he
embraces with the same enthusiasm as his daily job. Through his extensive journey as a software
engineer and part-time system administrator, Marcin has garnered a wealth of knowledge and a
reputation for his meticulous approach to coding and system optimization.
Table of Contents
Prefacexv
2
Command-Line Basics 15
Technical requirements 15 Interacting with the system 31
The Linux command line – shell 16 Process this 32
Getting to know your shell 16 Looking for something? 37
I call to thee 18 Let’s be manipulative 40
The filesystem structure 18 Summary42
Running a program 21
Exercises42
The command to teach you all commands 22
Know your environment 25
Resources43
Where in the PATH am I? 26
3
Intermediate Linux 45
Technical requirements 45 Adding users 59
Globs46 Modifying users 59
Removing users 60
Automating repetitive tasks 48
Managing groups 60
Cron jobs 48
Systemd timer 49 Secure Shell (SSH) protocol 61
Configuring OpenSSH 62
Software installation 49
Creating and managing SSH keys 64
Debian and Ubuntu 50
CentOS, RHEL, and Fedora 53 Summary66
Alpine Linux 54 Exercises66
Managing users 58
4
Automating with Shell Scripts 67
Technical requirements 67 Loops72
Backing up a database 67 Conditional execution – if statement 73
6
Networking in Linux 107
Networking in Linux 107 nftables132
ISO/OSI as a networking standard 108 ufw133
firewalld134
Physical layer 108
Data link layer – MAC, VLAN 109 Advanced topics 134
Network layer – IPv4 and IPv6 110 NAT134
Transport layer – TCP and UDP 118 Port forwarding 135
Session layer 122 Interface bonding 136
Presentation layer – SSL and TLS 123 TCP multipath 136
Application layer – HTTP and FTP 126 BGP137
Firewalls129 Summary138
iptables130
7
Git, Your Doorway to DevOps 139
Technical requirements 139 Branching150
Basic Git commands 140 Squashing commits using an interactive rebase 151
Solving Git conflicts 152
Configuring the local Git environment 141
Setting up a local Git repository 141 GitFlow and GitHub Flow 153
Local versus remote Git repositories 144 Global git configuration – .gitconfig 154
Ignoring some files using a .gitignore
Interacting with remote repositories 145
configuration file 156
What’s the git diff command? 147
Viewing the commit history 148 Summary158
8
Docker Basics 159
Technical requirements 159 Virtualization160
Virtualization versus containerization159 Containerization161
x Table of Contents
9
A Deep Dive into Docker 189
Docker advanced use cases 189 Multi-stage build 212
Running public images 190 ADD command use cases 213
Running a debugging container 191 Secrets management 214
Cleaning up unused containers 192 Docker orchestration 216
Docker volumes and bind mounts 194
Docker Swarm 216
Docker networking advanced use cases 195
Kubernetes and OpenShift 220
Security features of Docker 197
Docker for CI/CD pipeline integration 205 Summary221
Docker Compose 207
Advanced Dockerfile techniques 212
Table of Contents xi
Open source solutions for self-hosting 239 Log and metrics retention 248
Prometheus240 Full retention 249
Grafana241 Time-based retention 249
SigNoz242 Event-based retention 249
New Relic Pixie 242 Selective retention 249
Graylog243 Tiered retention 249
Sentry244 Summary250
11
Using Ansible for Configuration as Code 251
Technical requirements 251 Ansible Vault 277
CM systems and CaC 251 SOPS278
Other solutions 280
SaltStack253
Chef254 Ansible Tower and alternatives 280
Puppet256 Advanced topics 281
CFEngine257
Debugging281
Ansible258 Linting Ansible playbooks 283
Basics of using Ansible 261 Speeding up SSH connections 285
Tasks263 Dynamic inventory 286
Roles263 Summary287
Plays and playbooks 264
Further reading 287
Ansible Galaxy 275
Handling secrets 277
xii Table of Contents
12
Leveraging Infrastructure as Code 289
Technical requirements 290 Terraform state 302
What is IaC? 290 Terraform CLI 305
13
CI/CD with Terraform, GitHub, and Atlantis 335
Technical requirements 335 Deployment354
What is CI/CD? 336 CI/CD with Atlantis 356
An example of CI/CD pipelines 337 Deploying Atlantis to AWS 356
Continuously integrating and Running Terraform using Atlantis 362
deploying your infrastructure 342 Summary365
Integration testing 342 Exercises365
14
Avoiding Pitfalls in DevOps 367
Technical requirements 367 Tasks with version control integration 369
Too much or not enough automation 368 Tasks with repeatable patterns 369
Tasks with well-defined APIs or interfaces 369
Repetitive tasks 368
Tasks with clear and well-defined requirements370
Time-consuming tasks 369
Manual and error-prone tasks 369 Not understanding the technology 370
Table of Contents xiii
Index389
Chapter 3, Intermediate Linux, describes more advanced features of GNU/Linux that you will find useful.
Chapter 4, Automating with Shell Scripts explains how to start writing your own scripts using the
Bash shell.
Chapter 5, Managing Services in Linux, discusses different ways of managing services in Linux and
shows you how to define your own services using systemd.
Chapter 6, Networking in Linux, describes how networking works, how to control different aspects of
network configurations, and how to use command-line tools.
Chapter 7, Git, Your Doorway to DevOps, discusses what Git is and how to use Git’s version control
system, including less commonly known Git features.
Chapter 8, Docker Basics, explores the containerization of your services or tools, and running and
managing containers.
Chapter 9, A Deep Dive into Docker, discusses the more advanced features of Docker, including Docker
Compose and Docker Swarm.
Chapter 10, Monitoring, Tracing, and Distributed Logging, discusses how to monitor your services,
what tools you can use in the cloud, and how to do a basic setup.
Chapter 11, Using Ansible for Configuration as Code, looks at Configuration as Code with the use of
Ansible; it’ll guide you through the basic setup and more advanced features of Ansible.
Chapter 12, Leveraging Infrastructure as Code, discusses what Infrastructure as Code (IaC) is, what
the popular tools are, and how to manage your infrastructure using Terraform.
Chapter 13, CI/CD with Terraform, GitHub, and Atlantis, takes IaC one step further with the use of
the Continuous Integration (CI) and Continuous Deployment (CD) of infrastructure with the use
of Terraform and Atlantis.
Chapter 14, Avoiding Pitfalls in DevOps, discusses challenges you may encounter with your work
in DevOps.
This book is aimed at beginners in the DevOps world, and it assumes that you are eager to learn
about the tools and concepts that are commonly used in this field. By the end of this book, you will
have gained a solid understanding of how to manage infrastructure using IaC tools such as Terraform
and Atlantis, as well as how to automate repetitive tasks using Ansible and Bash scripting. You will
also learn how to set up logging and monitoring solutions to help you maintain and troubleshoot
your infrastructure.
Conventions used
There are a number of text conventions used throughout this book.
Code in text: Indicates code words in text, database table names, folder names, filenames, file
extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “While
logged in as root, your prompt will end with the # sign. When logged in as a normal user, it will
present you with $.”
A block of code is set as follows:
When we wish to draw your attention to a particular part of a code block, the relevant lines or items
are set in bold:
Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words
in menus or dialog boxes appear in bold. Here is an example: “Ansible Galaxy is a community-driven
platform that hosts an extensive collection of Ansible roles and playbooks.”
Get in touch
Feedback from our readers is always welcome.
General feedback: If you have questions about any aspect of this book, email us at customercare@
packtpub.com and mention the book title in the subject of your message.
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen.
If you have found a mistake in this book, we would be grateful if you would report this to us. Please
visit www.packtpub.com/support/errata and fill in the form.
Piracy: If you come across any illegal copies of our works in any form on the internet, we would
be grateful if you would provide us with the location address or website name. Please contact us at
[email protected] with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in and you
are interested in either writing or contributing to a book, please visit authors.packtpub.com.
xix
https://packt.link/free-ebook/9781803245669
In this opening part of the book, we will focus on Linux distributions and the basic skills you will
need to efficiently use Linux operating systems. You will also learn about the basics of shell scripting
to automate day-to-day tasks.
This part has the following chapters:
Technical requirements
This chapter doesn’t have any technical requirements. We won’t run any commands or install any
software yet. This will come in the later chapters.
The code we’re presenting in the book is available in the public GitHub repository for your consideration
at this address: https://github.com/PacktPublishing/The-Linux-DevOps-Handbook.
Long before Linux was conceived by its creator, Linus Torvalds, there was Unix. Unix source code
was – for legal reasons – licensed to anyone who bought it, thus making it very popular among many
institutions. This included universities. The code, however, was not entirely free. This didn’t sit well
with many people, who believed that software should be free – as in speech or beer – including source
code. In the 1980s, a completely free and open implementation of Unix was born under the aegis of the
GNU Project. Its goal was to develop an operating system that gave complete control over a computer
to the user. The project was successful in that it was able to produce all the software required to run
an operating system, except one thing – the kernel.
A kernel of the operating system is, in short, the core that operates hardware and manages the hardware
and programs for the user.
In 1991, Finnish student Linus Torvalds famously announced his hobby kernel – Linux. He called it
at that time “just a hobby – won’t be big and professional like GNU.” It wasn’t supposed to get big and
popular. The rest is history. The Linux kernel became popular among developers and administrators
and became the missing piece of the GNU Project. Linux is the kernel, the GNU tools are the so-called
userland, and together they make the GNU/Linux operating system.
The preceding short story is important to us for two reasons:
• While the GNU userland and the Linux kernel is the most popular combination, you’ll see it
is not the only one.
• Linux delivers a kernel and the GNU Project delivers userland tools, but they have to be
somehow prepared for installation. Many people and teams had separate ideas on how to do
it best. I will expand on this thought next.
The way that a team or a company delivers a GNU/Linux operating system to end users is called a
distribution. It facilitates operating system installation, the means to manage software later on, and
general notions on how an operating system and the running processes have to be managed.
The RPM family of distributions starts with Red Hat Enterprise Linux (RHEL), created and maintained
by the Red Hat company. Closely related is Fedora (a free community distribution sponsored by Red
Hat). It also includes CentOS Linux (a free version of RHEL) and Rocky Linux (another free version
of RHEL).
The DEB distributions include Debian (where the DEB packages originate from) – a technocracy
community project. From the Debian distribution arose a number of distributions based on it, using
most of its core components. Most notable is Ubuntu, a server and desktop distribution sponsored
by Canonical.
There are also distributions that use packages with minimum automation, most notably Slackware,
one of the oldest existing Linux distributions.
There are distributions that give the user a set of scripts that compile actual software on the hardware
it will be used on – most notably, Gentoo.
Finally, there is a distribution that is actually a book with a set of instructions that a user can follow
to build the whole OS by hand – the Linux From Scratch project.
Another way of grouping distributions is by their acceptance of closed software – software that limits
the distribution of source code, binaries, or both. This can mean hardware drivers, such as the ones
for NVIDIA graphic cards, and user software, such as movie codecs that allow you to play streamed
media and DVD and Blu-Ray discs. Some distributions make it easy to install and use them, while
some make it more difficult, arguing that we should strive for all software to be open source and free
(as in speech and as in beer).
Yet another way to differentiate them is the security framework a given distribution uses. Two of the most
notable ones are AppArmor, used mainly by Ubuntu, and SELinux (from the USA’s National Security
Agency), used by, among others, Red Hat Enterprise Linux (and its derivatives) and Fedora Linux.
It’s also worth noting that while most Linux distributions use the GNU Project as the userland, the
popular one in the cloud Alpine Linux distribution uses its own set of software, written especially
with minimum size in mind.
Looking at how the distribution is developed, it can be community-driven (without any commercial
entity being an owner of any part of the process and software – Debian being one prime example),
commercial (wholly owned by a company – RHEL being one example and SuSE another), and all the
mixes in between (Ubuntu and Fedora being examples of a commercially owned distribution with a
large body of independent contributors).
6 Choosing the Right Linux Distribution
Finally, a way we can group distributions is by how well they facilitate the cloud workload. Here, we
can look at different aspects:
• The server side: How well a given distribution works as an underlying OS for our infrastructure,
virtual machines, and containers
• The service side: How well a given distribution is suited to run our software as a container or
a virtual machine
To make things even more confusing and amusing for new adopters, each distribution can have many
variants (called flavors, variants, or spins, depending on the distribution lingo) that offer different
sets of software or default configurations.
And to finally confuse you, dear reader, for use on a desktop or laptop, Linux offers the best it can
give you – a choice. The number of graphical interfaces for the Linux OS can spin the head of even
the most experienced user – KDE Plasma, GNOME, Cinnamon Desktop, MATE, Unity Desktop
(not related to the Unity 3D game engine), and Xfce. The list is non-exhaustive, subjective, and very
limited. They all differ in the ease of use, configurability, the amount of memory and CPU they use,
and many other aspects.
The number of distributions is staggering – the go-to site that tracks Linux distributions (https://
distrowatch.com/dwres.php?resource=popularity) lists 265 various Linux distributions
on its distribution popularity page at the time of writing. The sheer number of them makes it necessary
to limit the book to three of our choosing. For the most part, it doesn’t make a difference which one
you choose for yourself, except maybe in licensing and subscription if you choose a commercial one.
Each time the choice of distribution makes a difference, especially a technical one, we will point it out.
Choosing a distribution is more than just a pragmatic choice. The Linux community is deeply driven
by ideals. For some people, they are the most important ideals on which they build their lives. Harsh
words have been traded countless times over which text editor is better, based on their user interface, the
license they are published with, or the quality of the source code. The same level of emotion is displayed
toward the choice of software to run the WWW server or how to accept new contributions. This will
inevitably lead to the way the Linux distribution is installed, what tools there are for configuration
and maintenance, and how big the selection of software installed on it out of the box is.
Having said that, we have to mention that even though they have strong beliefs, the open-source
community, the Linux community included, is a friendly bunch. In most cases, you’ll be able to find
help or advice on online forums, and the chances are quite high that you will be able to meet them
in person.
What exactly is a Linux distribution? 7
• Is the software you wish to run supported on the distribution? Some commercial software
limits the number of distributions it publishes packages for. It may be possible to run them on
unsupported versions of Linux, but this may be tricky and prone to disruptions.
• Which versions of the software you intend to run are available? Sometimes, the distribution of
choice doesn’t update your desired packages often enough. In the world of the cloud, software
a few months old may already be outdated and lack important features or security updates.
• What is the licensing for the distribution? Is it free to use or does it require a subscription plan?
• What are your support options? For community-driven free distributions, your options are
limited to friendly Linux gurus online and in the vicinity. For commercial offerings, you can
pay for various support offerings. Depending on your needs and budget, you can find a mix of
support options that will suit your requirements and financial reserves.
• What is your level of comfort with editing configuration files and running long and complex
commands? Some distributions offer tools (both command-line and graphical) that make the
configuration tasks easier and less error-prone. However, those tools are mostly distribution-
specific, and you won’t find them anywhere else.
• How well are cloud-related tools supported on a given distribution? This can be the ease of
installation, the recency of the software itself, or the number of steps to configure for use.
• How well is this distribution supported by the cloud of your choosing? This will mean how
many cloud operators offer virtual machines with this distribution. How easy is it to obtain a
container image with this distribution to run your software in it? How easy do we suspect it to
be to build for this distribution and deploy on it?
• How well is it documented on the internet? This will not only include the documentation
written by distribution maintainers but also various blog posts and documentation (mainly
tutorials and so-called how-to documents) written by its users.
So far, you’ve learned what a Linux distribution is, how distributions differentiate from one another,
and what criteria you can use to actually choose one as the core of the system you will manage.
In the next section, we will look deeper into each distribution to get to know the most popular ones
better, giving you a first glimpse of how each one works and what to expect.
8 Choosing the Right Linux Distribution
Debian
Debian (https://www.debian.org/) is one of the oldest active Linux distributions. Its
development is led by the community-supported Debian Project. It is known for two things – the
sheer number of packages that the distribution provides and the slow release of stable versions. The
latter has improved in recent years and stable releases are published every two years. Software is
delivered in archives called packages. Debian packages’ names have a .deb file extension and are
colloquially called debs. They are kept online in repositories and repositories are broken down into
pools. Repositories offer almost 60,000 packages with software in the latest stable release.
Debian always has three versions available (so-called branches) – stable, testing, and unstable. The
releases are named after characters from the Toy Story movie franchise. The latest stable release –
version 11 – is called Bullseye.
The unstable branch is the rolling branch for developers, people who like living on the edge, or
those who require the newest software more than they require stability. Software is accepted into the
unstable branch with minimal testing.
The testing branch is where, as the name implies, the testing happens. A lot of testing happens here,
thanks to the end users. Packages come here from the unstable branch. The software here is still newer
than in the stable branch but not as fresh as in the unstable branch. A few months before the new
stable release, the testing branch is frozen. It means that no new software will be accepted, and new
versions of the already accepted packages are allowed only if they fix bugs.
After a few months, testing becomes the stable branch. The software is updated only for security fixes.
This distribution is available for many hardware platforms – Intel, ARM, PowerPC, and so on. Along
with unofficial ports, there are a multitude of hardware platforms on which you can install it.
Another random document with
no related content on Scribd:
For the peace that is from above....
For the peace of the whole world....
For this holy temple, and for them that with faith....
That this oil may be blessed by the might, and operation, and
descent of the Holy Ghost, let us pray to the Lord.
For the servant of God, name, and for his visitation by God, and
for the coming upon him of the grace of the Holy Ghost, let us pray
to the Lord.
For his deliverance and ours from every affliction, passion, and
want.
Help us, save us, have mercy on us, and keep us, O God....
Commemorating our most holy, most pure....
Then the first of the priests saith the prayer of oil over the cruet.
Note. Be it known that in the great church they pour wine instead
of water into the cruet of prayer-unction.
Let us pray to the Lord.
Lord, have mercy.
O Lord, who, through thy mercy and compassions, healest the
infirmities of our souls and bodies; do thou thyself, O Master, sanctify
this oil, that it may be to them that are anointed therewith for healing,
and for the removal of every passion, of defilement of flesh and
spirit, and of every ill, and that thereby may be glorified thy holy
name, of the Father, and of the Son, and of the Holy Ghost, now and
ever, and to ages of ages. Amen.
And the other priests likewise read this prayer, but quietly to
themselves.
And while the prayer is being said by the priests, they sing these
troparia.
Tone iv.
Thou that alone art quick to help, O Christ, make manifest from on
high a speedy visitation to thine ailing servant: deliver him from
sicknesses and bitter pains, and raise him up, that, without ceasing,
he may praise and glorify thee, through the God-bearing one’s
entreaties, O thou sole lover of mankind.
With blinded spiritual eyes to thee, O Christ, I come, as he that
from his birth was blind; and penitentially to thee I cry, Be merciful to
us, thou that alone the good physician art.
Tone iii.
My soul, that, Lord, by every kind of sin and unbecoming deeds is
paralys’d, O by thy godlike intervention do thou raise, as thou of old
a paralytic didst upraise, that I, being sav’d, may cry to thee, Give
healing unto me, O Christ compassionate.
Tone ii.
O just one, as the Lord’s disciple, thou the gospel didst receive; as
martyr, dost possess that which unwritten is; a daring, as God’s
brother, hast; as hierarch, hast to pray: do thou beseech Christ God
to save our souls.
Tone iv.
The Father’s sole-begotten, who is God the Word, in latter days
hath come to us, O James divine, declaring thee first pastor and
instructor of them that of Jerusalem were; a faithful steward too of
ghostly mysteries. Therefore, apostle, we all reverence thee.
Tone iii.
To them of Myra, saint, thou didst appear a hierurgist; for Christ’s
evangel, thou, O venerated one, fulfilling, didst for thy people yield
thy soul, and save the innocent from death. For this cause art thou
sanctified as a great mystic of the grace of God.
The same tone.
O pain-enduring one, that overcame the heathen, in dangers hath
the world thee found a champion great. Therefore, as thou didst
humble Lyev’s pride, and in the strife make Nestor brave, so, saint
Demetrius, pray Christ God to give great mercy unto us.
The same tone.
Thou holy pain-enduring one, physician too, O Pantelimon,
mediate with God the merciful, that he may grant our souls remission
of iniquities.
Tone viii.
Ye saints that were unmercenary and wonders wrought, make
visitation in our weaknesses. Freely ye have receiv’d: O freely give
to us.
Tone ii.
Who can narrate thy mightiness, O virgin one? for thou dost
wonders gush, and pourest cures, and prayest for our souls, O thou
divine and friend of Christ.
Warm advocate and assailless wall, the spring of mercy and the
world’s defence, to thee unceasingly we cry, God-bearing Queen,
prevent thou us, and us from dangers free, thou that alone art quick
to intercede.
Deacon. Let us attend.
The first priest. Peace to all.
Choir. And to thy spirit.
Deacon. Wisdom, let us attend.
Reader, the prokimenon, tone i.
Let thy mercy, O Lord, come upon us like as we have put our trust
in thee.
Verse.
Rejoice, O ye righteous, in the Lord, for praise becometh the
upright.
The epistle.
The lection of the catholic message of James.
And be it known that the epistle is read by the deacon, section lvii,
Brethren, take for an example.... ending, availeth much.[15]
The first priest. Peace to thee. Alleluia.
Tone viii. Verse. I will sing unto thee of mercy and judgment, O
Lord.
The gospel from Luke, section liii.
At that time, a certain lawyer.... ending, do thou likewise.[16]
Then, Have mercy upon us, O God, according to thy great mercy,
we pray thee, hear and have mercy.
Lord, have mercy, thrice.
Furthermore let us pray for mercy, life, peace, health, salvation,
visitation, and forgiveness of sins for the servant of God, name.
Lord, have mercy, thrice.
That to him may be remitted every iniquity, voluntary and
involuntary, let us pray to the Lord.
Lord, have mercy, thrice.
And the exclamation.
For a merciful and man-loving God thou art, and to thee we
ascribe glory, to the Father, and to the Son, and to the Holy Ghost,
now and ever, and to ages of ages. Amen.
Deacon. Let us pray to the Lord.
Lord have mercy.
Priest, the prayer.
O thou that art unbeginning, eternal, and in the holy of holies, who
didst send down thine only-begotten Son, who healeth every infirmity
and every wound of our souls and bodies; do thou send down thy
Holy Ghost, and sanctify this oil, and let it be unto thine anointed
servant, name, for a perfect deliverance from his sins, and for the
inheritance of the kingdom of heaven.
Be it known that some say this prayer only thus far, with the
exclamation,
For it is thine to have mercy.....
But others say even unto the end,
For thou art God great and wonderful, who keepest thy testament
and thy mercy unto them that love thee, granting deliverance from
sins through thy holy child, Jesus Christ, who regenerateth us from
sin, enlighteneth the blind, setteth up them that are cast down, loveth
the righteous, and is merciful to sinners, who hath called us out of
darkness and the shadow of death, saying unto them that are in
bonds, Come forth, and to them that are in darkness, Be ye unveiled.
For he hath shined in our hearts the light of the knowledge of his
countenance, in that for our sake he was made manifest upon earth,
and dwelt among men; and to them that accepted thee gave he
power to become the children of God; and hath bestowed upon us a
sonship through the laver of regeneration, and made us to have no
participation in the domination of the devil. For thou wast not pleased
that we should be cleansed through blood, but hast given, through
holy oil, an image of his cross, that we may be a flock of Christ, a
royal priesthood, a holy nation, cleansing us by water, and
sanctifying us by thy holy spirit. Do thou thyself, O Master Lord, give
grace unto us in this thy service, as thou didst give unto Moses, thine
accepted, and unto Samuel, thy beloved, and unto John, thine elect,
and unto all who in every generation have been acceptable unto
thee. And so make us to be ministers of thy new testament upon this
oil, which thou hast made thine own through the precious blood of
thy Christ, that, putting away worldly lusts, we may die unto sin and
live unto righteousness, so that we may be led of the proposed oil to
be invested in him with the anointing of sanctification. May this oil, O
Lord, be an oil of gladness, an oil of sanctification, a royal investiture,
a cuirass of power, an averting of every diabolical operation, an
inviolable seal, a rejoicing of the heart, an eternal joy, that they that
are anointed with this oil of regeneration may be terrible to
adversaries, and may shine in the brightness of thy saints, having no
spot or wrinkle; and may they attain unto thine eternal rest, and gain
the prize of the calling from on high.
For it is thine to have mercy, and to save us, O our God, and to
thee we ascribe glory, with thine only-begotten Son, and with thy
most holy, and good, and life-creating Spirit, now and ever, and to
ages of ages, Amen.
And after the prayer; the priest taketh a twig, and, dipping it in the
holy oil, anointeth the sick person in the form of a cross, on the
forehead, on the nostrils, on the cheeks, on the lips, on the breast,
on the hands on both sides, saying this prayer.
Holy Father, physician of souls and bodies, who didst send thine
only-begotten Son, our Lord Jesus Christ, who healeth every
infirmity, and delivereth from death; do thou heal thy servant, name,
from the bodily and spiritual weakness that presseth upon him, and
quicken him by the grace of thy Christ; through the prayers of our
most holy Lady, the God-bearing and ever-virgin Mary; through the
intercession of the honourable, heavenly bodiless powers; through
the power of the precious and life-effecting cross; of the honourable
glorious prophet, Forerunner, and Baptist John; of the holy, glorious,
and all-praised apostles; of the holy glorious, and excellently
victorious martyrs; of our venerable and god-bearing fathers; of the
holy and unmercenary physicians, Cosmas and Damian, Cyrus and
John, Pantelimon and Hermolaus, Sampson and Diomed, Photius
and Anicetas; of the holy and righteous god-progenitors, Joakim and
Anna, and of all the Saints.
For thou art the fount of healing, O our God, and to thee we
ascribe glory, with thine only-begotten Son, and with thy
consubstantial Spirit, now and ever, and to ages of ages. Amen.
This prayer is said by each priest after he hath said his gospel and
prayer, while he anointeth the sick person with oil.
Deacon. Let us attend.
The second priest. Peace to all.
Prokimenon, tone ii.
The Lord is my strength and song, and is become for salvation
unto me.
Verse. When thou chastenest, thou hast chastened me, O Lord;
but thou hast not given me up unto death.
The epistle to the Romans, section cxvi.
Brethren, we that are strong ought.... ending, received us to the
glory of God.[17]
The second priest. Peace to thee.
Alleluia, tone v.
Verse. I will sing of thy mercy, O Lord, for ever.
The second priest.
The gospel from Luke, section xciv.
At that time, Jesus passed through.... ending, to save that which
was lost.[18]
And the deacon.
Have mercy upon us, O God.... Page 98.
Furthermore let us pray for mercy, life....
That to him may be remitted....
For a merciful and man-loving God....
Priest, the prayer.
O God, great and most high, who art worshipped by all creation, thou
true fountain of wisdom, and impenetrable depth of goodness, and
boundless ocean of benignity; do thou thyself, O man-loving Master,
O God of things eternal and wonderful, whom none among men by
thinking can comprehend, look upon us, and hearken unto us, thine
unworthy servants, and wheresoever in thy great name we bring this
oil, do thou send down thy gift of healing, and the remission of sins,
and heal him in the plentitude of thy mercy. Yea, O Lord, thou good
physician, thou sole merciful one and lover of mankind, who
repentest thee concerning our ills, who knowest that the intention of
man inclineth unto evil from his youth up, who desirest not the death
of a sinner, but that he should return and live, who for the salvation
of sinners, being God, becamest man, and for thy creature wast
thyself created: thou art he that hath said, I came not to call the
righteous but sinners to repentance: thou art he that hath sought the
lost sheep: thou art he that hath diligently sought the lost drachma,
and found it: thou art he that hath said, He that cometh unto me I will
in no wise cast out: thou art he that did not loathe the sinful woman,
who watered thy revered feet with tears: thou art he that hath said,
As often as thou fallest, arise, and be saved: thou art he that hath
said, There is joy in heaven over, one sinner that repenteth: do thou
thyself, O benign Master, look down from the height of thy sanctuary,
visiting us, thy sinful and unworthy servants, at this hour, with the
grace of thy Holy Ghost, and be present with thy servant, name, who
acknowledgeth his iniquities, and in faith draweth nigh unto thee;
and, accepting him in thine own love to man, in whatsoever he hath
offended, by word, or deed, or intention, making remission, do thou
cleanse him, and make him pure from every sin, and, being ever
present with him, keep the remaining time of his life, that walking in
thy statutes, he may never become a derision to the devil, so that in
him may be glorified thy most holy name.
Exclamation.
For it is thine to have mercy, and to save us, O Christ God, and to
thee we ascribe glory, with thine unbeginning Father, and with thy
most holy, and good, and life-creating Spirit, now and ever, and to
ages of ages. Amen.
And after the prayer the second priest straightway taketh a second
twig, and, dipping it in the holy oil, anointeth the sick person, saying
the prayer,
Holy Father, physician of souls and bodies....
Vide page 101.
And the deacon. Let us attend.
The third priest. Peace to all.
Prokimenon, tone iii.
The Lord is my light, and my Saviour, whom shall I fear?
Verse. The Lord is the defence of my life, of whom shall I be
afraid.
The epistle to the Corinthians, section cliii.
Brethren, ye are the body of Christ.... ending, Charity never faileth.
[19]