Tag Archives: Smart Office

Scaling out Smart Office server

Scaling out the Smart Office server can be done for different reasons. Being able to serve more users or creating a more robust environment.

When talking scaling out an environment it is not only Smart Office server that needs to be considered, it is also the Grid Registry, Grid Session Provider and the connection points into Grid (Grid Routers) that must be included.

This article will describe one way of creating an environment with Smart Office that can handle a larger amount of users and also be more resilient for malfunction hardware using Infor Smart Office 10.2.1 and Infor ION Grid 11.1.13.

As a starting point Grid, LDAP Session Provider and Smart Office have already been installed.

Adding a host to Grid

The first thing needed is to add another host in the Grid and to be able to do that the host must first be added in Lifecycle Manager (LCM). The process of adding a host in LCM is described in the LCM install guide. The steps are shortly described below.

  1. On the new host go to the LCM portal page, normally http://server:4062 and download the Service Installation.
    1_LCMService
  2. Install the service with java.exe –jar installLcmService.jar
  3. After the installation the new host will be visible in the LCM client.
    2_LCMAddedHost

Now when LCM knows about the new host, Grid needs to span to the new host as well.

To add a host to the Grid:

  1. Find your Grid in the LCM client, right click on Grid Hosts and select Add Host.
    2_HostAdded
  2. In the Add Host dialog, select the host previously added to LCM and press Next followed by Finish. Change ports, name etc if needed.
    4_LCMAddHostDialog
  3. In the Grid Topology View the new host should be visible.
    5_GridViewHostAdded

Grid Registry

The Grid Registry cannot run simultaneously on several hosts, it can only run on one host at a time. But there is a failover mechanism. The failover mechanism will make sure the Grid Registry starts on another host if the primary host malfunctions.

To enable failover for Grid Registry do the following.

  1. In the LCM client find the Grid Hosts, right click on the ones that is tagged with registry and select Configure Registry Failover.
    6_FindRegistry
  2. In the Configure Registry Failover dialog, select the new host and press Next followed by Finished. (The Grid needs to re-start when changing the Grid Registry failover settings).
    7_ConfigureRegistryFailoverDlg
  3. Wait for the configuration task to finish and Grid to start again. On the failover host should now be tagged with failover.
    8_VerigyRegistryFailover

Grid Routers and Load balancer

A load balancer must always be placed in front of Grid to be the single entry into the Grid to ensure that even if a host where a Router exists on dies it is still possible to connect to the Grid. A client will not know if a Grid host is failing or another host is added since it always connects to the load-balancer. But what if the load-balancer dies? There are techniques for having clustered load-balancers as well, but that is out of scope for this article.

In order for the load balancer to balance the calls to different servers there must be a Grid Router on each host. The load-balancer is configured with the hosts and https ports to the Grid Router on each host.

The load-balancer should also have a health mechanism so it automatically removes a hosts if it malfunctions.

Where to put the SSL certificate? In the load balancer, in the Grid Routers or in both can be debated. There are pros and cons with all solutions. The solution that works best with all Grid Session Providers and has less security flaws is to put the SSL certificate in the Grid Routers and configure the load-balancer for TCP pass-through.

9_SSL_Loadbalancer

Note that the SSL certificate used in each Grid Router must be issued with the load balancer address and it is recommended to use the same certificate in all routers.

Grid Routers

Either create a new Grid Router on each host that should be included by the load balancer or configure one router to be on started on <all hosts>.

10_Router

Below is the Default Router set to be started on all hosts and they will all be using the same HTTPS port.

11_Router_AllHosts

SSL Certificate

SSL certificates are managed per host, not per Grid Router, and must therefore be added for each host. It is recommended to use the exact same certificate on all hosts, clients may be confused if getting a different SSL certificate depending on which host is being called through the load balancer.

Before creating any SSL certificates decide the address of the load balancer.

