Вы находитесь на странице: 1из 52

Designing Applications for Google

Cloud Platform: Create and Deploy


Applications Using Java Ashutosh
Shashi
Visit to download the full and correct content document:
https://ebookmass.com/product/designing-applications-for-google-cloud-platform-crea
te-and-deploy-applications-using-java-ashutosh-shashi/
Designing Applications
for Google Cloud Platform
Create and Deploy Applications
Using Java

Ashutosh Shashi
Designing Applications for Google Cloud Platform: Create and Deploy Applications
Using Java
Ashutosh Shashi
Duluth, GA, USA

ISBN-13 (pbk): 978-1-4842-9510-6 ISBN-13 (electronic): 978-1-4842-9511-3


https://doi.org/10.1007/978-1-4842-9511-3

Copyright © 2023 by Ashutosh Shashi


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the
material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation,
broadcasting, reproduction on microfilms 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.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with
every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an
editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the
trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not
identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to
proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication,
neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or
omissions that may be made. The publisher makes no warranty, express or implied, with respect to the
material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Celestin Suresh John
Development Editor: James Markham
Coordinating Editor: Mark Powers
Copy Editor: Kim Wimpsett
Cover designed by eStudioCalamar
Cover image by Bolivia Inteligente on Unsplash (www.unsplash.com)
Distributed to the book trade worldwide by Apress Media, LLC, 1 New York Plaza, New York, NY 10004,
U.S.A. Phone 1-800-SPRINGER, fax (201) 348-4505, email 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.
For information on translations, please e-mail booktranslations@springernature.com; for reprint,
paperback, or audio rights, please e-mail bookpermissions@springernature.com.
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and
licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales
web page at www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is available to readers
on GitHub (https://github.com/Apress). For more detailed information, please visit www.apress.com/
source-code.
Printed on acid-free paper
Table of Contents
About the Author����������������������������������������������������������������������������������������������������� ix

About the Technical Reviewer��������������������������������������������������������������������������������� xi


Introduction����������������������������������������������������������������������������������������������������������� xiii

Chapter 1: Introduction�������������������������������������������������������������������������������������������� 1
Start a Free Trial on GCP��������������������������������������������������������������������������������������������������������������� 1
Creating a New Project������������������������������������������������������������������������������������������������������������ 4
Overview of GCP and Its Services������������������������������������������������������������������������������������������������� 8
Google Compute Engine���������������������������������������������������������������������������������������������������������� 9
Google Kubernetes Engine���������������������������������������������������������������������������������������������������� 12
Google Cloud Storage������������������������������������������������������������������������������������������������������������ 15
Google BigQuery�������������������������������������������������������������������������������������������������������������������� 18
Google Cloud SQL������������������������������������������������������������������������������������������������������������������ 20
Google Cloud Spanner����������������������������������������������������������������������������������������������������������� 23
Google Cloud Dataflow���������������������������������������������������������������������������������������������������������� 26
Vertex AI�������������������������������������������������������������������������������������������������������������������������������� 28
Google Cloud Translation API������������������������������������������������������������������������������������������������� 30
Overview of Java and Its Capabilities����������������������������������������������������������������������������������������� 31
The Benefits of Using GCP for Application Development������������������������������������������������������������ 32
Overview of Microservices���������������������������������������������������������������������������������������������������������� 33
Summary������������������������������������������������������������������������������������������������������������������������������������ 35

Chapter 2: Setting Up the Development Environment��������������������������������������������� 37


Installing the GCP SDK and Java Development Kit���������������������������������������������������������������������� 38
Installing Java (Oracle) JDK��������������������������������������������������������������������������������������������������� 41
Installing Java Open JDK������������������������������������������������������������������������������������������������������� 41
Creating a GCP Project and Setting Up Credentials�������������������������������������������������������������������� 42
iii
Table of Contents

Creating a Project������������������������������������������������������������������������������������������������������������������ 42
Setting Up Credentials����������������������������������������������������������������������������������������������������������� 43
Setting Up an IDE and Configuring a GCP Plugin������������������������������������������������������������������������ 48
Configuring the GCP Plugin��������������������������������������������������������������������������������������������������� 48
Summary������������������������������������������������������������������������������������������������������������������������������������ 49

Chapter 3: Google App Engine�������������������������������������������������������������������������������� 51


Why Use Google App Engine?����������������������������������������������������������������������������������������������������� 52
Use Case of Google App Engine��������������������������������������������������������������������������������������������� 52
Understanding the Google App Engine Runtime and Service Options���������������������������������������� 53
GAE Runtime�������������������������������������������������������������������������������������������������������������������������� 53
GAE Service Options�������������������������������������������������������������������������������������������������������������� 54
Building a Web Application for GAE��������������������������������������������������������������������������������������������� 56
Creating a Sample Web Application��������������������������������������������������������������������������������������� 56
Deploying a Web Application������������������������������������������������������������������������������������������������� 60
Deploying a Java Web Application����������������������������������������������������������������������������������������� 64
Setting Firewall and Security Considerations������������������������������������������������������������������������ 65
Scaling and Optimizing App Engine Applications������������������������������������������������������������������������ 69
Setting Up Manual and Autoscaling in GAE��������������������������������������������������������������������������� 71

Chapter 4: Data Storage in Google Cloud���������������������������������������������������������������� 73


Understanding the Various Storage Options in GCP�������������������������������������������������������������������� 74
Cloud Storage������������������������������������������������������������������������������������������������������������������������ 75
Cloud SQL������������������������������������������������������������������������������������������������������������������������������ 77
Cloud Spanner����������������������������������������������������������������������������������������������������������������������� 79
Cloud Bigtable����������������������������������������������������������������������������������������������������������������������� 83
Cloud Datastore��������������������������������������������������������������������������������������������������������������������� 85
Cloud Memorystore��������������������������������������������������������������������������������������������������������������� 89
Cloud SQL vs. Cloud Spanner������������������������������������������������������������������������������������������������ 93
Cloud Spanner vs. Cloud Datastore��������������������������������������������������������������������������������������� 96
Using Java to Interact with Cloud Storage�������������������������������������������������������������������������������� 102
Java Code for Creating a Bucket and Uploading the File to the Bucket������������������������������ 103
Java Code for Downloading Files from a Cloud Storage Bucket����������������������������������������� 105
iv
Table of Contents

Java Code for Managing Files in a Cloud Storage Bucket��������������������������������������������������� 106


Using Cloud Storage for File Storage in a Java Application������������������������������������������������������ 107
Setting Up a GCS Bucket����������������������������������������������������������������������������������������������������� 108
Authenticating with GCS������������������������������������������������������������������������������������������������������ 109
Creating a Service Account, Downloading It, and Using It in the Project����������������������������� 110
Summary���������������������������������������������������������������������������������������������������������������������������������� 117

Chapter 5: Google Cloud SQL�������������������������������������������������������������������������������� 119


Automatic Backup of Cloud SQL Database������������������������������������������������������������������������������� 120
Configuring Automatic Backup�������������������������������������������������������������������������������������������� 121
Automatic Software Updates of Database Software to the Latest Version������������������������������� 122
High Availability of Google Cloud SQL��������������������������������������������������������������������������������������� 123
Cloud SQL Read Replicas���������������������������������������������������������������������������������������������������������� 124
Cloud SQL: Automatic Failover�������������������������������������������������������������������������������������������������� 125
Multizone Deployment��������������������������������������������������������������������������������������������������������� 126
Cloud SQL: Scalability��������������������������������������������������������������������������������������������������������������� 126
Cloud SQL: Security������������������������������������������������������������������������������������������������������������������� 127
Authentication��������������������������������������������������������������������������������������������������������������������� 128
Authorization����������������������������������������������������������������������������������������������������������������������� 129
Encryption��������������������������������������������������������������������������������������������������������������������������� 129
Private IP����������������������������������������������������������������������������������������������������������������������������� 130
Audit Log����������������������������������������������������������������������������������������������������������������������������� 131
Cloud SQL: Monitoring and Logging������������������������������������������������������������������������������������������ 132
Monitoring��������������������������������������������������������������������������������������������������������������������������� 132
Logging�������������������������������������������������������������������������������������������������������������������������������� 132
Integration of Cloud SQL with Other GCP Services������������������������������������������������������������������� 133
Integration of Cloud SQL with Cloud Storage���������������������������������������������������������������������� 134
Integration of Cloud SQL with Cloud Load Balancing���������������������������������������������������������� 135
Integration of Cloud SQL with IAM��������������������������������������������������������������������������������������� 136
Integration of Cloud SQL with Cloud Data Loss Prevention������������������������������������������������� 137
Integration of Cloud SQL with Cloud Dataflow��������������������������������������������������������������������� 138
Integration of Cloud SQL with Cloud App Engine����������������������������������������������������������������� 139

v
Table of Contents

Understanding the SQL/NoSQL Options in GCP������������������������������������������������������������������������� 140


Benefits of Cloud SQL Instead of a Self-Managed, On-­Premises Database������������������������ 141
Use Case for Cloud SQL������������������������������������������������������������������������������������������������������� 142
Situations When Cloud SQL Is the Best Choice�������������������������������������������������������������������� 144
Using Java to Interact with Cloud SQL�������������������������������������������������������������������������������������� 145
Creating Tables in Cloud SQL Using Java���������������������������������������������������������������������������� 146
Inserting Data into Cloud SQL Tables Using Java���������������������������������������������������������������� 147
Running Queries on a Cloud SQL Instance Using Java�������������������������������������������������������� 148
Using Cloud SQL for Data Storage in a Java Application����������������������������������������������������������� 149
Summary���������������������������������������������������������������������������������������������������������������������������������� 153

Chapter 6: Advanced GCP Services���������������������������������������������������������������������� 155


GCP Advanced Services������������������������������������������������������������������������������������������������������������ 155
Big Data and Machine Learning������������������������������������������������������������������������������������������ 155
Kubernetes and Containers������������������������������������������������������������������������������������������������� 156
Security and Identity����������������������������������������������������������������������������������������������������������� 157
Popular GCP Advanced Services����������������������������������������������������������������������������������������������� 157
Cloud Pub/Sub��������������������������������������������������������������������������������������������������������������������� 157
Cloud Dataflow�������������������������������������������������������������������������������������������������������������������� 163
Cloud Dataproc�������������������������������������������������������������������������������������������������������������������� 168
Cloud Functions������������������������������������������������������������������������������������������������������������������� 174
Summary���������������������������������������������������������������������������������������������������������������������������������� 180

Chapter 7: Deployment and Scaling��������������������������������������������������������������������� 181


Deploying a Java Application on GCP Using Various Options���������������������������������������������������� 181
Deploying a Java Application on App Engine Manually������������������������������������������������������� 183
Deploying a Java Application on GAE Automatically������������������������������������������������������������ 184
Deploying a Java Application on GKE���������������������������������������������������������������������������������� 185
Deploying a Java Application on GKE Through Automation������������������������������������������������� 186
Deploying a Java Application on Google Compute Engine��������������������������������������������������� 189
Deploying a Containerized Java Application on Google Cloud Run�������������������������������������� 194
Deploying a Java Application on Cloud Functions��������������������������������������������������������������� 196

vi
Table of Contents

Scaling a Java Application on GCP�������������������������������������������������������������������������������������������� 199


Steps for Scaling Applications��������������������������������������������������������������������������������������������� 200
Scaling a Java Application on Google Kubernetes Engine��������������������������������������������������� 201
Scaling a Java Application on App Engine��������������������������������������������������������������������������� 202
Scaling a Java Application on Compute Engine������������������������������������������������������������������� 202
Monitoring Performance and Autoscaling��������������������������������������������������������������������������� 203
Scaling in Serverless����������������������������������������������������������������������������������������������������������� 204
Summary���������������������������������������������������������������������������������������������������������������������������������� 205

Chapter 8: Troubleshooting and Optimization������������������������������������������������������ 207


Troubleshooting Java Applications on GCP������������������������������������������������������������������������������� 209
Example 1: Slow Response Time����������������������������������������������������������������������������������������� 211
Example 2: Exception Handling������������������������������������������������������������������������������������������� 211
Example 3: Memory Leak���������������������������������������������������������������������������������������������������� 212
Optimizing a Java Application Running on GCP������������������������������������������������������������������������ 213
Example 1: Improving Response Time��������������������������������������������������������������������������������� 214
Example 2: Improving Reliability����������������������������������������������������������������������������������������� 215
Example 3: Improving Scalability���������������������������������������������������������������������������������������� 216
Example 5: Improving Performance������������������������������������������������������������������������������������ 218
Tips and Tricks for Optimizing Performance����������������������������������������������������������������������������� 219
Architecture Concepts��������������������������������������������������������������������������������������������������������� 222
Summary���������������������������������������������������������������������������������������������������������������������������������� 233

Chapter 9: Conclusion������������������������������������������������������������������������������������������� 235


Summary of Key Takeaways����������������������������������������������������������������������������������������������������� 236
Additional Resources���������������������������������������������������������������������������������������������������������������� 237
Next Steps for Learning More About GCP and Java Development�������������������������������������������� 239
Summary���������������������������������������������������������������������������������������������������������������������������������� 240

Index��������������������������������������������������������������������������������������������������������������������� 241

vii
About the Author
Ashutosh Shashi is a TOGAF 9 certified enterprise architect,
a seasoned software engineer, and a cloud architect with
more than 18 years of experience in the industry. He has
worked on multiple projects using various technologies and
platforms, from small startups to large enterprise systems.
He has helped many organizations design and build robust
and scalable applications on Google Cloud Platform (GCP).
Apart from GCP, he has extensive experience and expertise
in AWS and Azure cloud platforms. Ashutosh lives in Duluth,
Georgia. He enjoys hiking and spending time with his family
in his free time. He also loves to travel and explore different
cultures.

ix
About the Technical Reviewer
Chandra Rajasekharaiah is a technology leader, cloud transformation enthusiast,
supply chain specialist, and published author. He has led multimillion-dollar enterprise
initiatives in technology transformation and cloud migration. He has helped enterprises
modernize giant legacy monoliths to microservices-based applications and has
deployed on the cloud and across multiple datacenters. He is currently a distinguished
engineer for a large automotive parts retailer, focusing on modernizing supply chains.

xi
Introduction
As a software architect with many years of experience, I have worked with various cloud
platforms, including Google Cloud Platform (GCP). I have noticed that many developers
and architects face challenges when designing and building applications on GCP using
Java. They need help understanding the various services offered by GCP, which ones will
be best suited for their application, and how to use them effectively to build robust and
scalable applications.
This realization prompted me to write this book as a comprehensive guide for
developers, architects, and technical managers looking to design and build applications
using Java for GCP. This book is based on my practical experience working with GCP and
aims to bridge the gap between theory and practice, providing readers with a hands-on
approach to learning how to build applications on GCP. This approach allows developers
and architects to better understand GCP and its services and enables them to design and
build better applications.
This book introduces GCP, outlining its various features, capabilities, and benefits.
Then, I explain how you can choose the best tool on GCP to develop scalable, reliable,
and cost-effective applications and how it can help organizations accelerate their digital
transformation efforts.
This practical guide will provide developers and architects with the tools and
knowledge they need to design and build applications on GCP using Java. Through
this book, I hope readers overcome any challenges they encounter when using GCP
and that they gain the confidence and skills they need to build robust and scalable Java
applications.

Source Code
All source code used in this book can be downloaded from ­https://github.com/Apress/
designing-applications-google-cloud-platform.

xiii
CHAPTER 1

Introduction
This chapter will introduce Google Cloud Platform (GCP) services and how they can
be used to build, deploy, and scale applications. This chapter will guide you in setting
up a GCP environment and give a brief overview of the most common GCP services. By
the end of this chapter, you will be able to understand the basics of GCP, create a GCP
project, and know which GCP services you can use to build and deploy applications.
You’ll want to create a login on Google or use your existing Google account to start a
free GCP trial to follow along with the exercises in this book.

Start a Free Trial on GCP


To start a free trial on GCP, you can follow these steps:

1. Go to the GCP website at https://cloud.google.com/ and click


the Start Free button at the top-right corner of the web page.
2. Sign in using your Google account or create a new one if you don’t
have a Google account.
3. Fill out the details with your personal and billing information. You
must provide a valid credit card to verify your identity, but you will
get charged if you upgrade to a paid account.
4. Review the terms and conditions of the free trial and click the
“Agree and continue” button.

5. Once you have created your account, you can start using GCP
services for free for 90 days. You will receive $300 in credits for
any GCP service during this time. Remember that some services
may not be eligible for the free trial, so check the details before
using them.

1
© Ashutosh Shashi 2023
A. Shashi, Designing Applications for Google Cloud Platform, https://doi.org/10.1007/978-1-4842-9511-3_1
Chapter 1 Introduction

6. Explore the GCP dashboard and try some of the services.


Many resources are available to help you get started, including
documentation, tutorials, and community forums.

Remember to monitor your usage and billing during the trial period to avoid
unexpected charges. If you decide to upgrade to a paid account, you can do so anytime
by adding a billing account to your project.
Once the trial starts, you can see the trial status and remaining balance at the top of
the GCP console, as shown in Figure 1-1.

Figure 1-1. Monitoring your usage and billing

The GCP project “My First Project” will be created automatically as soon as you start
the free trial. You can create more projects as needed.
A project in GCP is used to organize resources. Each project in GCP has its own set of
resources and billing, and you can track billing based on the project.
In GCP, a project is like a box or a folder containing all the resources, services, and
configurations related to a specific application, system, or workload. A project serves as a
boundary for resources to ensure they are isolated and can be managed independently.
A project organizes resources in GCP, defines resource ownership and access,
manages billing and usage, and enables collaboration among team members. You can
think of a project as a logical grouping of resources, which makes it easier to manage,
secure, and monitor them.
Figure 1-2 shows a single GCP project that contains Compute Engine (VMs) that
can run applications and software, Cloud Storage that can store files and data, Cloud
SQL that provides managed database, a load balancer that can distribute traffic between
VMs, two firewall rules that can control access to the VMs, and a DNS server that can
map domain names to the IP addresses, billing service allows you to manage spending
and costs, IAM allows you to control access to your resources and services by adding or
removing users, groups, or roles.

2
Chapter 1 Introduction

Figure 1-2. A GCP project

It is not possible to use GCP without a project. You must create at least one project
to access GCP services and resources. When you sign up for a GCP account, you
automatically create a default project, which is used for billing and other administrative
purposes. You can also create additional projects for your workloads and applications.
Projects in GCP can be linked to each other in different ways. For example, you
can link projects to enable shared resources, such as a shared VPC network or a billing
account. You can also link projects to control access to resources across multiple projects
or to grant permissions to users or service accounts.
Here are some key things to know about GCP projects:

• Projects must use GCP services and resources.

• Each project has a globally unique ID, name, and number across all
GCP services.

• A project can contain multiple resources, such as compute instances,


storage buckets, and databases.

• Projects can be organized into folders and hierarchies to manage


resource ownership and access.

3
Chapter 1 Introduction

• Billing and usage are managed at the project level.

• Projects can be linked to each other to enable shared resources and


access control.

• Each project has its own Identity and Access Management (IAM)
policies to control who can access and manage the project’s
resources.

• You can configure monitoring, logging, and alerting for each project
to get insights into its health and performance.

• Projects can be used for different purposes, such as development,


testing, staging, or production.

• You can create and manage projects using the GCP console, the
Cloud SDK, or the API.

• Projects can be deleted when they are no longer needed, but you
need to remove all the associated resources and data before doing so.

When working with GCP projects, keeping track of their configuration and usage and
following best practices for security, scalability, and cost optimization are important.
You should also consider using tools such as Terraform, Cloud Deployment Manager, or
Kubernetes Engine to manage your infrastructure as code and to ensure consistency and
reproducibility across multiple projects and environments.

Creating a New Project


To create a new project, click the existing project (My First Project) in the top-left corner
of the GCP console. A window like the one shown in Figure 1-3 will appear.

4
Chapter 1 Introduction

Figure 1-3. Selecting a project

You can click the New Project button in the top-right corner to create a new project.
A window like the one shown in Figure 1-4 will appear.

Figure 1-4. Creating a new GCP project

Here you can see the message that you have only 24 projects remaining. By default,
GCP allows you to create 25 projects; if you need to create more projects, you can request
to increase the quota. The name of the project must be between 4 and 30 characters.

5
Chapter 1 Introduction

Note A quota in GCP is a flexible limit, but a limit is a hard cap on the amount of
a resource you can use.

You can name the project as you choose to reflect the purpose of the project.
The project ID is the globally unique identifier for your project. You cannot change
the project ID after the project is created. The projects can be associated with the
organization you can select for location. If your project name is globally unique, the
project ID will be the same as a project name, or else the project ID can be created
automatically by adding numbers in front of the project name. You can set your custom
project name project ID by clicking in front of the project ID, as shown in Figure 1-5.

Figure 1-5. Project ID for GCP project

After you click Create, you will see it in your activity list. Whenever you create any
resource in GCP, you can see it in your activity list, as shown in Figure 1-6.

6
Chapter 1 Introduction

Figure 1-6. GCP project activities

For example, if you use GCP for the EdTech application, you can create a project
for all your development environments and another project for all the production
environments. You can have a separate project for analytics and marketing. By doing
that, you can easily see the expenses for nonprod, prod, and analytics for your EdTech
applications.
Once the new project is created, you can choose the project you are working on
by clicking the project button at the top-left corner of the GCP console, as shown in
Figure 1-7. If you don’t see your project on the Recent tab of the window, you can click
the All tab to see all the projects. To see the project, you need permission for it.

7
Chapter 1 Introduction

Figure 1-7. Recent projects

Select the services from the GCP console in the left pane or search for the service
name with the top search button, like the one shown in Figure 1-8.

Figure 1-8. Searching for GCP services

Overview of GCP and Its Services


GCP architecture refers to the design and layout of infrastructure and services that make
up Google Cloud Platform. At a high level, the GCP architecture includes computing,
storage, database, networking, and security. It is designed to be scalable, reliable, and
secure. It uses multiple layers of abstraction and isolation to ensure that applications

8
Chapter 1 Introduction

and services can run independently and securely on the same infrastructure. It also
provides tools and services that allow developers to automate development, monitor
performance, and troubleshoot issues in real time.
GCP regions and zones are the specific geographic locations of GCP resources. A GCP
region is a specific location where resources are hosted. The regions comprise one or
more availability zones (AZs), physically separated locations called data centers. AZs are
designed to be independent of each other, so if one AZ experiences an outage, it does
not affect the availability of resources in another AZ within the same region. GCP regions
and zones are important because they affect the performance and availability of your
applications. When you create a GCP resource, you need to specify the region and zone
where you want to create the resource.
GCP pricing is based on the pay-as-you-go model, meaning that you pay only for the
resources and services you use. The cost depends on several factors, including the type
and amount of resources used, the duration of use, and the location of resources. The
price may vary by region and AZ, with some regions and AZs costing more than others.
GCP provides committed use discounts by committing the use of Compute Engine and
cloud storage for a certain amount of uses over a period of time.
GCP provides various services, including computing, storage, networking, big data,
machine learning, the Internet of Things (IoT), security, and application development.
Let’s run through some of the most popular services.

Google Compute Engine


Google Compute Engine (GCE) is the part of GCP that provides scalable, highly
available, and high-performance virtual machines for running applications and services.
It enables customers to create, configure, and manage virtual machines (VMs) running
on the Google infrastructure. GCE offers a range of configurable options, including
customizable machine types, disk storage options, and operating systems, including
popular Linux distributions and Microsoft Windows. GCE also provides advanced
networking features such as load balancing, firewalls, and automatic backups, making it
an ideal platform for deploying and managing applications and services.
The integration of GCE with other GCP services, such as Google Kubernetes Engine,
Google Cloud Storage, Google Cloud SQL, and Cloud Pub/Sub, is not limited but can
depend on the network connectivity and configuration. The ability of integration makes
it easy to build complex, multitier applications.

9
Chapter 1 Introduction

Let’s look at an example of a GCE instance in a different region or AZ than the other
GCP services it needs to communicate with. In this case, there may be latency and
performance issues. If network configuration is not set up properly, it can affect the
connectivity and integration between GCE instances and the other GCP services. To
optimize integration between GCE instances and the other GCP service, it is important
to consider network connectivity and configuration as part of your architecture design,
which can include selecting the appropriate region and availability zone, setting up
proper network configuration, and using services such as load balancing and cloud CDN
to improve performance and availability.
When you search and select GCE the first time, you must enable it by clicking the
Enable button, as shown in Figure 1-9. You will not see this option if you are part of the
organization and it is already enabled for the selected project.

Figure 1-9. Enabling Compute Engine for first time

When you click the Enable button, you will see it being enabled, as shown in
Figure 1-10.

Figure 1-10. Enabling the Compute Engine API

10
Chapter 1 Introduction

Enabling the Compute Engine API will take some time.


Once the API is enabled, you will see the Compute Engine dashboard, as shown in
Figure 1-11. From here, you can create virtual machines. By clicking Create Instance,
you can create a VM instance. You can migrate your VMs directly from on-prem or other
clouds using Google Cloud’s Migrate to Virtual Machines feature. Supported sources
include on-prem VMware, Amazon EC2, and Microsoft Azure. To migrate, you can click
the Import VM button. You can see these two buttons at the top of the screen.

Figure 1-11. Compute Engine dashboard

There are various configurations and instance options available to create a compute
instance. Importing an existing VM is a separate topic outside this book’s scope.
You can create a VM with the desired configurations such as machine type, operating
system, disk type, and size. The best practice is to use a VM template to create a VM for a
similar purpose. You can choose the ready-to-go deployable VMs from the marketplace;
the Google Cloud Marketplace is a platform for discovering, deploying, and managing
preconfigured software solutions on the Google Compute Engine. You will see these
options when you click the “Create an instance” button, as shown in Figure 1-12.

11
Chapter 1 Introduction

Figure 1-12. Creating an instance

GCE can be used for variety of use cases, including batch processing workloads
such as rendering and data processing, high-performance computing workloads such
as scientific simulation and machine learning, big data processing such as processing
and analyzing large datasets, and high-performance, scalable infrastructure for gaming
workloads.

Google Kubernetes Engine


Google Kubernetes Engine (GKE) is a fully managed Kubernetes service offered by GCP
that makes it easy to deploy, manage, and scale containerized applications using Google
infrastructure. GKE provides a complete solution for deploying, managing, and scaling
containers, allowing developers to focus on writing code and delivering features. It
also provides features such as automatic upgrades, automatic scaling, and self-healing
so that developers can focus on their applications, not the underlying infrastructure.
Additionally, GKE integrates with other GCP services, such as cloud load balancing,
cloud Operations Suite, cloud monitoring and Logging, and cloud DNS, making it easy to
manage a complete application stack in a single platform.

12
Chapter 1 Introduction

A containerized application is an application that has been packaged with all of


its dependencies into a single unit called a container. Containers are isolated from
each other and the host operating system, making them a more efficient and secure
way to deploy applications. Think of a container as a box containing everything your
application needs to run, such as the code, libraries, and settings. This makes it easy
to deploy applications to different environments, such as on-premises, in the cloud,
or in a hybrid environment. Containers are also more efficient than traditional virtual
machines. Virtual machines require a full operating system, while containers require
only the application’s resources. This can save money on hardware costs and improve
performance. Containers are more secure than traditional virtual machines. Containers
are isolated from each other and the host operating system, making it more difficult for
malware to spread, which makes containers an ideal choice for applications that need to
be highly secure.
Like the GCE, you need to enable the Kubernetes Engine API if you are using it for
the first time. Figure 1-13 shows the Enable button.

Figure 1-13. Enabling the Kubernetes Engine API

After you click the Enable button, GCP will take some time to enable it. After it’s
enabled, you will see the GKE dashboard. Again, if you are part of the organization
and GKE is already enabled for the given project, you will see the GKE dashboard
straightaway.
In the left pane, you will see options for the cluster, Workload, Services and Ingress,
Applications, Secret and ConfigMaps, etc.

13
Chapter 1 Introduction

As shown in Figure 1-14, GCP provides two options to create a Kubernetes cluster
and deploy a container: a pay-per-pod Kubernetes cluster called Autopilot, where GKE
manages your nodes with minimal configuration required. The other option is a pay-per-­
node Kubernetes cluster called Standard, where you configure and manage your nodes.

Figure 1-14. Creating a Kubernetes cluster

You can have multiple clusters with different configurations for different types of
workloads. For example, you might create one GKE cluster for a production application
that requires high availability and scalability, with multiple nodes spread across multiple
zones. You might create another GKE cluster for a development or testing environment
with fewer nodes and simpler configurations, as illustrated in Figure 1-15.

14
Chapter 1 Introduction

Figure 1-15. GKE clusters

You can also create GKE clusters with different machine types, network
configurations, and storage options, depending on the specific requirements of your
workloads. This allows you to optimize your GKE clusters for performance, cost-­
effectiveness, and other factors. You might have one GKE cluster for batch processing
workloads and another GKE cluster for web applications. This can help prevent resource
contention and improve overall performance and reliability.

Google Cloud Storage


Google Cloud Storage (GCS) is a scalable and highly durable object storage service
provided by Google Cloud Platform. It provides customers with high-performance
access to unstructured data, making it an ideal solution for storing and serving large
amounts of data such as images, videos, backups, backups, and logs. Google Cloud

15
Chapter 1 Introduction

Storage is a unified object storage that provides a single platform for unstructured
data, providing customers with a single repository for all their data. It provides high
performance and scalability, making it ideal for demanding applications, including
media and entertainment, gaming, and scientific computing. With Google Cloud
Storage, customers can easily store and access their data wherever they need it, with the
peace of mind that their data is securely stored and always available.
Cloud Storage provides a way to store all of your files and objects. All the storage is
arranged inside the bucket. You can create different buckets for different purposes, and
then you can create folders and subfolders in them to place the files. Figure 1-16 shows
the Cloud Storage dashboard.

Figure 1-16. Cloud Storage dashboard

From the Cloud Storage dashboard, you can create buckets. Bucket names are
globally unique. No two bucket names can be the same globally. If you are deleting your
bucket and want to create a new bucket with the same name you are deleting right now,
you can do that.
The bucket name should not be carrying any sensitive information, as bucket names
are publicly visible. You can add labels to your bucket to group together similar buckets.

16
Chapter 1 Introduction

Figure 1-17. Creating a Cloud Storage bucket

While creating a bucket, as shown in Figure 1-17, you can choose the location of the
bucket as single or multiregion. You can choose the storage class, access control, who
can access it, and whether to use data encryption to protect your data. In GCP, you can
do encryption either with Google Managed Key or with Customer Managed Key.
Choose the appropriate storage class while creating a storage bucket for your data.
GCS offers four storage classes: standard, nearline, coldline, and archive. Each storage
class has its own set of characteristics, such as performance, availability, durability, and
cost. While creating a bucket, you can choose a storage class to set the default storage
class for the bucket, as shown in Figure 1-18.

17
Chapter 1 Introduction

Figure 1-18. Choosing a storage class

Standard storage is the default storage class and is the most expensive. If you need
to access data frequently and quickly, this storage class is best for you. For example, you
might use the standard storage class for customer orders and invoices, as you need to be
able to access this data quickly and frequently.
Nearline storage is less expensive than standard storage and is a good choice for data
that needs to be accessed occasionally but is not critical for your business. For example,
you can use nearline storage to back up your website data.
Coldline storage is less expensive than nearline and standard storage and is a good
choice for data accessed infrequently and not critical for your business. For example, you
might use coldline storage for financial records that are accessed only once a quarter for
reporting purposes.
Archive storage is the lowest-cost storage class with the highest access cost and is
best for rarely or never accessed data. For example, you might choose the archive storage
class for backups that are kept for legal or regulatory reasons.

Google BigQuery
Google BigQuery (GBQ) is a fully managed, serverless, cloud data warehouse that
enables super-fast SQL queries using the processing power of Google’s infrastructure.
It allows organizations to analyze large amounts of data quickly and cost-effectively,
making it a popular choice for big data analytics. BigQuery integrates with various

18
Another random document with
no related content on Scribd:
que lo que su padre Fileno había
dicho era verdad, y cuanto más
imaginó en ello, más lo tuvo por
cierto. Tanto que bravo y
desesperado, ansí por el engaño
que de Silveria había recebido
como por el que sospechaba que
yo le había hecho, se fué de la
aldea y nunca más ha parescido.
Yo que supe de su partida y la
causa della por relación de
algunos pastores amigos suyos, á
quien él había dado larga cuenta
de todo, me salí del aldea por
buscarle, y mientras viva no
pararé hasta hallar mi dulce
esposo, para darle mi disculpa,
aunque sepa después morir á sus
manos. Mucho ha que ando
peregrinando en esta demanda, y
por más que en todas las
principales aldeas y cabañas de
pastores he buscado, jamás la
fortuna me ha dado noticia de mi
Montano. La mayor ventura que
en este viaje he tenido fué, que
dos días después que partí de mi
aldea hallé en un valle la traidora
Silveria, que sabiendo el
voluntario destierro de Montano,
iba siguiéndole, por descubrirle la
traición que le había hecho y
pedirle perdón por ella,
arrepentida de haber cometido
tan horrenda alevosía. Pero hasta
entonces no le había hallado, y
como á mí me vido, me contó
abiertamente cómo había
passado el negocio, y fué para mí
gran descanso saber la manera
con que se nos había hecho la
traición. Quise dalle la muerte con
mis manos, aunque flaca mujer,
pero dejé de hacerlo, porque sólo
ella podía remediar mi mal
declarando su misma maldad.
Roguéle con gran priessa fuesse
á buscar á mi amado Montano
para dalle noticia de todo el
hecho, y despedíme della para
buscarle yo por otro camino.
Llegué hoy á este bosque, donde
convidada de la amenidad y
frescura del lugar, hice assiento
para tener la siesta; y pues la
fortuna acá por mi consuelo os ha
guiado, yo le agradezco mucho
este favor, y á vosotros os ruego,
que pues es ya casi medio día, si
possible es, me hagáis parte de
vuestra graciosa compañía,
mientras durare el ardor del sol,
que en semejante tiempo se
muestra riguroso. Diana y
Marcelio holgaron en extremo de
escuchar la historia de Ismenia y
saber la causa de su pena.
Agradesciéronle mucho la cuenta
que les había dado de su vida, y
diéronle algunas razones para
consuelo de su mal,
prometiéndole el possible favor
para su remedio. Rogáronle
también que fuesse con ellos á la
casa de la sabia Felicia, porque
allí sería possible hallar alguna
suerte de consolación. Fueron
assí mesmo de parescer de
reposar allí, en tanto que durarían
los calores de la siesta, como
Ismenia había dicho. Pero como
Diana era muy plática en aquella
tierra, y sabía los bosques,
fuentes, florestas, lugares
amenos y sombríos della, les dijo
que otro lugar había más ameno y
deleitoso que aquel, que no
estaba muy lejos, y que fuessen
allá, pues aún no era llegado el
medio día. De manera que
levantándose todos, caminaron
un poco espacio, y luego llegaron
á una floresta donde Diana los
guió; y era la más deleitosa, la
más sombría y agradable que en
los más celebrados montes y
campañas de la pastoral Arcadia
puede haber. Había en ella muy
hermosos alisos, sauces y otros
árboles, que por las orillas de las
cristalinas fuentes, y por todas
partes con el fresco y suave
airecillo blandamente movidas,
deleitosamente murmuraban. Allí
de la concertada harmonía de las
aves, que por los verdes ramos
bulliciosamente saltaban, el aire,
tan dulcemente resonaba, que los
ánimos, con un suave regalo,
enternescia. Estaba sembrada
toda de una verde y menuda
hierba, entre la cual se
levantaban hermosas y variadas
flores, que con diversos matices
el campo dibujando, con suave
olor el más congojado espíritu
recreaban. Allí solían los
cazadores hallar manadas
enteras de temerosos ciervos, de
cabras montesinas y de otros
animales, con cuya prisión y
muerte se toma alegre
pasatiempo. Entraron en esta
floresta siguiendo todos á Diana,
que iba primera y se adelantó un
poco para buscar una espessura
de árboles, que ella para su
esposo en aquel lugar tenía
señalada, donde muchas veces
solía recrearse. No habían
andado mucho, cuando Diana
llegando cerca del lugar que ella
tenía por el más ameno de todos,
y donde quería que tuviessen la
siesta, puesto el dedo sobre los
labios, señaló á Marcelio y á
Ismenia que viniessen á espacio y
sin hacer ruido. La causa era,
porque había oído dentro aquella
espessura cantos de pastores. En
la voz le parescieron Tauriso y
Berardo, que por ella entrambos
penados andaban, como está
dicho. Pero por sabello más
cierto, llegándose más cerca un
poco por entre unos acebos y
lantiscos, estuvo acechando por
conoscellos, y vido que eran ellos
y que tenían allí en su compañía
una muy hermosa dama, y un
preciado caballero, los cuales,
aunque parescían estar algo
congojados y mal tratados del
camino, pero todavía en el gesto
y disposición descubrían su valor.
Después de haber visto los que
allí estaban, se apartó, por no ser
vista. En esto llegaron Marcelio é
Ismenia, y todos juntos se
sentaron tras unos jarales, donde
no podían ser vistos y podían oir
distincta y claramente el cantar de
los pastores, cuyas voces, por
toda la floresta resonando,
movían concertada melodía,
como oiréis en el siguiente libro.

Fin del libro segundo.


LIBRO TERCERO
DE DIANA ENAMORADA

La traición y maldad de una


ofendida y maliciosa mujer suele
emprender cosas tan crueles y
abominables, que no hay ánimo
del más bravo y arriscado varón
que no dudasse de hacerlas y no
temblase de solo pensarlas. Y lo
peor es que la Fortuna es tan
amiga de mudar los buenos
estados, que les da á ellas
cumplido favor en sus empresas;
pues sabe que todas se
encaminan á mover extrañas
novedades y revueltas, y vienen á
ser causa de mil tristezas y
tormentos. Gran crueldad fue la
de Felisarda en ser causa que un
padre con tan justa, aunque
engañosa causa, aborresciesse
su propio hijo, y que un marido
con tan vana y aparente
sospecha desechasse su querida
mujer, pero mayor fue la ventura
que tuvo en salir con su fiero y
malicioso intento. No sirva esto
para que nadie tenga de las
mujeres mal parescer, si no para
que viva cada cual recatado,
guardándose de las semejantes á
Felisarda, que serán muy pocas;
pues muchas dellas son dechado
del mundo y luz de vida, cuya fe,
discreción y honestidad meresce
ser con los más celebrados
uersos alabada. De lo cual da
claríssima prueba Diana y
Ismenia, pastoras de señalada
hermosura y discreción, cuya
historia publica manifiestamente
sus alabanzas. Pues prosiguiendo
en el discurso della, sabréis que
cuando Marcelio y ellas
estuvieron tras los jarales
assentadas, oyeron que Tauriso y
Berardo cantaban desta manera:

Terços esdruccioles.

BERARDO
Tauriso, el fresco viento, que
alegrándonos
murmura entre los árboles
altíssimos,
la vista y los oídos
deleitándonos;
Las chozas y sombríos
ameníssimos;
las cristalinas fuentes, que
abundancia
derraman de licores
sabrosíssimos;
La colorada flor, cuya
fragrancia
á despedir bastara la
tristicia,
que hace al corazón más
fiera instancia:
No vencen la braveza y la
malicia
del crudo rey, tan áspero y
mortífero,
cuyo castigo es pura sin
justicia.
Ningún remedio ha sido
salutífero
á mi dolor, pues siempre
enbraveciéndose
está el veneno y tóxico
pestífero.

TAURISO
Al que en amores anda
consumiéndose,
nada le alegrará: porque
fatígale
tal mal, que en el dolor vive
muriéndose.
Amor le da más penas, y
castígale,
cuando en deleites anda
recreándose,
porque él á suspirar contino
oblígale.
Las veces que está un ánima
alegrándose,
le ofresce allí un dolor, cuya
memoria
hace que luego vuelva á
estar quejándose.
Amor quiere gozar de su
victoria,
y al hombre que venció,
mátale ó préndele,
pensando en ello haber
famosa gloria.
El preso á la fortuna entrega, y
véndele
al gran dolor, que siempre
está matándole,
y al que arde en más
ardiente llama enciéndele.

BERARDO
El sano vuelve enfermo,
maltratándole,
y el corazón alegre hace
tristíssimo,
matando el vivo, el libre
captivándole.
Pues, alma, ya que sabes
cuán bravíssimo
es este niño Amor, sufre y
conténtate
con verte puesta en un lugar
altíssimo.
Rescibe los dolores, y
preséntate
al daño que estuviere
amenazándote,
goza del mal y en el dolor
susténtate.
Porque cuanto más fueres
procurándote
medio para salir de tu
miseria,
irás más en los lazos
enredándote.

TAURISO
En mí halla Cupido más
materia
para su honor, que en
cuantos lamentándose
guardan ganado en una y
otra Hesperia.
Siempre mis males andan
aumentándose,
de lágrimas derramo mayor
copia
que Biblis cuando en fuente
iba tornándose.
Extraño me es el bien, la pena
propia,
Diana, quiero ver, y en vella
muérome,
junto al tesoro estó, y muero
de inopia.
Si estoy delante della, peno y
quiérome
morir de sobresalto y de
cuidado,
y cuando estoy ausente,
desespérome.

BERARDO
Murmura el bosque y ríe el
verde prado,
y cantan los parleros
ruiseñores;
mas yo en dos mil tristezas
sepultado.

TAURISO
Espiran suave olor las tiernas
flores,
la hierba reverdesce al
campo ameno;
mas yo viviendo en ásperos
dolores.

BERARDO
El grave mal de mí me tiene
ajeno,
tanto que no soy bueno
para tener diez versos de
cabeza.

TAURISO
Mi lengua en el cantar siempre
tropieza,
por esso, amigo, empieza,
algún cantar de aquellos
escogidos,
los cuales estorbados con
gemidos,
con lloro entrerompidos,
te hicieron de pastores
alabado.
BERARDO
En el cantar contigo
acompañado,
iré muy descansado;
respóndeme. Mas no sé qué
me cante.

TAURISO
Di la que dice: Estrella
radiante,
ó la de: O triste amante,
ó aquella: No sé como se
decía,
que la cantaste un día
bailando con Diana en el
aldea.

BERARDO
No hay tigre ni leona que no
sea
á compassión movida
de mi fatiga extraña y
peligrosa;
mas no la fiera hermosa,
fiera devoradora de mi vida.

TAURISO
Fiera devoradora de mi vida,
¿quién si no tú estuviera
con la dureza igual á la
hermosura?
y en tanta desventura
¿cómo es possible, ay triste,
que no muera?

BERARDO
¿Cómo es possible, ay triste,
que no muera?
dos mil veces muriendo;
¿mas cómo he de morir
viendo á Diana?
El alma tengo insana:
cuanto más trato Amor,
menos le entiendo.

TAURISO
Cuanto más trato Amor,
menos le entiendo,
que al que le sirve mata,
y al que huyendo va de su
cadena,
con redoblada pena
las míseras entrañas le
maltrata.

BERARDO
Pastora, á quien el alto cielo
ha dado
beldad más que á las rosas
coloradas,
más linda que en Abril el
verde prado,
do están las florecidas
matizadas,
ansí prospere el cielo tu
ganado,
y tus ovejas crezcan á
manadas,
que á mí, que á causa tuya
gimo y muero,
no me muestres el gesto
airado y fiero.

TAURISO
Pastora soberana, que
mirando
los campos y florestas
asserenas,
la nieve en la blancura
aventajando
y en la beldad las frescas
azucenas,
ansí tus campos vayan
mejorando,
y dellos cojan fruto á manos
llenas,
que mires á un pastor, que
en solo verte
piensa alcanzar muy
venturosa suerte.

A este tiempo el caballero y la


dama, que los cantares de los
pastores escuchaban, con gran
cortesía atajaron su canto, y les
hicieron muchas gracias por el
deleite y recreación que con tan
suave y deleitoso música les
habían dado. Y después desto el
caballero vuelto á la dama le dijo:
¿Oiste jamás, hermana, en las
soberbias ciudades música que
tanto contente al oído y tanto
deleite el ánimo como la destos
pastores? Verdaderamente, dijo
ella, más me satisfacen esos
rústicos y pastoriles cantos de
una simple llaneza acompañados,
que en los palacios de reyes y
señores las delicadas voces con
arte curiosa compuestas y con
nuevas invenciones y variedades
requebradas. Y cuando yo tengo
por mejor esta melodía que
aquélla, se puede creer que lo es,
porque tengo el oido hecho á las
mejores músicas que en ciudad
del mundo ni corte de rey
pudiessen hacerse. Que en aquel
buen tiempo que Marcelio servía
á nuestra hermana Alcida,
cantaba algunas noches en la
calle al son de una vihuela tan
dulcemente, que si Orpheo hacía
tan apacible música, no me
espanto que las fieras
conmoviesse, y que la cara
Eurydice de averno escurissimo
sacasse. ¡Ay! Marcelio, ¿dónde
estás agora? ¡Ay! ¿dónde estás,
Alcida? Ay desdichada de mí, que
siempre la fortuna me trae á la
memoria cosas de dolor, en el
tiempo que me ve gozar de un
simple passatiempo! Oyó
Marcelio, que con las dos
pastoras tras las matas estaba,
las razones del caballero y de la
dama, y como entendió que le
nombraron á él y á Alcida, se
alteró. No se fió de sus mesmos
oídos, y estuvo imaginando si era
quizá otro Marcelio y Alcida los
que nombraban. Levantóse presto
de donde assentado estaba, y por
salir de duda, llegándose más, y
acechando por entre las matas,
conosció que el caballero y la
dama eran Polydoro y Clenarda,
hermanos de Alcida. Corrió
súbitamente á ellos, y con los
brazos abiertos y lágrimas en los
ojos, agora á Polydoro, agora á
Clenarda abrazando, estuvo gran
rato, que el interno dolor no le
dejaba hablar palabra. Los dos
hermanos, espantados desta
novedad, no sabían qué les había
acontescido. Y como Marcelio
iba en hábito de pastor, nunca le
conoscieron, hasta que, dándole
lugar los sollozos, y habida
licencia de las lágrimas, les dijo:
¡Oh, hermanos de mi corazón, no
tengo en nada mi desventura,
pues he sido dichoso en veros!
¿Cómo Alcida no está en vuestra
compañía? ¿Está por ventura
escondida en alguna espesura
deste bosque? Sepa yo nuevas
della, si vosotros las sabéis;
remediad por Dios esta mi pena, y
satisfaced á mi deseo. En esto lo
dos hermanos conoscieron á
Marcelio, y abrazados con él,
llorando de placer y dolor, le
decían: ¡Oh venturoso día! ¡oh
bien nunca pensado! ¡oh hermano
de nuestra alma! ¿qué desastre
tan bravo ha sido causa que tú no
goces de la compañía de Alcida ni
nosotros de su vista? ¿por qué
con tan nuevo traje te dissimulas?
¡Ay áspera fortuna! en fin no hay
en ningún bien cumplido
contentamiento. Por otra parte,
Diana é Ismenia, visto que tan
arrebatadamente Marcelio había
entrado donde cantaban los
pastores, fueron allá tras él, y
halláronle passando con Polydoro
y Clenarda la plática que habeis
oído. Cuando Tauriso y Berardo
vieron á Diana, no se puede
encarescer el gozo que recibieron
de tan improvisa vista. Y ansi
Tauriso, señalando con el gesto
y palabras la alegría del corazón,
le dijo: Grande favor es este de la
Fortuna, hermosa Diana, que la
que huye siempre de nuestra
compañía, por casos y succesos
nunca imaginados venga tantas
veces donde nosotros estamos.
No es causa dello la Fortuna,
señalados pastores, dijo Diana,
sino ser vosotros en el cantar y
tañer tan ejercitados, que no hay
lugar de recreación donde no os
hagáis sentir vuestras canciones.
Pero pues aquí llegué sin saber
de vosotros, y el sol toca ya la
raya del medio día, me holgaré de
tener en este deleitoso lugar la
siesta en vuestra compañía, que
aunque me importa llegar con
tiempo á la casa de Felicia, tendré
por bien de detenerme aquí con
vosotros, por gozar de la fresca
vereda y escuchar vuestra
deleitosa música. Por esso
aparejaos á cantar y tañer, y á
toda suerte de regocijo, que no
será bien que falte semejante
placer en tan principal
ajuntamiento. Y vosotros,
generosos caballeros y dama,
poned fin por agora á vuestras
lágrimas, que tiempo ternéis para
contaros las vidas los unos á los
otros y para doleros ó alegraros
de los malos ó buenos sucessos
de fortuna. A todos paresció muy
bien lo dicho por Diana, y ansí en
torno de una clara fuente sobre la
menuda hierba se assentaron.
Era el lugar el más apacible de
aquel bosque y aun de cuantos
en el famoso Parthenio, celebrado
con la clara zampoña del
Neapolitano Syncero pueden
hallarse. Había en él un espacio
casi que cuadrado, que tuviera
como hasta cuarenta passos por
cada parte, rodeado de
muchedumbre de espessíssimos
árboles, tanto que, á la manera de
un cercado castillo, á los que allá
iban á recrearse no se les
concedía la entrada sino por sola
una parte. Estaba sembrado este
lugar de verdes hierbas y
olorosas flores, de los pies de
ganados no pisadas ni con sus
dientes descomedidamente
tocadas. En medio estaba una
limpia y claríssima fuente, que del
pie de un antiquíssimo roble
saliendo, en un lugar hondo y
cuadrado, no con maestra mano
fabricado, mas por la provida
naturaleza allí para tal efecto
puesto, se recogía: haciendo allí
la abundancia de las aguas un
gracioso ajuntamiento, que los
pastores le nombraban la fuente
bella. Eran las orillas desta fuente
de una piedra blanca tan igual,
que no creyera nadie que con
artificiosa mano no estuviesse
fabricada, si no desengañaran la
vista las naturales piedras allí
nascidas, y tan fijas en el suelo
como en los ásperos montes de
fragosas peñas y duríssimos
pedernales. El agua que de
aquella abundantíssima fuente
sobresalía, por dos estrechas
canales derramándose, las
hierbas vecinas y árboles
cercanos regaba, dándoles
continua fertilidad y vida y
sosteniéndolas en muy apacible y
graciosíssima verdura. Por estas
lindezas que tenía esta hermosa
fuente, era de los pastores y
pastoras tan visitada, que nunca
en ella faltaban pastoriles
regocijos. Pero teníanla los
pastores en tanta veneración y
cuenta, que viniendo á ella
dejaban fuera sus ganados, por
no consentir que las claras y
sabrosas aguas fuessen
enturbiadas, ni el ameno
pradecillo de las mal miradas
ovejas hollado ni apascentado. En
torno desta fuente, como dije,
todos se asentaron, y sacando de
los zurrones la necessaria
provissión, comieron con más
sabor que los grandes señores la
muchedumbre y variedad de
curiosos manjares. Al fin de la
cual comida, como Marcelio por
una parte y Polydoro por otra
deseaban por extremo darse y
tomarse cuenta de sus vidas,
Marcelio fue primero á hablar, y
dijo: Razón será, hermanos, que
yo sepa algo de lo que os ha
sucedido después que no me
vistes, que como os veo del padre
Eugerio y de la hermana Alcida
desacompañados, tengo el
corazón alterado, por no saber la
causa dello. A lo cual respondió
Polydoro:
Porque me parece que este lugar
queda muy perjudicado con que
se traten en él cosas de dolor, y
no es razón que estos pastores
con oir nuestras desdichas
queden ofendidos, te contaré con

Вам также может понравиться