TrackIt
TrackIt
Contact us
Blogs

Replicated: A Powerful Tool to Make your Solution Available On-Premise

Author

TrackIt

Date Published

TrackIt is an amazing product to manage and optimize your cloud billing. However, some customers aren't ready and still wants to have a hands-on the solution they're using for security or management reasons.


We are going to show you how you can use Replicated to transform TrackIt into an on-premise product.

In today's world, we tend to externalize our resources. The cloud is certainly the future, but some businesses are not ready to jump in for reasons such as highly sensitive data, lack of trust or simply lack the budget.
How do you sell your cloud-oriented product to those companies who don’t want to externalize their data? How do you achieve on-premise distribution of your product? Replicated is the solution!

Replicated wraps your containerized cloud application with Enterprise-grade features and deploys it behind your customer's firewall into a corporate data center or into the private cloud.

Prerequisites

  • Sign up for a Replicated account (https://vendor.replicated.com/#/account/signup)
  • A test machine (to simulate client environment) with tcp port 9870 to 9880 opened

Create a new Replicated project

Create a new application

Replicated allows you to manage every aspect of your product from image hosting to licensing  and distribution. For now, click on create new app to start the journey of our on premise TrackIT.
You can now see a brand new dashboard for your project.

You will be able to manage 3 distributions channels: stable, beta, unstable. Let’s create our first release by clicking on Create Release.

Upload our images

With Replicated, you can use images that are hosted on the Docker Hub, but it also enables the capability to host them on Replicated repository. This is the solution we are going to use.

For TrackIT we have to upload 3 of our images: the api, the webui and the loadbalancer (not mandatory). The rest of them are publicly available on the Docker Hub.

First let's log on repgistry:

1docker login registry.replicated.com

We need to tag each of our images

1docker tag f7aebeee3cf8 registry.replicated.com/msolution/trackit-api:latest
2docker tag 9208bd226c4d registry.replicated.com/msolution/trackit-webui:latest
3docker tag 9534122d0bc1 registry.replicated.com/msolution/trackit-loadbalancer:latest

And now, let's push them all:

1docker push registry.replicated.com/msolution/trackit-api:latest
2docker push registry.replicated.com/msolution/trackit-webui:latest
3docker push registry.replicated.com/msolution/trackit-loadbalancer:latest

Configure your application

Replicated uses yaml syntax and has a logic similar to a docker-compose, this is the configuration we will use for TrackIT:

1---
2replicated_api_version: "1.3.2"
3name: "msolution"
4properties:
5 app_url: ""
6 logo_url: http://www.replicated.com/images/logo.png
7 console_title: Your App Name
8backup:
9 enabled: false
10monitors:
11 cpuacct: []
12 memory: []
13components:
14 - name: mysql
15 containers:
16 - source: public
17 image_name: mysql
18 version: latest
19 env_vars:
20 - name: MYSQL_ROOT_PASSWORD
21 static_val: "very_secret_password"
22 volumes:
23 - host_path: /trackit/mysql
24 container_path: /var/lib/mysql
25 ports:
26 - private_port: "3306"
27 public_port: "3306"
28 port_type: "tcp"
29 interface: "docker0"
30 when: ""
31 - name: api
32 containers:
33 - source: replicated
34 image_name: trackit-api
35 version: latest
36 ports:
37 - private_port: "5000"
38 public_port: "5000"
39 port_type: "tcp"
40 interface: "docker0"
41 env_vars:
42 - name: DEBUG
43 static_val: "true"
44 volumes:
45 - host_path: /trackit/log
46 container_path: /root/log
47 extra_hosts:
48 - hostname: mysql
49 address: '{{repl ThisHostInterfaceAddress "docker0"}}'
50 - hostname: redis
51 address: '{{repl ThisHostInterfaceAddress "docker0"}}'
52 - hostname: es1
53 address: '{{repl ThisHostInterfaceAddress "docker0"}}'
54 - name: webui
55 containers:
56 - source: replicated
57 image_name: trackit-webui
58 version: latest
59 ports:
60 - private_port: "8000"
61 public_port: "8000"
62 port_type: "tcp"
63 interface: "docker0"
64 - name: es1
65 containers:
66 - source: public
67 image_name: elasticsearch
68 version: 1.5.2
69 volumes:
70 - host_path: /trackit/data/es1
71 container_path: /media/es-data1
72 - host_path: /trackit/conf/elasticsearch
73 container_path: /var/log/elasticsearch
74 ports:
75 - private_port: "9200"
76 public_port: "9200"
77 port_type: "tcp"
78 interface: "docker0"
79 when: ""
80 - private_port: "9300"
81 public_port: "9300"
82 port_type: "tcp"
83 interface: "docker0"
84 when: ""
85 - name: redis
86 containers:
87 - source: public
88 image_name: redis
89 version: latest
90 ports:
91 - private_port: "6379"
92 public_port: "6379"
93 interface: "docker0"
94 when: ""
95 - name: loadbalancer
96 containers:
97 - source: replicated
98 image_name: trackit-loadbalancer
99 version: latest
100 ports:
101 - private_port: "80"
102 public_port: "80"
103 port_type: "tcp"
104 when: ""
105 - private_port: "81"
106 public_port: "81"
107 port_type: "tcp"
108 when: ""
109 - private_port: "443"
110 public_port: "443"
111 port_type: "tcp"
112 when: ""
113 extra_hosts:
114 - hostname: api
115 address: '{{repl ThisHostInterfaceAddress "docker0"}}'
116 - hostname: webui
117 address: '{{repl ThisHostInterfaceAddress "docker0"}}'
118config: []

This configuration describes all the containers we have. We can create links between them, set env vars, etc. Everything like a docker-compose file.

Release your first version

Save this configuration and go back on the Release page. We now need to release our first version. For that click on Promote


This dialog gives you the choice between 3 release channels. We will choose unstable for our example. Click on Promote Release.

Manage licenses and clients

Now your solution is ready to be shipped on premise. The next phase is to create and manage licenses for our clients. Each client will have its own license, and Replicated allows you to manage very precisely those licenses: duration, release channel, what action to take after expiration, etc.

Let’s create a license for our fictive customer of TrackIT:


Download the .rli license file and we are ready to install it on our client infrastructure.

Deploy your solution in your client's on-premise infrastructure

Install Replicated client

Once everything is set up, deploying your solution is very easy. You just need to install the replicated client, load the license and you’re all set!

Install replicated client in one command:

curl -sSL https://get.replicated.com/docker | sudo bash
It will prompt you some straightforward questions about your infrastructure (private ip, proxy, etc). Once it’s done, go on https://yourip:8800/

SSL Certificate

At first launch, you will need to provide a SSL certificate or chose to use a self-signed certificate. In our case we will choose this last option by providing a hostname and clicking Using Self-Signed Cert


Upload client license

Here we will need to upload the license file we previously created for our client. This file is unique for each client.


Secure with password and preflight checks

Choose a password for admin console and make sure all your preflight checks are ok (and correct them if not)


Enjoy!

Now you’re on the client dashboard and Replicated has already launched the last version of the release channel you’ve previously designated for your client.
Your solution is now available on premise, and if you go on http://yourip:8080/ You will see your TrackIT on premise instance. Congratulations!



About TrackIt

https://www.youtube.com/watch?v=QBiJ156cA2I


TrackIt is an international AWS cloud consulting, systems integration, and software development firm headquartered in Marina del Rey, CA.

We have built our reputation on helping media companies architect and implement cost-effective, reliable, and scalable Media & Entertainment workflows in the cloud. These include streaming and on-demand video solutions, media asset management, and archiving, incorporating the latest AI technology to build bespoke media solutions tailored to customer requirements.

Cloud-native software development is at the foundation of what we do. We specialize in Application Modernization, Containerization, Infrastructure as Code and event-driven serverless architectures by leveraging the latest AWS services. Along with our Managed Services offerings which provide 24/7 cloud infrastructure maintenance and support, we are able to provide complete solutions for the media industry.