Skip to content

tfriman/s2i-clojure

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

OpenShift S2I image for building Clojure projects using 'lein uberjar' and Java11.

Installation to OpenShift 4.8

Login to your OpenShift cluster

oc login

oc new-project clojure-s2i

oc new-build https://github.com/tfriman/s2i-clojure#refreshjvm11 --name s2i-clojure -n clojure-s2i

You can follow the build

oc logs -f bc/s2i-clojure -n s2i-clojure

You need to make this to have s2i to be visible within cluster.

oc tag clojure-s2i/s2i-clojure:latest openshift/s2i-clojure:latest

Usage example

Create a test project

oc new-project clj-test

After the build has finished you can test your new builder:

oc new-build s2i-clojure~https://github.com/tfriman/clj-rest-helloworld#v1.0.0 --name=clj-test

And follow the build

oc logs -f bc/clj-test

After the build has finished create a new app:

oc new-app clj-test

And open the service to the world:

oc expose svc/clj-test

See the url for the application

oc get routes clj-test --template='{{ .spec.host }}'

And open it using your browser.

Making s2i-clojure builder visible to catalog

oc edit is/s2i-clojure -n openshift -o json

Make it look like this:

{
...
	"spec": {
	"tags": [
		{
		...
		"annotations": {
			"openshift.io/display-name": "S2I Clojure",
			"description": "Build and deploy a Clojure app",
			"iconClass": "icon-clojure",
			"sampleRepo": "https://github.com/tfriman/clj-rest-helloworld",
			"sampleRef": "v1.0.0",
			"tags": "builder,clojure",
			"version": "latest",
			"supports": "clojure"
		},
		}
	]
	}
}

Wait for a while to catalog service to catch up and your Clojure S2I builder should appear in the "Import from Git" section.

About

OpenShift s2i image for Clojure

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 89.1%
  • Dockerfile 9.1%
  • HTML 1.8%