Statistics
| Branch: | Tag: | Revision:

one / install.sh @ bfaabf35

History | View | Annotate | Download (41.1 KB)

1
#!/bin/bash
2

    
3
# -------------------------------------------------------------------------- #
4
# Copyright 2002-2011, OpenNebula Project Leads (OpenNebula.org)             #
5
#                                                                            #
6
# Licensed under the Apache License, Version 2.0 (the "License"); you may    #
7
# not use this file except in compliance with the License. You may obtain    #
8
# a copy of the License at                                                   #
9
#                                                                            #
10
# http://www.apache.org/licenses/LICENSE-2.0                                 #
11
#                                                                            #
12
# Unless required by applicable law or agreed to in writing, software        #
13
# distributed under the License is distributed on an "AS IS" BASIS,          #
14
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
15
# See the License for the specific language governing permissions and        #
16
# limitations under the License.                                             #
17
#--------------------------------------------------------------------------- #
18

    
19
#-------------------------------------------------------------------------------
20
# Install program for OpenNebula. It will install it relative to
21
# $ONE_LOCATION if defined with the -d option, otherwise it'll be installed
22
# under /. In this case you may specified the oneadmin user/group, so you do
23
# not need run the OpenNebula daemon with root priviledges
24
#-------------------------------------------------------------------------------
25

    
26
#-------------------------------------------------------------------------------
27
# COMMAND LINE PARSING
28
#-------------------------------------------------------------------------------
29
usage() {
30
 echo
31
 echo "Usage: install.sh [-u install_user] [-g install_group] [-k keep conf]"
32
 echo "                  [-d ONE_LOCATION] [-c occi|ec2] [-r] [-h]"
33
 echo
34
 echo "-u: user that will run opennebula, defaults to user executing install.sh"
35
 echo "-g: group of the user that will run opennebula, defaults to user"
36
 echo "    executing install.sh"
37
 echo "-k: keep configuration files of existing OpenNebula installation, useful"
38
 echo "    when upgrading. This flag should not be set when installing"
39
 echo "    OpenNebula for the first time"
40
 echo "-d: target installation directory, if not defined it'd be root. Must be"
41
 echo "    an absolute path."
42
 echo "-c: install client utilities: OpenNebula cli, occi and ec2 client files"
43
 echo "-s: install OpenNebula Sunstone"
44
 echo "-r: remove Opennebula, only useful if -d was not specified, otherwise"
45
 echo "    rm -rf \$ONE_LOCATION would do the job"
46
 echo "-l: creates symlinks instead of copying files, useful for development"
47
 echo "-h: prints this help"
48
}
49
#-------------------------------------------------------------------------------
50

    
51
TEMP_OPT=`getopt -o hkrlcsu:g:d: -n 'install.sh' -- "$@"`
52

    
53
if [ $? != 0 ] ; then
54
    usage
55
    exit 1
56
fi
57

    
58
eval set -- "$TEMP_OPT"
59

    
60
INSTALL_ETC="yes"
61
UNINSTALL="no"
62
LINK="no"
63
CLIENT="no"
64
SUNSTONE="no"
65
ONEADMIN_USER=`id -u`
66
ONEADMIN_GROUP=`id -g`
67
SRC_DIR=$PWD
68

    
69
while true ; do
70
    case "$1" in
71
        -h) usage; exit 0;;
72
        -k) INSTALL_ETC="no"   ; shift ;;
73
        -r) UNINSTALL="yes"   ; shift ;;
74
        -l) LINK="yes" ; shift ;;
75
        -c) CLIENT="yes"; INSTALL_ETC="no" ; shift ;;
76
        -s) SUNSTONE="yes"; shift ;;
77
        -u) ONEADMIN_USER="$2" ; shift 2;;
78
        -g) ONEADMIN_GROUP="$2"; shift 2;;
79
        -d) ROOT="$2" ; shift 2 ;;
80
        --) shift ; break ;;
81
        *)  usage; exit 1 ;;
82
    esac
83
done
84

    
85
#-------------------------------------------------------------------------------
86
# Definition of locations
87
#-------------------------------------------------------------------------------
88

    
89
CONF_LOCATION="$HOME/.one"
90

    
91
if [ -z "$ROOT" ] ; then
92
    BIN_LOCATION="/usr/bin"
93
    LIB_LOCATION="/usr/lib/one"
94
    ETC_LOCATION="/etc/one"
95
    LOG_LOCATION="/var/log/one"
96
    VAR_LOCATION="/var/lib/one"
97
    SUNSTONE_LOCATION="$LIB_LOCATION/sunstone"
98
    IMAGES_LOCATION="$VAR_LOCATION/images"
99
    RUN_LOCATION="/var/run/one"
100
    LOCK_LOCATION="/var/lock/one"
101
    INCLUDE_LOCATION="/usr/include"
102
    SHARE_LOCATION="/usr/share/one"
103
    MAN_LOCATION="/usr/share/man/man1"
104

    
105
    if [ "$CLIENT" = "yes" ]; then
106
        MAKE_DIRS="$BIN_LOCATION $LIB_LOCATION"
107

    
108
        DELETE_DIRS=""
109

    
110
        CHOWN_DIRS=""
111
    elif [ "$SUNSTONE" = "yes" ]; then
112
        MAKE_DIRS="$BIN_LOCATION $LIB_LOCATION $VAR_LOCATION \
113
                   $SUNSTONE_LOCATION $ETC_LOCATION"
114

    
115
        DELETE_DIRS="$MAKE_DIRS"
116

    
117
        CHOWN_DIRS=""
118
    else
119
        MAKE_DIRS="$BIN_LOCATION $LIB_LOCATION $ETC_LOCATION $VAR_LOCATION \
120
                   $INCLUDE_LOCATION $SHARE_LOCATION \
121
                   $LOG_LOCATION $RUN_LOCATION $LOCK_LOCATION \
122
                   $IMAGES_LOCATION $MAN_LOCATION"
123

    
124
        DELETE_DIRS="$LIB_LOCATION $ETC_LOCATION $LOG_LOCATION $VAR_LOCATION \
125
                     $RUN_LOCATION $SHARE_DIRS"
126

    
127
        CHOWN_DIRS="$LOG_LOCATION $VAR_LOCATION $RUN_LOCATION $LOCK_LOCATION"
128
    fi
129

    
130
else
131
    BIN_LOCATION="$ROOT/bin"
132
    LIB_LOCATION="$ROOT/lib"
133
    ETC_LOCATION="$ROOT/etc"
134
    VAR_LOCATION="$ROOT/var"
135
    SUNSTONE_LOCATION="$LIB_LOCATION/sunstone"
136
    IMAGES_LOCATION="$VAR_LOCATION/images"
137
    INCLUDE_LOCATION="$ROOT/include"
138
    SHARE_LOCATION="$ROOT/share"
139
    MAN_LOCATION="$ROOT/share/man/man1"
140

    
141
    if [ "$CLIENT" = "yes" ]; then
142
        MAKE_DIRS="$BIN_LOCATION $LIB_LOCATION $CONF_LOCATION"
143

    
144
        DELETE_DIRS="$MAKE_DIRS"
