Skip to content

How to add security layer to your existing application with minimal touch to code !

Notifications You must be signed in to change notification settings

lbroudoux/secured-fruits-catalog-k8s

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

secured-fruits-catalog-k8s

How to add security layer to your existing application with minimal touch to code !

This is the companion project of the blog series I started here: Adding security layers to your App on OpenShift.

OpenShift versions

This has been deployed successfully on OpenShift 3.11 and on OpenShift 4.1+

For OpenShift 3.11, make sure to change the Fabric8 Maven Plugin version in the pom.xml file:

   <fabric8-fmp.version>3.5.41</fabric8-fmp.version>

For OpenShift 4.2+ you have to use the latest version (the default now)

   <fabric8-fmp.version>4.3.1</fabric8-fmp.version>

Quick local deployment

You should have a MongoDB instance running locally on port 27017.

$ mvn spring-boot:run
[...]

Quick deployment on OpenShift

$ oc new-project fruits-catalog --display-name="Fruits Catalog"
[...]
$ oc new-app mongodb-persistent --name=mongodb -p DATABASE_SERVICE_NAME=mongodb -p MONGODB_DATABASE=sampledb -l app=fruits-catalog -n fruits-catalog
[...]
$ mvn fabric8:deploy -Popenshift
[...]

Quick deployment on Kubernetes

Example running on Minikube:

$ eval $(minikube docker-env)
[...]
$ kubectl create namespace fruits-catalog
[...]
$ kubectl create -f k8s/mongodb-deployment.yml -n fruits-catalog
[...]
$ mvn fabric8:deploy -Popenshift -Dfabric8.mode=kubernetes -Dfabric8.namespace=fruits-catalog
[...]

About

How to add security layer to your existing application with minimal touch to code !

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published