Skip to content

Fork of NodeBB project v1.7.5 optimized for Kubernetes with Bluefyre

License

Notifications You must be signed in to change notification settings

bluefyreio/nodebb-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


NodeBB demo app for k8

A Node.js web application based on the popular NodeBB utilizing Bluefyre's kubernetes native runtime application security.

Instructions

This repo sets up the docker image for the NodeBB application v1.7.5 using MongoDB. Refer the blog post for additional details.

Prerequisites

Refer to this blog post for prerequisites for minikube, hyperkit, OSX. You can certainly run this without minikube as well.

If you're running minikube on OSX, make sure to run the following to set the right context for your docker images

minikube config set vm-driver virtualbox
minikube start --memory=4096
eval $(minikube docker-env)

Running

  1. Let's set up the nodebb namespace in your Kubernetes cluster
kubectl create -f namespace.yaml
  1. Create the persistent volumes needed for Mongo. You can skip this step if you already have volumes you intend to use.
kubectl create -f local-volumes.yaml
kubectl get pv
  1. Set up the Mongo service that uses the persistent volumes defined earlier
kubectl create -f mongo.yaml --namespace=nodebb
  1. Signup at Bluefyre to obtain a free agent API key. Refer docs here for how to do this. Once you've obtained this
# Replace BLUEFYRE_AGENT_ID with the API key from the Bluefyre app
kubectl create secret generic bluefyre-agent-id --from-literal=agentid=BLUEFYRE_AGENT_ID --namespace=nodebb
kubectl get secrets --namespace=nodebb
  1. Also once you've signed up at Bluefyre to download the Node.js microagent. Place the bluefyre-agent-node-x.x.xtgz in the same folder as the Dockerfile

  2. Now lets set up the app build

cd ../
docker build -t nodebb:v1 .
  1. Lets set up a job to setup the environment
cd k8
kubectl create -f nodebb-setup.yaml --namespace=nodebb

Verify that the job ran successfully

kubectl get jobs
kubectl logs REPLACE_YOUR_POD_ID_HERE -f
  1. Now lets set up the app
kubectl create -f nodebb.yaml --namespace=nodebb
  1. Now in your browser, navigate to the service
minikube service nodebb --url
  1. View realtime vulnerabilities in your Bluefyre portal

TODO

  • update k8 setup scripts with user/pw secrets for MongoDB

Screenshots

Here are some screenshots from NodeBB. For more updated info, refer the NodeBB repo

License

NodeBB is licensed under the GNU General Public License v3 (GPL-3) (http://www.gnu.org/copyleft/gpl.html).

About

Fork of NodeBB project v1.7.5 optimized for Kubernetes with Bluefyre

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published