145
    elif [ "$SUNSTONE" = "yes" ]; then
146
        MAKE_DIRS="$BIN_LOCATION $LIB_LOCATION $VAR_LOCATION \
147
                   $SUNSTONE_LOCATION $ETC_LOCATION"
148

    
149
        DELETE_DIRS="$MAKE_DIRS"
150
    else
151
        MAKE_DIRS="$BIN_LOCATION $LIB_LOCATION $ETC_LOCATION $VAR_LOCATION \
152
                   $INCLUDE_LOCATION $SHARE_LOCATION $IMAGES_LOCATION \
153
                   $MAN_LOCATION"
154

    
155
        DELETE_DIRS="$MAKE_DIRS"
156

    
157
        CHOWN_DIRS="$ROOT"
158
    fi
159

    
160
    CHOWN_DIRS="$ROOT"
161
fi
162

    
163
SHARE_DIRS="$SHARE_LOCATION/examples \
164
            $SHARE_LOCATION/examples/tm \
165
            $SHARE_LOCATION/hooks"
166

    
167
ETC_DIRS="$ETC_LOCATION/im_kvm \
168
          $ETC_LOCATION/im_xen \
169
          $ETC_LOCATION/im_ec2 \
170
          $ETC_LOCATION/vmm_ec2 \
171
          $ETC_LOCATION/vmm_exec \
172
          $ETC_LOCATION/tm_nfs \
173
          $ETC_LOCATION/tm_ssh \
174
          $ETC_LOCATION/tm_dummy \
175
          $ETC_LOCATION/tm_lvm \
176
          $ETC_LOCATION/hm \
177
          $ETC_LOCATION/auth \
178
          $ETC_LOCATION/ec2query_templates \
179
          $ETC_LOCATION/occi_templates \
180
          $ETC_LOCATION/cli"
181

    
182
LIB_DIRS="$LIB_LOCATION/ruby \
183
          $LIB_LOCATION/ruby/OpenNebula \
184
          $LIB_LOCATION/ruby/cloud/ \
185
          $LIB_LOCATION/ruby/cloud/econe \
186
          $LIB_LOCATION/ruby/cloud/econe/views \
187
          $LIB_LOCATION/ruby/cloud/occi \
188
          $LIB_LOCATION/ruby/onedb \
189
          $LIB_LOCATION/tm_commands \
190
          $LIB_LOCATION/tm_commands/nfs \
191
          $LIB_LOCATION/tm_commands/ssh \
192
          $LIB_LOCATION/tm_commands/dummy \
193
          $LIB_LOCATION/tm_commands/lvm \
194
          $LIB_LOCATION/mads \
195
          $LIB_LOCATION/sh \
196
          $LIB_LOCATION/ruby/cli \
197
          $LIB_LOCATION/ruby/cli/one_helper"
198

    
199
VAR_DIRS="$VAR_LOCATION/remotes \
200
          $VAR_LOCATION/remotes/im \
201
          $VAR_LOCATION/remotes/im/kvm.d \
202
          $VAR_LOCATION/remotes/im/xen.d \
203
          $VAR_LOCATION/remotes/im/ganglia.d \
204
          $VAR_LOCATION/remotes/vmm/xen \
205
          $VAR_LOCATION/remotes/vmm/kvm \
206
          $VAR_LOCATION/remotes/image \
207
          $VAR_LOCATION/remotes/image/fs"
208

    
209
SUNSTONE_DIRS="$SUNSTONE_LOCATION/models \
210
               $SUNSTONE_LOCATION/models/OpenNebulaJSON \
211
               $SUNSTONE_LOCATION/public \
212
               $SUNSTONE_LOCATION/public/js \
213
               $SUNSTONE_LOCATION/public/js/plugins \
214
               $SUNSTONE_LOCATION/public/css \
215
               $SUNSTONE_LOCATION/public/vendor \
216
               $SUNSTONE_LOCATION/public/vendor/jQueryLayout \
217
               $SUNSTONE_LOCATION/public/vendor/dataTables \
218
               $SUNSTONE_LOCATION/public/vendor/jQueryUI \
219
               $SUNSTONE_LOCATION/public/vendor/jQuery \
220
               $SUNSTONE_LOCATION/public/vendor/jGrowl \
221
               $SUNSTONE_LOCATION/public/vendor/flot \
222
               $SUNSTONE_LOCATION/share \
223
               $SUNSTONE_LOCATION/share/OneMonitor \
224
               $SUNSTONE_LOCATION/public/images \
225
               $SUNSTONE_LOCATION/templates"
226

    
227
LIB_ECO_CLIENT_DIRS="$LIB_LOCATION/ruby \
228
                 $LIB_LOCATION/ruby/OpenNebula \
229
                 $LIB_LOCATION/ruby/cloud/ \
230
                 $LIB_LOCATION/ruby/cloud/econe"
231

    
232
LIB_OCCI_CLIENT_DIRS="$LIB_LOCATION/ruby \
233
                 $LIB_LOCATION/ruby/OpenNebula \
234
                 $LIB_LOCATION/ruby/cloud/occi"
235

    
236
LIB_OCA_CLIENT_DIRS="$LIB_LOCATION/ruby \
237
                 $LIB_LOCATION/ruby/OpenNebula"
238

    
239
LIB_CLI_CLIENT_DIRS="$LIB_LOCATION/ruby/cli \
240
                     $LIB_LOCATION/ruby/cli/one_helper"
241

    
242
CONF_CLI_DIRS="$CONF_LOCATION/cli"
243

    
244
if [ "$CLIENT" = "yes" ]; then
245
    MAKE_DIRS="$MAKE_DIRS $LIB_ECO_CLIENT_DIRS $LIB_OCCI_CLIENT_DIRS \
246
               $LIB_OCA_CLIENT_DIRS $LIB_CLI_CLIENT_DIRS $CONF_CLI_DIRS"
247
elif [ "$SUNSTONE" = "yes" ]; then
248
    MAKE_DIRS="$MAKE_DIRS $SUNSTONE_DIRS $LIB_OCA_CLIENT_DIRS"
249
else
250
    MAKE_DIRS="$MAKE_DIRS $SHARE_DIRS $ETC_DIRS $LIB_DIRS $VAR_DIRS $SUNSTONE_DIRS"
