Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Front matter: Next Level Front End Deployments on OpenShift
1. FRONT MATTER:
NEXT LEVEL FRONT END
DEPLOYMENTS ON OPENSHIFT
Red Hat MSA Day, Atlanta
Lance Ball
Principal Software Engineer
January 17, 2019
2. INSERT DESIGNATOR, IF NEEDED
Did You Know?
2
Number one deployment runtime
on OpenShift Online is Node.js
● But they’re not all actually
Node.js applications
● Many deployments are
Single Page Applications
● How are these applications
being deployed?
● What tools can I use in my
workflow?
3. INSERT DESIGNATOR, IF NEEDED
A Quick Poll
3
● Do you deploy apps on
OpenShift today?
● Do you write Node apps?
● Do you write Single Page
Applications?
● Anyone here “full stack”?
● What about DevOps?
8. INSERT DESIGNATOR, IF NEEDED
Two Thorns and a Rose
8
OpenShift builds pull from Git repo
Not ideal for iterative development
Must maintain compiled artifacts in Git repo
The “build” for a web server image expects static content
Served by a real HTTP server
We can use Apache or Nginx and don’t depend on a React Node.js server
10. INSERT DESIGNATOR, IF NEEDED
So, what’s nodeshift?
10
An npm module for deploying Node apps on OpenShift
Creates, builds, routes and deploys your app in one command
Great for local development environments
Deploys directly from the file system
Layered application images via s2i
Overlays application on a base image, creating a new application image
14. INSERT DESIGNATOR, IF NEEDED
Be Sure to Run Development Server
npx nodeshift --strictSSL=false
--dockerImage=nodeshift/centos7-s2i-web-app --imageTag=10.x
--expose --deploy.env NPM_RUN=”npm start”
14
15. INSERT DESIGNATOR, IF NEEDED
Synchronize Changes in Development
oc rsync --no-perms=true --watch src/ <POD_NAME>:src/
15
16. INSERT DESIGNATOR, IF NEEDED
Two Roses and a Thorn
16
Single command deployment
Easy to integrate into a development workflow
Deploys from the local file system
No need to push small changes in development to GitHub
Serves content using the React server
Not designed for production use
18. INSERT DESIGNATOR, IF NEEDED
Chained Builds
18
Two builds can be chained
together: one that produces the
compiled artifact, and a second
build that places that artifact in a
separate image that runs the
artifact.
30. INSERT DESIGNATOR, IF NEEDED
Three Roses!
30
Single command deployment in development
Easy to integrate into a development workflow
Development deploys from the local file system
No need to push small changes in development to GitHub
Served by a real HTTP server in production
We can use Apache or Nginx and don’t depend on a React Node.js server