-
Notifications
You must be signed in to change notification settings - Fork 6
/
HowToDeploy.txt
196 lines (148 loc) · 7.63 KB
/
HowToDeploy.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
Preparation
-----------
Before restarting the portal server and/or deploying new software it should should be ensured
that there is no running job started by a user from one of the portals (default/cc). Unfortunately
there is no better way as to look closely at the running jobs in the Hadoop administration interface.
Building
--------
mvn clean package
or faster:
mvn clean package --offline -DskipTests=true
===========================================================================
Building the SNAP bundle
The snap bundle can either be created from a SNAP installation created with an installer for Linux,
or from a Maven-built software tree containing snap-engine, s2tbx and s3tbx.
* Execute the class org.esa.snap.runtime.BundleCreator in the module
snap-engine/snap-runtime . The first parameter is the zip file, the second one the directory of
a SNAP installation or built project for the bundle, e.g.
for installed SNAP:
/opt/java/jdk1.8.0_102/bin/java -cp ./snap/modules/ext/org.esa.snap.snap-engine-utilities/org-esa-snap/snap-runtime.jar org.esa.snap.runtime.BundleCreator ~/tmp/snap-5.0-bundle.zip /opt/viewer/snap-5.0
for Maven-built software project:
/opt/java/jdk1.8.0_102/bin/java -cp ./snap/snap-engine/snap-runtime/target/snap-runtime.jar org.esa.snap.runtime.BundleCreator ~/tmp/snap-6.0-SNAPSHOT-bundle.zip .
for Calvalus project:
Build Calvalus with Maven and look into calvalus-snap/target/snap-bundle/
Remove:
- xercesImpl.jar
- *idepix*.jar
- *c2r*.jar
===========================================================================
Software archive
----------------
mkdir calvalus-software
cp calvalus-distribution/src/main/resources/INSTALL.txt calvalus-software/
cp calvalus-distribution/src/main/resources/calvalus.config calvalus-software/
cp calvalus-distribution/target/calvalus-bundle/ calvalus-software/
cp calvalus-distribution/target/beam-bundle/ calvalus-software/
cp calvalus-distribution/target/cpt.jar calvalus-software/
tar czf calvalus-software.tar.gz calvalus-software
Source archive
---------------
cd ..
tar cvzf calvalus-src-$(date +%Y-%m-%d).tgz --exclude .git --exclude target calvalus
===========================================================================
Calvalus
--------
java -jar calvalus-distribution/target/cpt.jar -e --uninstall calvalus-2.22
java -jar calvalus-distribution/target/cpt.jar -e --deploy calvalus-distribution/target/calvalus-bundle/*.jar calvalus-2.22
for lc-cci
----------
java -jar calvalus-distribution/target/cpt.jar -e --uninstall calvalus-2.4-lc
java -jar calvalus-distribution/target/cpt.jar -e --deploy calvalus-distribution/target/calvalus-bundle/*.jar calvalus-2.4-lc
BEAM
-----
java -jar calvalus-distribution/target/cpt.jar -e --uninstall beam-5.0.1
java -jar calvalus-distribution/target/cpt.jar -e --deploy calvalus-distribution/target/beam-bundle/*.jar beam-5.0.1
SNAP
-----
On feeder: obtain SNAP installer from buildserver or http://step.esa.int/main/download/
On feeder: run installer, install SNAP to local directory $SNAP_DIR
On feeder: run java -cp $SNAP_DIR/snap/modules/ext/org.esa.snap.snap-core/org-esa-snap/snap-runtime.jar org.esa.snap.runtime.BundleCreator $SNAP_DIR snap-bundle.zip
On feeder: copy contents of snap-bundle.zip to /calvalus/software/1.0/<your_snap_bundle>
for diversity
-------------
java -jar calvalus-distribution/target/cpt.jar -e --uninstall calvalus-2.4-diversity
java -jar calvalus-distribution/target/cpt.jar -e --deploy calvalus-distribution/target/calvalus-bundle/*.jar calvalus-2.4-diversity
Personal debugging
------------------
java -jar calvalus-distribution/target/cpt.jar -e --uninstall calvalus-SNAPSHOT-mz
java -jar calvalus-distribution/target/cpt.jar -e --deploy calvalus-distribution/target/calvalus-bundle/*.jar calvalus-SNAPSHOT-mz
java -jar calvalus-distribution/target/cpt.jar -e --uninstall beam-SNAPSHOT-mz
java -jar calvalus-distribution/target/cpt.jar -e --deploy calvalus-distribution/target/beam-bundle/*.jar beam-SNAPSHOT-mz
java -jar calvalus-distribution/target/cpt.jar -e --uninstall snap-SNAPSHOT-mz
java -jar calvalus-distribution/target/cpt.jar -e --deploy calvalus-snap/target/snap-bundle/snap-all.jar snap-SNAPSHOT-mz
java -jar calvalus-distribution/target/cpt.jar -e --calvalus calvalus-SNAPSHOT-mz --beam beam-SNAPSHOT-mz test.xml
pfa-fex
-------
java -jar calvalus-distribution/target/cpt.jar -e --uninstall calvalus-2.4-fex
java -jar calvalus-distribution/target/cpt.jar -e --deploy calvalus-distribution/target/calvalus-bundle/*.jar calvalus-2.4-fex
java -jar calvalus-distribution/target/cpt.jar -e --uninstall pfa-0.1-SNAPSHOT
java -jar calvalus-distribution/target/cpt.jar -e --deploy /home/marcoz/Workspace/pfa/bundle/*.jar pfa-0.1-SNAPSHOT
java -jar calvalus-distribution/target/cpt.jar -e --calvalus calvalus-2.4-fex /home/marcoz/Workspace/pfa/fex.xml
===========================================================================
Portal Software
-------------------
java -jar calvalus-distribution/target/cpt.jar -e --uninstall calvalus-2.22
java -jar calvalus-distribution/target/cpt.jar -e --deploy calvalus-distribution/target/calvalus-bundle/*.jar calvalus-2.22
java -jar calvalus-distribution/target/cpt.jar -e --uninstall beam-5.0.1
java -jar calvalus-distribution/target/cpt.jar -e --deploy calvalus-distribution/target/beam-bundle/*.jar beam-5.0.1
For SNAP
--------
SNAP_BUNDLE=calvalus-2.14-portal
java -jar calvalus-distribution/target/cpt.jar -e --uninstall $SNAP_BUNDLE
java -jar calvalus-distribution/target/cpt.jar -e --deploy calvalus-distribution/target/calvalus-bundle/*.jar $SNAP_BUNDLE
SNAP_BUNDLE_PATH=/calvalus/software/1.0/$SNAP_BUNDLE
SPEC="group:calvalus:r-x,default:group:calvalus:r-x,group:calwps:r-x,default:group:calwps:r-x,group:coastcolour:r-x,default:group:coastcolour:r-x"
ssh hadoop@master00 hdfs dfs -setfacl -R -m $SPEC $SNAP_BUNDLE_PATH
ssh hadoop@master00 hdfs dfs -getfacl $SNAP_BUNDLE_PATH
WAR (for the portal)
--------------------
(cd calvalus-portal/target; scp calvalus-portal.war cvop@bcvm03: )
ssh cvop@bcvm03
cd /opt/apache-tomcat-7.0.53/
#./bin/shutdown.sh
# save staging
mv webapps/calvalus/staging temp/
# redeploy
rm -rf webapps/calvalus webapps/calvalus.war
rm -rf work/Catalina/localhost/calvalus/
mv /home/cvop/calvalus-portal.war webapps/calvalus.war
# restart
#./bin/startup.sh
tail -5f logs/catalina.out
# restore staging
rm -rf webapps/calvalus/staging/
mv temp/staging webapps/calvalus/
===========================================================================
CC Portal Software
-------------------
(cd calvalus-portal/target; scp -r calvalus-portal.war www/cc-patch cvop@bcvm03: )
ssh cvop@bcvm03
cd /opt/apache-tomcat-7.0.53
# save staging
# sudo umount /opt/apache-tomcat-7.0.53/webapps/ccprocessing/staging
mv webapps/ccprocessing/staging temp/
# redeploy
rm -r webapps/ccprocessing.war webapps/ccprocessing
mv /home/cvop/calvalus-portal.war webapps/ccprocessing.war
tail -5f logs/catalina.out
cp -r /home/cvop/cc-patch/* webapps/ccprocessing
# restore staging
# sudo mount /opt/apache-tomcat-7.0.53/webapps/ccprocessing/staging
rm -rf webapps/ccprocessing/staging/
mv temp/staging webapps/ccprocessing/
===========================================================================
BfG Portal Software
-------------------
(cd calvalus-portal/target; scp -r calvalus-portal.war www/calbfg-patch cvop@bcvm03: )
ssh cvop@bcvm03
cd /opt/apache-tomcat-7.0.53
# save staging
mv webapps/calbfg/staging temp/
# redeploy
rm -r webapps/calbfg.war webapps/calbfg
mv /home/cvop/calvalus-portal.war webapps/calbfg.war
tail -5f logs/catalina.out
cp -r /home/cvop/calbfg-patch/* webapps/calbfg
# restore staging
rm -rf webapps/calbfg/staging/
mv temp/staging webapps/calbfg/