251
fi
252

    
253
#-------------------------------------------------------------------------------
254
#-------------------------------------------------------------------------------
255
# FILE DEFINITION, WHAT IS GOING TO BE INSTALLED AND WHERE
256
#-------------------------------------------------------------------------------
257
#-------------------------------------------------------------------------------
258
INSTALL_FILES=(
259
    BIN_FILES:$BIN_LOCATION
260
    INCLUDE_FILES:$INCLUDE_LOCATION
261
    LIB_FILES:$LIB_LOCATION
262
    RUBY_LIB_FILES:$LIB_LOCATION/ruby
263
    RUBY_OPENNEBULA_LIB_FILES:$LIB_LOCATION/ruby/OpenNebula
264
    MAD_RUBY_LIB_FILES:$LIB_LOCATION/ruby
265
    MAD_RUBY_LIB_FILES:$VAR_LOCATION/remotes
266
    MAD_SH_LIB_FILES:$LIB_LOCATION/sh
267
    MAD_SH_LIB_FILES:$VAR_LOCATION/remotes
268
    ONEDB_MIGRATOR_FILES:$LIB_LOCATION/ruby/onedb
269
    MADS_LIB_FILES:$LIB_LOCATION/mads
270
    IM_PROBES_FILES:$VAR_LOCATION/remotes/im
271
    IM_PROBES_KVM_FILES:$VAR_LOCATION/remotes/im/kvm.d
272
    IM_PROBES_XEN_FILES:$VAR_LOCATION/remotes/im/xen.d
273
    IM_PROBES_GANGLIA_FILES:$VAR_LOCATION/remotes/im/ganglia.d
274
    VMM_EXEC_KVM_SCRIPTS:$VAR_LOCATION/remotes/vmm/kvm
275
    VMM_EXEC_XEN_SCRIPTS:$VAR_LOCATION/remotes/vmm/xen
276
    VMM_EXEC_XEN_KVM_POLL:$VAR_LOCATION/remotes/vmm/kvm/poll
277
    VMM_EXEC_XEN_KVM_POLL:$VAR_LOCATION/remotes/vmm/xen/poll
278
    VMM_EXEC_GANGLIA_POLL:$VAR_LOCATION/remotes/vmm/kvm/poll_local
279
    VMM_EXEC_GANGLIA_POLL:$VAR_LOCATION/remotes/vmm/xen/poll_local
280
    NFS_TM_COMMANDS_LIB_FILES:$LIB_LOCATION/tm_commands/nfs
281
    SSH_TM_COMMANDS_LIB_FILES:$LIB_LOCATION/tm_commands/ssh
282
    DUMMY_TM_COMMANDS_LIB_FILES:$LIB_LOCATION/tm_commands/dummy
283
    LVM_TM_COMMANDS_LIB_FILES:$LIB_LOCATION/tm_commands/lvm
284
    IMAGE_DRIVER_FS_SCRIPTS:$VAR_LOCATION/remotes/image/fs
285
    EXAMPLE_SHARE_FILES:$SHARE_LOCATION/examples
286
    INSTALL_NOVNC_SHARE_FILE:$SHARE_LOCATION
287
    TM_EXAMPLE_SHARE_FILES:$SHARE_LOCATION/examples/tm
288
    HOOK_SHARE_FILES:$SHARE_LOCATION/hooks
289
    COMMON_CLOUD_LIB_FILES:$LIB_LOCATION/ruby/cloud
290
    ECO_LIB_FILES:$LIB_LOCATION/ruby/cloud/econe
291
    ECO_LIB_VIEW_FILES:$LIB_LOCATION/ruby/cloud/econe/views
292
    ECO_BIN_FILES:$BIN_LOCATION
293
    OCCI_LIB_FILES:$LIB_LOCATION/ruby/cloud/occi
294
    OCCI_BIN_FILES:$BIN_LOCATION
295
    MAN_FILES:$MAN_LOCATION
296
    CLI_LIB_FILES:$LIB_LOCATION/ruby/cli
297
    ONE_CLI_LIB_FILES:$LIB_LOCATION/ruby/cli/one_helper
298
)
299

    
300
INSTALL_CLIENT_FILES=(
301
    COMMON_CLOUD_CLIENT_LIB_FILES:$LIB_LOCATION/ruby/cloud
302
    ECO_LIB_CLIENT_FILES:$LIB_LOCATION/ruby/cloud/econe
303
    ECO_BIN_CLIENT_FILES:$BIN_LOCATION
304
    COMMON_CLOUD_CLIENT_LIB_FILES:$LIB_LOCATION/ruby/cloud
305
    OCCI_LIB_CLIENT_FILES:$LIB_LOCATION/ruby/cloud/occi
306
    OCCI_BIN_CLIENT_FILES:$BIN_LOCATION
307
    CLI_BIN_FILES:$BIN_LOCATION
308
    CLI_LIB_FILES:$LIB_LOCATION/ruby/cli
309
    ONE_CLI_LIB_FILES:$LIB_LOCATION/ruby/cli/one_helper
310
    CLI_CONF_FILES:$CONF_LOCATION/cli
311
    OCA_LIB_FILES:$LIB_LOCATION/ruby
312
    RUBY_OPENNEBULA_LIB_FILES:$LIB_LOCATION/ruby/OpenNebula
313
)
314

    
315
INSTALL_SUNSTONE_RUBY_FILES=(
316
    RUBY_OPENNEBULA_LIB_FILES:$LIB_LOCATION/ruby/OpenNebula
317
    OCA_LIB_FILES:$LIB_LOCATION/ruby
318
)
319

    
320
INSTALL_SUNSTONE_FILES=(
321
    SUNSTONE_FILES:$SUNSTONE_LOCATION
322
    SUNSTONE_BIN_FILES:$BIN_LOCATION
323
    SUNSTONE_MODELS_FILES:$SUNSTONE_LOCATION/models
324
    SUNSTONE_MODELS_JSON_FILES:$SUNSTONE_LOCATION/models/OpenNebulaJSON
325
    SUNSTONE_TEMPLATE_FILES:$SUNSTONE_LOCATION/templates
326
    SUNSTONE_PUBLIC_JS_FILES:$SUNSTONE_LOCATION/public/js
327
    SUNSTONE_PUBLIC_JS_PLUGINS_FILES:$SUNSTONE_LOCATION/public/js/plugins
328
    SUNSTONE_PUBLIC_CSS_FILES:$SUNSTONE_LOCATION/public/css
329
    SUNSTONE_PUBLIC_VENDOR_DATATABLES:$SUNSTONE_LOCATION/public/vendor/dataTables
330
    SUNSTONE_PUBLIC_VENDOR_JGROWL:$SUNSTONE_LOCATION/public/vendor/jGrowl
331
    SUNSTONE_PUBLIC_VENDOR_JQUERY:$SUNSTONE_LOCATION/public/vendor/jQuery
332
    SUNSTONE_PUBLIC_VENDOR_JQUERYUI:$SUNSTONE_LOCATION/public/vendor/jQueryUI
333
    SUNSTONE_PUBLIC_VENDOR_JQUERYLAYOUT:$SUNSTONE_LOCATION/public/vendor/jQueryLayout
334
    SUNSTONE_PUBLIC_VENDOR_FLOT:$SUNSTONE_LOCATION/public/vendor/flot
335
    SUNSTONE_SHARE_ONEMONITOR:$SUNSTONE_LOCATION/share/OneMonitor
336
    SUNSTONE_PUBLIC_IMAGES_FILES:$SUNSTONE_LOCATION/public/images
337
)
338

    
339
INSTALL_SUNSTONE_ETC_FILES=(
340
    SUNSTONE_ETC_FILES:$ETC_LOCATION
341
)
342

    
343
INSTALL_ETC_FILES=(
344
    ETC_FILES:$ETC_LOCATION
345
    VMM_EC2_ETC_FILES:$ETC_LOCATION/vmm_ec2
346
    VMM_EXEC_ETC_FILES:$ETC_LOCATION/vmm_exec
347
    IM_EC2_ETC_FILES:$ETC_LOCATION/im_ec2
348
    TM_NFS_ETC_FILES:$ETC_LOCATION/tm_nfs
349
    TM_SSH_ETC_FILES:$ETC_LOCATION/tm_ssh
350
    TM_DUMMY_ETC_FILES:$ETC_LOCATION/tm_dummy
351
    TM_LVM_ETC_FILES:$ETC_LOCATION/tm_lvm
352
    HM_ETC_FILES:$ETC_LOCATION/hm
353
    AUTH_ETC_FILES:$ETC_LOCATION/auth
354
    ECO_ETC_FILES:$ETC_LOCATION
355
    ECO_ETC_TEMPLATE_FILES:$ETC_LOCATION/ec2query_templates
356
    OCCI_ETC_FILES:$ETC_LOCATION
357
    OCCI_ETC_TEMPLATE_FILES:$ETC_LOCATION/occi_templates
358
    CLI_CONF_FILES:$ETC_LOCATION/cli
359
)
360

    
361
#-------------------------------------------------------------------------------
362
# Binary files, to be installed under $BIN_LOCATION
363
#-------------------------------------------------------------------------------
364

    
365
BIN_FILES="src/nebula/oned \
366
           src/scheduler/src/sched/mm_sched \
