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:latest2docker tag 9208bd226c4d registry.replicated.com/msolution/trackit-webui:latest3docker tag 9534122d0bc1 registry.replicated.com/msolution/trackit-loadbalancer:latest
And now, let's push them all:
1docker push registry.replicated.com/msolution/trackit-api:latest2docker push registry.replicated.com/msolution/trackit-webui:latest3docker 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.png7 console_title: Your App Name8backup:9 enabled: false10monitors:11 cpuacct: []12 memory: []13components:14 - name: mysql15 containers:16 - source: public17 image_name: mysql18 version: latest19 env_vars:20 - name: MYSQL_ROOT_PASSWORD21 static_val: "very_secret_password"22 volumes:23 - host_path: /trackit/mysql24 container_path: /var/lib/mysql25 ports:26 - private_port: "3306"27 public_port: "3306"28 port_type: "tcp"29 interface: "docker0"30 when: ""31 - name: api32 containers:33 - source: replicated34 image_name: trackit-api35 version: latest36 ports:37 - private_port: "5000"38 public_port: "5000"39 port_type: "tcp"40 interface: "docker0"41 env_vars:42 - name: DEBUG43 static_val: "true"44 volumes:45 - host_path: /trackit/log46 container_path: /root/log47 extra_hosts:48 - hostname: mysql49 address: '{{repl ThisHostInterfaceAddress "docker0"}}'50 - hostname: redis51 address: '{{repl ThisHostInterfaceAddress "docker0"}}'52 - hostname: es153 address: '{{repl ThisHostInterfaceAddress "docker0"}}'54 - name: webui55 containers:56 - source: replicated57 image_name: trackit-webui58 version: latest59 ports:60 - private_port: "8000"61 public_port: "8000"62 port_type: "tcp"63 interface: "docker0"64 - name: es165 containers:66 - source: public67 image_name: elasticsearch68 version: 1.5.269 volumes:70 - host_path: /trackit/data/es171 container_path: /media/es-data172 - host_path: /trackit/conf/elasticsearch73 container_path: /var/log/elasticsearch74 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: redis86 containers:87 - source: public88 image_name: redis89 version: latest90 ports:91 - private_port: "6379"92 public_port: "6379"93 interface: "docker0"94 when: ""95 - name: loadbalancer96 containers:97 - source: replicated98 image_name: trackit-loadbalancer99 version: latest100 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: api115 address: '{{repl ThisHostInterfaceAddress "docker0"}}'116 - hostname: webui117 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.
