Yammer Application Creation
In order for the miner to operate it must have a connection to the relevant Yammer Network via a Yammer Application.
To create a Yammer application:
Login was a verified administrator.
Select 'Register New App'. Fill in all fields with sensible value (they will only been seen by the data miner operator). The 'Redirect URI' must be set the home page URL for the miner web server and must be 'https'.
Please provide the Client ID to us as this is required by the Analytics Engine.
General Miner Installation
- 10 GB Server Disk
- 50 GB Data Disk (script required /dev/sdb).
- RHEL Linux 7.2 or AWS Linux
- 2 GBytes Memory
- CPU Requirements: Any modern processor - not a heavy CPU user
- Access to Yammer API Servers
- Host name for server.
- SSL Configured on server.
We will provide you with a script to configure the instance. The script my be used as a Cloud-init script or run under 'root' after the operating system is installed. If you are using AWS EC2 while configuring the instance upload or copy paste the script to 'User Data' (under 'Advanced Details') in 'Step 3: Configure Instance Details'. For other cloud-based environments (e.g. Azure) refer to their documentation.
This script has a number of parameters at the top of the file which must be filled in. You will need to provide values as per below:
Your allocated SWOOP Analytics domain name (typically https://[clientname].swoopanalytics.com)
Matching secret for ClientID above. Only used for miner.
URL to your server. This must also be configured as your 'Expected Redirect' for the Yammer Application identified by the 'Client ID'. This must include 'https:'.
Blank for none or host and address for HTTPS proxy in format 'host:port'.
|OS||Either 'AWSLINUX', 'RHEL' (for Redhat Enterprise) or 'OTHER' if you want to try your luck (must support yum).|
|PASSPHRASE||A passphrase provided separately to decode the content contained in the script. Please Note: The code provided contains the credentials to update the SWOOP Analytics server. Keep it secure.|
This script is design to work as a cloud init script but may also be run as user root as an install script. When you run the script it will perform the following action (see comments in script):
- Install package groups to support application ('Web Server' and 'PHP Support')
- Configure PHP
- Install files necessary to run the application
- Install log rotator for miner
- Install miner configuration file
- Install miner scheduler (runs hourly)
- Install miner code downloader in web server.
These options can be changed by editing the '/var/www/html/config.php' at a later stage.
You may like to allocate a separate mount point (on separate disk) for the miner data (so you can snapshot and restore separately). All the data is stored by default in '/data' for AWSLINUX and '/var/www/storage' for RHEL.
Please also change firewall settings (for network and machine) to allow access to the web server on your server (e.g. for RHEL firewall-cmd --zone=public --permanent --add-service=http;firewall-cmd --reload ).
Miner Installation for AWS Linux
These instruction describe the critical configuration required to spin up the miner in AWS:
- Launch a new instance in AWS using the 'Amazon Linux' 64 bit AMI - Next.
- Selection instance size (minimum t.2small) - Next.
- On step '3' copy/paste (or upload) the completed (with configuration parameters filled in) installation script into 'User Data' - Next
- On step '4' add a new volume on device '/dev/sdb'. This will become your data disk. - Next
- Complete the rest of the process as required.
Once the miner has spun up you can look at /var/log/cloud-init-output.log to determine progress.
Miner SSL configuration
Yammer requires that the SSL be configured on the miner to support authentication.
There are two options:
- Rely on the certificates (self signed) installed on the server and ignore the errors you get in the browser.
- Install your own certificates base on the host name.
In the case of option 2 you will need to add the certificates to the server. The relevant files are as follows:
- SSL configuration file - /etc/httpd/conf.d/ssl.conf
- Certificate key file - /etc/pki/tls/private/localhost.key
- Certificate file - /etc/pki/tls/certs/localhost.crt
- CA Bundle file - /etc/pki/tls/certs/ca-bundle.crt
All the files are in PEM format and the certificate key file should not be password protected.
If you are using the 'CA Bundle file' you will need to uncomment it out in '/etc/httpd/conf.d/ssl.conf' by removing the '#' (i.e. change '#SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt' to 'SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt').
Once you have installed the script you will need to login with a Yammer user that has network admin permissions. This should be a dedicated account for the miner as it may affect the users day to day operation of Yammer.
To do this start up the root page by going to the 'REDIRECT' Url from above.
- Download the latest version of the yammer miner from the SWOOP Analytics engine (this is transparent). If your proxy is not configured properly you will find out here.
- Request permissions for access to Yammer.
- Test the Yammer connection and display a message that updates can proceed.
Updates will then be scheduled on an hourly basis and no other action is required.
Enabling and Configuring Sentiment Analysis
If your SWOOP subscription includes sentiment analysis, then add the following configuration for the miner by editing the '/var/www/html/config.php' file:
$config->SentimentAPI = 'https://westus.api.cognitive.microsoft.com/text/analytics/v2.0/sentiment';
$config->SentimentAPISubscription = 'xxxxxxxxxxxxxx';
$config->SentimentEnabled = true;
Replace x's with your own Azure Cognitive Services Subscription Key via the Microsoft Azure Portal. Click on "Show Access Keys" and then look at the hex value in "Key1".
Upgrading the Miner
The miner can be upgraded by logging to the miner and clicking the 'Update Software'.
If you are on the server console the miner can be updated with the following sequence of commands:
The two 'grep's will show you the version number changing.
Making the URL to the Miner accessible in SWOOP
It can be very helpful for other Yammer or SWOOP admins to be able to access the miner, and it is possible to store the URL to the on-premise data miner within the SWOOP end-user interface. To do this follow these steps:
- Log on to SWOOP
- Click 'Admin' in the footer
- Click on the 'Miner' tab
- Update the URL
Note - only Yammer verified admins and SWOOP admins will be able to access the SWOOP data miner.