1+ # IceGrid IceBox
2+
13This demo shows a very simple [ IceGrid deployment] [ 1 ] , with a single
24[ IceBox] [ 2 ] server hosting a number of IceBox services.
35
@@ -9,112 +11,84 @@ named `LANG` with value `en`. The Hello object implementation HelloI
911reads the value of ` LANG ` and shows the message in the corresponding
1012language; you can try to update the value to ` fr ` , ` de ` , ` es ` or ` it ` .
1113
12- Setup
13- -----
14+ To build the demo run:
1415
15- Start the IceGrid registry and node:
16- ```
17- icegridnode --Ice.Config= config.grid
16+ ``` shell
17+ cmake -B build
18+ cmake --build build -- config Release
1819```
1920
20- Deploy the ` HelloSimpsons ` application (in file ` application.xml ` ) with
21- the IceGridGUI (see below). If you prefer to use the command-line utility, use:
22- ```
23- icegridadmin --Ice.Config=config.grid -e "application add application.xml"
24- ```
21+ ## Setup
2522
26- If you are using 32-bit binaries on a Linux 64-bit host, first edit
27- ` application.xml ` and replace ` exe="icebox" ` by ` exe="icebox32" ` .
23+ To run the demo, first open a new terminal window for the IceGrid service:
2824
29- Using the IceGrid GUI
30- ---------------------
25+ Add the server build directory to the PATH environment variable:
3126
32- We suggest using the [ IceGrid GUI] [ 3 ] tool with this demo. Follow these steps
33- to log into the IceGrid registry and view the application you deployed above:
27+ ** Linux:**
3428
35- - Launch the application. Windows users can use the IceGrid GUI
36- icon from the Start menu, macOS users can use the IceGrid GUI
37- icon from the Finder Applications folder, and users with a Linux
38- installation can use the ` icegridgui ` script to start the
39- program:
40- ```
41- icegridgui
42- ```
29+ ``` shell
30+ export PATH=$PWD /build:$PATH
31+ export LD_LIBRARY_PATH=$PWD /build
32+ ```
4333
44- - Select `Login...` from the `File menu`.
34+ ** macOS: **
4535
46- - In the `Saved Connections` dialog, click `New Connection` to open
47- the `New Connection` wizard.
36+ ``` shell
37+ export PATH=$PWD /build:$PATH
38+ export DYLD_LIBRARY_PATH=$PWD /build
39+ ```
4840
49- - Select `Direct Connection` and click `Next`.
41+ ** Windows: **
5042
51- - Let the default value `Connect to Master Registry` checked
52- and click `Next`.
43+ ``` shell
44+ set PATH=%CD%\\ build\\ Release; %PATH%
45+ ```
5346
54- - On the `Discovered Registries` list select `DemoIceGrid/locator...` and
55- click `Next`.
47+ Now start the IceGrid service:
5648
57- - In next Window let the pre fill `IceGrid Registry Endpoint(s)` and click
58- `Next`.
49+ ``` shell
50+ icegridnode --Ice.Config=config.grid
51+ ```
5952
60- - Enter any username and password combination and click `Finish`
61- to log in.
53+ Deploy the ` HelloSimpsons ` application (in file ` application.xml ` ) with
54+ the IceGridGUI (see below). If you prefer to use the command-line utility, use:
6255
63- - Next time you want to connect, the connection will appear in the
64- `Saved Connections` dialog, just select it and click `Connect`.
56+ ``` shell
57+ icegridadmin --Ice.Config=config.admin -e " application add application.xml"
58+ ```
6559
66- Running the Client
67- ------------------
60+ If you are using 32-bit binaries on a Linux 64-bit host, first edit
61+ ` application.xml ` and replace ` exe="icebox" ` by ` exe="icebox32" ` .
62+
63+ ## Running the Client
64+
65+ To run the client type:
6866
69- In a command window, start the client as shown below:
67+ ** Linux/macOS:**
68+
69+ ``` shell
70+ ./build/client
7071```
71- client
72+
73+ ** Windows:**
74+
75+ ``` shell
76+ build\R elease\c lient
7277```
7378
7479The client simply calls ` sayHello ` on the replicated ` hello ` object.
7580
76- Stopping and restarting IceBox services
77- ---------------------------------------
81+ ## Stopping and restarting IceBox services
7882
79- You can use the IceGrid GUI or the command-line utility to stop and
83+ You can use the IceGrid GUI or the ` icegridadmin ` command-line utility to stop and
8084restart IceBox services. The commands below show how to manipulate
8185the 'Lisa' service:
82- ```
86+
87+ ``` shell
8388icegridadmin --Ice.Config=config.grid
8489>>> service stop IceBox Lisa
8590>>> service start IceBox Lisa
8691```
8792
88- Administration through Glacier2
89- -------------------------------
90-
91- This demo also includes the configuration for a [Glacier2 router][4]
92- to show how you could administer IceGrid from "the other side" of a firewall.
93- (In this demo, however, all the components run on the same system.)
94-
95- Follow these steps:
96-
97- - Connect to the IceGrid registry with icegridadmin or the IceGrid GUI
98-
99- - Start the DemoGlacier2 server
100-
101- - Reconnect to the IceGrid registry, this time using a Glacier2
102- session. For example, using the command-line utility you must
103- supply a proxy for the router:
104-
105- ```
106- icegridadmin --Ice.Default.Router="DemoGlacier2/router: tcp -h localhost -p 4063"
107- ```
108-
109- In the IceGrid GUI, use the `Routed` tab of the `Login` dialog.
110- Change the Glacier2 instance name to `DemoGlacier2` and the endpoints
111- to `tcp -h localhost -p 4063`.
112-
113- DemoGlacier2 is configured to use a built-in permissions verifier
114- that does not validate passwords, so you can log in using any
115- username/password combination.
116-
11793[ 1 ] : https://doc.zeroc.com/ice/3.7/ice-services/icegrid/using-icegrid-deployment
11894[ 2 ] : https://doc.zeroc.com/ice/3.7/icebox
119- [3]: https://doc.zeroc.com/ice/3.7/ice-services/icegrid/icegrid-gui-tool
120- [4]: https://doc.zeroc.com/ice/3.7/ice-services/glacier2/icegrid-and-glacier2-integration
0 commit comments