-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathHowToDeploy.txt
More file actions
235 lines (178 loc) · 9.63 KB
/
HowToDeploy.txt
File metadata and controls
235 lines (178 loc) · 9.63 KB
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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
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/
===========================================================================
GeoServer - Calvalus production
-------------------------------
Calvalus supports the automated publishing of both regular GeoTIFF (geotiff imageType) and Cloud
Optimized GeoTIFF (cog imageType) images to GeoServer using the existing quicklooks production feature.
The GeoServer data store name used by the upload service is automatically generated using the product
name. Any existing data store with this product name within the workspace is replaced. Likewise,
the GeoServer layer name used by the upload service is also generated using the same product name. Any
existing layer with this name within the workspace is also replaced. The upload service uses the
default GeoServer raster style. Once data is published to GeoServer, the data product is automatically
accessible from GeoServer via Web Mapping Service (WMS).
The Calvalus administrator needs to configure these GeoServer quicklooks settings in calvalus.properties
to enable GeoServer - Calvalus production support:
# Quicklooks upload handler. Note: only geoserver supported. Mandatory.
calvalus.ql.upload.handler = geoserver
# Quicklooks upload URL. Mandatory. Example:
calvalus.ql.upload.URL = http://localhost:8080/geoserver/rest/
# Username and password for the GeoServer upload URL service. Optional. Example:
calvalus.ql.upload.username = admin
calvalus.ql.upload.password = geoserver
# GeoServer workspace to use. Mandatory. Example:
calvalus.ql.upload.workspace = calmar
===========================================================================
GeoServer - Calvalus portal support
-----------------------------------
Once GeoServer is enabled in the Calvalus production system, it is also possible to configure a
quicklooks WMS checkbox in the portal user interface. To enable this WMS checkbox please set the
following configuration option, this is an example:
# Quicklooks WMS checkbox - access control and visual configuration
calvalus.portal.ql.wms = calvalus bc bg coastcolour calwps