Slide 1

Slide 1 text

@jankleinert Single Page Apps on OpenShift Using Chained Builds

Slide 2

Slide 2 text

@jankleinert Hello! Jan Kleinert @jankleinert

Slide 3

Slide 3 text

@jankleinert What do we mean by Single Page Apps? A web app where content gets re-rendered in response to an action taken by a user, without making an HTTP request to the server.

Slide 4

Slide 4 text

@jankleinert Create React App https://facebook.github.io/create-react-app/ npx create-react-app my-app

Slide 5

Slide 5 text

@jankleinert Source to Image (s2i) https://github.com/openshift/source-to-image s2i: a tool for building reproducible container images your source + builder image = new image two scripts: assemble and run

Slide 6

Slide 6 text

@jankleinert centos7-s2i-web-app Assemble Script https://github.com/nodeshift/centos7-s2i-web-app/blob/master/s2i/as semble yarn install and yarn build or npm install and npm run build

Slide 7

Slide 7 text

@jankleinert centos7-s2i-web-app Run Script https://github.com/nodeshift/centos7-s2i-web-app/blob/master/s2i/ru n if [ ! -z "$NPM_RUN" ]; then $NPM_RUN else npx serve -s /opt/app-root/output -l $DEPLOY_PORT fi

Slide 8

Slide 8 text

@jankleinert Templates https://docs.openshift.com/container-platform/3.11/dev_guide/templates.html “A template describes a set of objects that can be parameterized and processed to produce a list of objects for creation by OpenShift Container Platform. A template can be processed to create anything you have permission to create within a project, for example services, build configurations, and deployment configurations.”

Slide 9

Slide 9 text

@jankleinert Workshop Time! Claim a username (write your name next to an open username): http://bit.ly/devconfcz-usernames Workshop guide: http://bit.ly/devconfcz-workshop