To create a SSL certificate from an internal Certificate Authority (CA) and add it to all hosts do the following.

  1. In Grid Management Pages go to Configuration Manager -> Security->Certificates and click Manage Certificate on one of the hosts.
    12_Certificates1
  2. Click the Create Certificate Signing Request (CSR).
    13_Certificates2
  3. In the Create Certificate Signing Request (CSR) dialog make sure to change the Host FQDN (CN) value to the load balancer address. In this example I have also added the two host names as alternative names to remove certificate error if accessing them directly without going through the load balancer. It is not necessary to do so. Click the Create Request Overwrite Keys.
    13_Certificates3
  4. Send the certificate request to your Certificate Authority and receive a certificate chain back, usually a .p7b file.
  5. Now import the certificate chain by clicking Import Signed SSL Certificate and select the file received from the certificate authority, followed by  Import Certificate, followed by Import.
    14_Certificates4
  6. The SSL certificate is now located on one of the hosts, to be able to import it on the second host export the SSL certificate by clicking Export SSL Certificate with private key. Use Oracles Java key-store and give the key-store a password.
    15_Certificates5
  7. Go back to Configuration Manager->Security->Certificates and select the other host.
  8. Click Import SSL Certificate with private key. Select the file previously exported.
    16_Certificates6
  9. Now both of the Grid Routers will use the same SSL certificate.

Load balancer

In a production environment a load-balancer is most often a piece of hardware, for more information contact your hardware vendor. In a test environment a software load-balancer can be used. For this blog post I used http://nginx.org/ which has a community edition that is free and works on several operating systems including Windows. In my example I have configured nginx with TCP pass-through to two servers. The configuration file is similar to this.

stream {
  server {
    listen 3443;
    proxy_pass grids;
  }
  upstream grids {
    server server1.infor.com:55151;
    server server2.infor.com:55151;
  }
}

For more details see the nginx documentation.

Grid Applications

Some Grid Applications can be scaled out to several machines, other cannot. Some can run several instances at the same time and some cannot. Both Smart Office and the different Grid Session Providers are Grid Applications and have some different characteristics. The details are listed below.

Even if a Grid Application cannot run two instances at the same time most Grid Applications can be started on another host if the original host dies. Within minutes a fully working environment is up and running without human interaction.

There are a couple of things that needs to be prepared and considered when implementing a complex environment when it comes to Grid Applications.

  • Deploy Grid Applications to hosts
  • Configure Grid Bindings
  • Make sure there is enough memory

Deploy Grid Applications

Deploying a Grid Application to a host is a matter of distributing the binaries, nothing will run just by deploying a Grid Application to one or more hosts.

To deploy a Grid Application to a host, in the LCM client find the installed Grid Application, right click and select Application Maintenance->Deploy Application on Hosts

17_DeployApplication

In the Deploy Application on Hosts dialog, select the hosts where the application should be able to run and press Next. Press Finish.

The Grid Application is now possible to start on all hosts it is deployed to.

Grid Bindings

The Bindings for a Grid application is found on the application page in Grid Configuration Manager.

18_Bindings

Click the pencil to edit the Binding.

19_Binding1

For a robust scenario you would like to have the Grid Application run on a minimum of two hosts always to ensure having at least one instance running even if a host dies. Mark the hosts where this binding should be enforced and select Constraint Type to be Per Host. This configuration will result in one instance of the application running on each of the selected hosts.

If having Constraint Type set to Global and Min to 2 would result in almost the same behavior. There will still be two instances of the application but it is not defined if the running instances will be started on the same host or not.

When having an application that only can run in a single instance the following configuration would result as a failover behavior. Constraint Type = Global and Min = 1.

20_Binding2

If the host where the application run on dies, Grid will make sure that the application is started on another host that has been marked in the Binding. By using the Preferred Host property it is possible to hint where the application should run if all hosts are working fine. Within minutes a new instance has started if the first host dies.

Resources

When having Grid Applications that cannot run several instances at the same time but have deployed the application to several hosts Grid will start the application on another host if the preferred host dies. Verify that there is enough memory left on the host where the application is supposed to start before a failover will occur.

Note that memory consumptions from other application will not be taken into account.

Grid Session Provider

There are several Session Providers that can be used in Grid (LDAP, Windows, SAML and DSSO). In practice it is only the SAML Session Provider that supports both failover and can run on multiple hosts and there fore . For these reasons it is recommended to always use SAML Session Provider in environments that requires high stability.

Use the methods describes above to deploy the session provider to additional hosts and configure the bindings. The table below describes what each Session Provider supports.

Session Provider Can be deployed to several hosts Can run multiple instances
LDAP SP 1.10.14 Yes* Yes*
Windows SP 1.10.7 Yes No
SAML SP 1.13.12 Yes Yes
DSSO SP 2.0.7 No No

