Friday, 3 September 2010

Installing Merchandising Server 2.0

Merchandising Server is a fairly recent addition to the XenApp suite and one which I have held off implementing a while, for a couple of reasons.  The first is that frankly, I have enough XenApp servers now thanks very much, and the second is that its use in life appears to be limited to supporting the Windows and Mac editions of the Citrix Receiver.

We have a big implementation of the Agent which works very nicely so I had no need for the Receiver, so no need for the Merchandising Server.

But then the newly released HDX Experience Monitor for XenApp only supports the Receiver and I need that, so here we go.

By the way, here’s the Citrix eDocs site for Merchandising Server:

http://support.citrix.com/proddocs/topic/merchandising-20/merchandising-20.html

Downloading the Merchandising Server

The Merchandising Server is unusual in that it comes as a XenServer or VMware exported VM.  The VM is actually a 1GB CentOS 5 machine which comes all ready to configure, so the process can be over remarkably fast.  I started with little idea what I was doing at about 9am and had a working system before lunch, hopefully these notes will help someone get it done a bit faster. 

These download links will require a valid logon to My Citrix.

XenServer download:
https://www.citrix.com/English/SS/downloads/details.asp?downloadId=2303447&productId=1689163

VMware download:
https://www.citrix.com/English/SS/downloads/details.asp?downloadId=2303453&productId=1689163

The main server download is a “bz2” file – 7zip should be able to extract this for you, its about 4gb extracted. There is also a plug-ins ZIP file which is worth downloading, though not essential.

I’m assuming here that you have a XenServer machine – mine is a slightly old XenServer 5.5 server so all the instructions are for the XenServer edition, I doubt the VMware edition is much different.

Importing the VM into XenServer

Firstly, setup your XenServer machine and XenCenter client tools on your workstation, if you don’t have these.  Your XenServer host will need 1gb of spare memory and 20GB spare storage. 

Right click your XenServer in XenCenter, Import VM:

image

Browse to the extracted xva file and click Next

image

Click Next and Import to select the host and storage repository.  Select the networking – link it to your real network.  It won’t use DHCP, so until you give it an IP it won’t do anything.

Click the Logs tab in XenServer to import:

image

At this point I have had the unhelpful message “This file could not be imported”.  I downloaded the whole file again and extracted it with 7zip instead of WinRAR, then I imported it again using locally installed XenCenter tools and a Console session, rather than XenApp streamed tools in an RDP session.  I don’t know which of these steps fixed it, but it imported fine the second time. 

A successful import should take about 10 minutes.

Once the server is imported it should start automatically by default.

Select your Server in XenCenter and click the Console tab to view its setup functions

Configuring the Merchandising Server’s Network Configuration

You will need to know the Hostname you want to use for the server, and IP addresses for the server, its netmask, DNS server IPs and the gateway IP to get the server working.  You should now see the following screen in your Console window:

image

Click 1 and enter a hostname and domain, then follow the menu through to steps 2-5 to complete the rest of the networking.  When you’re done, press 9 to save the changes:

image

Type yes to confirm, then enter a new root password.  The system will reboot and return to the menu

To finish this section, update the XenServer tools while you have chance.  Click the DVD Drive drop down menu and select xs-tools.iso.  In the rebooted server’s Console window, select 8 for Diagnostics.  You will now see these options:

image

Select 3 and press y to start the upgrade – this will cause one last server reboot.  In the Search tab of your XenServer’s host you should now see CPU and memory usage for the new guest OS.

image

You are done with XenCenter now and can close it.  The rest of the config is in the web interface.

Configuring the Merchandising Server

Before you can use the web interface, you may need to configure the DNS record to point to the IP that you have the server.  Pick something friendly as the DNS name as this could be something you’ll expect users to remember.  Mine is called “xenmerchant”

You will get a certificate error as it starts with a self signed certificate with less than a month left to run:

image

After accepting the certificate you get put into the default download page.  You don’t want this, so remove the download part of the URL – you want http://servername/appliance

You should now get this:

image

Username: root

Password: C1trix321

Once logged in click Change Root Password first – enter a decent password.

image

Working up the menu, click Configure AD

image

Fill this in, using a service account on your Active Directory that has a non-expiring password.  This should be a non admin user and only needs to be a member of Domain Users.  These are some example settings – obviously, change your source name to a domain controller, the Bind DN and Bind Password to your non admin user and Base DN to the Distinguished Name of your domain. 

image 

Click Save and Sync.  The Sync will take a few minutes and you might need to wait for it to complete.

image

Click Permissions and enter your administrators name (your name?), then click Search.  Select yourself and click Edit.  Give yourself Administrator privilege and Click Save.  Set up any other admins you need.

Click Log off and Log in again with your domain username and password.  Your username should be in the form DOMAIN\username.

You finally see all the options and it should look like this:

image

Adding plug-ins

