Minishift as a Development Environment for Node.js
OpenShift Commons Briefing
- nearForm founded in 2011 in Tramore Ireland
- 100+ people building fullstack solutions for global organisations
- React + Node.js + HAPI + AWS + Terraform + Ansible + Containers
- Deeply involved in Open Source communities
- Legendary events such as NodeConf EU
- Major contributor to Node Core
Containers at nearForm
- Building with Docker for ~3 years
- A number of K8's experts at nearForm
- Running Kubernetes in AWS for several customers
- Customers very interested in OpenShift
- Skill up developers with OpenShift/K8's
- Dev environment very similar to production
What Makes a Good Dev Environment?
- Time to First Code
- Production Parity
- Instant Feedback Loops
The Goal - Instant Feedback in OpenShift
It took some work...
Result: Avoid rebuilding a container when code changes
Result: application restarts within existing container
Permissions - OpenShift SCCs
By default, Containers cannot access the underlying host FS
We can change this with Security Context Constraints
$ oc get scc # list the built in policies
Result: containers are allowed to mount host path volumes
Mounting local code including node_modules breaks native dependencies. We Installed node_modules in another folder.
Result: native deps are compiled for the right platform.
Caveat: must rebuild container when deps change.
What about scaling?
$ minishift config set memory 4096
$ minishift config set cpus 4
$ oc describe node
Minishift has potential to be a great dev environment
- Fantastic UI/UX
- Breaking down barriers between dev and ops
- Potential to become 'universal dev environment'
but it's not perfect
There's Still Work to do
- How do we organise our projects with multiple codebases?
- How do we co-ordinate multiple projects?
- Can we turn it into a general solution? (one size fits all)
- What is the pathway going from local OpenShift to production OpenShift?
We don't have the answers
We would love your suggestions and contributions
Conor O'Neill - Chief Product Officer
Dara Hayes - Devops Engineer