Install and Setup Zen4Sync


Overview

This page explains how to properly install and setup Zen4Sync.
It assmues that you are already familiar with the Zen4Sync Philosophy and the Zen4Sync Architecture.


Hardware and Software Requirements

The Zen4Sync Architecture relies on 4 components :
  • A database called Zen4SyncRepository,
  • One or more Orchestrators,
  • One or more Test Servers launching Zen4Sync Clients.

233880

Hardware

There are 3 typical deployments for a Zen4Sync architecture.
The difference only lies in the number of physical machines you'll need. The software needed won't change.
  • Minimal installation :
    • A single machine hosting all the components

240044

  • Typical installation :
    • One machine hosting the Zen4SyncRepository database and the Orchestrator
    • One machine per Test Server

240045

  • Large installation :
    • One machine hosting the Zen4SyncRepository database
    • One machine per Orchestrator
    • One machine per Test Server

240046

Software

  • The Zen4SyncRepository has to be deployed on a SQL Server 2008 R2
  • The Orchestrator and the Test Server are Windows Services hosting WCF Services that work on Windows XP, Vista and Seven.
  • The Zen4Sync Client is an executable which comes with the Test Server. It's installed with the Test Server by the Test Server installer.
  • Orchestrator, Test Server and Client are built using the .NET framework version 4.

Installation

First, download Zen4Sync v1.0.
The zip file contains all the resources needed to install a fresh Zen4Sync platform :
  • Zen4Sync_v1.0
    • Zen4SyncRepository_v1.0 : Contains the Zen4SyncRepository database creation SQL script,
    • Zen4SyncOrchestrator_v1.0 : Contains the Orchestrator installer,
    • Zen4SyncTestServer_v1.0 : Contains the Test Server installer.

The installation process consists in the following steps :
  • Create the Zen4SyncRepository database,
  • Install the Orchestrator
    • Configure its connection string used to access Zen4SyncRepository
    • Configure its WCF Services hosting
  • Install the Test Server
    • Configure its WCF Services hosting
    • Declare it as a new Test Server in Zen4SyncRepository
    • Configure the Orchestrator so that it can communicate with the Test Server through WCF
    • Configure the Test Server and the Client so that they can access the Orchestrator through WCF

Note: You'll need to make sure .config files are associated to a text editor on your machine.
This is mandatory since the installers will try to open .config files at the end of each installation.
If no editor is associated with .config files in Windows, installation will fail.


Zen4SyncRepository

Execute the Zen4Sync_v1.0\Zen4SyncRepository_v1.0\Zen4SyncRepository_v1.0.sql script on a SQL Server 2008 R2 instance.
This script will create the Zen4SyncRepository database and fill it with reference data needed by Zen4Sync.

Now the database is created, you'll need to chose the Zen4Sync password used by Zen4Sync to encrypt your personal data that Test Scenarios may contain.
To do so, execute the following stored procedure on Zen4SyncRepository :

EXEC [Admin].[sp_z4s_create_encryption_key] 'YourPasswordHere'

This password will be needed to launch Test Sessions.
There is no way for Zen4Sync to retrieve the password, so be sure to remember it.

Before proceeding to the Orchestrator installation, be sure to note the SQL Server instance name and its IP.
You'll need these pieces of information when configuring the Orchestrator.

Orchestrator

Installation

Execute the Zen4Sync_v1.0\Zen4SyncOrchestrator_v1.0\setup.exe installer on the machine hosting the Orchestrator.

N.B. : You'll notice there's also a Zen4SyncOrchestrator_v1.0.msi file. Executing the setup.exe file will make sure the proper version of the .NET framework is installed before automatically executing the .msi file.

240064
  • Click Next on the first screen.

240067
  • The Information screen tells you that you'll need to edit the Orchestrator configuration file once the installation is completed. We'll cover that step later.
  • Click Next

240083
  • Choose the installation directory. The Orchestrator configuration file will be deployed in this directory.

240068
  • Confirm the installation by clicking Next

240070
  • This installation is in progress...
  • Right after the installation is completed (after this screen) the installer will open the Orchestrator configuration file.
  • The file will be opened with the default program for .config file on the machine.
  • The open file is Zen4SyncOrchestratorHost.exe.config in the installation directory.

240071
  • Click Close to close the installer.

Configuration

You now need to configure :
  • The connection string used to access the Zen4SyncRepository database,
  • The WCF services hosting.
Connection String
In the configuration file, locate the following section :

<connectionStrings>
    <add name="Zen4SyncRepositoryEntities"
         connectionString="metadata=res://*/Zen4SyncRepository.csdl|res://*/Zen4SyncRepository.ssdl|res://*/Zen4SyncRepository.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=INSERT Zen4SyncRepository HERE;Initial Catalog=Zen4SyncRepository;Integrated Security=True;MultipleActiveResultSets=True;Application Name=EntityFramework&quot;"
         providerName="System.Data.EntityClient" />
