source: TI03-DataExtractor/trunk/authors_notes/glue_install_notes.txt @ 1184

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI03-DataExtractor/trunk/authors_notes/glue_install_notes.txt@1184
Revision 1184, 3.4 KB checked in by astephen, 14 years ago (diff)

Safe version pre-security installation and zsi versioning.

Line 
1setup.py needs changing:
2
3def checkBeforeMakingDir(dirname, permissions=0755, owner=None, group=None):
4
5Needs to say if == None then don't try and set it. Just assume maker is correct.
6
7-----------------
8
9Needed to install PyXML
10
11Got from:
12
13http://prdownloads.sourceforge.net/pyxml/PyXML-0.8.4.tar.gz
14
15tar -xvzf PyXML-0.8.4.tar.gz
16cd PyXML-0.8.4
17python setup.py install
18----------------
19
20dxs - setup.py didn't create SESSION_OBJECT_DIR so needs to be fixed to do that.
21
22-----------------
23
24Need to flag that the paths in the inputDatasets.xml file are hard-wired and so will not work unless changed (or coincidentally the same).
25
26- changed mine to:
27perl -p -i.bak -w -e 's!/usr/local/test/dxs!/disks/glue1/astephens/dxs!g;' ../../dxs/datasets/inputDatasets.xm? 
28
29-----------------
30
31It worked with exampleCLCClient1.py
32
33----------------
34
35NOW - to install the client only and modify ZSI calls in the ActivePython.
36
37---------------
38
39Copied only client stuff into new src dir and did:
40
41/usr/local/NDG/ActivePython2.4/bin/python setup.py build --dxc-only
42
43- failed because can't find CDMS
44
45Changed setup.py to:
46
47### in setupPackages()...
48    testImportExternalPackages(packages)
49
50def testImportExternalPackages(packages):
51    """
52    Tests that external packages can be imported.
53    """
54    if "dxs" in packages:
55        print "Testing import of required cdms (CDAT) package...",
56        try:
57            import cdms
58            print "OK!"
59        except:
60            print """\n\nCannot import cdms package. Please try the one or more of the following to fix this:
61
621. Set your PYTHONPATH environment variable to pick up the correct directory containing the cdms package.
632. Retry using the correct python installation such as "<my_python>/bin/python setup.py"
643. Install CDAT (cdms)."""
65            sys.exit()
66
67-------------------
68In setup.py:
69You can start the server Web Service by typing:
70    python /disks/glue1/astephens/dxc/bin/DXWSInterface.py
71
72Needs changing so that it doesn't tell you about the server if only --dxc-only is specified. It should say only where to find server if server installed and same with client.
73
74----------------------
75
76Then as root I got wild and did:
77
78/usr/local/NDG/ActivePython-2.4/bin/python setup.py install --dxc-only --overwrite   
79
80It appeared to set all dirs to astephen.users as hoped.
81
82------------------------
83
84ZSI 1.6 needs:
85 urlPattern=re.compile(r"(\w+)://([\w.]):(\d+)/(.*)$")
86>>> urlPattern.match("http://glue.badc.rla.c.uk:8406/DXWsiner.py").groups()
87Traceback (most recent call last):
88
89Needed to change:
90
91exampleClient1.py:
92
93urlPattern=re.compile(r"(\w+)://([\w.]+):(\d+)/(.*)$")
94(transport, soap_server_host, soap_server_port, cmd)=urlPattern.match(SOAP_SERVER_URL).groups()
95print transport, soap_server_host, soap_server_port
96
97from ZSI.version import Version as zsiv
98zsiv=float("%s.%s" % zsiv[:2])
99print zsiv
100# start session
101
102if zsiv<2.0:
103    server=Binding(url="", host=soap_server_host, port=soap_server_port)
104else:
105    server = Binding(url=SOAP_SERVER_URL)
106
107(sessionID, secureToken)=server.startSession("jane", "jane1")
108-------
109print x
110x=deUnicodeObject(x[0][0])
111
112if zsiv>=2.0:
113    x=x[0]
114
115---------------
116DXWSInterface.py
117
118zsiversion=1.6 # for client
119
120   if zsiversion<2.0:
121        sessionID=[sessionID]
122        secureToken=[secureToken]
123    print sessionID, secureToken
124    return [sessionID, secureToken]
125
126in createOutput function:....
127
128    if zsiversion<2.0:
129        pathList=[pathList]
130        secureToken=[secureToken]
131
132
133----------
134
135
136
137
Note: See TracBrowser for help on using the repository browser.