Giter Site home page Giter Site logo

atsticks / openshift-workshop Goto Github PK

View Code? Open in Web Editor NEW

This project forked from amoahcp/openshift-workshop

0.0 1.0 2.0 362 KB

Source code examples for Trivadis/RedHat Openshift Workshop

License: Apache License 2.0

Java 64.63% HTML 19.29% JavaScript 15.35% Dockerfile 0.73%

openshift-workshop's Introduction

Trivadis/RedHat Openshift Workshop

This workshop gives you a brief introduction of how to deploy a Java application step by step to openshift.

Pre-requirements:


  • Step 1, is a simple Spring-boot CRUD application running locally, using a local mongodb instance

  • In Step 2, we start the application as a Docker container, together with a mongodb container, locally

  • In Step 3, we push the created Docker image to the openshift repository and deploy the mongodb and the application itself in openshift

  • In Step 4, we automate the deployment to openshift by using the fabric8 maven plugin. Additionally we customize the service & deployment descriptors

  • Step 5, demonstrates the usage of a custom Dockerfile together with the Fabric8 plugin

  • In Step 6 we split the application into a frontend a write and a read service

  • In Step 7 we add a second frontend and use a different approach for service discovery

  • In Step 8 and Step 9 we will look at config maps as a mechanism to externalize configuration.

  • In Step 10 we will use secrets to store sensitive data.

  • In Step 11 we will creat and use a template.

  • In Step 12 we will buildour own S2I builder image.

  • demo contains a simple overall demo presenting the most important aspects such as pods, replicasets, deployments, services and routes. spring-boot-demo contains a possible Spring application, which contains additional instable health access points to demonstrate monitoring and restarting facilities.

  • s2i contains a small example for building a custom s2i builder image. . templates contains a s,aöö example for creating a kubnernetes template.

  • config,aüs-1/2 contains example for creating configmaps including propagation of an image through stages qith different configs.

  • secrets contains an exercise for creating a secret and printing it's content in a container.

Reset your installation:

Resetting your Openshift is easy. In most cases it is sufficient to run the following commands (ensure you are logged in as developer user, not as admin ;-) ):

  • oc delete route --all
  • oc delete service --all
  • oc delete deployment --all
  • oc delete pods --all
  • oc delete templates --all
  • oc delete cm --all

Dont use oc delete secrets --all since you might also delete secrets used by some system components in your project.

Given Openshift a few seconds to perform all changes (the CLI will immedeately return, but the deletion process might still be ongoing).

If nevertheless things still fail (rarely happening) you can recreate the Openshift VM completely:

  • minishift delete
  • minishift start --memory 4096 --cpus 2

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.