</connectionStrings>

On the line starting with connectionString="metadata=... locate the part Data Source=INSERT Zen4SyncRepository HERE;.
In this part, replace INSERT Zen4SyncRepository HERE by the actual Zen4SyncRepository database address.

For instance, if you deployed Zen4SyncRepository on the same machine, on an instance named SQL2008R2 you'd write :
Data Source=localhost\SQL2008R2;
WCF Services Hosting
In the configuration file, locate the following section :

<services>
    <!--
    Zen4Sync Orchestrator WCF hosting configuration.
            
    This section defines how the Orchestrator services are hosted.
            
    Do not modify the service name.
    Do not modify the endpoint contract.
            
    Feel free to modify the address and the binding.
            
    If you need help to modify the configuration, please see
    http://zen4sync.codeplex.com/wikipage?title=configureWCFCommunications
    -->
    <service name="Zen4SyncOrchestrator.OrchestratorServices">
        <endpoint contract="Zen4SyncOrchestratorServices.IOrchestratorServices"
                    binding="netTcpBinding"
                    address="net.tcp://localhost:6000/Zen4Sync/OrchestratorServices"
                    bindingConfiguration="tcp"/>
    </service>
</services>

This section defines how are hosted the Orchestrator WCF Services.
You can modify the address and the binding of the WCF hosting.

By default, the Orchestrator is listening on net.tcp://localhost:6000/Zen4Sync/OrchestratorServices
For more details about the Zen4Sync WCF configuration, see how to configure WCF communications.

You can save and close the configuration file.
Windows Service start
Now everything is properly configured at the Orchestrator, you can start the Orchestrator Windows Service.
It's configured to start automatically on startup, but since you did not reboot it's not started yet.

Go on the Windows Services window and start the service named Zen4SyncOrchestratorHost

240074

If the service does not start, chances are that there is something wrong with the WCF configuration.
You can consult the Windows Event Viewer to obtain the error.

Test Server

Installation

Execute the Zen4Sync_v1.0\Zen4SyncTestServer_v1.0\setup.exe installer on the machine hosting the Test Server.

N.B. : You'll notice there's also a Zen4SyncTestServer_v1.0.msi file. Executing the setup.exe file will make sure the proper version of the .NET framework is installed before automatically executing the .msi file.

240077
  • Click Next on the first screen

240078
  • The Information page tells you that you'll need to edit configuration files once the installation is complete. We'll cover these steps later.
  • Click Next

240079
  • Choose the installation directory. The Test Server configuration file will be deployed in this directory.

240080
  • Confirm the installation by clicking Next

240081
  • This installation is in progress...
  • Right after the installation is completed (after this screen) the installer will open 2 configuration files :
    • The Test Server configuration file
    • The Zen4SyncClient configuration file
  • The files will be opened with the default program for .config file on the machine.
  • The open files are Zen4SyncTestServerHost.exe.config and Zen4SyncClient\Zen4SyncClient.exe.config both in the installation directory.

240082
  • Click Close to close the installer.

Configuration

You now need to configure :
  • The Test Server WCF services hosting,
  • The WCF communication from the Orchestrator to the Test Server,
  • The WCF communication from the Test Server and the Client to the Orchestrator.
WCF Services hosting
In the Test Server configuration file (Zen4SyncTestServerHost.exe.config, automatically open by the installer), locate the following section :

<system.serviceModel>
    <services>
        <!--
        Zen4Sync Test Server WCF hosting configuration.
            
        This section defines how the Test Server Services are hosted.
            
        Do not modify the service name.
        Do not modify the endpoint contract.
            
        Feel free to modify the address and the binding.
            
        If you need help to modify the WCF configuration, please see 
        http://zen4sync.codeplex.com/wikipage?title=configureWCFCommunications
        -->
        <service name="Zen4SyncTestServer.TestServerServices">
            <endpoint contract="Zen4SyncTestServerServices.ITestServerServices"
                        binding="netTcpBinding"
                        address="net.tcp://localhost:6001/Zen4Sync/TestServerServices"
                        bindingConfiguration="tcp" />
        </service>
    </services>
<system.serviceModel>

This section defines how are hosted the Test Server WCF Services.
You can modify the address and the binding of the WCF hosting.
By default, the Test Server is listening on net.tcp://localhost:6001/Zen4Sync/TestServerServices
For more details about the Zen4Sync WCF configuration, see how to configure WCF communications.
WCF communication from Orchestrator to Test Server
The Orchestrator needs to be able to communicate with the Test Server through WCF.

