OReilly Getting Started with OpenShift (2014).pdf

(7308 KB) Pobierz
Getting Started with OpenShift
Steven Pousty and Katie J. Miller
Getting Started with OpenShift
by Steven Pousty and Katie J. Miller
Copyright © 2014 Red Hat, Inc. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are
also available for most titles (http://my.safaribooksonline.com). For more information, contact our corporate/
institutional sales department: 800-998-9938 or
corporate@oreilly.com.
Editor:
Brian Anderson
Production Editor:
Melanie Yarbrough
Copyeditor:
Charles Roumeliotis
Proofreader:
Rachel Head
March 2014:
First Edition
Cover Designer:
Karen Montgomery
Interior Designer:
David Futato
Illustrator:
Rebecca Demarest
Revision History for the First Edition:
2014-03-26:
First release
See
http://oreilly.com/catalog/errata.csp?isbn=9781491901434
for release details.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly
Media, Inc.
Getting Started with OpenShift,
the cover image of a purple-naped lory, and related trade dress
are trademarks of O’Reilly Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and O’Reilly Media, Inc. was aware of a trademark
claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and authors assume
no responsibility for errors or omissions, or for damages resulting from the use of the information contained
herein.
ISBN: 978-1-491-90143-4
[LSI]
Table of Contents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
1. Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
What Is the Difference Between IaaS, PaaS, and SaaS?
The Three Versions of OpenShift
Choosing the Right Solution for You
Things to Understand
Words You Need to Understand
Technology You Need to Understand
Preliminary Steps
Setting Up the Command-Line Tools
Creating Your First Application
Autoscaling and Why You Should Use It by Default
Reasons to Move to the Paid Tier
Cloning Code to Your Local Machine
Modifying Application Code
Building and Deploying Your Code
Action Hook Scripts
Hot-Deploying Code
Database-Related Cartridges
Nondatabase Cartridges
Cron
Continuous Integration
1
2
3
4
4
5
2. Creating Applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
9
9
11
14
15
3. Making Code Modifications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
17
18
20
21
22
25
27
27
29
4. Adding Application Components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
iii
Zgłoś jeśli naruszono regulamin