Build the Anvil! m2 Install Media

From AN!Wiki
Jump to: navigation, search

 AN!Wiki :: How To :: Build the Anvil! m2 Install Media

This is part of the "Build an m2 Anvil!"™ Intelligent Availability™ tutorial.

Contents

Build the Anvil! Media

Template note icon.png
Note: Using RHEL will require a Resilient Storage Add-On subscription for each node, along with a subscription for the base OS. The Striker dashboard or Anvil! node can be attached to a subscription during the stage-2 install.

The build process is pretty simple;

  1. Download the RHEL or CentOS 6 DVD ISO.
    1. CentOS x86_64 v6
    2. RHEL x86_64 v6 (try or buy)
  2. Download anvil-generate-iso.
  3. Install dependencies.
  4. Build the Anvil! ISO.
  5. (Optional) Write the ISO to a USB drive

Staged Installs

Building a Striker dashboard or Anvil! node is a 2-stage process;

  1. The first stage is like installing firmware on a router; It gets the base OS install and initial configuration, but it is a generic system at that point.
  2. The second stage is where you configure the system for your environment.

Stage-1 install of Striker can be performed using the install media, or by enabling another dashboard's 'Install Target' feature and booting the new dashboard off of it's network interface. Stage-1 on nodes is always performed by network-booting off of a dashboard.

Stage-2 installs are always done the same, regardless of the method used for stage-1. On Striker dashboards, stage-2 is done using the 'striker-installer' command line tool. We'll see an example of this shortly. Stage-2 on Anvil! nodes is performed by "Install Manifests", created on, stored on and run from Striker dashboards. An install manifest can be used to build an entirely new Anvil! node pair, or to rebuild and re-integrate a replacement node into an existing Anvil!, while still hosting production servers.

Now then, let's get started!

Remind Me Again Why I Am Downloading This

The Anvil! is, most of all, an "Intelligent Availability" platform.

It takes the fully redundant hardware platform and configures it to maintain consistent performance for the virtual servers hosted on it. It allows for absolutely any component to fail and still run the servers, and to run them at the same performance as when fully healthy.

Knowing that the hardware foundation is fully redundant, it can monitor the relative health of the underlying nodes and should a component start to develop problems, it will preventatively live migrate the servers to the other node. The Anvil! is designed to run offline, so it is designed with the expectation that a problem might not be repaired promptly. A practical example of this intelligence is that it can see faults (actual or predicted) and decide which of the host nodes is "less bad", and move the servers back and forth as needed to minimize risk.

The installer below will build the install media needed to begin the install of your first Striker dashboard. Once built, you will no longer need the install media. Each Striker dashboard contains everything needed to build other dashboards and Anvil! nodes. This allows for any machine in the Anvil! to be rebuilt or replaced in the field, even in a totally air-gapped environment!

In short; The Anvil! is the most available, predictable performing virtual server platform currently available.

Download the RHEL or CentOS ISO

The first question to ask is;

"Do I want to build on RHEL or CentOS?".

The answer is up to you, but it comes down to your support comfort level. If you are a proper business, then going with RHEL makes the most sense. You will need to purchase a RHEL entitlement and Resilient Storage Add-On which includes the High-Availability Add-On.

If you're looking for a "free-as-in-beer" solution, or if you want to do a proof of concept/testing, CentOS is a perfectly fine option.

Template note icon.png
Note: Please be sure to get the 64-bit version of the 6-series release.

For CentOS, download both DVD 1 and 2. For RHEL, there is only DVD 1.

Save the ISO in any directory you want, just make a note of where they are.

Download the 'anvil-generate-iso' Anvil!™ Intelligent Availability™ ISO Builder

Template note icon.png
Note: This process requires a Linux machine to complete. Using Fedora Workstation Live-CD on bare hardware or in a virtual machine will work just fine. Just be sure to copy the finished ISO somewhere before shutting down the live image.

Download the tool:

cd ~
wget -c https://raw.githubusercontent.com/ClusterLabs/striker/master/tools/anvil-generate-iso
--2017-07-05 19:14:40--  https://raw.githubusercontent.com/ClusterLabs/striker/master/tools/anvil-generate-iso
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.128.133, 151.101.0.133, 151.101.192.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.128.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 155723 (152K) [text/plain]
Saving to: ‘anvil-generate-iso’
 
anvil-generate-iso          100%[=========================================>] 152.07K  --.-KB/s    in 0.04s
 
2017-07-05 19:14:40 (3.68 MB/s) - ‘anvil-generate-iso’ saved [155723/155723]
chmod 755 anvil-generate-iso
ls -lah anvil-generate-iso
-rwxr-xr-x. 1 digimer digimer 153K Jul  5 19:14 anvil-generate-iso

Build Dependencies

Template note icon.png
Note: Below, we show the dependencies needed for EL6, EL7, Fedora, Ubuntu and OpenSUSE. If you are using a different distro, we would love to hear from you and add support for as many other distros as possible.

The ISO generator requires a few program to work properly. So we'll install them now:

For EL6 and EL7:

sudo yum install createrepo genisoimage libcdio

For Fedora:

