From 1cd1476a1d74a48f42771a918d57fee542078d54 Mon Sep 17 00:00:00 2001 From: Andy Witter Date: Thu, 26 Apr 2012 08:05:36 -0400 Subject: [PATCH] committing recent changes getting ready for push --- README.html | 804 ++++++++++++++++++++++++++++++++++++++++++++ templates/logger/archive.sh | 45 +++ 2 files changed, 849 insertions(+) create mode 100644 README.html create mode 100644 templates/logger/archive.sh diff --git a/README.html b/README.html new file mode 100644 index 0000000..bd80719 --- /dev/null +++ b/README.html @@ -0,0 +1,804 @@ + + + + + + + + + + + +
+
+

Installation Via GenaSYS

+
+

Copyright © Georgia Public Library Service

+

GenaSYS is an Evergreen cluster installation program developed by the Georgia Public Library Service and its contractors.

+
+

Assumptions

+

GenaSYS makes the following assumptions about the hardware setup Evergreen is being installed upon:

+

Network:

+
    +
  • +

    +3 public IP addresses available +

    +
  • +
  • +

    +a DNS-addressable domain name (e.g., "gapines.org") +

    +
  • +
+

Hardware (actual or virtual):

+
    +
  • +

    +2 LVS machines +

    +
  • +
  • +

    +2 or more brick head machines (drone machines are optional) +

    +
  • +
  • +

    +1 utility server +

    +
  • +
  • +

    +2 SIP2 servers +

    +
  • +
  • +

    +2 memcached servers +

    +
  • +
  • +

    +3 database servers +

    +
  • +
  • +

    +1 reports server +

    +
  • +
  • +

    +1 logger server +

    +
  • +
  • +

    +1 backup server +

    +
  • +
  • +

    +1 monitoring server +

    +
  • +
  • +

    +1 administration server +

    +
  • +
+

Software:

+
    +
  • +

    +base installation of Debian squeeze on each server +

    +
  • +
+
+
+

Usage

+
+

Custom Files

+

Library IP based redirection: +If you are going be using Library based redirection then +copy a preconfigured lib_ips.txt +file to the /home/gpls/GenaSYS-2.1.1/custom folder +before continuing.

+

Note: this is the file that allows in-library OPAC stations to default to their location as opposed to all of PINES.

+

Zip Codes for libraries: +If you are using mutliple zip codes for libraries copy +a preconfigured zips.txt +file to the /home/gpls/GenaSYS-2.1.1/custom folder +before continuing.

+

Note: this file allows the staff client to automatically populate the city, county, and state fields once the ZIP code is entered in the Evergreen User Editor.

+

Action Trigger Filters: +If you are using customized action trigger filters then copy +the custom action_trigger_filters.json +file to the /home/gpls/GenaSYS-2.1.1/custom folder +before continuing.

+

Note: this file is required for any custom action/trigger event setups that are configured.

+

Custom Maintenance Page: +If you are using a customized maintenance page +then copy the custom index.html or index.php +file and any image files .jpg or .png +to the /home/gpls/GenaSYS-2.1.1/custom folder +before continuing.

+

Note: the maintenance page appears when you detach all bricks from the cluster.

+
+
+

Global Configuration

+

This is where the DNS name for your cluster is entered.

+
+
+

SSL Certificate Configuration

+

An SSL Certificate is required for Evergreen to function correctly. +If you have purchased a certificate from a CA then please copy +the certificate files (server.crt, server.key and ca.crt if applicable) +to /home/gpls/GenaSYS-2.1.1/ssl_cert. +If you do not have a purchased certificate from a CA, GenaSYS will generate +a self-signed certificate automatically.

+
+
+

Evergreen Brick Configuration

+

Where you define the number and configuration of . GenaSYS automatically sets up brick clustering and management scripts.

+
+
+

Evergreen Reporter Configuration

+

This step defines on which server the NFS share for reports outputs resides. The reports process itself is located on reporter01.