* LDAP SP can only be deployed to several hosts if configuring the connection to the LDAP with the LDAP protocol. If using LDAPS or Start TLS protocol the LDAP SP will not function properly if deployed to another host. Note! The LDAP protocol should never be used since it sends userid and password in clear text over the network.

Configure Smart Office when using a load-balancer

The Smart Office server must be configured to execute on more than one host and the installation point must be configured to use the load-balancer.

Server

Configuring Smart Office server when using a load-balancer is done with a few steps.

  1. Deploy Smart Office Server to more than one host by following the steps above.
  2. Configure the Smart Office binding to use more than one host, set Constraint Type to Per Host and set Min to 1. After saving the Binding the Smart Office will immediately start on the new host.

Installation Point

When installing the Smart Office client Microsoft Click Once verifies that the installation point URL stated in the installation matches how the installation is accessed. When accessing the installation point through a load balancer, it is the load balancer address that must be put in the Click Once installation. The Smart Office client must also know the URL to the Smart Office server, which also goes through the load balancer.

To change these URLs open the management pages for Smart Office in Grid Management Pages and click Installation Point Configuration.

21_InstallPointConfiguration1

Change the Installation URL and HTTPS URL to the Grid to point to the load balancer. I am using the https port only but if the load-balancer is configured to pass through both http and https, http can of course still be used for the installation point. Do not forget to save (some versions of Smart Office has a bug that wrongly shows the old values after saving).

22_InstallPointConfiguration2

Now use the normal procedure described in the installation guide on how to export/sign/import the installation point.

To install Smart Office client open an Internet Explorer and navigate to https://<load_balancer_address>:port/mango

Smart Office limitations when using a load-balancer

Collaborations does not work properly when using a load-balancer and should be turned off.

Turn off collaborations by setting the property Enable collaboration server to false.

23_Collaboration

M3

Both M3 UI Adapter and M3 H5 Client Enterprise can be configured as Smart Office server, both be deployed to several hosts and run multiple instances at the same time. The process of deploying the application to another host and configuring the Grid Bindings are exactly the same for both M3 UI Adapter and M3 H5 Client Enterprise.

Finding the logs for trouble shooting

How do I find the logs for trouble shooting? In this post I’ll cover the Smart Office log as well as the M3 UI Adapter log. I will not be covering where logs are located in LSF, Landmark, Ming.le or IFS.

For Smart Office there are a few logs that can be of interest. In a previous post we had information about how to find the client log. Continue reading

Installation tips for upgrading (migrating) from 10.0.4.x to 10.1 or 10.2

During Ask the Experts webinar for (mainly) Lawson customers we got a lot of good questions. I’m going to try and answer some of the questions in coming posts and today I’m going to give you some tips and tricks for updating and migrating data to 10.1 and later. Continue reading

Smart Office 10.2

Smart Office 10.2 is released for M3! I don’t have a release date for Lawson Applications but I will let you know as soon as it is released. This post contains overview information about the new features that we have developed in 10.2 for both M3 and Lawson applications. There are many new features and we will start a series of posts to cover all new functionality in greater detail.

Continue reading

Hyperlink columns in M3 lists

This post is a follow-up to a question in the comment section on a previous post called Adding a new column in a M3 List. The question was how to add a clickable hyperlink in a new list column. This could be solved in a generic way by creating your own data template and template selector or by reusing existing functionality in MForms. In this post I will just cover the second part by reusing existing functionality. The more generic solution for custom content in list cells might be covered in a future post.

Continue reading

Migrating from Smart Office 10.0.5.2.16 to 10.1.1.0.19

There are quite a few customers installing 10.1.1 and migrating their data from 10.0.5.2.x.
It is important to note that this is still a migration of data and not an upgrade path. There is a new stand-alone tool (Mango Admin Tool) that will help you with the export and import of data.
Some important notes to consider:

  • You can only have one Smart Office installation per grid. (It does not matter if the name has hanged to MangoServer)
  • If you want to use the same grid you need to: upgrade to 10.0.5.2, export the data, move the zip or download it, then uninstall and install 10.1.1.
  • Separate .lawsonapplications need to be installed on 10.1.1 before importing the data, but the configuration will be imported. Installed features will not be migrated but installed Mashups will be included
  • For Lawson DSSO you should NOT configure Smart Office to use the DSSO Router. You should use the Default Router with the DSSO session provider.
  • You can run 10.1.1 on MS SQL server instead of the built in H2 database.
  • You can use the Mango Admin tool to export and import data in the same version, cloning your production setup to test for example.

