Follow

Installing a Local Profiler

Introduction

PaaSLane Local Profiling ensures that all your source code remains in your control. Files are uploaded to your servers from the client and then Profiled on your installed Profilers. Only metadata and results data are pushed to the PaaSLane SaaS. All communication with the PaaSLane SaaS is done through and initiated by your installed Agent. 

 The local profiling capability is comprised of two components. The first is the PaaSLane agent, which has the responsibilities of being a gate keeper for the following:

  1. Files to be profiled - When artifacts are uploaded to be profiled, from the UI or API, they are submitted to the registered agent. In the case of local profiling, this agent is installed in your location.
  2. Updated rules - As new rules are updated in the PaaSLane SaaS environment, they are distributed to local profiling environments through the local agents.
  3. Meta-data submission - During the profiling process, the meta-data associated with profile is sent from the profilers, through the agent, and up to the SaaS environment. 

 Second, you can run as many profiler installations as needed to handle the number of files being processed. Each additional profiler will need to have access to the shared directory defined by the agent and the ability to make HTTP requests to the agent. 

Requirements

Customer Setup

A url, that is reachable by all internal users and is assigned to the agent defined above, needs to be registered at PaaSLane so that uploaded files can be directed to this agent. You will need this url when you go through the assembly wizard. It is also recommended that you obtain a valid SSL certificate for this to allow for uploading in a secure setting. If you do not have an SSL certificate from an approved authority, you may need to import your certificate to the different browsers that your customers use. Finally, if you do not have access to an SSL certificate, the wizard will generate a self-sgned certificate for you.

Java 1.7

Java 1.7 is required on each machine that will be running the agent or profiler.  Please make sure that a Java 1.7 SDK is installed on each instance and that the directory is noted for later in the installation

Keystore

Communication between the agent and PaaSLane and from the browser to the Agent (for uploading files) can utilize SSL.  As mentioned before, it is recommended that you acquire a certificate or use the one generated in the Assembly Wizard.

If you choose to use our self-signed packaged certificate or your own certificate that is not from an authorized provider, you will need to add the certificate to each client trying to upload to your local provider. For instructions on how to do that, please see (Self-Signed SSL Certificate).

Wizard

At this point, you should log into PaaSLane(click) and proceed to the "LOCAL PROFILING -> SET UP" menu item and follow the directions included on the page. The last steps should be to "Assemble" and then "Download".

The output of this process will be downloaded versions of either "install-clientagent<datestamp>.zip" or "install-profiler<datestamp>*.zip". We will use those files in the next section.

 

Install

Agent and 1st Profiler

The agent includes a profiler which will be configured as well. 

  1. Unzip install-clientagent.zip - This will unzip the agent to a folder called paaslane. Directory references below will be relative to paaslane.
  2. Keystore (only necessary if using custom cert) - This can be found in the agent/cert directory. The agent is packaged with a .keystore file containing a public certificate for PaaSLane. By default, the Agent will look at these when running. You can add your certificate to the existing .keystore. (Self-Signed SSL Certificate)
  3. Install and run the Agent
    1. Linux - Under agent/bin, run "runall.sh" to start the Agent.
    2. Windows - The windows agent is package as a service.  The following .bat files are included to manage the services. You should run each command as an Administrator.   From Windows Explorer, move to Under agent/bat and right click on the respective ".bat" file and select “Run As Administator”.
      1. installService.bat - This will install PaaSLane Agent as a windows service.
      2. startService.bat - Starts the PaaSLane Agent service
      3. stopService.bat - Stops the PaaSLane Agent service. This will not uninstall the service.
      4. uninstallService.bat - Uninstalls PaaSLane Agent as a service.

 The agent includes a profiler which has been configured as well.

 

Additional Profilers

Additional Profilers can be installed in order to allow for scaling. Profilers make requests to the Agent to obtain work and updates. Communication is one way to the agent. Profilers can be installed on Windows or Linux. Windows is required for profiling .NET code. 

  1. Unzip install-profiler<date>.zip - This will unzip the profiler to a folder called paaslane. Directory references that follow will be relative to paaslane.
  2. Keystore(only necessary if using custom cert)  - Under profiler/cert, Profilers are not required to run using SSL, however communication with the agent will be in SSL.  Like the agent, the profiler is packaged with a .keystore. You can add your agent’s certificate to these as needed. (Self-Signed SSL Certificate)
  3. Install and run the Profiler
    1. Linux - Under profiler/bin, run "runprofiler.sh" to start the Profiler.
    2. Windows - The windows profiler is packaged as a service.  The following .bat files are included to manage the services. You should run each command as an Administrator.   From Windows Explorer, move to profiler/bat and right click on the respective ".bat" file and select “Run As Administator”.
      1. installService.bat - This will install PaaSLane Profiler as a windows service.
      2. startService.bat - Starts the PaaSLane Profiler service
      3. stopService.bat - Stops the PaaSLane Profiler service. This will not uninstall the service.
      4. uninstallService.bat - Uninstalls PaaSLane Profiler as a service.

 