+
+
+

Evergreen OpenSRF Configuration

+

This step creates the Linux "opensrf" user, which is used by the system to run all OpenSRF processes, including Apache.

+
+
+

Evergreen Database Configuration

+

This step creates the password for the PostgreSQL "evergreen" user.

+
+
+

Evergreen Admin User Configuration

+

This step creates the Evergreen administrative user, which is able to log into the staff client with these credentials and administer the system from the GUI.

+
+
+

Private Network Configuration

+

Default is 10.0.1.0/24, but can be anything within the private network IP range.

+
+
+

LVS Director Configuration

+
+
Cluster IP Address
+

The public IP address for the cluster will be used for LVS Director and Heartbeat. This address is the "virtual" address and will be shared between two LVS machines in the cluster. Enter the public IP address for the cluster, its netmask and its gateway address.

+
+
+
LVS Physical Ethernet Interface Configuration
+

The LVS servers must have a physical public addresses assigned to each server independent of the shared address entered above. Enter the public IP addresses for lvs01 and lvs02

+
+
+
+

GenaSYS Configuration Summary

+

You will then be shown a summary of the configuration options that you’ve chosen as they are entered into the genasys.conf file. If any values need correcting, you can start over by selecting ®etry.

+
+
+

GenaSYS Cluster Creation

+

Messages will appear on the screen as the files are processed.

+
+
+

Human-Readable Summary and Installation Instructions

+

After the files are processed and packaged, you will be shown a summary of the full cluster configuration, including installation instructions. This information will be stored in a file named [cluster name]_network_config.txt. As it contains the entered passwords in clear text, you will want to secure this file.\

+

Copy the setup tar.gz files one at a time to the respective nodes in the cluster, extract and run the installation and reboot each one before starting on the next one. Install in the order listed below.

+
    +
  1. +

    +lvs +

    +
  2. +
  3. +

    +logger +

    +
  4. +
  5. +

    +db +

    +
  6. +
  7. +

    +brick01-head +

    +
  8. +
  9. +

    +other-bricks +

    +
  10. +
  11. +

    +reporter +

    +
  12. +
  13. +

    +utility +

    +
  14. +
  15. +

    +sip +

    +
  16. +
+
+
+
+
+
+

+ + + diff --git a/templates/logger/archive.sh b/templates/logger/archive.sh new file mode 100644 index 0000000..87dce1e --- /dev/null +++ b/templates/logger/archive.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +goback=$1 +host="10.0.1.81" +host="$HOSTNAME" +remote="off" # [on/off] + +[ -z "$goback" ] && goback=1; + +month=$(date --date="$goback day ago" +"%m"); +year=$(date --date="$goback day ago" +"%Y"); +day=$(date --date="$goback day ago" +"%d"); + +[ ${#month} == 1 ] && month="0$month"; +[ ${#day} == 1 ] && day="0$day"; + + +function arch { + #type=$1 + #dir="/var/log/evergreen/$type/$year/$month/$day"; + dir="/var/log/evergreen/$year/$month/$day"; + cd $dir; + echo "Archiving files in $dir"; + + # make sure the directory exists on the backup host + su - opensrf -c "ssh $host 'mkdir -m770 -p $dir'" + + for i in *; do + echo "Archiving $i"; + pigz -p3 "$i"; + #chgrp opensrf "$dir/$i.gz"; # why is this needed? + chmod 640 "$dir/$i.gz"; + if [ "$remote" = "on" ]; then + # make sure the directory exists on the backup host + su - opensrf -c "ssh $host 'mkdir -m770 -p $dir'" + echo "Sending $dir/$i.gz to $host..." + su - opensrf -c "scp $dir/$i.gz $host:$dir/" + fi + done; +} + +#for type in 'demo' 'dev' 'prod'; do +#for type in 'prod'; do + arch # "$type"; +#done; -- 2.11.0