sudo dnf install createrepo genisoimage libcdio

For Ubuntu (tested on 16.04 LTS):

sudo apt-get install createrepo genisoimage libcdio-utils fuseiso

For OpenSUSE (tested on 42.1):

sudo zypper in createrepo genisoimage libcdio16 libcdio-utils

Build the ISO

Template note icon.png
Note: This tool requires access to the Internet to work properly.
Template note icon.png
Note: The next section assumes you have saved the source ISOs in the 'Downloads' directory.
  • To build a RHEL-based Anvil! ISO, run:
./anvil-generate-iso --source ./Downloads/rhel-server-6.9-x86_64-dvd.iso
Template note icon.png
Note: Both CentOS ISOs are listed with a ',' separating them without spaces.
  • To build a CentOS-based Anvil! ISO, run:
./anvil-generate-iso --source ./Downloads/CentOS-6.9-x86_64-bin-DVD1.iso,./Downloads/CentOS-6.9-x86_64-bin-DVD2.iso

Once the ISO generation starts, the process is the same for both types.

Template note icon.png
Note: The Anvil! ISO generator will, if you allow it, download and include third party tools, like hardware management tools and drivers. This requires reading and accepting the third party terms of use. The exact list of third part applications will grow and change as we receive feedback from testers and users.
Template warning icon.png
Warning: License agreements are important, so please do read them before accepting them.

Once your agree or decline the third party tools, the generation will start.

  • RHEL output:
- Generating md5sum of the source: [/data0/VMs/files/rhel-server-6.9-x86_64-dvd.iso], please wait a moment...
- The source ISO is: [RHEL 6.9, Disk 1].
- The working directory: [/home/digimer/anvil/iso/anvil/RHEL] doesn't exist.
- Can I create it (and needed subdirectories) now? [Y/n]
  • CentOS output:
- Generating md5sum of the source: [/data0/VMs/files/CentOS-6.9-x86_64-bin-DVD1.iso], please wait a moment...
- The source ISO is: [CentOS 6.9, Disk 1].
- Generating md5sum of the source: [/data0/VMs/files/CentOS-6.9-x86_64-bin-DVD2.iso], please wait a moment...
- The source ISO is: [CentOS 6.9, Disk 2].
- The working directory: [/home/digimer/anvil/iso/anvil/CentOS] doesn't exist.
- Can I create it (and needed subdirectories) now? [Y/n] y

In the example here, the ISO tools will create a build directory called ./anvil/iso/anvil/RHEL or ./anvil/iso/anvil/CentOS if you allow it to do so.

The rest of the build will be automated.

RHEL output (CentOS output is nearly identical);

