Giter Club home page Giter Club logo

cf-workshop-spring-boot's Introduction

Pivotal CF Workshop - Spring Boot

Introduction

This is the Spring Boot sample application for the Pivotal CF Workshop. It is intended to demonstrate some of the basic functionality of Pivotal CF:

  • Pivotal CF target, login, and push
  • Pivotal CF environment variables
  • Pivotal CF service variables
  • Scaling, router and load balancing
  • Health manager and application restart
  • RDBMS services and application auto-configuration

Building, Packaging, and Deploying

###To get the source code and build the WAR file

git clone https://github.com/pivotal-cf-workshop/cf-workshop-spring-boot

mvn clean package

###To run the application

The application is set to use an embedded H2 database in non-PaaS environments, and to take advantage of Pivotal CF's auto-configuration for services. To use a MySQL Dev service in PCF, simply create and bind a service to the app and restart the app. No additional configuration is necessary when running locally or in Pivotal CF.

In Pivotal CF, it is assumed that a Pivotal MySQL service will be used.

###For Docker

There is a Dockerfile in the top level directory. You can build your own Docker Image from this and push it to Docker Hub, or use mine(https://hub.docker.com/u/dbeauregard/) and just push it to Cloud Foundry: cf push app-name -o dbeauregard/boot-docker

###For Concourse

There is a Concourse pipeline in the concourse directory. It will watch GitHub for pushes, build the project (Maven) and run the unit tests, version the jar, save the jar in S3, bump the version # and push the app to a PCF staging env. There is then a manual step/click to do a blue/green deployment (cf push) to 'production'.

  1. In the concourse directory copy credentials.yml.sample to credentials.yml (same directory) and fill in your credentials for PCF and Amazon S3.
  2. Target Concourse with Fly: fly -t lite login -c http://192.168.100.4:8080
  3. From the concourse directory run the following command (after you have targeted your concourse deployment with fly): fly -t lite set-pipeline -p boot-app -c pipeline.yml -l credentials.yml

cf-workshop-spring-boot's People

Contributors

aripka-pivotal avatar dbeauregard avatar

Watchers

 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.