Advanced Platform Development With Kubernetes
1st Edition Craig Johnston download
https://ebookbell.com/product/advanced-platform-development-with-
kubernetes-1st-edition-craig-johnston-29870436
Explore and download more ebooks at ebookbell.com
Here are some recommended products that we believe you will be
interested in. You can click the link to download.
Advanced Platform Development With Kubernetes Enabling Data Management
The Internet Of Things Blockchain And Machine Learning 1st Edition
Craig Johnston
https://ebookbell.com/product/advanced-platform-development-with-
kubernetes-enabling-data-management-the-internet-of-things-blockchain-
and-machine-learning-1st-edition-craig-johnston-50196012
Advanced Platform Development With Kubernetes Enabling Data Management
The Internet Of Things Blockchain And Machine Learning 1st Edition
Craig Johnston
https://ebookbell.com/product/advanced-platform-development-with-
kubernetes-enabling-data-management-the-internet-of-things-blockchain-
and-machine-learning-1st-edition-craig-johnston-54981190
Advanced Java Ee Development With Wildfly Deepak Vohra
https://ebookbell.com/product/advanced-java-ee-development-with-
wildfly-deepak-vohra-5124540
Advanced J2ee Platform Development Applying Integration Tier Patterns
Torbjrn Dahln
https://ebookbell.com/product/advanced-j2ee-platform-development-
applying-integration-tier-patterns-torbjrn-dahln-1339482
Aris Design Platform Advanced Process Modelling And Administration 1st
Edition Rob Davis Auth
https://ebookbell.com/product/aris-design-platform-advanced-process-
modelling-and-administration-1st-edition-rob-davis-auth-2453202
Aris Design Platform Advanced Process Modelling And Administration 1st
Edition Rob Davis Auth
https://ebookbell.com/product/aris-design-platform-advanced-process-
modelling-and-administration-1st-edition-rob-davis-auth-4097324
React Projects Build Advanced Crossplatform Projects With React And
React Native To Become A Professional Developer 2nd Ed 2nd Roy Derks
https://ebookbell.com/product/react-projects-build-advanced-
crossplatform-projects-with-react-and-react-native-to-become-a-
professional-developer-2nd-ed-2nd-roy-derks-42876728
Intelligent Tools For Building A Scientific Information Platform
Advanced Architectures And Solutions 1st Edition Bruno Jacobfeuerborn
https://ebookbell.com/product/intelligent-tools-for-building-a-
scientific-information-platform-advanced-architectures-and-
solutions-1st-edition-bruno-jacobfeuerborn-4231618
Advanced Java 2 Platform How To Program Harvey M Deitel Paul J Deitel
https://ebookbell.com/product/advanced-java-2-platform-how-to-program-
harvey-m-deitel-paul-j-deitel-1077646
Advanced Platform Development With Kubernetes 1st Edition Craig Johnston
Advanced Platform Development With Kubernetes 1st Edition Craig Johnston
Craig Johnston
Advanced Platform Development with
Kubernetes
Enabling Data Management, the Internet of Things,
Blockchain, and Machine Learning
1st ed.
Craig Johnston
Los Angeles, CA, USA
Any source code or other supplementary material referenced by the
author in this book is available to readers on GitHub via the book’s
product page, located at www.apress.com/978-1-4842-5610-7. For
more detailed information, please visit http://www.apress.com/
source-code.
ISBN 978-1-4842-5610-7 e-ISBN 978-1-4842-5611-4
https://doi.org/10.1007/978-1-4842-5611-4
© Craig Johnston 2020
This work is subject to copyright. All rights are reserved by the
Publisher, whether the whole or part of the material is concerned,
speci ically the rights of translation, reprinting, reuse of illustrations,
recitation, broadcasting, reproduction on micro ilms or in any other
physical way, and transmission or information storage and retrieval,
electronic adaptation, computer software, or by similar or dissimilar
methodology now known or hereafter developed.
The use of general descriptive names, registered names, trademarks,
service marks, etc. in this publication does not imply, even in the
absence of a speci ic statement, that such names are exempt from the
relevant protective laws and regulations and therefore free for general
use.
The publisher, the authors and the editors are safe to assume that the
advice and information in this book are believed to be true and accurate
at the date of publication. Neither the publisher nor the authors or the
editors give a warranty, expressed or implied, with respect to the
material contained herein or for any errors or omissions that may have
been made. The publisher remains neutral with regard to jurisdictional
claims in published maps and institutional af iliations.
Distributed to the book trade worldwide by Springer Science+Business
Media New York, 1 NY Plaza, New York, NY 10004. Phone 1-800-
SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com,
or visit www.springeronline.com. Apress Media, LLC is a California LLC
and the sole member (owner) is Springer Science + Business Media
Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware
corporation.
Acknowledgments
I want to start by thanking Kelsey Hightower, who inspired me and so
many others with his passion and excitement for technologies that
advance a developer’s productivity. Kelsey’s live demonstrations, talks,
and tutorials convinced me that Kubernetes is a platform for
developing platforms. Kelsey is also responsible for the popularity of
my Kubernetes development utility kubefwd.
A big thank you to my friend, co-worker, author, and software
developer, David Elsensohn. David poured over every draft to ensure
my English syntax would compile in the readers’ minds. Thanks to
everyone at Deasil Works, especially Jeff Masud, for helping me carve
out time to write a book in one of our busiest years (and for ixing the
clusters I broke along the way).
Thanks to Apress editors Natalie Pao and Jessica Vakili for their
patience and encouragement. Thanks again to Natalie Pao for having a
vision for this book and encouraging me to write it. Thanks to my
technical reviewer David González for correcting my mistakes,
unintentional obfuscations, and providing valuable guidance for
technical clarity.
Lastly, thanks to my family and friends (most of them having no idea
what a “Kubernetes” is) who encouraged me to stay focused and
motivated. Thank you!
Table of Contents
Chapter 1: Software Platform and the API
Software Applications vs. Software Platforms
Dependency Management and Encapsulation
Network of Applications
Application Platform
Platform Requirements
Platform Architecture
Platform Capabilities
IoT
Blockchain
Machine Learning
Core Components
Con iguration
Ingress
Data Management
Metrics
APIs and Protocols
Summary
Chapter 2: DevOps Infrastructure
Cloud Computing
Cloud Native and Vendor Neutral
Redundancy
Portable Platforms
Getting Started Vendor Neutral
DevOps Toolchain
Repositories
Registries
CI/CD
GitLab for DevOps
k3s + GitLab
Summary
Next Steps
Chapter 3: Development Environment
Custom Development Kubernetes Cluster
Nodes
Server Setup
Prepare Nodes
Install Master Node
Join Worker Nodes
DNS
Remote Access
Con iguration
Repository
Ingress
TLS/HTTPS with Cert Manager
Persistent Volumes with Rook Ceph
Monitoring
Summary
Chapter 4: In-Platform CI/CD
Development and Operations
Platform Integration
Yet Another Development Cluster
RBAC
GitLab Group Kubernetes Access
Custom JupyterLab Image
Repository and Container Source
Local Testing
Additional Learning
Automation
GitLab CI
.gitlab-ci.yml
Running a Pipeline
Manual Testing in Kubernetes
Prepare Namespace
Run Notebook
Repository Access
GitOps
Summary
Chapter 5: Pipeline
Statefulness and Kubernetes
Real-Time Data Architecture
Message and Event Queues
Development Environment
Cluster-Wide Con iguration
Data Namespace
TLS Certi icates
Basic Auth
Apache Zookeeper
Apache Ka ka
Ka ka Client Utility Pod
Mosquitto (MQTT)
Summary
Chapter 6: Indexing and Analytics
Search and Analytics
Data Science Environment
Development Environment
TLS Certi icates
Basic Auth
ELK
Elasticsearch
Logstash
Kibana
Data Lab
Keycloak
Namespace
JupyterHub
JupyterLab
Summary
Chapter 7: Data Lakes
Data Processing Pipeline
Development Environment
Data Lake as Object Storage
MinIO Operator
MinIO Cluster
MinIO Client
MinIO Events
Process Objects
Summary
Chapter 8: Data Warehouses
Data and Data Science
Data Platform
Development Environment
Data and Metadata Sources
MySQL
Apache Cassandra
Apache Hive
Modern Data Warehouse
Hive
Presto
Summary
Chapter 9: Routing and Transformation
ETL and Data Processing
Development Environment
Serverless
OpenFaaS
ETL
Apache NiFi
Example ETL Data Pipeline
Analysis and Programmatic Control
Summary
Chapter 10: Platforming Blockchain
Private Blockchain Platform
Development Environment
Private Ethereum Network
Bootnodes
Bootnode Registrar
Ethstats
Geth Miners
Geth Transaction Nodes
Private Networks
Blockchain Interaction
Geth Attach
Jupyter Environment
Serverless/OpenFaaS
Summary
Chapter 11: Platforming AIML
Data
Hybrid Infrastructure
Development Environment
DNS
k3s Hybrid Cloud
Kilo VPN
Master Node
Worker Nodes
On-premises
Node Roles
Install Kilo
Platform Applications
Data Collection
MQTT IoT Client
ETL
Apache NiFi
Python CronJob
Machine Learning Automation
Jupyter Notebook GPU Support
Model Development
Deploy Arti icial Intelligence
Summary
Index
About the Author
Craig Johnston
currently holds the position of Chief Architect at Deasil Works, Inc. and
has been developing software for over 25 years. Craig’s expertise
revolves around microservices, arti icial intelligence, algorithms,
machine learning, and blockchain technologies.
Craig has helped lead his team to signi icantly improved
productivity and return on investment across many client projects,
leveraging Kubernetes, Docker, Golang, Cassandra, Ka ka, and Elastic, to
name a few. The team and he are developing more productive, stable,
clean, and faster applications than ever in the past, and the results are
beautiful and innovative IoT management systems, IoT
implementations, mobile applications, business intelligence, data
management, and machine learning platforms.
As the former Director of R&D at Napster and later a handful of
Universal and Sony subsidiaries, Craig has been fortunate to spend
many of his early days on the bleeding edge, in the open green ields of
new media and disruptive technology.
Craig is successfully operating multiple commercial Kubernetes
platforms utilizing all the technology and concepts proposed in
Advanced Platform Development with Kubernetes.
About the Technical Reviewer
David Gonzalez
is a DevOps engineer who has written three books about DevOps and
microservices. He works as a consultant, helping large companies to
advance their systems development, by tweaking related software
processes and tools. David is also a Google Developer Expert
(https://developers.google.com/experts/people/david
gonzalez-gonzalez ) in Kubernetes (Google Container Engine) and
a member of the Node.js Foundation, working on security in third-party
npm packages. In his free time, he enjoys cycling and walking with his
dogs in the green ields of Ireland.
(1)
© Craig Johnston 2020
C. Johnston, Advanced Platform Development with Kubernetes
https://doi.org/10.1007/978-1-4842-5611-4_1
1. Software Platform and the API
Craig Johnston1
Los Angeles, CA, USA
On October 28, 2018, IBM announced a $34 billion deal to buy Red
Hat,1 the company behind Red Hat Enterprise Linux (RHEL), and more
recently Red Hat OpenShift, an enterprise Docker/Kubernetes
application platform. What we see is $34 billion of evidence that Cloud-
native and open source technologies, centered on the Linux ecosystem
and empowered by Kubernetes, are leading disruption in enterprise
software application platforms.
Any exposure to enterprise software marketing presents a steady
stream of platform services released almost daily by major cloud
providers, including products like Google Cloud Machine Learning
Engine, Microsoft’s Azure Machine Learning service, Amazon Managed
Blockchain, and IBM Watson IoT Platform, to name a few. Big providers
like Amazon, Microsoft, IBM, and Google are not only responding to
market demand for these technologies but creating a greater awareness
of their accessibility for solving problems across a variety of industries.
Large software vendors are rapidly responding to the demand for these
capabilities and perpetuate their demand by re ining and marketing
products that demonstrate their value. These vendors are often merely
service-wrapping the latest in open source software, adding polished
user interfaces and proprietary middleware. Peek under the hood of
these hyper-cloud services and you often ind a mesh of cloud-native
and even vendor-neutral technologies for machine learning (ML), like
TensorFlow, Keras, and PyTorch, or Blockchain capabilities powered by
Ethereum and Hyperledger, and high-performance IoT data collectors
like Prometheus and Ka ka. These vendors are not stealing this
technology from the open source community; some of the most
signi icant contributions in this ecosystem are the vendors themselves.
Developing an enterprise-grade platform from the ground up, with
capabilities as diverse as Blockchain and Machine Learning, would have
required an enormous effort only a few years ago. Your other option
would have been a signi icant investment and long-term commitment
to a commercial platform. Google disrupted the entire commercial
platform business with Kubernetes, a free, open source, cloud-native,
and vendor-neutral system for the rapid development of new platforms
that can easily support almost any technology with enterprise-grade
security, stability, and scale. Expect to see another signi icant wave of
platform innovation, as Kubernetes matures and allows software and
platform developers to focus more time on features, with less custom
work needed on infrastructure, networking, scaling, monitoring, and
even security.
This book aims to build a simple demonstration platform in a
vendor-neutral approach using Kubernetes. With only minimal
modi ications, this new platform should run on any primary cloud
provider able to run Kubernetes and offer a small number of widely
available dependencies such as storage, memory, and CPU. Each
existing, open source technology implemented in this platform has a
specialized focus on a particular solution. Offering Machine Learning,
Blockchain, or IoT-based services will not in themselves be a core
differentiator for a platform. However, operating these technologies
together within Kubernetes provides a foundation in which to build and
offer novel solutions through their combined efforts, along with
providing a template for future additions.
In the early 1990s, databases were often operated and accessed as
independent applications. The combination of a database and a web
server revolutionized the Internet with dynamic database-driven
websites. These combinations seem obvious now, and Kubernetes
together with service mesh technologies like Istio and Linkerd is
making connections between diverse applications, even with con licting
dependencies, not only possible but adding security and telemetry to
the platform.
Software Applications vs. Software Platforms
You may be a software developer and have a solution to a problem in a
speci ic industry vertical. With a speci ic mix of closed and open source
software, you wish to combine these capabilities under an API and
expose them in support of a speci ic application. Alternatively, you may
be a value-added reseller and want to offer customers an application
development platform that comes with a suite of prepackaged features
such as Machine Learning, Blockchain, or IoT data ingestion. Software
platforms like Kubernetes are the ideal environment for developing a
singular focused application or a platform as a service (PaaS) offering
customers an environment in which they can develop and extend their
applications (Figure 1-1).
Figure 1-1 A software application, a platform as a collection of applications, and a
platform-based application
Dependency Management and Encapsulation
Containerization has made running software applications more
portable than ever by creating a single dependency, a container
runtime. However, applications often need access to a sophisticated mix
of resources, including external databases, GPUs (graphics processing
units for machine learning), or persistent storage, and likely need to
communicate with other applications for authentication, database
access, and con iguration services. Even a single containerized
application typically needs some form of management over it and its
access to external resources. The problem of managing connected
containers is where Kubernetes comes in; Kubernetes orchestrates the
containers of applications and manages their relationship to resources.
Network of Applications
Not all software applications need sophisticated platform architecture.
Most software applications can be developed and merely run on a
computer that meets their operational dependencies. Platforms come
into play when you wish to operate multiple applications together and
form an interconnected network of services, or when multiple
applications can bene it from shared functionality, con iguration, or
resource management (Figure 1-2).
Figure 1-2 Network of containerized applications
Application Platform
Even if your goal is to develop a single-purpose online application ,
there are several reasons to embark on developing a software platform
in Kubernetes. Large and small, complex and straightforward,
enterprise and small-scale applications bene it when implemented in
the context of a software platform. Software platforms provide an
architecture to solve common problems and reduce the need for
custom development in several areas, including communication,
storage, scaling, security, and availability.
Architecting an application as a platform means that from the
ground up the software is intended to be extended beyond its
fundamental requirements, with the ability to upgrade and deploy new
components independently. A proper platform welcomes the addition
of the latest trends in open source, and when innovations arise, and
open source products are released, it is successful software platforms
that wrap and leverage their functionality to stay current. A proper
software platform should never assume the label legacy; it should
remain in a constant, iterative cycle of improvement.
The next section goes more in-depth into how this is accomplished
with Kubernetes as the central component. Kubernetes solves the
problems that traditional enterprise solutions like the service-oriented
architecture (SOA) have attempted to solve for decades, only
Kubernetes does this with protocols and methodologies that power the
global Internet, like DNS, TCP, and HTTP, and wraps them in an elegant
and robust API, accessible through those very same protocols. The
platform is architected around Kubernetes’s concept of a Service and its
relationship to containerized applications (Figure 1-3).
Figure 1-3 The relationship between services and application
Platform Requirements
This book focuses on implementing a foundational data-driven, Data
Science , and Machine Learning platform, primarily but not limited to
IoT data, and providing opportunities for interconnection with
Blockchain technology. If this sounds like a lot of hype, it is, and as the
hype fades, it’s time to get to work. As these technologies leave the lab,
they begin to fade into the background, and over the next decade, they
will begin to silently provide their solutions behind new and innovative
products.
If you are familiar with the “Gartner Hype Cycle for Emerging
Technologies” (Figure 1-4) in 2018,2 you would have seen deep neural
networks (deep learning), IoT platforms, and Blockchain still on the
“peak of in lated expectations” and rolling toward the “trough of
disillusionment.” Disillusionment sounds dire, but Gartner marks the
following phase for these technologies as the “slope of enlightenment”
and a later plateau in the next 5–10 years. Much innovation happens
before these technologies plateau, and a lexible architecture built from
a collection of connected containers, managed by Kubernetes, should
easily keep you relevant for the next decade or more.
Figure 1-4 Gartner’s Hype Cycle for Emerging Technologies, 20183
While individual components may come and go as trends peak and
plateau, data is here to stay; the platform needs to store it, transform it,
and provide access to it by the latest innovations that produce value
from it. If there is a central requirement for Advanced Platform
Development with Kubernetes, it would be accessing the value of data,
continuously, through the latest innovative technologies in IoT, Machine
Learning, Blockchain, and whatever comes next.
A inal requirement of Advanced Platform Development with
Kubernetes is to stay open source, Cloud native, and vendor neutral. A
platform with these principles can leverage open source to harness the
global community of contributing software developers looking to solve
the same problems we are. Remaining Cloud native and vendor neutral
means not being tied to or constrained by a speci ic vendor and is just
as functional in a private data center, as it can on AWS, GKE, Azure, or
all of them combined as the concept of “hybrid cloud” grows in
popularity.
Platform Architecture
With Kubernetes it is common to build software platforms from a
collection of specialized components, written in a variety of languages
and having vastly different and even con licting dependencies. A good
platform can encapsulate different components and abstract their
interfaces into a standard API or set of APIs.
Object-oriented software concepts are a great reference tool for
overall platform architecture. Trends in microservice architectures
encourage the development of several, minimal applications, often
taking the form of an object Class, providing a limited number of
operations in a speci ic problem domain, letting the larger platform
take care of aggregate business logic. To implement this approach, take
the concept of an Object and apply it to the Kubernetes implementation
of a Service (Figure 1-5). Like software interfaces, Kubernetes services
represent one or more entry points to an application. The object-
oriented software principles of abstraction, encapsulation, inheritance,
and polymorphism can express every layer of the platform architecture.
Figure 1-5 Class design and service architecture
Kubernetes is well suited for platform development and may be
overkill for any lesser task. I believe, as I hope you discover in this book,
that there is not much to debate on Kubernetes itness for platform
development. Containers solved many of the problems with
dependency management by isolating and encapsulating components;
Kubernetes manages these containers and in doing so forms the
framework for a software platform.
Platform Capabilities
The purpose of the platform outlined in this book is to demonstrate
how Kubernetes gives developers the ability to assemble a diverse
range of technologies, wire them together, and manage them with the
Kubernetes API. Developing platforms with Kubernetes reduces the
risk and expense of adopting the latest trends. Kubernetes not only
enables rapid development but can easily support parallel efforts. We
develop a software platform with as little programming as necessary.
We use declarative con igurations to tell Kubernetes what we want. We
use open source applications to build a base software platform,
providing IoT data collection, Machine Learning capabilities, and the
ability to interact with a private managed Blockchain.
Starting with the ingestion, storage, and retrieval of data, a core
capability of the platform is a robust data layer (Figure 1-6). The
platform must be able to ingest large amounts of data from IoT devices
and other external sources including a private managed Blockchain.
Applications such as Elasticsearch, Ka ka, and Prometheus manage data
indexing, message queueing, and metrics aggregation. Speci ic services
capture Blockchain transactions from applications such as Ethereum
Geth nodes and send them to Apache Ka ka for queueing and
Elasticsearch for indexing.
Above the data layer sits an application layer (Figure 1-6), providing
capabilities utilizing this data, such as Machine Learning automation.
Platform services wire together and expose data sources that export
and serve persistent and streaming data usable for Machine Learning
experiments, production AI inference, and business analytics.
The Platform naturally supports the expansion of features through
the management of containers by Kubernetes. Serverless technologies
including OpenFaaS provide higher-level expansion of features.
Serverless support allows the rapid development and deployment of
real-time data processors, operations that run at speci ic intervals, and
new API endpoints, allowing specialized access to data, performing AI
operations, or modifying the state of the platform itself.
The platform envisioned in this book forms a data-driven
foundation for working with trending technologies, specializing in
Machine Learning, Blockchain, and IoT. Components for the ingestion,
storage, indexing, and queueing of data are brought together and allow
ef icient access to data between the specialized technologies. The
platform provides data scientists the access to data and tools needed to
perform Machine Learning experimentation and the development of
production-ready neural network models for deployment by way of
Serverless functions able to make predictions, perform classi ication,
and detect anomalies from existing and inbound data. Blockchain
technology is used to demonstrate how third-party ledger transactions
and smart contract executions can seamlessly inner-connect to the data
processing pipeline.
Figure 1-6 Platform application and data layers
The platform, developed iteratively, eventually consists of a large
number of services, ranging in size and complexity, mixing giant
monoliths mixed with small serverless functions. Some services consist
of a cluster of Java applications, while some services only execute a few
lines of Python. If this sounds like a nightmare, it is not. Fortunately,
containerization has helped us isolate an application’s operation and
dependencies, exposing what is needed to con igure, control, and
communicate with the application. However, containerization only
gives us limited options for visibility and control over our collection of
services. Kubernetes gives us great con iguration access controls over
infrastructure resources, security, and networking, but leaves platform
application–level concerns like encrypted communication between
services, telemetry, observability, and tracing, to the applications
themselves or higher-level specialized systems like Istio or Linkerd. The
platform developed in this book is a collection of services that can
operate with or without Istio or Linkerd. Istio and Linkerd are still
young, and best practices for implementing them are still maturing.
The next few sections de ine the platform’s three main
requirements: IoT, Blockchain, and Machine Learning in more detail
(Figure 1-7).
Figure 1-7 IoT, Blockchain , and Machine Learning in Kubernetes
IoT
The Internet of Things (IoT) and the newer Industrial Internet of
Things (IIoT) are technologies that have matured past the hype phase.
The physical devices of an industry are not only expected to be
connected and controlled over the Internet but have a closer
relationship to their larger data platforms. Kubernetes is capable of
managing both the data and control plane in every aspect of IoT. This
book focuses on three main uses for Kubernetes in the IoT domain,
including the ingestion of data, as an edge gateway, and even an
operating system (Figure 1-8).
Figure 1-8 Three uses of Kubernetes platforms in IoT
Ingestion of Data
The irst and most obvious use of Kubernetes is to orchestrate a data
ingestion platform. IoT devices have the potential of producing a large
volume of metrics. Gathering metrics is only one part of the problem.
Gathering, transforming, and processing metrics into valuable data and
performing actions on that data requires a sophisticated data pipeline.
IoT devices utilize a wide range of communication protocols, with
varying quality of support from various software products built to
speci ic devices and protocols. To effectively support data from a range
of IoT and IIoT devices, the platform needs to speak in protocols like
AMQP (Advanced Message Queuing Protocol), MQTT (Message Queue
Telemetry Transport) , CoAP (Constrained Application Protocol), raw
TCP, and HTTP, to name a few.
JSON (JavaScript Object Notation) over HTTP is the most popular
and supported messaging protocol on the Internet. Every signi icant
programming language supports JSON. JSON drives nearly all public
cloud APIs in one way or another. Kubernetes’s own API is JSON-based,
and YAML, a superset of JSON, is the preferred method of declaring the
desired state.
JSON may not be as ef icient as binary messages or as descriptive as
XML; however, converting all inbound messages to JSON allows the
platform to unify data ingestion on the most lexible and portable
standard available today. The platform consists of custom
microservices implementing a variety of protocols, parsing inbound
message or querying and scraping remote sources, and transforming
these messages to JSON. An HTTP collection service accepts JSON
transformed data to buffer and batch. This architecture (Figure 1-9)
allows unlimited horizontal scaling, accommodating large volumes of
data.
Figure 1-9 IoT data ingestion
The chapter “Pipeline” covers the implementation of the ingestion
and transformation services: Apache NiFi, Prometheus, Logstash,
Elasticsearch, and Ka ka.
Edge Gateway
Kubernetes in the IoT space is beginning to include on-premises, edge
deployments. These are mini-clusters that often include as little as a
single node. On-premises clusters often operate a scaled-down version
of the larger platform and are typically responsible for communicating
with IoT devices on the local area network, or the nodes themselves are
attached to proprietary hardware and protocols, legacy control
systems, or lower-level, serial communication interfaces. Industrial use
cases for the collection of data can often include sub-second sampling
of device sensors or merely a volume of data only useful for
classi ication, anomaly detection, or aggregation.
An on-premises platform (Figure 1-10) can handle the initial
gathering and processing of metrics and communicate results back to a
larger data processing platform. New Kubernetes distributions such as
Minikube, Microk8s, k3s, and KubeEdge specialize in small or single-
node implementations on commodity hardware.
Figure 1-10 On-premises Kubernetes platform
Running a scaled-down platform on-premises solves many security
and compliance issues with data handling. In scenarios where data
must remain on-premises by strict compliance rules, on-premises
clusters can process data, whose resulting metadata, inference, and
metrics aggregation can transmit to a remote platform for further
processing, analysis, or action .
IoT OS
The third use of Kubernetes for IoT addressed in this book is just
starting to take root, that is, Kubernetes as an IoT operating system
(Figure 1-11). ARM processors are cheap and energy ef icient. Products
like the Raspberry Pi have made them incredibly popular for hobbyists,
education, and commercial prototyping. Container support for ARM-
based systems has been around for a few years now, and running
containerized applications on IoT devices has nearly all the advantages
as does running them on more powerful and sophisticated hardware.
IoT devices running containers orchestrated by Kubernetes can take
advantage of features like rolling updates to eliminate downtime when
upgrading applications. Running a small collection of containers in
Kubernetes on an IoT device lets you take advantage of microservices
application architecture, resource allocation, monitoring, and self-
healing. The development of software for small, low-power devices
once required using a proprietary operating system and writing much
of the code to support activities like irmware updates, crash reporting,
and resource allocation. IoT devices supporting scaled-down versions
of Kubernetes are still new and poised for growth as more developers
begin to see the potential for many of the common challenges with IoT
software solved with platforms like Kubernetes.
Slimmed down distributions, like the 40mb k3s, are making
Kubernetes an excellent choice for small, resource-limited devices like
the Raspberry Pi and the large family of SOC boards on the market
today.
Figure 1-11 Kubernetes platform on an IoT device
Blockchain
With the maturity of Smart Contracts,4 Blockchain technology is now a
type of platform5 itself. Smart contracts allow the storage and execution
of code within the distributed, immutable ledger of the Blockchain (see
Chapters 9 and 10). The inclusion of Blockchain technology provides
the platform a capability for transactional communication with
untrusted participants. Untrusted in this context means no personal or
legal contractional trust is needed to transmit value expressed as data.
Blockchain provides a permanent record of a transaction, veri ied in a
shared ledger. The external parties only need to operate Blockchain
nodes capable of executing a shared mathematical algorithm. Trusting
the integrity of a transaction comes from the consensus of veri ications
from a broader network of nodes. Describing the in-depth conceptual,
philosophical, and technical details of a Blockchain is out of scope for
this book.
Private Managed Blockchains
Blockchain technology is a distributed network of nodes, and there are
very few use cases for Blockchains within a closed system. However, the
concept of private or protected Blockchains is the focus of this platform,
which represents essential capabilities for participation in a managed
network.
The platform provides the allocation and bootstrapping of third-
party participants within its selected network of nodes (Figure 1-12).
Private Blockchains do not imply a level of trust beyond the allowance
of participation. In closed systems, this trust is one way. Traditional
platforms can allow a third party to create an account and utilize the
system. However, that third party must also trust the platform operator.
We trust that Google does not edit and modify emails we receive; we
trust that Twitter does not tweet on our behalf. Blockchain participants
rely on a majority of participants to verify a transaction rather than a
central authority. With Blockchain technology, the platform is only
responsible for equal participation and management of participants.
Incorporating Blockchain technology directly into the platform brings it
under a uni ied communication network with other services and
facilitates the management and con iguration of this technology as its
concepts and capabilities rapidly mature. The chapter
“Platforming Blockchain” describes the technical details for
implementation.
Figure 1-12 Blockchain bootstrapping, and the ingestion of Blockchain transactions
Use Cases
Industry verticals including inance, supply chain, logistics,
manufacturing, process compliance, and many more are all looking for
solutions provided by Blockchain capabilities, especially around the
execution of Smart Contracts. Smart Contracts are blocks of immutable
code that sit in the Blockchain and are executable by anyone in the
network of connected Blockchain nodes able to meet the criteria of the
contract’s interface. Streaming transactional events related to Smart
Contracts and the execution of Smart Contracts provides a wealth of
opportunities beyond recording the active intentions of third parties;
they can communicate the state of IoT devices, or the automated results
of arti icial intelligence derived from Machine Learning. X Corp can
verify that Z Corp sent data while Z Corp can verify that the platform
processed the data and provided X Corp the results, while additional
entities can execute Smart Contracts related to this activity (Figure 1-
13). The platform not only facilitates access to this trustless network
but interacts with it through streaming, real-time data queues. The
platform can index the transactions and provide in-depth analysis of
transaction types, frequency, and values.
Figure 1-13 Addition, execution, and observation of Blockchain Smart Contracts
Ethereum and Hyperledger are popular choices for
private/permissioned Blockchains supporting smart contracts.
Hyperledger was designed explicitly for private enterprise blockchains
and does not contain currency features. Although it’s unlikely the
platform’s enterprise use cases require a Blockchain currency, neither
is it a deterrent. The platform in this book uses Ethereum, making its
capabilities compatible with public or private blockchains, with or
without the need for currency. The platform is not limited to Ethereum
and can easily be extended to support Hyperledger or the newest
trends in Blockchain.
The chapter “Blockchain” covers the implementation of Ethereum
nodes into the platform and provides examples for interconnecting
with the platform’s data layer.
Machine Learning
Machine Learning and speci ically deep learning is another ield of
technology nearing, or at peak hype according to Gartner. All the major
hyper-cloud providers including Google, IBM, AWS, and Azure either
offer platforms with service-wrapped versions of TensorFlow, PyTorch,
Keras, or their in-house developed Machine Learning development and
production automation tools. The major cloud providers respond
quickly to the hype, but this response is also an indication that the
technology has matured to the point of a commodity. Commodity
technology might have lost a bit of its novelty and excitement, but if it
survives past that initial phase, then it’s ready for business. We may be
at the tip of the expectation iceberg for Machine Learning, but it can
and does solve industry problems today, and so its capabilities belong
in the platform and exposed to its connected data.
Providing a simple service-wrapping of Kube low with some limited
custom con igurations would be powerful enough to call this a data
science platform. Kube low as a service would alone be a decent
competitor to the hyper-clouds. Wrapping Kube low would take less
than a chapter to describe and, more importantly, miss out on the
combinatorial power of the adjacent capabilities of Blockchain and IoT
data, all sitting atop the core components, covered in the next section.
Industry wants real-time answers from real-time data. Data science
needs static data and the ability to perform reproducible experiments
and learn from a known quantity. Machine Learning is an application of
data science, and machines learn best on ixed sets of data. The
platform provides both by providing access to persistent data and the
ability to label and snapshot subsets of data to form trained neural
network models that can then be immediately deployed and tried
against streams of real-time data (Figure 1-14). The cost of iterative
experimentation is high when the technological ecosystem of the data
science lab is alien to production concerns of the enterprise. Kube low
and other cloud-native technologies help bring these environments
closer together, reducing the cost and risk associated with
experimentation. The reduction of risk leads to new opportunities for
experimentation and the testing of novel theories or approaches to
machine learning and arti icial intelligence.
Figure 1-14 High-velocity data pipelines to Machine Learning
Automation and Management
With software frameworks like Keras or PyTorch, you can now easily
con igure a simple yet trainable neural network in a few dozen lines of
code. The entire machine learning life cycle (Figure 1-15) requires
more than a few moving parts, from data access, transformation, and
experimentation to the deployment of trained models. Kubernetes-
compatible solutions like Apache Air low and Kube low are making
great strides in the areas of automation. This book focuses on a few
components of Kube low as a sub-platform for data science. Kube low
came from Google’s internal solution for automating the use of
TensorFlow, a popular Machine Learning framework also developed by
Google and open sourced. The chapters “In-Platform CI/CD,” “Indexing
and Analytics,” and “Platforming AIML” explore some of the technology
that powers Kuber low, including JupyterLab, JupyterHub, ML low and
Seldon Core.
Figure 1-15 Kube low process
Core Components
The following section covers platform components you will likely never
see on Gartner’s hype charts. However, these core components form the
essential glue that holds the platform together. These components
include con iguration, ingress, data management, metrics, APIs, and
protocols.
Containers, con iguration, ingress, data management, and metrics
collection are the core components that make up the platform’s core
infrastructure, discussed later. The following brie ly reviews their
purpose, the problems they solve, and their role in tying together
specialized applications. Realizing the potential of trends in the
Internet of Things, Machine Learning, Blockchain, and future
innovations is only ampli ied when incorporated into a platform that
can combine their focused expertise. Solve problems across new
domains, harnessing the combinatorial effect of their speci ic solutions
—for example, utilizing Arti icial Intelligence driven from models
developed through deep learning on metrics collected from IoT devices
that execute a Smart Contract on the Blockchain whose results
communicate a change in the operational state of other IoT devices.
Machine Learning developed independent from Blockchain and IoT
technology is certainly not dependent on any of them. A wide variety of
languages is used to develop these technologies, each with diverse
dependencies. However, with little effort, they can all run in containers
and communicate in protocols that are proven in reliability and
limitless scale, because they scale the Internet itself. TCP/IP, HTTP, and
DNS are the underlying protocols of the Internet, and within
Kubernetes they are the methods of communication and service
discovery. This relationship between Containers comes from the
Container API and its orchestrator, Kubernetes. Kubernetes makes
containers easy and elegant to con igure, scale, and maintain.
Therefore, Kubernetes itself, along with containers, forms the primary
core component of the platform. If you are reading a book on advanced
platform development, you probably have a irm grasp on the
advantages of containers as well as the many supporting objects
Kubernetes provides, including the powerful Con igMap and Secret.
Con iguration
Two forms of con iguration make up the platform: the con iguration of
the platform itself, a set of Kubernetes objects expressed in YAML iles,
and the con iguration of various applications within the platform. This
book uses the kubectl utility for con iguring Kubernetes. The
kubectl utility provides three kinds of object management:
imperative commands, imperative object con iguration, and declarative
object con iguration. This book relies primarily on declarative object
con iguration by describing a desired state in a series of YAML iles and
using kubectl to apply them. The chapter “Development
Environment” presents a method of organizing and maintaining the
Kubernetes con iguration manifests, an essential aspect of keeping your
platform con iguration organized and documented.
The con iguration of individual applications within the platform is
the concern here and why con iguration is considered a core
component. Kubernetes provides the object types Con igMap and
Secret to provide a rich set of options for application con iguration.
Application Parameters
A container can wrap nearly any application, and the three most
common ways to con igure an application include command-line
parameters, con iguration iles, environment variables, and
combinations of the three. If you have spent any time with Docker or
Kubernetes, it is not uncommon to specify a long list of parameters
required to con igure an application for execution, or to populate a
series of environment variables, or to mount a con iguration directory.
With these three methods of con iguration, nearly any application can
be con igured and have a standard method to manage the con iguration
for all components of the platform. This is an essential component of
the platform’s core infrastructure.
Con igMaps and Secrets are con iguration object types provided by
Kubernetes; they are persistent and available throughout the cluster.
The key/value pairs of Con igMaps and Secrets can be mounted as
ilesystems within a Pod, the keys being ile names and value as data
whose mount points are shared by one or more containers in the Pod.
Con igMaps and Secrets can populate environment variables within
containers or populate command-line arguments used in the execution
of the container’s application.
The chapter "Development Environment" on infrastructure covers
the management and organization of Con igMaps and Secrets in further
detail, and if you come from any experience with Kubernetes, you may
be well versed in their use. The intention here is to more clearly de ine
their value as core infrastructure components to the platform.
Ingress
Ingress is de ined as “the act of entering” and is the basic concept of
accepting inbound data to the platform. However, ingress is one of the
most critical components of the framework. Ingress is responsible for
providing a means of securing inbound communication over protocols
like Transport Layer Security (TLS), routing HTTP traf ic to various
services based on a variety of con igured rules. Although majority
interaction with the platform is over the HTTP protocol, consisting of
REST-style API calls from external systems or web and native
applications, the platform also provides listeners for custom inbound
TCP traf ic for speci ic IoT devices and protocols. In some software
platforms, infrastructure-level ingress is an afterthought; large
monolithic and stateful applications often assume a direct interaction
with inbound requests and expect the ingress layers above to be thin.
Unfortunately, these more traditional ways of utilizing popular and
in luential proxies like Nginx and Envoy often fail to take advantage of
their power in this specialization or do so as a means to work around
implementation requirements.
The platform described in this book only scrapes the surface of
utilizing Nginx to manage ingress. However, it is a core component and
essential to the network and architectural layout of the platform. Envoy
is another new and popular choice for reverse-proxy support and one
of the core components of Istio. The platform described in this book
will use Nginx for public HTTP ingress .
Data Management
Data management is the fundamental core component of the enterprise
platform. The platform must manage data after it’s accepted through
ingress and retrieved through APIs. The data management layer of the
platform is also the necessary means of communicating the results of
various processors. Raw data comes into the platform in the form of
metrics from IoT devices, results of Blockchain transaction, and
communication through HTTP APIs and TCP ports. This data is
retrieved and processed to form new Blockchain transactions, send
commands to IoT devices, and form predictions derived from machine
learning models; the results of which become new data, traveling and
continuously re ined through this recursive ecosystem.
The platform can harness the best in class technologies for message
queues, indexing, and metrics aggregation by incorporating modern
and proven open source technologies, including Apache Ka ka,
Elasticsearch, and Prometheus. Implementing each of these
technologies is addressed in the chapters “Pipeline," and "Indexing and
Analytics.” From the perspective of the software platform, the core
components are the underlying infrastructure that wrap all specialized
functionality. The purpose of the platform is not merely to service-wrap
technologies like Apache Ka ka or Elasticsearch for external platform
capabilities. Integrating these technologies into the platform
infrastructure gives the advantages of standardized management
capabilities through Kubernetes, but simpli ies communication and
observability through their deep integration. These technologies form a
higher-level infrastructure of the stack and provide their capabilities
through custom intermediaries, connecting the specialized applications
of IoT data, Machine Learning, and Blockchain by normalizing access to
their resulting data .
Metrics
There is no shortage of hosted PaaS offerings willing to collect your
metrics, and they offer APIs and beautiful dashboards for developing
reports, business analytics, and intelligence. Aggregating, sorting, and
organizing metrics is big business, and thanks to open source
community and SoundCloud, we have Prometheus as a free and open
source solution. SoundCloud developed and open sourced Prometheus
in 2015, after which it became the second Cloud Native Computing
Foundation incubated project in 2016 following Kubernetes.
Prometheus is now a graduate project of the Cloud Native Computing
Foundation and actively developed.
SoundCloud developed Prometheus when they determined that
solutions like StatsD and Graphite could not handle their needs.
Prometheus is a high-performance metrics aggregator and records real-
time metrics into a time series database. Prometheus can not only scale
to our future needs but has a robust and lexible query language. The
platform in this book utilizes Grafana to build visually stunning
dashboards that query our metrics scraped by Prometheus.
Prometheus scrapes metrics from applications and offers of icial
and mature client libraries in Go, Java, and Python on Ruby with
unof icial third-party client libraries in Bash, C++, Common Lisp, Elixir,
Erlang, Haskell, Lua, .Net, C#, Node.js, Perl, PHP, and Rust. This
collection of SDKs means you can add deep instrumentation to nearly
any modern application. The client libraries are well written and easy
to implement. Prometheus forms an essential fork in the platform’s
data pipeline, for use in rich analytics dashboards and also allowing
Blockchain and Machine Learning capabilities to not only feed into this
data stream but react to it.
APIs and Protocols
The application programming interface (or the platform API) provides
external access for interacting with the platform. An API is a broad term
and can be used to describe how one portion of software communicates
with another, how an enterprise accesses its data, or how to invoke
programmatically driven business logic, either internally or externally.
The latter, external access, being the concern of the platform API. This
external interface to the platform is concerned with the storage and
retrieval of data, the recording of events, the con iguration of the
desired platform state, the invocation of business logic, and the
extension of platform functionality. The platform API empowers the
construction of web-based and native applications customized to a
speci ic vertical, or allows existing IT systems to interact with its
capabilities or report data and events. The platform uses its API to
perform multiple actions necessary in the provisioning of accounts and
users, supply data to business analytics and intelligence solutions, and
provide front-end user interfaces for extending and augmenting data
pipelines for data science and machine learning.
The Platform presented in this book is re lective of many real-
world data platform implementations, being a collection of monolithic
applications, microservices, and (Serverless) functions. Each
component of the platform may have different methods of interaction.
Elasticsearch uses a RESTful API for processing user requests as well as
an asynchronous transport protocol for internal communication with
its nodes. Communication with Ka ka is performed over a TCP-based
binary protocol and additionally offers a REST proxy. This book covers
Elasticsearch and Ka ka implementation in the “Pipeline,” and “Indexing
and Analytics” chapters. In the world of API development, there is no
shortage of solutions; new and innovative protocols like gRPC and
GraphQL are maturing and gaining traction, as older ideas such as SOAP
are less likely to be considered in new development.
The Platform in this book takes the middle road when it comes to
the fundamental interactions involving con iguration. REST, or
representational state transfer, is by far the most popular API
implementation due to its simplicity and ubiquity across the Internet
and the range of tools and clients for working with it. REST may not be
as fast and compact as gRPC or as lexible as GraphQL, but REST has no
requirements for its clients beyond HTTP and its verbs POST, GET, PUT,
PATCH, and DELETE. The platform uses JSON (JavaScript Object
Notation) for communication over REST. REST is widely accessible
mostly because HTTP is the only requirement, a universally established,
mature, and stable protocol.
Although the platform’s core API is an implementation of REST,
established through HTTP endpoints exposed by Ingress, there is the
opportunity to develop custom, low-level TCP listeners as well as offer
specialized services over gRPC and GraphQL. The Platform is not
limited or constrained by implementing any particular API protocol;
constructing platforms in Kubernetes makes adding additional
interfaces easier than ever. Traditionally businesses often have a hard
time seeing APIs beyond their endpoints, often evidenced by monolithic
applications evolving into large and unwieldy collections of highly
coupled dependencies between the API and underlying data. While it is
possible to develop a traditional monolithic system in Kubernetes, you
would be working out an anti-pattern and failing to take full advantage
of one of Kubernetes’s best features, Services. Kubernetes Services may
be backed by a collection of both monolithic and micro
application architectures.
In regard to the platform API architecture, Kubernetes services
compare to the concept of a Class in object-oriented design (OOD),
although a strained analogy. There has been a lot of thought and theory
put into the description and organization of services in the world of
microservice architectures, and that is well beyond the scope of this
book, but thinking of services as nouns providing access to
corresponding verbs is a good starting point for platform design.
Kubernetes services are the persistent gateways for all API calls, JSON-
REST, gRPC, GraphQL, binary- or text-based TCP, and UDP; virtually
anything that can listen on a port assigned to an IP address can be an
endpoint of a Service, internal or external to the platform. The Platform
centers design around Kubernetes services.
Summary
The goal of this book is to give you examples and inspiration to develop
productive and compelling software platforms and distributed
applications leveraging Kubernetes, with examples that tie together
1
2
3
capabilities from a range of technologies. This chapter de ined a type of
data-driven software platform, set to combine the capabilities of IoT
technology, Machine Learning, and Blockchain. While demand for
speci ic capabilities comes and goes, the platform’s core components
center on con iguration, Ingress, data management, and metrics. These
core capabilities form a framework of essential services, supporting
limitless combinations of new technology and their relationship to its
data.
Infrastructure has often been the sole domain of operations. As the
gap between development and operations has narrowed in recent
years, the term DevOps has gained popularity. While some
organizations see DevOps as a role, a more accurate expression may be
a range of responsibilities and tasks performed by many different roles.
DevOps encompasses the provisioning of hardware, installation and
management of server clusters, con iguration management, continuous
integration and continuous deployment, to name a few. The following
chapter on infrastructure covers the DevOps needed for essential core
components as well as con iguration management, integration,
operations, monitoring, and maintenance of the platform.
Footnotes
IBM to Buy Red Hat, the Top Linux Distributor, for $34 Billion.” The New York
Times, October 28, 2018, sec. Business.
https://www.nytimes.com/2018/10/28/business/ibm-red-hat-
cloudcomputing.html
Walker, Mike. “Hype Cycle for Emerging Technologies, 2018.” Gartner.
https://www.gartner.com/en/documents/3885468/hype-cycle-for-
emerging-technologies-2018.
Walker, Mike. “Hype Cycle for Emerging Technologies, 2018.” Gartner.
https://www.gartner.com/en/documents/3885468/hype-cycle-for-
emerging-technologies-2018.
4
5
https://en.wikipedia.org/wiki/Smart_contract
Blockgeeks. “Smart Contract Platforms [A Deep Dive Investigation],” May 11, 2018.
https://blockgeeks.com/guides/different-smart-contract-
platforms/.
(1)
© Craig Johnston 2020
C. Johnston, Advanced Platform Development with Kubernetes
https://doi.org/10.1007/978-1-4842-5611-4_2
2. DevOps Infrastructure
Craig Johnston1
Los Angeles, CA, USA
Kubernetes abstracts the physical infrastructure of its underlying
servers and network. This chapter covers how to leverage Kubernetes in
the management of the entire development life cycle. This chapter and
the next take a break from the speci ic concerns of the Platform
functionality and center the focus on development operations (DevOps),
including the vital tools for rapid and ef icient integration, testing, and
deployment for teams building platforms on Kubernetes by setting up a
GitLab instance.
Kubernetes is a vendor-neutral, Cloud-native technology, making it
highly portable across the major Cloud vendors, bare-metal data centers,
and local workstations. In keeping with this principle, the following
chapter constructs a portable DevOps toolchain that leverages
Kubernetes, standardizing the con iguration and management for all
aspects of development and production.
Cloud Computing
Writing portable software has always been a leading driver of
innovations and productivity. The earliest computers of the 1940s
required programmers to write in assembly language, speci ically
tailored to a particular machine. In the late 1950s, FORTRAN became the
irst successful, commercially available, high-level, general-purpose
programming language. Utilizing a compiler, FORTRAN could be written
generically to solve speci ic problems, and by the early 1960s, over 40
FORTRAN compilers were available. FORTRAN still exists today,
outliving nearly all of the physical infrastructure available when it was
irst released. Even at the cost of some performance, it has always been
wise for software developers to keep a layer of abstraction between the
concepts embedded in the code and the implementations achieved in
the circuitry.
Virtualization and Cloud computing are the latest players in the race
for abstraction, not to mention containerization adding a new form of
portable encapsulation to the mix. However, in the race to abstract
physical infrastructure, Cloud computing itself can take the form of the
specialized systems of the 1940s. Cloud vendors have become a type of
specialized infrastructure. Specialization might be acceptable for many
organizations looking to harness turnkey solutions or leverage
performance realized from a vendor’s custom solution. Trends in Cloud
computing are now moving toward a goal of providing Cloud-native
solutions with a vendor-neutral approach, not only to abstract the
physical infrastructure but abstracting the vendors themselves. If
FORTRAN was the irst answer to portable applications, Kubernetes
might be the new answer to portable platforms.
Data centers were once the exclusive domain of large enterprises. In
1991 the National Science Foundation lifted commercial restrictions on
what is now the Web and along came a crowd of web hosting providers,
allowing anyone with a few dollars a month to participate in its global
network, along with a handful of static HTML iles on a server in some
remote data center. Racks of servers soon illed data centers, and new
data centers sprang up in every major city. The Internet generated a
boom of cheap, commodity servers running the free and open source
Linux operating system. Your bank needed proprietary communication
protocols over point-to-point telecom connections to transmit data
globally; all you needed was someone to visit your URL, and for a few
dollars a month, you could do what your bank spent a fortune to achieve.
Back in the early 1990s, computers attached to the Internet,
delivered data nearly the same as they do today, primarily over HTTP.
Back then, HTTP served HTML documents, images, and a variety of iles.
Web servers grew in power and the ability to execute code, standardized
in 1993 with the common gateway interface (CGI). CGI provided the
opportunity to develop web-based applications under a simple and clear
standard. Applications written to receive and respond to HTTP messages
could run on nearly any provider supporting CGI, aside from unique
dependencies. If this sounds like a Cloud-native and vendor-neutral
solution, it was and still is. The need for and the ideas behind the Cloud-
native and vendor-neutral movement is a type of correction in the self-
healing nature of the Internet and covered in the next section.
Sophisticated web applications need much more than simple CGI
execution from a web server; they often need a speci ied amount of CPU
or GPU resource, memory, and storage, along with the ability to run on
multiple compute instances and in multiple regions. Renting and
maintaining servers in data centers is a complex and specialized task,
with a large amount of up-front planning and long-term commitment.
Setting up new platforms once required a signi icant amount of manual
labor. Companies like Google and Amazon built robust internal platforms
for the allocation of compute resource, accommodating their massive
workloads and constant release cycles. It made sense for new Internet-
based enterprises to further capitalize on their infrastructure
investments by offering them as products. These companies
differentiated themselves from web hosting and colocation services by
marketing a Cloud platform. Enterprises could now grasp these offerings
as another option for their enterprise applications. The Cloud was not
simple web hosting and servers. It was now another option for
enterprises to deploy and operate all of their business applications. The
Cloud was, in concept, a platform as a service (PaaS).
The traditional Cloud is not a standard like HTTP or CGI, the
traditional Cloud is not an operating system, and applications cannot
compile and execute on it natively. To master the Cloud, you needed to
pick one and might pursue a certi icate in Amazon AWS, Microsoft
Azure, or Google Cloud. However, there is little distinction in the features
offered by these major providers, only their proprietary
implementations. When one vendor releases a particular feature, the
others quickly follow. This competition has been excellent for
innovation, and the major providers are some of the leading innovators
in bringing cutting-edge technology to market. Along with the
innovation has come proprietary APIs, and if you leverage these at the
core of your architecture, your system is considered vendor-locked.
Additionally, there has become a growing trend of enterprises looking
for hybrid-Cloud solutions, attempting to leverage the strengths of
multiple Cloud providers; this can mean better diversi ication or
unfortunately multiple vendor lock-ins.
This book is about building platforms in Kubernetes and
implemented in a way that can run on instances by Amazon, Google,
IBM, Microsoft, or custom servers in a private data center, or all of them
combined. Kubernetes can operate on any Cloud that supports generic
compute instances, which is all of them. However, even this is no longer
necessary, as the major Cloud providers are now offering Kubernetes as
a service, a fully Cloud-native and vendor-neutral option .
Cloud Native and Vendor Neutral
The early days of the Internet moved quickly, primarily due to open
source technology and open standards. Cloud computing has solved the
problem of ef iciently managing compute resource by abstracting the
physical infrastructure into a set of API calls. The irst major Cloud
offering was a type of on-demand utility computing called the Elastic
Compute Cloud (EC2). Amazon was the irst to make the term Cloud
computing popular in 2006 with the release of their EC2 Platform.
Google released Google App Engine in 2008, and in 2010, Microsoft
launched Azure. These major Cloud providers now offer far more than
virtualized compute instances; they are full-featured PaaS and SaaS
solutions that continue to proliferate with features and capabilities
released daily. The major Cloud providers solved the problem of startups
and new development efforts needing a fast and cost-effective way to
spin up and manage compute resource and attach their business needs
to on-demand solutions. Architecting solutions that leverage these
offerings may bring many up-front advantages by taming development
costs and reducing time to market; however, they also bring the
concerns of vendor lock-in.
Vendor lock-in occurs when your application or business process
would require signi icant effort to port to a new platform or vendor. If
your application or Platform is essential to the operation of your
business, being deeply tied to the future stability and strategic decisions
of another organization can pose a signi icant risk, or impose arbitrary
technological limitations at best. Long-term contracts and service-level
agreements (SLAs) only contractually guarantee stability, but technology
managed by a third party is always prone to unexpected failures and
depreciation. In some cases, it’s easier for a business to move buildings
or relocate to another state than it would be to refactor a decade or
more of business logic that has become deeply entrenched in the
specialized platforms offered by IBM, Microsoft, Amazon, or Google.
Vendor lock-in is not necessarily a problem for some organizations,
especially value-added resellers (VARs) in the business of supporting or
extending traditional Cloud services. However, if your business only
wishes to leverage Cloud services, then you are best served with a
Cloud-native vendor-neutral approach to your architecture, and
Kubernetes provides this.
Redundancy
In September of 2015, Amazon Web Services (AWS) suffered a ive-hour
outage in their US-EAST-1 region. Websites and applications from high-
pro ile organizations such as IMDb, Tinder, Airbnb, Nest, and many
others suffered up to eight hours of limited or full outages of their
systems. However, Net lix is another signi icant user of AWS and only
suffered a temporary disruption. Net lix had correctly architected
against the risk of running critical business operations tied to
infrastructure they don’t fully control. Redundancy is a sound principle
that should be part of the design for any critical system’s architecture;
unfortunately, many systems rely on the traditional Cloud to abstract
this from them.
It is not a stretch to assume there are a high number of redundant
components to Amazon’s AWS offerings; Amazon’s 99.95% uptime
service-level agreements necessitate this. However, genuine redundancy
should be something you have control over, not a faith-based reliance on
a third party. In 2015, Net lix did not have to wait patiently for Amazon
to restore its US-EAST-1 region; Net lix had failure contingencies
planned1 through their internally redundant architecture. However,
what if the issues that caused AWS to go down had cascaded to other
regions?
The ability to stand up and operate a Kubernetes-based platform on
nearly any Cloud provider could offer redundancy at massive cross-
cloud scale and provide an ultimate contingency plan. A Kubernetes-
based platform leverages the most fundamental value of the Cloud, on-
demand compute instances, and with the proper consideration, it can
remain vendor neutral.
Portable Platforms
Many organizations are not interested or able to purchase and maintain
a vast array of physical infrastructure across national and even global
regions. Cloud computing has become an essential aspect of operating
sophisticated workloads lexibly and cost-effectively. The concept of
Cloud-native means leveraging this world of ephemeral compute
instances, storage, and networks, where efforts shift from the
implementation of processes involved in forming the desired state to
merely describing it.
In 2017 Amazon announced its intentions to buy grocery retailer
Whole Foods.2 With Amazon’s expansion into brick-and-mortar retail,
there arose concern from other retailers that Amazon would now be
considered a direct competitor. In an email to CNBC,
Walmart spokesman Dan Toporek is quoted “Our vendors have the
choice of using any cloud provider that meets their needs and their
customers’ needs. It shouldn’t be a big surprise that there are cases in
which we’d prefer our most sensitive data isn’t sitting on a competitor’s
Platform.”3 Walmart was not worried about the cost or stability of its
vendors using AWS; they preferred not to, for strategic business reasons.
Solutions deeply tied to AWS may have lost opportunities to engage with
Walmart or may have been passed up by competitors using Microsoft or
IBM Cloud services. The idea of vendor-neutral means not needing to
miss out on doing business with companies like Walmart if all it entails
is a standing-up Kubernetes Cluster on an alternate Cloud.
Kubernetes, along with a growing ecosystem of applications,
frameworks, and concepts, is solving problems by developing
applications that are both cloud native and vendor neutral. If an
application can run on a generic install of Kubernetes, it can likely run
anywhere, with only minimal changes typically needed in the
con iguration of custom network and storage interfaces. So, are the
Cloud vendors worried about this new technology so quickly enabling a
vendor-neutral approach? Not only is Kubernetes able to be installed
and operated on every major Cloud, surprisingly all the traditional Cloud
providers now offer Kubernetes as a service.
Choosing the location for operating your Platform is out of the scope
for this book. If you have experience with AWS, you might be interested
in Amazon Elastic Container Service for Kubernetes (Amazon EKS). If
you are comfortable with Azure, you should explore Azure Kubernetes
Service (AKS). IBM offers the IBM Cloud Kubernetes Service , and Google
provides Google Kubernetes Engine (GKE).
Getting Started Vendor Neutral
While Kubernetes itself is vendor neutral, managed Kubernetes services
from vendors such as Google, Microsoft, and Amazon often include
vendor-speci ic requirements, often around identity and access
management. If constructing a portable, vendor-neutral platform is a
goal or business requirement, it may be bene icial to install a
custom/vanilla Kubernetes cluster using only generic compute instances
from the major cloud providers. Otherwise, explicitly documenting
nonstandard con igurations used for a speci ic vendor provides a
vendor-neutral road map, should portability or multi-cloud support be a
future concern.
Developing a platform with Kubernetes means it should be able to
operate on a local workstation, on a private Cloud, on a public cloud with
generic compute instances, or on public cloud Kubernetes service. There
is a wealth of books and online tutorials for setting up and con iguring
Kubernetes for every environment and vendor, from a few simple clicks
on AWS or Google to “Kubernetes The Hard Way” by Kelsey Hightower.4
This book assumes you have some experience with Kubernetes and
development operations and only covers basic setups for review.
Development toolchains and environments can and often should
have the same level of portability as the platforms they support. The
following section, “DevOps Toolchain,” assembles a working
development operations pipeline and work low using open source
technology compatible with a pure vendor-neutral, Cloud-native
approach. While traditional cloud providers offer some integrated
development solutions, the goal of this book is not only to build a
vendor-neutral platform supporting Blockchain, Machine Learning, and
IoT data management solutions but additionally keep the entire
development toolchain as portable and lexible as possible.
DevOps Toolchain
Other documents randomly have
different content
»Ci siamo colle minestre bollenti! pensò fra se stesso Cuddy. Non
vorrei che mi ricadesse addosso anche questa.»
»Fate venire avanti l'altro prigioniere (disse il presidente dopo avere
ordinato si assegnasse a Morton una delle seggiole che guernivano i
lati della sala). Colui ha la fisonomia di que' montoni che saltano il
fosso dopo essersi veduti precedere dagli altri.»
Allora due archibugieri accompagnarono Cuddy presso la tavola,
nanti a cui sedevano i giudici. Volse attorno gli occhi impauriti, indi
gli abbassò compreso da rispettosa tema in veggendo tanti grandi
personaggi che si prendean pensiere di lui; nè lo stesso ricordarsi
delle assicurazioni date da Claverhouse al suo padrone lo sciogliea
d'ogni inquietudine sulle conseguenze che alle deliberazioni di quei
lordi succederebbero. Aspettando intanto che lo interrogassero fece
in goffa guisa parecchi inchini.
»Vi siete voi trovato all'affare del ponte di Bothwell?» Fu questa la
prima interrogazione che gli venne mossa e che produsse su di lui
l'effetto dello scoppiar della folgore. Non ardiva confessare le verità,
e per altra parte avea giudizio quanto bastava a comprendere, che
col negare, facilmente si avventurava ad essere convinto di
menzogna. Volea pertanto sciorsi d'impaccio con qualche scappatoia.
»Non nego la possibilità d'essermici trovato.»
»Rispondete a dirittura. — Sì o no? — Voi sapete bene che ci
eravate.»
»Non tocca a me il contraddire la signoria vostra.»
»Torno a chiedere. Ci eravate, o non ci eravate?»
»Ma chi può ricordarsi di tutti i luoghi ove è stato ne' diversi giorni
della sua vita?»
»Furfante! (gridò allora il generale Dalzell) se non rispondi meglio, ti
fo saltare i denti fuori di bocca col pomo della mia spada. — Pensi
forse non abbiamo altro che fare in tutta la giornata fuorchè
interrogarti e seguirti di domanda in domanda, come cani che
corrono dietro ad un lepre?»
»Ebbene dunque! poichè niun'altra risposta può contentare le
signorie loro, scrivano che non posso negare d'esservi stato.»
»Ora, soggiunse il duca, credesti tu col trovarviti di commettere un
atto di ribellione?»
»Risponderai una volta?» gridò con voce di tuono Dalzell che vedea
esitante Cuddy.
»Adagio di grazia, signori miei! vedete bene che non è sì facile il
rispondere presto ad interrogazioni che puzzano di capestro, disse
fregandosi il collo Cuddy. Credo dunque che avrei fatto meglio...»
»Meglio che cosa? Sbrigati.»
»Che avrei fatto meglio a non andarvi.»
»In nome di Dio! sclamò il presidente. Questo almeno si chiama
rispondere. — E se il re si degna perdonarvi la ribellione nella quale
siete caduto, pregherete voi il cielo per la prosperità del suo regno?»
»Oh, di tutto cuore, milord! e non manderò giù un bicchiere di vino
senza berlo alla salute di sua maestà.»
»Eh! costui è un mariuolo di buona lega. — Ma, amico mio, chi vi ha
indotto a prendere parte in questa sollevazione?»
»Il cattivo esempio, milord, e una vecchia madre indiavolata, salvo il
rispetto che debbo alla signoria vostra.»
»Ottimamente! Non credo possa mai venire in animo a nessuno che
tu trami una congiura. — Speditegli il suo perdono in termini semplici
e chiari. — Fate ora avvicinare quello sgraziato, seduto là in fondo.»
Mentre Cuddy tutto giubbilante andava a porsi vicino a Morton,
Macbriar veniva condotto al luogo che questi due aveano
abbandonato un dopo l'altro.
Al nuovo interrogato parimente chiesero s'ei si era trovato alla
battaglia del ponte di Bothwel.
»Io vi era» egli rispose con voce franca e sicura.
»Armato?»
»Armato, sì; della parola di Dio per sostenere coloro che per la causa
di Dio combattevano.»
»O in altri termini, predicavate la ribellione contra il re!»
»Sei tu che il dicesti.»
»Voi conoscerete probabilmente Iohn Balfour di Burley?»
»Se lo conosco! Sì. E ne ringrazio Iddio. Egli è un cristiano sincero e
zelante.»
»Che è egli addivenuto di questo grande personaggio?»
»Son qui per rispondere intorno a me stesso, non per mettere a
rischio la sicurezza degli altri.»
»Troverem noi modo a farti uscire le parole di bocca» sclamò Dalzell.
»Se costui fosse in un angolo di foreste, soggiunse un altro giudice,
a capo d'un centinaio di Puritani, oh! parlerebbe senza farsi
pregare!»
»Ponete mente, gli disse il duca, a quai pericoli andate incontro col
ricusar di rispondermi; parlate finchè ne siete anche in tempo. Voi
siete troppo giovane per potere resistere ai patimenti che diverranno
conseguenza della vostra ostinazione.»
»Vi sfido! (rispose Macbriar lanciando su i giudici uno sguardo di
rabbia e disprezzo). Non è la prima volta ch'io sia stato imprigionato
e assoggettato ai tormenti, e comunque giovane, ho vissuto
abbastanza per imparare a morire quando Dio l'avrà ordinato;
perchè, sappiatelo; non è da voi altri che la mia vita dipenda.»
»Va ottimamente! il duca riprese a dire; ma vi sono certe cose
sgradevoli che vi possono accadere innanzi ancor di morire;» e detto
ciò fe' udire lo squillo d'un campanello d'argento posto sopra una
tavola dinanzi a lui.
Nel tempo stesso venne sollevata una cortina di color cremisi che era
ad un'estremità della sala, e che lasciò ad ognuno visibile il
carnefice, munito di tutti gli ordigni della tortura, in quel secolo
tuttavia barbaro, adoperata. Morton, tutt'altro che preparato a così
truce spettacolo non potè starsi dal fremere. Macbriar vide questi
apparecchi senza impallidire, o mostrare il menomo segno di
debolezza.
»Conoscete voi quell'uomo?» gli chiese Lauderdale.
»Egli è senza dubbio l'esecutore degli atroci comandi che avete
dettati contra gli eletti del Signore, nè agli occhi miei siete spregevoli
men di colui. Benedico il cielo, poichè mi dà la forza di non temere i
tormenti che voi saprete ordinare e ch'e' saprà farmi soffrire. La
carne e il sangue possono risentirsi di tai patimenti; la fragilità della
natura umana potrà costrignerla a gemiti e a lagrime, ma la mia
anima è superiore ai vostri sforzi congiunti.»
»Fate il vostro dovere» disse il duca al carnefice.
Risparmieremo ai nostri leggitori la troppo increscevole pittura de'
tormenti che al prigioniero si fecero sopportare, limitandoci a dire
ch'ei li sostenne con una costanza degna di miglior causa. Il
presidente ordinò più d'una volta si sospendesse quella orribile
fazione per reiterare al paziente l'inchiesta fattagli intorno a Burley,
ma ne ottenne sempre la stessa risposta. Finalmente i patiti travagli
avendo privato Macbriar dell'uso de' sensi, un chirurgo postogli a
canto proferì che la natura non poteva reggere a maggiori prove.
»Dunque, disse il duca, or non occorre altro che pronunziare la sua
sentenza.»
Intanto che il chirurgo operava i soccorsi della sua arte per
richiamare i sopiti sensi dello sciagurato, il presidente raccoglieva i
voti de' membri del consiglio, il quale al primo segno di vita
esternato dal prigioniero, pronunziò contro di lui sentenza di morte
per delitto d'alto tradimento, condannando, lui essere appiccato e ad
avere indi tronche la testa e le mani; le sostanze sue ad essere
confiscate a pro del pubblico erario.
»Doomster, diss'egli allora; leggete al condannato la sua sentenza.»
Doomster era il carnefice. Giusta le leggi che a que' dì si
osservavano nella Scozia, e che lungo tempo dopo ancor vi
durarono, era tra gli ufizi del carnefice il far nota ai condannati la
loro sentenza; il che aggiugnea nuovo grado d'onere nell'animo di
que' miseri col farli accorti come sarebbe incaricato di operare il loro
supplizio chi ad essi ne leggea la sentenza. Macbriar non avea potuto
che imperfettissimamente comprendere il tenore della medesima
allorchè il presidente la pronunziò, ma avea già ricuperati i sensi allor
quando la udì letta da Doomster.
»Milord, egli disse terminata questa lettura, vi rendo grazie. Mi avete
compartito il solo favore ch'io fossi pronto a non ricusare da voi. Co'
patimenti preparaste la mia anima all'eternità, e mi porgete
occasione di far conoscere alla terra tutto quanto un cristiano può
sopportare per la buona causa. Da un mondo di tenebre voi mi fate
passare nel seno dell'eterna luce. Vi rendo grazie, ripeto, o milord, e
vi perdono la morte mia. Possano gli ultimi momenti della vostra vita
essere per voi felici e tranquilli come lo sono per me!»
Venne trasportato dalla sala del consiglio al patibolo; i suoi
lineamenti erano quelli d'un uomo condotto in trionfo, e serbò fino
all'ultimo istante la stessa fermezza e lo stesso entusiasmo.
Finchè durò questa scena tanto crudele lo spirito di Morton sofferse
tutti i supplizi de' quali il suo sfortunato collega era vittima. Più d'una
volta spinto da involontario moto era surto in piedi, ma gli occhi di
Claverhouse sempre fissi sopra di lui lo richiamavano alla prudenza,
e il costrigneano di bel nuovo a sedersi. Finalmente perdè i sensi egli
stesso: e sapeva appena quali cose gli accadessero intorno; tal che
allor quando fu nel calesse del generale, non potea rendere ragione
a se medesimo del modo onde vi si trovava.
»Qual coraggio! quale fermezza! diss'ei finalmente. Oh! quanto è da
compiagnersi che tanti bei pregi dell'animo sieno stati oscurati e
inviliti dagli errori d'una setta feroce!»
»Egli muore, disse Claverhouse, con quella medesima calma, che era
in lui quando a morte vi condannò. La giustizia il volea. — Ma voi,
signore Morton, udiste che vi è mestieri abbandonare questo
regno?»
»Sì, lo so. Ma non potrò innanzi partire congedarmi da' miei amici?»
»Hanno parlato di voi a vostro zio; ma questi ricusa vedervi. Il buon
uomo è troppo atterrito. Lo ha compreso uno spavento, non del tutto
irragionevole, che la colpa di tradimento onde foste giudicato vada a
percotere le sue sostanze. Però non accadrà nulla di questo. Vi
manda la sua benedizione e una piccola somma che troverete entro
di questa borsa. — Quanto a lord Evandale, egli è tuttavia in cattivo
stato di salute, nè può vedere nessuno. — Il maggiore Bellenden è a
Tillietudlem insieme alla cognata e alla nipote, tutti intesi a tornarvi
le cose nel primo ordine. Quei bricconi non si sono affaccendati poco
nel mettere a sacco que' monumenti rispettabili d'antichità che erano
primo scopo alla venerazione di lady Bellenden. Hanno persino
abbruciato il seggiolone col baldacchino, che la buona signora
chiamava il trono di sua maestà. — Vi sono altre persone che voi
desideraste vedere?»
»No! disse Morton, sospirando profondamente, no! ma comunque
debba essere sollecita la mia partenza, mi abbisognano ancora alcuni
apparecchi indispensabili.»
»Tutto fu preveduto, il generale rispose. La vostra valigia è dentro il
mio calesse, e in un forziere collocato dietro ad esso troverete quanti
arredi vi mancassero ancora. Eccovi diverse lettere commendatizie
che lord Evandale vi ha preparate affinchè possiate trasferirvi alla
corte dello Statolder principe d'Orange. Io medesimo ne ho aggiunta
una a lui stesso. Feci la mia prima carriera militare sotto gli ordini di
questo principe, e alla giornata di Senet vidi con lui il fuoco la prima
volta. — Eccovi ancora una credenziale sopra un banchiere dell'Aja.
Ella è tratta da lord Evandale, che vi prega non trovare difficoltà a
farne uso. Gli è un prestito che qualche giorno potrete restituirgli, se
pur vi piace considerare siccome prestito quanto ei ravviserebbe
appena per un tenue rimborso degl'immensi debiti che vi professa.»
Morton non credea quasi ai propri occhi e alle proprie orecchie, nè
sapea riaversi dallo stupore prodotto in lui da una così subitanea
esecuzione della sentenza di bando intimatagli.
»E Cuddy?» Soggiunse.
»Ne avrò cura io medesimo. Procurerò che torni al servizio di lady
Bellenden. — Perchè non credo che omai lo prenderà la tentazione di
mancare ad una rassegna; ma fo per lui sicurtà che non gli viene più
il prurito di campeggiare co' Puritani. — Oh! eccoci alla spiaggia. Un
palischermo vi aspetta.»
E tosto si presentarono alcuni piloti, che preso il fardello di Morton,
nel palischermo il portarono.
»Possiate essere felice! gli disse Claverhouse stringendogli la mano,
e possano venir tempi più tranquilli da rivederci ancor nella Scozia!
Non dimenticherò mai la condotta generosa che serbaste per
riguardo al mio amico Evandale! Ella vi onora tanto più agli occhi
miei, che mi son noti i segreti sentimenti dell'animo vostro: e pochi,
credo io, nel caso in cui vi trovaste, avrebbero lasciato sfuggire il
destro di spacciarsi d'un uomo, che loro attraversava il cammino, e
ciò in tempo che lo spacciarsene non gli copriva all'aspetto del
pubblico d'alcun disdoro.»
Gli strinse una seconda volta la mano, e se ne disgiunse all'atto che
l'altro stava per entrare nel palischermo.
Sparito appena Claverhouse, Morton sentì prendersi la mano, e
lasciarla tosto; e vi trovò un biglietto piegato in modo che occupasse
il minore spazio possibile. Si volse immantinente. La persona
trasmettitrice di questo foglio avvolgeasi entro grande mantello sì
fattamente, ch'era impossibile ravvisarne il volto; si mise un dito alla
bocca, poi si perdè tra la folla.
Incidente dal quale la curiosità di Morton fu scossa oltre ogni dire.
Appena trovatosi a bordo del vascello ove era aspettato, e che a
Rotterdam veleggiava, si scostò da' suoi compagni di viaggio, e
aprendo il biglietto consegnatogli con tanto mistero, lesse tai note.
Il coraggio che dimostrasti nella fatale giornata ove Israello fuggì al
cospetto dei suoi nemici ha espiato in tal qual modo i tuoi errori e le
tue colpe. So che desti il cuore alla figlia dello straniero. Scordati di
lei, perchè, ch'io sia lungi o vicino, in esilio al punto della morte, la
mia mano starà sollevata contro della sua casa, e il cielo mi ha
compartito il modo di far ricadere sovr'essa i tanti delitti d'una
sciagurata famiglia. La lunga resistenza opposta del castello di
Tillietudlem è la principale cagione onde fummo disfatti al ponte di
Bothwell il sangue dei nostri fratelli grida vendetta. Non pensar più
dunque a costei, e riunisciti ai nostri colleghi esiliati. Tu ne troverai in
Olanda, che terran gli occhi sempre aperti sull'ora della liberazione.
Sonerà quest'ora e se tu sei tuttavia degno di coltivare la vigna del
Signor, mi troverai tantosto, facendo chiedere notizie di Quintino
Mackell d'Irongray, all'ottima cristiana Bessia Maclure, che dimora
presso l'albergo di Niel. Intanto cigniti i lombi colla cintura della
pazienza, e tieni accesa la lampada, com'uomo che vegli di notte,
perchè all'ora che meno gli uomini si aspetteranno, comparirà
l'angelo sterminatore, coperto d'una veste tinta di sangue, e
vendicherà sopra i suoi persecutori Israello.
Una sì straordinaria lettera era sottoscritta I. B. DI B. Ma non
abbisognava di queste iniziali per provare a Morton che essa non
poteva essere stata scritta fuorchè da Iohn Balfour di Burley.
Sorpreso dalla audacia e dall'ostinatezza di cotest'uomo, che nell'atto
medesimo di vedere pressochè annichilata la sua fazione, pensava a
raggruppar le fila d'una orditura già posta in pezzi, non quindi sentì
alcun desiderio di legare con costui una corrispondenza, congiunta al
certo a pericolo, e molto meno di rinnovare un'alleanza che per poco
non gli fu micidiale. E quanto alle minaccie profferite contra la
famiglia Bellenden, Morton non ravvisò in esse che effetto d'un
risentimento ancor caldo contr'essa per la bella difesa operata dal
castello di Tillietudlem; laonde non ne fece caso, nè gli venne
tampoco in pensiero, che un nemico fuggiasco e bandito potesse dar
da temere ad una famiglia attenente alla parte dei vincitori.
Ciò nullameno rimase perplesso un istante se dovesse trasmettere la
lettera di Burley a qualcuno, fosse poi lord Evandale o il maggiore
Bellenden, ma poichè questa medesima lettera dava indizj sul
soggiorno di chi la scrivea, gli parve che il far ciò sarebbe stato un
rendersi reo di tradita confidenza, ed anche senza pro, trattandosi di
prevenire un danno che immaginario ei reputava. Lacerato pertanto
il biglietto ne gettò i frammenti nel mare, non senza però avere
prima notati e il nome additato da Burley per farne ricerca, e il luogo
per saperne contezza.
In questo mezzo la nave salpava dal porto, e un vento propizio ne
rigonfiava le vele. Sparvero agli occhi del giovane di Milnwood le
coste della Scozia e a poco a poco le cime ancora delle montagne; e
Morton si vide per molti anni disgiunto dalla contrada d'onde avea
sortito il suo nascere.
CAPITOLO VII.
»Volano gli anni rapidi
»Del caro viver mio»
Parini.
Gli scrittori di racconti godono d'un privilegio, che fa la condizion loro
migliore d'assai sopra quella degli autori drammatici, quello cioè di
non essere soggetti alle unità di tempo e di luogo, e di potere, giusta
l'uopo, condurre i lor personaggi ad Atene o a Tebe, e di ricondurneli
ancora se le circostanze lo chiedono. — Finora il tempo è trascorso
d'egual passo col nostro eroe, poichè dal giorno della rassegna, alla
quale vedemmo per la prima volta far mostra di se il giovane di
Milnwood sino alla partenza di lui per l'Olanda, non è passato un
intervallo più lungo di sei settimane. Ma è giunto l'istante di fargli
prendere il galoppo e superare d'un salto il corso di cinque anni. Non
quindi ne sarà d'uopo cambiare il luogo della scena, che continuerà
tuttavia ad essere nella Scozia. Ma prima di tornare a far parola del
nostro eroe, gioverà presentare al leggitore alcuni cenni sugli
avvenimenti che quivi accaddero in questo intervallo.
Scorsi appena tre mesi dopo l'arrivo di Morton in Olanda, la morte di
Carlo II chiamò il secondo Giacomo al trono dell'Inghilterra. Ne'
quattro anni che questo monarca regnò, le dissensioni civili e
religiose continuarono a dilacerare la Scozia, e s'ella cominciò
finalmente a respirare, il dovette alla prudente tolleranza del re
Guglielmo. Gli abitanti di questa contrada, pagarono bensì il primo
tributo a quella violenta impressione cui non manca di generare negli
animi un mutamento di dinastia; ognun sa che questo, o poco o
assai, è origine di politiche rivoluzioni, alle quali nella presente
circostanza si unirono le religiose; ma finalmente i cittadini alla cura
de' pubblici affari sostituirono quelle de' lor privati interessi.
I soli che resistessero al nuovo ordine di cose introdotto erano i
montanari del nort della Scozia, i quali ricusavano ostinatamente
sottomettersi all'autorità di Guglielmo, e brandian l'armi per la causa
dell'esule Giacomo II, avendo per loro duce il visconte di Dundee,
che i nostri leggitori hanno fin qui conosciuto sotto il nome di
Graham di Claverhouse, e che dopo una vittoria riportata sotto le
mura di Dundee ottenne questo titolo d'onore dalla gratitudine di
Giacomo II.
Dal poco sol che abbiam detto s'accorgeranno i leggitori che un
grande cambiamento esser dovea accaduto nelle cose interne della
Scozia. I wigh, nemici nati della dinastia degli Stuardi s'erano
tostamente manifestati propensi al nuovo re Guglielmo, ed avendone
ottenuto la restaurazione del presbiterianismo, con altrettanto zelo
parteggiarono per la causa de' Reali, quanto furore posero nel
combatterla finchè la causa della monarchia era pur quella di Carlo II
o del successore di lui. Quegli in vece che aveano guerreggiato per
questi due principi venivano a propria volta qualificati siccome ribelli,
e costretti ripararsi alle foreste e alle montagne nella stessa guisa
onde poco prima vi cercarono asilo i loro avversarj. Gli uni aveano
acquistato il nome di traditori; gli altri riceveano da questi il titolo di
persecutori.
Trovavasi pure in Iscozia una terza fazione formata dai Puritani
fanatici, che non sapean andar d'accordo con nessuna delle altre
due. Un governo repubblicano e teocratico era il fantasma cui
sempre viveano affezionati; laonde muniti sempre di testi scritturali,
riprovavano qual delitto la savia tolleranza del re Guglielmo, che
permetteva ne' propri stati la libera pratica di tutte le religioni. Ma
questa fazione perdea vigore ogni giorno perchè il governo
contentavasi di vigilare gli andamenti, ma colle armi sol dello sprezzo
la combattea.
Tal si era lo stato degli affari della Scozia sei mesi dopo
l'avvenimento di Guglielmo al trono della Gran-Brettagna.
E fu sotto il regno di questo monarca, che in bella estiva sera, uno
straniero, che aveva aspetto di militare distinto per grado fermò il
superbo suo corridore alle falde di fertilissima collina, d'onde
scorgeansi le rovine tuttavia maestose del castello di Bothwell, e le
acque del Clyde che serpeggiano attraversando quelle montagne, e i
boschetti che ad ogn'istante ne interrompono il corso, e il ponte di
Bothwell, in cui si termina la pianura da quel castello denominata;
pianura che pochi anni prima era stata sanguinoso teatro di
desolazione e di stragi, e che respirava di nuovo la pace e la
tranquillità. Il lieve sussurro del venticel della sera faceasi appena
udire fra le piante e le macchie che verdeggiavano lungo le rive del
Clyde, e le acque della riviera pareva attenuassero il lor mormorio
per discordar meno dal grato silenzio che regnava su quelle sponde
felici.
Il nostro viaggiatore tenne una via ombreggiata da pomi carichi di
frutta d'onde perveniasi ad una casa situata sul declivio d'una vicina
montagna. Appartenea questa ad un fondo rustico, ed aveva
l'apparenza d'essere ad un tempo il soggiorno di qualche proprietario
mediocremente agiato.
All'ingresso d'un viale che guidava alla fabbrica principale, scorgeasi
una casetta assai decente, e che avrebbe potuto giudicarsi
l'abitazione del custode, se l'edifizio che venia dopo si fosse meglio
rassomigliato ad un castello. Ciò nullameno non prestava esso
quell'aspetto di trascuratezza, o di scadimento che sogliono
contraddistinguere le abitazioni de' contadini scozzesi. Osservavasi a
sinistra della medesima un piccolo giardino ben fornito di legumi e di
alberi da frutto. Una giovenca e una capra pasceano il vicino
verziere. Quivi parimente era un recinto chiuso da viva siepe, ove
alcune chiocce governavano la lor famigliuola; un mucchio di rami
secchi, e un monticello assai rilevato di torba davano a divedere, che
gli abitanti s'erano muniti contra i rigori del prossimo verno.
Finalmente i vortici di fumo che uscendo fuor della canna del
cammino s'aggiravano attorno alle cime de' vicini alberi, indicavano
che la famiglia quivi stanziata stava pensando agli apparecchi della
cena. Per dar l'ultima mano a questa pittura della campestre
beatitudine, una fanciullina di circa quattro anni empieva una brocca
all'acqua limpida d'una fontana non oltre a venti passi distante di lì.
A questa meta fermatosi il cavaliere chiese alla picciola ninfa la
strada d'onde si va a Fairy-Grove. Allora la fanciullina mise a terra la
brocca, e colle sue tenere dita, disgiunse i bei capelli biondi che le
cadean sulla fronte; indi fissando sopra lui due occhi maravigliati gli
chiese: »Che cosa mi dite o Signore?» Solita interrogazione che i
contadini della Scozia rimandano a chi gli interroga sopra qual si sia
cosa.
»Desidero sapere la strada di Fairy-Grove.»
»Mamma, mamma! sclamò la fanciulla correndo alla porta della
casetta. Venite a parlar voi con questo signore.»
Comparve la madre, giovane ed avvenente donna, i cui lineamenti la
diceano stata scaltra e smaliziata anzichè no, comunque la
matrimoniale condizione le avesse inspirato quel contegno di gravità
e decenza, che è caratteristico quasi sempre delle contadine di
Scozia. Ella portava fra le braccia un bambino, ed altro fanciullino, di
due anni e mezzo a un dipresso, le veniva a fianco tenendosi ad una
falda del grembiule materno. La figlia maggiore, colla quale abbiamo
di già fatta conoscenza lanciava occhiate frequenti e alla sfuggita sul
forestiere.
»Che bramate, o signore?» gli domandò la contadina, d'un tuono
rispettoso sì, ma ben lontano dal manifestare quella zotichezza e
quell'aria d'imbarazzo, solito nelle sue pari quando, non avvezze a
conversare con persone di un grado distinto, casualmente in queste
s'incontrano.
Il viaggiatore dopo averla fissata in volto parve turbarsi un istante,
ma riavutosi immantinente. »Vorrei, rispose trasferirmi a Fairy-
Grove.»
»Ci siete signore, nè questa casa si chiama altrimenti.»
»Mi occorrerebbe parlare a Cutberto Headrigg, soprannominato
Cuddy. Sarà qui dunque ov'egli dimora?»
»Per l'appunto, o signore, egli è mio marito. Oggi è andato alla città,
ma dee tornarne in questa sera medesima. Se la signoria vostra
vuole discendere, nè sdegna entrare nel povero nostro tugurio,
Cuddy non tarderà senza dubbio ad essere qui.»
Il forestiere avendo accettata l'offerta, la contadina lo fece entrare in
una stanza che era ad un tempo cucina, tinello e sala di ricevimento;
indi dopo aver messo il cavallo entro la scuderia, gli esibì lardo,
uova, butirro, e birra della quale gli vantò la squisitezza.
Lo straniere acconsentì a prendere qualche cibo, anche per non dare
disgusto alla persona che glielo offeriva, e durante la mensa, così il
loro dialogo s'intavolò.
»Sarei troppo ardita, o signore, col chiedervi quale affare avete con
mio marito?»
»No certo, mia buona ospite. Abbisogno d'alcune notizie, che a
quanto mi viene assicurato, egli potrà procurarmi.»
»Se queste riguardano persone nostre vicine, forse io potrò
appagarvi al pari di lui. Non v'è ignoto, o signore, che nell'essere
curiose le donne non la cedono sì facilmente a chicchessia; laonde
posso accertarmivi informata delle cose che accadono dieci miglia
all'intorno meglio di quanto lo sia lo stesso Cuddy.»
»È molto tempo che ho abbandonato questo paese, ripigliò
sospirando quel forestiere. Altra volta l'ho assai conosciuto. Or
sembra che finalmente vi sia tornata la calma.»
»Non però in tutti i punti, e abbiamo ancora molti guai dalla parte di
tramontana! Lord Dundee, che in addietro era conosciuto per
Claverhouse, si è posto a capo de' montanari, e sta fermo per il re
Giacomo. Onde si battaglia in quelle rupi, come si battagliava qui,
sono cinqu'anni. Ah! se aveste veduto questo spianato dopo un
combattimento che si decise sovr'esso! Mio marito m'assicura che fu
uno spettacolo orrendo.»
»Vostro marito dunque vi si trovava? — E ditemi! da qual banda
s'era egli posto?»
»Mio signore! — Questa è una interrogazione alla quale lascerò
ch'egli risponda.»
»Lodo la vostra prudenza, ma non è necessaria con me, perchè mi è
noto ch'egli serviva Enrico Morton, uno fra i capi dei Presbiteriani.»
»Lo sapete, sì? Ebbene saprete ancora che Cuddy lo amava
grandemente, e che ne ha pianta per lungo tempo la morte.»
»Ah! dunque morì Enrico Morton?»
»Senza dubbio. Egli avea preso imbarco per l'Olanda. Tutti
gl'imbarcati perirono e del sig. Morton non si è avuta contezza mai
più.»
»Avete inteso parlare d'un certo altro capo, di nome Burley? Sapete
se viva tutt'ora?»
»In verità è tal cosa alla quale non penso nè poco nè assai. E non
v'è nemmeno chi possa dir con certezza quel che ne sia divenuto.
Alcuni pretendono che egli sia passato in paese straniero, ma che
essendo stato riconosciuto per uno degli assassini dell'arcivescovo di
Sant'Andrea, non abbia trovato chi voglia nè manco vederlo, nè capo
d'esercito che acconsenta impiegarlo. Altri aggiungono che è tornato
fra noi e che vive in mezzo ai boschi, alimentato dai soccorsi di
qualche fanatico della sua specie.»
»E (aggiunse lo straniero dopo aver esitato un istante) potete voi
darmi contezze di lord Evandale?»
»Se posso darvene! E chi meglio di me? Non sarà egli a momenti il
marito della mia giovine padrona, di miss Editta Bellenden?»
»Bellenden! Intendo. — Dunque le nozze non sono ancora seguite?»
»Quasi come seguite. Son già promessi, e Cuddy ed io, qualche
mese fa, siamo stati presenti alla promessa. Le nozze veramente
vanno tardando, e il perchè lo so io.»
Lo straniero col capo appoggiato sulle proprie mani sembrava
assorto in penose meditazioni, nè dava più ascolto alla sua ospite,
che in tutta la durata di tale colloquio sembrava commossa da una
segreta molestia, ed essendosi posta a sedere vicino alla finestra,
volgeva ad ogn'istante l'occhio da quella parte, come per curare
l'istante dell'arrivo di suo marito.
Uscendo al fine della sua estasi il viaggiatore chiese, e si vide che
tale domanda gli costava un penoso sforzo al suo animo, se lady
Margherita viveva ancora.
»Sì, ma i tempi sono ben cambiati per essa. Oh che disgrazia avere
perduto il castello di Tillietudlem, la baronia, i fondi che il povero
Cuddy ha lavorati sì lungamente, e tutto ciò per mancanza d'alcuni
pezzi di pergamena che non si sono più rinvenuti dopo che ella
rientrò nel castello!»
»Io avea udito dir qualche cosa di tutto ciò, disse con voce affogata
il forestiere, e prendo molta parte agli affari di questa famiglia. Oh
come volentieri le sarei utile! Qual felicità per me se il potessi! — Ma,
e dove dimorano presentemente queste signore?»
»Qui, in quella casa che vedete in fondo a quel corto viale; e questo
picciolo fondo è la sola proprietà che lor sia rimasta.»
»Vi si trovano ora?»
»No signore. Sono andate a visitare la sorella di lord Evandale, e
intanto custodisco io le chiavi della casa. Non è poca ventura per
esse l'avere fatta l'eredità del vecchio maggiore Bellenden.»
»Uom rispettabile e degno! sclamò lo straniero. Seppi a Edimburgo
che più non vivea.»
»Ah! non ebbe più un giorno di bene dal momento che vide la
vedova di suo fratello e la sua giovine nipote cacciate dal loro
castello; e sì! ha speso di bei denari per sostenere quella lite. Ciò è
stato sotto il regno del re Giacomo. Basilio Olifant che facea causa
per ottener questo dominio diventò cattolico a fine di guadagnarsi il
cuore de' giudici. Oh! allora non gli si ricusò più cosa veruna. È poi
da aggiugnersi, che lady Bellenden non ha mai più potuto trovare
quello straccio di pergamena, che avrebbe fatti veder chiari
com'erano i suoi diritti, sicchè dopo un litigare per più interi anni, la
terminò coll'avere la sentenza sulle spalle. Fu pel maggiore un tal
colpo che non se ne riebbe da poi, e la rivoluzione fu l'ultimo;
perchè, comunque non avesse gran ragione di amare il re Giacomo
che gli avea con tanta leggiadria ridotte alla nudità le parenti, il suo
amore al sangue dagli Stuardi ancor prevalea. Insomma è morto. Già
non è stato ricco in alcun tempo, perchè quel bravissimo uomo non
vedea mai persona in bisogno che non si facesse tosto a soccorrerla.
Vennero di giunta i debiti che dovette incontrar per la lite, tantochè
dopo la sua morte Charnwod è andato in mano de' creditori, e
questo piccolo fondo è tutto ciò che è rimasto della sua eredità.»
»Se così è, soggiunse l'ospite commosso oltre ogni dire, queste due
povere signore son rimaste prive di sostanze e di appoggio.»
»Oh! non mancheranno mai di nessuna di tali cose sintantochè viva
lord Evandale. Egli non le ha abbandonate, come hanno fatto
tant'altri. No certo! anzi per valermi del parlare di Mausa, mia
suocera, dai giorni del patriarca Abramo venendo a noi, non si è mai
dato uomo, che s'affaccendi tanto per meritarsi una donna.»
»Perchè dunque, con voce tremebonda l'ospite domandò, perchè
dunque un affetto sì disinteressato non ebbe prima d'ora la sua
ricompensa?»
»Ah! Ah! — Son più d'una le ragioni. Primieramente le turbolenze del
paese, poi la lite, poi la morte del maggiore, finalmente... Ma, oh
Dio! signore, voi vi sentite male.»
»Non è nulla, disse il forestiere, che le parole appena trovava.
Soggiaccio talvolta a certe palpitazioni di cuore. M'accorgo che avrei
bisogno di riposo e di solitudine. Potreste voi darmi una stanza ed un
letto? Vedrò Cuddy domani mattina. Mi trovo troppo stanco per
potergli parlare questa sera.»
»Oh sì certamente, o signore! (rispose la contadina con una
premura, mossa, a quanto parea, da cagione segreta ch'ella disvelar
non volesse). Posso darvi una stanza nella casa de' miei padroni.
S'eglino vi fossero non m'assumerei da me sola una tal libertà; ma
so bene che non me ne faranno rimprovero.»
Detto ciò, prese un lume e pregando l'ospite a seguirla, lo condusse
nella casa, della quale, come vedemmo, aveva essa le chiavi. Entrato
ch'egli vi fu, la donna si congedò da esso un istante per
apparecchiargli, soggiunse, la stanza; nella qual bisogna mise una
prestezza sì straordinaria da potere in men di cinque minuti avvisarlo
che il letto gli era allestito. Ma quando a ciò s'accignea il trovò privo
di moto e col capo appoggiato sopra la tavola presso cui si era
seduto. Temette da prima ch'egli avesse smarriti i sensi; ma
avvedutasi ch'egli era unicamente assorto nel suo dolore si ritirò
senza ch'ei l'avesse veduta, e prima di ritornare fece qualche strepito
per dargli tempo a nascondere un'interna agitazione, della quale ella
non volea darsi per accorta; e di fatto questa seconda volta il trovò
in piedi che camminava su e giù per la stanza. Indi il condusse
nell'appartamento assegnatogli, che era quello solito ad essere
occupato da lord Evandale quando a Fairy-Grove trasferivasi; e
questo appartamento tutto stavasi in una stanza da letto e in un
picciolo gabinetto che metteva al giardino, separato poi da una
grande sala per un sottilissimo tramezzo di legno. La contadina si
partì da quel luogo augurando una felice notte e miglior salute al suo
ospite.
»Sia lodato Dio! disse fra se medesima nel tornar che fece alla
propria abitazione: sarò io la prima a vedere Cuddy, e ad avvertirlo
di quanto accade.»
CAPITOLO VIII.
»O tu che adduce all'are dell'imene
»Brama di rinvenir chi le spinose
»Calli di vita aspergati di rose
»Nella compagna di tuoi gaudj e pene;
»Paventa di ritrarne al pie' catene
»In fra i mirteti lusinghieri ascose,
»Catene dure sì che non le impose
»Neron più dure in sulle lazie arene.»
D'un anonimo.
Certamente il lettore ha riconosciuto negl'interlocutori del capitolo
precedente Enrico Morton e Jenny Dennison, un dì scaltrita
cameriera di miss Bellenden, or degna metà di Cuddy, il quale,
mercè la protezione di lord Evandale l'avea sposata, ed era rientrato
al servigio di lady Margherita fin d'allora che l'amante di Editta
veleggiò alle spiagge olandesi.
Giugneva ella nella sua picciola casa, quando Cuddy vi rientrò.
»Oh che maledetto tempo, Jenny! Tutto il rovescio dell'acqua m'è
venuto addosso, e m'è penetrato, credo, fino nell'ossa. Presto dammi
di che mutarmi.»
E inteso a questa faccenda non dimenticava suggiugnere:
»Jenny, non m'hai dunque preparato nulla da cena? Mi sento morir
dalla fame.»
»Un poco di pazienza! Egli è a quanto ho pensato finora: sai che la
minestra non ti piace, se non è ben calda.»
»Via, via! sei sempre lì colle tue frascherie!... Ma che cosa hai
Jenny? Tu pensi a qualche cosa.»
»E non è senza perchè. Se sapessi che cosa accade! Oh povero il
mio Cuddy! Ho paura che siam rovinati.»
»Come sarebbe a dire? le chiedeva imperturbato Cuddy, non solito a
sgomentire per poco. Spiegati. — Ma prima di tutto la mia cena.»
Jenny dopo avere coperto un canto della tavola colla salvietta, pose
dinanzi a Cuddy una grande scodella di minestra, e intanto ch'ei
contentava l'appetito, gli narrò senza omettere veruna particolarità
l'accaduto arrivo d'un forestiere, e la natura del colloquio che avea
avuto con esso.
»Ebbene! disse Cuddy, io non vedo nulla da spaventarsene in tutto
ciò che m'hai raccontato. Nessuno saprà che hai fatto dormire uno
straniere in casa dei padroni; e quand'anche venisse a sapersi, miss
Bellenden presterebbe servigio all'universo, purchè il potesse; e
quanto alla vecchia padrona non ha mai negato ricetto ad un uom di
riguardo, come a quel che sembra, è questo nostr'ospite. Di che
cosa dunque t'inquieti?»
»Tu dunque, o Cuddy, non indovini chi sia questo forestiere?»
»Come diavolo vuoi tu che lo indovini? Son forse diventato, senza
accorgermene, uno stregone?»
»Quest'è un uomo in somma che farà andare a sconquasso le nozze
di miss Editta con lord Evandale, e ne sarà conseguenza, che la
prima non diverrà mai più ricca, e noi rimarremo due poveri pitocchi
in eterno.»
»Diammine! Come ha da fare il tuo forestiere ad operare questo
miracolo? Il matrimonio non è egli bello e concluso e poco meno che
consumato?»
»Sei bene una gran testa dura! Nè intendi ancora che questo
forestiere è l'antico spasimato di miss Editta, in una parola il tuo
antico padrone?»
»Il sig. Enrico Morton!» sclamò Cuddy alzandosi in piè con tal impeto
che rovesciò la minestra e la tavola.
»Egli stesso (rispose Jenny mentre riparava gli sconci derivati
dell'entusiasmo di suo marito) nè per questo era d'uopo rompermi la
mia scodella.»
»Ma sei matta, Jenny? Ella è cosa troppo sicura che il sig. Morton sta
sotterra o sott'acqua da lungo tempo.»
»Dunque mi credi cieca? Ti dico che l'ho ravvisato come ravviso te?»
»Come hai fatto a ravvisarlo?»
»Oh bella! credi tu che il corso di cinque anni basti a cambiare un
uomo dell'età del sig. Morton in modo da non riconoscerlo più? Poi
avrebbe bastato ad accertarmi che era desso, il dolore da cui fu
preso nell'udir parlare delle nozze di miss Editta. Mi ha ricordato il
giorno che costò tante lagrime a questa povera giovane quando egli
e tu, pessima lana, prendeste le armi a favor de' ribelli. — Oh!
indovina a che cosa sta pensando ora costui!»
»A che cosa penso? (rispose Cuddy che avea cenato in camiciuola,
ed imbracciava in quel punto il giustacore). Penso a correre subito
ad abbracciare il mio povero padrone.»
»Voi non ci andrete, Cuddy.» Soggiunse freddamente ma con
fermezza Jenny.
»Non ci andrò? Ma costei ha il diavolo in corpo! Ti credi forse ch'io
voglia per tutto il tempo della mia vita lasciarmi menar per naso
dalle donne?»
»Ascoltami Cuddy! voglio farti intendere la ragione. Primieramente,
mi sono accorta che il sig. Enrico desidera di non essere
riconosciuto: non ti dirò per qual motivo, perchè chi può saperlo? Ma
pensi tu che egli ignorasse con chi parlava, parlando meco? Ti pare,
Cuddy, ch'io sia tanto cambiata da produr tal effetto? Abbiamo finto
l'uno e l'altro di non ci riconoscere, e ne avevamo ciascuno le nostre
ragioni. Le sue forse erano d'assicurarsi che cosa fosse divenuto di
miss Editta; e quando l'ha saputa in procinto di conchiudere un buon
matrimonio, la sua intenzione, lo vedo, è stata subito di ritirarsi per
non guastarlo. Siam noi i soli a sapere che egli è ancora tra' vivi. Ma
se tal cosa giugnesse a notizia di miss Editta, foss'anche lì dinanzi al
ministro per dar la mano di sposa a lord Evandale, direbbe no
quando sarebbe il momento a proposito di dir sì.»
»E che m'importa il sì o il no di miss Editta? E s'ella preferisse
l'antico amante al novello, non è forse padrona di fare quello che
vuole? — Anche voi, bella Jenny, avevate promesso a Holliday di
sposarlo, e la cosa è certa, perchè costui l'ha divulgata per tutti i
cantoni.»
»Holliday è un mentitore, e tu uno stupido se gli dai retta. Ma
quanto a miss Editta!.... oh mio Dio, mio Dio! Il sig. Morton, ne sono
sicura, non possiede altro oro fuor di quello che sta nel ricamo del
suo vestito. Di che dovrebb'egli campare con lady Margherita e con
miss Editta? Tu il sai pure che questo piccolo fondo basta appena a
far vivere le due signore... Cioè non basterebbe nemmeno, se noi
secondando lord Evandale non dessimo loro ad intendere che rende
tre volte di più.»
»E dove metti Milnwood? Non è un bello e un buon possedimento?
Mi opporrai che il vecchio sir David ne lasciò morendo usufruttuaria
la vecchia Alison, perchè non sapea che cosa fosse accaduto di suo
nipote. Ma questa è una donna dabbene; e una parola che le si dice
v'è panno per accomodarli tutti.»
»Che mi va tu panneggiando? Tu non sai quel che ti dica. Credi tu
che una matrona rispettabile, del calibro di lady Margherita, voglia
ricevere una grazia dalla vecchia Alison? quella lady Margherita, alla
quale se lord Evandale vuol prestare servigi è obbligato ricorrere
all'inganno, e andar inteso con noi? No, no! — Poi se miss Editta si
facesse sposa al sig. Morton, le converrebbe seguirlo alla guerra,
poichè l'abito che gli ho veduto è un uniforme di militare.»
»E per conseguenza anche la vecchia matrona che non saprebbe
separarsi da miss Editta! A dir vero comparirebbe male fra le
bagaglie d'un esercito.»
»E chi sa da qual parte si sia posto adesso il sig. Enrico?»
»E la vecchia matrona su questo articolo è alquanto schizzinosa!»
»In fine Cuddy (aggiunse allora l'astuta Jenny che il vedea alquanto
scosso dalla sola idea di poter tornare in guerra, ed aveva serbato
per l'ultimo il più possente degli argomenti) se vanno in fumo le
nozze con lord Evandale, ci va anche il bel podere che questi ne
aveva promesso. Che accadrà allora di noi e dei tre nostri fanciulli?
Potremmo noi nemmeno vivere su questo fondo senza i sussidj che
ci va passando la generosità di milord?»
Alcune lagrime di Jenny aggiunsero forza all'eloquenza di sì fatta
arringa. Cuddy intanto colla testa bassa pareva il vero ritratto della
irresolutezza. »Ma Jenny, le diss'egli, in vece di tutto questo tuo
cicaleggio non potresti suggerirmi il partito da prendersi?»
»Lasciar andare naturalmente le cose, rispose Jenny. Non far vista di
riconoscere il sig. Morton ammeno che non voglia essere
riconosciuto egli stesso. Non parlare di lui con nessuno; non far
sapere ad anima vivente che è qui. Io non te ne avrei nemmeno
parlato, senza la paura che tu vedendolo domani mattina
commettessi qualche imprudenza. Scommetto che egli se ne andrà
senza farsi conoscere, e che non ritorna altrimenti.»
»Povero il mio padrone! Sclamò Cuddy. E sarà vero ch'io lo veda,
ch'io gli parli senza dirgli che l'ho riconosciuto? Ah questo è
impossibile! Piuttosto, Jenny, partirò innanzi giorno per andar a
lavorare, e non ritornerò che a notte avanzata.»
»Questo è quel che va fatto, Cuddy! Se lo dico io! nessuno ti
pareggia in giudizio quando discuti i tuoi affari in compagnia d'altre
persone. Ma tu non dovresti mai volere operare di tua testa.»
»Egli è vero (borbottava Cuddy mentre si spogliava per mettersi in
letto) che da quando ho l'uso della ragione, qualche femmina s'è
sempre frammessa ne' miei affari, e mi ha fatto andar a suo modo in
vece di lasciarmi seguir la strada che avrei voluto prendere. La mia
vecchia madre prima di tutte, poi lady Margherita; e il bello era che
queste due donne non andavano nemmeno d'accordo ed io era
sempre come il fornaio de' burattini che ho veduto alla fiera; tirato
dal diavolo da una banda, e dal Pulcinella dall'altra. Adesso poi che
ho moglie (soggiugnea avvoltandosi sotto la coperta) bisogna ancora
che cammini com'essa la intende.»
»E non sono io la miglior guida che t'abbi avuto in tua vita?» Così
diede fine alla conversazione Jenny prendendo luogo vicino al
marito, e ponendo lo spegnitoio sul lume.
CAPITOLO IX.
»Di vita fin sull'albeggiar ne danna
»Alle angosce Natura. Oh quante volte
»Pria di perir periamo. È a noi pur morte
»Il morir degli amici: e della fera
»Mietitrice degli anni incontro al têlo
»Nè son d'amor le care grazie usbergo.»
Logan.
Spuntava appena il nuovo giorno allora quando due signore a
cavallo, seguite da due servi arrivarono a Fairy-Grove, e Jenny non
senza crucciarsene grandemente si avvide che queste erano miss
Bellenden e la sorella di lord Evandale.
»Se voleste qui sedervi un istante, lor disse Jenny sopraffatta da tale
improvvisa apparizione, avrei campo di andare a mettere in ordine
l'appartamento.»
»Gli è inutile, rispose Editta, non ne occorre che la chiave comune.
Gudyil aprirà le finestre del nostro gabinetto.»
»Non è possibile aprirne la porta, perchè ha guasta la serratura» si
fece a dire Jenny ricordandosi che la chiave del gabinetto delle
signore serviva anche a schiudere la stanza ove trovavasi Morton.
»Ebbene! andremo nella camera rossa» ripigliò lady Bellenden e
togliendo le chiavi di mano a Jenny si avviò alla volta della casa.
»Tutto sta per iscoprirsi, pensò Jenny fra se stessa, ammeno che
non mi riesca di farlo uscire segretamente. Forse era meglio dire con
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.
More than just a book-buying platform, we strive to be a bridge
connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.
Join us on a journey of knowledge exploration, passion nurturing, and
personal growth every day!
ebookbell.com

More Related Content

PDF
Software Engineering Foundations 1st Edition Yingxu Wang
PDF
Strumenti e tecnologie per il web
PDF
C Net illuminated 4th Edition Arthur Gittleman
PDF
Download Full Object Storage with Swift Cloud storage administration through ...
PDF
The Semantic Web crafting infrastructure for agency 1st Edition Bo Leuf
PDF
The Handbook of Human Factors in Web Design 1st Edition Kim-Phuong L. Vu
PPT
Come evolverà il Web? Consigli su come non rimanere disoccupati nel giro di p...
PDF
USB Complete Everything You Need to Develop Custom USB Peripherals Third Edit...
Software Engineering Foundations 1st Edition Yingxu Wang
Strumenti e tecnologie per il web
C Net illuminated 4th Edition Arthur Gittleman
Download Full Object Storage with Swift Cloud storage administration through ...
The Semantic Web crafting infrastructure for agency 1st Edition Bo Leuf
The Handbook of Human Factors in Web Design 1st Edition Kim-Phuong L. Vu
Come evolverà il Web? Consigli su come non rimanere disoccupati nel giro di p...
USB Complete Everything You Need to Develop Custom USB Peripherals Third Edit...

Similar to Advanced Platform Development With Kubernetes 1st Edition Craig Johnston (20)

PPT
Il web 2.0: dal web informativo al web emozionale
PPTX
Plone4 ur plone e web science may 20 2010 - 4
PDF
Pipeline As Code Continuous Delivery With Jenkins Kubernetes And Terraform 1s...
PDF
PPTX
Applicazioni web based
PPT
La rivoluzione del web 2.0
PDF
Presentazione Suite Nethesis
PDF
DBpedia nel contesto Linked Data
PDF
A comprehensive introduction to object oriented programming with Java 1st Edi...
PDF
Resource management of mobile cloud computing networks and environments 1st E...
PDF
Trustworthy Ubiquitous Computing 1st Edition Karin Bee
PDF
Il web intelligente
PDF
Ethical Hacking With Python Developing Cybersecurity Tools 2024 Phoetean Nate
ODP
PDF
An Introduction to Network Programming with Java 1st Edition Jan Graba
PPT
Web 2.0 e semplicità
PDF
Tecnologie inquiete ...
PPT
Web 2.0 & Library 2.0: un'introduzione
PDF
Liferay SSL/TLS Security. Come configurare il bundle Liferay per abilitare il...
PDF
Cyber Intelligence And Information Retrieval Proceedings Of Ciir 2021 Lecture...
Il web 2.0: dal web informativo al web emozionale
Plone4 ur plone e web science may 20 2010 - 4
Pipeline As Code Continuous Delivery With Jenkins Kubernetes And Terraform 1s...
Applicazioni web based
La rivoluzione del web 2.0
Presentazione Suite Nethesis
DBpedia nel contesto Linked Data
A comprehensive introduction to object oriented programming with Java 1st Edi...
Resource management of mobile cloud computing networks and environments 1st E...
Trustworthy Ubiquitous Computing 1st Edition Karin Bee
Il web intelligente
Ethical Hacking With Python Developing Cybersecurity Tools 2024 Phoetean Nate
An Introduction to Network Programming with Java 1st Edition Jan Graba
Web 2.0 e semplicità
Tecnologie inquiete ...
Web 2.0 & Library 2.0: un'introduzione
Liferay SSL/TLS Security. Come configurare il bundle Liferay per abilitare il...
Cyber Intelligence And Information Retrieval Proceedings Of Ciir 2021 Lecture...
Ad

Recently uploaded (11)

PPTX
San Giovanni Eudes, 1601 – 1680, sacerdote e fondatore francese.pptx
PPTX
Santa Rosa da Lima, Vergine, Penitente, Terziaria Domenicana 1586-1617.pptx
PDF
Critico_o_creativo_Approcci_al_testo_let.pdf
PDF
NGÂN HÀNG CÂU HỎI TÁCH CHỌN LỌC THEO CHUYÊN ĐỀ TỪ ĐỀ THI THỬ TN THPT 2025 TIẾ...
PDF
NGÂN HÀNG CÂU HỎI TÁCH CHỌN LỌC THEO CHUYÊN ĐỀ TỪ ĐỀ THI THỬ TN THPT 2025 TIẾ...
PDF
Libro per insegnare di Balboni: Lingue_e_linguaggi.pdf
PDF
Presentazione di Chimica sui Coloranti Alimentari
PDF
NGÂN HÀNG CÂU HỎI TÁCH CHỌN LỌC THEO CHUYÊN ĐỀ TỪ ĐỀ THI THỬ TN THPT 2025 TIẾ...
PDF
PRESENTAZIONE PROGETTO CCCI IN ITALIANO .pdf
PDF
NGÂN HÀNG CÂU HỎI TÁCH CHỌN LỌC THEO CHUYÊN ĐỀ TỪ ĐỀ THI THỬ TN THPT 2025 TIẾ...
PDF
Presentazione educazione finanziaria e informazione.pdf
San Giovanni Eudes, 1601 – 1680, sacerdote e fondatore francese.pptx
Santa Rosa da Lima, Vergine, Penitente, Terziaria Domenicana 1586-1617.pptx
Critico_o_creativo_Approcci_al_testo_let.pdf
NGÂN HÀNG CÂU HỎI TÁCH CHỌN LỌC THEO CHUYÊN ĐỀ TỪ ĐỀ THI THỬ TN THPT 2025 TIẾ...
NGÂN HÀNG CÂU HỎI TÁCH CHỌN LỌC THEO CHUYÊN ĐỀ TỪ ĐỀ THI THỬ TN THPT 2025 TIẾ...
Libro per insegnare di Balboni: Lingue_e_linguaggi.pdf
Presentazione di Chimica sui Coloranti Alimentari
NGÂN HÀNG CÂU HỎI TÁCH CHỌN LỌC THEO CHUYÊN ĐỀ TỪ ĐỀ THI THỬ TN THPT 2025 TIẾ...
PRESENTAZIONE PROGETTO CCCI IN ITALIANO .pdf
NGÂN HÀNG CÂU HỎI TÁCH CHỌN LỌC THEO CHUYÊN ĐỀ TỪ ĐỀ THI THỬ TN THPT 2025 TIẾ...
Presentazione educazione finanziaria e informazione.pdf
Ad

Advanced Platform Development With Kubernetes 1st Edition Craig Johnston

  • 1. Advanced Platform Development With Kubernetes 1st Edition Craig Johnston download https://ebookbell.com/product/advanced-platform-development-with- kubernetes-1st-edition-craig-johnston-29870436 Explore and download more ebooks at ebookbell.com
  • 2. Here are some recommended products that we believe you will be interested in. You can click the link to download. Advanced Platform Development With Kubernetes Enabling Data Management The Internet Of Things Blockchain And Machine Learning 1st Edition Craig Johnston https://ebookbell.com/product/advanced-platform-development-with- kubernetes-enabling-data-management-the-internet-of-things-blockchain- and-machine-learning-1st-edition-craig-johnston-50196012 Advanced Platform Development With Kubernetes Enabling Data Management The Internet Of Things Blockchain And Machine Learning 1st Edition Craig Johnston https://ebookbell.com/product/advanced-platform-development-with- kubernetes-enabling-data-management-the-internet-of-things-blockchain- and-machine-learning-1st-edition-craig-johnston-54981190 Advanced Java Ee Development With Wildfly Deepak Vohra https://ebookbell.com/product/advanced-java-ee-development-with- wildfly-deepak-vohra-5124540 Advanced J2ee Platform Development Applying Integration Tier Patterns Torbjrn Dahln https://ebookbell.com/product/advanced-j2ee-platform-development- applying-integration-tier-patterns-torbjrn-dahln-1339482
  • 3. Aris Design Platform Advanced Process Modelling And Administration 1st Edition Rob Davis Auth https://ebookbell.com/product/aris-design-platform-advanced-process- modelling-and-administration-1st-edition-rob-davis-auth-2453202 Aris Design Platform Advanced Process Modelling And Administration 1st Edition Rob Davis Auth https://ebookbell.com/product/aris-design-platform-advanced-process- modelling-and-administration-1st-edition-rob-davis-auth-4097324 React Projects Build Advanced Crossplatform Projects With React And React Native To Become A Professional Developer 2nd Ed 2nd Roy Derks https://ebookbell.com/product/react-projects-build-advanced- crossplatform-projects-with-react-and-react-native-to-become-a- professional-developer-2nd-ed-2nd-roy-derks-42876728 Intelligent Tools For Building A Scientific Information Platform Advanced Architectures And Solutions 1st Edition Bruno Jacobfeuerborn https://ebookbell.com/product/intelligent-tools-for-building-a- scientific-information-platform-advanced-architectures-and- solutions-1st-edition-bruno-jacobfeuerborn-4231618 Advanced Java 2 Platform How To Program Harvey M Deitel Paul J Deitel https://ebookbell.com/product/advanced-java-2-platform-how-to-program- harvey-m-deitel-paul-j-deitel-1077646
  • 6. Craig Johnston Advanced Platform Development with Kubernetes Enabling Data Management, the Internet of Things, Blockchain, and Machine Learning 1st ed.
  • 7. Craig Johnston Los Angeles, CA, USA Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub via the book’s product page, located at www.apress.com/978-1-4842-5610-7. For more detailed information, please visit http://www.apress.com/ source-code. ISBN 978-1-4842-5610-7 e-ISBN 978-1-4842-5611-4 https://doi.org/10.1007/978-1-4842-5611-4 © Craig Johnston 2020 This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, speci ically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on micro ilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a speci ic statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, expressed or implied, with respect to the material contained herein or for any errors or omissions that may have
  • 8. been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional af iliations. Distributed to the book trade worldwide by Springer Science+Business Media New York, 1 NY Plaza, New York, NY 10004. Phone 1-800- SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
  • 9. Acknowledgments I want to start by thanking Kelsey Hightower, who inspired me and so many others with his passion and excitement for technologies that advance a developer’s productivity. Kelsey’s live demonstrations, talks, and tutorials convinced me that Kubernetes is a platform for developing platforms. Kelsey is also responsible for the popularity of my Kubernetes development utility kubefwd. A big thank you to my friend, co-worker, author, and software developer, David Elsensohn. David poured over every draft to ensure my English syntax would compile in the readers’ minds. Thanks to everyone at Deasil Works, especially Jeff Masud, for helping me carve out time to write a book in one of our busiest years (and for ixing the clusters I broke along the way). Thanks to Apress editors Natalie Pao and Jessica Vakili for their patience and encouragement. Thanks again to Natalie Pao for having a vision for this book and encouraging me to write it. Thanks to my technical reviewer David González for correcting my mistakes, unintentional obfuscations, and providing valuable guidance for technical clarity. Lastly, thanks to my family and friends (most of them having no idea what a “Kubernetes” is) who encouraged me to stay focused and motivated. Thank you!
  • 10. Table of Contents Chapter 1: Software Platform and the API Software Applications vs. Software Platforms Dependency Management and Encapsulation Network of Applications Application Platform Platform Requirements Platform Architecture Platform Capabilities IoT Blockchain Machine Learning Core Components Con iguration Ingress Data Management Metrics APIs and Protocols Summary Chapter 2: DevOps Infrastructure Cloud Computing Cloud Native and Vendor Neutral Redundancy Portable Platforms Getting Started Vendor Neutral DevOps Toolchain
  • 11. Repositories Registries CI/CD GitLab for DevOps k3s + GitLab Summary Next Steps Chapter 3: Development Environment Custom Development Kubernetes Cluster Nodes Server Setup Prepare Nodes Install Master Node Join Worker Nodes DNS Remote Access Con iguration Repository Ingress TLS/HTTPS with Cert Manager Persistent Volumes with Rook Ceph Monitoring Summary Chapter 4: In-Platform CI/CD Development and Operations Platform Integration
  • 12. Yet Another Development Cluster RBAC GitLab Group Kubernetes Access Custom JupyterLab Image Repository and Container Source Local Testing Additional Learning Automation GitLab CI .gitlab-ci.yml Running a Pipeline Manual Testing in Kubernetes Prepare Namespace Run Notebook Repository Access GitOps Summary Chapter 5: Pipeline Statefulness and Kubernetes Real-Time Data Architecture Message and Event Queues Development Environment Cluster-Wide Con iguration Data Namespace TLS Certi icates Basic Auth
  • 13. Apache Zookeeper Apache Ka ka Ka ka Client Utility Pod Mosquitto (MQTT) Summary Chapter 6: Indexing and Analytics Search and Analytics Data Science Environment Development Environment TLS Certi icates Basic Auth ELK Elasticsearch Logstash Kibana Data Lab Keycloak Namespace JupyterHub JupyterLab Summary Chapter 7: Data Lakes Data Processing Pipeline Development Environment Data Lake as Object Storage MinIO Operator
  • 14. MinIO Cluster MinIO Client MinIO Events Process Objects Summary Chapter 8: Data Warehouses Data and Data Science Data Platform Development Environment Data and Metadata Sources MySQL Apache Cassandra Apache Hive Modern Data Warehouse Hive Presto Summary Chapter 9: Routing and Transformation ETL and Data Processing Development Environment Serverless OpenFaaS ETL Apache NiFi Example ETL Data Pipeline Analysis and Programmatic Control
  • 15. Summary Chapter 10: Platforming Blockchain Private Blockchain Platform Development Environment Private Ethereum Network Bootnodes Bootnode Registrar Ethstats Geth Miners Geth Transaction Nodes Private Networks Blockchain Interaction Geth Attach Jupyter Environment Serverless/OpenFaaS Summary Chapter 11: Platforming AIML Data Hybrid Infrastructure Development Environment DNS k3s Hybrid Cloud Kilo VPN Master Node Worker Nodes On-premises
  • 16. Node Roles Install Kilo Platform Applications Data Collection MQTT IoT Client ETL Apache NiFi Python CronJob Machine Learning Automation Jupyter Notebook GPU Support Model Development Deploy Arti icial Intelligence Summary Index
  • 17. About the Author Craig Johnston currently holds the position of Chief Architect at Deasil Works, Inc. and has been developing software for over 25 years. Craig’s expertise revolves around microservices, arti icial intelligence, algorithms, machine learning, and blockchain technologies. Craig has helped lead his team to signi icantly improved productivity and return on investment across many client projects, leveraging Kubernetes, Docker, Golang, Cassandra, Ka ka, and Elastic, to name a few. The team and he are developing more productive, stable, clean, and faster applications than ever in the past, and the results are beautiful and innovative IoT management systems, IoT implementations, mobile applications, business intelligence, data management, and machine learning platforms. As the former Director of R&D at Napster and later a handful of Universal and Sony subsidiaries, Craig has been fortunate to spend many of his early days on the bleeding edge, in the open green ields of new media and disruptive technology. Craig is successfully operating multiple commercial Kubernetes platforms utilizing all the technology and concepts proposed in Advanced Platform Development with Kubernetes.
  • 18. About the Technical Reviewer David Gonzalez is a DevOps engineer who has written three books about DevOps and microservices. He works as a consultant, helping large companies to advance their systems development, by tweaking related software processes and tools. David is also a Google Developer Expert (https://developers.google.com/experts/people/david gonzalez-gonzalez ) in Kubernetes (Google Container Engine) and a member of the Node.js Foundation, working on security in third-party npm packages. In his free time, he enjoys cycling and walking with his dogs in the green ields of Ireland.
  • 19. (1) © Craig Johnston 2020 C. Johnston, Advanced Platform Development with Kubernetes https://doi.org/10.1007/978-1-4842-5611-4_1 1. Software Platform and the API Craig Johnston1 Los Angeles, CA, USA On October 28, 2018, IBM announced a $34 billion deal to buy Red Hat,1 the company behind Red Hat Enterprise Linux (RHEL), and more recently Red Hat OpenShift, an enterprise Docker/Kubernetes application platform. What we see is $34 billion of evidence that Cloud- native and open source technologies, centered on the Linux ecosystem and empowered by Kubernetes, are leading disruption in enterprise software application platforms. Any exposure to enterprise software marketing presents a steady stream of platform services released almost daily by major cloud providers, including products like Google Cloud Machine Learning Engine, Microsoft’s Azure Machine Learning service, Amazon Managed Blockchain, and IBM Watson IoT Platform, to name a few. Big providers like Amazon, Microsoft, IBM, and Google are not only responding to market demand for these technologies but creating a greater awareness of their accessibility for solving problems across a variety of industries. Large software vendors are rapidly responding to the demand for these capabilities and perpetuate their demand by re ining and marketing products that demonstrate their value. These vendors are often merely service-wrapping the latest in open source software, adding polished user interfaces and proprietary middleware. Peek under the hood of these hyper-cloud services and you often ind a mesh of cloud-native and even vendor-neutral technologies for machine learning (ML), like TensorFlow, Keras, and PyTorch, or Blockchain capabilities powered by Ethereum and Hyperledger, and high-performance IoT data collectors
  • 20. like Prometheus and Ka ka. These vendors are not stealing this technology from the open source community; some of the most signi icant contributions in this ecosystem are the vendors themselves. Developing an enterprise-grade platform from the ground up, with capabilities as diverse as Blockchain and Machine Learning, would have required an enormous effort only a few years ago. Your other option would have been a signi icant investment and long-term commitment to a commercial platform. Google disrupted the entire commercial platform business with Kubernetes, a free, open source, cloud-native, and vendor-neutral system for the rapid development of new platforms that can easily support almost any technology with enterprise-grade security, stability, and scale. Expect to see another signi icant wave of platform innovation, as Kubernetes matures and allows software and platform developers to focus more time on features, with less custom work needed on infrastructure, networking, scaling, monitoring, and even security. This book aims to build a simple demonstration platform in a vendor-neutral approach using Kubernetes. With only minimal modi ications, this new platform should run on any primary cloud provider able to run Kubernetes and offer a small number of widely available dependencies such as storage, memory, and CPU. Each existing, open source technology implemented in this platform has a specialized focus on a particular solution. Offering Machine Learning, Blockchain, or IoT-based services will not in themselves be a core differentiator for a platform. However, operating these technologies together within Kubernetes provides a foundation in which to build and offer novel solutions through their combined efforts, along with providing a template for future additions. In the early 1990s, databases were often operated and accessed as independent applications. The combination of a database and a web server revolutionized the Internet with dynamic database-driven websites. These combinations seem obvious now, and Kubernetes together with service mesh technologies like Istio and Linkerd is making connections between diverse applications, even with con licting dependencies, not only possible but adding security and telemetry to the platform.
  • 21. Software Applications vs. Software Platforms You may be a software developer and have a solution to a problem in a speci ic industry vertical. With a speci ic mix of closed and open source software, you wish to combine these capabilities under an API and expose them in support of a speci ic application. Alternatively, you may be a value-added reseller and want to offer customers an application development platform that comes with a suite of prepackaged features such as Machine Learning, Blockchain, or IoT data ingestion. Software platforms like Kubernetes are the ideal environment for developing a singular focused application or a platform as a service (PaaS) offering customers an environment in which they can develop and extend their applications (Figure 1-1). Figure 1-1 A software application, a platform as a collection of applications, and a platform-based application Dependency Management and Encapsulation Containerization has made running software applications more portable than ever by creating a single dependency, a container runtime. However, applications often need access to a sophisticated mix of resources, including external databases, GPUs (graphics processing units for machine learning), or persistent storage, and likely need to communicate with other applications for authentication, database access, and con iguration services. Even a single containerized application typically needs some form of management over it and its
  • 22. access to external resources. The problem of managing connected containers is where Kubernetes comes in; Kubernetes orchestrates the containers of applications and manages their relationship to resources. Network of Applications Not all software applications need sophisticated platform architecture. Most software applications can be developed and merely run on a computer that meets their operational dependencies. Platforms come into play when you wish to operate multiple applications together and form an interconnected network of services, or when multiple applications can bene it from shared functionality, con iguration, or resource management (Figure 1-2). Figure 1-2 Network of containerized applications Application Platform Even if your goal is to develop a single-purpose online application , there are several reasons to embark on developing a software platform in Kubernetes. Large and small, complex and straightforward, enterprise and small-scale applications bene it when implemented in the context of a software platform. Software platforms provide an architecture to solve common problems and reduce the need for custom development in several areas, including communication, storage, scaling, security, and availability.
  • 23. Architecting an application as a platform means that from the ground up the software is intended to be extended beyond its fundamental requirements, with the ability to upgrade and deploy new components independently. A proper platform welcomes the addition of the latest trends in open source, and when innovations arise, and open source products are released, it is successful software platforms that wrap and leverage their functionality to stay current. A proper software platform should never assume the label legacy; it should remain in a constant, iterative cycle of improvement. The next section goes more in-depth into how this is accomplished with Kubernetes as the central component. Kubernetes solves the problems that traditional enterprise solutions like the service-oriented architecture (SOA) have attempted to solve for decades, only Kubernetes does this with protocols and methodologies that power the global Internet, like DNS, TCP, and HTTP, and wraps them in an elegant and robust API, accessible through those very same protocols. The platform is architected around Kubernetes’s concept of a Service and its relationship to containerized applications (Figure 1-3). Figure 1-3 The relationship between services and application Platform Requirements This book focuses on implementing a foundational data-driven, Data Science , and Machine Learning platform, primarily but not limited to IoT data, and providing opportunities for interconnection with Blockchain technology. If this sounds like a lot of hype, it is, and as the hype fades, it’s time to get to work. As these technologies leave the lab, they begin to fade into the background, and over the next decade, they will begin to silently provide their solutions behind new and innovative products.
  • 24. If you are familiar with the “Gartner Hype Cycle for Emerging Technologies” (Figure 1-4) in 2018,2 you would have seen deep neural networks (deep learning), IoT platforms, and Blockchain still on the “peak of in lated expectations” and rolling toward the “trough of disillusionment.” Disillusionment sounds dire, but Gartner marks the following phase for these technologies as the “slope of enlightenment” and a later plateau in the next 5–10 years. Much innovation happens before these technologies plateau, and a lexible architecture built from a collection of connected containers, managed by Kubernetes, should easily keep you relevant for the next decade or more. Figure 1-4 Gartner’s Hype Cycle for Emerging Technologies, 20183 While individual components may come and go as trends peak and plateau, data is here to stay; the platform needs to store it, transform it, and provide access to it by the latest innovations that produce value from it. If there is a central requirement for Advanced Platform Development with Kubernetes, it would be accessing the value of data, continuously, through the latest innovative technologies in IoT, Machine Learning, Blockchain, and whatever comes next. A inal requirement of Advanced Platform Development with Kubernetes is to stay open source, Cloud native, and vendor neutral. A platform with these principles can leverage open source to harness the
  • 25. global community of contributing software developers looking to solve the same problems we are. Remaining Cloud native and vendor neutral means not being tied to or constrained by a speci ic vendor and is just as functional in a private data center, as it can on AWS, GKE, Azure, or all of them combined as the concept of “hybrid cloud” grows in popularity. Platform Architecture With Kubernetes it is common to build software platforms from a collection of specialized components, written in a variety of languages and having vastly different and even con licting dependencies. A good platform can encapsulate different components and abstract their interfaces into a standard API or set of APIs. Object-oriented software concepts are a great reference tool for overall platform architecture. Trends in microservice architectures encourage the development of several, minimal applications, often taking the form of an object Class, providing a limited number of operations in a speci ic problem domain, letting the larger platform take care of aggregate business logic. To implement this approach, take the concept of an Object and apply it to the Kubernetes implementation of a Service (Figure 1-5). Like software interfaces, Kubernetes services represent one or more entry points to an application. The object- oriented software principles of abstraction, encapsulation, inheritance, and polymorphism can express every layer of the platform architecture. Figure 1-5 Class design and service architecture
  • 26. Kubernetes is well suited for platform development and may be overkill for any lesser task. I believe, as I hope you discover in this book, that there is not much to debate on Kubernetes itness for platform development. Containers solved many of the problems with dependency management by isolating and encapsulating components; Kubernetes manages these containers and in doing so forms the framework for a software platform. Platform Capabilities The purpose of the platform outlined in this book is to demonstrate how Kubernetes gives developers the ability to assemble a diverse range of technologies, wire them together, and manage them with the Kubernetes API. Developing platforms with Kubernetes reduces the risk and expense of adopting the latest trends. Kubernetes not only enables rapid development but can easily support parallel efforts. We develop a software platform with as little programming as necessary. We use declarative con igurations to tell Kubernetes what we want. We use open source applications to build a base software platform, providing IoT data collection, Machine Learning capabilities, and the ability to interact with a private managed Blockchain. Starting with the ingestion, storage, and retrieval of data, a core capability of the platform is a robust data layer (Figure 1-6). The platform must be able to ingest large amounts of data from IoT devices and other external sources including a private managed Blockchain. Applications such as Elasticsearch, Ka ka, and Prometheus manage data indexing, message queueing, and metrics aggregation. Speci ic services capture Blockchain transactions from applications such as Ethereum Geth nodes and send them to Apache Ka ka for queueing and Elasticsearch for indexing. Above the data layer sits an application layer (Figure 1-6), providing capabilities utilizing this data, such as Machine Learning automation. Platform services wire together and expose data sources that export and serve persistent and streaming data usable for Machine Learning experiments, production AI inference, and business analytics. The Platform naturally supports the expansion of features through the management of containers by Kubernetes. Serverless technologies
  • 27. including OpenFaaS provide higher-level expansion of features. Serverless support allows the rapid development and deployment of real-time data processors, operations that run at speci ic intervals, and new API endpoints, allowing specialized access to data, performing AI operations, or modifying the state of the platform itself. The platform envisioned in this book forms a data-driven foundation for working with trending technologies, specializing in Machine Learning, Blockchain, and IoT. Components for the ingestion, storage, indexing, and queueing of data are brought together and allow ef icient access to data between the specialized technologies. The platform provides data scientists the access to data and tools needed to perform Machine Learning experimentation and the development of production-ready neural network models for deployment by way of Serverless functions able to make predictions, perform classi ication, and detect anomalies from existing and inbound data. Blockchain technology is used to demonstrate how third-party ledger transactions and smart contract executions can seamlessly inner-connect to the data processing pipeline. Figure 1-6 Platform application and data layers
  • 28. The platform, developed iteratively, eventually consists of a large number of services, ranging in size and complexity, mixing giant monoliths mixed with small serverless functions. Some services consist of a cluster of Java applications, while some services only execute a few lines of Python. If this sounds like a nightmare, it is not. Fortunately, containerization has helped us isolate an application’s operation and dependencies, exposing what is needed to con igure, control, and communicate with the application. However, containerization only gives us limited options for visibility and control over our collection of services. Kubernetes gives us great con iguration access controls over infrastructure resources, security, and networking, but leaves platform application–level concerns like encrypted communication between services, telemetry, observability, and tracing, to the applications themselves or higher-level specialized systems like Istio or Linkerd. The platform developed in this book is a collection of services that can operate with or without Istio or Linkerd. Istio and Linkerd are still young, and best practices for implementing them are still maturing. The next few sections de ine the platform’s three main requirements: IoT, Blockchain, and Machine Learning in more detail (Figure 1-7). Figure 1-7 IoT, Blockchain , and Machine Learning in Kubernetes IoT
  • 29. The Internet of Things (IoT) and the newer Industrial Internet of Things (IIoT) are technologies that have matured past the hype phase. The physical devices of an industry are not only expected to be connected and controlled over the Internet but have a closer relationship to their larger data platforms. Kubernetes is capable of managing both the data and control plane in every aspect of IoT. This book focuses on three main uses for Kubernetes in the IoT domain, including the ingestion of data, as an edge gateway, and even an operating system (Figure 1-8). Figure 1-8 Three uses of Kubernetes platforms in IoT Ingestion of Data The irst and most obvious use of Kubernetes is to orchestrate a data ingestion platform. IoT devices have the potential of producing a large volume of metrics. Gathering metrics is only one part of the problem. Gathering, transforming, and processing metrics into valuable data and performing actions on that data requires a sophisticated data pipeline. IoT devices utilize a wide range of communication protocols, with varying quality of support from various software products built to
  • 30. speci ic devices and protocols. To effectively support data from a range of IoT and IIoT devices, the platform needs to speak in protocols like AMQP (Advanced Message Queuing Protocol), MQTT (Message Queue Telemetry Transport) , CoAP (Constrained Application Protocol), raw TCP, and HTTP, to name a few. JSON (JavaScript Object Notation) over HTTP is the most popular and supported messaging protocol on the Internet. Every signi icant programming language supports JSON. JSON drives nearly all public cloud APIs in one way or another. Kubernetes’s own API is JSON-based, and YAML, a superset of JSON, is the preferred method of declaring the desired state. JSON may not be as ef icient as binary messages or as descriptive as XML; however, converting all inbound messages to JSON allows the platform to unify data ingestion on the most lexible and portable standard available today. The platform consists of custom microservices implementing a variety of protocols, parsing inbound message or querying and scraping remote sources, and transforming these messages to JSON. An HTTP collection service accepts JSON transformed data to buffer and batch. This architecture (Figure 1-9) allows unlimited horizontal scaling, accommodating large volumes of data. Figure 1-9 IoT data ingestion The chapter “Pipeline” covers the implementation of the ingestion and transformation services: Apache NiFi, Prometheus, Logstash,
  • 31. Elasticsearch, and Ka ka. Edge Gateway Kubernetes in the IoT space is beginning to include on-premises, edge deployments. These are mini-clusters that often include as little as a single node. On-premises clusters often operate a scaled-down version of the larger platform and are typically responsible for communicating with IoT devices on the local area network, or the nodes themselves are attached to proprietary hardware and protocols, legacy control systems, or lower-level, serial communication interfaces. Industrial use cases for the collection of data can often include sub-second sampling of device sensors or merely a volume of data only useful for classi ication, anomaly detection, or aggregation. An on-premises platform (Figure 1-10) can handle the initial gathering and processing of metrics and communicate results back to a larger data processing platform. New Kubernetes distributions such as Minikube, Microk8s, k3s, and KubeEdge specialize in small or single- node implementations on commodity hardware. Figure 1-10 On-premises Kubernetes platform
  • 32. Running a scaled-down platform on-premises solves many security and compliance issues with data handling. In scenarios where data must remain on-premises by strict compliance rules, on-premises clusters can process data, whose resulting metadata, inference, and metrics aggregation can transmit to a remote platform for further processing, analysis, or action . IoT OS The third use of Kubernetes for IoT addressed in this book is just starting to take root, that is, Kubernetes as an IoT operating system (Figure 1-11). ARM processors are cheap and energy ef icient. Products like the Raspberry Pi have made them incredibly popular for hobbyists, education, and commercial prototyping. Container support for ARM- based systems has been around for a few years now, and running containerized applications on IoT devices has nearly all the advantages as does running them on more powerful and sophisticated hardware. IoT devices running containers orchestrated by Kubernetes can take advantage of features like rolling updates to eliminate downtime when upgrading applications. Running a small collection of containers in Kubernetes on an IoT device lets you take advantage of microservices application architecture, resource allocation, monitoring, and self- healing. The development of software for small, low-power devices once required using a proprietary operating system and writing much of the code to support activities like irmware updates, crash reporting, and resource allocation. IoT devices supporting scaled-down versions of Kubernetes are still new and poised for growth as more developers begin to see the potential for many of the common challenges with IoT software solved with platforms like Kubernetes. Slimmed down distributions, like the 40mb k3s, are making Kubernetes an excellent choice for small, resource-limited devices like the Raspberry Pi and the large family of SOC boards on the market today.
  • 33. Figure 1-11 Kubernetes platform on an IoT device Blockchain With the maturity of Smart Contracts,4 Blockchain technology is now a type of platform5 itself. Smart contracts allow the storage and execution of code within the distributed, immutable ledger of the Blockchain (see Chapters 9 and 10). The inclusion of Blockchain technology provides the platform a capability for transactional communication with untrusted participants. Untrusted in this context means no personal or legal contractional trust is needed to transmit value expressed as data. Blockchain provides a permanent record of a transaction, veri ied in a shared ledger. The external parties only need to operate Blockchain nodes capable of executing a shared mathematical algorithm. Trusting the integrity of a transaction comes from the consensus of veri ications from a broader network of nodes. Describing the in-depth conceptual, philosophical, and technical details of a Blockchain is out of scope for this book. Private Managed Blockchains
  • 34. Blockchain technology is a distributed network of nodes, and there are very few use cases for Blockchains within a closed system. However, the concept of private or protected Blockchains is the focus of this platform, which represents essential capabilities for participation in a managed network. The platform provides the allocation and bootstrapping of third- party participants within its selected network of nodes (Figure 1-12). Private Blockchains do not imply a level of trust beyond the allowance of participation. In closed systems, this trust is one way. Traditional platforms can allow a third party to create an account and utilize the system. However, that third party must also trust the platform operator. We trust that Google does not edit and modify emails we receive; we trust that Twitter does not tweet on our behalf. Blockchain participants rely on a majority of participants to verify a transaction rather than a central authority. With Blockchain technology, the platform is only responsible for equal participation and management of participants. Incorporating Blockchain technology directly into the platform brings it under a uni ied communication network with other services and facilitates the management and con iguration of this technology as its concepts and capabilities rapidly mature. The chapter “Platforming Blockchain” describes the technical details for implementation.
  • 35. Figure 1-12 Blockchain bootstrapping, and the ingestion of Blockchain transactions Use Cases Industry verticals including inance, supply chain, logistics, manufacturing, process compliance, and many more are all looking for solutions provided by Blockchain capabilities, especially around the execution of Smart Contracts. Smart Contracts are blocks of immutable code that sit in the Blockchain and are executable by anyone in the network of connected Blockchain nodes able to meet the criteria of the
  • 36. contract’s interface. Streaming transactional events related to Smart Contracts and the execution of Smart Contracts provides a wealth of opportunities beyond recording the active intentions of third parties; they can communicate the state of IoT devices, or the automated results of arti icial intelligence derived from Machine Learning. X Corp can verify that Z Corp sent data while Z Corp can verify that the platform processed the data and provided X Corp the results, while additional entities can execute Smart Contracts related to this activity (Figure 1- 13). The platform not only facilitates access to this trustless network but interacts with it through streaming, real-time data queues. The platform can index the transactions and provide in-depth analysis of transaction types, frequency, and values. Figure 1-13 Addition, execution, and observation of Blockchain Smart Contracts Ethereum and Hyperledger are popular choices for private/permissioned Blockchains supporting smart contracts. Hyperledger was designed explicitly for private enterprise blockchains
  • 37. and does not contain currency features. Although it’s unlikely the platform’s enterprise use cases require a Blockchain currency, neither is it a deterrent. The platform in this book uses Ethereum, making its capabilities compatible with public or private blockchains, with or without the need for currency. The platform is not limited to Ethereum and can easily be extended to support Hyperledger or the newest trends in Blockchain. The chapter “Blockchain” covers the implementation of Ethereum nodes into the platform and provides examples for interconnecting with the platform’s data layer. Machine Learning Machine Learning and speci ically deep learning is another ield of technology nearing, or at peak hype according to Gartner. All the major hyper-cloud providers including Google, IBM, AWS, and Azure either offer platforms with service-wrapped versions of TensorFlow, PyTorch, Keras, or their in-house developed Machine Learning development and production automation tools. The major cloud providers respond quickly to the hype, but this response is also an indication that the technology has matured to the point of a commodity. Commodity technology might have lost a bit of its novelty and excitement, but if it survives past that initial phase, then it’s ready for business. We may be at the tip of the expectation iceberg for Machine Learning, but it can and does solve industry problems today, and so its capabilities belong in the platform and exposed to its connected data. Providing a simple service-wrapping of Kube low with some limited custom con igurations would be powerful enough to call this a data science platform. Kube low as a service would alone be a decent competitor to the hyper-clouds. Wrapping Kube low would take less than a chapter to describe and, more importantly, miss out on the combinatorial power of the adjacent capabilities of Blockchain and IoT data, all sitting atop the core components, covered in the next section. Industry wants real-time answers from real-time data. Data science needs static data and the ability to perform reproducible experiments and learn from a known quantity. Machine Learning is an application of data science, and machines learn best on ixed sets of data. The platform provides both by providing access to persistent data and the
  • 38. ability to label and snapshot subsets of data to form trained neural network models that can then be immediately deployed and tried against streams of real-time data (Figure 1-14). The cost of iterative experimentation is high when the technological ecosystem of the data science lab is alien to production concerns of the enterprise. Kube low and other cloud-native technologies help bring these environments closer together, reducing the cost and risk associated with experimentation. The reduction of risk leads to new opportunities for experimentation and the testing of novel theories or approaches to machine learning and arti icial intelligence. Figure 1-14 High-velocity data pipelines to Machine Learning Automation and Management With software frameworks like Keras or PyTorch, you can now easily con igure a simple yet trainable neural network in a few dozen lines of code. The entire machine learning life cycle (Figure 1-15) requires more than a few moving parts, from data access, transformation, and experimentation to the deployment of trained models. Kubernetes- compatible solutions like Apache Air low and Kube low are making great strides in the areas of automation. This book focuses on a few components of Kube low as a sub-platform for data science. Kube low came from Google’s internal solution for automating the use of TensorFlow, a popular Machine Learning framework also developed by Google and open sourced. The chapters “In-Platform CI/CD,” “Indexing and Analytics,” and “Platforming AIML” explore some of the technology that powers Kuber low, including JupyterLab, JupyterHub, ML low and Seldon Core.
  • 39. Figure 1-15 Kube low process Core Components The following section covers platform components you will likely never see on Gartner’s hype charts. However, these core components form the essential glue that holds the platform together. These components include con iguration, ingress, data management, metrics, APIs, and protocols. Containers, con iguration, ingress, data management, and metrics collection are the core components that make up the platform’s core infrastructure, discussed later. The following brie ly reviews their purpose, the problems they solve, and their role in tying together specialized applications. Realizing the potential of trends in the Internet of Things, Machine Learning, Blockchain, and future innovations is only ampli ied when incorporated into a platform that can combine their focused expertise. Solve problems across new domains, harnessing the combinatorial effect of their speci ic solutions —for example, utilizing Arti icial Intelligence driven from models developed through deep learning on metrics collected from IoT devices that execute a Smart Contract on the Blockchain whose results communicate a change in the operational state of other IoT devices. Machine Learning developed independent from Blockchain and IoT
  • 40. technology is certainly not dependent on any of them. A wide variety of languages is used to develop these technologies, each with diverse dependencies. However, with little effort, they can all run in containers and communicate in protocols that are proven in reliability and limitless scale, because they scale the Internet itself. TCP/IP, HTTP, and DNS are the underlying protocols of the Internet, and within Kubernetes they are the methods of communication and service discovery. This relationship between Containers comes from the Container API and its orchestrator, Kubernetes. Kubernetes makes containers easy and elegant to con igure, scale, and maintain. Therefore, Kubernetes itself, along with containers, forms the primary core component of the platform. If you are reading a book on advanced platform development, you probably have a irm grasp on the advantages of containers as well as the many supporting objects Kubernetes provides, including the powerful Con igMap and Secret. Con iguration Two forms of con iguration make up the platform: the con iguration of the platform itself, a set of Kubernetes objects expressed in YAML iles, and the con iguration of various applications within the platform. This book uses the kubectl utility for con iguring Kubernetes. The kubectl utility provides three kinds of object management: imperative commands, imperative object con iguration, and declarative object con iguration. This book relies primarily on declarative object con iguration by describing a desired state in a series of YAML iles and using kubectl to apply them. The chapter “Development Environment” presents a method of organizing and maintaining the Kubernetes con iguration manifests, an essential aspect of keeping your platform con iguration organized and documented. The con iguration of individual applications within the platform is the concern here and why con iguration is considered a core component. Kubernetes provides the object types Con igMap and Secret to provide a rich set of options for application con iguration. Application Parameters
  • 41. A container can wrap nearly any application, and the three most common ways to con igure an application include command-line parameters, con iguration iles, environment variables, and combinations of the three. If you have spent any time with Docker or Kubernetes, it is not uncommon to specify a long list of parameters required to con igure an application for execution, or to populate a series of environment variables, or to mount a con iguration directory. With these three methods of con iguration, nearly any application can be con igured and have a standard method to manage the con iguration for all components of the platform. This is an essential component of the platform’s core infrastructure. Con igMaps and Secrets are con iguration object types provided by Kubernetes; they are persistent and available throughout the cluster. The key/value pairs of Con igMaps and Secrets can be mounted as ilesystems within a Pod, the keys being ile names and value as data whose mount points are shared by one or more containers in the Pod. Con igMaps and Secrets can populate environment variables within containers or populate command-line arguments used in the execution of the container’s application. The chapter "Development Environment" on infrastructure covers the management and organization of Con igMaps and Secrets in further detail, and if you come from any experience with Kubernetes, you may be well versed in their use. The intention here is to more clearly de ine their value as core infrastructure components to the platform. Ingress Ingress is de ined as “the act of entering” and is the basic concept of accepting inbound data to the platform. However, ingress is one of the most critical components of the framework. Ingress is responsible for providing a means of securing inbound communication over protocols like Transport Layer Security (TLS), routing HTTP traf ic to various services based on a variety of con igured rules. Although majority interaction with the platform is over the HTTP protocol, consisting of REST-style API calls from external systems or web and native applications, the platform also provides listeners for custom inbound TCP traf ic for speci ic IoT devices and protocols. In some software platforms, infrastructure-level ingress is an afterthought; large
  • 42. monolithic and stateful applications often assume a direct interaction with inbound requests and expect the ingress layers above to be thin. Unfortunately, these more traditional ways of utilizing popular and in luential proxies like Nginx and Envoy often fail to take advantage of their power in this specialization or do so as a means to work around implementation requirements. The platform described in this book only scrapes the surface of utilizing Nginx to manage ingress. However, it is a core component and essential to the network and architectural layout of the platform. Envoy is another new and popular choice for reverse-proxy support and one of the core components of Istio. The platform described in this book will use Nginx for public HTTP ingress . Data Management Data management is the fundamental core component of the enterprise platform. The platform must manage data after it’s accepted through ingress and retrieved through APIs. The data management layer of the platform is also the necessary means of communicating the results of various processors. Raw data comes into the platform in the form of metrics from IoT devices, results of Blockchain transaction, and communication through HTTP APIs and TCP ports. This data is retrieved and processed to form new Blockchain transactions, send commands to IoT devices, and form predictions derived from machine learning models; the results of which become new data, traveling and continuously re ined through this recursive ecosystem. The platform can harness the best in class technologies for message queues, indexing, and metrics aggregation by incorporating modern and proven open source technologies, including Apache Ka ka, Elasticsearch, and Prometheus. Implementing each of these technologies is addressed in the chapters “Pipeline," and "Indexing and Analytics.” From the perspective of the software platform, the core components are the underlying infrastructure that wrap all specialized functionality. The purpose of the platform is not merely to service-wrap technologies like Apache Ka ka or Elasticsearch for external platform capabilities. Integrating these technologies into the platform infrastructure gives the advantages of standardized management capabilities through Kubernetes, but simpli ies communication and
  • 43. observability through their deep integration. These technologies form a higher-level infrastructure of the stack and provide their capabilities through custom intermediaries, connecting the specialized applications of IoT data, Machine Learning, and Blockchain by normalizing access to their resulting data . Metrics There is no shortage of hosted PaaS offerings willing to collect your metrics, and they offer APIs and beautiful dashboards for developing reports, business analytics, and intelligence. Aggregating, sorting, and organizing metrics is big business, and thanks to open source community and SoundCloud, we have Prometheus as a free and open source solution. SoundCloud developed and open sourced Prometheus in 2015, after which it became the second Cloud Native Computing Foundation incubated project in 2016 following Kubernetes. Prometheus is now a graduate project of the Cloud Native Computing Foundation and actively developed. SoundCloud developed Prometheus when they determined that solutions like StatsD and Graphite could not handle their needs. Prometheus is a high-performance metrics aggregator and records real- time metrics into a time series database. Prometheus can not only scale to our future needs but has a robust and lexible query language. The platform in this book utilizes Grafana to build visually stunning dashboards that query our metrics scraped by Prometheus. Prometheus scrapes metrics from applications and offers of icial and mature client libraries in Go, Java, and Python on Ruby with unof icial third-party client libraries in Bash, C++, Common Lisp, Elixir, Erlang, Haskell, Lua, .Net, C#, Node.js, Perl, PHP, and Rust. This collection of SDKs means you can add deep instrumentation to nearly any modern application. The client libraries are well written and easy to implement. Prometheus forms an essential fork in the platform’s data pipeline, for use in rich analytics dashboards and also allowing Blockchain and Machine Learning capabilities to not only feed into this data stream but react to it. APIs and Protocols
  • 44. The application programming interface (or the platform API) provides external access for interacting with the platform. An API is a broad term and can be used to describe how one portion of software communicates with another, how an enterprise accesses its data, or how to invoke programmatically driven business logic, either internally or externally. The latter, external access, being the concern of the platform API. This external interface to the platform is concerned with the storage and retrieval of data, the recording of events, the con iguration of the desired platform state, the invocation of business logic, and the extension of platform functionality. The platform API empowers the construction of web-based and native applications customized to a speci ic vertical, or allows existing IT systems to interact with its capabilities or report data and events. The platform uses its API to perform multiple actions necessary in the provisioning of accounts and users, supply data to business analytics and intelligence solutions, and provide front-end user interfaces for extending and augmenting data pipelines for data science and machine learning. The Platform presented in this book is re lective of many real- world data platform implementations, being a collection of monolithic applications, microservices, and (Serverless) functions. Each component of the platform may have different methods of interaction. Elasticsearch uses a RESTful API for processing user requests as well as an asynchronous transport protocol for internal communication with its nodes. Communication with Ka ka is performed over a TCP-based binary protocol and additionally offers a REST proxy. This book covers Elasticsearch and Ka ka implementation in the “Pipeline,” and “Indexing and Analytics” chapters. In the world of API development, there is no shortage of solutions; new and innovative protocols like gRPC and GraphQL are maturing and gaining traction, as older ideas such as SOAP are less likely to be considered in new development. The Platform in this book takes the middle road when it comes to the fundamental interactions involving con iguration. REST, or representational state transfer, is by far the most popular API implementation due to its simplicity and ubiquity across the Internet and the range of tools and clients for working with it. REST may not be as fast and compact as gRPC or as lexible as GraphQL, but REST has no requirements for its clients beyond HTTP and its verbs POST, GET, PUT,
  • 45. PATCH, and DELETE. The platform uses JSON (JavaScript Object Notation) for communication over REST. REST is widely accessible mostly because HTTP is the only requirement, a universally established, mature, and stable protocol. Although the platform’s core API is an implementation of REST, established through HTTP endpoints exposed by Ingress, there is the opportunity to develop custom, low-level TCP listeners as well as offer specialized services over gRPC and GraphQL. The Platform is not limited or constrained by implementing any particular API protocol; constructing platforms in Kubernetes makes adding additional interfaces easier than ever. Traditionally businesses often have a hard time seeing APIs beyond their endpoints, often evidenced by monolithic applications evolving into large and unwieldy collections of highly coupled dependencies between the API and underlying data. While it is possible to develop a traditional monolithic system in Kubernetes, you would be working out an anti-pattern and failing to take full advantage of one of Kubernetes’s best features, Services. Kubernetes Services may be backed by a collection of both monolithic and micro application architectures. In regard to the platform API architecture, Kubernetes services compare to the concept of a Class in object-oriented design (OOD), although a strained analogy. There has been a lot of thought and theory put into the description and organization of services in the world of microservice architectures, and that is well beyond the scope of this book, but thinking of services as nouns providing access to corresponding verbs is a good starting point for platform design. Kubernetes services are the persistent gateways for all API calls, JSON- REST, gRPC, GraphQL, binary- or text-based TCP, and UDP; virtually anything that can listen on a port assigned to an IP address can be an endpoint of a Service, internal or external to the platform. The Platform centers design around Kubernetes services. Summary The goal of this book is to give you examples and inspiration to develop productive and compelling software platforms and distributed applications leveraging Kubernetes, with examples that tie together
  • 46. 1 2 3 capabilities from a range of technologies. This chapter de ined a type of data-driven software platform, set to combine the capabilities of IoT technology, Machine Learning, and Blockchain. While demand for speci ic capabilities comes and goes, the platform’s core components center on con iguration, Ingress, data management, and metrics. These core capabilities form a framework of essential services, supporting limitless combinations of new technology and their relationship to its data. Infrastructure has often been the sole domain of operations. As the gap between development and operations has narrowed in recent years, the term DevOps has gained popularity. While some organizations see DevOps as a role, a more accurate expression may be a range of responsibilities and tasks performed by many different roles. DevOps encompasses the provisioning of hardware, installation and management of server clusters, con iguration management, continuous integration and continuous deployment, to name a few. The following chapter on infrastructure covers the DevOps needed for essential core components as well as con iguration management, integration, operations, monitoring, and maintenance of the platform. Footnotes IBM to Buy Red Hat, the Top Linux Distributor, for $34 Billion.” The New York Times, October 28, 2018, sec. Business. https://www.nytimes.com/2018/10/28/business/ibm-red-hat- cloudcomputing.html Walker, Mike. “Hype Cycle for Emerging Technologies, 2018.” Gartner. https://www.gartner.com/en/documents/3885468/hype-cycle-for- emerging-technologies-2018. Walker, Mike. “Hype Cycle for Emerging Technologies, 2018.” Gartner. https://www.gartner.com/en/documents/3885468/hype-cycle-for- emerging-technologies-2018.
  • 47. 4 5 https://en.wikipedia.org/wiki/Smart_contract Blockgeeks. “Smart Contract Platforms [A Deep Dive Investigation],” May 11, 2018. https://blockgeeks.com/guides/different-smart-contract- platforms/.
  • 48. (1) © Craig Johnston 2020 C. Johnston, Advanced Platform Development with Kubernetes https://doi.org/10.1007/978-1-4842-5611-4_2 2. DevOps Infrastructure Craig Johnston1 Los Angeles, CA, USA Kubernetes abstracts the physical infrastructure of its underlying servers and network. This chapter covers how to leverage Kubernetes in the management of the entire development life cycle. This chapter and the next take a break from the speci ic concerns of the Platform functionality and center the focus on development operations (DevOps), including the vital tools for rapid and ef icient integration, testing, and deployment for teams building platforms on Kubernetes by setting up a GitLab instance. Kubernetes is a vendor-neutral, Cloud-native technology, making it highly portable across the major Cloud vendors, bare-metal data centers, and local workstations. In keeping with this principle, the following chapter constructs a portable DevOps toolchain that leverages Kubernetes, standardizing the con iguration and management for all aspects of development and production. Cloud Computing Writing portable software has always been a leading driver of innovations and productivity. The earliest computers of the 1940s required programmers to write in assembly language, speci ically tailored to a particular machine. In the late 1950s, FORTRAN became the irst successful, commercially available, high-level, general-purpose programming language. Utilizing a compiler, FORTRAN could be written generically to solve speci ic problems, and by the early 1960s, over 40 FORTRAN compilers were available. FORTRAN still exists today,
  • 49. outliving nearly all of the physical infrastructure available when it was irst released. Even at the cost of some performance, it has always been wise for software developers to keep a layer of abstraction between the concepts embedded in the code and the implementations achieved in the circuitry. Virtualization and Cloud computing are the latest players in the race for abstraction, not to mention containerization adding a new form of portable encapsulation to the mix. However, in the race to abstract physical infrastructure, Cloud computing itself can take the form of the specialized systems of the 1940s. Cloud vendors have become a type of specialized infrastructure. Specialization might be acceptable for many organizations looking to harness turnkey solutions or leverage performance realized from a vendor’s custom solution. Trends in Cloud computing are now moving toward a goal of providing Cloud-native solutions with a vendor-neutral approach, not only to abstract the physical infrastructure but abstracting the vendors themselves. If FORTRAN was the irst answer to portable applications, Kubernetes might be the new answer to portable platforms. Data centers were once the exclusive domain of large enterprises. In 1991 the National Science Foundation lifted commercial restrictions on what is now the Web and along came a crowd of web hosting providers, allowing anyone with a few dollars a month to participate in its global network, along with a handful of static HTML iles on a server in some remote data center. Racks of servers soon illed data centers, and new data centers sprang up in every major city. The Internet generated a boom of cheap, commodity servers running the free and open source Linux operating system. Your bank needed proprietary communication protocols over point-to-point telecom connections to transmit data globally; all you needed was someone to visit your URL, and for a few dollars a month, you could do what your bank spent a fortune to achieve. Back in the early 1990s, computers attached to the Internet, delivered data nearly the same as they do today, primarily over HTTP. Back then, HTTP served HTML documents, images, and a variety of iles. Web servers grew in power and the ability to execute code, standardized in 1993 with the common gateway interface (CGI). CGI provided the opportunity to develop web-based applications under a simple and clear standard. Applications written to receive and respond to HTTP messages could run on nearly any provider supporting CGI, aside from unique
  • 50. dependencies. If this sounds like a Cloud-native and vendor-neutral solution, it was and still is. The need for and the ideas behind the Cloud- native and vendor-neutral movement is a type of correction in the self- healing nature of the Internet and covered in the next section. Sophisticated web applications need much more than simple CGI execution from a web server; they often need a speci ied amount of CPU or GPU resource, memory, and storage, along with the ability to run on multiple compute instances and in multiple regions. Renting and maintaining servers in data centers is a complex and specialized task, with a large amount of up-front planning and long-term commitment. Setting up new platforms once required a signi icant amount of manual labor. Companies like Google and Amazon built robust internal platforms for the allocation of compute resource, accommodating their massive workloads and constant release cycles. It made sense for new Internet- based enterprises to further capitalize on their infrastructure investments by offering them as products. These companies differentiated themselves from web hosting and colocation services by marketing a Cloud platform. Enterprises could now grasp these offerings as another option for their enterprise applications. The Cloud was not simple web hosting and servers. It was now another option for enterprises to deploy and operate all of their business applications. The Cloud was, in concept, a platform as a service (PaaS). The traditional Cloud is not a standard like HTTP or CGI, the traditional Cloud is not an operating system, and applications cannot compile and execute on it natively. To master the Cloud, you needed to pick one and might pursue a certi icate in Amazon AWS, Microsoft Azure, or Google Cloud. However, there is little distinction in the features offered by these major providers, only their proprietary implementations. When one vendor releases a particular feature, the others quickly follow. This competition has been excellent for innovation, and the major providers are some of the leading innovators in bringing cutting-edge technology to market. Along with the innovation has come proprietary APIs, and if you leverage these at the core of your architecture, your system is considered vendor-locked. Additionally, there has become a growing trend of enterprises looking for hybrid-Cloud solutions, attempting to leverage the strengths of multiple Cloud providers; this can mean better diversi ication or unfortunately multiple vendor lock-ins.
  • 51. This book is about building platforms in Kubernetes and implemented in a way that can run on instances by Amazon, Google, IBM, Microsoft, or custom servers in a private data center, or all of them combined. Kubernetes can operate on any Cloud that supports generic compute instances, which is all of them. However, even this is no longer necessary, as the major Cloud providers are now offering Kubernetes as a service, a fully Cloud-native and vendor-neutral option . Cloud Native and Vendor Neutral The early days of the Internet moved quickly, primarily due to open source technology and open standards. Cloud computing has solved the problem of ef iciently managing compute resource by abstracting the physical infrastructure into a set of API calls. The irst major Cloud offering was a type of on-demand utility computing called the Elastic Compute Cloud (EC2). Amazon was the irst to make the term Cloud computing popular in 2006 with the release of their EC2 Platform. Google released Google App Engine in 2008, and in 2010, Microsoft launched Azure. These major Cloud providers now offer far more than virtualized compute instances; they are full-featured PaaS and SaaS solutions that continue to proliferate with features and capabilities released daily. The major Cloud providers solved the problem of startups and new development efforts needing a fast and cost-effective way to spin up and manage compute resource and attach their business needs to on-demand solutions. Architecting solutions that leverage these offerings may bring many up-front advantages by taming development costs and reducing time to market; however, they also bring the concerns of vendor lock-in. Vendor lock-in occurs when your application or business process would require signi icant effort to port to a new platform or vendor. If your application or Platform is essential to the operation of your business, being deeply tied to the future stability and strategic decisions of another organization can pose a signi icant risk, or impose arbitrary technological limitations at best. Long-term contracts and service-level agreements (SLAs) only contractually guarantee stability, but technology managed by a third party is always prone to unexpected failures and depreciation. In some cases, it’s easier for a business to move buildings or relocate to another state than it would be to refactor a decade or
  • 52. more of business logic that has become deeply entrenched in the specialized platforms offered by IBM, Microsoft, Amazon, or Google. Vendor lock-in is not necessarily a problem for some organizations, especially value-added resellers (VARs) in the business of supporting or extending traditional Cloud services. However, if your business only wishes to leverage Cloud services, then you are best served with a Cloud-native vendor-neutral approach to your architecture, and Kubernetes provides this. Redundancy In September of 2015, Amazon Web Services (AWS) suffered a ive-hour outage in their US-EAST-1 region. Websites and applications from high- pro ile organizations such as IMDb, Tinder, Airbnb, Nest, and many others suffered up to eight hours of limited or full outages of their systems. However, Net lix is another signi icant user of AWS and only suffered a temporary disruption. Net lix had correctly architected against the risk of running critical business operations tied to infrastructure they don’t fully control. Redundancy is a sound principle that should be part of the design for any critical system’s architecture; unfortunately, many systems rely on the traditional Cloud to abstract this from them. It is not a stretch to assume there are a high number of redundant components to Amazon’s AWS offerings; Amazon’s 99.95% uptime service-level agreements necessitate this. However, genuine redundancy should be something you have control over, not a faith-based reliance on a third party. In 2015, Net lix did not have to wait patiently for Amazon to restore its US-EAST-1 region; Net lix had failure contingencies planned1 through their internally redundant architecture. However, what if the issues that caused AWS to go down had cascaded to other regions? The ability to stand up and operate a Kubernetes-based platform on nearly any Cloud provider could offer redundancy at massive cross- cloud scale and provide an ultimate contingency plan. A Kubernetes- based platform leverages the most fundamental value of the Cloud, on- demand compute instances, and with the proper consideration, it can remain vendor neutral.
  • 53. Portable Platforms Many organizations are not interested or able to purchase and maintain a vast array of physical infrastructure across national and even global regions. Cloud computing has become an essential aspect of operating sophisticated workloads lexibly and cost-effectively. The concept of Cloud-native means leveraging this world of ephemeral compute instances, storage, and networks, where efforts shift from the implementation of processes involved in forming the desired state to merely describing it. In 2017 Amazon announced its intentions to buy grocery retailer Whole Foods.2 With Amazon’s expansion into brick-and-mortar retail, there arose concern from other retailers that Amazon would now be considered a direct competitor. In an email to CNBC, Walmart spokesman Dan Toporek is quoted “Our vendors have the choice of using any cloud provider that meets their needs and their customers’ needs. It shouldn’t be a big surprise that there are cases in which we’d prefer our most sensitive data isn’t sitting on a competitor’s Platform.”3 Walmart was not worried about the cost or stability of its vendors using AWS; they preferred not to, for strategic business reasons. Solutions deeply tied to AWS may have lost opportunities to engage with Walmart or may have been passed up by competitors using Microsoft or IBM Cloud services. The idea of vendor-neutral means not needing to miss out on doing business with companies like Walmart if all it entails is a standing-up Kubernetes Cluster on an alternate Cloud. Kubernetes, along with a growing ecosystem of applications, frameworks, and concepts, is solving problems by developing applications that are both cloud native and vendor neutral. If an application can run on a generic install of Kubernetes, it can likely run anywhere, with only minimal changes typically needed in the con iguration of custom network and storage interfaces. So, are the Cloud vendors worried about this new technology so quickly enabling a vendor-neutral approach? Not only is Kubernetes able to be installed and operated on every major Cloud, surprisingly all the traditional Cloud providers now offer Kubernetes as a service. Choosing the location for operating your Platform is out of the scope for this book. If you have experience with AWS, you might be interested in Amazon Elastic Container Service for Kubernetes (Amazon EKS). If
  • 54. you are comfortable with Azure, you should explore Azure Kubernetes Service (AKS). IBM offers the IBM Cloud Kubernetes Service , and Google provides Google Kubernetes Engine (GKE). Getting Started Vendor Neutral While Kubernetes itself is vendor neutral, managed Kubernetes services from vendors such as Google, Microsoft, and Amazon often include vendor-speci ic requirements, often around identity and access management. If constructing a portable, vendor-neutral platform is a goal or business requirement, it may be bene icial to install a custom/vanilla Kubernetes cluster using only generic compute instances from the major cloud providers. Otherwise, explicitly documenting nonstandard con igurations used for a speci ic vendor provides a vendor-neutral road map, should portability or multi-cloud support be a future concern. Developing a platform with Kubernetes means it should be able to operate on a local workstation, on a private Cloud, on a public cloud with generic compute instances, or on public cloud Kubernetes service. There is a wealth of books and online tutorials for setting up and con iguring Kubernetes for every environment and vendor, from a few simple clicks on AWS or Google to “Kubernetes The Hard Way” by Kelsey Hightower.4 This book assumes you have some experience with Kubernetes and development operations and only covers basic setups for review. Development toolchains and environments can and often should have the same level of portability as the platforms they support. The following section, “DevOps Toolchain,” assembles a working development operations pipeline and work low using open source technology compatible with a pure vendor-neutral, Cloud-native approach. While traditional cloud providers offer some integrated development solutions, the goal of this book is not only to build a vendor-neutral platform supporting Blockchain, Machine Learning, and IoT data management solutions but additionally keep the entire development toolchain as portable and lexible as possible. DevOps Toolchain
  • 55. Other documents randomly have different content
  • 56. »Ci siamo colle minestre bollenti! pensò fra se stesso Cuddy. Non vorrei che mi ricadesse addosso anche questa.» »Fate venire avanti l'altro prigioniere (disse il presidente dopo avere ordinato si assegnasse a Morton una delle seggiole che guernivano i lati della sala). Colui ha la fisonomia di que' montoni che saltano il fosso dopo essersi veduti precedere dagli altri.» Allora due archibugieri accompagnarono Cuddy presso la tavola, nanti a cui sedevano i giudici. Volse attorno gli occhi impauriti, indi gli abbassò compreso da rispettosa tema in veggendo tanti grandi personaggi che si prendean pensiere di lui; nè lo stesso ricordarsi delle assicurazioni date da Claverhouse al suo padrone lo sciogliea d'ogni inquietudine sulle conseguenze che alle deliberazioni di quei lordi succederebbero. Aspettando intanto che lo interrogassero fece in goffa guisa parecchi inchini. »Vi siete voi trovato all'affare del ponte di Bothwell?» Fu questa la prima interrogazione che gli venne mossa e che produsse su di lui l'effetto dello scoppiar della folgore. Non ardiva confessare le verità, e per altra parte avea giudizio quanto bastava a comprendere, che col negare, facilmente si avventurava ad essere convinto di menzogna. Volea pertanto sciorsi d'impaccio con qualche scappatoia. »Non nego la possibilità d'essermici trovato.» »Rispondete a dirittura. — Sì o no? — Voi sapete bene che ci eravate.» »Non tocca a me il contraddire la signoria vostra.» »Torno a chiedere. Ci eravate, o non ci eravate?» »Ma chi può ricordarsi di tutti i luoghi ove è stato ne' diversi giorni della sua vita?» »Furfante! (gridò allora il generale Dalzell) se non rispondi meglio, ti fo saltare i denti fuori di bocca col pomo della mia spada. — Pensi forse non abbiamo altro che fare in tutta la giornata fuorchè interrogarti e seguirti di domanda in domanda, come cani che corrono dietro ad un lepre?»
  • 57. »Ebbene dunque! poichè niun'altra risposta può contentare le signorie loro, scrivano che non posso negare d'esservi stato.» »Ora, soggiunse il duca, credesti tu col trovarviti di commettere un atto di ribellione?» »Risponderai una volta?» gridò con voce di tuono Dalzell che vedea esitante Cuddy. »Adagio di grazia, signori miei! vedete bene che non è sì facile il rispondere presto ad interrogazioni che puzzano di capestro, disse fregandosi il collo Cuddy. Credo dunque che avrei fatto meglio...» »Meglio che cosa? Sbrigati.» »Che avrei fatto meglio a non andarvi.» »In nome di Dio! sclamò il presidente. Questo almeno si chiama rispondere. — E se il re si degna perdonarvi la ribellione nella quale siete caduto, pregherete voi il cielo per la prosperità del suo regno?» »Oh, di tutto cuore, milord! e non manderò giù un bicchiere di vino senza berlo alla salute di sua maestà.» »Eh! costui è un mariuolo di buona lega. — Ma, amico mio, chi vi ha indotto a prendere parte in questa sollevazione?» »Il cattivo esempio, milord, e una vecchia madre indiavolata, salvo il rispetto che debbo alla signoria vostra.» »Ottimamente! Non credo possa mai venire in animo a nessuno che tu trami una congiura. — Speditegli il suo perdono in termini semplici e chiari. — Fate ora avvicinare quello sgraziato, seduto là in fondo.» Mentre Cuddy tutto giubbilante andava a porsi vicino a Morton, Macbriar veniva condotto al luogo che questi due aveano abbandonato un dopo l'altro. Al nuovo interrogato parimente chiesero s'ei si era trovato alla battaglia del ponte di Bothwel. »Io vi era» egli rispose con voce franca e sicura. »Armato?»
  • 58. »Armato, sì; della parola di Dio per sostenere coloro che per la causa di Dio combattevano.» »O in altri termini, predicavate la ribellione contra il re!» »Sei tu che il dicesti.» »Voi conoscerete probabilmente Iohn Balfour di Burley?» »Se lo conosco! Sì. E ne ringrazio Iddio. Egli è un cristiano sincero e zelante.» »Che è egli addivenuto di questo grande personaggio?» »Son qui per rispondere intorno a me stesso, non per mettere a rischio la sicurezza degli altri.» »Troverem noi modo a farti uscire le parole di bocca» sclamò Dalzell. »Se costui fosse in un angolo di foreste, soggiunse un altro giudice, a capo d'un centinaio di Puritani, oh! parlerebbe senza farsi pregare!» »Ponete mente, gli disse il duca, a quai pericoli andate incontro col ricusar di rispondermi; parlate finchè ne siete anche in tempo. Voi siete troppo giovane per potere resistere ai patimenti che diverranno conseguenza della vostra ostinazione.» »Vi sfido! (rispose Macbriar lanciando su i giudici uno sguardo di rabbia e disprezzo). Non è la prima volta ch'io sia stato imprigionato e assoggettato ai tormenti, e comunque giovane, ho vissuto abbastanza per imparare a morire quando Dio l'avrà ordinato; perchè, sappiatelo; non è da voi altri che la mia vita dipenda.» »Va ottimamente! il duca riprese a dire; ma vi sono certe cose sgradevoli che vi possono accadere innanzi ancor di morire;» e detto ciò fe' udire lo squillo d'un campanello d'argento posto sopra una tavola dinanzi a lui. Nel tempo stesso venne sollevata una cortina di color cremisi che era ad un'estremità della sala, e che lasciò ad ognuno visibile il carnefice, munito di tutti gli ordigni della tortura, in quel secolo tuttavia barbaro, adoperata. Morton, tutt'altro che preparato a così
  • 59. truce spettacolo non potè starsi dal fremere. Macbriar vide questi apparecchi senza impallidire, o mostrare il menomo segno di debolezza. »Conoscete voi quell'uomo?» gli chiese Lauderdale. »Egli è senza dubbio l'esecutore degli atroci comandi che avete dettati contra gli eletti del Signore, nè agli occhi miei siete spregevoli men di colui. Benedico il cielo, poichè mi dà la forza di non temere i tormenti che voi saprete ordinare e ch'e' saprà farmi soffrire. La carne e il sangue possono risentirsi di tai patimenti; la fragilità della natura umana potrà costrignerla a gemiti e a lagrime, ma la mia anima è superiore ai vostri sforzi congiunti.» »Fate il vostro dovere» disse il duca al carnefice. Risparmieremo ai nostri leggitori la troppo increscevole pittura de' tormenti che al prigioniero si fecero sopportare, limitandoci a dire ch'ei li sostenne con una costanza degna di miglior causa. Il presidente ordinò più d'una volta si sospendesse quella orribile fazione per reiterare al paziente l'inchiesta fattagli intorno a Burley, ma ne ottenne sempre la stessa risposta. Finalmente i patiti travagli avendo privato Macbriar dell'uso de' sensi, un chirurgo postogli a canto proferì che la natura non poteva reggere a maggiori prove. »Dunque, disse il duca, or non occorre altro che pronunziare la sua sentenza.» Intanto che il chirurgo operava i soccorsi della sua arte per richiamare i sopiti sensi dello sciagurato, il presidente raccoglieva i voti de' membri del consiglio, il quale al primo segno di vita esternato dal prigioniero, pronunziò contro di lui sentenza di morte per delitto d'alto tradimento, condannando, lui essere appiccato e ad avere indi tronche la testa e le mani; le sostanze sue ad essere confiscate a pro del pubblico erario. »Doomster, diss'egli allora; leggete al condannato la sua sentenza.» Doomster era il carnefice. Giusta le leggi che a que' dì si osservavano nella Scozia, e che lungo tempo dopo ancor vi
  • 60. durarono, era tra gli ufizi del carnefice il far nota ai condannati la loro sentenza; il che aggiugnea nuovo grado d'onere nell'animo di que' miseri col farli accorti come sarebbe incaricato di operare il loro supplizio chi ad essi ne leggea la sentenza. Macbriar non avea potuto che imperfettissimamente comprendere il tenore della medesima allorchè il presidente la pronunziò, ma avea già ricuperati i sensi allor quando la udì letta da Doomster. »Milord, egli disse terminata questa lettura, vi rendo grazie. Mi avete compartito il solo favore ch'io fossi pronto a non ricusare da voi. Co' patimenti preparaste la mia anima all'eternità, e mi porgete occasione di far conoscere alla terra tutto quanto un cristiano può sopportare per la buona causa. Da un mondo di tenebre voi mi fate passare nel seno dell'eterna luce. Vi rendo grazie, ripeto, o milord, e vi perdono la morte mia. Possano gli ultimi momenti della vostra vita essere per voi felici e tranquilli come lo sono per me!» Venne trasportato dalla sala del consiglio al patibolo; i suoi lineamenti erano quelli d'un uomo condotto in trionfo, e serbò fino all'ultimo istante la stessa fermezza e lo stesso entusiasmo. Finchè durò questa scena tanto crudele lo spirito di Morton sofferse tutti i supplizi de' quali il suo sfortunato collega era vittima. Più d'una volta spinto da involontario moto era surto in piedi, ma gli occhi di Claverhouse sempre fissi sopra di lui lo richiamavano alla prudenza, e il costrigneano di bel nuovo a sedersi. Finalmente perdè i sensi egli stesso: e sapeva appena quali cose gli accadessero intorno; tal che allor quando fu nel calesse del generale, non potea rendere ragione a se medesimo del modo onde vi si trovava. »Qual coraggio! quale fermezza! diss'ei finalmente. Oh! quanto è da compiagnersi che tanti bei pregi dell'animo sieno stati oscurati e inviliti dagli errori d'una setta feroce!» »Egli muore, disse Claverhouse, con quella medesima calma, che era in lui quando a morte vi condannò. La giustizia il volea. — Ma voi, signore Morton, udiste che vi è mestieri abbandonare questo regno?»
  • 61. »Sì, lo so. Ma non potrò innanzi partire congedarmi da' miei amici?» »Hanno parlato di voi a vostro zio; ma questi ricusa vedervi. Il buon uomo è troppo atterrito. Lo ha compreso uno spavento, non del tutto irragionevole, che la colpa di tradimento onde foste giudicato vada a percotere le sue sostanze. Però non accadrà nulla di questo. Vi manda la sua benedizione e una piccola somma che troverete entro di questa borsa. — Quanto a lord Evandale, egli è tuttavia in cattivo stato di salute, nè può vedere nessuno. — Il maggiore Bellenden è a Tillietudlem insieme alla cognata e alla nipote, tutti intesi a tornarvi le cose nel primo ordine. Quei bricconi non si sono affaccendati poco nel mettere a sacco que' monumenti rispettabili d'antichità che erano primo scopo alla venerazione di lady Bellenden. Hanno persino abbruciato il seggiolone col baldacchino, che la buona signora chiamava il trono di sua maestà. — Vi sono altre persone che voi desideraste vedere?» »No! disse Morton, sospirando profondamente, no! ma comunque debba essere sollecita la mia partenza, mi abbisognano ancora alcuni apparecchi indispensabili.» »Tutto fu preveduto, il generale rispose. La vostra valigia è dentro il mio calesse, e in un forziere collocato dietro ad esso troverete quanti arredi vi mancassero ancora. Eccovi diverse lettere commendatizie che lord Evandale vi ha preparate affinchè possiate trasferirvi alla corte dello Statolder principe d'Orange. Io medesimo ne ho aggiunta una a lui stesso. Feci la mia prima carriera militare sotto gli ordini di questo principe, e alla giornata di Senet vidi con lui il fuoco la prima volta. — Eccovi ancora una credenziale sopra un banchiere dell'Aja. Ella è tratta da lord Evandale, che vi prega non trovare difficoltà a farne uso. Gli è un prestito che qualche giorno potrete restituirgli, se pur vi piace considerare siccome prestito quanto ei ravviserebbe appena per un tenue rimborso degl'immensi debiti che vi professa.» Morton non credea quasi ai propri occhi e alle proprie orecchie, nè sapea riaversi dallo stupore prodotto in lui da una così subitanea esecuzione della sentenza di bando intimatagli.
  • 62. »E Cuddy?» Soggiunse. »Ne avrò cura io medesimo. Procurerò che torni al servizio di lady Bellenden. — Perchè non credo che omai lo prenderà la tentazione di mancare ad una rassegna; ma fo per lui sicurtà che non gli viene più il prurito di campeggiare co' Puritani. — Oh! eccoci alla spiaggia. Un palischermo vi aspetta.» E tosto si presentarono alcuni piloti, che preso il fardello di Morton, nel palischermo il portarono. »Possiate essere felice! gli disse Claverhouse stringendogli la mano, e possano venir tempi più tranquilli da rivederci ancor nella Scozia! Non dimenticherò mai la condotta generosa che serbaste per riguardo al mio amico Evandale! Ella vi onora tanto più agli occhi miei, che mi son noti i segreti sentimenti dell'animo vostro: e pochi, credo io, nel caso in cui vi trovaste, avrebbero lasciato sfuggire il destro di spacciarsi d'un uomo, che loro attraversava il cammino, e ciò in tempo che lo spacciarsene non gli copriva all'aspetto del pubblico d'alcun disdoro.» Gli strinse una seconda volta la mano, e se ne disgiunse all'atto che l'altro stava per entrare nel palischermo. Sparito appena Claverhouse, Morton sentì prendersi la mano, e lasciarla tosto; e vi trovò un biglietto piegato in modo che occupasse il minore spazio possibile. Si volse immantinente. La persona trasmettitrice di questo foglio avvolgeasi entro grande mantello sì fattamente, ch'era impossibile ravvisarne il volto; si mise un dito alla bocca, poi si perdè tra la folla. Incidente dal quale la curiosità di Morton fu scossa oltre ogni dire. Appena trovatosi a bordo del vascello ove era aspettato, e che a Rotterdam veleggiava, si scostò da' suoi compagni di viaggio, e aprendo il biglietto consegnatogli con tanto mistero, lesse tai note. Il coraggio che dimostrasti nella fatale giornata ove Israello fuggì al cospetto dei suoi nemici ha espiato in tal qual modo i tuoi errori e le tue colpe. So che desti il cuore alla figlia dello straniero. Scordati di lei, perchè, ch'io sia lungi o vicino, in esilio al punto della morte, la
  • 63. mia mano starà sollevata contro della sua casa, e il cielo mi ha compartito il modo di far ricadere sovr'essa i tanti delitti d'una sciagurata famiglia. La lunga resistenza opposta del castello di Tillietudlem è la principale cagione onde fummo disfatti al ponte di Bothwell il sangue dei nostri fratelli grida vendetta. Non pensar più dunque a costei, e riunisciti ai nostri colleghi esiliati. Tu ne troverai in Olanda, che terran gli occhi sempre aperti sull'ora della liberazione. Sonerà quest'ora e se tu sei tuttavia degno di coltivare la vigna del Signor, mi troverai tantosto, facendo chiedere notizie di Quintino Mackell d'Irongray, all'ottima cristiana Bessia Maclure, che dimora presso l'albergo di Niel. Intanto cigniti i lombi colla cintura della pazienza, e tieni accesa la lampada, com'uomo che vegli di notte, perchè all'ora che meno gli uomini si aspetteranno, comparirà l'angelo sterminatore, coperto d'una veste tinta di sangue, e vendicherà sopra i suoi persecutori Israello. Una sì straordinaria lettera era sottoscritta I. B. DI B. Ma non abbisognava di queste iniziali per provare a Morton che essa non poteva essere stata scritta fuorchè da Iohn Balfour di Burley. Sorpreso dalla audacia e dall'ostinatezza di cotest'uomo, che nell'atto medesimo di vedere pressochè annichilata la sua fazione, pensava a raggruppar le fila d'una orditura già posta in pezzi, non quindi sentì alcun desiderio di legare con costui una corrispondenza, congiunta al certo a pericolo, e molto meno di rinnovare un'alleanza che per poco non gli fu micidiale. E quanto alle minaccie profferite contra la famiglia Bellenden, Morton non ravvisò in esse che effetto d'un risentimento ancor caldo contr'essa per la bella difesa operata dal castello di Tillietudlem; laonde non ne fece caso, nè gli venne tampoco in pensiero, che un nemico fuggiasco e bandito potesse dar da temere ad una famiglia attenente alla parte dei vincitori. Ciò nullameno rimase perplesso un istante se dovesse trasmettere la lettera di Burley a qualcuno, fosse poi lord Evandale o il maggiore Bellenden, ma poichè questa medesima lettera dava indizj sul soggiorno di chi la scrivea, gli parve che il far ciò sarebbe stato un rendersi reo di tradita confidenza, ed anche senza pro, trattandosi di prevenire un danno che immaginario ei reputava. Lacerato pertanto
  • 64. il biglietto ne gettò i frammenti nel mare, non senza però avere prima notati e il nome additato da Burley per farne ricerca, e il luogo per saperne contezza. In questo mezzo la nave salpava dal porto, e un vento propizio ne rigonfiava le vele. Sparvero agli occhi del giovane di Milnwood le coste della Scozia e a poco a poco le cime ancora delle montagne; e Morton si vide per molti anni disgiunto dalla contrada d'onde avea sortito il suo nascere.
  • 65. CAPITOLO VII. »Volano gli anni rapidi »Del caro viver mio» Parini. Gli scrittori di racconti godono d'un privilegio, che fa la condizion loro migliore d'assai sopra quella degli autori drammatici, quello cioè di non essere soggetti alle unità di tempo e di luogo, e di potere, giusta l'uopo, condurre i lor personaggi ad Atene o a Tebe, e di ricondurneli ancora se le circostanze lo chiedono. — Finora il tempo è trascorso d'egual passo col nostro eroe, poichè dal giorno della rassegna, alla quale vedemmo per la prima volta far mostra di se il giovane di Milnwood sino alla partenza di lui per l'Olanda, non è passato un intervallo più lungo di sei settimane. Ma è giunto l'istante di fargli prendere il galoppo e superare d'un salto il corso di cinque anni. Non quindi ne sarà d'uopo cambiare il luogo della scena, che continuerà tuttavia ad essere nella Scozia. Ma prima di tornare a far parola del nostro eroe, gioverà presentare al leggitore alcuni cenni sugli avvenimenti che quivi accaddero in questo intervallo. Scorsi appena tre mesi dopo l'arrivo di Morton in Olanda, la morte di Carlo II chiamò il secondo Giacomo al trono dell'Inghilterra. Ne' quattro anni che questo monarca regnò, le dissensioni civili e religiose continuarono a dilacerare la Scozia, e s'ella cominciò finalmente a respirare, il dovette alla prudente tolleranza del re Guglielmo. Gli abitanti di questa contrada, pagarono bensì il primo tributo a quella violenta impressione cui non manca di generare negli animi un mutamento di dinastia; ognun sa che questo, o poco o
  • 66. assai, è origine di politiche rivoluzioni, alle quali nella presente circostanza si unirono le religiose; ma finalmente i cittadini alla cura de' pubblici affari sostituirono quelle de' lor privati interessi. I soli che resistessero al nuovo ordine di cose introdotto erano i montanari del nort della Scozia, i quali ricusavano ostinatamente sottomettersi all'autorità di Guglielmo, e brandian l'armi per la causa dell'esule Giacomo II, avendo per loro duce il visconte di Dundee, che i nostri leggitori hanno fin qui conosciuto sotto il nome di Graham di Claverhouse, e che dopo una vittoria riportata sotto le mura di Dundee ottenne questo titolo d'onore dalla gratitudine di Giacomo II. Dal poco sol che abbiam detto s'accorgeranno i leggitori che un grande cambiamento esser dovea accaduto nelle cose interne della Scozia. I wigh, nemici nati della dinastia degli Stuardi s'erano tostamente manifestati propensi al nuovo re Guglielmo, ed avendone ottenuto la restaurazione del presbiterianismo, con altrettanto zelo parteggiarono per la causa de' Reali, quanto furore posero nel combatterla finchè la causa della monarchia era pur quella di Carlo II o del successore di lui. Quegli in vece che aveano guerreggiato per questi due principi venivano a propria volta qualificati siccome ribelli, e costretti ripararsi alle foreste e alle montagne nella stessa guisa onde poco prima vi cercarono asilo i loro avversarj. Gli uni aveano acquistato il nome di traditori; gli altri riceveano da questi il titolo di persecutori. Trovavasi pure in Iscozia una terza fazione formata dai Puritani fanatici, che non sapean andar d'accordo con nessuna delle altre due. Un governo repubblicano e teocratico era il fantasma cui sempre viveano affezionati; laonde muniti sempre di testi scritturali, riprovavano qual delitto la savia tolleranza del re Guglielmo, che permetteva ne' propri stati la libera pratica di tutte le religioni. Ma questa fazione perdea vigore ogni giorno perchè il governo contentavasi di vigilare gli andamenti, ma colle armi sol dello sprezzo la combattea.
  • 67. Tal si era lo stato degli affari della Scozia sei mesi dopo l'avvenimento di Guglielmo al trono della Gran-Brettagna. E fu sotto il regno di questo monarca, che in bella estiva sera, uno straniero, che aveva aspetto di militare distinto per grado fermò il superbo suo corridore alle falde di fertilissima collina, d'onde scorgeansi le rovine tuttavia maestose del castello di Bothwell, e le acque del Clyde che serpeggiano attraversando quelle montagne, e i boschetti che ad ogn'istante ne interrompono il corso, e il ponte di Bothwell, in cui si termina la pianura da quel castello denominata; pianura che pochi anni prima era stata sanguinoso teatro di desolazione e di stragi, e che respirava di nuovo la pace e la tranquillità. Il lieve sussurro del venticel della sera faceasi appena udire fra le piante e le macchie che verdeggiavano lungo le rive del Clyde, e le acque della riviera pareva attenuassero il lor mormorio per discordar meno dal grato silenzio che regnava su quelle sponde felici. Il nostro viaggiatore tenne una via ombreggiata da pomi carichi di frutta d'onde perveniasi ad una casa situata sul declivio d'una vicina montagna. Appartenea questa ad un fondo rustico, ed aveva l'apparenza d'essere ad un tempo il soggiorno di qualche proprietario mediocremente agiato. All'ingresso d'un viale che guidava alla fabbrica principale, scorgeasi una casetta assai decente, e che avrebbe potuto giudicarsi l'abitazione del custode, se l'edifizio che venia dopo si fosse meglio rassomigliato ad un castello. Ciò nullameno non prestava esso quell'aspetto di trascuratezza, o di scadimento che sogliono contraddistinguere le abitazioni de' contadini scozzesi. Osservavasi a sinistra della medesima un piccolo giardino ben fornito di legumi e di alberi da frutto. Una giovenca e una capra pasceano il vicino verziere. Quivi parimente era un recinto chiuso da viva siepe, ove alcune chiocce governavano la lor famigliuola; un mucchio di rami secchi, e un monticello assai rilevato di torba davano a divedere, che gli abitanti s'erano muniti contra i rigori del prossimo verno. Finalmente i vortici di fumo che uscendo fuor della canna del
  • 68. cammino s'aggiravano attorno alle cime de' vicini alberi, indicavano che la famiglia quivi stanziata stava pensando agli apparecchi della cena. Per dar l'ultima mano a questa pittura della campestre beatitudine, una fanciullina di circa quattro anni empieva una brocca all'acqua limpida d'una fontana non oltre a venti passi distante di lì. A questa meta fermatosi il cavaliere chiese alla picciola ninfa la strada d'onde si va a Fairy-Grove. Allora la fanciullina mise a terra la brocca, e colle sue tenere dita, disgiunse i bei capelli biondi che le cadean sulla fronte; indi fissando sopra lui due occhi maravigliati gli chiese: »Che cosa mi dite o Signore?» Solita interrogazione che i contadini della Scozia rimandano a chi gli interroga sopra qual si sia cosa. »Desidero sapere la strada di Fairy-Grove.» »Mamma, mamma! sclamò la fanciulla correndo alla porta della casetta. Venite a parlar voi con questo signore.» Comparve la madre, giovane ed avvenente donna, i cui lineamenti la diceano stata scaltra e smaliziata anzichè no, comunque la matrimoniale condizione le avesse inspirato quel contegno di gravità e decenza, che è caratteristico quasi sempre delle contadine di Scozia. Ella portava fra le braccia un bambino, ed altro fanciullino, di due anni e mezzo a un dipresso, le veniva a fianco tenendosi ad una falda del grembiule materno. La figlia maggiore, colla quale abbiamo di già fatta conoscenza lanciava occhiate frequenti e alla sfuggita sul forestiere. »Che bramate, o signore?» gli domandò la contadina, d'un tuono rispettoso sì, ma ben lontano dal manifestare quella zotichezza e quell'aria d'imbarazzo, solito nelle sue pari quando, non avvezze a conversare con persone di un grado distinto, casualmente in queste s'incontrano. Il viaggiatore dopo averla fissata in volto parve turbarsi un istante, ma riavutosi immantinente. »Vorrei, rispose trasferirmi a Fairy- Grove.» »Ci siete signore, nè questa casa si chiama altrimenti.»
  • 69. »Mi occorrerebbe parlare a Cutberto Headrigg, soprannominato Cuddy. Sarà qui dunque ov'egli dimora?» »Per l'appunto, o signore, egli è mio marito. Oggi è andato alla città, ma dee tornarne in questa sera medesima. Se la signoria vostra vuole discendere, nè sdegna entrare nel povero nostro tugurio, Cuddy non tarderà senza dubbio ad essere qui.» Il forestiere avendo accettata l'offerta, la contadina lo fece entrare in una stanza che era ad un tempo cucina, tinello e sala di ricevimento; indi dopo aver messo il cavallo entro la scuderia, gli esibì lardo, uova, butirro, e birra della quale gli vantò la squisitezza. Lo straniere acconsentì a prendere qualche cibo, anche per non dare disgusto alla persona che glielo offeriva, e durante la mensa, così il loro dialogo s'intavolò. »Sarei troppo ardita, o signore, col chiedervi quale affare avete con mio marito?» »No certo, mia buona ospite. Abbisogno d'alcune notizie, che a quanto mi viene assicurato, egli potrà procurarmi.» »Se queste riguardano persone nostre vicine, forse io potrò appagarvi al pari di lui. Non v'è ignoto, o signore, che nell'essere curiose le donne non la cedono sì facilmente a chicchessia; laonde posso accertarmivi informata delle cose che accadono dieci miglia all'intorno meglio di quanto lo sia lo stesso Cuddy.» »È molto tempo che ho abbandonato questo paese, ripigliò sospirando quel forestiere. Altra volta l'ho assai conosciuto. Or sembra che finalmente vi sia tornata la calma.» »Non però in tutti i punti, e abbiamo ancora molti guai dalla parte di tramontana! Lord Dundee, che in addietro era conosciuto per Claverhouse, si è posto a capo de' montanari, e sta fermo per il re Giacomo. Onde si battaglia in quelle rupi, come si battagliava qui, sono cinqu'anni. Ah! se aveste veduto questo spianato dopo un combattimento che si decise sovr'esso! Mio marito m'assicura che fu uno spettacolo orrendo.»
  • 70. »Vostro marito dunque vi si trovava? — E ditemi! da qual banda s'era egli posto?» »Mio signore! — Questa è una interrogazione alla quale lascerò ch'egli risponda.» »Lodo la vostra prudenza, ma non è necessaria con me, perchè mi è noto ch'egli serviva Enrico Morton, uno fra i capi dei Presbiteriani.» »Lo sapete, sì? Ebbene saprete ancora che Cuddy lo amava grandemente, e che ne ha pianta per lungo tempo la morte.» »Ah! dunque morì Enrico Morton?» »Senza dubbio. Egli avea preso imbarco per l'Olanda. Tutti gl'imbarcati perirono e del sig. Morton non si è avuta contezza mai più.» »Avete inteso parlare d'un certo altro capo, di nome Burley? Sapete se viva tutt'ora?» »In verità è tal cosa alla quale non penso nè poco nè assai. E non v'è nemmeno chi possa dir con certezza quel che ne sia divenuto. Alcuni pretendono che egli sia passato in paese straniero, ma che essendo stato riconosciuto per uno degli assassini dell'arcivescovo di Sant'Andrea, non abbia trovato chi voglia nè manco vederlo, nè capo d'esercito che acconsenta impiegarlo. Altri aggiungono che è tornato fra noi e che vive in mezzo ai boschi, alimentato dai soccorsi di qualche fanatico della sua specie.» »E (aggiunse lo straniero dopo aver esitato un istante) potete voi darmi contezze di lord Evandale?» »Se posso darvene! E chi meglio di me? Non sarà egli a momenti il marito della mia giovine padrona, di miss Editta Bellenden?» »Bellenden! Intendo. — Dunque le nozze non sono ancora seguite?» »Quasi come seguite. Son già promessi, e Cuddy ed io, qualche mese fa, siamo stati presenti alla promessa. Le nozze veramente vanno tardando, e il perchè lo so io.»
  • 71. Lo straniero col capo appoggiato sulle proprie mani sembrava assorto in penose meditazioni, nè dava più ascolto alla sua ospite, che in tutta la durata di tale colloquio sembrava commossa da una segreta molestia, ed essendosi posta a sedere vicino alla finestra, volgeva ad ogn'istante l'occhio da quella parte, come per curare l'istante dell'arrivo di suo marito. Uscendo al fine della sua estasi il viaggiatore chiese, e si vide che tale domanda gli costava un penoso sforzo al suo animo, se lady Margherita viveva ancora. »Sì, ma i tempi sono ben cambiati per essa. Oh che disgrazia avere perduto il castello di Tillietudlem, la baronia, i fondi che il povero Cuddy ha lavorati sì lungamente, e tutto ciò per mancanza d'alcuni pezzi di pergamena che non si sono più rinvenuti dopo che ella rientrò nel castello!» »Io avea udito dir qualche cosa di tutto ciò, disse con voce affogata il forestiere, e prendo molta parte agli affari di questa famiglia. Oh come volentieri le sarei utile! Qual felicità per me se il potessi! — Ma, e dove dimorano presentemente queste signore?» »Qui, in quella casa che vedete in fondo a quel corto viale; e questo picciolo fondo è la sola proprietà che lor sia rimasta.» »Vi si trovano ora?» »No signore. Sono andate a visitare la sorella di lord Evandale, e intanto custodisco io le chiavi della casa. Non è poca ventura per esse l'avere fatta l'eredità del vecchio maggiore Bellenden.» »Uom rispettabile e degno! sclamò lo straniero. Seppi a Edimburgo che più non vivea.» »Ah! non ebbe più un giorno di bene dal momento che vide la vedova di suo fratello e la sua giovine nipote cacciate dal loro castello; e sì! ha speso di bei denari per sostenere quella lite. Ciò è stato sotto il regno del re Giacomo. Basilio Olifant che facea causa per ottener questo dominio diventò cattolico a fine di guadagnarsi il cuore de' giudici. Oh! allora non gli si ricusò più cosa veruna. È poi
  • 72. da aggiugnersi, che lady Bellenden non ha mai più potuto trovare quello straccio di pergamena, che avrebbe fatti veder chiari com'erano i suoi diritti, sicchè dopo un litigare per più interi anni, la terminò coll'avere la sentenza sulle spalle. Fu pel maggiore un tal colpo che non se ne riebbe da poi, e la rivoluzione fu l'ultimo; perchè, comunque non avesse gran ragione di amare il re Giacomo che gli avea con tanta leggiadria ridotte alla nudità le parenti, il suo amore al sangue dagli Stuardi ancor prevalea. Insomma è morto. Già non è stato ricco in alcun tempo, perchè quel bravissimo uomo non vedea mai persona in bisogno che non si facesse tosto a soccorrerla. Vennero di giunta i debiti che dovette incontrar per la lite, tantochè dopo la sua morte Charnwod è andato in mano de' creditori, e questo piccolo fondo è tutto ciò che è rimasto della sua eredità.» »Se così è, soggiunse l'ospite commosso oltre ogni dire, queste due povere signore son rimaste prive di sostanze e di appoggio.» »Oh! non mancheranno mai di nessuna di tali cose sintantochè viva lord Evandale. Egli non le ha abbandonate, come hanno fatto tant'altri. No certo! anzi per valermi del parlare di Mausa, mia suocera, dai giorni del patriarca Abramo venendo a noi, non si è mai dato uomo, che s'affaccendi tanto per meritarsi una donna.» »Perchè dunque, con voce tremebonda l'ospite domandò, perchè dunque un affetto sì disinteressato non ebbe prima d'ora la sua ricompensa?» »Ah! Ah! — Son più d'una le ragioni. Primieramente le turbolenze del paese, poi la lite, poi la morte del maggiore, finalmente... Ma, oh Dio! signore, voi vi sentite male.» »Non è nulla, disse il forestiere, che le parole appena trovava. Soggiaccio talvolta a certe palpitazioni di cuore. M'accorgo che avrei bisogno di riposo e di solitudine. Potreste voi darmi una stanza ed un letto? Vedrò Cuddy domani mattina. Mi trovo troppo stanco per potergli parlare questa sera.» »Oh sì certamente, o signore! (rispose la contadina con una premura, mossa, a quanto parea, da cagione segreta ch'ella disvelar
  • 73. non volesse). Posso darvi una stanza nella casa de' miei padroni. S'eglino vi fossero non m'assumerei da me sola una tal libertà; ma so bene che non me ne faranno rimprovero.» Detto ciò, prese un lume e pregando l'ospite a seguirla, lo condusse nella casa, della quale, come vedemmo, aveva essa le chiavi. Entrato ch'egli vi fu, la donna si congedò da esso un istante per apparecchiargli, soggiunse, la stanza; nella qual bisogna mise una prestezza sì straordinaria da potere in men di cinque minuti avvisarlo che il letto gli era allestito. Ma quando a ciò s'accignea il trovò privo di moto e col capo appoggiato sopra la tavola presso cui si era seduto. Temette da prima ch'egli avesse smarriti i sensi; ma avvedutasi ch'egli era unicamente assorto nel suo dolore si ritirò senza ch'ei l'avesse veduta, e prima di ritornare fece qualche strepito per dargli tempo a nascondere un'interna agitazione, della quale ella non volea darsi per accorta; e di fatto questa seconda volta il trovò in piedi che camminava su e giù per la stanza. Indi il condusse nell'appartamento assegnatogli, che era quello solito ad essere occupato da lord Evandale quando a Fairy-Grove trasferivasi; e questo appartamento tutto stavasi in una stanza da letto e in un picciolo gabinetto che metteva al giardino, separato poi da una grande sala per un sottilissimo tramezzo di legno. La contadina si partì da quel luogo augurando una felice notte e miglior salute al suo ospite. »Sia lodato Dio! disse fra se medesima nel tornar che fece alla propria abitazione: sarò io la prima a vedere Cuddy, e ad avvertirlo di quanto accade.»
  • 74. CAPITOLO VIII. »O tu che adduce all'are dell'imene »Brama di rinvenir chi le spinose »Calli di vita aspergati di rose »Nella compagna di tuoi gaudj e pene; »Paventa di ritrarne al pie' catene »In fra i mirteti lusinghieri ascose, »Catene dure sì che non le impose »Neron più dure in sulle lazie arene.» D'un anonimo. Certamente il lettore ha riconosciuto negl'interlocutori del capitolo precedente Enrico Morton e Jenny Dennison, un dì scaltrita cameriera di miss Bellenden, or degna metà di Cuddy, il quale, mercè la protezione di lord Evandale l'avea sposata, ed era rientrato al servigio di lady Margherita fin d'allora che l'amante di Editta veleggiò alle spiagge olandesi. Giugneva ella nella sua picciola casa, quando Cuddy vi rientrò. »Oh che maledetto tempo, Jenny! Tutto il rovescio dell'acqua m'è venuto addosso, e m'è penetrato, credo, fino nell'ossa. Presto dammi di che mutarmi.» E inteso a questa faccenda non dimenticava suggiugnere: »Jenny, non m'hai dunque preparato nulla da cena? Mi sento morir dalla fame.» »Un poco di pazienza! Egli è a quanto ho pensato finora: sai che la minestra non ti piace, se non è ben calda.»
  • 75. »Via, via! sei sempre lì colle tue frascherie!... Ma che cosa hai Jenny? Tu pensi a qualche cosa.» »E non è senza perchè. Se sapessi che cosa accade! Oh povero il mio Cuddy! Ho paura che siam rovinati.» »Come sarebbe a dire? le chiedeva imperturbato Cuddy, non solito a sgomentire per poco. Spiegati. — Ma prima di tutto la mia cena.» Jenny dopo avere coperto un canto della tavola colla salvietta, pose dinanzi a Cuddy una grande scodella di minestra, e intanto ch'ei contentava l'appetito, gli narrò senza omettere veruna particolarità l'accaduto arrivo d'un forestiere, e la natura del colloquio che avea avuto con esso. »Ebbene! disse Cuddy, io non vedo nulla da spaventarsene in tutto ciò che m'hai raccontato. Nessuno saprà che hai fatto dormire uno straniere in casa dei padroni; e quand'anche venisse a sapersi, miss Bellenden presterebbe servigio all'universo, purchè il potesse; e quanto alla vecchia padrona non ha mai negato ricetto ad un uom di riguardo, come a quel che sembra, è questo nostr'ospite. Di che cosa dunque t'inquieti?» »Tu dunque, o Cuddy, non indovini chi sia questo forestiere?» »Come diavolo vuoi tu che lo indovini? Son forse diventato, senza accorgermene, uno stregone?» »Quest'è un uomo in somma che farà andare a sconquasso le nozze di miss Editta con lord Evandale, e ne sarà conseguenza, che la prima non diverrà mai più ricca, e noi rimarremo due poveri pitocchi in eterno.» »Diammine! Come ha da fare il tuo forestiere ad operare questo miracolo? Il matrimonio non è egli bello e concluso e poco meno che consumato?» »Sei bene una gran testa dura! Nè intendi ancora che questo forestiere è l'antico spasimato di miss Editta, in una parola il tuo antico padrone?»
  • 76. »Il sig. Enrico Morton!» sclamò Cuddy alzandosi in piè con tal impeto che rovesciò la minestra e la tavola. »Egli stesso (rispose Jenny mentre riparava gli sconci derivati dell'entusiasmo di suo marito) nè per questo era d'uopo rompermi la mia scodella.» »Ma sei matta, Jenny? Ella è cosa troppo sicura che il sig. Morton sta sotterra o sott'acqua da lungo tempo.» »Dunque mi credi cieca? Ti dico che l'ho ravvisato come ravviso te?» »Come hai fatto a ravvisarlo?» »Oh bella! credi tu che il corso di cinque anni basti a cambiare un uomo dell'età del sig. Morton in modo da non riconoscerlo più? Poi avrebbe bastato ad accertarmi che era desso, il dolore da cui fu preso nell'udir parlare delle nozze di miss Editta. Mi ha ricordato il giorno che costò tante lagrime a questa povera giovane quando egli e tu, pessima lana, prendeste le armi a favor de' ribelli. — Oh! indovina a che cosa sta pensando ora costui!» »A che cosa penso? (rispose Cuddy che avea cenato in camiciuola, ed imbracciava in quel punto il giustacore). Penso a correre subito ad abbracciare il mio povero padrone.» »Voi non ci andrete, Cuddy.» Soggiunse freddamente ma con fermezza Jenny. »Non ci andrò? Ma costei ha il diavolo in corpo! Ti credi forse ch'io voglia per tutto il tempo della mia vita lasciarmi menar per naso dalle donne?» »Ascoltami Cuddy! voglio farti intendere la ragione. Primieramente, mi sono accorta che il sig. Enrico desidera di non essere riconosciuto: non ti dirò per qual motivo, perchè chi può saperlo? Ma pensi tu che egli ignorasse con chi parlava, parlando meco? Ti pare, Cuddy, ch'io sia tanto cambiata da produr tal effetto? Abbiamo finto l'uno e l'altro di non ci riconoscere, e ne avevamo ciascuno le nostre ragioni. Le sue forse erano d'assicurarsi che cosa fosse divenuto di miss Editta; e quando l'ha saputa in procinto di conchiudere un buon
  • 77. matrimonio, la sua intenzione, lo vedo, è stata subito di ritirarsi per non guastarlo. Siam noi i soli a sapere che egli è ancora tra' vivi. Ma se tal cosa giugnesse a notizia di miss Editta, foss'anche lì dinanzi al ministro per dar la mano di sposa a lord Evandale, direbbe no quando sarebbe il momento a proposito di dir sì.» »E che m'importa il sì o il no di miss Editta? E s'ella preferisse l'antico amante al novello, non è forse padrona di fare quello che vuole? — Anche voi, bella Jenny, avevate promesso a Holliday di sposarlo, e la cosa è certa, perchè costui l'ha divulgata per tutti i cantoni.» »Holliday è un mentitore, e tu uno stupido se gli dai retta. Ma quanto a miss Editta!.... oh mio Dio, mio Dio! Il sig. Morton, ne sono sicura, non possiede altro oro fuor di quello che sta nel ricamo del suo vestito. Di che dovrebb'egli campare con lady Margherita e con miss Editta? Tu il sai pure che questo piccolo fondo basta appena a far vivere le due signore... Cioè non basterebbe nemmeno, se noi secondando lord Evandale non dessimo loro ad intendere che rende tre volte di più.» »E dove metti Milnwood? Non è un bello e un buon possedimento? Mi opporrai che il vecchio sir David ne lasciò morendo usufruttuaria la vecchia Alison, perchè non sapea che cosa fosse accaduto di suo nipote. Ma questa è una donna dabbene; e una parola che le si dice v'è panno per accomodarli tutti.» »Che mi va tu panneggiando? Tu non sai quel che ti dica. Credi tu che una matrona rispettabile, del calibro di lady Margherita, voglia ricevere una grazia dalla vecchia Alison? quella lady Margherita, alla quale se lord Evandale vuol prestare servigi è obbligato ricorrere all'inganno, e andar inteso con noi? No, no! — Poi se miss Editta si facesse sposa al sig. Morton, le converrebbe seguirlo alla guerra, poichè l'abito che gli ho veduto è un uniforme di militare.» »E per conseguenza anche la vecchia matrona che non saprebbe separarsi da miss Editta! A dir vero comparirebbe male fra le bagaglie d'un esercito.»
  • 78. »E chi sa da qual parte si sia posto adesso il sig. Enrico?» »E la vecchia matrona su questo articolo è alquanto schizzinosa!» »In fine Cuddy (aggiunse allora l'astuta Jenny che il vedea alquanto scosso dalla sola idea di poter tornare in guerra, ed aveva serbato per l'ultimo il più possente degli argomenti) se vanno in fumo le nozze con lord Evandale, ci va anche il bel podere che questi ne aveva promesso. Che accadrà allora di noi e dei tre nostri fanciulli? Potremmo noi nemmeno vivere su questo fondo senza i sussidj che ci va passando la generosità di milord?» Alcune lagrime di Jenny aggiunsero forza all'eloquenza di sì fatta arringa. Cuddy intanto colla testa bassa pareva il vero ritratto della irresolutezza. »Ma Jenny, le diss'egli, in vece di tutto questo tuo cicaleggio non potresti suggerirmi il partito da prendersi?» »Lasciar andare naturalmente le cose, rispose Jenny. Non far vista di riconoscere il sig. Morton ammeno che non voglia essere riconosciuto egli stesso. Non parlare di lui con nessuno; non far sapere ad anima vivente che è qui. Io non te ne avrei nemmeno parlato, senza la paura che tu vedendolo domani mattina commettessi qualche imprudenza. Scommetto che egli se ne andrà senza farsi conoscere, e che non ritorna altrimenti.» »Povero il mio padrone! Sclamò Cuddy. E sarà vero ch'io lo veda, ch'io gli parli senza dirgli che l'ho riconosciuto? Ah questo è impossibile! Piuttosto, Jenny, partirò innanzi giorno per andar a lavorare, e non ritornerò che a notte avanzata.» »Questo è quel che va fatto, Cuddy! Se lo dico io! nessuno ti pareggia in giudizio quando discuti i tuoi affari in compagnia d'altre persone. Ma tu non dovresti mai volere operare di tua testa.» »Egli è vero (borbottava Cuddy mentre si spogliava per mettersi in letto) che da quando ho l'uso della ragione, qualche femmina s'è sempre frammessa ne' miei affari, e mi ha fatto andar a suo modo in vece di lasciarmi seguir la strada che avrei voluto prendere. La mia vecchia madre prima di tutte, poi lady Margherita; e il bello era che queste due donne non andavano nemmeno d'accordo ed io era
  • 79. sempre come il fornaio de' burattini che ho veduto alla fiera; tirato dal diavolo da una banda, e dal Pulcinella dall'altra. Adesso poi che ho moglie (soggiugnea avvoltandosi sotto la coperta) bisogna ancora che cammini com'essa la intende.» »E non sono io la miglior guida che t'abbi avuto in tua vita?» Così diede fine alla conversazione Jenny prendendo luogo vicino al marito, e ponendo lo spegnitoio sul lume.
  • 80. CAPITOLO IX. »Di vita fin sull'albeggiar ne danna »Alle angosce Natura. Oh quante volte »Pria di perir periamo. È a noi pur morte »Il morir degli amici: e della fera »Mietitrice degli anni incontro al têlo »Nè son d'amor le care grazie usbergo.» Logan. Spuntava appena il nuovo giorno allora quando due signore a cavallo, seguite da due servi arrivarono a Fairy-Grove, e Jenny non senza crucciarsene grandemente si avvide che queste erano miss Bellenden e la sorella di lord Evandale. »Se voleste qui sedervi un istante, lor disse Jenny sopraffatta da tale improvvisa apparizione, avrei campo di andare a mettere in ordine l'appartamento.» »Gli è inutile, rispose Editta, non ne occorre che la chiave comune. Gudyil aprirà le finestre del nostro gabinetto.» »Non è possibile aprirne la porta, perchè ha guasta la serratura» si fece a dire Jenny ricordandosi che la chiave del gabinetto delle signore serviva anche a schiudere la stanza ove trovavasi Morton. »Ebbene! andremo nella camera rossa» ripigliò lady Bellenden e togliendo le chiavi di mano a Jenny si avviò alla volta della casa. »Tutto sta per iscoprirsi, pensò Jenny fra se stessa, ammeno che non mi riesca di farlo uscire segretamente. Forse era meglio dire con
  • 81. Welcome to our website – the perfect destination for book lovers and knowledge seekers. We believe that every book holds a new world, offering opportunities for learning, discovery, and personal growth. That’s why we are dedicated to bringing you a diverse collection of books, ranging from classic literature and specialized publications to self-development guides and children's books. More than just a book-buying platform, we strive to be a bridge connecting you with timeless cultural and intellectual values. With an elegant, user-friendly interface and a smart search system, you can quickly find the books that best suit your interests. Additionally, our special promotions and home delivery services help you save time and fully enjoy the joy of reading. Join us on a journey of knowledge exploration, passion nurturing, and personal growth every day! ebookbell.com