Alright, so I don’t have much of a story for this one, but this is pretty damn cool…. not to mention useful for ShareFile Enterprise customers with Microsoft licensing!
What Am I Talking About?
A while back, Citrix ShareFile released a StorageZone Controller that integrated with Office Web Apps Server. Today, Office Online Server 2016 supersedes the Office Web Apps Server. Let’s look at how to deploy an OOS to enable previews for ShareFile on-prem.
To start, we need to go way, way back… almost to the beginning of time.. well, for me at least. Yes, I’m talking about the 1990s – a time ruled by cheesy TV, the new-fangled Internet that everyone was trying to figure out, neon tracksuits, etc.
This is also where the story for Citrix begins; and, thus, a blossoming partnership with Microsoft. For over 20 years, Citrix and Microsoft have had a strong partnership that allows our products to seamlessly integrate into one another to fill gaps for customers. Because of the partnership between Citrix and Microsoft, ShareFile’s StorageZone Controller can be configured for file previews and thumbnails using Microsoft Office Online Server 2016!
Thanks to the amazing relationship building by the ShareFile Product Management team, specifically, Chris Anderson, Citrix was able to leverage our Microsoft partnership to utilize Office Online Server 2016 for on-prem previews and view-only sharing. No longer are customers required to use Citrix managed storage and Microsoft hosted servers to preview files, enable view-only sharing and create thumbnail views for on-prem docs! (Today, as I write this, only these options are available for on-prem installations. To get the most out of your Office 365 subscription, ShareFile offers online co-editing with Citrix managed zones)
Here’s how to do it:
- A ShareFile Enterprise Account
- A customer managed StorageZone
- StorageZone Controller version 3.2 or later
- Admin permissions to manage StorageZones
- A customer managed StorageZone
- A publicly signed SSL cert and FQDN for your Office Online Server*
- Wildcards accepted
- Licensing to access and download Office Online Server 2016 from the Microsoft Volume Licensing Service Center
- A Windows Server 2012 R2 -OR- Windows Server 2016
*Optional but recommended
Configuring Office Online Server 2016
First, you’ll need to configure a server – Office Online Server 2016 runs on a Windows Server 2012 R2 (UPDATE: OOS 2016 April 2017 and beyond work on Windows Server 2016 as of late April 2017). Once the server joined to the domain, run the following script in PowerShell:
For Windows Server 2012 R2, enter:
For Windows Server 2016, enter:
After the roles and features install, PowerShell will notify that a restart is required. Additionally, it’s recommended that you turn on Windows Update to install all of the updates needed for OOS to properly run on the server. The first time I attempted setup, I ran into numerous Windows Update issues by attempting standalone installs of required updates. The easiest method is to just enable windows updates. I recommend doing this prior to restarting for the completion of the role/feature installation.
After the updates are installed and you restart, we’ll need to install the following items, per Microsoft here:
- (Minimum) .NET Framework 4.5.2
- Visual C++ Redistributable Packages for Visual Studio 2013
- Visual C++ Redistributable for Visual Studio 2015
Note: .NET installations require a restart if applications running .NET are not closed prior to installation.
Once complete, we’re on to the next step: Installing Office Online Server!!
You can download Office Online Server from Microsoft’s Volume Licensing Service Center (licensing required) and move run the “setup.exe” to begin the installation process. Defaults should be fine through the installation, unless you want to customize the install.
Close setup after installation is complete. The last piece we need to download are the Office Online Language Packs – available here from Microsoft.
Installation: complete! Now, we need to deploy our Office Online Server 2016. To do this, we’ll use PowerShell. For this post, I’m using NetScaler to load balance my OOS and deploying a single-server using HTTPS. If you’re planning to deploy a server or farm using HTTP, the configuration changes slightly in the deployment.
Deploying Office Online Server 2016
Open a new PowerShell window and import the Office Web Apps Module:
To deploy using HTTP, use the following:
New-OfficeWebAppsFarm -InternalURL "http://<servername>" -AllowHttp –EditingEnabled
When prompted regarding editing, select yes by typing “y”, press Enter.
To deploy using HTTPS, there’s a bit more to it:
New-OfficeWebAppsFarm -InternalUrl "https://<servername.domain.tld>" -ExternalUrl "https://<oos.domain.tld>" -CertificateName "<cert name>" -EditingEnabled
Where the internal URL is the internal FQDN of the OOS, the external URL is the external FQDN of the OOS and the is the friendly name of the certificate being used. When prompted regarding editing, select yes by typing “y”, press Enter.
Once the cmdlet is finished running, you should get an output like this:
Test your setup by navigating to the internal FQDN (HTTPS) or localhost (HTTP) discovery URL:
If our configuration is successful, you should see an XML page that looks similar to this:
Configure ShareFile for On-Prem Previews
Next, we’ll configure ShareFile to utilize the OOS for previews and thumbnails, as well as view-only sharing. To do this, we’ll need to log in to the StorageZone Controller and modify the configuration page.
Within the “Local Network Share Configuration,” there is a checkbox for “Configure Office Web Apps Preview.” Select the check box and enter the FQDN of the OOS as shown below:
Save the configuration. If we move to the monitoring tab, depending on your configuration, you will see a green checkmark to signal “OK” communication between the StorageZone Controller and the OOS. In my scenario, however, I have a red “X” since I am using a NetScaler that isn’t configured yet.
Not to worry, we know how to add our server, service and load balancing virtual server to NetScaler through CLI, right? I previously wrote about how to configure ShareFile in NetScaler using the CLI in my post No GUI? No Problem! Like we did when configuring ShareFile, we’ll start by building out from our network – first our server, then our service, then the load balancing vIP.
Log into your NetScaler via an SSH session, then enter the following commands:
add server <oos server name> <internal IP of OOS> add service <oos service name> <oos server name> SSL 443 add lb vserver <oos vserver name> SSL <NATed IP address> 443 –persistencetype COOKIEINSERT –timeout 0 –persistencebackup SOURCEIP –backuppersistencetimeout 2 –lbmethod LEASTCONNECTION
Next, we have to bind the service and the SSL cert to our load balancing vIP:
bind lb vserver <oos vserver name> <oos service name> bind ssl vserver <oos vserver name> -certkeyname <cert key name>
This should complete the configuration of your Office Online Server 2016 for use with ShareFile StorageZone Controller to produce previews, thumbnails and enable users to utilize view-only sharing. If we return to the StorageZone Controller configuration page and switch to the “Monitoring” tab, we should see a green check for our connection to the Microsoft Web Apps Sever.
Navigate to a folder in your ShareFile account that is stored on-premises in a ShareFile StorageZone and click the file name to open the content viewer page. You should see the file begin to render with the Office Web App for the corresponding file type. The final product should look like this:
Optional – NetScaler Monitoring
If you’re looking to get better monitoring on the server via NetScaler (i.e. monitor that the OOS is working, not just responding to ping), it’s possible to use a HTTP-ECV, or extended content verification, monitor on the service that was created. This allows the NetScaler service to check for items in the response, rather than just a response itself.
To configure the monitor and bind it to our service, we’ll type the following into the command line:
add lb monitor <oos monitor> http-ecv –send “GET /hosting/discovery” –recv “wopi-discovery” bind lb monitor <oos monitor> <oos service>