The Ghost blog setup relies on their custom ghost-cli to install everything that’s needed. We’re going to use the Red Hat OpenShift Source-to-Image (S2I) build process to encapsulate everything needed for the install, and then package the whole deployment into an easily shared and reproduced OpenShift Template.
Video sped up for the sake of brevity. Full install process takes ~3 minutes to build and deploy the application.
Installing the Ghost Template
Using the ghost template from a community provided repository, we can have an easily reproducible Ghost blog via a one-click install. First install the template into your project
<span>oc create -f https://raw.githubusercontent.com/openshift-cs/ghost-example/master/ghost_template.yaml</span>
Now you can continue on the command line with oc new-app --template=ghost-template
or you can deploy this through the web console
Configuring your Ghost Blog
If you don’t want to change any settings, all of the defaults are set up for you to just hit create and go. Using the defaults, this will create the following:
- 1 persistent volume for your MySQL database (1Gi)
- 1 persistent volume for your Ghost blog content (5Gi)
- 1 secret for the MySQL database credentials
- A MySQL deployment
- A Ghost build (using the ghost-cli)
- A Ghost deployment
- A Ghost route
If using a platform like Red Hat OpenShift Online, a default route will be created for you, e.g., https://ghost-ghost-example.b9ad.pro-us-east-1.openshiftapps.com/. Be sure that you update your deployment with this URL by running
<span> </span><span>oc set env dc ghost url=https://$(oc get route ghost -o custom-columns=HOST:.spec.host --no-headers)</span>
If you’re not using a default route, simply provide your custom URL in the “Application Hostname” template parameter, and this will be filled in for you.
That’s it! The OpenShift S2I build system has some amazing capabilities in taking nothing more than a Git repository and deploying a full application. This is simply one use case of that.
About the author
Browse by channel
Automation
The latest on IT automation that spans tech, teams, and environments
Artificial intelligence
Explore the platforms and partners building a faster path for AI
Open hybrid cloud
Explore how we build a more flexible future with hybrid cloud
Security
Explore how we reduce risks across environments and technologies
Edge computing
Updates on the solutions that simplify infrastructure at the edge
Infrastructure
Stay up to date on the world’s leading enterprise Linux platform
Applications
The latest on our solutions to the toughest application challenges
Original shows
Entertaining stories from the makers and leaders in enterprise tech
Products
- Red Hat Enterprise Linux
- Red Hat OpenShift
- Red Hat Ansible Automation Platform
- Cloud services
- See all products
Tools
- Training and certification
- My account
- Developer resources
- Customer support
- Red Hat value calculator
- Red Hat Ecosystem Catalog
- Find a partner
Try, buy, & sell
Communicate
About Red Hat
We’re the world’s leading provider of enterprise open source solutions—including Linux, cloud, container, and Kubernetes. We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.
Select a language
Red Hat legal and privacy links
- About Red Hat
- Jobs
- Events
- Locations
- Contact Red Hat
- Red Hat Blog
- Diversity, equity, and inclusion
- Cool Stuff Store
- Red Hat Summit