Home Help Center

using the IceGrid::Admin programatically to add object and node

lordwulordwu Member Ping SugarOrganization: Wuhan universityProject: GIS
Hi all, I want to register my object adapter with the locator service(icegridregistery), and my server(for example, svr.exe) has to be managed by IceGrid
nodes, and I want to do all this programatically by using the IceGrid::Admin interface. Could someone give some ideas, examples wille be great?Thx
And When start icegridnode.exe without paras, icegridnode complains and exit. How to avoid this?
Another question, How to start my svr.exe immediately when icegridnode.exe start? From the icegrid example, the icegridnode only start the real server when the server has a request.

Any help will be appreciated!

Comments

  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Welcome to our forums!

    I suggest you start with a non-programmatic IceGrid deployment, to get familiar with IceGrid works.

    What do you want to do with IceGrid::Admin? Just start/stop/monitor your servers, or also create your deployment (server descriptors, replica group...) at run-time?
    And When start icegridnode.exe without paras, icegridnode complains and exit. How to avoid this?

    icegridnode.exe needs configuration, and you typically provide the location of the config file with --Ice.Config=<path the icegridnode config file>.
    Another question, How to start my svr.exe immediately when icegridnode.exe start? From the icegrid example, the icegridnode only start the real server when the server has a request.

    Have a look at the 'always' activation mode in IceGrid Server Activation.

    Best regards,
    Bernard
  • lordwulordwu Member Ping SugarOrganization: Wuhan universityProject: GIS
    bernard,Thank you for your response.
    What do you want to do with IceGrid::Admin? Just start/stop/monitor your servers, or also create your deployment (server descriptors, replica group...) at run-time?

    Yes, I want to create my deployment at run rime, event with node.
    In my situation, I may have 3 or 5 icegridnode to monitor my real server, each of them in a computer,
    the number of icegridnode is not specific, so I want to configurate icegridnode in my real server to avoid upate
    application.xml if I add a node.
    when start my real server, I will use my computer name to construct IceGrid.Node.Name and IceGrid.Node.Data,
    then registry this node to icegridregistry, and that's why I want to start icegridnode whithout parms.
    Is that possible? Thx.
  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    It's certainly uncommon to start icegridnode.exe from another program. The most typical is to start your IceGrid node as a Windows Service or Linux daemon...

    In any case, icegridnode.exe needs a number of properties like IceGrid.Node.Name and Ice.Default.Locator. You can provide them on the command-line, or in a config file, or in the Windows registry. The location of the config file or Windows registry key is typically specified with the --Ice.Config command-line argument. If you really don't want any command-line argument, you could use the ICE_CONFIG environment variable to provide this config file to icegridnode.exe.

    Best regards,
    Bernard
Sign In or Register to comment.