Changeset 2594 for trunk


Ignore:
Timestamp:
Aug 27, 2014, 10:53:18 PM (10 years ago)
Author:
achernya
Message:
There are no spheroid shenanigans.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/doc/install-howto.sh

    r2485 r2594  
    164164
    165165# ----------------------------->8--------------------------------------
    166 #                      SPHEROID SHENANIGANS
    167 
    168 # Install the Python eggs and Ruby gems and PEAR/PECL doohickeys that are on
    169 # the other scripts.mit.edu servers and do not have RPMs.
    170 # The general mode of operation will be to run the "list" command
    171 # on both servers, see what the differences are, check if those diffs
    172 # are packaged up as rpms, and install them (rpm if possible, native otherwise)
    173 
    174 # Note: Since ultimately we'd like to move away from using per-language
    175 # package manager and all of these be RPMs, it is of questionable
    176 # importance how much /good/ automation for these is necessary.
    177 
    178 # Warning: For a new release, we're supposed to check if Fedora has
    179 # packaged up the RPM.  Unfortunately we don't really have good incants
    180 # for this.
    181 
    182 # Warning: If you're installing a new server mid-lifecycle (or even if
    183 # this is the start of a cycle, but you've been staggering the
    184 # installation of servers), upstream may have moved on.  Because we
    185 # don't normally upgrade spheroid projects, that means executing these
    186 # instructions directly means that you will have mismatched versions
    187 # (the new servers will have newer versions.)  Please follow the
    188 # UPGRADE commentary attached to each of these.
    189 
    190 # Warning: The package lists that are generated are inconsistent on
    191 # the question of whether or not they contain all packages (locally
    192 # installed as well as distro packaged), or if they just contain locally
    193 # installed packages.  Check this carefully; many of the install incants
    194 # filter out already installed packages.
    195 
    196 # PERL CPAN
    197 # ---------
    198 
    199 # Install the full list of perl modules that users expect to be on the
    200 # scripts.mit.edu servers.
    201     cd /root
    202     export PERL_MM_USE_DEFAULT=1
    203     cpan # this is interactive, enter the next two lines
    204         o conf prerequisites_policy follow
    205         o conf commit
    206 # on a reference server
    207 perldoc -u perllocal | grep head2 | cut -f 3 -d '<' | cut -f 1 -d '|' | sort -u | perl -ne 'chomp; print "notest install $_\n" if system("rpm -q --whatprovides \"perl($_)\" >/dev/null 2>/dev/null")' > perl-packages.txt
    208 # arrange for perl-packages.txt to be transferred to server
    209     # Package list only contains new packages
    210     cat perl-packages.txt | perl -MCPAN -e shell
    211 # These are in /usr/local
    212 
    213 # UPGRADE: Installing old versions of CPAN modules requires you to
    214 # specify the full path of a module, e.g.
    215 # M/MS/MSCHWERN/Test-Simple-0.62.tar.gz.  It is not currently clear how
    216 # to get this information programatically.  Furthermore, we have a lot
    217 # of CPAN managed modules.  Since CPAN is the only thing
    218 # placed in /usr/local at this point, it may be easier to simple tar and
    219 # cp the Perl modules from one server to another, to keep them
    220 # consistent.  But doing this is fiddly XXX
    221 
    222 # PYTHON EGGS
    223 # -----------
    224 
    225 # - Look at /usr/lib/python2.7/site-packages and
    226 #           /usr/lib64/python2.7/site-packages for Python eggs and modules.
    227 #   There will be a lot of gunk that was installed from packages;
    228 #   easy-install.pth in /usr/lib/ will tell you what was easy_installed.
    229 #   First use 'yum search' to see if the relevant package is now available
    230 #   as an RPM, and install that if it is.  If not, then use easy_install.
    231 #   Pass -Z to easy_install to install them unzipped, as some zipped eggs
    232 #   want to be able to write to ~/.python-eggs.  (Also makes sourcediving
    233 #   easier.)
    234 # 'easy_install AuthKit jsonlib2 pygit'
    235 cat /usr/lib/python2.7/site-packages/easy-install.pth | grep "^./" | cut -c3- | cut -f1 -d- > egg.txt
    236     # Package list only contains new packages
    237     cat egg.txt | xargs easy_install -Z
    238 # These are in /usr
    239 
    240 # UPGRADE: Use 'easy_install -n' to see what new versions are installed, and if there
    241 # are updates validate them and upgrade them on the old servers.  Since
    242 # we have a really small package list (around 4) checking these manually
    243 # should be fine.  Note that dry run is slightly buggy and may fail
    244 # midway processing files on account of a missing build directory.
    245 
    246 # RUBY GEMS
    247 # ---------
    248 
    249 # - Look at `gem list` for Ruby gems.
    250 #   Again, use 'yum search' and prefer RPMs, but failing that, 'gem install'.
    251 #       ezyang: rspec-rails depends on rspec, and will override the Yum
    252 #       package, so... don't use that RPM yet
    253 # XXX This doesn't do the right thing for old version gems
    254 gem list --no-version > gem.txt
    255     # Package list contains distro gems too
    256     gem install $(gem list --no-version | grep -Fxvf - gem.txt)
    257     # Also, we need to install the old rails version
    258     gem install -v=2.3.14 rails
    259 # These are in /usr
    260 
    261 # UPGRADE:  You can either upgrade out-of-date gems, or leave them at
    262 # the old version.  We recommend the latter (see below for the
    263 # rationale), but note that the install script described here doesn't
    264 # pin against version, so you'll need to supply the -v parameters
    265 # manually (the gems we install manually don't move too quickly, so this
    266 # is fairly tractable if you check 'gem outdated'.)
    267 #
    268 # If you want to upgrade, do NOT use wildcard 'gem update'; use 'gem
    269 # outdated' to find out all gems that are out of date, and verify this
    270 # against our locally installed gems (there will be a lot of out of date
    271 # gems, but this is simply because Fedora packaging lags behind the
    272 # canonical versions (this is a good thing).  Manually upgrade just
    273 # those gems.  Note that this doesn't save you from having to install
    274 # old gems on the servers that are being installed out-of-cycle,
    275 # because Ruby supports pinning against old versions, and if those gems
    276 # then mysteriously disappear, things will be sad (note that this isn't
    277 # a *huge* problem, because usually when you pin gems it's in
    278 # conjunction with rvm, so they have their local copy of the gem.)
    279 
    280 # PHP PEAR
    281 # --------
    282 
    283 # - Look at `pear list` for Pear fruits (or whatever they're called).
    284 #   Yet again, 'yum search' for RPMs before resorting to 'pear install'.  Note
    285 #   that for things in the beta repo, you'll need 'pear install package-beta'.
    286 #   (you might get complaints about the php_scripts module; ignore them)
    287 pear list | tail -n +4 | cut -f 1 -d " " > pear.txt
    288     # Package list contains distro packages
    289     pear config-set preferred_state beta
    290     pear channel-update pear.php.net
    291     pear install $(pear list | tail -n +4 | cut -f 1 -d " " | grep -Fxvf - pear.txt)
    292 # These are in /usr
    293 
    294 # PHP PECL
    295 # --------
    296 
    297 # - Look at `pecl list` for PECL things.  'yum search', and if you must,
    298 #   'pecl install' needed items. If it doesn't work, try 'pear install
    299 #   pecl/foo' or 'pecl install foo-beta' or those two combined.
    300 pecl list | tail -n +4 | cut -f 1 -d " " > pecl.txt
    301     # Package list contains distro packages
    302     pecl install --nodeps $(pecl list | tail -n +4 | cut -f 1 -d " " | grep -Fxvf - pecl.txt)
    303 # These are in /usr
    304 
    305 # ----------------------------->8--------------------------------------
    306166#                       INFINITE CONFIGURATION
    307167
Note: See TracChangeset for help on using the changeset viewer.