MuzHack is a Web application for publishing musical instrument designs.
[](https://gratipay.com/~Arve Knudsen/)
Please install EditorConfig in your editor of choice, since we control the code standard through that (e.g. 2 spaces indentation). Specifically the EditorConfig settings are defined in the .editorconfig file.
Please also install ESLint in your editor, in order to make sure you conform to our code standards. This is configured via .eslintrc.
MuzHack is developed with Node (via hapi.js) on the server and Omniscient (a functional, top-down rendering, React wrapper). The code standard is ES2015 JavaScript. We use Babel to be able to write ES2015 both on the server and on the client.
For the database we use RethinkDB, a NoSQL technology.
- Enter the MuzHack Git repository.
- Get Git submodules:
git submodule update --init --recursive
- Install nvm.
nvm install
.npm install
.- If you don't have Python 3 already, install it with brew:
brew install python3
. pip3 install -r requirements.txt
- Install RethinkDB.
./rethinkdb/setup-rethinkdb.py
.
- In one terminal, enter the MuzHack repository.
- Run the Node server:
./run-server
- In another terminal, enter the MuzHack repository.
- Run the Webpack dev server:
./run-webpack-dev-server
. This serves as a front-end to the Node server, which automatically compiles resources via Webpack. - Access the Webpack dev server at http://localhost:8080 in your browser. The app will automatically be refreshed when you make changes to the source code thanks to Webpack's hot reload feature.
MuzHack is deployed as a set of Docker containers to Google Container Engine (GKE), which is a Kubernetes service for managing Docker clusters. GKE is for all intents and purposes Kubernetes, so read up on the latter in order to understand how MuzHack is deployed.
We are using two different clusters, staging and production. In order to work with each cluster,
we use the local kubectl
command; to configure which cluster kubectl operates on at any given
time, issue the command gcloud container clusters get-credentials $CLUSTER
, where $CLUSTER
is the cluster in question (e.g. production or staging).
In order to update a deployed resource, f.ex. a replication controller, use kubectl apply
. For
example, if the staging web-controller.yaml has changed, issue the following command:
kubectl apply -f docker/staging/web-controller.yaml
.