Coder Social home page Coder Social logo

josefkarasek__eap-rolling-update's Introduction

Kubernetes Rolling Update Demo

This example app leverages the functionality of Kubernetes and OpenShift projects to run enterprise software in distributed environment. Main goal is to demonstrate the application architecture - an application cluster that can be scaled and cluster nodes can survive restart.

# add --insecure-registry 172.30.0.0/16 to /etc/sysconfig/docker
oc cluster up --version=latest

# create git infrastructure
oc new-project git --display-name="GIT"
oc process -f https://raw.githubusercontent.com/josefkarasek/eap-rolling-update/master/gogs-postgresql.json | oc create -f -
oc deploy dc/postgresql-gogs --latest
oc policy add-role-to-user view system:serviceaccount:$(oc project -q):default

# create the app cluster
oc new-project cluster1 --display-name="CLUSTER"

# service account with secret
oc create -f https://raw.githubusercontent.com/jboss-openshift/application-templates/master/secrets/eap7-app-secret.json

# grant view rights on the project
oc policy add-role-to-user view system:serviceaccount:$(oc project -q):eap7-service-account -n $(oc project -q)

# image streams
oc create -f https://raw.githubusercontent.com/josefkarasek/eap-rolling-update/master/eap70-is.json
oc create -f https://raw.githubusercontent.com/josefkarasek/eap-rolling-update/master/postgres-is.json

# template
oc create -f https://raw.githubusercontent.com/josefkarasek/eap-rolling-update/master/eap70-postgresql-demo-s2i.json

# build and deploy
# substitute SOURCE_REPOSITORY_URL with your gogs project URL
oc new-app --template=eap70-postgresql-demo-s2i \
  -p SOURCE_REPOSITORY_URL=https://github.com/josefkarasek/eap-rolling-update \
  -p SOURCE_REPOSITORY_REF=master \
  -p CONTEXT_DIR=greeter \
  -p DB_JNDI=java:jboss/datasources/GreeterQuickstartDS \
  -p DB_DATABASE=USERS \
  -p HTTPS_NAME=jboss \
  -p HTTPS_PASSWORD=mykeystorepass \
  -p JGROUPS_ENCRYPT_NAME=secret-key \
  -p JGROUPS_ENCRYPT_PASSWORD=password \
  -p IMAGE_STREAM_NAMESPACE=cluster1 \
  -p NODES=3

Acknowledgements

Gogs image based on Erik Jacobs' image. Greeter demo application based on EAP 7 quickstarts, distributed cache added by Jiri Pechanec

josefkarasek__eap-rolling-update's People

Contributors

josefkarasek avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.