One of our customers, has blogged about his experience in his blog, Potato IT – Upgrading from Smart Office 10.0.5.2.16 to 10.1.1.0.19. He covers upgrading M3 User Adapter and Smart Office.

Script assemblies in MForms

The most common way to extend the functionality of M3 panels in MForms is to use JScript files but there are other options such as Script assemblies and MForms extensions. With Script assemblies you can write code in most languages supported by .NET such as C# and VB.Net and you can actually debug your code using Visual Studio. Instead of deploying the script as a JScript file you use a .NET assembly in the form of a DLL file.

Continue reading

Connecting a Mashup to a role or user in 10.0.5

In Smart Office 10.0.5 we introduced support for connecting Mashups to roles. This is something that we should have implemented from day one but there are a few reasons why we haven’t. First of all Smart Office is a platform for different applications, we did not want to create yet another custom tool where you manage and create LSO roles. M3 have their roles, S3 has there roles, roles are related to Security and there is another team who handles Security. We were pushing for a common solution for Lawson. The Smart Office server has moved to the Grid (9.1.3).

Authentication is handled by the Session Provider in the grid and in the grid it is possible to connect users to roles. The session provider can be connected to for example IFS, Infor Federated Services, were you set up claims and claim rules. Continue reading

Tooltips with MI data in M3 lists

A script requirement we recently heard of was to be able to show tooltips on cells in a M3 list and that the tooltip value should be retrieved using a MI-program. The specific requirement was to get the user name for list columns that contains M3 user IDs. The idea is to use this in M3 lists where the user ID is shown in a column but the user name is not part of the list. Continue reading

MIListPanel with Open Event

In this post I will use a MIListPanel in order to list customers and then add an open event that will open CRS610 for the selected customer.
I’ll start by getting the Bookmark for the program I want to open on the double click in the list.

1. Start the program and select to create a bookmark on the canvas.
2. Open the shortcut and make a copy of the URL. Continue reading

Calling M3 APIs in JScript on a Background Thread

In 9.1.3 we introduced a generic support for running any M3 API without having to create WS Stubs. If you are on a previous version you can still call a web service but it requires much more work including the use of Smart Office SDK. All calls to M3 APIs have to be done on a background thread!

There is simply no excuse for doing this the incorrect way. If you call the web service on the UI thread the entire UI will freeze for the time period that the call takes. In normal cases this will not be noticable but that does not matter. No calls to other servers on the UI thread.

Continue reading

Enable a button on a selected item

A few days ago I wrote a post about how to use the generic property setter in order to set IsEnabled on a button. I got the question how to do it in 9.1.2. Unfortunately the M3List does not expose the CurrentItem property in 9.1.2 so for M3Lists I have no solution. But for lists using the M3 APIS (MIListPanel) and the DataListPanel you have the option of checking the SelectedValue of the list and use a converter that will change a not null value to true.

My example has a list of Countries and a button that will be disabled unless a row in the list is selected. Continue reading

Personalizations in M3 – Manager

A few days ago I wrote about Personlizations in M3. What I forgot to mention is the Personalization Manager in M3. It’s an admin tool for managing personlizations for users and groups and for different servers installations. This is the tool to user for moving personlizations around, for example from a test environment to a production environment.

Formatting dates and numbers in a Mashup

Lawson Smart Office comes with a set of converters developed for making formatting issues easier in Mashups. Much formatting can be done using StringFormat and this is standrad WPF. But if you want to use the M3 user’s format or if you want to surpress Zero there are converters that we have developed for you. Continue reading

Selecting the first row in a M3 list to trigger CurrentItemChanged

When you have a M3 list in a Mashup a common scenario is that you would like to have the first row selected so that any dependant mashup control can react to CurrentItemChanged.

This is for example a scenario when you open the Mashup from a panel with JScript so that you pass in a Customer id, CUNO. You want to load related information right away. This requirement is something that we will consider for future versions to have an option to say, ‘select first line on startup’.

But until then there is a workaround that involves using a JScript to set the selected item in the list. I’ll do an example with a mashup that loads CRS610 and reacts to CurrentItemChanged to load related data in a MIPanel. Continue reading