Need-For-Speed in the Volterra Distributed Application Infrastructure

Aman Arham
9 min readSep 3, 2020
Credits: Piotr Chrobot

Welcome back to the next blog in my 2 part series revolving the start-up company Volterra Edge Services. If you missed my last blog, I went over the company, its products and solutions, and how to get started using their platform. If you haven’t check that out, read that blog first. In this blog, we will be going a very high-level overview of VoltConsole and what I used in creating a Volterra App Delivery Network(ADN). Let’s get straight into it!

The Beginning

There are many steps needed in order to create an ADN on the Volterra Environment. Let’s begin by logging into your Volterra Account. Head to the Volterra Website and log in to your Individual or Teams account:

When you login you will see a screen similar to this:

These are the Regional Pops that are running. We will be utilizing the pops in this set-up. However, we must create a base where will be creating the Cluster, Virtual Hosts, and many other aspects. Here is what we will be doing:

Creating a Virtual Kubernetes Cluster

We will first need to create a new namespace. This namespace allows users to create and organize the different functions we will be running. Here, as you can see, my namespace is called maarham-test. In this namespace, we will need to create a Virtual Kubernetes Clusters that will go to all the Regional Edges and we will launch our Application in all REs with various pods.

We will fill out the name and the Virtual Site we will be using, which is ves-io-all-res .

In this, you will create a deployment based on your configurations, which is known as the manifests file in YAML code.

Here is the Deployment YAML File that I used:

apiVersion: apps/v1
kind: Deployment
metadata:
name: speedtest-deployment
labels:
app: nginx
spec:
replicas: 1
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: speedtest
image: maarham/maarham-speedtest:progress
ports:
- containerPort: 8080

In this, you can see that I used an image that may seem unfamiliar. I will go more in-depth on that subject matter later in the blog.

After that is created, the deployment will run, and then, the pods will begin to run. We will then create a service in this cluster as well with a YAML file.

Here is the Service YAML File:

apiVersion: v1
kind: Service
metadata:
name: Speedtest
spec:
selector:
app: MySpeedtest
ports:
- protocol: TCP
port: 80
targetPort: 8080

We will use the port 80 and target it at 8080, which is the port of the deployment.

KubeConfig Method

There is another method to this step. In this method, we will use vK8s cluster from our PC, instead of implementing the Deployment YAML File through the VoltConsole, we will using a manifests file with the KubeConfig function in the Terminal.

It requires the same type of steps to create the cluster however, after creating the cluster it is quite different.

We will need to download the KubeConfig file of the Virtual Kubernetes Cluster. This should download the file into your downloads folder. Locate and move it to the file you are using for this demonstration using the mv [KubeConfig File Name] [Location] function. Once that is done, we will create the Deployment YAML File vi deployments.yaml and copy-paste this file:

apiVersion: apps/v1
kind: Deployment
metadata:
name: speedtest-deployment
labels:
app: nginx
spec:
replicas: 6
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: speedtest
image: maarham/maarham-speedtest:progress
ports:
- containerPort: 8080

It is the same as the last one but we will be implementing it in a different way. We will use KubeConfig. If you do not know what that is, KubeConfig is compatible with kubectl , the CLI Tool of Kubernetes, and allows the user to organize information about clusters. We will be able to organize this deployment file to the specific cluster. To do that, we will need to use this command:

kubectl apply -f deployment.yaml --kubeconfig [KubeConfig file]

When doing this, the deployment will be created in the cluster and can be seen in the VoltConsole when you click on the Virtual Kubernetes Cluster.

You will be able to see the deployment running along with the pods running at each Regional Edge.

We can do the same thing for the service. We will first create the Service YAML File with vi service.yaml and copy-paste this code:

apiVersion: v1
kind: Service
metadata:
name: Speedtest
spec:
selector:
app: MySpeedtest
ports:
- protocol: TCP
port: 80
targetPort: 8080

It is the same Service YAML File we use previously but this time with KubeConfig. In order to do that, we will use this command to create the service within the cluster:

kubectl apply -f service.yaml --kubeconfig [KubeConfig file]

This can all be viewed in the Virtual Kubernetes Cluster in the VoltConsole.

Creating Virtual Hosts

Heads up for the different features we will be using

After this, there are more steps to complete. There are many aspects that go into creating a Web Application. First and foremost, there is the endpoint, which allows the user to direct traffic to an endpoint. That is created by filling out the necessary information:

