Giter Club home page Giter Club logo

pcfaws's Introduction

Spring Boot App - PCF integration with AWS Services - S3, DynamoDB

Pre-requisites

1. Maven

Spring Boot is compatible with Apache Maven 3.2 or above. If you don’t already have Maven installed you can follow the instructions at maven.apache.org.

2. GIT Bash

On Windows, if you don't already have GIT Bash installed, download GIT Bash here

Clone Code and Run

Clone Code in a working directory using

$ https://github.com/mayureshkrishna/pcfaws.git

Once you have cloned the code, you can now run the Spring Boot REST service using

$ mvn clean spring-boot:run

Update your AWS Access keys in the application-dev.properties file.

If you want to run with a specific environment application properties, then make sure to have a property file with environment name. For e.g. application-dev.properties Now you can run with application-dev.properties using:

$ mvn clean spring-boot:run -Dspring.profiles.active=dev

Amazon S3

List S3 Files and Directories

http(s)://<uri>/s3/resources

Amazon Dynamo DB

Initialize Database

http(s)://<uri>/dynamo/init

Get All Customers

http(s)://<uri>/dynamo/customers

Get Customers by Last Name

http(s)://<uri>/dynamo/customers/Doe

Deploy to PCF

Login to PCF

cf login -a <PCF API URI>

Create AWS Services

cf create-service aws-s3 standard pcfawss3
cf create-service aws-dynamodb standard pcfawsddb

Build your app and Deploy to PCF

mvn clean package -Dspring.profiles.active=development

cf push --no-start

Bind Services and Start your App

cf bind-service pcfaws pcfawss3

cf bind-service pcfaws pcfawsddb

cf start pcfaws

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.