Properties for additional configuration

  1. Environment Settings
    1. Linux - Under agent/bin and profiler/bin, there are files setenv.sh which contains environment variables that can be configured. Changes require that the service be restarted.
    2. Windows - Under agent/conf and profiler/conf, there are files wrapper.properties which contains environment variables that can be configured. Changes require that the service be uninstalled and then re-installed.
  2. Agent Properties - agent/conf/paaslaneagent.properties
    1. agent.shared.path - Set to the path that will be shared with the profilers for passing around data.
    2. customer.auth.token - Set to your generated security token
    3. agent.proxy.type = route - No authentication is done
      1. agent.proxy.host - The host name or ip address without the protocol for the machine where the proxy resides. 

        Ex. www.myproxy.com

      2. agent.proxy.port - The port for sending traffic through.

        Ex. 80, 8080, 443

    4. agent.proxy.type = basic - Basic authentication is done
      1. agent.proxy.host - The host name or ip address without the protocol for the machine where the proxy resides. 

        Ex. www.myproxy.com

      2. agent.proxy.port - The port for sending traffic through.

        Ex. 80, 8080, 443

      3. agent.proxy.username - Username to authenticate with the proxy server
      4. agent.proxy.password - Password to authenticate with the proxy server
    5. agent.proxy.type = ntlm - Basic authentication is done
      1. agent.proxy.domain - The domain or workgroup name where the proxy resides.

        Ex. mycompanydomain

      2. agent.proxy.host - The host name or ip address without the protocol for the machine where the proxy resides. 

        Ex. www.myproxy.com

      3. agent.proxy.port - The port for sending traffic through.

        Ex. 80, 8080, 443

      4. agent.proxy.username - Username to authenticate with the proxy server

      5. agent.proxy.password - Password to authenticate with the proxy server

  3. Profiler Properties - profiler/conf/paaslaneprofiler.properties
    1. agent.shared.path - Set to the path that will be shared with the profilers for passing around data.
    2. local.agent.url - The URL of your agent.

      https://localhost:8443/paaslaneagentclient

  4. Windows Properties - If you are installing on Windows and wish to profile .Net, you need to set the following fxcop properties.
    1. fxcop.location - Path to fxcop

      Ex. C:/Program Files (x86)/Microsoft Fxcop 10.0

    2. silverlight3.location - Path to Silverlight v3.0

      Ex. C:/Program Files (x86)/Reference Assemblies/Microsoft/Framework/Silverlight/v3.0

    3. silverlight4.location - Path to Silverlight v4.0

      Ex. C:/Program Files (x86)/Reference Assemblies/Microsoft/Framework/Silverlight/v4.0

    4. silverlight5.location - Path to Silverlight v5.0

      Ex. C:/Program Files (x86)/Reference Assemblies/Microsoft/Framework/Silverlight/v5.0

 

Windows Installation

When installing on a Windows machine, Windows 2008 R2 is recommended.

If you are installing on a windows machine, please be sure to set the JAVA_HOME system environment variable to the location of the root of install. This needs to be done on each windows instance running either the agent or profilers: 

  1. JAVA_HOME=c:\java\jdk1.7.0_11

Installing  .NET Frameworks and FXCop

If you anticipate needing to profile .Net applications, you will need to manually download the following windows libraries to each instance running a profiler. 

Use the following Download links to installers for .NET Profiling:

.NET Framework 1, 2, 3.5, 4.0, and 4.5:


http://www.microsoft.com/en-us/download/details.aspx?id=26
http://www.microsoft.com/en-us/download/details.aspx?id=6523
http://www.microsoft.com/en-us/download/details.aspx?id=21
http://www.microsoft.com/en-us/download/details.aspx?id=17851
http://www.microsoft.com/en-us/download/details.aspx?id=30653
http://www.microsoft.com/en-us/download/details.aspx?id=40779

 

FxCop 10.0:

http://www.microsoft.com/en-us/download/details.aspx?id=6544 (readme.txt)
http://www.microsoft.com/en-us/download/details.aspx?id=8279 

Note: To install FxCop 10.0 is a two step process:

1. Run the winsdk_web.exe installer.

2. Then to install FxCop, run:

  • %ProgramFiles%\Microsoft SDKs\Windows\v7.1\Bin\FXCop\FxCopSetup.exe

SilverLight SDK 3,4,5:

http://www.microsoft.com/en-us/download/details.aspx?id=16011
http://www.microsoft.com/en-us/download/details.aspx?id=7335
http://www.microsoft.com/en-us/download/details.aspx?id=28359

ASP.NET MVC 2,3,4:

ASP.NET Web Pages (Razor):

http://www.microsoft.com/en-us/download/details.aspx?id=15979
http://www.microsoft.com/en-us/download/details.aspx?id=34600

Microsoft .NET Portable Library Reference Assemblies 4.6:

http://www.microsoft.com/en-us/download/details.aspx?id=40727

Turn off “Microsoft .NET Framework 3.5.1” feature:

To turn Windows features on or off, follow these steps:

1.     Click the Start button , click Control Panel, click Programs, and then click Turn Windows features on or off.  If you're prompted for an administrator password or confirmation, type the password or provide confirmation. 

  • (Note: In Windows Server 2008 R2, use Server Manager --> Features to turn Windows features on or off.)

2.       If “Microsoft .NET Framework 3.5.1” is selected, uncheck the box. Click OK.

 

Configuring FXCop

  1. Download FxCopCmd.exe.config from here:
  2. Go to the directory where FxCop was installed.
    • (Using the default FxCop install location is recommended C:\Program Files (x86)\Microsoft Fxcop 10.0)
  3. Overwrite the FxCopCmd.exe.config in that directory with the one you just downloaded.

 

Comments

Powered by Zendesk