367
           src/cli/onevm \
368
           src/cli/onehost \
369
           src/cli/onevnet \
370
           src/cli/oneuser \
371
           src/cli/oneimage \
372
           src/cli/onegroup \
373
           src/cli/onetemplate \
374
           src/cli/oneacl \
375
           src/onedb/onedb \
376
           share/scripts/one \
377
           src/authm_mad/oneauth"
378

    
379
#-------------------------------------------------------------------------------
380
# C/C++ OpenNebula API Library & Development files
381
# Include files, to be installed under $INCLUDE_LOCATION
382
# Library files, to be installed under $LIB_LOCATION
383
#-------------------------------------------------------------------------------
384

    
385
INCLUDE_FILES=""
386
LIB_FILES=""
387

    
388
#-------------------------------------------------------------------------------
389
# Ruby library files, to be installed under $LIB_LOCATION/ruby
390
#-------------------------------------------------------------------------------
391

    
392
RUBY_LIB_FILES="src/mad/ruby/ActionManager.rb \
393
                src/mad/ruby/CommandManager.rb \
394
                src/mad/ruby/OpenNebulaDriver.rb \
395
                src/mad/ruby/VirtualMachineDriver.rb \
396
                src/mad/ruby/Ganglia.rb \
397
                src/oca/ruby/OpenNebula.rb \
398
                src/tm_mad/TMScript.rb \
399
                src/authm_mad/one_usage.rb \
400
                src/authm_mad/quota.rb \
401
                src/authm_mad/simple_auth.rb \
402
                src/authm_mad/simple_permissions.rb \
403
                src/authm_mad/ssh_auth.rb"
404

    
405
#-----------------------------------------------------------------------------
406
# MAD Script library files, to be installed under $LIB_LOCATION/<script lang>
407
# and remotes directory
408
#-----------------------------------------------------------------------------
409

    
410
MAD_SH_LIB_FILES="src/mad/sh/scripts_common.sh"
411
MAD_RUBY_LIB_FILES="src/mad/ruby/scripts_common.rb"
412

    
413
#-------------------------------------------------------------------------------
414
# Driver executable files, to be installed under $LIB_LOCATION/mads
415
#-------------------------------------------------------------------------------
416

    
417
MADS_LIB_FILES="src/mad/sh/madcommon.sh \
418
              src/tm_mad/tm_common.sh \
419
              src/vmm_mad/exec/one_vmm_exec.rb \
420
              src/vmm_mad/exec/one_vmm_exec \
421
              src/vmm_mad/exec/one_vmm_sh \
422
              src/vmm_mad/exec/one_vmm_ssh \
423
              src/vmm_mad/ec2/one_vmm_ec2.rb \
424
              src/vmm_mad/ec2/one_vmm_ec2 \
425
              src/vmm_mad/dummy/one_vmm_dummy.rb \
426
              src/vmm_mad/dummy/one_vmm_dummy \
427
              src/im_mad/im_exec/one_im_exec.rb \
428
              src/im_mad/im_exec/one_im_exec \
429
              src/im_mad/im_exec/one_im_ssh \
430
              src/im_mad/im_exec/one_im_sh \
431
              src/im_mad/ec2/one_im_ec2.rb \
432
              src/im_mad/ec2/one_im_ec2 \
433
              src/im_mad/dummy/one_im_dummy.rb \
434
              src/im_mad/dummy/one_im_dummy \
435
              src/tm_mad/one_tm \
436
              src/tm_mad/one_tm.rb \
437
              src/hm_mad/one_hm.rb \
438
              src/hm_mad/one_hm \
439
              src/authm_mad/one_auth_mad.rb \
440
              src/authm_mad/one_auth_mad \
441
              src/image_mad/one_image.rb \
442
              src/image_mad/one_image"
443

    
444
#-------------------------------------------------------------------------------
445
# VMM SH Driver KVM scripts, to be installed under $REMOTES_LOCATION/vmm/kvm
446
#-------------------------------------------------------------------------------
447

    
448
VMM_EXEC_KVM_SCRIPTS="src/vmm_mad/remotes/kvm/cancel \
449
                    src/vmm_mad/remotes/kvm/deploy \
450
                    src/vmm_mad/remotes/kvm/kvmrc \
451
                    src/vmm_mad/remotes/kvm/migrate \
452
                    src/vmm_mad/remotes/kvm/restore \
453
                    src/vmm_mad/remotes/kvm/save \
454
                    src/vmm_mad/remotes/kvm/shutdown"
455

    
456
#-------------------------------------------------------------------------------
457
# VMM SH Driver Xen scripts, to be installed under $REMOTES_LOCATION/vmm/xen
458
#-------------------------------------------------------------------------------
459

    
460
VMM_EXEC_XEN_SCRIPTS="src/vmm_mad/remotes/xen/cancel \
461
                    src/vmm_mad/remotes/xen/deploy \
462
                    src/vmm_mad/remotes/xen/xenrc \
463
                    src/vmm_mad/remotes/xen/migrate \
464
                    src/vmm_mad/remotes/xen/restore \
465
                    src/vmm_mad/remotes/xen/save \
466
                    src/vmm_mad/remotes/xen/shutdown"
467

    
468
#-----------------------------------------------------------------------------
469
# VMM SH Driver xen/kvm scripts, to be installed under $REMOTES_LOCATION/vmm/*
470
#-----------------------------------------------------------------------------
471

    
472
VMM_EXEC_XEN_KVM_POLL="src/vmm_mad/remotes/poll_xen_kvm.rb"
473
VMM_EXEC_GANGLIA_POLL="src/vmm_mad/remotes/poll_ganglia.rb"
474

    
475
#-------------------------------------------------------------------------------
476
# Information Manager Probes, to be installed under $LIB_LOCATION/remotes
477
#-------------------------------------------------------------------------------
478

    
479
IM_PROBES_FILES="src/im_mad/remotes/run_probes"
480

    
481
IM_PROBES_XEN_FILES="src/im_mad/remotes/xen.d/xen.rb \
482
                    src/im_mad/remotes/xen.d/architecture.sh \
