Table of Contents
Preface vii
1 Introduction 1
What Is the Difference Between IaaS, PaaS, and SaaS? 1
The Three Versions of OpenShift 2
Choosing the Right Solution for You 3
Things to Understand 4
Words You Need to Understand 4
Technology You Need to Understand 5
2 Creating Applications 9
Preliminary Steps 9
Setting Up the Command-Line Tools 9
Creating Your First Application 11
Autoscaling and Why You Should Use It by Default 14
Reasons to Move to the Paid Tier 15
3 Making Code Modifications 17
Cloning Code to Your Local Machine 17
Modifying Application Code 18
Building and Deploying Your Code 20
Action Hook Scripts 21
Hot-Deploying Code 22
4 Adding Application Components 25
Database-Related Cartridges 25
Nondatabase Cartridges 27
Cron 27
Continuous Integration 29
Metrics and Monitoring 31
Finding Cartridges and QuickStarts 32
Adding Third-Party Cartridges 35
5 Environment and Application Management 37
SSH Access 37
Using SSH to Interact with a Database 39
Importing SQL in an SSH Session 40
Environment Variables 41
Precontigured Environment Variables 41
Custom Environment Variables 42
Overriding Preconfigured Environment Variables 43
Log Access 43
Changing Application Server or Database Settings 44
Application Server Configuration Changes 44
Database Configuration Changes 45
Using Marker Files 45
6 Library Dependencies 47
Where to Declare Dependencies 47
Incorporating Your Own Binary Dependencies 49
Modifying Your Application to Use the Database 50
Code to Connect to the Database 50
Code to Close the Database Connection 51
Code to Query the Terms for the Insult 51
What We Have Gained by Adding a Database 52
7 Networking 53
WebSockets 53
SSH Port Forwarding 55
Custom URLs 57
SSL Certificates 59
Talking to Other Services 60
Addressable Ports 61
8 Disk Usage 65
Where You Can Write "to Disk" 65
Determining How Much Disk Space Is Used 66
Copying Files to or from Your Local Machine 67
Other Storage Options 68
9 Backup 69
Managing Deployments and Rollbacks 69
Manual Deployments 69
Keeping and Utilizing Deployment History 70
Application Snapshots with RHC 71
Backing Up Your Database 73
Writing a Cron Script 73
Moving Data off the Gear 74
10 Team Coilaboration 77
Managing Multiple SSH Keys 77
Domain Access for Teams 78
Possible Workflows 79
11 Summary 81
What We Covered 81
Other Areas to Explore 82
Final Words 83
A Basic Linux for Non-Linux Users 85