MuzHack is a Web application for publishing musical instrument designs.
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.
For the database we use RethinkDB, a NoSQL technology.
- Enter the MuzHack Git repository.
- Get Git submodules:
git submodule update --init --recursive
- Install nvm.
- If you don't have Python 3 already, install it with brew:
brew install python3.
pip3 install -r requirements.txt
- Install RethinkDB.
- In one terminal, enter the MuzHack repository.
- Run the Node 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).
Updating Deployed Resources
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.