- Thank you, proceeding now.
- The source ISO: [/data0/VMs/files/rhel-server-6.9-x86_64-dvd.iso] is not mounted. Will read and copy files directly out of the ISO.
- Reading the contents of the: [rhel-server-6.9-x86_64-dvd.iso] ISO now...
- Done. Read in: [4113] files across: [18] directories.
- Found: [3994] source packages.
- We're looking through the source ISO(s) to find which installation packages are needed.
- Please be patient! This can take a minute.
- Ready to copy files!
- Packages copied. Copying auxiliary source files now.
- Verifying 'syslinux' was created.
- The 'syslinux' directory was not in the source. Creating it now, if needed.
- Auxiliary files now in place, ready to grab Anvil! files.
- Downloading the Striker source code.
- This might take a few minutes on slow connections, please be patient.
- Downloading: [https://github.com/ClusterLabs/striker/archive/v2.0.1.zip] to: [/home/digimer/anvil/test/anvil/RHEL/striker.zip], which is: [<unknown>]... Redirected.
- Downloading: [https://codeload.github.com/ClusterLabs/striker/zip/v2.0.1] to: [/home/digimer/anvil/test/anvil/RHEL/striker.zip], which is: [5.56 MiB]... Finished! Took: [2] second(s).
- Extracting the Striker source file.
- Downloading packages from the Alteeve's Niche! repository now.
- If your connection is slow, this might take a few minutes. Please be patient.
...
<several downloads>
...
- New ISO generated. Calculating sum...
- All done!
 
The ISO file: [/home/digimer/anvil/test/anvil/Anvil_m2-v2.0.1_RHEL-6.9.iso] has been generated!
- The size is: [1.02 GiB] and the md5sum is: [a242fb16c7f9c41589201a851b4880d5]
Template warning icon.png
Warning: Please record the 'md5sum'! If you copy the ISO to another machine, verify that the ISO is the same by running 'md5sum Anvil_m2-v2.0.1_RHEL-6.9.iso'. If the resulting sum is different, the file is corrupt. If it is the same, you can be sure the image was accurately copied.

Ding! Dinner is ready!

Template note icon.png
Note: In the example above, version 2.0.1 was the latest release. The version available when you generate your iso, and the resulting ISO file names, will almost certainly be different.

You can now either burn the Anvil_m2-v2.0.1_RHEL-6.9.iso (or Anvil_m2-v2.0.1_CentOS-6.9.iso) ISO to a DVD disk.

Optional: Create a USB Boot Drive

Template note icon.png
Note: This is optional. If you don't have an optical drive on the machine you plan to make a Striker dashboard, then you can use anvil-usb-installer.

If you plan to install from a USB drive, download anvil-usb-installer as well.

cd ~
wget -c https://raw.githubusercontent.com/ClusterLabs/striker/master/tools/anvil-usb-installer
--2017-03-19 21:53:20--  https://raw.githubusercontent.com/ClusterLabs/striker/master/tools/anvil-usb-installer
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.192.133, 151.101.64.133, 151.101.128.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.192.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 46203 (45K) [text/plain]
Saving to: ‘anvil-usb-installer’
 
anvil-usb-installer         100%[=========================================>]  45.12K  --.-KB/s    in 0.1s    
 
2017-03-19 21:53:21 (421 KB/s) - ‘anvil-usb-installer’ saved [46203/46203]
chmod 755 anvil-usb-installer
ls -lah anvil-usb-installer
-rwxr-xr-x. 1 digimer digimer 46K Mar 19 21:53 anvil-usb-installer

We'll need a few more programs for this tool.

For EL6:

sudo yum install mkdosfs parted rsync syslinux udevadm

For EL7:

sudo yum install dosfstools parted rsync syslinux systemd

For Fedora:

sudo dnf install mkdosfs parted rsync syslinux udevadm

For Ubuntu (tested on 16.04 LTS):

sudo apt-get install dosfstools parted rsync syslinux udev

For OpenSUSE (tested on 42.1):

sudo zypper in dosfstools parted rsync syslinux udev
Template warning icon.png
Warning: This next step will complete erase all data on the target drive! Be certain you are pointing 'anvil-usb-installer' at the right target!
Template note icon.png
Note: USB thumb drives tend to be fairly slow. When possible, use a USB drive that has a normal hard drive or ssd inside of it.

In this example, the USB drive came up as '/dev/sdb' and we are using the RHEL-based ISO. So the command we will run is:

sudo ./anvil-usb-installer --iso /data0/VMs/files/Anvil_m2-v2.0.1_RHEL-6.9.iso --usb /dev/sdb
-=] Anvil! USB Installer
- USB device path: . [/dev/sdb]
- Target drive: .... [ASMT 2105]
- The capacity is: . [465.76 GiB (500.11 GB)]
- The source ISO is: [/data0/VMs/files/Anvil_m2-v2.0.1_RHEL-6.9.iso]
=======================================================================
[ WARNING ] - This device will be completely erased! All existing data
[ WARNING ]   will be lost!
=======================================================================
Proceed? [y/N] y
- Thank you, Proceeding
- Unmounting: [/dev/sdb1]
- Success!
- Wiping out existing partition geometry and MBR from: [/dev/sdb]
- Creating a new partition.
Warning: The resulting partition is not properly aligned for best performance: 8192s % 65535s != 0s
- Verifying that the new partition was created successfully.
- Formatting the new partition: [/dev/sdb1]
- Writing out the master boot record to: [/dev/sdb]
- Installing syslinux on: [/dev/sdb1]
- Creating the temporary USB mount point: [/tmp/anvil_usb]
- Creating the temporary ISO mount point: [/tmp/anvil_iso]
- Mounting the USB partition: [/dev/sdb1] on: [/tmp/anvil_usb]
- Mounting the source ISO: [/data0/VMs/files/Anvil_m2-v2.0.1_RHEL-6.9.iso]
  on: [/tmp/anvil_iso]
- Verifying they mounted.
- Verifying that everything we're about to copy is under 4 GiB for 'vfat'
  compatibility.
- Copying the source ISO contents to the USB device.
- Protecting the USB drive in case 'striker-usb-insert' is set to force-initialize.
- Copying the source ISO to the USB drive. This might take a bit, please be
  patient!
- Copying the 'syslinux' files into place.
- Cleaning up, please wait while the USB drive is finalized!
  If the OS cached data being written to the USB, this might take a bit.
- Unmounting: [/tmp/anvil_iso]
- Removing the temporary mount point: [/tmp/anvil_iso]
- Unmounting: [/tmp/anvil_usb]
- Removing the temporary mount point: [/tmp/anvil_usb]
Done!
 
Plug the USB drive into the machine you wish to make a Striker dashboard. Press
the key for you system to manually select a boot device (usually <F10> or 
<F12>) and choose this USB drive. Select the appropriate Striker number from 
the menu.
 
NOTE: The Install performed by this USB drive is fully automated, once started.
      Any data on the target machine will be erased without further warning!
 
Have fun!
Template note icon.png
Note: Don't worry about an alignment warning. The USB drive can be reformated once the stage-1 install of the first Striker dashboard is finished.

All done!

 

Any questions, feedback, advice, complaints or meanderings are welcome.
Us: Alteeve's Niche! Support: Mailing List IRC: #clusterlabs on Freenode   © Alteeve's Niche! Inc. 1997-2019
legal stuff: All info is provided "As-Is". Do not use anything here unless you are willing and able to take responsibility for your own actions.
Personal tools
Namespaces

Variants
Actions
Navigation
projects
Toolbox