An individual node is contained in a Docker image shipped with the binary of the ledger and a node configuration file node.config. Also, an image of the Block Explorer can be downloaded.

The node configuration contains a list of bootnodes that used to bootstrap the individual nodes ledger state from a cold start.


Docker Images

There are two images of interest. Uplink and the Community Block Explorer. To build the docker image for Uplink:

$ stack build --docker


Kubernetes is a cloud orchestration platform that can be used to start up and deploy multiple virtual instances of the Uplink application on cloud platforms such as Google Cloud or AWS. One of the main benefits of using Kubernetes is that it will self manage instances of the application. Within Kubernetes lies the concept of pods, deployments, nodes, services and replication controllers. For more information on Kubernetes, please see Kubernetes.

Google Cloud

Running a Uplink cluster on Google Cloud and Google technology is quite straightforward as Uplink ships with Kubernetes deploy tools and images. An individual cluster running on Google Cloud can participate in consensus across either a federation in a private Intranet environment or as part of a global consensus running a set of nodes across many clusters between network participants.

Pushing an image

After authenticating with gcloud, it is recommended to push the docker image to the Google Cloud Container Registry. The tag of the image file must be consistent the following pattern: zone/project-id/image_name.

$ docker build -t uplink .
$ gcloud docker -- tag uplink us.gcr.io/${PROJECT_ID}/uplink:$SHA1
$ gcloud docker -- tag us.gcr.io/${PROJECT_ID}/uplink:$SHA1 us.gcr.io/${PROJECT_ID}/uplink:latest

Once the image is tagged, push to the container registry:

$ gcloud docker -- push us.gcr.io/${PROJECT_ID}/uplink

Deploying to a container cluster

After creating a cluster either using Console or through gcloud, get the credentials for newly created clusters

$ gcloud container clusters get-credentials <cluster> --zone <zone> --project <project>

Now we can generate the kubernetes config and deploy with:

$ kompose up -f docker-compose.kubernetes.yml

Alternatively, we can run kompose convert and deploy with kubectl

$ mkdir generated && cd generated && kompose convert -f ../docker-compose.kubernetes.yml && cd ../
$ kubectl apply -f generated/

Scaling Network

kubectl autoscale deploy/uplink --min=5 --max=10

Static IP Generation

To assign a new static IP to an Uplink Explorer process, create a new public load balancer service with :

kubectl expose deployment uplink-explorer --type=LoadBalancer --name=uplink-explorer

And then promote the newly created ephemeral external IP address to a static external IP address.

Deploying a new pushed image

After pushing the new image to the container registry, it can be deployed with:

kubectl set image deploy/bootnode  bootnode=us.gcr.io/${PROJECT_NAME}/uplink:$SHA1
kubectl set image deploy/uplink  uplink=us.gcr.io/${PROJECT_NAME}/uplink:$SHA1