Sign inSign up

upundit/server

By upundit

•Updated over 7 years ago

The uPundit Server

Image
0

10K+

upundit/server repository overview

⁠uPundit Server

This is the API server that powers the uPundit desktop client.

⁠Getting set up

$ git clone [email protected]:uPundit/upundit-server.git
$ cd upundit-server
$ npm install
$ UPUNDIT_DB_USERNAME="root" UPUNDIT_DB_PASSWORD="rootpw" PORT=8080 \
  UPUNDIT_CLIENT_SECRET='auth0 client secret' \
  UPUNDIT_CLIENT_ID='auth0 client id' npm start

⁠Running the tests

$ npm test

⁠Deployment

The Upundit server is a containerized application⁠ and is deployed on Kubernetes with the configuration found in the manifests folder. This collection has everything needed to create a working deployment with the exception of some secrets and a cluster role binding.

Assuming you have a Kubernetes cluster running on Google Cloud⁠, and the kubectl tool installed and configured to talk to it, the easiest way to create the secrets file is to start with a .env file. The file has the following format and requires a client secret found in the upundit Auth0 account⁠:

NODE_ENV=production
UPUNDIT_DB_USERNAME="root"
UPUNDIT_DB_PASSWORD=somepassword
UPUNDIT_CLIENT_ID=xbayiDUIO8mvY0e3Ga7p5cWVjzsIoemq
UPUNDIT_CLIENT_SECRET=thesecretfromAuth0
ARANGO_ROOT_PASSWORD=somepassword

With the information above saved into a text file called .env in the current directory, you can point the kubectl command at it to generate a kubernetes secret and save them in the cluster.

$ kubectl create secret generic upundit-secrets --from-env-file=.env

The cluster role binding can be create with the following command:

$ kubectl create clusterrolebinding cluster-admin-binding \
    --clusterrole=cluster-admin \
    --user=$(gcloud config get-value core/account)

With those two things created, you can deploy the rest of the application with this command:

$ kubectl apply -f manifests/

Nota Bene: you will need to have www.upundit.org pointed at an IP which is added to the traefik-ingress-service.yaml file as described in this blog post⁠.

Tag summary

Content type

Image

Digest

Size

15.6 MB

Last updated

over 7 years ago

docker pull upundit/server