File: marsdev

package info (click to toggle)
metview 5.26.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 614,288 kB
  • sloc: cpp: 560,215; ansic: 44,633; xml: 19,933; f90: 17,905; sh: 7,269; python: 5,565; yacc: 2,318; lex: 1,372; perl: 701; makefile: 87
file content (157 lines) | stat: -rwxr-xr-x 3,347 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/env bash
# echo ${BASH_SOURCE[0]}
# HERE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

req="$1"

set -au

bdir=""

#[[ -x ~/build/bin/mars.bin ]] && bdir=~/build/
#[[ -x ~/build/mars-client/bin/mars.bin ]] && bdir=~/build/mars-client/
#[[ -x ~/build/mars-client-bundle/bin/mars.bin ]] && bdir=~/build/mars-client-bundle/

#[[ -z "$bdir" ]] && echo "couldn't find mars.bin executable" && exit 1

#export MARS_LANGUAGE_FILE=~/git/mars-client-configs/etc/mars.def
#export MARS_TEST_FILE=~/git/mars-client-configs/chk/mars.chk
#export MARS_EMS_FILE=/tmp/mars.ems
#export MARS_AUTH_FILE=/dev/null
#export MARS_DISSEMINATION_SCHEDULE_FILE=/tmp/mars.schedule
export MARS_CONFIG=/tmp/mars.config
export FDB_HOME=/tmp/fdblocal/

export MARS_ROOT=~/build/mars-client
export MARS_HOME=~/git/mars-client-configs

export MARS_LANGUAGE_FILE=$MARS_HOME/etc/mars.def
export MARS_TEST_FILE=$MARS_HOME/chk/mars.chk
#export MARS_CONFIG=/root/mars.cfg

# mkdir -p $FDB_HOME/etc/fdb
# cp $bdir/etc/fdb/schema $FDB_HOME/etc/fdb/

# cat <<@ > $FDB_HOME/etc/fdb/config.yaml
# ---
# type: dist
# lanes:
# - type: remote
#   host: localhost
#   port: 7655
# - type: remote
#   host: localhost
#   port: 7656
# @

cat <<@ > $MARS_CONFIG
database,
    class   = dhsbase,
    name    = localhost/dhslocal/local/marsod,
    retry   = 32767,
    timeout = 0,
    # rules   = '~/chk/marsod.chk',
    host    = 127.0.0.1,
    port    = 9000,
    obs     = 1

database,
    name    = file,
    class   = flatfilebase,
    visit   = false

database,
    class = fdb5base,
    name  = fdblocal/fdblocalhost/fdb,
    visit = false,
    timeout = 0,
    retry   = 32767,
    home = "$FDB_HOME",
    # rules = '~/chk/fdbmain.chk',
    host  = fdblocalhost # dummy

database,
    name=webmars,
    class=apibase,
    url='https://api.ecmwf.int/v1',
    visit=false

database,
    name=webmars2,
    class=apibase,
    visit=false

database,
    class   = dhsbase,
    name    = passive,
    retry   = 32767,
    timeout = 0,
    # rules   = '~/chk/marsod.chk',
    host    = localhost,
    port    = 9000,
    obs     = 1,
    passive_mode = 1,
    passive_host = localhost,
    passive_port = 9707,
    callback_proxy_host = localhost,
    visit   = false

database,
    class   = dhsbase,
    name    = passive-mvr0,
    retry   = 32767,
    timeout = 0,
    # rules   = '~/chk/marsod.chk',
    host    = marscore,
    port    = 9000,
    obs     = 1,
    passive_mode = 1,
    passive_host = marsmvr-0000/marsmvr-0001/marsmvr-0002,
    passive_port = 9707,
    # callback_proxy_host = marsmvr-0000,
    use_proxy=socks,
    visit   = false

@

export MARS_PROXIES=$MARS_HOME/etc/proxies.def

cat<<@ > $MARS_PROXIES

proxy,
    name = socks,
    type = socks,
    host = localhost,
    port = 1080,
    username = user,
    password = password
    # authorization = Basic foobar
@

# cat $MARS_PROXIES


# cat<<@ > $MARS_EMS_FILE
# $LOGNAME all
# @

# cat<<@ > $MARS_DISSEMINATION_SCHEDULE_FILE
# allow, request=(empty)
# @

echo "MARS client is $MARS_ROOT/bin/mars.bin"

# export ECKIT_DEBUG=1
# export METKIT_DEBUG=1
# export FDB_DEBUG=1
# export MARS_DEBUG=1

MARS_DEBUGGER=${MARS_DEBUGGER:=}

if [[ $req != "" ]]
then
  export MARS_REQUEST="$req"
  $MARS_DEBUGGER $MARS_ROOT/bin/mars.bin
else
  $MARS_DEBUGGER $MARS_ROOT/bin/mars.bin || exit 1
fi