Create a simple IceGrid

Source: Internet
Author: User

Transfer

Http://migege.com/archives/how-to-implement-a-simple-icegrid.html

Here, I will create an IceGrid with a registry and two nodes, where node1 and registry run on the same computer (but different processes, the IP address is 192.168.3.95 ), node2 runs on another computer (IP Address: 192.168.3.68 ). The environment is XP SP2 + Ice 3.2.0.

First, create the directory MyIceGrid under the D Drive (you can choose any one), and then create sub-directories db and db \ registry and db \ node1 to store the data of registry and node1.

Save the following configuration information for MyIceGrid as config. grid:

IceGrid. InstanceName = MyIceGrid

#
# The IceGrid locator proxy.
#
Ice. Default. Locator = MyIceGrid/Locator: default-h 192.168.3.95-p 12000

#
# IceGrid registry configuration.
#
IceGrid. Registry. Client. Endpoints = default-p 12000
IceGrid. Registry. Server. Endpoints = default
IceGrid. Registry. Internal. Endpoints = default
IceGrid. Registry. Data = D: \ MyIceGrid \ db \ registry
IceGrid. Registry. PermissionsVerifier = MyIceGrid/NullPermissionsVerifier
IceGrid. Registry. AdminPermissionsVerifier = MyIceGrid/NullPermissionsVerifier
IceGrid. Registry. SSLPermissionsVerifier = MyIceGrid/NullSSLPermissionsVerifier
IceGrid. Registry. AdminSSLPermissionsVerifier = MyIceGrid/NullSSLPermissionsVerifier

#
# IceGrid node configuration.
#
IceGrid. Node. Name = node1
IceGrid. Node. Endpoints = default
IceGrid. Node. Data = D: \ MyIceGrid \ db \ node
IceGrid. Node. CollocateRegistry = 1
# IceGrid. Node. Output = db
# IceGrid. Node. RedirectErrToOut = 1

#
# Trace properties.
#
IceGrid. Node. Trace. Activator = 1
IceGrid. Node. Trace. Patch = 1
# IceGrid. Node. Trace. Adapter = 2
# IceGrid. Node. Trace. Server = 3

#
# Dummy username and password for icegridadmin.
#
IceGridAdmin. Username = foo
IceGridAdmin. Password = bar

Save the configuration of node1 as the config. node file:

#
# Sample configuration file for the IceGrid node daemon
#

#
# Proxy to the IceGrid registry
#
# Ice. Default. Locator = MyIceGrid/Locator: tcp-h 192.168.3.95-p 4061
# Ice. Default. Locator = MyIceGrid/Locator: ssl-h localhost-p 4062
Ice. Default. Locator = MyIceGrid/Locator: tcp-h 192.168.3.95-p 12000

#
# The name of this node; must be unique within an IceGrid deployment
#
IceGrid. Node. Name = node1

#
# The node object adapter listens on all interface using an OS-
# Assigned port
#
IceGrid. Node. Endpoints = tcp

#
# The directory where the IceGrid node maintains its data
# (Server configuration files etc .)
# This directory must exist when icegridnode starts
#
# Under Vista we recommend using:
#
# C: \ Users \ Local Service \ AppData \ Local \ ZeroC \ icegrid \ node1
#
IceGrid. Node. Data = D: \ MyIceGrid \ db \ node1

#
# Redirect server stdout and stderr to files in this directory:
#
# Under Vista we recommend using:
#
# C: \ Users \ Local Service \ AppData \ Local \ ZeroC \ icegrid \ node1
#
IceGrid. Node. Output = D: \ MyIceGrid \ db \ node1
# IceGrid. Node. RedirectErrToOut = 1

#
# Trace properties. Uncomment the other trace properties and
# Select a suitable tracing level if you are having problems
# With activating servers.
#
IceGrid. Node. Trace. Replica = 2
# IceGrid. Node. Trace. Activator = 3
# IceGrid. Node. Trace. Adapter = 3
# IceGrid. Node. Trace. Server = 3

With this configuration information, we can create a grid with registry and node1. the startup command is as follows:
# Start registry
Icegridregistry-Ice. Config = D: \ MyIceGrid \ config. grid
# Start node1
Icegridnode-Ice. Config = D: \ MyIceGrid \ config. node

If you need to run them as Windows Services, you can install them using the-install parameter, andSet the service Logon account to LocalServiceIn service management. Note that if the configuration file is changed, it must be restarted to take effect.

Start and register node2 on another computer. The corresponding configuration file is very similar to node1. You only need to change node1 to node2, remember that the port and other information must be consistent with the registry. The startup method is the same as above.

How can I check whether node1 and node2 are registered?
Run the following command to start IceGridAdmin:
Icegridadmin-Ice. config = D: \ MyIceGrid \ config. grid

From the window, we can see that the IceGrid version used is 3.2.
EnterNode listWe can see the registered nodes: node1 and node2.

After completing the above steps, we have established a simple IceGrid. When you use IceGridAdmin on a computer running node2, you must enter the user name and password, which is at the end of the configuration file of IceGrid.

Update 2007-07-18:The strange thing we encountered today is that we had been using the node ping NAME command to ping other nodes except the local running node. We had to find the firewall that came with WINDOWS for half a day. Although registration is not affected, application deployment is affected. In the morning, it took 84 seconds to deploy applications on four nodes distributed on three PCs. The problem is solved. I shut down the WINDOWS Firewall, which is more than a failure!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.