Welcome!

PowerBuilder Authors: Dan Joe Barry, Ian Thain, Yakov Werde, Paul Slater, Bruce Armstrong

Related Topics: PowerBuilder

PowerBuilder: Article

Using EAServer 6.2 Export Configurations

Synchronization among servers

Version 5.x of EAServer allowed easy synchronization of components or packages among different servers, or a cluster of servers. Just right-click on the package or component, choose "Synchronize," add any necessary addressing information for target servers, and click "OK."

The user interface that you use for EAServer management has changed dramatically between version 5 and version 6.x, switching to a browser-based console. Notably missing in the EAServer 6.x Management Console is any way to perform a right-click synchronization the same way we did in 5.x. This seems like a fairly drastic omission, since synchronization is a key tool for managing deployment among various servers.

The good news is that the capability for these synchronization tasks does, indeed, still exist. It is just somewhere else (like so much in the EAServer 6.x Management Console). The better news is that it's actually easier, more automated, and more productive once you master the setup. The key is to use "Export Configurations" to manage your synchronizations.

Setting Up for Synchronization
What You Need

  • Servers: You will need to define a server for each synchronization target
  • Listeners: Each server you define will need an http listener
  • Export Configuration(s): You will define one or more Export Configurations to control what entities you wish to synchronize, and where you want them to go.

Creating Servers
In addition to the default servers you will see within your console, you will need to define additional server profiles for each server that you wish to use as a synchronization target. For example, let's say you want to synchronize a package from Jag62dev1 to Jag62dev2 as shown in Figure 1.

In this example, Jag62dev1 is your "default" server (the one you logged into with the Management Console) and Jag62dev2 is another EAServer 6.2 instance, not on the same machine, and not part of your cluster. You already have Jag62dev 1 defined in your Management Console. You will now need to define Jag62dev 2. Here's how you create additional servers for synchronization:

  • Left-click to Select "EAServer Manager"/"Local Server"/"Servers" in the Management console.
  • Right-click on "EAServer Manager"/"Local Server"/"Servers" and choose "Add" (see Figure 2).
  • On Page 1 of the New Server Wizard, click "Next."
  • On Page 2 of the New Server Wizard, "Server Name," enter the server name as defined for that server. For "Server Host Name," enter the Machine ID of the target server, (Refer to Figure 3). Click "Next."
  • For Page 3 of the New Server Wizard, leave "Create a new listener" checked and click "Next." We'll see shortly how to add the correct listeners for this server.
  • Click "Finish" when you reach Page 4 of the New Server Wizard. This will return you to the Management console with your new server selected, as shown in Figure 4.
  • Repeat for any additional servers you wish to synchronize to.

Note that at this point you cannot use these new servers for your synchronizations. There are currently no listeners defined for them. At a minimum, you'll need to create an http listener for each server, pointed to the proper port. We'll cover creating listeners next.

Creating Listeners
When you synchronize, you'll be using the "wsh" web application by way of the http listener defined for the target. This will happen automatically, and you won't even be aware of it unless something goes wrong with the synchronization.

Before you start, you need to determine what port (usually 8000, but this may change based on your installation) your target server is listening on for HTTP requests. Then start the "New Listener Wizard" by right-clicking on "Listeners" and choosing "Add." You'll see something similar to what is shown in Figure 5.

  • Click "Next" on Page 1 of the New Listener Wizard.
  • On Page 2 of the wizard, enter the name for the listener in the format <server_name>_http (for example Jag62dev2_http), then click "next,"
  • On Page 3, enter the Host Name (for example, "SRV001001") and the http port being used by that instance of EAServer. Again, this is usually 8000, but may vary among your installations. Figure 6 shows the New Listener Wizard filled in with the example values.
  • Click "Next", then "Finish" to create the New Listener Wizard.
  • Now you need to attach your new listener to your target server. We will address this topic next.