483
                    src/im_mad/remotes/xen.d/cpu.sh \
484
                    src/im_mad/remotes/xen.d/name.sh"
485

    
486
IM_PROBES_KVM_FILES="src/im_mad/remotes/kvm.d/kvm.rb \
487
                    src/im_mad/remotes/kvm.d/architecture.sh \
488
                    src/im_mad/remotes/kvm.d/cpu.sh \
489
                    src/im_mad/remotes/kvm.d/name.sh"
490

    
491
IM_PROBES_GANGLIA_FILES="src/im_mad/remotes/ganglia.d/ganglia_probe"
492

    
493

    
494
#-------------------------------------------------------------------------------
495
# Transfer Manager commands, to be installed under $LIB_LOCATION/tm_commands
496
#   - NFS TM, $LIB_LOCATION/tm_commands/nfs
497
#   - SSH TM, $LIB_LOCATION/tm_commands/ssh
498
#   - dummy TM, $LIB_LOCATION/tm_commands/dummy
499
#   - LVM TM, $LIB_LOCATION/tm_commands/lvm
500
#-------------------------------------------------------------------------------
501

    
502
NFS_TM_COMMANDS_LIB_FILES="src/tm_mad/nfs/tm_clone.sh \
503
                           src/tm_mad/nfs/tm_delete.sh \
504
                           src/tm_mad/nfs/tm_ln.sh \
505
                           src/tm_mad/nfs/tm_mkswap.sh \
506
                           src/tm_mad/nfs/tm_mkimage.sh \
507
                           src/tm_mad/nfs/tm_mv.sh \
508
                           src/tm_mad/nfs/tm_context.sh"
509

    
510
SSH_TM_COMMANDS_LIB_FILES="src/tm_mad/ssh/tm_clone.sh \
511
                           src/tm_mad/ssh/tm_delete.sh \
512
                           src/tm_mad/ssh/tm_ln.sh \
513
                           src/tm_mad/ssh/tm_mkswap.sh \
514
                           src/tm_mad/ssh/tm_mkimage.sh \
515
                           src/tm_mad/ssh/tm_mv.sh \
516
                           src/tm_mad/ssh/tm_context.sh"
517

    
518
DUMMY_TM_COMMANDS_LIB_FILES="src/tm_mad/dummy/tm_dummy.sh"
519

    
520
LVM_TM_COMMANDS_LIB_FILES="src/tm_mad/lvm/tm_clone.sh \
521
                           src/tm_mad/lvm/tm_delete.sh \
522
                           src/tm_mad/lvm/tm_ln.sh \
523
                           src/tm_mad/lvm/tm_mkswap.sh \
524
                           src/tm_mad/lvm/tm_mkimage.sh \
525
                           src/tm_mad/lvm/tm_mv.sh \
526
                           src/tm_mad/lvm/tm_context.sh"
527

    
528
#-------------------------------------------------------------------------------
529
# Image Repository drivers, to be installed under $REMOTES_LOCTION/image
530
#   - FS based Image Repository, $REMOTES_LOCATION/image/fs
531
#-------------------------------------------------------------------------------
532
IMAGE_DRIVER_FS_SCRIPTS="src/image_mad/remotes/fs/cp \
533
                         src/image_mad/remotes/fs/mkfs \
534
                         src/image_mad/remotes/fs/mv \
535
                         src/image_mad/remotes/fs/fsrc \
536
                         src/image_mad/remotes/fs/rm"
537

    
538
#-------------------------------------------------------------------------------
539
# Migration scripts for onedb command, to be installed under $LIB_LOCATION
540
#-------------------------------------------------------------------------------
541
ONEDB_MIGRATOR_FILES="src/onedb/1.rb \
542
                      src/onedb/onedb.rb \
543
                      src/onedb/onedb_backend.rb"
544

    
545
#-------------------------------------------------------------------------------
546
# Configuration files for OpenNebula, to be installed under $ETC_LOCATION
547
#-------------------------------------------------------------------------------
548

    
549
ETC_FILES="share/etc/oned.conf \
550
           share/etc/defaultrc"
551

    
552
#-------------------------------------------------------------------------------
553
# Virtualization drivers config. files, to be installed under $ETC_LOCATION
554
#   - ec2, $ETC_LOCATION/vmm_ec2
555
#   - ssh, $ETC_LOCATION/vmm_exec
556
#-------------------------------------------------------------------------------
557

    
558
VMM_EC2_ETC_FILES="src/vmm_mad/ec2/vmm_ec2rc \
559
                   src/vmm_mad/ec2/vmm_ec2.conf"
560

    
561
VMM_EXEC_ETC_FILES="src/vmm_mad/exec/vmm_execrc \
562
                  src/vmm_mad/exec/vmm_exec_kvm.conf \
563
                  src/vmm_mad/exec/vmm_exec_xen.conf"
564

    
565
#-------------------------------------------------------------------------------
566
# Information drivers config. files, to be installed under $ETC_LOCATION
567
#   - ec2, $ETC_LOCATION/im_ec2
568
#-------------------------------------------------------------------------------
569

    
570
IM_EC2_ETC_FILES="src/im_mad/ec2/im_ec2rc \
571
                  src/im_mad/ec2/im_ec2.conf"
572

    
573
#-------------------------------------------------------------------------------
574
# Storage drivers config. files, to be installed under $ETC_LOCATION
575
#   - nfs, $ETC_LOCATION/tm_nfs
576
#   - ssh, $ETC_LOCATION/tm_ssh
577
#   - dummy, $ETC_LOCATION/tm_dummy
578
#   - lvm, $ETC_LOCATION/tm_lvm
579
#-------------------------------------------------------------------------------
580

    
581
TM_NFS_ETC_FILES="src/tm_mad/nfs/tm_nfs.conf \
582
                  src/tm_mad/nfs/tm_nfsrc"
583

    
584
TM_SSH_ETC_FILES="src/tm_mad/ssh/tm_ssh.conf \
585
                  src/tm_mad/ssh/tm_sshrc"
586

    
587
TM_DUMMY_ETC_FILES="src/tm_mad/dummy/tm_dummy.conf \
588
                    src/tm_mad/dummy/tm_dummyrc"
589

    
590
TM_LVM_ETC_FILES="src/tm_mad/lvm/tm_lvm.conf \
591
                  src/tm_mad/lvm/tm_lvmrc"
592

    
593
#-------------------------------------------------------------------------------
594
# Hook Manager driver config. files, to be installed under $ETC_LOCATION/hm
595
#-------------------------------------------------------------------------------
596

    
597
HM_ETC_FILES="src/hm_mad/hmrc"
598

    
599
#-------------------------------------------------------------------------------
600
# Hook Manager driver config. files, to be installed under $ETC_LOCATION/hm
601
#-------------------------------------------------------------------------------
602

    
603
AUTH_ETC_FILES="src/authm_mad/auth_mad \
604
                src/authm_mad/auth.conf"
