...
The MLA can be installed on any machine in your facilty facility which:
- has the qube-core package installed
- can reach the supervisor service on the supervisor host
- can reach the public internet
...
Many linux machines do not have a graphics head on them, and so installation must be done using the command line and installing directly from the RPM. This will necessitate setting up the credentials file and cron job by hand.
For a list of command-line arguments to the MLA, see Metered License Agent Advanced Usage.
Expand |
---|
title | Click here to expand the manual installation details... |
---|
|
Install the MLA rpm No Format |
---|
[root@ip-192-168-66-21 /tmp]# rpm -ivh qube-mla-6.9-2.CENTOS_6.7.x86_64.rpm
Preparing... ########################################### [100%]
1:qube-mla ########################################### [100%]
[root@ip-192-168-66-21 /tmp]# |
Install the credentials into a file readable only by rootIn the following example, the credentials are stored in a file name /root/.mla_creds. You may use any file name you wish, but this path must be matched when you setup the cron in a later step. No Format |
---|
[root@ip-192-168-66-21 ~]# cat /root/.mla_creds
export PFX_MLS_USER=<your MLS user name>
export PFX_MLS_PASSWD=<your MLS password>
[root@ip-192-168-66-21 ~]# chmod 600 /root/.mla_creds |
Test the credentialsYou must source the credentials file in order to load them into the environment; the command to source will vary depending on your shell. No Format |
---|
sh-4.1# . /root/.mla_creds
sh-4.1# /usr/local/pfx/qube/mla/mla --check-creds --debug
[2017-04-10 16:29:42] john.burk:axxxxxxf at https://mls.pipelinefx.com/api/v2/login
[2017-04-10 16:29:43] Credentials test passed. Exiting... |
Run all the testsThis will test: - MLA -> supervisor connectivtiy
- MLS login credentials
- Supervisor MAC address is registered on the Metered Portal.
No Format |
---|
sh-4.1# /usr/local/pfx/qube/mla/mla --check --debug
[2017-04-10 16:33:06] Testing supervisor connectivity...
[2017-04-10 16:33:06] Qube supervisor defined in qb.conf: 192.168.66.21
[2017-04-10 16:33:06] - passed
[2017-04-10 16:33:06] Testing Metered License Server login credentials...
[2017-04-10 16:33:06] john.burk:axxxxxxf at https://mls.pipelinefx.com/api/v2/login
[2017-04-10 16:33:07] - passed
[2017-04-10 16:33:07] Testing MAC address registration and authorization...
[2017-04-10 16:33:07] - passed
[2017-04-10 16:33:07] All checks passed. Exiting... |
Once all tests pass, setup the cron file to run the MLA every minuteNote that the command run includes the "source" command, with the path to the credentials file. No Format |
---|
sh-4.1# ls -l /etc/cron.d/com.pipelinefx.meteredLicenseAgent.cron
-rw-r--r-- 1 root root 107 Apr 10 16:40 /etc/cron.d/com.pipelinefx.meteredLicenseAgent.cron
sh-4.1# cat /etc/cron.d/com.pipelinefx.meteredLicenseAgent.cron
MAILTO=''
* * * * * root . /root/.mla_creds && /usr/local/pfx/qube/mla/mla --debug --records 1
|
Optionally restart the cron daemonNOTE: the cron daemon will detect changes in already existing files at the top of every minute, but will only scan the /etc/cron.d directrory for NEW files once an hour. For this reason, if you don't wish to wait for the top of the hour to begin testing the cron, you will need to restart the cron daemon to add the new file to cron immediately. No Format |
---|
sh-4.1# /etc/init.d/crond restart |
Check the MLA logverify that the MLA is correctly posting records to the Metered portal No Format |
---|
sh-4.1# tail /var/log/mlalog
[2017-04-10 16:41:01] Local journal not found, creating database PFX_metered.db
[2017-04-10 16:41:01] Created database PFX_metered.db
[2017-04-10 16:41:01] License data: used:0, prepaid:64, metered:0
[2017-04-10 16:41:01] Records collected so far: 1
[2017-04-10 16:41:01] john.burk:axxxxxxf at https://mls.pipelinefx.com/api/v2/login
[2017-04-10 16:41:02] POST'ing records to MLS at https://mls.pipelinefx.com/api/v2/records
[2017-04-10 16:41:02] Reporting {"insert": 1, "account": "jburk testing", "metered_key": "[metered]\nhostid = 02:EF:66:EF:90:97\nlicensee = \"jburk testing\"\nmax = 32\nexpires = \"Apr 11, 2017 00:41:02\"\nkey = 32450283602d5539f0d5f072cef69276", "update": 0, "authorized": true}
[2017-04-10 16:41:02] Removed all POST'ed records from table license_data
[2017-04-10 16:41:02] "[metered]\nhostid = 02:EF:66:EF:90:97\nlicensee = \"jburk testing\"\nmax = 32\nexpires = \"Apr 11, 2017 00:41:02\"\nkey = 32450283602d5539f0d5f072cef69276"
[2017-04-10 16:41:02] Supervisor authorized for metered licensing: true |
Clean up once the logs show that the MLA is reporting correctlyIf there are no error messages in the log file, and you see "Supervisor authorized for metered licensing: true ", edit the cron and remove the --debug --records 1 arguments, so that your cron now looks like: No Format |
---|
sh-4.1# cat /etc/cron.d/com.pipelinefx.meteredLicenseAgent.cron
MAILTO=''
* * * * * root . /root/.mla_creds && /usr/local/pfx/qube/mla/mla > /dev/null 2>&1 |
|
...
Note |
---|
Please note that if PipelineFX has determined that your account is not in good standing, we may de-authorize your metered license account. In this case, your supervisor(s) will enter the Disabled state within 15 minutes. Check the Metering Authorized field in the Account Details section on the MLS website. |
...
See Also
Metered License Agent Advanced Usage