Attaching Listeners to Servers
Each server can have one or more of the available listeners attached to it. You do this on the "Listeners" tab for each server. In order to be a synchronization target, each of your servers will need to be associated with their http listener.

  • Left-click your (newly created) target server under the "Servers" heading to select it.
  • Now, select the "Listeners" tab by clicking on it. Figure 7 is an example of what you'll see. There should be no http listeners checked, and your new listener should be visible in the list. If you can't see the new listener, restart the EAServer.
  • Check the box next to the new http listener for your server (Jag62dev2_http in this example) and click the "Apply" button at the bottom of the page.

Note: Now that you know how listeners and servers work together, you can shortcut this process when you are creating a new server profile by clicking on the "Add New Listener" button on Page 3 of the New Server Wizard.

Now that you have created your target server and an http listener for it, you can create an Export Configuration to allow you to synchronize one or more packages to that server. We'll cover that next.

Creating Export Configurations
An Export Configuration is used to specify Class Files, Entities, Other files, and dependencies, and the target(s) for Synchronization. You will need to create a new Export Configuration, then set up what you want to synchronize, and where you want to synchronize it.

  • Begin by right-clicking on "Export Configurations" and selecting "Add."
  • Click "Next" on Page 1.
  • Give the Export Configuration a name (for example, "PB_Components") on Page 2, click "Finish."

Now you have created a new Export Configuration. The Management Console will select the new Export Configuration for you.

  • On the "General" Tab, fill in a description, and choose between "Abstract," "patch" and "server" for "Configuration Type". You can see in Figure 8 that we will use "Patch" for synchronizing packages among servers. According to Help:
    -Abstract: You can use an abstract export configuration as the foundation for other, buildable export configurations. You cannot build an abstract-type export configuration and use it for synchronization.
    -Patch: A set of files to apply to another server.
    -Server: Select this type if the export configuration contains an entire server.
  • Click "Apply" on the General tab and select the "Entities" tab. (Note: For the time being, we can skip the "Class Files" and "Dependencies" tabs.)
  • Expand "All Entities" and "EJB Modules" to expose the PowerBuilder packages (these have been wrapped as EJBs in EAServer 6.)
  • Select the package(s) you want to synchronize. You'll see a check mark appear at the end of the package (or module) once you have selected it. The selected module will also appear at the top of the Entities tab under "Included Entities." Click "Apply" and move to the "Synchronization" tab. Once again, we'll skip a tab - this time, the "Other Files" tab.
  • On the Synchronization tab, you will see the servers you defined in previous steps. Select one or more of these servers as your synchronization targets.
  • Select "Build Before Synchronizing" and click on "Apply."

Note: Consult Chapter 7, "Exporting Server Modules" in the Systems Administration Guide for additional details regarding the Export Configuration tabs.

At this point, your Export Configuration is complete. Next, we'll use it to synchronize packages to other EAServer 6 instances.

Performing the Synchronization
Once you have built an export configuration, you can use it to synchronize from one EAServer to another.

  • On the lower left of the Management Console, there is a dropdown for "Actions." One of the available actions is "Synchronize." Choose Synchronize from the dropdown. You will see a window similar to the one shown in Figure 9.
  • Click "Finish" to begin the Synchronization. Once the synchronization is complete, you will see a screen similar to the one shown in Figure 10.

Making the Most of Export Configurations
Refer to the Sybase System Administration Guide documentation for more information about synchronizing servers and using Export Configurations. With Export Configurations, you can create reusable specifications for both the contents and targets of synchronization operations. There is also a command-line tool, export-config, that can be used to synchronize export configurations from within a scrip file. Some ways to use Export Configurations include:

  • Synchronizing a subset of packages to a specific subset of servers
  • Synchronizing all packages involved in a release from a test server to one or more production servers.
  • Synchronizing all packages on a production server to a "production copy" server for backup or emergency development, or to begin the next development cycle.

More Stories By Millard F. Brown

Millard F. Brown is vice president of Power3, LLC, a company providing consulting and training services for the enterprise. He has beend developing PowerBuilder applications since PowerBuilder 2 and is the co-author of two new PowerBuilder 9 books: PowerBuilder 9: Advanced Client/Server Development and PowerBuilder 9: Internet and Distributed Application Development.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.