Skip to content

Latest commit

 

History

History
86 lines (70 loc) · 4.48 KB

DEVELOPMENT.md

File metadata and controls

86 lines (70 loc) · 4.48 KB

Thingverse Development

If you want to build Thingverse from the source code, follow the steps mentioned here. The objective of the below steps are to build docker images from source, publish the images to a locally running docker registry, and deploying all Thingverse components to a locally running Kubernetes cluster. The steps below are primarily for developers wanting to configure a fully working Thingverse environment and are familiar with the technology stack that Thingverse uses.

System Requirements (for building and running Thingverse)

  • Memory: 4 GB minimum, 8 GB recommended
  • CPU Cores: 2 Cores, 4 Cores recommended
  • Kubernetes: Version 1.16+
  • Docker: Version 19+
  • Java: JDK 11
  • Gradle: Bundled via wrapper, but locally installed Gradle v1.65 helps.

Build

  • To run Thingverse components, you would need to ensure that a locally running Docker Registry is listening at port 5000.

  • Set an environment variable named DOCKER_REGISTRY to localhost:5000.

  • Start Docker, and your local Kubernetes cluster. You can install Docker Desktop if you like, Minikube and Microk8s are also ok.

  • Now issue the following commands in a terminal window to build the docker images.

    git clone [email protected]:arunkpatra/thingverse.git
    
    cd thingverse
    ./gradlew build
    ./gradlew pushDockerImage
    

Installation

Prerequisites

  • Start Docker and ensure the Docker Registry is listening at port 5000.
  • Start your local Kubernetes cluster. You can install Docker Desktop(comes bundled with a single node Kubernetes cluster) if you like, Minikube and Microk8s are also ok.
  • Verify using docker ps and kubectl version.
  • Install Kubernetes Dashboard on to your cluster if you like (optional).
  • Install Linkerd - Follow steps here: https://linkerd.io/2/getting-started/
  • Issue following commands at the thingverse root directory to install all Thingverse components to your local Kubernetes cluster.

Install

$ cd subprojects/thingverse-deployment/k8s/deployments/thingverse-aio
$ kubectl apply -f thingverse-aio.yaml

Verify Installation

Verify if all went well, with the following commands(might take a while depending on the resources available to your Kubernetes cluster)

$ kubectl get pods -n thingverse-aio

After a while, if you see the following, congratulations, you have successfully installed a fully functional Thingverse instance on you local K8s cluster.

NAME                                        READY   STATUS    RESTARTS   AGE
cassandra-deployment-7476c4595-275pb        1/1     Running   0          2m25s
jaeger-5c77bbb648-j8ftm                     2/2     Running   0          2m25s
thingverse-admin-794d74c574-tj4tz           2/2     Running   0          2m25s
thingverse-api-59cd4cdcb6-phgcf             2/2     Running   0          2m25s
thingverse-backend-read-5b7c9557d4-ntvdd    2/2     Running   2          2m25s
thingverse-backend-write-58577d89f4-bwfnj   2/2     Running   2          2m25s

Test Installation - Perform a few Test Operations

Cleanup

To delete everything you just installed to your local Kubernetes cluster, issue the following commands in a terminal window from the root of the thingverse directory.

$ cd subprojects/thingverse-deployment/k8s/deployments/thingverse-aio
$ kubectl delete -f thingverse-aio.yaml