To do so, you'll need to complete the following steps :
  • Declare in the Zen4SyncRepository database that there is a new Test Server,
  • Edit the Orchestrator configuration file to add a WCF <client> endpoint toward the Test Server.

To declare the new Test Server in Zen4SyncRepository, execute the following code on Zen4SyncRepository :

EXEC [Admin].[sp_z4s_add_test_server]
      @param_testServerName = 'User friendly name of the Test Server'
    , @param_testServerHostName = 'Hostname of the Test Server'
    , @param_testServerWcfConfigSectionName = 'Name of the WCF <client> endpoint at the Orchestrator'
    , @param_testServerHostInstallDirectory = 'Install directory of the Test Server'

Now open the Orchestrator configuration file (<Orchestrator Install Directory>\Zen4SyncOrchestratorHost.exe.config).
Locate the following section :

<!--
Zen4Sync Test Servers WCF Communication configuration.
        
These endpoints are used to communicate with the Test Servers.        
There should be one endpoint per Test Server in your Zen4Sync platform.
The endpoint names must mirror the values of the testServer_wcfConfigSectionName column.
        
Do not modify the endpoint contracts.
        
Feel free to edit the address and the binding.
        
If you need help to modify the configuration, please see
http://zen4sync.codeplex.com/wikipage?title=configureWCFCommunications
-->
<client>
    <endpoint name="TestServer1"
                contract="Zen4SyncTestServerServices.ITestServerServices"
                binding="netTcpBinding"
                address="net.tcp://localhost:6001/Zen4Sync/TestServerServices"
                bindingConfiguration="tcp"/>
</client>

This section defines one <endoint> per Test Server.
The endpoint name must match the value you used when adding the new Test Server (@param_testServerWcfConfigSectionName parameter of the [Admin].[sp_z4s_add_test_server] stored procedure).
The rest of the WCF configuration must mirror the configuration at the Test Server.
WCF communication with Orchestrator
The Test Server and the Zen4SyncClient need to communicate through WCF with the Orchestrator.

You need to complete the following steps to configure the WCF communications :
  • Edit the WCF <client> section of the Test Server configuration file,
  • Edit the WCF <client> section of the Zen4SyncClient configuration file.

Open the Test Server configuration file (<Test Server Installation Directory>\Zen4SyncTestServerHost.exe.config) and locate the following section :

<client>
    <!--
    Zen4Sync Orchestrator WCF communication configuration.
            
    This endpoint is used to communicate with the Orchestrator.
    Its configuration should mirror the configuration at the Orchestrator host.
            
    Do not modify the endpoint name.
    Do not modify the contract name.
            
    Feel free to modify the address and the binding.
            
    If you need help to modify the WCF configuration, please see
    http://zen4sync.codeplex.com/wikipage?title=configureWCFCommunications
    -->
    <endpoint name="Zen4SyncOrchestratorServices"
                contract="Zen4SyncOrchestratorServices.IOrchestratorServices"
                binding="netTcpBinding"
                address="net.tcp://localhost:6000/Zen4Sync/OrchestratorServices"
                bindingConfiguration="tcp" />
</client>

Edit the endpoint configuration to mirror the configuration at the Orchestrator.

Open the Zen4SyncClient configuration file (<Test Server Installation Directory>\Zen4SyncClient\Zen4SyncClient.exe.config) and locate the following section :

<client>
    <!--
    Zen4Sync Orchestrator WCF Communication configuration.
            
    This endpoint is used to communicate with the Orchestrator.
    Its configuration should mirror the configuration at the Orchestrator host.
            
    Do not modify the endpoint name.
    Do not modify the contract name.
            
    Feel free to modify the address and the binding.
            
    If you need help to modify the WCF configuration, please see
    http://zen4sync.codeplex.com/wikipage?title=configureWCFCommunications
    -->
    <endpoint name="Zen4SyncOrchestratorServices"
                contract="Zen4SyncOrchestratorServices.IOrchestratorServices"
                binding="netTcpBinding"
                address="net.tcp://localhost:6000/Zen4Sync/OrchestratorServices"
                bindingConfiguration="tcp" />
</client>

Edit the endpoint configuration to mirror the configuration at the Orchestrator.
Windows Service start
Now everything is properly configured at the Test Server, you can start the Test Server Windows Service.
It's configured to start automatically on startup, but since you did not reboot it's not started yet.

Go on the Windows Service window and start the service named Zen4SyncTestServerHost

240087

If the service does not start, chances are that there is something wrong with the WCF configuration.
You can consult the Windows Event Viewer to obtain the error.

Last edited Aug 2, 2011 at 2:01 PM by Christophe_, version 54

Comments

No comments yet.