Merchandising Server appears to be basically a mechanism to get a real Citrix client to your users, and so it doesn’t do much without any plug-ins.  You can download clients directly from the Citrix site (although of course you can only really get the latest client from the Citrix site itself).  If you do this, remember to get the metadata file too.

Once you have the XML and executable file for the plug-in, click Upload in the plug-ins section and select them.  You should not normally have to change the metadata (though you can).  Once the upload is complete it will be present in Uploaded Plug-ins.  Don’t worry about the fact you have not configured the client yet – you will configure the essentials later.

Otherwise, just click Get New under the plug-ins section.  It should detect the available plug-ins and download them – assuming it understands your internet connection.  Personally, my proxy server foiled it.

Creating Rules and a Delivery

Now you have a plug-in uploaded to the server, its ready to be able to deploy it. 

Click Rules under Deliveries.

image

You might have lots of rules here – of course you might not care who downloads clients from your server and might just put in one very permissive rule.  In my case I only care that the PCs are domain computers, so I just selected Computer Domain Membership.  You might want to create rules for specific groups of users of operating systems, such as Mac users.

Click Save

Click Create / Edit to set up a Delivery.

image

Enter sensible values for this – have a think about the Completion Text, the users will see it!

Click the Plug-ins tab at the top and click Add to select the plug-in that you want to distribute.  Note this can be a delivery to Uninstall a client as well as Install it.

Click the Configuration tab – this will look different depending on what was in the Metadata file for the client you just selected.  In the case of my Online plug-in, it asks me to supply the Web Interface Server URL.  This field is required.

Click Rules and select one of the Rules you created earlier.  Note if you checked the Default Delivery button on the first page, this page doesn’t do anything.

Click the Schedule tab and then button and if you are happy to save it without scheduling it for a specific time.

Using the server

That’s the easy bit.  Go to the website from a PC and enter the DNS name you created earlier.

image

Agree to the Terms of Use and click Download to start the installation of the Receiver.  This will require Firefox 2 or IE7, .NET Framework 2 and local admin rights – at least for the install.  After installation the Receiver will be able to keep the clients up to take based on the rules and deliveries you specify.

Wednesday, 4 August 2010

Installing EdgeSight Server 5.3 with SQL Server Express 2008 Express on Windows Server 2008 R2

EdgeSight is an essential part of a modern XenApp implementation, though only Platinum customers get the full blown version.  In Citrix’s usual way these are named “Advanced” and “Basic” – there’s never a “normal” one anymore, is there?!

Anyway, if you need the Advanced features you can install a test system for a couple of weeks and join a freshly installed XenApp server to it – you get a 14 day grace period followed by a 7 day allowed “violation” period before it stops working.  Bear in mind you can have multiple EdgeSight servers, though an individual XenApp server can only see one at a time.  Whether to have the EdgeSight Agent installed on every server is an interesting question – it does create an overhead – but without that overhead you might not realise your server is overloaded.

Below are basic instructions on installing an EdgeSight 5.3 server to monitor a XenApp 6 farm, though to be honest they are mostly the same as the instructions for EdgeSight 5.2 for XenApp 5 on Server 2008 R1.

I’m using SQL Server 2008 Express.  Express does work with EdgeSight, with the exception of Scheduled Reports, which rely on the SQL Agent, a feature of full blown SQL Server.  Bear in mind that the use of SQL Express is not supported, and depending on how much data you keep its 2gb limit on databases could be a serious issue.  For a temporary system to run in Advanced mode for a fortnight though, its going to be fine.

In this example I installed EdgeSight and SQL on a single server – this might not be a good idea.

I did this install with UAC turned off.

 

Preparing SQL - Install SQL Express 2008 with Advanced Features

You need the Advanced Features if using Express as you need Reporting Services.  If you’re installing full SQL Server, install the Reporting Services components.

Download from:

http://www.microsoft.com/downloads/details.aspx?FamilyID=B5D1B8C3-FDA5-4508-B0D0-1311D670E336&displaylang=en

Run the installer (as Administrator). Click Installation on the left and then select “Next sql server stand-alone installation…”

clip_image002

Ignore the warnings about SP1 if you’re on Server 2008 R2 – you can install this afterwards

Accept the license terms and continue through install accepting the defaults.

Run install and select Reporting Services, Database Engine, Client Tools.

clip_image003

Accept defaults on the Instance Configuration screen, choosing a named instance of SQLExpress. Click Next, Next.

Click “Use the same account for all SQL Server services” and enter a domain user created for the purpose.  This domain user should be an administrator on the server. 

image

Click Next. Set to Mixed Authentication and set the SA to something you will remember.  Setup the administrators to something sensible. 

Click the Data Directories tab. Set all Data directories to c:\MSSQL except backup - set to c:\MSSQL\Backup.  Okay, so you don’t need to do this, I just like to keep the data somewhere easy to get to, not buried in Program Files.

clip_image005

Accept the rest of the defaults until you get to the main Install, which should take a few minutes. Close the installer when finished.

