Skip to content

trisberg/buildpack-java-fun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Buildpack Sample Function

A sample function that demonstrates usage of Cloud Foundry buildpacks on Knative Serving, using the packs Docker images.

This deploys a functions.Upper.java sample function for riff.

Prerequisites

Install riff

Install riff

Make sure to perform the steps mentioned in "create a Kubernetes secret for pushing images to DockerHub" and "initialize the namespace" sections.

Install buildpack build template

This sample uses the Buildpack build template in the build-templates repo.

Install the Buildpack build template from that repo:

kubectl apply -f https://raw.githubusercontent.com/knative/build-templates/master/buildpack/buildpack.yaml

Building and Running

Clone this repo (https://github.com/trisberg/buildpack-java-fun.git) and then modify service.yaml modifying the account in image name for the IMAGE argument to use your DockerHub id since you can't push images to the springdeveloper account.

Now you can deploy this to Knative Serving from the directory of this repo using:

kubectl apply -f service.yaml

Once deployed, you will see that it first builds and once the build is complete the service will launch. The status should show Running:

riff service list

Access the new service:

riff service invoke buildpack-java-fun -- -w '\n' -H 'Content-Type: text/plain' -d hello

Cleaning up

To clean up the sample service:

riff service delete buildpack-java-fun

About

Sample riff build with buildpack for Java function

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published