605

    
606
#-------------------------------------------------------------------------------
607
# Sample files, to be installed under $SHARE_LOCATION/examples
608
#-------------------------------------------------------------------------------
609

    
610
EXAMPLE_SHARE_FILES="share/examples/vm.template \
611
                     share/examples/private.net \
612
                     share/examples/public.net"
613

    
614
#-------------------------------------------------------------------------------
615
# TM Sample files, to be installed under $SHARE_LOCATION/examples/tm
616
#-------------------------------------------------------------------------------
617

    
618
TM_EXAMPLE_SHARE_FILES="share/examples/tm/tm_clone.sh \
619
                        share/examples/tm/tm_delete.sh \
620
                        share/examples/tm/tm_ln.sh \
621
                        share/examples/tm/tm_mkimage.sh \
622
                        share/examples/tm/tm_mkswap.sh \
623
                        share/examples/tm/tm_mv.sh"
624

    
625
#-------------------------------------------------------------------------------
626
# HOOK scripts, to be installed under $SHARE_LOCATION/hooks
627
#-------------------------------------------------------------------------------
628

    
629
HOOK_SHARE_FILES="share/hooks/ebtables-xen \
630
                  share/hooks/ebtables-kvm \
631
                  share/hooks/ebtables-flush \
632
                  share/hooks/host_error.rb \
633
                  share/hooks/image.rb"
634

    
635
INSTALL_NOVNC_SHARE_FILE="share/install_novnc.sh"
636

    
637
#-------------------------------------------------------------------------------
638
# OCA Files
639
#-------------------------------------------------------------------------------
640
OCA_LIB_FILES="src/oca/ruby/OpenNebula.rb"
641

    
642
RUBY_OPENNEBULA_LIB_FILES="src/oca/ruby/OpenNebula/Host.rb \
643
                           src/oca/ruby/OpenNebula/HostPool.rb \
644
                           src/oca/ruby/OpenNebula/Pool.rb \
645
                           src/oca/ruby/OpenNebula/User.rb \
646
                           src/oca/ruby/OpenNebula/UserPool.rb \
647
                           src/oca/ruby/OpenNebula/VirtualMachine.rb \
648
                           src/oca/ruby/OpenNebula/VirtualMachinePool.rb \
649
                           src/oca/ruby/OpenNebula/VirtualNetwork.rb \
650
                           src/oca/ruby/OpenNebula/VirtualNetworkPool.rb \
651
                           src/oca/ruby/OpenNebula/Image.rb \
652
                           src/oca/ruby/OpenNebula/ImagePool.rb \
653
                           src/oca/ruby/OpenNebula/Template.rb \
654
                           src/oca/ruby/OpenNebula/TemplatePool.rb \
655
                           src/oca/ruby/OpenNebula/Group.rb \
656
                           src/oca/ruby/OpenNebula/GroupPool.rb \
657
                           src/oca/ruby/OpenNebula/Acl.rb \
658
                           src/oca/ruby/OpenNebula/XMLUtils.rb"
659

    
660
#-------------------------------------------------------------------------------
661
# Common Cloud Files
662
#-------------------------------------------------------------------------------
663

    
664
COMMON_CLOUD_LIB_FILES="src/cloud/common/CloudServer.rb \
665
                        src/cloud/common/CloudClient.rb \
666
                        src/cloud/common/Configuration.rb"
667

    
668
COMMON_CLOUD_CLIENT_LIB_FILES="src/cloud/common/CloudClient.rb"
669

    
670
#-------------------------------------------------------------------------------
671
# EC2 Query for OpenNebula
672
#-------------------------------------------------------------------------------
673

    
674
ECO_LIB_FILES="src/cloud/ec2/lib/EC2QueryClient.rb \
675
               src/cloud/ec2/lib/EC2QueryServer.rb \
676
               src/cloud/ec2/lib/ImageEC2.rb \
677
               src/cloud/ec2/lib/econe-server.rb"
678

    
679
ECO_LIB_CLIENT_FILES="src/cloud/ec2/lib/EC2QueryClient.rb"
680

    
681
ECO_LIB_VIEW_FILES="src/cloud/ec2/lib/views/describe_images.erb \
682
                    src/cloud/ec2/lib/views/describe_instances.erb \
683
                    src/cloud/ec2/lib/views/register_image.erb \
684
                    src/cloud/ec2/lib/views/run_instances.erb \
685
                    src/cloud/ec2/lib/views/terminate_instances.erb"
686

    
687
ECO_BIN_FILES="src/cloud/ec2/bin/econe-server \
688
               src/cloud/ec2/bin/econe-describe-images \
689
               src/cloud/ec2/bin/econe-describe-instances \
690
               src/cloud/ec2/bin/econe-register \
691
               src/cloud/ec2/bin/econe-run-instances \
692
               src/cloud/ec2/bin/econe-terminate-instances \
693
               src/cloud/ec2/bin/econe-upload"
694

    
695
ECO_BIN_CLIENT_FILES="src/cloud/ec2/bin/econe-describe-images \
696
               src/cloud/ec2/bin/econe-describe-instances \
697
               src/cloud/ec2/bin/econe-register \
698
               src/cloud/ec2/bin/econe-run-instances \
699
               src/cloud/ec2/bin/econe-terminate-instances \
700
               src/cloud/ec2/bin/econe-upload"
701

    
702
ECO_ETC_FILES="src/cloud/ec2/etc/econe.conf"
703

    
704
ECO_ETC_TEMPLATE_FILES="src/cloud/ec2/etc/templates/m1.small.erb"
705

    
706
#-----------------------------------------------------------------------------
707
# OCCI files
708
#-----------------------------------------------------------------------------
709

    
710
OCCI_LIB_FILES="src/cloud/occi/lib/OCCIServer.rb \
711
                src/cloud/occi/lib/occi-server.rb \
712
                src/cloud/occi/lib/OCCIClient.rb \
713
                src/cloud/occi/lib/VirtualMachineOCCI.rb \
714
                src/cloud/occi/lib/VirtualMachinePoolOCCI.rb \
715
                src/cloud/occi/lib/VirtualNetworkOCCI.rb \
716
                src/cloud/occi/lib/VirtualNetworkPoolOCCI.rb \
717
                src/cloud/occi/lib/ImageOCCI.rb \
718
                src/cloud/occi/lib/ImagePoolOCCI.rb"
719

    
720
OCCI_LIB_CLIENT_FILES="src/cloud/occi/lib/OCCIClient.rb"
721

    
722
OCCI_BIN_FILES="src/cloud/occi/bin/occi-server \
723
               src/cloud/occi/bin/occi-compute \
724
               src/cloud/occi/bin/occi-network \
725
               src/cloud/occi/bin/occi-storage"
726

    
727
OCCI_BIN_CLIENT_FILES="src/cloud/occi/bin/occi-compute \
728
               src/cloud/occi/bin/occi-network \
729
               src/cloud/occi/bin/occi-storage"
730

    
731
OCCI_ETC_FILES="src/cloud/occi/etc/occi-server.conf"
732

    
733
OCCI_ETC_TEMPLATE_FILES="src/cloud/occi/etc/templates/common.erb \
734
                    src/cloud/occi/etc/templates/custom.erb \