After, we have to incorporate and add the Kubernetes Cluster in the cluster component of the Virtual Host, and that is what we did.

Next, we need to create a route and advertise policy for the Virtual Host and finally, all of these components will be combined to create the Virtual Host.

Once the Virtual Host is successfully running, it can be accessed from the domain name provided in the information set.

In this scenario, I did not make it HTTPS rather HTTP. When doing this, the domain must be added to your pc. On Mac, this can be done using the command:

sudo vim /etc/hosts

You will copy and paste the IP Address(your local IP with the Port) along with the Web Application URL. When searching it up, the Web Application should be able to work.

When putting the domain name(my domain name was maarham-test.volterra.io ), I was able to get the output of:

This is part of the finished project. I will now aim to get all of the Regional Edges Speeds accessible from this page. I will go more in-depth on this subject matter in my Full-Stack Development section.

This Web Application aims at getting the connection speed of the REs from one location, showing the user where data transfer will be quicker and helping users with the scalability aspects of their application.

Looking more closely at the Application, you can hover over the start button and begin the speed test to Amsterdam Regional Edge:

Once the start icon is clicked, it will change to Abort Test s and the speed test will begin to run:

After running it completely, it should look like this in the end:

Looking at this data, you can say the speed is pretty good all the way to the Netherlands…

Finally, we can create this same set-up as an HTTP Load Balancer. You maybe wondering why we couldn’t have made it in a HTTP Load Balancer in the beginning? Well… It is necessary to understand the things made up in the Web Application before indulging more into the complex tasks. Here, it will be much more organized and only requires another, aspect which is an Origin Pool:

The Full-Stack Development

Now we have understood the VoltConsole and how to use Volterra’s ADN Solution, it is time to look at the front and back end of the project which I worked on. In essence, I was able to learn and utilize full-stack development skills(coding languages, such as HTML, JS, and CSS) in order to design a Web Page. Since there are many different Regional Edges located across the globe, the users are unable to test the speed at which data travels to each data center, letting them know where they should distribute based on their target audience. Our Web Application we are aiming to design is a SpeedTest for this and will look similar to this:

In this application, you will be able to see the Ping, Download, and Upload speeds for each of the Volterra Regional Edges. I will be running a Docker Container with this. As mentioned before, my aim is to create a web application like this and deploy it in the SaaS based Volterra Solution.

Pushing the Docker Image

In order to access the image created through the Software, I will need to finalize the design through the various files and pieces of codes and push the Docker Image to the Docker Hub. There are steps needed for this.

First, you must login to the Docker Hub page a create new repository similar to this:

When creating a repository, you will need to push the image from the Terminal. This can be done! First, you will need to login into Docker Hub through the terminal with this command:

docker login

After logging in, you can use a series of commands to push the image into the Docker Repository. Let’s start with this command:

docker tag [Image ID] [Repository Name]

With this, you will be able to tag your image to the specific repository. The repository name that I used was maarham/volterra-speedtest:latest . After this, there is only one more command to use and it is:

docker push [Repository Name]

You will push your image to the repository and then, you are done. When looking at the repository, you will know when the latest version of the image was pushed. This can then be pulled by other individuals who use Docker Hub.

I later added the image by editing the Deployment File with the latest tag of my image in order to run it on the Volterra Service. You can do the same with your image on the Volterra Console!

Wrapping it all up!

In this two series blog, we have learned a lot about the new start-up company Volterra Edge Services. We have learned what the company is, the many products and solutions it has, and a quick demonstration of a use-case using their platform.

All in all, Volterra is a revolutionary start-up company that is providing the best UI Experience and solution-set to its customers. With the infrastructure that they have, they have a very bright future. When looking at their SaaS-based solutions, simplistic and effective come to my mind. We better keep on eye out for what this company does in the future. A new competitor is heading into the Cloud Field. This Aman Arham Out! I hope you enjoyed this new type of series and let me know if you would like to have many more series like this one!

Resources

If you would like a thorough step-by-step guide, head to this Volterra App Delivery Network Technical Documentation Page:

This documentation is very easy to follow and includes all of the information in order to understand how the use the ADN Tool. Check out the other documentation pages if you want to explore more with the Volterra Environment and VoltConsole.

Here is also a flyer I created describing Cloud Computing and what Volterra is doing in this aspects to advance the IT World:

--

--

Aman Arham

Senior at Rick Reedy High School and aspiring Data Scientist; Writer for Better Programming.