Git Product home page Git Product logo

hashmap-service-broker's Introduction

hashmap-service-broker

Problem

-> Write a service broker for cloud foundry that provides a HashMap to be used by CF applications. Once the service broker is registered on CF any application developed for CF should be able to use the service.

Pre-Requisite

-> Java 1.7 or higher Pivotal Cloud Foundary PCF DEV MYSQL CF CLI VirtualBox: 5.0+

Steps

-> First install the pcf dev for your operating system as per the instructions provided in the url https://pivotal.io/academy/course/introduction-to-pivotal-cloud-foundry

-> After installing the pcf dev.Start the pcf dev using the command cf dev start

-> Once pcf is started login to cf using your credentials cf login -a https://api.local.pcfdev.io --skip-ssl-validation Enter your username and password

-> Clone the repository git clone https://github.com/shyamjumberi/hashmap-service-broker.git

-> Go To the servive-broker-hasmap project and run the following commands to build the project

 mvn clean

 mvn package -DskipTests

-> Now push the service on the pcf dev using cf push command it will read the configuration from manifest.yml file of the project.

-> Once the app is running, register the broker with the Cloud Controller (substitute the route for your broker app):

cf create-service-broker hashmap-service-broker username password http://hashmap-service-broker.local.pcfdev.io

-> Next, we need to make the service plan public, as all plans start private by default.

cf enable-service-access service-name(hashmap-service-broker)

-> You should now be able to see your service in the marketplace: cf marketplace

-> Next, create an instance of your service:

cf create-service service-name basic custom-hash

-> Now it’s time to push and bind to the client app.Go to hashmap-service-broker-client and run

mvn clean

mvn package -DskipTests

-> We’ll use a CF application manifest to take care of our metadata, including binding to the HashBroker service.

-> Now push the client app using : cf push

-> Once the application is running, you can test it:

http://route-of-your-client-application/HashBroker/{key-name}

-> This is PUT operation

Now put some value in this key for ex {"value":"bar"}

Now perform the GET call on the key to fetch the value

http://route-of-your-client-application/HashBroker/{key-name} it will return value.

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.