update UPGRADE.mojo
[spider.git] / UPGRADE.mojo
1 There are the notes for upgrading to the mojo branch.
2
3 There is NO POINT in doing this at the moment unless you are running a node with many (>50)
4 users. It is the future, but at the moment I am testing larger and larger installations to
5 check that it a) still works as people imagine it should and b) it provides the improvement
6 in scaling that I am anticipating. There are no significant new features - yet. 
7
8 Upgrading is not for the faint of heart. There is no installation script (but there
9 will be) so, for the time being, you need to do some manual editing. Also, while there is
10 a backward path, it will involve moving various files from their new home (/spider/local_data),
11 back to where they came from (/spider/data).
12
13 Prerequisites:
14
15         A supply of good, strong tea - preferably in pint mugs. A tin hat, stout boots, a
16         rucksack with survival rations and a decent miners' lamp might also prove comforting. I
17         enclose this link: http://www.noswearing.com/dictionary in case you run out of swear words.
18
19         An installed and known working git based installation. Mojo is not supported under CVS or
20         installation from a tarball. 
21
22         perl 5.10.1, preferably 5.14.1 or greater. This basically means running ubuntu 12.04 or
23         later (or one of the other linux distros of similar age or later). The install instructions are
24         for debian based systems. IT WILL NOT WORK WITHOUT A "MODERN" PERL. Yes, you can use
25         bleadperl if you know how to use it and can get it to run the node under it as a daemon
26         without resorting the handy URL supplied above. Personally, I wouldn't bother. It's
27         easier and quicker just to upgrade your linux distro. Apart from anything else things like ssh
28         ntpd are broken on ALL older systems and will allow the ungodly in more easily than something
29         modern.
30
31 Install cpamminus:
32
33         sudo apt-get install cpanminus
34 or
35         sudo apt-get install curl
36         curl -L https://cpanmin.us | perl - --sudo App::cpanminus
37
38 You will need the following CPAN packages:
39
40         sudo cpanm EV Mojolicious Mojo::IOLoop::ForkCall JSON JSON::XS
41         # just in case it's missing
42         sudo apt-get install top
43
44 Login as the sysop user.
45
46 Edit your /spider/local/DXVars.pm so that the bottom of the file is changed from something like:
47
48 ---- old ----
49
50          # the port number of the cluster (just leave this, unless it REALLY matters to you)
51          $clusterport = 27754;
52
53          # your favorite way to say 'Yes'
54          $yes = 'Yes';
55
56          # your favorite way to say 'No'
57          $no = 'No';
58
59          # the interval between unsolicited prompts if not traffic
60          $user_interval = 11*60;
61
62          # data files live in 
63          $data = "$root/data";
64
65          # system files live in
66          $system = "$root/sys";
67
68          # command files live in
69          $cmd = "$root/cmd";
70
71          # local command files live in (and overide $cmd)
72          $localcmd = "$root/local_cmd";
73
74          # where the user data lives
75          $userfn = "$data/users";
76
77          # the "message of the day" file
78          $motd = "$data/motd";
79
80          # are we debugging ?
81          @debug = qw(chan state msg cron );
82
83 ---- to this: ----
84
85          # the port number of the cluster (just leave this, unless it REALLY matters to you)
86          $clusterport = 27754;
87
88          # your favorite way to say 'Yes'
89          $yes = 'Yes';
90
91          # your favorite way to say 'No'
92          $no = 'No';
93
94          # this is where the paths used to be which you have just removed
95          
96          # are we debugging ?
97          @debug = qw(chan state msg cron );
98
99 ---- new  ------
100
101 There may be other stuff after this in DXVars.pm, that doesn't matter. The point is to remove
102 all the path definitions in DXVars.pm. If this isn't clear to you then it would be better if
103 you asked on dxspider-support for help before attempting to go any further.
104
105 One of the things that will happen is that several files currently in /spider/data will be
106 placed in /spider/local_data. These include the user, qsl and usdb data files, the band and
107 prefix files, and various "bad" data files. I.e. everything that is modified from the base
108 git distribution. 
109
110 Now run the console program or telnet localhost and login as the sysop user.
111
112         export_users
113         bye
114
115 as the sysop user:
116
117    sudo service dxspider stop
118
119 having stopped the node:
120
121    mkdir /spider/local_data
122    git reset --hard
123    git pull
124    git checkout --track -b mojo origin/mojo
125
126 if you have not already done this:
127
128    sudo ln -s /spider/perl/console.pl /usr/local/bin/dx
129    sudo ln -s /spider/perl/*dbg /usr/local/bin
130
131 Now in another window run:
132
133         watchdbg
134
135 and finally:
136
137    sudo service dxspider start
138
139 You should be aware that this code base is now under active development and, if you do a 'git pull',
140 what you get may be broken. But, if this does happen, the likelyhood is that I am actively working
141 on the codebase and any brokenness may be fixed (maybe in minutes) with another 'git pull'.
142
143 I try very hard not to leave it in a broken state...
144
145 Dirk G1TLH
146
147
148
149