Changeset 1668


Ignore:
Timestamp:
Sep 20, 2010, 2:24:08 PM (11 years ago)
Author:
ezyang
Message:
Remove instructions obsoleted by kickstart.
Location:
branches/fc13-dev/server/doc
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/fc13-dev/server/doc/install-fedora

    r1614 r1668  
    22----------------------------------------
    33
    4 1. Create the LVM partitions that the Scripts guest will use.
     4We use Kickstart to to initial Fedora configuration.  Installing a new
     5vanilla machine is as easy as:
    56
    6 Our classic setup is 50GB for the main, root partition (/) and
    7 10GB for our swap.  You can consult what things look like
    8 by using `lvdisplay`.  Our naming convention is server-name-root
    9 and server-name-swap.
     7    xm create scripts-server machine_name=$MACHINE install=fXX && console $MACHINE
    108
    11 Creating new LVM partitions is done with `lvcreate`:
     9The only prompt (near the beginning of the install process) should be
     10for the root password, and at the end, when it asks you to reboot.
     11Say yes, and the machine will power down, and then restart without
     12the install parameter:
    1213
    13     # Example values:
    14     # SERVERNAME=whole-enchilada
    15     # HOSTNAME=jay-leno
    16     lvcreate -n $SERVERNAME-root $HOSTNAME --size 50.00G
    17     lvcreate -n $SERVERNAME-swap $HOSTNAME --size 10.00G
    18 
    19 2. Acquire the network installation media for Fedora.
    20 
    21 Normally, you would download an ISO and kick off an installation
    22 by burning it to a CD and booting off of that.  Since we would like
    23 to make as minimal a Fedora install as possible, we use a different
    24 method. [XXX: Why do we actually do it this way?  It seems kind
    25 of convoluted]
    26 
    27 First, we need to create an appropriate installation directory,
    28 which contains the necessary kernel images and bootstrapping code.
    29 Navigate to a Fedora mirrors website, and find the correct release
    30 from the linux/releases directory, then grab the contents of
    31 Fedora/x86_64/os/isolinux.  For example, getting the Fedora 13 installer
    32 from mirrors.mit.edu would be:
    33 
    34     mkdir ~/f13-install
    35     cd ~/f13-install
    36     wget -r -nd ftp://mirrors.mit.edu/fedora/linux/releases/13/Fedora/x86_64/os/isolinux/
    37 
    38 You can then spin up a Xen image for installation with:
    39 
    40     xm create scripts-server machine_name=$HOSTNAME install=f13
    41 
    42 Note that the -install suffix was dropped.  Get a console with `xm
    43 console`.
    44 
    45 3. Tell Fedora where to get the real installer.
    46 
    47 You will now be in a curses installer interface.  Since you are doing
    48 a network install, you will need to configure your network and specify
    49 the URL to install.  Find the static hostname that you are planning
    50 to install to and get its information with:
    51 
    52     stella $HOSTNAME
    53 
    54 Manually configure its IP, disabling IPv6 for now.  The network mask is
    55 16, and you can check '/etc/resolv.conf' if you don't remember what
    56 MIT's DNS servers are.
    57 
    58 It will then ask you for an installation image.  Continuing with our
    59 F13 mirrors.mit.edu, the URL will look something like:
    60 
    61     ftp://mirrors.mit.edu/fedora/linux/releases/13/Fedora/x86_64/os
    62 
    63 4. Use VNC
    64 
    65 At this point, Fedora will ask you whether or not you want to use VNC
    66 to continue the installation.  Because Scripts has an unusual disk
    67 image setup, you will want to answer yes. [XXX: Unfortunately, this puts
    68 the VNC session on MITnet, so make sure you use a good password, and
    69 we should figure out to make it not do that].  Grab your favorite
    70 VNC client and login to $HOSTNAME:1 over SSH from the internal SIPB
    71 network.
    72 
    73 5. Installation in VNC
    74 
    75 5.1. Disks to use
    76 
    77 We don't have any exotic devices (we did that at the host level,
    78 recall), so you can use normal configuration.  The scripts-server Xen
    79 configuration will have automatically selected the LVM partitions you
    80 created in Step 1, and you want both of them.
    81 
    82 5.2. Host
    83 
    84 The default hostname is all caps: we use lower-case, so lower-case the
    85 name before proceeding.
    86 
    87 5.3. Timezone
    88 
    89 Self explanatory
    90 
    91 5.4. Root password
    92 
    93 Use Scripts root password for a real install, and fake password
    94 otherwise.
    95 
    96 5.5 Formatting the disks
    97 
    98 You can find out what our existing setup looks like by consulting
    99 '/etc/fstab'.
    100 
    101 Select Custom, and select both disks for formatting.  Setup the larger
    102 disk as the boot partition.  Configure the partitions as follows:
    103 
    104     50GB
    105         Standard Partition
    106         Mount Point: /
    107         File System Type: ext3 (the default as of F13 is ext4, which
    108             cannot be mounted by the hosts and thus should not be used!)
    109         Additional Size Options: Fill to maximum allowable size (the
    110             Size parameter will not do anything in that case)
    111         Force to be primary partition
    112     10GB
    113         Standard Partition
    114         File System Type: swap
    115         Additional Size Options: Fill to maximum allowable size
    116 
    117 5.6 Bootloader
    118 
    119 Defaults are fine.
    120 
    121 5.7 Installation
    122 
    123 Do a minimal install (we will proceed to install the packages we care
    124 about), and add the normal F13 repository (testing and updates will be
    125 added when we bring in our /etc configuration).  Similarly, we will
    126 install the software we want later, so there is no need to do that now.
    127 
    128 5.8 Reboot
    129 
    130 When the install finishes, it will ask you to reboot.  This is fine, but
    131 since we created the VM image with install, upon reboot it will ask us
    132 to install again.  Let it reboot, then destroy the virtual machine.
    133 
    134     xm destroy $SERVERNAME
    135 
    136 6. New World Order
    137 
    138 Start up the VM without the install flag:
    139 
    140     xm create scripts-server machine_name=$SERVERNAME
    141 
    142 You should have password SSH logins now too:
    143 
    144     ssh root@$SERVERNAME
     14    xm create scripts-server machine_name=$MACHINE && console $MACHINE
  • branches/fc13-dev/server/doc/install-howto.sh

    r1661 r1668  
    11# This document is a how-to for installing a Fedora scripts.mit.edu server.
     2# It is semi-vaguely in the form of a shell script, but is not really
     3# runnable as it stands.
    24
    35set -e -x
     
    1416# though, try adding NSS_NONLOCAL_IGNORE.
    1517
    16 [ -e /scripts-boot-count ] || echo 0 > /scripts-boot-count
    17 
    1818# This is actually just "pick an active scripts server".  It can't be
    1919# scripts.mit.edu because our networking config points that domain
     
    2222source_server="cats-whiskers.mit.edu"
    2323
    24 boot=${1:$(cat /scripts-boot-count)}
    25 
    26 # XXX: let 'branch' be the current svn branch you are on.  You want to
     24# 'branch' is the current svn branch you are on.  You want to
    2725# use trunk if your just installing a new server, and branches/fcXX-dev
    2826# if your preparing a server on a new Fedora release.
    29 
    30 doreboot() {
    31     echo $(( $boot + 1 )) > /scripts-boot-count;
    32     shutdown -r now "Rebooting for step $(cat /scripts-boot-count)"
    33 }
    34 
    35 # Helper files for the install are located in server/fedora/config.
    36 
    37 # Start with a minimal install of Fedora.
    38 
    39 # Take updates
     27branch="trunk"
     28
     29# Start with a Scripts kickstarted install of Fedora (install-fedora)
     30
     31# Take updates, reboot if there's a kernel update.
     32
    4033    yum update
    41 
    42 if [ $boot = 0 ]; then
    43 
    44 echo "--disabled" > /etc/sysconfig/system-config-firewall
    45 
    46 # Turn on network, so we can connect at boot
    47 chkconfig network on
    48 
    49 # Edit /etc/selinux/config so it has SELINUX=disabled and reboot.
    50     sed -i 's/^SELINUX=.*/SELINUX=disabled/' /etc/selinux/config
    51     doreboot
    52 fi
    53 
    54 if [ $boot = 1 ]; then
    55 # Create a scripts-build user account, and set up rpm to build in
    56 # $HOME by doing a
    57 # cp config/home/scripts-build/.rpmmacros /home/scripts-build/
    58 # (If you just use the default setup, it will generate packages
    59 # in /usr/src/redhat.)
    60     adduser scripts-build
    6134
    6235# Check out the scripts.mit.edu svn repository. Configure svn not to cache
    6336# credentials.
    64 
    65     yum install -y subversion
    6637
    6738    cd /srv
     
    8758# Run "make install-deps" to install various prereqs.  Nonstandard
    8859# deps are in /mit/scripts/rpm.
    89     yum install -y make
    9060    make install-deps
    9161    # You should pay close attention to the output of this command, and
    9262    # note if packages you think should exist don't exist anymore.
    93 
    94 # Get some packages necessary for OpenAFS
    95     yum install -y redhat-lsb
    96     yum install -y autofs
    9763
    9864# Copy over root's dotfiles from one of the other machines.
     
    10975    # and then push to the other server
    11076
    111 # Add scripts-build to the group 'mock'
    112     usermod -a -G mock scripts-build
    113 
    114 # Install bind
    115     yum install -y bind
    116 
    11777# Check out the scripts /etc configuration
    11878    cd /root
     
    13292# keytabs and k5login to get Kerberized authentication.
    13393
    134     service named start
    135     chkconfig named on
     94# Make sure network is working.  If this is a new server name, you'll
     95# need to add it to /etc/hosts and
     96# /etc/sysconfig/network-scripts/route-eth1.  Kickstart should have
     97# configured eth0 and eth1 correctly; use service network restart
     98# to add the new routes in route-eth1.
     99    route
     100    ifconfig
     101    cat /etc/hosts
     102    cat /etc/sysconfig/network-scripts/route-eth1
     103    service network restart
    136104
    137105# This is the point at which you should start updating scriptsified
     
    140108
    141109    yum install -y scripts-base
    142 
    143 # Reload the iptables config to take down the restrictive firewall
    144     service iptables restart
    145110
    146111# Check that fs sysname is correct.  You should see, among others,
     
    153118    yum install -y syslog-ng
    154119    chkconfig syslog-ng on
    155 
    156 # Install various dependencies of the scripts system, including
    157 # glibc-devel.i586 (ezyang: already installed for me),
    158 # python-twisted-core (ditto), mod_fcgid, nrpe, nagios-plugins-all.
    159     yum install -y mod_fcgid
    160     yum install -y nrpe
    161     yum install -y nagios-plugins-all
    162     yum install -y fprintd-pam
    163120
    164121# Fix the openafs /usr/vice/etc <-> /etc/openafs mapping.
     
    240197#   want to be able to write to ~/.python-eggs.  (Also makes sourcediving
    241198#   easier.)
     199    cat /usr/lib/python2.6/site-packages/easy-install.pth
    242200# - Look at `gem list` for Ruby gems.
    243201#   Again, use 'yum search' and prefer RPMs, but failing that, 'gem install'.
    244202#       ezyang: rspec-rails depends on rspec, and will override the Yum
    245203#       package, so... don't use that RPM yet
     204    gem list
    246205# - Look at `pear list` for Pear fruits (or whatever they're called).
    247206#   Yet again, 'yum search' for RPMs before resorting to 'pear install'.  Note
    248207#   that for things in the beta repo, you'll need 'pear install package-beta'.
    249208#   (you might get complaints about the php_scripts module; ignore them)
     209    pear list
    250210# - Look at `pecl list` for PECL things.  'yum search', and if you must,
    251211#   'pecl install' needed items. If it doesn't work, try 'pear install
    252212#   pecl/foo' or 'pecl install foo-beta' or those two combined.
    253     # Automating this... will require a lot of batonning between
    254     # the servers. Probably best way to do it is to write an actual
    255     # script.
     213    pecl list
     214# Automating this... will require a lot of batonning between
     215# the servers. Probably best way to do it is to write an actual
     216# script.
    256217
    257218# Setup some Python config
     
    317278    vim /home/afsagent/renew # replace all mentions of daemon.scripts.mit.edu
    318279
    319 # Install 389-ds-base and set up replication (see ./install-ldap).
    320     yum install 389-ds-base
    321     # [complicated procedure here]
     280# Set up replication (see ./install-ldap).
     281    cat install-ldap
    322282
    323283# Make the services dirsrv, nslcd, nscd, postfix, and httpd start at
     
    356316# ThisCell got clobbered, replace it with athena.mit.edu
    357317    echo "athena.mit.edu" > /usr/vice/etc/ThisCell
    358 
    359 # Kill unnecessary services. (It's probably good form to look through
    360 # `chkconfig | grep on` manually)
    361     for i in avahi-daemon isdn nfslock pcscd rpcbind rpcgssd rpcidmapd; do
    362         chkconfig "$i" off
    363     done
    364318
    365319# Reboot the machine to restore a consistent state, in case you
  • branches/fc13-dev/server/doc/install-xen

    r1241 r1668  
    4343    git clone ssh://scripts@scripts.mit.edu/mit/scripts/git/xen.git /etc/xen
    4444
     45# setup conserver
     46    cat /etc/conserver/console.cf # add the correct entires here
     47    visudo # add conservr to sudoers list with:
     48        conservr ALL=(ALL) NOPASSWD: /usr/sbin/xm console *
Note: See TracChangeset for help on using the changeset viewer.