735
                    src/cloud/occi/etc/templates/small.erb \
736
                    src/cloud/occi/etc/templates/medium.erb \
737
                    src/cloud/occi/etc/templates/large.erb"
738

    
739
#-----------------------------------------------------------------------------
740
# CLI files
741
#-----------------------------------------------------------------------------
742

    
743
CLI_LIB_FILES="src/cli/cli_helper.rb \
744
               src/cli/command_parser.rb \
745
               src/cli/one_helper.rb"
746

    
747
ONE_CLI_LIB_FILES="src/cli/one_helper/onegroup_helper.rb \
748
                   src/cli/one_helper/onehost_helper.rb \
749
                   src/cli/one_helper/oneimage_helper.rb \
750
                   src/cli/one_helper/onetemplate_helper.rb \
751
                   src/cli/one_helper/oneuser_helper.rb \
752
                   src/cli/one_helper/onevm_helper.rb \
753
                   src/cli/one_helper/onevnet_helper.rb"
754

    
755
CLI_BIN_FILES="src/cli/onevm \
756
               src/cli/onehost \
757
               src/cli/onevnet \
758
               src/cli/oneuser \
759
               src/cli/oneimage \
760
               src/cli/onetemplate \
761
               src/cli/onegroup \
762
               src/cli/oneacl"
763

    
764
CLI_CONF_FILES="src/cli/etc/onegroup.yaml \
765
                src/cli/etc/onehost.yaml \
766
                src/cli/etc/oneimage.yaml \
767
                src/cli/etc/onetemplate.yaml \
768
                src/cli/etc/oneuser.yaml \
769
                src/cli/etc/onevm.yaml \
770
                src/cli/etc/onevnet.yaml"
771

    
772
#-----------------------------------------------------------------------------
773
# Sunstone files
774
#-----------------------------------------------------------------------------
775

    
776
SUNSTONE_FILES="src/sunstone/config.ru \
777
                src/sunstone/sunstone-server.rb"
778

    
779
SUNSTONE_BIN_FILES="src/sunstone/bin/sunstone-server"
780

    
781
SUNSTONE_ETC_FILES="src/sunstone/etc/sunstone-server.conf"
782

    
783
SUNSTONE_MODELS_FILES="src/sunstone/models/OpenNebulaJSON.rb \
784
                       src/sunstone/models/SunstoneServer.rb"
785

    
786
SUNSTONE_MODELS_JSON_FILES="src/sunstone/models/OpenNebulaJSON/HostJSON.rb \
787
                    src/sunstone/models/OpenNebulaJSON/ImageJSON.rb \
788
                    src/sunstone/models/OpenNebulaJSON/GroupJSON.rb \
789
                    src/sunstone/models/OpenNebulaJSON/JSONUtils.rb \
790
                    src/sunstone/models/OpenNebulaJSON/PoolJSON.rb \
791
                    src/sunstone/models/OpenNebulaJSON/UserJSON.rb \
792
                    src/sunstone/models/OpenNebulaJSON/VirtualMachineJSON.rb \
793
                    src/sunstone/models/OpenNebulaJSON/TemplateJSON.rb \
794
                    src/sunstone/models/OpenNebulaJSON/VirtualNetworkJSON.rb"
795

    
796
SUNSTONE_TEMPLATE_FILES="src/sunstone/templates/index.html \
797
                         src/sunstone/templates/login.html"
798

    
799
SUNSTONE_PUBLIC_JS_FILES="src/sunstone/public/js/layout.js \
800
                        src/sunstone/public/js/login.js \
801
                        src/sunstone/public/js/sunstone.js \
802
                        src/sunstone/public/js/sunstone-util.js \
803
                        src/sunstone/public/js/opennebula.js"
804

    
805
SUNSTONE_PUBLIC_JS_PLUGINS_FILES="\
806
                            src/sunstone/public/js/plugins/dashboard-tab.js \
807
                            src/sunstone/public/js/plugins/hosts-tab.js \
808
                            src/sunstone/public/js/plugins/groups-tab.js \
809
                            src/sunstone/public/js/plugins/images-tab.js \
810
                            src/sunstone/public/js/plugins/templates-tab.js \
811
                            src/sunstone/public/js/plugins/users-tab.js \
812
                            src/sunstone/public/js/plugins/vms-tab.js \
813
                            src/sunstone/public/js/plugins/vnets-tab.js"
814

    
815
SUNSTONE_PUBLIC_CSS_FILES="src/sunstone/public/css/application.css \
816
                           src/sunstone/public/css/layout.css \
817
                           src/sunstone/public/css/login.css"
818

    
819
SUNSTONE_PUBLIC_VENDOR_DATATABLES="\
820
                src/sunstone/public/vendor/dataTables/jquery.dataTables.min.js \
821
                src/sunstone/public/vendor/dataTables/demo_table_jui.css \
822
                src/sunstone/public/vendor/dataTables/BSD-LICENSE.txt \
823
                src/sunstone/public/vendor/dataTables/NOTICE"
824

    
825
SUNSTONE_PUBLIC_VENDOR_JGROWL="\
826
                src/sunstone/public/vendor/jGrowl/jquery.jgrowl_minimized.js \
827
                src/sunstone/public/vendor/jGrowl/jquery.jgrowl.css \
828
                src/sunstone/public/vendor/jGrowl/NOTICE"
829

    
830
SUNSTONE_PUBLIC_VENDOR_JQUERY="\
831
                        src/sunstone/public/vendor/jQuery/jquery-1.4.4.min.js \
832
                        src/sunstone/public/vendor/jQuery/MIT-LICENSE.txt \
833
                        src/sunstone/public/vendor/jQuery/NOTICE"
834

    
835
SUNSTONE_PUBLIC_VENDOR_JQUERYUI="\
836
src/sunstone/public/vendor/jQueryUI/ui-bg_glass_75_dadada_1x400.png \
837
src/sunstone/public/vendor/jQueryUI/ui-icons_cd0a0a_256x240.png \
838
src/sunstone/public/vendor/jQueryUI/jquery-ui-1.8.7.custom.css \
839
src/sunstone/public/vendor/jQueryUI/ui-bg_flat_0_aaaaaa_40x100.png \
840
src/sunstone/public/vendor/jQueryUI/ui-bg_flat_0_8f9392_40x100.png \
841
src/sunstone/public/vendor/jQueryUI/MIT-LICENSE.txt \
842
src/sunstone/public/vendor/jQueryUI/jquery-ui-1.8.7.custom.min.js \
843
src/sunstone/public/vendor/jQueryUI/ui-bg_highlight-soft_75_cccccc_1x100.png \
844
src/sunstone/public/vendor/jQueryUI/ui-bg_glass_95_fef1ec_1x400.png \
845
src/sunstone/public/vendor/jQueryUI/ui-bg_glass_55_fbf9ee_1x400.png \
846
src/sunstone/public/vendor/jQueryUI/ui-icons_888888_256x240.png \
847
src/sunstone/public/vendor/jQueryUI/ui-bg_glass_75_e6e6e6_1x400.png \
848
src/sunstone/public/vendor/jQueryUI/ui-bg_flat_0_575c5b_40x100.png \
849
src/sunstone/public/vendor/jQueryUI/ui-bg_glass_65_ffffff_1x400.png \
850
src/sunstone/public/vendor/jQueryUI/ui-bg_flat_75_ffffff_40x100.png \
851
src/sunstone/public/vendor/jQueryUI/ui-icons_2e83ff_256x240.png \
852
src/sunstone/public/vendor/jQueryUI/ui-icons_454545_256x240.png \
853
src/sunstone/public/vendor/jQueryUI/NOTICE \
854
src/sunstone/public/vendor/jQueryUI/ui-icons_222222_256x240.png \
855
"
856
SUNSTONE_PUBLIC_VENDOR_JQUERYLAYOUT="\
857
            src/sunstone/public/vendor/jQueryLayout/layout-default-latest.css \
