Git Product home page Git Product logo

pcf-ers-demo's Introduction

Build Status Download

PCF Elastic Runtime Service (ERS) Base Demo

Base application to demonstrate PCF ERS

Credits and contributions

As you all know, we often transform other work into our own. This is all based from Andrew Ripka's cf-workshop-spring-boot github repo with some basic modifications.

Introduction

This base application is intended to demonstrate some of the basic functionality of PCF ERS:

  • PCF api, target, login, and push
  • PCF environment variables
    • Spring Cloud Profiles
  • Scaling, self-healing, router and load balancing
  • RDBMS service and application auto-configuration
  • Blue green deployments

Getting Started

Prerequisites

Building

$ git clone [REPO]
$ cd [REPO]
$ ./mvnw clean install

To run the application locally

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.

$ ./mvnw spring-boot:run

Then go to the http://localhost:8080 in your browser

Running on Cloud Foundry

Take a look at the manifest file for the recommended setting. Adjust them as per your environment.

Labs/Demo Scripts summary

We have a Labs folder to help you learn PCF. These labs can be used for workshops or self-training.

pcf-ers-demo's People

Contributors

acrlewis avatar asaikali avatar daniellavoie avatar jimbasler-pivotal avatar jwilliams-pivotal avatar kumareshbabuns avatar mnenad avatar msegvich avatar patrickcrocker avatar pcrocker-pivotal avatar pieterhumphrey avatar vmwghbot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pcf-ers-demo's Issues

mvnw clean install - issue on pom

Had this below

I fixed the pom.xml with lombock version as below


[user@centos62 pcf-ers-demo]$ git diff
diff --git a/pom.xml b/pom.xml
index 850a5a8..5338d3e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -37,6 +37,7 @@
                <dependency>
                        <groupId>org.projectlombok</groupId>
                        <artifactId>lombok</artifactId>
+                       <version>1.16.8</version>
                </dependency>

[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'dependencies.dependency.version' for org.projectlombok:lombok:jar is missing. @ line 37, column 15
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.gopivotal.pcf.sme.ers:pcf-ers-demo1:0.0.1-SNAPSHOT (/home/user/pcf/pcf-ers-demo/pom.xml) has 1 error
[ERROR] 'dependencies.dependency.version' for org.projectlombok:lombok:jar is missing. @ line 37, column 15
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

demo scenario for blue green with improved manifest and cf scaleover plugin

I find the demo scenario for blue green not well documented

here is what I did

  • edited manifest to have multiple apps and 4 instances and a joint route "attendees"
  • edited colors in layout header to have blue for v1 and green for v2 and build v1 and v2

cf push --no-start

cf start attendees1

cf scaleover attendees1 attendees2 30s

here is some git diff


--- a/src/main/resources/templates/fragments/layout.html
+++ b/src/main/resources/templates/fragments/layout.html
@@ -31,7 +31,7 @@ References:

 <style>
 .navbar.navbar-inverse.navbar-fixed-top {
-       background-color: #3EBF5C;
+       background-color: #3EB0FF;
 }

and the manifest.yml that I am using


$ more manifest.yml

---
memory: 512MB
instances: 4
buildpack: java_buildpack_offline
services: []
env:
  SPRING_PROFILES_ACTIVE: cloud
applications:
- name: attendees1
  hosts:
    - attendees1
    - attendees
  path: target/pcf-ers-demo1-0.0.1-SNAPSHOT.jar
- name: attendees2
  hosts:
    - attendees2
    - attendees
  path: target/pcf-ers-demo1-0.0.2-SNAPSHOT.jar

Concourse Integration

@mborges-pivotal @pcrocker-pivotal hey guys. I was fooling around with building a Concourse pipeline for this over the weekend and thought it would be great to have bundled in formally with the pcf-erc-demo. Any interest? Having some great unit and integration tests to go along with that would be amazing as well.

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.