Download and install the “Microsoft SQL Server 2005 Backward Compatibility Components” for the version of SQL 2008 you have installed (its part of the feature pack). The x86 version (should you need it – if this is Server 2008 R2 you should be using x64 software though) is at:

http://go.microsoft.com/fwlink/?LinkId=123702&clcid=0x409

The x64 version is at:

http://go.microsoft.com/fwlink/?LinkId=123703&clcid=0x409

This is because the SQL-DMO Objects are required but not installed in SQL Server 2008.

Finally, update your SQL installation to the latest service pack.  At the moment this is SP1 (x64 edition) – this will take a while.

 

Installing Edgesight

Turn off IE ESC – Enhanced Security Configuration.  This is because the last stages of setup use the local browser, though you could use a browser on another system if you really wanted to.  It is turned off in Server Manager or group policy – click here for detailed instructions.

Download EdgeSight 5.3 or extract the XenApp 6 media and run Autorun

If getting it from the XenApp 6 media, click Manually Install Components, Server Components, Application Performance Monitoring, EdgeSight Server

clip_image006

By default a server will not have the necessary pre-requisites and will probably come up with these messages:

clip_image007

clip_image008

image

Go to Server Manager, select Role Manager. Click Add Roles, select Web Server and go on to choose its components. Select Application Development (with default sub-components), Windows Authentication, IIS 6 Management Capability. Click Next and Install.

In Server Manager again, add a Feature – Message Queuing, with default options.

Reboot and try again.

Select Website and Database assuming this is a new system

clip_image010

Accept the EULA

Enter your SQL details and click Test Connect. If you have used the full version of SQL you probably just need to put the server name, otherwise SQL Express or another named instance will need the instance name. Use the sa password to connect and test the connection.

image

Assuming this is a new installation, create a new database. If not, you should be able to join an existing one.

clip_image012

Enter a domain username and password to connect to the database.  Personally I make this an administrator on the server and a sysadmin of the SQL Server instance.  I’m not sure if these steps are needed I’m afraid. 

image

Choose defaults for the recovery model and paths, and click Install.

At the end, click Finish to load the website. Make sure again that IE ESC is off!

clip_image014

Click Next to start creating your Company (which is the way that EdgeSight will organise a group of servers).

clip_image016

Enter the name of your super administrator – this can be a group or a person but should be something you will remember. EdgeSight can be tied to active directory but you will need to be able to get in this account too.

Enter the SMTP details for the server to send out mail as well.

Enter your licensing details and the level of EdgeSight Agent to support.

image

The license server needs to be v4.5 or higher. If you have platinum XenApp you can use the Basic And Advanced Agents. If you have Advanced or Enterprise you can only use the Basic clients unless you have specifically bought Advanced EdgeSight Agent licenses.

Note you do not actually need to get these details right to click next, so if your license server is not ready (or will never be ready and you are just building a temporary server) you can continue in the grace period for 14 days. You will get a message on every screen in EdgeSight saying there is a problem with the license server until valid details are entered. 

Click Next when done and you will see the main login screen. Enter the Super User credentials to log in.

clip_image020

Open another IE window on your server and go to http://localhost/Reports_SQLEXPRESS/Pages/Folder.aspx?SelectedTabId=PropertiesTab

Fill in as below:

clip_image021

Go back to your new EdgeSight website and enter the username and password you just gave admin rights to the database. Enter the URL as:

http://sqlservername/ReportServer_SQLEXPRESS/

Obviously, put in the name of the server instead of “sqlservername”. 

You should then see a popup window which will run through setting up EdgeSight in Reporting Services. It will error at the end if using SQL Express with “Error publishing default schedules…” – this is because SQL Express does not support this functionality.

clip_image024

Configuring a XenApp Server to use the EdgeSight Server.

Install the client on the server and reboot (yes, you need to reboot).

Go to control panel and switch the view from Category to Small Icons or Large Icons.

Click Citrix System Monitoring Agent

clip_image025

Click Mode to change between Advanced and Basic, depending on your license.

clip_image026

Click the EdgeSight server tab and enter your server name – should still be port 80 unless you changed it. Obviously, it needs to be able to contact that server on that address.

Click OK and within about 5 minutes you should see an email about the new instance that has been discovered, assuming you set up the emailing details properly.

In the EdgeSight website, look in Configure > Devices to try to find your device. If you can’t see it, look in Configure > Unmanaged Devices

clip_image027

This should be enough for a basic implementation of EdgeSight.  There is a lot of work to do if this is going to be a fully fledged systems monitoring a lot of systems, and the size limitations of SQL Server Express will mean that in long term use you might need to adjust the Data Grooming settings.  By default they keep data up to 30 days – I’ve had to set this down to 7 days before.  If its full SQL, kiss goodbye to a lot of disk space instead.

You can also link it into Active Directory and administer it with your normal account, but hang onto the Super Administrator username and password in case it has trouble connecting to AD in the future.