858
            src/sunstone/public/vendor/jQueryLayout/jquery.layout.min-1.2.0.js \
859
            src/sunstone/public/vendor/jQueryLayout/NOTICE"
860

    
861
SUNSTONE_PUBLIC_VENDOR_FLOT="\
862
src/sunstone/public/vendor/flot/jquery.flot.min.js \
863
src/sunstone/public/vendor/flot/jquery.flot.navigate.min.js \
864
src/sunstone/public/vendor/flot/LICENSE.txt \
865
src/sunstone/public/vendor/flot/NOTICE \
866
src/sunstone/public/vendor/flot/README.txt"
867

    
868
SUNSTONE_SHARE_ONEMONITOR="\
869
src/sunstone/share/OneMonitor/HostMonitor.rb \
870
src/sunstone/share/OneMonitor/OneMonitorClient.rb \
871
src/sunstone/share/OneMonitor/OneMonitorClientUtils.rb \
872
src/sunstone/share/OneMonitor/OneMonitor.rb \
873
src/sunstone/share/OneMonitor/OneMonitorUtils.rb \
874
src/sunstone/share/OneMonitor/runOneMonitor.rb \
875
src/sunstone/share/OneMonitor/VMMonitor.rb"
876

    
877
SUNSTONE_PUBLIC_IMAGES_FILES="src/sunstone/public/images/ajax-loader.gif \
878
                        src/sunstone/public/images/login_over.png \
879
                        src/sunstone/public/images/login.png \
880
                        src/sunstone/public/images/opennebula-sunstone-big.png \
881
                        src/sunstone/public/images/opennebula-sunstone-small.png \
882
                        src/sunstone/public/images/panel.png \
883
                        src/sunstone/public/images/pbar.gif \
884
                        src/sunstone/public/images/Refresh-icon.png \
885
                        src/sunstone/public/images/vnc_off.png \
886
                        src/sunstone/public/images/vnc_on.png"
887

    
888
#-----------------------------------------------------------------------------
889
# MAN files
890
#-----------------------------------------------------------------------------
891

    
892
MAN_FILES="share/man/oneauth.1.gz \
893
        share/man/onehost.1.gz \
894
        share/man/oneimage.1.gz \
895
        share/man/oneuser.1.gz \
896
        share/man/onevm.1.gz \
897
        share/man/onevnet.1.gz \
898
        share/man/onetemplate.1.gz \
899
        share/man/onedb.1.gz \
900
        share/man/econe-describe-images.1.gz \
901
        share/man/econe-describe-instances.1.gz \
902
        share/man/econe-register.1.gz \
903
        share/man/econe-run-instances.1.gz \
904
        share/man/econe-terminate-instances.1.gz \
905
        share/man/econe-upload.1.gz \
906
        share/man/occi-compute.1.gz \
907
        share/man/occi-network.1.gz \
908
        share/man/occi-storage.1.gz"
909

    
910
#-----------------------------------------------------------------------------
911
#-----------------------------------------------------------------------------
912
# INSTALL.SH SCRIPT
913
#-----------------------------------------------------------------------------
914
#-----------------------------------------------------------------------------
915

    
916
# --- Create OpenNebula directories ---
917

    
918
if [ "$UNINSTALL" = "no" ] ; then
919
    for d in $MAKE_DIRS; do
920
        mkdir -p $DESTDIR$d
921
    done
922
fi
923

    
924
# --- Install/Uninstall files ---
925

    
926
do_file() {
927
    if [ "$UNINSTALL" = "yes" ]; then
928
        rm $2/`basename $1`
929
    else
930
        if [ "$LINK" = "yes" ]; then
931
            ln -s $SRC_DIR/$1 $DESTDIR$2
932
        else
933
            cp $SRC_DIR/$1 $DESTDIR$2
934
        fi
935
    fi
936
}
937

    
938

    
939
if [ "$CLIENT" = "yes" ]; then
940
    INSTALL_SET=${INSTALL_CLIENT_FILES[@]}
941
elif [ "$SUNSTONE" = "yes" ]; then
942
    INSTALL_SET="${INSTALL_SUNSTONE_RUBY_FILES[@]} ${INSTALL_SUNSTONE_FILES[@]}"
943
else
944
    INSTALL_SET="${INSTALL_FILES[@]} ${INSTALL_SUNSTONE_FILES[@]}"
945
fi
946

    
947
for i in ${INSTALL_SET[@]}; do
948
    SRC=$`echo $i | cut -d: -f1`
949
    DST=`echo $i | cut -d: -f2`
950

    
951
    eval SRC_FILES=$SRC
952

    
953
    for f in $SRC_FILES; do
954
        do_file $f $DST
955
    done
956
done
957

    
958
if [ "$INSTALL_ETC" = "yes" ] ; then
959
    if [ "$SUNSTONE" = "yes" ]; then
960
        INSTALL_ETC_SET="${INSTALL_SUNSTONE_ETC_FILES[@]}"
961
    else
962
        INSTALL_ETC_SET="${INSTALL_ETC_FILES[@]} \
963
                         ${INSTALL_SUNSTONE_ETC_FILES[@]}"
964
    fi
965

    
966
    for i in ${INSTALL_ETC_SET[@]}; do
967
        SRC=$`echo $i | cut -d: -f1`
968
        DST=`echo $i | cut -d: -f2`
969

    
970
        eval SRC_FILES=$SRC
971

    
972
        OLD_LINK=$LINK
973
        LINK="no"
974

    
975
        for f in $SRC_FILES; do
976
            do_file $f $DST
977
        done
978

    
979
        LINK=$OLD_LINK
980
   done
981
fi
982

    
983
# --- Set ownership or remove OpenNebula directories ---
984

    
985
if [ "$UNINSTALL" = "no" ] ; then
986
    for d in $CHOWN_DIRS; do
987
        chown -R $ONEADMIN_USER:$ONEADMIN_GROUP $DESTDIR$d
988
    done
989

    
990
    # --- Set correct permissions for Image Repository ---
991

    
992
    if [ -d "$DESTDIR$IMAGES_LOCATION" ]; then
993
        chmod 3770 $DESTDIR$IMAGES_LOCATION
994
    fi
995
else
996
    for d in `echo $DELETE_DIRS | awk '{for (i=NF;i>=1;i--) printf $i" "}'`; do
997
        rmdir $d
998
    done
999
fi