V2 Server Setup

V2Master

Introduction

  1. A Linux server capable of hosting multiple virtual machines (VMs)
  2. Basic setup performed by hand:
    1. OS installation
    2. Install development tools
    3. Setup RAID disk mirroring
  3. Further provisioning automated by use of Puppet:

    1. VirtualBox and Vagrant installation

    2. Rinetd setup on host system
    3. Reverse proxy gateway in VM
    4. Internal DNS server in VM

Basic Platform

  1. Hardware:
    1. Multi-core Intel architecture with 64-bit processor(s)
    2. 1 x SSD drive for the root, swap and main applications
    3. 2 x identical hard disks for backups
  2. Software:
    1. VirtualBox - Virtualization software

    2. Bagrant - Ruby-based command line front for VirtualBox

    3. Other standard Linux packages (Bind, Apache, MySQL, Rails, etc.) as needed

Operating System Installation

  1. Download Ubuntu 12.04.3 LTS Server

    1. Available from: http://www.ubuntu.com/download/server

    2. Select: 64-bit (recommended) - This is called amd64, with is appropriate for Interl and AMD 64-bit processors

  2. Prepare a bootable memory stick
    1. See instructions at:
      1. On an Ubuntu system: http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-ubuntu

Ubuntu Installation

  1. Boot system from memory stick containing Ubuntu 12.04.3 LTS server

  2. Select language: English

  3. Selection option: Install Ubuntu Server

  4. Select system language: English

  5. Select location: other --> Europe --> Switzerland

  6. Select locale: en_US.UTF-8

  7. Configure network:
    1. DHCP configuration will start, enter cancel

    2. Select primary network interface - This question does not appear for systems with a single ethernet port

    3. Select: Configure manually

    4. IP address: enter systems's IP address'

    5. Gate IP address: enter system's gateway address

    6. Nameserver address(es): enter system's primary DNS IP address(es)'

    7. Hostname: enter system's hostname

  8. Create initial user
    1. Full name:
    2. User name:
    3. Enter & re-enter password

    4. Encrypt home directory: no

  9. Time zone: Accept Europe/Zurich

  10. Partition disks:
    1. Select entry for SSD drive
    2. Select Automatically partition and use LVM

    3. Select entire disk
    4. Accept proposed partition and accept writing partition table to disk
  11. Installs base operating system

  12. Enter proxy information: Enter return (e.g. no proxy required)

  13. Software selection: Select SSHD server, and nothing else

  14. Installs and configures more software

  15. Install GRUB boot loader: Yes

  16. Installation complete. Remove memory stick a reboot

Initial Configuration

  1. Login as the user defined during the installation
  2. Set the root password:
    • sudo bash
      passwd
  3. Update system:
    • apt-get update
      apt-get -y dist-upgrade
  4. Install development tools, required for VirtualBox installation

    • apt-get -y install build-essential autoconf libtool pkg-config

Setup Mirrored Disks

Setup RAID-1 based mirrored disks

In a typical installation, the SSD and two hard disks have device names assigned as follows:

  1. SSD: /dev/sda

  2. Hard disk 1: /dev/sdb

  3. Hard disk 2: /dev/sdc

Procedure:

  1. Partition and format hard disks with 'ext4 filesystems

    1. Partition: Perform this procedure once for heach hard dick, typically for /dev/sdb and /dev/sdc. Enter the following commands:

      • fdisk /dev/sdb
          p  # Print partition table
          d  # Delete all existing partitions. May need to use this command multiple times
          n  # Create a new partition, accept defaults, which are for a primary partition using all availa disk space
          w  # Write partition table to disk and exit
    2. Example:
      • Command (m for help): p
          ..prints partition table (which will be empty for a new disk)..
        Command (m for help): n
        Partition type:
          p   primary (0 primary, 0 extended, 4 free)
          e   extended
        Select (default p):
        Partition number (1-4, default 1):
        Using default value 1
        
        Command (m for help): w
        The partition table has been altered!
        Calling ioctl() to re-read partition table.
  2. Partition and format
Copyright 2008-2014, SoftXS GmbH, Switzerland