Axon Middleware Multi-tenant solution
- 1.1 Settings apply to: Android app-[yes]; HTML webpage - [yes]
- 1.1.1 Description:
- 1.1.2 Goal:
- 1.1.3 Use case 1:
- 1.1.4 Use case 2:
- 1.1 Settings apply to: Android app-[yes]; HTML webpage - [yes]
- 2 How to create a new project/subdomain?
- 3 How to add demo database on to subdomain?
- 4 How to redirect the device to proper subdomain?
- 5 How to open subdomains on the PC to access manager and PC preview
Settings apply to: Android app-[yes]; HTML webpage - [yes]
Description:
Axon Middleware software allows the creation of multiple projects on the same server. This means that you can have multiple installations or subdomains on a single server, and each project will have its own separate database and integrations, such as Property Management Systems (PMS) or other software. The shared components across all projects are the audio/video content and the server infrastructure on which the software runs. This capability enables efficient utilization of server resources and allows for the management of multiple projects simultaneously.
Goal:
In this article you will learn how to create a new subdomain (new project) on the same MW server.
Use case 1:
The Telco provider provisions a single MW server where our projects are installed. The UDP streams are provided by the Telco, while each project on the server has its own separate database content and connection to a Property Management System (PMS). This setup allows for efficient management and organization of multiple projects on a centralized server, with each project having its own distinct database and integration with the PMS.
Use case 2:
Our partner sets up our IPTV servers in their data center, where they have a dedicated Middleware (MW) server and Gateway (GW) server to serve multiple hotels. The GW server is equipped with numerous DVB-S and HDMI cards, allowing for the capture of live streams and the creation of multicasts and High-Speed Link (HSL) streams. This setup enables the distribution of these streams to four projects, resulting in cost savings on hardware as there is no need for separate GW servers and cards for each hotel.
How to create a new project/subdomain?
First, you need to follow the usual installation process for the Middleware (MW). Detailed instructions can be found in the provided article. During the installation, you will create a project and corresponding database named "portal_base".
Once the MW is installed, you can proceed to install the demo database, which will populate your system with sample data. Instructions for installing the demo database can be found in the provided resource. It is advisable to make any necessary modifications to the PORTAL_BASE database at this stage, as it will serve as the base for creating subdomains.
After successfully setting up the portal_base and ensuring it is ready, navigate to the designated folder where you will execute a command to create a new subdomain.
Go to folder:
cd /var/www/portal_base/tools/domain/
Run command to create new subdomain:
./new.sh
The next step prompts you to enter the project name, ensuring that you use a name without spaces. Press Enter to proceed.
Following that, you will be asked whether you want to create DNS links for each subdomain. Confirm this by typing y.
In the subsequent step, you will be given the option to choose between a clean database or making a clone from the base domain. If you wish to copy data from the base domain, type clone. Alternatively, if you want to add data from the demo installation or manually input other data, type clean.
Subsequently, the system will commence the creation of the subdomain, which typically takes around 1 minute. Once the process is complete, a notification confirming its completion will be displayed. Additionally, you will notice the creation of a new folder at /var/www/portal_project1/ on the server, along with a new file under /etc/named/.
Open the new file and edit the IP address of the server, if it differs from 192.168.200.254
Then run the following command to restart named (DNS):
systemctl restart named
After that, you have the MW server prepared. The next step is to redirect the devices to the proper subdomain.
How to add demo database on to subdomain?
After creating the subdomain, if you have opted for a clean database, you will need to add some data to it. To accomplish this, you can execute the demo database file that was used for installing the base database. Within the file, there are two demo projects with the content: Ship, Hotel, Hospital.
Run the file and follow the provided steps. Initially, it will prompt you to specify the database you wish to install. Enter the name of the database and press enter.
In the second step, a list of all detected projects (databases) will be displayed. Enter the name of the project you want to copy the database to and confirm by pressing enter.
If you happen to make a mistake at any point, you can cancel the process by using the keyboard command Ctrl + C.
The only missing component will be the videos, which you will need to upload manually to the /data/content folder.
How to redirect the device to proper subdomain?
When devices are initially connected to the multi-domain server, they will appear in the portal_base manager. From there, you have three options for redirecting these devices.
Redirect a device to the proper subdomain using the IPTV manager
Devices can be moved using the IPTV administration. Each device is registered in the System → Device settings → Devices menu, where you can select it and by pressing the Move to other domain button you can move it to another domain.
Redirect device to proper subdomain manually with configuring subdomain.json file
While it is possible to configure IP or MAC ranges in the "domains.json" file, we strongly advise against doing so as it can be prone to errors. However, if you are interested in understanding how it works, please reach out to us at support@nevron.eu, and we will provide you with the file's path.
The path to the "domains.json" file is: /var/www/portal_base/data/domains.json
For instance, in the Hospital project, you can specify the IP range that should connect to the corresponding subdomain. All devices have a link to connect to http://stv.base.ntv, and our redirector will appropriately direct them to the relevant subdomain based on the information stored in this file.
When you move a device using our Manager, the MAC and IP addresses of the device is written in the file as seen below:
How to open subdomains on the PC to access manager and PC preview
To edit the hosts file on your PC, follow these steps:
Search for the Notepad icon and right-click on it.
Select "Run as Administrator" to open Notepad with elevated privileges, enabling you to save the file properly. If you have administration restrictions on your laptop, ask your administrator to add the links to the file.
In Notepad, click on "Open" and navigate to the following path: C:\Windows\System32\drivers\etc\hosts
Open the hosts file.
Add the links to your subdomains using their respective names. You can find the links on the server in the /etc/named/ directory.
Save the hosts file.
Editing the hosts file allows you to associate specific domain names with corresponding IP addresses, ensuring proper resolution of those domain names on your PC.
Type in the IP address of your IPTV server. If you are using a laptop on the public network, then add the public IP of the IPTV server. If you are using a laptop on the IPTV network, then add the following IP address.
10.10.5.33 iptv.ship.ntv
10.10.5.33 iptv.hotel.ntv
10.10.5.33 iptv.hospital.ntv
10.10.5.33 iptv.nevronitv.si
10.10.5.33 manager.ship.ntv
10.10.5.33 manager.hospital.ntv
10.10.5.33 manager.hotel.ntv
Then save file. Make sure to click Save, not Save As.
Open the browser and type the link to subdomains:
link to the manager: http://manager.hotel.ntv/
Link to PC preview: http://iptv.hotel.ntv/smarttv/index.html
login: admin/admin
When you initially access a link, your PC gets registered in the Device menu. From there, you can add it to a specific room and click "Refresh devices" to view the complete dashboard. If the device is not associated with an active stay in any room, it will only display the TV channel list.
Please note that the process described above allows you to manage and organize devices within the system for better control and customization.
Nevron Support Team
If you need assistance or encounter any issues, please contact our support team. You can reach us on support@nevron.eu or submit a ticket at https://nevron.atlassian.net/servicedesk/customer/portal/1/group/1/create/1 Please provide detailed information about the problem you're experiencing, including any relevant error messages or system details. We appreciate your patience and will work diligently to resolve your concerns.