You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-05 15:41:14 +03:00
name changes
This commit is contained in:
BIN
Makefile.tar
BIN
Makefile.tar
Binary file not shown.
275
build/Doxyfile
Normal file
275
build/Doxyfile
Normal file
@ -0,0 +1,275 @@
|
|||||||
|
# Doxyfile 1.4.1-KDevelop
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Project related configuration options
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
PROJECT_NAME = build.kdevelop
|
||||||
|
PROJECT_NUMBER = $VERSION$
|
||||||
|
OUTPUT_DIRECTORY =
|
||||||
|
CREATE_SUBDIRS = NO
|
||||||
|
OUTPUT_LANGUAGE = English
|
||||||
|
USE_WINDOWS_ENCODING = NO
|
||||||
|
BRIEF_MEMBER_DESC = YES
|
||||||
|
REPEAT_BRIEF = YES
|
||||||
|
ABBREVIATE_BRIEF = "The $name class" \
|
||||||
|
"The $name widget" \
|
||||||
|
"The $name file" \
|
||||||
|
is \
|
||||||
|
provides \
|
||||||
|
specifies \
|
||||||
|
contains \
|
||||||
|
represents \
|
||||||
|
a \
|
||||||
|
an \
|
||||||
|
the
|
||||||
|
ALWAYS_DETAILED_SEC = NO
|
||||||
|
INLINE_INHERITED_MEMB = NO
|
||||||
|
FULL_PATH_NAMES = YES
|
||||||
|
STRIP_FROM_PATH = /home/dhill/InfiniDB_MariaDB/oam/install_scripts/
|
||||||
|
STRIP_FROM_INC_PATH =
|
||||||
|
SHORT_NAMES = NO
|
||||||
|
JAVADOC_AUTOBRIEF = NO
|
||||||
|
MULTILINE_CPP_IS_BRIEF = NO
|
||||||
|
DETAILS_AT_TOP = NO
|
||||||
|
INHERIT_DOCS = YES
|
||||||
|
DISTRIBUTE_GROUP_DOC = NO
|
||||||
|
TAB_SIZE = 8
|
||||||
|
ALIASES =
|
||||||
|
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||||
|
OPTIMIZE_OUTPUT_JAVA = NO
|
||||||
|
SUBGROUPING = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Build related configuration options
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
EXTRACT_ALL = NO
|
||||||
|
EXTRACT_PRIVATE = NO
|
||||||
|
EXTRACT_STATIC = NO
|
||||||
|
EXTRACT_LOCAL_CLASSES = YES
|
||||||
|
EXTRACT_LOCAL_METHODS = NO
|
||||||
|
HIDE_UNDOC_MEMBERS = NO
|
||||||
|
HIDE_UNDOC_CLASSES = NO
|
||||||
|
HIDE_FRIEND_COMPOUNDS = NO
|
||||||
|
HIDE_IN_BODY_DOCS = NO
|
||||||
|
INTERNAL_DOCS = NO
|
||||||
|
CASE_SENSE_NAMES = YES
|
||||||
|
HIDE_SCOPE_NAMES = NO
|
||||||
|
SHOW_INCLUDE_FILES = YES
|
||||||
|
INLINE_INFO = YES
|
||||||
|
SORT_MEMBER_DOCS = YES
|
||||||
|
SORT_BRIEF_DOCS = NO
|
||||||
|
SORT_BY_SCOPE_NAME = NO
|
||||||
|
GENERATE_TODOLIST = YES
|
||||||
|
GENERATE_TESTLIST = YES
|
||||||
|
GENERATE_BUGLIST = YES
|
||||||
|
GENERATE_DEPRECATEDLIST= YES
|
||||||
|
ENABLED_SECTIONS =
|
||||||
|
MAX_INITIALIZER_LINES = 30
|
||||||
|
SHOW_USED_FILES = YES
|
||||||
|
SHOW_DIRECTORIES = YES
|
||||||
|
FILE_VERSION_FILTER =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to warning and progress messages
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
QUIET = NO
|
||||||
|
WARNINGS = YES
|
||||||
|
WARN_IF_UNDOCUMENTED = YES
|
||||||
|
WARN_IF_DOC_ERROR = YES
|
||||||
|
WARN_NO_PARAMDOC = NO
|
||||||
|
WARN_FORMAT = "$file:$line: $text"
|
||||||
|
WARN_LOGFILE =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the input files
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
INPUT = /home/dhill/InfiniDB_MariaDB/build
|
||||||
|
FILE_PATTERNS = *.c \
|
||||||
|
*.cc \
|
||||||
|
*.cxx \
|
||||||
|
*.cpp \
|
||||||
|
*.c++ \
|
||||||
|
*.java \
|
||||||
|
*.ii \
|
||||||
|
*.ixx \
|
||||||
|
*.ipp \
|
||||||
|
*.i++ \
|
||||||
|
*.inl \
|
||||||
|
*.h \
|
||||||
|
*.hh \
|
||||||
|
*.hxx \
|
||||||
|
*.hpp \
|
||||||
|
*.h++ \
|
||||||
|
*.idl \
|
||||||
|
*.odl \
|
||||||
|
*.cs \
|
||||||
|
*.php \
|
||||||
|
*.php3 \
|
||||||
|
*.inc \
|
||||||
|
*.m \
|
||||||
|
*.mm \
|
||||||
|
*.dox \
|
||||||
|
*.C \
|
||||||
|
*.CC \
|
||||||
|
*.C++ \
|
||||||
|
*.II \
|
||||||
|
*.I++ \
|
||||||
|
*.H \
|
||||||
|
*.HH \
|
||||||
|
*.H++ \
|
||||||
|
*.CS \
|
||||||
|
*.PHP \
|
||||||
|
*.PHP3 \
|
||||||
|
*.M \
|
||||||
|
*.MM \
|
||||||
|
*.C \
|
||||||
|
*.H \
|
||||||
|
*.tlh \
|
||||||
|
*.diff \
|
||||||
|
*.patch \
|
||||||
|
*.moc \
|
||||||
|
*.xpm \
|
||||||
|
*.dox
|
||||||
|
RECURSIVE = yes
|
||||||
|
EXCLUDE =
|
||||||
|
EXCLUDE_SYMLINKS = NO
|
||||||
|
EXCLUDE_PATTERNS =
|
||||||
|
EXAMPLE_PATH =
|
||||||
|
EXAMPLE_PATTERNS = *
|
||||||
|
EXAMPLE_RECURSIVE = NO
|
||||||
|
IMAGE_PATH =
|
||||||
|
INPUT_FILTER =
|
||||||
|
FILTER_PATTERNS =
|
||||||
|
FILTER_SOURCE_FILES = NO
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to source browsing
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
SOURCE_BROWSER = NO
|
||||||
|
INLINE_SOURCES = NO
|
||||||
|
STRIP_CODE_COMMENTS = YES
|
||||||
|
REFERENCED_BY_RELATION = YES
|
||||||
|
REFERENCES_RELATION = YES
|
||||||
|
VERBATIM_HEADERS = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the alphabetical class index
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
ALPHABETICAL_INDEX = NO
|
||||||
|
COLS_IN_ALPHA_INDEX = 5
|
||||||
|
IGNORE_PREFIX =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the HTML output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_HTML = YES
|
||||||
|
HTML_OUTPUT = html
|
||||||
|
HTML_FILE_EXTENSION = .html
|
||||||
|
HTML_HEADER =
|
||||||
|
HTML_FOOTER =
|
||||||
|
HTML_STYLESHEET =
|
||||||
|
HTML_ALIGN_MEMBERS = YES
|
||||||
|
GENERATE_HTMLHELP = NO
|
||||||
|
CHM_FILE =
|
||||||
|
HHC_LOCATION =
|
||||||
|
GENERATE_CHI = NO
|
||||||
|
BINARY_TOC = NO
|
||||||
|
TOC_EXPAND = NO
|
||||||
|
DISABLE_INDEX = NO
|
||||||
|
ENUM_VALUES_PER_LINE = 4
|
||||||
|
GENERATE_TREEVIEW = NO
|
||||||
|
TREEVIEW_WIDTH = 250
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the LaTeX output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_LATEX = YES
|
||||||
|
LATEX_OUTPUT = latex
|
||||||
|
LATEX_CMD_NAME = latex
|
||||||
|
MAKEINDEX_CMD_NAME = makeindex
|
||||||
|
COMPACT_LATEX = NO
|
||||||
|
PAPER_TYPE = a4wide
|
||||||
|
EXTRA_PACKAGES =
|
||||||
|
LATEX_HEADER =
|
||||||
|
PDF_HYPERLINKS = NO
|
||||||
|
USE_PDFLATEX = NO
|
||||||
|
LATEX_BATCHMODE = NO
|
||||||
|
LATEX_HIDE_INDICES = NO
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the RTF output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_RTF = NO
|
||||||
|
RTF_OUTPUT = rtf
|
||||||
|
COMPACT_RTF = NO
|
||||||
|
RTF_HYPERLINKS = NO
|
||||||
|
RTF_STYLESHEET_FILE =
|
||||||
|
RTF_EXTENSIONS_FILE =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the man page output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_MAN = NO
|
||||||
|
MAN_OUTPUT = man
|
||||||
|
MAN_EXTENSION = .3
|
||||||
|
MAN_LINKS = NO
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the XML output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_XML = yes
|
||||||
|
XML_OUTPUT = xml
|
||||||
|
XML_SCHEMA =
|
||||||
|
XML_DTD =
|
||||||
|
XML_PROGRAMLISTING = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options for the AutoGen Definitions output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_AUTOGEN_DEF = NO
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the Perl module output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_PERLMOD = NO
|
||||||
|
PERLMOD_LATEX = NO
|
||||||
|
PERLMOD_PRETTY = YES
|
||||||
|
PERLMOD_MAKEVAR_PREFIX =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the preprocessor
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
ENABLE_PREPROCESSING = YES
|
||||||
|
MACRO_EXPANSION = NO
|
||||||
|
EXPAND_ONLY_PREDEF = NO
|
||||||
|
SEARCH_INCLUDES = YES
|
||||||
|
INCLUDE_PATH =
|
||||||
|
INCLUDE_FILE_PATTERNS =
|
||||||
|
PREDEFINED =
|
||||||
|
EXPAND_AS_DEFINED =
|
||||||
|
SKIP_FUNCTION_MACROS = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration::additions related to external references
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
TAGFILES =
|
||||||
|
GENERATE_TAGFILE = build.tag
|
||||||
|
ALLEXTERNALS = NO
|
||||||
|
EXTERNAL_GROUPS = YES
|
||||||
|
PERL_PATH = /usr/bin/perl
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the dot tool
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
CLASS_DIAGRAMS = YES
|
||||||
|
HIDE_UNDOC_RELATIONS = YES
|
||||||
|
HAVE_DOT = NO
|
||||||
|
CLASS_GRAPH = YES
|
||||||
|
COLLABORATION_GRAPH = YES
|
||||||
|
GROUP_GRAPHS = YES
|
||||||
|
UML_LOOK = NO
|
||||||
|
TEMPLATE_RELATIONS = NO
|
||||||
|
INCLUDE_GRAPH = YES
|
||||||
|
INCLUDED_BY_GRAPH = YES
|
||||||
|
CALL_GRAPH = NO
|
||||||
|
GRAPHICAL_HIERARCHY = YES
|
||||||
|
DIRECTORY_GRAPH = YES
|
||||||
|
DOT_IMAGE_FORMAT = png
|
||||||
|
DOT_PATH =
|
||||||
|
DOTFILE_DIRS =
|
||||||
|
MAX_DOT_GRAPH_WIDTH = 1024
|
||||||
|
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||||
|
MAX_DOT_GRAPH_DEPTH = 1000
|
||||||
|
DOT_TRANSPARENT = NO
|
||||||
|
DOT_MULTI_TARGETS = NO
|
||||||
|
GENERATE_LEGEND = YES
|
||||||
|
DOT_CLEANUP = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration::additions related to the search engine
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
SEARCHENGINE = NO
|
77
build/build.kdevelop
Normal file
77
build/build.kdevelop
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<kdevelop>
|
||||||
|
<general>
|
||||||
|
<author></author>
|
||||||
|
<email>dhill@srvhill04.calpont.com</email>
|
||||||
|
<version>$VERSION$</version>
|
||||||
|
<projectmanagement>KDevCustomProject</projectmanagement>
|
||||||
|
<primarylanguage>C</primarylanguage>
|
||||||
|
<ignoreparts>
|
||||||
|
</ignoreparts>
|
||||||
|
</general>
|
||||||
|
<kdevcustomproject>
|
||||||
|
<run>
|
||||||
|
<mainprogram>build</mainprogram>
|
||||||
|
</run>
|
||||||
|
</kdevcustomproject>
|
||||||
|
<kdevdebugger>
|
||||||
|
<general>
|
||||||
|
<dbgshell></dbgshell>
|
||||||
|
</general>
|
||||||
|
</kdevdebugger>
|
||||||
|
<kdevdoctreeview>
|
||||||
|
<ignoretocs>
|
||||||
|
<toc>ada</toc>
|
||||||
|
<toc>ada_bugs_gcc</toc>
|
||||||
|
<toc>bash</toc>
|
||||||
|
<toc>bash_bugs</toc>
|
||||||
|
<toc>clanlib</toc>
|
||||||
|
<toc>fortran_bugs_gcc</toc>
|
||||||
|
<toc>gnome1</toc>
|
||||||
|
<toc>gnustep</toc>
|
||||||
|
<toc>gtk</toc>
|
||||||
|
<toc>gtk_bugs</toc>
|
||||||
|
<toc>haskell</toc>
|
||||||
|
<toc>haskell_bugs_ghc</toc>
|
||||||
|
<toc>java_bugs_gcc</toc>
|
||||||
|
<toc>java_bugs_sun</toc>
|
||||||
|
<toc>kde2book</toc>
|
||||||
|
<toc>libstdc++</toc>
|
||||||
|
<toc>opengl</toc>
|
||||||
|
<toc>pascal_bugs_fp</toc>
|
||||||
|
<toc>php</toc>
|
||||||
|
<toc>php_bugs</toc>
|
||||||
|
<toc>perl</toc>
|
||||||
|
<toc>perl_bugs</toc>
|
||||||
|
<toc>python</toc>
|
||||||
|
<toc>python_bugs</toc>
|
||||||
|
<toc>qt-kdev3</toc>
|
||||||
|
<toc>ruby</toc>
|
||||||
|
<toc>ruby_bugs</toc>
|
||||||
|
<toc>sdl</toc>
|
||||||
|
<toc>stl</toc>
|
||||||
|
<toc>sw</toc>
|
||||||
|
<toc>w3c-dom-level2-html</toc>
|
||||||
|
<toc>w3c-svg</toc>
|
||||||
|
<toc>w3c-uaag10</toc>
|
||||||
|
<toc>wxwidgets_bugs</toc>
|
||||||
|
</ignoretocs>
|
||||||
|
<ignoreqt_xml>
|
||||||
|
<toc>Guide to the Qt Translation Tools</toc>
|
||||||
|
<toc>Qt Assistant Manual</toc>
|
||||||
|
<toc>Qt Designer Manual</toc>
|
||||||
|
<toc>Qt Reference Documentation</toc>
|
||||||
|
<toc>qmake User Guide</toc>
|
||||||
|
</ignoreqt_xml>
|
||||||
|
<ignoredoxygen>
|
||||||
|
<toc>KDE Libraries (Doxygen)</toc>
|
||||||
|
</ignoredoxygen>
|
||||||
|
</kdevdoctreeview>
|
||||||
|
<kdevfilecreate>
|
||||||
|
<filetypes/>
|
||||||
|
<useglobaltypes>
|
||||||
|
<type ext="c" />
|
||||||
|
<type ext="h" />
|
||||||
|
</useglobaltypes>
|
||||||
|
</kdevfilecreate>
|
||||||
|
</kdevelop>
|
@ -18,7 +18,7 @@ for arg in "$@"; do
|
|||||||
if [ `expr -- "$arg" : '--verbose'` -eq 9 ]; then
|
if [ `expr -- "$arg" : '--verbose'` -eq 9 ]; then
|
||||||
((verbose++))
|
((verbose++))
|
||||||
elif [ `expr -- "$arg" : '--local-mysql'` -eq 13 ]; then
|
elif [ `expr -- "$arg" : '--local-mysql'` -eq 13 ]; then
|
||||||
mysqldir=../Calpont/mysql
|
mysqldir=../MariaDB/Columnstore/mysql
|
||||||
elif [ `expr -- "$arg" : '--help'` -eq 6 ]; then
|
elif [ `expr -- "$arg" : '--help'` -eq 6 ]; then
|
||||||
usage
|
usage
|
||||||
exit 0
|
exit 0
|
||||||
@ -45,23 +45,23 @@ fi
|
|||||||
. ./build/releasenum
|
. ./build/releasenum
|
||||||
|
|
||||||
# make the install package
|
# make the install package
|
||||||
buildroot=$HOME/rpm/BUILD/infinidb-$version-$release
|
buildroot=$HOME/rpm/BUILD/columnstore-$version-$release
|
||||||
|
|
||||||
rm -rf $buildroot
|
rm -rf $buildroot
|
||||||
mkdir -p $buildroot
|
mkdir -p $buildroot
|
||||||
echo -n "Writing binary files to $buildroot..."
|
echo -n "Writing binary files to $buildroot..."
|
||||||
tar -cf - --exclude 'export/include' --exclude 'export/*.tar' export | tar -C $buildroot -xf -
|
tar -cf - --exclude 'export/include' --exclude 'export/*.tar' export | tar -C $buildroot -xf -
|
||||||
mv $buildroot/export $buildroot/Calpont
|
mv $buildroot/export $buildroot/MariaDB/Columnstore
|
||||||
|
|
||||||
#get mysql server files
|
#get mysql server files
|
||||||
pushd $mysqldir > /dev/null
|
pushd $mysqldir > /dev/null
|
||||||
mkdir -p $buildroot/Calpont/mysql
|
mkdir -p $buildroot/MariaDB/Columnstore/mysql
|
||||||
cpio -pdmu --quiet $buildroot/Calpont/mysql < files.lst
|
cpio -pdmu --quiet $buildroot/MariaDB/Columnstore/mysql < files.lst
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
|
||||||
#clean up some files from buildroot
|
#clean up some files from buildroot
|
||||||
rm -f $buildroot/Calpont/etc/Doxyfile
|
rm -f $buildroot/MariaDB/Columnstore/etc/Doxyfile
|
||||||
for file in $buildroot/Calpont/lib/*; do
|
for file in $buildroot/MariaDB/Columnstore/lib/*; do
|
||||||
if [ -h $file ]; then
|
if [ -h $file ]; then
|
||||||
rm -f $file
|
rm -f $file
|
||||||
fi
|
fi
|
||||||
@ -69,16 +69,16 @@ done
|
|||||||
|
|
||||||
#temporarily clean up these BRM thingies
|
#temporarily clean up these BRM thingies
|
||||||
for file in dbrm script-fcns; do
|
for file in dbrm script-fcns; do
|
||||||
rm -f $buildroot/Calpont/bin/$file
|
rm -f $buildroot/MariaDB/Columnstore/bin/$file
|
||||||
done
|
done
|
||||||
|
|
||||||
#clean up these bulkload scripts
|
#clean up these bulkload scripts
|
||||||
for file in bulkload.sh cleanup.sh dbbuilder.sh dbload.sh cpimport.sh bulkloadp.sh; do
|
for file in bulkload.sh cleanup.sh dbbuilder.sh dbload.sh cpimport.sh bulkloadp.sh; do
|
||||||
rm -f $buildroot/Calpont/bin/$file
|
rm -f $buildroot/MariaDB/Columnstore/bin/$file
|
||||||
done
|
done
|
||||||
|
|
||||||
rm -f $buildroot/Calpont/lib/libidbboot.a
|
rm -f $buildroot/MariaDB/Columnstore/lib/libidbboot.a
|
||||||
rm -f $buildroot/Calpont/lib/libiberty.a
|
rm -f $buildroot/MariaDB/Columnstore/lib/libiberty.a
|
||||||
|
|
||||||
mkdir -p $HOME/rpm/BUILD $HOME/rpm/RPMS $HOME/rpm/SRPMS $HOME/rpm/SPECS $HOME/rpm/tmp
|
mkdir -p $HOME/rpm/BUILD $HOME/rpm/RPMS $HOME/rpm/SRPMS $HOME/rpm/SPECS $HOME/rpm/tmp
|
||||||
|
|
||||||
@ -103,16 +103,16 @@ b="$b\\n$l"
|
|||||||
done
|
done
|
||||||
echo $b )`
|
echo $b )`
|
||||||
|
|
||||||
cp ./build/infinidb.spec.in $HOME/rpm/SPECS/infinidb.spec
|
cp ./build/columnstore.spec.in $HOME/rpm/SPECS/columnstore.spec
|
||||||
sed -i -e "s/@@PACKAGER@@/Packager: $packager/" \
|
sed -i -e "s/@@PACKAGER@@/Packager: $packager/" \
|
||||||
-e "s/@@VERSION@@/Version: $version/" \
|
-e "s/@@VERSION@@/Version: $version/" \
|
||||||
-e "s/@@RELEASE@@/Release: $release/" \
|
-e "s/@@RELEASE@@/Release: $release/" \
|
||||||
-e "s?@@BUILDINFO@@?$buildinfo?" $HOME/rpm/SPECS/infinidb.spec
|
-e "s?@@BUILDINFO@@?$buildinfo?" $HOME/rpm/SPECS/columnstore.spec
|
||||||
|
|
||||||
echo done.
|
echo done.
|
||||||
|
|
||||||
echo -n "Building rpms..."
|
echo -n "Building rpms..."
|
||||||
rpmbuild -ba $HOME/rpm/SPECS/infinidb.spec >/tmp/rpmbuild.out.$$ 2>&1
|
rpmbuild -ba $HOME/rpm/SPECS/columnstore.spec >/tmp/rpmbuild.out.$$ 2>&1
|
||||||
rc=$?
|
rc=$?
|
||||||
echo done.
|
echo done.
|
||||||
if [ $verbose -gt 0 -o $rc -ne 0 ]; then
|
if [ $verbose -gt 0 -o $rc -ne 0 ]; then
|
||||||
|
125
build/build_rpms~
Executable file
125
build/build_rpms~
Executable file
@ -0,0 +1,125 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# $Id: build_rpms 1734 2012-10-25 18:07:16Z dhill $
|
||||||
|
#
|
||||||
|
|
||||||
|
verbose=0
|
||||||
|
mysqldir=$HOME/MariaDB_InfiniDB/export/mysql
|
||||||
|
|
||||||
|
usage()
|
||||||
|
{
|
||||||
|
cat <<EOD
|
||||||
|
usage: build_rpms [--verbose] [--local-mysql] [--help]
|
||||||
|
--local-mysql use local (relative) mysql binary tree
|
||||||
|
EOD
|
||||||
|
}
|
||||||
|
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [ `expr -- "$arg" : '--verbose'` -eq 9 ]; then
|
||||||
|
((verbose++))
|
||||||
|
elif [ `expr -- "$arg" : '--local-mysql'` -eq 13 ]; then
|
||||||
|
mysqldir=../Calpont/mysql
|
||||||
|
elif [ `expr -- "$arg" : '--help'` -eq 6 ]; then
|
||||||
|
usage
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "ignoring unknown argument: $arg" 1>&2
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
#try to find project root
|
||||||
|
while [ ! -d dbcon ]; do
|
||||||
|
cd ..
|
||||||
|
curdir=$(pwd)
|
||||||
|
if [ $curdir = / -o $curdir = $HOME ]; then
|
||||||
|
echo "I could not find the project root directory: I can't continue!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -f ./build/releasenum ]; then
|
||||||
|
echo "I could not find the file 'releasesum' in the build directory: I can't continue!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
. ./build/releasenum
|
||||||
|
|
||||||
|
# make the install package
|
||||||
|
buildroot=$HOME/rpm/BUILD/infinidb-$version-$release
|
||||||
|
|
||||||
|
rm -rf $buildroot
|
||||||
|
mkdir -p $buildroot
|
||||||
|
echo -n "Writing binary files to $buildroot..."
|
||||||
|
tar -cf - --exclude 'export/include' --exclude 'export/*.tar' export | tar -C $buildroot -xf -
|
||||||
|
mv $buildroot/export $buildroot/Calpont
|
||||||
|
|
||||||
|
#get mysql server files
|
||||||
|
pushd $mysqldir > /dev/null
|
||||||
|
mkdir -p $buildroot/Calpont/mysql
|
||||||
|
cpio -pdmu --quiet $buildroot/Calpont/mysql < files.lst
|
||||||
|
popd >/dev/null
|
||||||
|
|
||||||
|
#clean up some files from buildroot
|
||||||
|
rm -f $buildroot/Calpont/etc/Doxyfile
|
||||||
|
for file in $buildroot/Calpont/lib/*; do
|
||||||
|
if [ -h $file ]; then
|
||||||
|
rm -f $file
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
#temporarily clean up these BRM thingies
|
||||||
|
for file in dbrm script-fcns; do
|
||||||
|
rm -f $buildroot/Calpont/bin/$file
|
||||||
|
done
|
||||||
|
|
||||||
|
#clean up these bulkload scripts
|
||||||
|
for file in bulkload.sh cleanup.sh dbbuilder.sh dbload.sh cpimport.sh bulkloadp.sh; do
|
||||||
|
rm -f $buildroot/Calpont/bin/$file
|
||||||
|
done
|
||||||
|
|
||||||
|
rm -f $buildroot/Calpont/lib/libidbboot.a
|
||||||
|
rm -f $buildroot/Calpont/lib/libiberty.a
|
||||||
|
|
||||||
|
mkdir -p $HOME/rpm/BUILD $HOME/rpm/RPMS $HOME/rpm/SRPMS $HOME/rpm/SPECS $HOME/rpm/tmp
|
||||||
|
|
||||||
|
if [ ! -f $HOME/.rpmmacros ]; then
|
||||||
|
cat > $HOME/.rpmmacros <<EOD
|
||||||
|
%_topdir $HOME/rpm
|
||||||
|
%_tmppath $HOME/rpm/tmp
|
||||||
|
# Change to 1 if you want to abort on unpackaged files
|
||||||
|
%_unpackaged_files_terminate_build 0
|
||||||
|
EOD
|
||||||
|
fi
|
||||||
|
|
||||||
|
#twiddle with the spec file
|
||||||
|
|
||||||
|
packager="support@mariadb.com"
|
||||||
|
tag=poc
|
||||||
|
buildinfo=`./build/docBuild $tag | (
|
||||||
|
read l
|
||||||
|
b="$l"
|
||||||
|
while read l; do
|
||||||
|
b="$b\\n$l"
|
||||||
|
done
|
||||||
|
echo $b )`
|
||||||
|
|
||||||
|
cp ./build/infinidb.spec.in $HOME/rpm/SPECS/infinidb.spec
|
||||||
|
sed -i -e "s/@@PACKAGER@@/Packager: $packager/" \
|
||||||
|
-e "s/@@VERSION@@/Version: $version/" \
|
||||||
|
-e "s/@@RELEASE@@/Release: $release/" \
|
||||||
|
-e "s?@@BUILDINFO@@?$buildinfo?" $HOME/rpm/SPECS/infinidb.spec
|
||||||
|
|
||||||
|
echo done.
|
||||||
|
|
||||||
|
echo -n "Building rpms..."
|
||||||
|
rpmbuild -ba $HOME/rpm/SPECS/infinidb.spec >/tmp/rpmbuild.out.$$ 2>&1
|
||||||
|
rc=$?
|
||||||
|
echo done.
|
||||||
|
if [ $verbose -gt 0 -o $rc -ne 0 ]; then
|
||||||
|
cat /tmp/rpmbuild.out.$$
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -f /tmp/*.$$
|
||||||
|
|
||||||
|
exit $rc
|
||||||
|
|
465
build/columnstore.spec.in
Normal file
465
build/columnstore.spec.in
Normal file
@ -0,0 +1,465 @@
|
|||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
Summary: MariaDB-Columnstore software
|
||||||
|
Name: columnstore
|
||||||
|
@@VERSION@@
|
||||||
|
@@RELEASE@@
|
||||||
|
Vendor: MariaDB, Inc.
|
||||||
|
URL: http://www.mariadb.com/
|
||||||
|
@@PACKAGER@@
|
||||||
|
Group: Applications
|
||||||
|
License: Copyright (c) 2016 MariaDB, Inc., all rights reserved; redistributable under the terms of the GPL, see the file COPYING for details.
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{release}-buildroot
|
||||||
|
|
||||||
|
%description
|
||||||
|
MariaDB-Columnstore software meta-package
|
||||||
|
|
||||||
|
%package platform
|
||||||
|
Summary: MariaDB-Columnstore software binaries
|
||||||
|
Group: Applications
|
||||||
|
Requires: expect, columnstore-libs
|
||||||
|
|
||||||
|
%description platform
|
||||||
|
MariaDB-Columnstore binary files
|
||||||
|
@@BUILDINFO@@
|
||||||
|
|
||||||
|
%package libs
|
||||||
|
Summary: MariaDB-Columnstore software libraries
|
||||||
|
Group: Applications
|
||||||
|
|
||||||
|
%description libs
|
||||||
|
MariaDB-Columnstore libraries
|
||||||
|
|
||||||
|
%package enterprise
|
||||||
|
Summary: InfiniDB Enterprise software binaries
|
||||||
|
Group: Applications
|
||||||
|
Requires: columnstore-libs, columnstore-platform
|
||||||
|
License: Proprietary; Copyright (c) 2016 MariaDB, Inc., all rights reserved
|
||||||
|
|
||||||
|
%description enterprise
|
||||||
|
InfiniDB Enterprise binary files
|
||||||
|
|
||||||
|
%package storage-engine
|
||||||
|
Summary: MariaDB-Columnstore software MariaDB connector
|
||||||
|
Group: Applications
|
||||||
|
Obsoletes: columnstore-mysql
|
||||||
|
Requires: columnstore-libs
|
||||||
|
|
||||||
|
%description storage-engine
|
||||||
|
MariaDB Columnstore connector binary files
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%define _use_internal_dependency_generator 0
|
||||||
|
%define __find_requires %{nil}
|
||||||
|
%define __os_install_post %{nil}
|
||||||
|
%define debug_package %{nil}
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}/usr/local
|
||||||
|
tar -C $RPM_BUILD_DIR/%{name}-%{version}-%{release} -cf - . | tar -C %{buildroot}/usr/local -xf -
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/%{name}-%{version}-%{release}
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
|
||||||
|
%files platform
|
||||||
|
%defattr(-, root, root)
|
||||||
|
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/DDLProc
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/ExeMgr
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/ProcMgr
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/ProcMon
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/DMLProc
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/WriteEngineServer
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/cpimport
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/post-install
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/post-mysql-install
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/post-mysqld-install
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/pre-uninstall
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/PrimProc
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/DecomSvr
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/upgrade-columnstore.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/run.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/columnstore
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/columnstoreSyslog
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/columnstoreSyslog7
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/columnstoreSyslog-ng
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/syslogSetup.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/cplogger
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/columnstore.def
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/dbbuilder
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/cpimport.bin
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/load_brm
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/save_brm
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/dbrmctl
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/controllernode
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/reset_locks
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/workernode
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/colxml
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/clearShm
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/viewtablelock
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/cleartablelock
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/mcsadmin
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/trapHandler
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/remote_command.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/postConfigure
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/columnstoreLogRotate
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/transactionLog
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/columnstoreDBWrite
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/transactionLogArchiver.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/system_installer.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/installer
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/module_installer.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/patchInstaller
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/user_installer.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/performance_installer.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/startupTests.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/os_check.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/sendtrap
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/remote_scp_put.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/remotessh.exp
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/ServerMonitor
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/master-rep-columnstore.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/slave-rep-columnstore.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/rsync.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/columnstoreSupport
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/hardwareReport.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/softwareReport.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/configReport.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/logReport.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/bulklogReport.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/resourceReport.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/hadoopReport.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/alarmReport.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/amazonInstaller
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/remote_command_verify.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/disable-rep-columnstore.sh
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
%config /usr/local/MariaDB/Columnstore/etc/Calpont.xml
|
||||||
|
%config /usr/local/MariaDB/Columnstore/etc/ConsoleCmds.xml
|
||||||
|
%config /usr/local/MariaDB/Columnstore/etc/ProcessConfig.xml
|
||||||
|
%config /usr/local/MariaDB/Columnstore/etc/snmpd.conf
|
||||||
|
%config /usr/local/MariaDB/Columnstore/etc/snmptrapd.conf
|
||||||
|
%config /usr/local/MariaDB/Columnstore/etc/Calpont.xml.singleserver
|
||||||
|
%config /usr/local/MariaDB/Columnstore/etc/ProcessConfig.xml.singleserver
|
||||||
|
%config /usr/local/MariaDB/Columnstore/etc/snmpd.conf.singleserver
|
||||||
|
%config /usr/local/MariaDB/Columnstore/etc/snmptrapd.conf.singleserver
|
||||||
|
#
|
||||||
|
/usr/local/MariaDB/Columnstore/etc/MessageFile.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/etc/ErrorMessage.txt
|
||||||
|
#
|
||||||
|
%attr(0666, root, root) /usr/local/MariaDB/Columnstore/local/module
|
||||||
|
#
|
||||||
|
/usr/local/MariaDB/Columnstore/releasenum
|
||||||
|
|
||||||
|
# Tools...
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/rollback
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/editem
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/getConfig
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/setConfig
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/setenv-hdfs-12
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/setenv-hdfs-20
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/hdfsCheck
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/configxml.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/remote_scp_get.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/columnstoreAlias
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/autoConfigure
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/ddlcleanup
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/idbmeminfo
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/IDBInstanceCmds.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/IDBVolumeCmds.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/binary_installer.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/myCnf-include-args.text
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/myCnf-exclude-args.text
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/mycnfUpgrade
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/getMySQLpw
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/columnstore.conf
|
||||||
|
|
||||||
|
/usr/local/MariaDB/Columnstore/sbin/snmpd
|
||||||
|
/usr/local/MariaDB/Columnstore/sbin/snmptrapd
|
||||||
|
%config %attr(0666, root, root) /usr/local/MariaDB/Columnstore/etc/AlarmConfig.xml
|
||||||
|
#
|
||||||
|
%config /usr/local/MariaDB/Columnstore/local/snmpdx.conf
|
||||||
|
%config /usr/local/MariaDB/Columnstore/local/snmpdx.conf.singleserver
|
||||||
|
#
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/AGENTX-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/CALPONT-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/DISMAN-EVENT-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/DISMAN-SCRIPT-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/EtherLike-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/HCNUM-TC.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/HOST-RESOURCES-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/HOST-RESOURCES-TYPES.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IANAifType-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IANA-LANGUAGE-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IANA-RTPROTO-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IF-INVERTED-STACK-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IF-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/INET-ADDRESS-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IP-FORWARD-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IP-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-ICMP-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-TCP-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-TC.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-UDP-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-AGENT-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-EXAMPLES-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-EXTEND-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-TC.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/NOTIFICATION-LOG-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/RFC1155-SMI.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/RFC1213-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/RFC-1215.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/RMON-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SMUX-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-COMMUNITY-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-FRAMEWORK-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-MPD-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-NOTIFICATION-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-PROXY-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-TARGET-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-USER-BASED-SM-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-USM-AES-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-USM-DH-OBJECTS-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-CONF.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-SMI.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-TC.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-TM.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-VIEW-BASED-ACM-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/TCP-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/TRANSPORT-ADDRESS-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-DEMO-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-DISKIO-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-DLMOD-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-IPFWACC-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-SNMP-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/UDP-MIB.txt
|
||||||
|
#
|
||||||
|
/usr/local/MariaDB/Columnstore/post/functions
|
||||||
|
/usr/local/MariaDB/Columnstore/post/test-001.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/post/test-002.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/post/test-003.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/post/test-004.sh
|
||||||
|
|
||||||
|
%files enterprise
|
||||||
|
%defattr(-, root, root)
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/displayJobGraph.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/dbhealth.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/dbhealth.sql
|
||||||
|
|
||||||
|
# Tools...
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/dumpcol
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/oid2file
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/evalcol
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/SesMgr
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/dumpVss
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/editTxn
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/dbprof.pl
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/dumpobm
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/file2oid.pl
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/print_journal
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/healthcheck
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/glusterctl
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/glusteradd
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/glusterconf
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/redistributeDB
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/databaseSizeReport
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/gdb
|
||||||
|
#
|
||||||
|
/usr/local/MariaDB/Columnstore/tools/copy2here.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/tools/getlogs.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/tools/getmodules.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/tools/getps.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/tools/getsar.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/tools/getuserinput.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/tools/prat
|
||||||
|
/usr/local/MariaDB/Columnstore/tools/prat.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/tools/ps
|
||||||
|
/usr/local/MariaDB/Columnstore/tools/pscollect
|
||||||
|
/usr/local/MariaDB/Columnstore/tools/README
|
||||||
|
/usr/local/MariaDB/Columnstore/tools/tarfiles.sh
|
||||||
|
#
|
||||||
|
%files libs
|
||||||
|
%defattr(-, root, root)
|
||||||
|
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libconfigcpp.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libddlpackageproc.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libddlpackage.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libdmlpackageproc.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libdmlpackage.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libexecplan.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libfuncexp.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libudfsdk.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libjoblist.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libjoiner.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libloggingcpp.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libmessageqcpp.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libnetsnmpagent.so.5.2.1
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libnetsnmphelpers.so.5.2.1
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libnetsnmpmibs.so.5.2.1
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libnetsnmp.so.5.2.1
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libnetsnmptrapd.so.5.2.1
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/liboamcpp.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libsnmpmanager.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libthreadpool.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libwindowfunction.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libwriteengine.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libwriteengineclient.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libbrm.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/librwlock.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libdataconvert.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/librowgroup.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libcacheutils.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libcommon.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libboost_idb.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libcompress.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libddlcleanuputil.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libbatchloader.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libmysqlcl_idb.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libquerystats.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libwriteengineredistribute.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libjemalloc.so.3.3.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libidbdatafile.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/hdfs-20.so
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/hdfs-12.so
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libgcc_s.so.1
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libstdc++.so.6.0.14
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libthrift.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libquerytele.so.1.0.0
|
||||||
|
|
||||||
|
%files storage-engine
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libcalmysql.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libudf_mysql.so.1.0.0
|
||||||
|
|
||||||
|
/usr/local/MariaDB/Columnstore/mysql/mysql-Calpont
|
||||||
|
/usr/local/MariaDB/Columnstore/mysql/install_calpont_mysql.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/mysql/syscatalog_mysql.sql
|
||||||
|
/usr/local/MariaDB/Columnstore/mysql/dumpcat_mysql.sql
|
||||||
|
/usr/local/MariaDB/Columnstore/mysql/dumpcat.pl
|
||||||
|
/usr/local/MariaDB/Columnstore/mysql/calsetuserpriority.sql
|
||||||
|
/usr/local/MariaDB/Columnstore/mysql/calremoveuserpriority.sql
|
||||||
|
/usr/local/MariaDB/Columnstore/mysql/calshowprocesslist.sql
|
||||||
|
|
||||||
|
%config /usr/local/MariaDB/Columnstore/mysql/my.cnf
|
||||||
|
|
||||||
|
#
|
||||||
|
# Scriptlets
|
||||||
|
# for an install, pre & post run with $1 set to 1
|
||||||
|
# for an erase, preun & postun run with $1 set to 0
|
||||||
|
# for an upgrade, pre & post run first, with $1 set to 2 then the _old_ preun & postun run with $1 set to 1
|
||||||
|
|
||||||
|
%post platform
|
||||||
|
rpmmode=install
|
||||||
|
if [ "$1" -eq "$1" 2> /dev/null ]; then
|
||||||
|
if [ $1 -ne 1 ]; then
|
||||||
|
rpmmode=upgrade
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
prefix=/usr/local
|
||||||
|
|
||||||
|
test -x /usr/local/MariaDB/Columnstore/bin/post-install && /usr/local/MariaDB/Columnstore/bin/post-install --prefix=$prefix --rpmmode=$rpmmode
|
||||||
|
|
||||||
|
echo "InfinIDB RPM install completed"
|
||||||
|
|
||||||
|
%post libs
|
||||||
|
rpmmode=install
|
||||||
|
if [ "$1" -eq "$1" 2> /dev/null ]; then
|
||||||
|
if [ $1 -ne 1 ]; then
|
||||||
|
rpmmode=upgrade
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
prefix=/usr/local
|
||||||
|
|
||||||
|
echo "InfinIDB RPM install completed"
|
||||||
|
|
||||||
|
%post storage-engine
|
||||||
|
rpmmode=install
|
||||||
|
if [ "$1" -eq "$1" 2> /dev/null ]; then
|
||||||
|
if [ $1 -ne 1 ]; then
|
||||||
|
rpmmode=upgrade
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
prefix=/usr/local
|
||||||
|
|
||||||
|
echo "InfinIDB RPM install completed"
|
||||||
|
|
||||||
|
|
||||||
|
%post enterprise
|
||||||
|
rpmmode=install
|
||||||
|
if [ "$1" -eq "$1" 2> /dev/null ]; then
|
||||||
|
if [ $1 -ne 1 ]; then
|
||||||
|
rpmmode=upgrade
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
prefix=/usr/local
|
||||||
|
|
||||||
|
echo "InfinIDB RPM install completed"
|
||||||
|
|
||||||
|
%preun platform
|
||||||
|
rpmmode=upgrade
|
||||||
|
if [ "$1" -eq "$1" 2> /dev/null ]; then
|
||||||
|
if [ $1 -ne 1 ]; then
|
||||||
|
rpmmode=erase
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
rpmmode=erase
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $rpmmode = erase ]; then
|
||||||
|
test -x /usr/local/MariaDB/Columnstore/bin/pre-uninstall && /usr/local/MariaDB/Columnstore/bin/pre-uninstall
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
%preun libs
|
||||||
|
rpmmode=upgrade
|
||||||
|
if [ "$1" -eq "$1" 2> /dev/null ]; then
|
||||||
|
if [ $1 -ne 1 ]; then
|
||||||
|
rpmmode=erase
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
rpmmode=erase
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
%preun storage-engine
|
||||||
|
rpmmode=upgrade
|
||||||
|
if [ "$1" -eq "$1" 2> /dev/null ]; then
|
||||||
|
if [ $1 -ne 1 ]; then
|
||||||
|
rpmmode=erase
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
rpmmode=erase
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
%preun enterprise
|
||||||
|
rpmmode=upgrade
|
||||||
|
if [ "$1" -eq "$1" 2> /dev/null ]; then
|
||||||
|
if [ $1 -ne 1 ]; then
|
||||||
|
rpmmode=erase
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
rpmmode=erase
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
|
472
build/columnstore.spec.in~
Normal file
472
build/columnstore.spec.in~
Normal file
@ -0,0 +1,472 @@
|
|||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
Summary: InfiniDB-MariaDB software
|
||||||
|
Name: infinidb
|
||||||
|
@@VERSION@@
|
||||||
|
@@RELEASE@@
|
||||||
|
Vendor: MariaDB, Inc.
|
||||||
|
URL: http://www.mariadb.com/
|
||||||
|
@@PACKAGER@@
|
||||||
|
Group: Applications
|
||||||
|
License: Copyright (c) 2016 MariaDB, Inc., all rights reserved; redistributable under the terms of the GPL, see the file COPYING for details.
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{release}-buildroot
|
||||||
|
|
||||||
|
%description
|
||||||
|
InfiniDB-MariaDB software meta-package
|
||||||
|
|
||||||
|
%package platform
|
||||||
|
Summary: InfiniDB-MariaDB software binaries
|
||||||
|
Group: Applications
|
||||||
|
Obsoletes: calpont
|
||||||
|
Requires: expect, infinidb-libs
|
||||||
|
|
||||||
|
%description platform
|
||||||
|
InfiniDB-MariaDB binary files
|
||||||
|
@@BUILDINFO@@
|
||||||
|
|
||||||
|
%package libs
|
||||||
|
Summary: InfiniDB-MariaDB software libraries
|
||||||
|
Group: Applications
|
||||||
|
Obsoletes: calpont
|
||||||
|
|
||||||
|
%description libs
|
||||||
|
InfiniDB-MariaDB libraries
|
||||||
|
|
||||||
|
%package enterprise
|
||||||
|
Summary: InfiniDB Enterprise software binaries
|
||||||
|
Group: Applications
|
||||||
|
Obsoletes: calpont
|
||||||
|
Requires: infinidb-libs, infinidb-platform
|
||||||
|
License: Proprietary; Copyright (c) 2014 InfiniDB, Inc., all rights reserved
|
||||||
|
|
||||||
|
%description enterprise
|
||||||
|
InfiniDB Enterprise binary files
|
||||||
|
|
||||||
|
%package storage-engine
|
||||||
|
Summary: InfiniDB-MariaDB software MariaDB connector
|
||||||
|
Group: Applications
|
||||||
|
Obsoletes: calpont-mysql
|
||||||
|
Requires: infinidb-libs
|
||||||
|
|
||||||
|
%description storage-engine
|
||||||
|
InfiniDB MariaDB connector binary files
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%define _use_internal_dependency_generator 0
|
||||||
|
%define __find_requires %{nil}
|
||||||
|
%define __os_install_post %{nil}
|
||||||
|
%define debug_package %{nil}
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}/usr/local
|
||||||
|
tar -C $RPM_BUILD_DIR/%{name}-%{version}-%{release} -cf - . | tar -C %{buildroot}/usr/local -xf -
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/%{name}-%{version}-%{release}
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
|
||||||
|
%files platform
|
||||||
|
%defattr(-, root, root)
|
||||||
|
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/DDLProc
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/ExeMgr
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/ProcMgr
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/ProcMon
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/DMLProc
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/WriteEngineServer
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/cpimport
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/post-install
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/post-mysql-install
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/post-mysqld-install
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/pre-uninstall
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/PrimProc
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/DecomSvr
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/upgrade-infinidb.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/run.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/infinidb
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/calpontSyslog
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/calpontSyslog7
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/calpontSyslog-ng
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/syslogSetup.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/cplogger
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/infinidb.def
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/dbbuilder
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/cpimport.bin
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/load_brm
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/save_brm
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/dbrmctl
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/controllernode
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/reset_locks
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/workernode
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/colxml
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/clearShm
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/viewtablelock
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/cleartablelock
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/mcsadmin
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/trapHandler
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/remote_command.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/postConfigure
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/calpontLogRotate
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/transactionLog
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/calpontDBWrite
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/transactionLogArchiver.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/system_installer.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/installer
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/module_installer.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/patchInstaller
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/patch_installer.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/xm_installer.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/calpontUninstall.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/director_installer.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/user_installer.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/performance_installer.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/startupTests.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/os_check.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/sendtrap
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/remote_scp_put.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/remotessh.exp
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/ServerMonitor
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/master-rep-infinidb.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/slave-rep-infinidb.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/rsync.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/calpontSupport
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/hardwareReport.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/softwareReport.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/configReport.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/logReport.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/bulklogReport.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/resourceReport.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/hadoopReport.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/alarmReport.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/amazonInstaller
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/remote_command_verify.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/disable-rep-infinidb.sh
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
%config /usr/local/MariaDB/Columnstore/etc/Calpont.xml
|
||||||
|
%config /usr/local/MariaDB/Columnstore/etc/ConsoleCmds.xml
|
||||||
|
%config /usr/local/MariaDB/Columnstore/etc/ProcessConfig.xml
|
||||||
|
%config /usr/local/MariaDB/Columnstore/etc/snmpd.conf
|
||||||
|
%config /usr/local/MariaDB/Columnstore/etc/snmptrapd.conf
|
||||||
|
%config /usr/local/MariaDB/Columnstore/etc/Calpont.xml.singleserver
|
||||||
|
%config /usr/local/MariaDB/Columnstore/etc/ProcessConfig.xml.singleserver
|
||||||
|
%config /usr/local/MariaDB/Columnstore/etc/snmpd.conf.singleserver
|
||||||
|
%config /usr/local/MariaDB/Columnstore/etc/snmptrapd.conf.singleserver
|
||||||
|
#
|
||||||
|
/usr/local/MariaDB/Columnstore/etc/MessageFile.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/etc/ErrorMessage.txt
|
||||||
|
#
|
||||||
|
%attr(0666, root, root) /usr/local/MariaDB/Columnstore/local/module
|
||||||
|
#
|
||||||
|
/usr/local/MariaDB/Columnstore/releasenum
|
||||||
|
|
||||||
|
# Tools...
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/rollback
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/editem
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/getConfig
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/setConfig
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/setenv-hdfs-12
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/setenv-hdfs-20
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/hdfsCheck
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/configxml.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/remote_scp_get.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/calpontAlias
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/autoConfigure
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/ddlcleanup
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/idbmeminfo
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/IDBInstanceCmds.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/IDBVolumeCmds.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/binary_installer.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/myCnf-include-args.text
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/myCnf-exclude-args.text
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/mycnfUpgrade
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/getMySQLpw
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/infinidb.conf
|
||||||
|
|
||||||
|
/usr/local/MariaDB/Columnstore/sbin/snmpd
|
||||||
|
/usr/local/MariaDB/Columnstore/sbin/snmptrapd
|
||||||
|
%config %attr(0666, root, root) /usr/local/MariaDB/Columnstore/etc/AlarmConfig.xml
|
||||||
|
#
|
||||||
|
%config /usr/local/MariaDB/Columnstore/local/snmpdx.conf
|
||||||
|
%config /usr/local/MariaDB/Columnstore/local/snmpdx.conf.singleserver
|
||||||
|
#
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/AGENTX-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/CALPONT-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/DISMAN-EVENT-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/DISMAN-SCRIPT-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/EtherLike-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/HCNUM-TC.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/HOST-RESOURCES-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/HOST-RESOURCES-TYPES.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IANAifType-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IANA-LANGUAGE-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IANA-RTPROTO-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IF-INVERTED-STACK-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IF-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/INET-ADDRESS-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IP-FORWARD-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IP-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-ICMP-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-TCP-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-TC.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-UDP-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-AGENT-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-EXAMPLES-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-EXTEND-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-TC.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/NOTIFICATION-LOG-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/RFC1155-SMI.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/RFC1213-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/RFC-1215.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/RMON-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SMUX-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-COMMUNITY-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-FRAMEWORK-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-MPD-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-NOTIFICATION-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-PROXY-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-TARGET-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-USER-BASED-SM-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-USM-AES-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-USM-DH-OBJECTS-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-CONF.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-SMI.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-TC.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-TM.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-VIEW-BASED-ACM-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/TCP-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/TRANSPORT-ADDRESS-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-DEMO-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-DISKIO-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-DLMOD-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-IPFWACC-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-SNMP-MIB.txt
|
||||||
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/UDP-MIB.txt
|
||||||
|
#
|
||||||
|
/usr/local/MariaDB/Columnstore/post/functions
|
||||||
|
/usr/local/MariaDB/Columnstore/post/test-001.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/post/test-002.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/post/test-003.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/post/test-004.sh
|
||||||
|
|
||||||
|
%files enterprise
|
||||||
|
%defattr(-, root, root)
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/displayJobGraph.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/dbhealth.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/dbhealth.sql
|
||||||
|
|
||||||
|
# Tools...
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/dumpcol
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/oid2file
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/evalcol
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/SesMgr
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/dumpVss
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/editTxn
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/dbprof.pl
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/dumpobm
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/file2oid.pl
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/print_journal
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/healthcheck
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/glusterctl
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/glusteradd
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/glusterconf
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/redistributeDB
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/databaseSizeReport
|
||||||
|
/usr/local/MariaDB/Columnstore/bin/gdb
|
||||||
|
#
|
||||||
|
/usr/local/MariaDB/Columnstore/tools/copy2here.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/tools/getlogs.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/tools/getmodules.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/tools/getps.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/tools/getsar.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/tools/getuserinput.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/tools/prat
|
||||||
|
/usr/local/MariaDB/Columnstore/tools/prat.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/tools/ps
|
||||||
|
/usr/local/MariaDB/Columnstore/tools/pscollect
|
||||||
|
/usr/local/MariaDB/Columnstore/tools/README
|
||||||
|
/usr/local/MariaDB/Columnstore/tools/tarfiles.sh
|
||||||
|
#
|
||||||
|
%files libs
|
||||||
|
%defattr(-, root, root)
|
||||||
|
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libconfigcpp.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libddlpackageproc.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libddlpackage.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libdmlpackageproc.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libdmlpackage.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libexecplan.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libfuncexp.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libudfsdk.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libjoblist.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libjoiner.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libloggingcpp.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libmessageqcpp.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libnetsnmpagent.so.5.2.1
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libnetsnmphelpers.so.5.2.1
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libnetsnmpmibs.so.5.2.1
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libnetsnmp.so.5.2.1
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libnetsnmptrapd.so.5.2.1
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/liboamcpp.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libsnmpmanager.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libthreadpool.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libwindowfunction.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libwriteengine.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libwriteengineclient.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libbrm.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/librwlock.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libdataconvert.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/librowgroup.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libcacheutils.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libcommon.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libboost_idb.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libcompress.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libddlcleanuputil.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libbatchloader.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libmysqlcl_idb.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libquerystats.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libwriteengineredistribute.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libjemalloc.so.3.3.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libidbdatafile.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/hdfs-20.so
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/hdfs-12.so
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libgcc_s.so.1
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libstdc++.so.6.0.14
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libthrift.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libquerytele.so.1.0.0
|
||||||
|
|
||||||
|
%files storage-engine
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libcalmysql.so.1.0.0
|
||||||
|
/usr/local/MariaDB/Columnstore/lib/libudf_mysql.so.1.0.0
|
||||||
|
|
||||||
|
/usr/local/MariaDB/Columnstore/mysql/mysql-Calpont
|
||||||
|
/usr/local/MariaDB/Columnstore/mysql/install_calpont_mysql.sh
|
||||||
|
/usr/local/MariaDB/Columnstore/mysql/syscatalog_mysql.sql
|
||||||
|
/usr/local/MariaDB/Columnstore/mysql/dumpcat_mysql.sql
|
||||||
|
/usr/local/MariaDB/Columnstore/mysql/dumpcat.pl
|
||||||
|
/usr/local/MariaDB/Columnstore/mysql/calsetuserpriority.sql
|
||||||
|
/usr/local/MariaDB/Columnstore/mysql/calremoveuserpriority.sql
|
||||||
|
/usr/local/MariaDB/Columnstore/mysql/calshowprocesslist.sql
|
||||||
|
|
||||||
|
%config /usr/local/MariaDB/Columnstore/mysql/my.cnf
|
||||||
|
|
||||||
|
#
|
||||||
|
# Scriptlets
|
||||||
|
# for an install, pre & post run with $1 set to 1
|
||||||
|
# for an erase, preun & postun run with $1 set to 0
|
||||||
|
# for an upgrade, pre & post run first, with $1 set to 2 then the _old_ preun & postun run with $1 set to 1
|
||||||
|
|
||||||
|
%post platform
|
||||||
|
rpmmode=install
|
||||||
|
if [ "$1" -eq "$1" 2> /dev/null ]; then
|
||||||
|
if [ $1 -ne 1 ]; then
|
||||||
|
rpmmode=upgrade
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
prefix=/usr/local
|
||||||
|
|
||||||
|
test -x /usr/local/MariaDB/Columnstore/bin/post-install && /usr/local/MariaDB/Columnstore/bin/post-install --prefix=$prefix --rpmmode=$rpmmode
|
||||||
|
|
||||||
|
echo "InfinIDB RPM install completed"
|
||||||
|
|
||||||
|
%post libs
|
||||||
|
rpmmode=install
|
||||||
|
if [ "$1" -eq "$1" 2> /dev/null ]; then
|
||||||
|
if [ $1 -ne 1 ]; then
|
||||||
|
rpmmode=upgrade
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
prefix=/usr/local
|
||||||
|
|
||||||
|
echo "InfinIDB RPM install completed"
|
||||||
|
|
||||||
|
%post storage-engine
|
||||||
|
rpmmode=install
|
||||||
|
if [ "$1" -eq "$1" 2> /dev/null ]; then
|
||||||
|
if [ $1 -ne 1 ]; then
|
||||||
|
rpmmode=upgrade
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
prefix=/usr/local
|
||||||
|
|
||||||
|
echo "InfinIDB RPM install completed"
|
||||||
|
|
||||||
|
|
||||||
|
%post enterprise
|
||||||
|
rpmmode=install
|
||||||
|
if [ "$1" -eq "$1" 2> /dev/null ]; then
|
||||||
|
if [ $1 -ne 1 ]; then
|
||||||
|
rpmmode=upgrade
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
prefix=/usr/local
|
||||||
|
|
||||||
|
echo "InfinIDB RPM install completed"
|
||||||
|
|
||||||
|
%preun platform
|
||||||
|
rpmmode=upgrade
|
||||||
|
if [ "$1" -eq "$1" 2> /dev/null ]; then
|
||||||
|
if [ $1 -ne 1 ]; then
|
||||||
|
rpmmode=erase
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
rpmmode=erase
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $rpmmode = erase ]; then
|
||||||
|
test -x /usr/local/MariaDB/Columnstore/bin/pre-uninstall && /usr/local/MariaDB/Columnstore/bin/pre-uninstall
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
%preun libs
|
||||||
|
rpmmode=upgrade
|
||||||
|
if [ "$1" -eq "$1" 2> /dev/null ]; then
|
||||||
|
if [ $1 -ne 1 ]; then
|
||||||
|
rpmmode=erase
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
rpmmode=erase
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
%preun storage-engine
|
||||||
|
rpmmode=upgrade
|
||||||
|
if [ "$1" -eq "$1" 2> /dev/null ]; then
|
||||||
|
if [ $1 -ne 1 ]; then
|
||||||
|
rpmmode=erase
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
rpmmode=erase
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
%preun enterprise
|
||||||
|
rpmmode=upgrade
|
||||||
|
if [ "$1" -eq "$1" 2> /dev/null ]; then
|
||||||
|
if [ $1 -ne 1 ]; then
|
||||||
|
rpmmode=erase
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
rpmmode=erase
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
|||||||
./my.cnf
|
./my.cnf
|
||||||
./mysql-Calpont
|
./mysql-Columnstore
|
||||||
./install_calpont_mysql.sh
|
./install_calpont_mysql.sh
|
||||||
|
3
build/files.lst~
Normal file
3
build/files.lst~
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
./my.cnf
|
||||||
|
./mysql-Calpont
|
||||||
|
./install_calpont_mysql.sh
|
@ -72,293 +72,293 @@ rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/%{name}-%{version}-%{release}
|
|||||||
%files platform
|
%files platform
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
|
|
||||||
/usr/local/Calpont/bin/DDLProc
|
/usr/local/MariaDB/Columnstore/bin/DDLProc
|
||||||
/usr/local/Calpont/bin/ExeMgr
|
/usr/local/MariaDB/Columnstore/bin/ExeMgr
|
||||||
/usr/local/Calpont/bin/ProcMgr
|
/usr/local/MariaDB/Columnstore/bin/ProcMgr
|
||||||
/usr/local/Calpont/bin/ProcMon
|
/usr/local/MariaDB/Columnstore/bin/ProcMon
|
||||||
/usr/local/Calpont/bin/DMLProc
|
/usr/local/MariaDB/Columnstore/bin/DMLProc
|
||||||
/usr/local/Calpont/bin/WriteEngineServer
|
/usr/local/MariaDB/Columnstore/bin/WriteEngineServer
|
||||||
/usr/local/Calpont/bin/cpimport
|
/usr/local/MariaDB/Columnstore/bin/cpimport
|
||||||
/usr/local/Calpont/bin/post-install
|
/usr/local/MariaDB/Columnstore/bin/post-install
|
||||||
/usr/local/Calpont/bin/post-mysql-install
|
/usr/local/MariaDB/Columnstore/bin/post-mysql-install
|
||||||
/usr/local/Calpont/bin/post-mysqld-install
|
/usr/local/MariaDB/Columnstore/bin/post-mysqld-install
|
||||||
/usr/local/Calpont/bin/pre-uninstall
|
/usr/local/MariaDB/Columnstore/bin/pre-uninstall
|
||||||
/usr/local/Calpont/bin/PrimProc
|
/usr/local/MariaDB/Columnstore/bin/PrimProc
|
||||||
/usr/local/Calpont/bin/DecomSvr
|
/usr/local/MariaDB/Columnstore/bin/DecomSvr
|
||||||
/usr/local/Calpont/bin/upgrade-infinidb.sh
|
/usr/local/MariaDB/Columnstore/bin/upgrade-infinidb.sh
|
||||||
/usr/local/Calpont/bin/run.sh
|
/usr/local/MariaDB/Columnstore/bin/run.sh
|
||||||
/usr/local/Calpont/bin/infinidb
|
/usr/local/MariaDB/Columnstore/bin/infinidb
|
||||||
/usr/local/Calpont/bin/calpontSyslog
|
/usr/local/MariaDB/Columnstore/bin/calpontSyslog
|
||||||
/usr/local/Calpont/bin/calpontSyslog7
|
/usr/local/MariaDB/Columnstore/bin/calpontSyslog7
|
||||||
/usr/local/Calpont/bin/calpontSyslog-ng
|
/usr/local/MariaDB/Columnstore/bin/calpontSyslog-ng
|
||||||
/usr/local/Calpont/bin/syslogSetup.sh
|
/usr/local/MariaDB/Columnstore/bin/syslogSetup.sh
|
||||||
/usr/local/Calpont/bin/cplogger
|
/usr/local/MariaDB/Columnstore/bin/cplogger
|
||||||
/usr/local/Calpont/bin/infinidb.def
|
/usr/local/MariaDB/Columnstore/bin/infinidb.def
|
||||||
/usr/local/Calpont/bin/dbbuilder
|
/usr/local/MariaDB/Columnstore/bin/dbbuilder
|
||||||
/usr/local/Calpont/bin/cpimport.bin
|
/usr/local/MariaDB/Columnstore/bin/cpimport.bin
|
||||||
/usr/local/Calpont/bin/load_brm
|
/usr/local/MariaDB/Columnstore/bin/load_brm
|
||||||
/usr/local/Calpont/bin/save_brm
|
/usr/local/MariaDB/Columnstore/bin/save_brm
|
||||||
/usr/local/Calpont/bin/dbrmctl
|
/usr/local/MariaDB/Columnstore/bin/dbrmctl
|
||||||
/usr/local/Calpont/bin/controllernode
|
/usr/local/MariaDB/Columnstore/bin/controllernode
|
||||||
/usr/local/Calpont/bin/reset_locks
|
/usr/local/MariaDB/Columnstore/bin/reset_locks
|
||||||
/usr/local/Calpont/bin/workernode
|
/usr/local/MariaDB/Columnstore/bin/workernode
|
||||||
/usr/local/Calpont/bin/colxml
|
/usr/local/MariaDB/Columnstore/bin/colxml
|
||||||
/usr/local/Calpont/bin/clearShm
|
/usr/local/MariaDB/Columnstore/bin/clearShm
|
||||||
/usr/local/Calpont/bin/viewtablelock
|
/usr/local/MariaDB/Columnstore/bin/viewtablelock
|
||||||
/usr/local/Calpont/bin/cleartablelock
|
/usr/local/MariaDB/Columnstore/bin/cleartablelock
|
||||||
/usr/local/Calpont/bin/mcsadmin
|
/usr/local/MariaDB/Columnstore/bin/mcsadmin
|
||||||
/usr/local/Calpont/bin/trapHandler
|
/usr/local/MariaDB/Columnstore/bin/trapHandler
|
||||||
/usr/local/Calpont/bin/remote_command.sh
|
/usr/local/MariaDB/Columnstore/bin/remote_command.sh
|
||||||
/usr/local/Calpont/bin/postConfigure
|
/usr/local/MariaDB/Columnstore/bin/postConfigure
|
||||||
/usr/local/Calpont/bin/calpontLogRotate
|
/usr/local/MariaDB/Columnstore/bin/calpontLogRotate
|
||||||
/usr/local/Calpont/bin/transactionLog
|
/usr/local/MariaDB/Columnstore/bin/transactionLog
|
||||||
/usr/local/Calpont/bin/calpontDBWrite
|
/usr/local/MariaDB/Columnstore/bin/calpontDBWrite
|
||||||
/usr/local/Calpont/bin/transactionLogArchiver.sh
|
/usr/local/MariaDB/Columnstore/bin/transactionLogArchiver.sh
|
||||||
/usr/local/Calpont/bin/system_installer.sh
|
/usr/local/MariaDB/Columnstore/bin/system_installer.sh
|
||||||
/usr/local/Calpont/bin/installer
|
/usr/local/MariaDB/Columnstore/bin/installer
|
||||||
/usr/local/Calpont/bin/module_installer.sh
|
/usr/local/MariaDB/Columnstore/bin/module_installer.sh
|
||||||
/usr/local/Calpont/bin/patchInstaller
|
/usr/local/MariaDB/Columnstore/bin/patchInstaller
|
||||||
/usr/local/Calpont/bin/patch_installer.sh
|
/usr/local/MariaDB/Columnstore/bin/patch_installer.sh
|
||||||
/usr/local/Calpont/bin/xm_installer.sh
|
/usr/local/MariaDB/Columnstore/bin/xm_installer.sh
|
||||||
/usr/local/Calpont/bin/calpontUninstall.sh
|
/usr/local/MariaDB/Columnstore/bin/calpontUninstall.sh
|
||||||
/usr/local/Calpont/bin/director_installer.sh
|
/usr/local/MariaDB/Columnstore/bin/director_installer.sh
|
||||||
/usr/local/Calpont/bin/user_installer.sh
|
/usr/local/MariaDB/Columnstore/bin/user_installer.sh
|
||||||
/usr/local/Calpont/bin/performance_installer.sh
|
/usr/local/MariaDB/Columnstore/bin/performance_installer.sh
|
||||||
/usr/local/Calpont/bin/startupTests.sh
|
/usr/local/MariaDB/Columnstore/bin/startupTests.sh
|
||||||
/usr/local/Calpont/bin/os_check.sh
|
/usr/local/MariaDB/Columnstore/bin/os_check.sh
|
||||||
/usr/local/Calpont/bin/sendtrap
|
/usr/local/MariaDB/Columnstore/bin/sendtrap
|
||||||
/usr/local/Calpont/bin/remote_scp_put.sh
|
/usr/local/MariaDB/Columnstore/bin/remote_scp_put.sh
|
||||||
/usr/local/Calpont/bin/remotessh.exp
|
/usr/local/MariaDB/Columnstore/bin/remotessh.exp
|
||||||
/usr/local/Calpont/bin/ServerMonitor
|
/usr/local/MariaDB/Columnstore/bin/ServerMonitor
|
||||||
/usr/local/Calpont/bin/master-rep-infinidb.sh
|
/usr/local/MariaDB/Columnstore/bin/master-rep-infinidb.sh
|
||||||
/usr/local/Calpont/bin/slave-rep-infinidb.sh
|
/usr/local/MariaDB/Columnstore/bin/slave-rep-infinidb.sh
|
||||||
/usr/local/Calpont/bin/rsync.sh
|
/usr/local/MariaDB/Columnstore/bin/rsync.sh
|
||||||
/usr/local/Calpont/bin/calpontSupport
|
/usr/local/MariaDB/Columnstore/bin/calpontSupport
|
||||||
/usr/local/Calpont/bin/hardwareReport.sh
|
/usr/local/MariaDB/Columnstore/bin/hardwareReport.sh
|
||||||
/usr/local/Calpont/bin/softwareReport.sh
|
/usr/local/MariaDB/Columnstore/bin/softwareReport.sh
|
||||||
/usr/local/Calpont/bin/configReport.sh
|
/usr/local/MariaDB/Columnstore/bin/configReport.sh
|
||||||
/usr/local/Calpont/bin/logReport.sh
|
/usr/local/MariaDB/Columnstore/bin/logReport.sh
|
||||||
/usr/local/Calpont/bin/bulklogReport.sh
|
/usr/local/MariaDB/Columnstore/bin/bulklogReport.sh
|
||||||
/usr/local/Calpont/bin/resourceReport.sh
|
/usr/local/MariaDB/Columnstore/bin/resourceReport.sh
|
||||||
/usr/local/Calpont/bin/hadoopReport.sh
|
/usr/local/MariaDB/Columnstore/bin/hadoopReport.sh
|
||||||
/usr/local/Calpont/bin/alarmReport.sh
|
/usr/local/MariaDB/Columnstore/bin/alarmReport.sh
|
||||||
/usr/local/Calpont/bin/amazonInstaller
|
/usr/local/MariaDB/Columnstore/bin/amazonInstaller
|
||||||
/usr/local/Calpont/bin/remote_command_verify.sh
|
/usr/local/MariaDB/Columnstore/bin/remote_command_verify.sh
|
||||||
/usr/local/Calpont/bin/disable-rep-infinidb.sh
|
/usr/local/MariaDB/Columnstore/bin/disable-rep-infinidb.sh
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
%config /usr/local/Calpont/etc/Calpont.xml
|
%config /usr/local/MariaDB/Columnstore/etc/Calpont.xml
|
||||||
%config /usr/local/Calpont/etc/ConsoleCmds.xml
|
%config /usr/local/MariaDB/Columnstore/etc/ConsoleCmds.xml
|
||||||
%config /usr/local/Calpont/etc/ProcessConfig.xml
|
%config /usr/local/MariaDB/Columnstore/etc/ProcessConfig.xml
|
||||||
%config /usr/local/Calpont/etc/snmpd.conf
|
%config /usr/local/MariaDB/Columnstore/etc/snmpd.conf
|
||||||
%config /usr/local/Calpont/etc/snmptrapd.conf
|
%config /usr/local/MariaDB/Columnstore/etc/snmptrapd.conf
|
||||||
%config /usr/local/Calpont/etc/Calpont.xml.singleserver
|
%config /usr/local/MariaDB/Columnstore/etc/Calpont.xml.singleserver
|
||||||
%config /usr/local/Calpont/etc/ProcessConfig.xml.singleserver
|
%config /usr/local/MariaDB/Columnstore/etc/ProcessConfig.xml.singleserver
|
||||||
%config /usr/local/Calpont/etc/snmpd.conf.singleserver
|
%config /usr/local/MariaDB/Columnstore/etc/snmpd.conf.singleserver
|
||||||
%config /usr/local/Calpont/etc/snmptrapd.conf.singleserver
|
%config /usr/local/MariaDB/Columnstore/etc/snmptrapd.conf.singleserver
|
||||||
#
|
#
|
||||||
/usr/local/Calpont/etc/MessageFile.txt
|
/usr/local/MariaDB/Columnstore/etc/MessageFile.txt
|
||||||
/usr/local/Calpont/etc/ErrorMessage.txt
|
/usr/local/MariaDB/Columnstore/etc/ErrorMessage.txt
|
||||||
#
|
#
|
||||||
%attr(0666, root, root) /usr/local/Calpont/local/module
|
%attr(0666, root, root) /usr/local/MariaDB/Columnstore/local/module
|
||||||
#
|
#
|
||||||
/usr/local/Calpont/releasenum
|
/usr/local/MariaDB/Columnstore/releasenum
|
||||||
|
|
||||||
# Tools...
|
# Tools...
|
||||||
/usr/local/Calpont/bin/rollback
|
/usr/local/MariaDB/Columnstore/bin/rollback
|
||||||
/usr/local/Calpont/bin/editem
|
/usr/local/MariaDB/Columnstore/bin/editem
|
||||||
/usr/local/Calpont/bin/getConfig
|
/usr/local/MariaDB/Columnstore/bin/getConfig
|
||||||
/usr/local/Calpont/bin/setConfig
|
/usr/local/MariaDB/Columnstore/bin/setConfig
|
||||||
/usr/local/Calpont/bin/setenv-hdfs-12
|
/usr/local/MariaDB/Columnstore/bin/setenv-hdfs-12
|
||||||
/usr/local/Calpont/bin/setenv-hdfs-20
|
/usr/local/MariaDB/Columnstore/bin/setenv-hdfs-20
|
||||||
/usr/local/Calpont/bin/hdfsCheck
|
/usr/local/MariaDB/Columnstore/bin/hdfsCheck
|
||||||
/usr/local/Calpont/bin/configxml.sh
|
/usr/local/MariaDB/Columnstore/bin/configxml.sh
|
||||||
/usr/local/Calpont/bin/remote_scp_get.sh
|
/usr/local/MariaDB/Columnstore/bin/remote_scp_get.sh
|
||||||
/usr/local/Calpont/bin/calpontAlias
|
/usr/local/MariaDB/Columnstore/bin/calpontAlias
|
||||||
/usr/local/Calpont/bin/autoConfigure
|
/usr/local/MariaDB/Columnstore/bin/autoConfigure
|
||||||
/usr/local/Calpont/bin/ddlcleanup
|
/usr/local/MariaDB/Columnstore/bin/ddlcleanup
|
||||||
/usr/local/Calpont/bin/idbmeminfo
|
/usr/local/MariaDB/Columnstore/bin/idbmeminfo
|
||||||
/usr/local/Calpont/bin/IDBInstanceCmds.sh
|
/usr/local/MariaDB/Columnstore/bin/IDBInstanceCmds.sh
|
||||||
/usr/local/Calpont/bin/IDBVolumeCmds.sh
|
/usr/local/MariaDB/Columnstore/bin/IDBVolumeCmds.sh
|
||||||
/usr/local/Calpont/bin/binary_installer.sh
|
/usr/local/MariaDB/Columnstore/bin/binary_installer.sh
|
||||||
/usr/local/Calpont/bin/myCnf-include-args.text
|
/usr/local/MariaDB/Columnstore/bin/myCnf-include-args.text
|
||||||
/usr/local/Calpont/bin/myCnf-exclude-args.text
|
/usr/local/MariaDB/Columnstore/bin/myCnf-exclude-args.text
|
||||||
/usr/local/Calpont/bin/mycnfUpgrade
|
/usr/local/MariaDB/Columnstore/bin/mycnfUpgrade
|
||||||
/usr/local/Calpont/bin/getMySQLpw
|
/usr/local/MariaDB/Columnstore/bin/getMySQLpw
|
||||||
/usr/local/Calpont/bin/infinidb.conf
|
/usr/local/MariaDB/Columnstore/bin/infinidb.conf
|
||||||
|
|
||||||
/usr/local/Calpont/sbin/snmpd
|
/usr/local/MariaDB/Columnstore/sbin/snmpd
|
||||||
/usr/local/Calpont/sbin/snmptrapd
|
/usr/local/MariaDB/Columnstore/sbin/snmptrapd
|
||||||
%config %attr(0666, root, root) /usr/local/Calpont/etc/AlarmConfig.xml
|
%config %attr(0666, root, root) /usr/local/MariaDB/Columnstore/etc/AlarmConfig.xml
|
||||||
#
|
#
|
||||||
%config /usr/local/Calpont/local/snmpdx.conf
|
%config /usr/local/MariaDB/Columnstore/local/snmpdx.conf
|
||||||
%config /usr/local/Calpont/local/snmpdx.conf.singleserver
|
%config /usr/local/MariaDB/Columnstore/local/snmpdx.conf.singleserver
|
||||||
#
|
#
|
||||||
/usr/local/Calpont/share/snmp/mibs/AGENTX-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/AGENTX-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/CALPONT-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/CALPONT-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/DISMAN-EVENT-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/DISMAN-EVENT-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/DISMAN-SCHEDULE-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/DISMAN-SCRIPT-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/DISMAN-SCRIPT-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/EtherLike-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/EtherLike-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/HCNUM-TC.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/HCNUM-TC.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/HOST-RESOURCES-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/HOST-RESOURCES-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/HOST-RESOURCES-TYPES.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/HOST-RESOURCES-TYPES.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/IANAifType-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IANAifType-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/IANA-LANGUAGE-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IANA-LANGUAGE-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/IANA-RTPROTO-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IANA-RTPROTO-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/IF-INVERTED-STACK-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IF-INVERTED-STACK-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/IF-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IF-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/INET-ADDRESS-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/INET-ADDRESS-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/IP-FORWARD-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IP-FORWARD-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/IP-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IP-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/IPV6-ICMP-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-ICMP-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/IPV6-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/IPV6-TCP-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-TCP-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/IPV6-TC.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-TC.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/IPV6-UDP-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/IPV6-UDP-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/NET-SNMP-AGENT-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-AGENT-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/NET-SNMP-EXAMPLES-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-EXAMPLES-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/NET-SNMP-EXTEND-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-EXTEND-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/NET-SNMP-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/NET-SNMP-TC.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/NET-SNMP-TC.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/NOTIFICATION-LOG-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/NOTIFICATION-LOG-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/RFC1155-SMI.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/RFC1155-SMI.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/RFC1213-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/RFC1213-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/RFC-1215.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/RFC-1215.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/RMON-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/RMON-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/SMUX-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SMUX-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/SNMP-COMMUNITY-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-COMMUNITY-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/SNMP-FRAMEWORK-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-FRAMEWORK-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/SNMP-MPD-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-MPD-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/SNMP-NOTIFICATION-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-NOTIFICATION-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/SNMP-PROXY-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-PROXY-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/SNMP-TARGET-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-TARGET-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/SNMP-USER-BASED-SM-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-USER-BASED-SM-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/SNMP-USM-AES-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-USM-AES-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/SNMP-USM-DH-OBJECTS-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-USM-DH-OBJECTS-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/SNMPv2-CONF.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-CONF.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/SNMPv2-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/SNMPv2-SMI.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-SMI.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/SNMPv2-TC.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-TC.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/SNMPv2-TM.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMPv2-TM.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/SNMP-VIEW-BASED-ACM-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/SNMP-VIEW-BASED-ACM-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/TCP-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/TCP-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/TRANSPORT-ADDRESS-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/TRANSPORT-ADDRESS-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/UCD-DEMO-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-DEMO-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/UCD-DISKIO-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-DISKIO-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/UCD-DLMOD-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-DLMOD-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/UCD-IPFWACC-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-IPFWACC-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/UCD-SNMP-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/UCD-SNMP-MIB.txt
|
||||||
/usr/local/Calpont/share/snmp/mibs/UDP-MIB.txt
|
/usr/local/MariaDB/Columnstore/share/snmp/mibs/UDP-MIB.txt
|
||||||
#
|
#
|
||||||
/usr/local/Calpont/post/functions
|
/usr/local/MariaDB/Columnstore/post/functions
|
||||||
/usr/local/Calpont/post/test-001.sh
|
/usr/local/MariaDB/Columnstore/post/test-001.sh
|
||||||
/usr/local/Calpont/post/test-002.sh
|
/usr/local/MariaDB/Columnstore/post/test-002.sh
|
||||||
/usr/local/Calpont/post/test-003.sh
|
/usr/local/MariaDB/Columnstore/post/test-003.sh
|
||||||
/usr/local/Calpont/post/test-004.sh
|
/usr/local/MariaDB/Columnstore/post/test-004.sh
|
||||||
|
|
||||||
%files enterprise
|
%files enterprise
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
/usr/local/Calpont/bin/displayJobGraph.sh
|
/usr/local/MariaDB/Columnstore/bin/displayJobGraph.sh
|
||||||
/usr/local/Calpont/bin/dbhealth.sh
|
/usr/local/MariaDB/Columnstore/bin/dbhealth.sh
|
||||||
/usr/local/Calpont/bin/dbhealth.sql
|
/usr/local/MariaDB/Columnstore/bin/dbhealth.sql
|
||||||
|
|
||||||
# Tools...
|
# Tools...
|
||||||
/usr/local/Calpont/bin/dumpcol
|
/usr/local/MariaDB/Columnstore/bin/dumpcol
|
||||||
/usr/local/Calpont/bin/oid2file
|
/usr/local/MariaDB/Columnstore/bin/oid2file
|
||||||
/usr/local/Calpont/bin/evalcol
|
/usr/local/MariaDB/Columnstore/bin/evalcol
|
||||||
/usr/local/Calpont/bin/SesMgr
|
/usr/local/MariaDB/Columnstore/bin/SesMgr
|
||||||
/usr/local/Calpont/bin/dumpVss
|
/usr/local/MariaDB/Columnstore/bin/dumpVss
|
||||||
/usr/local/Calpont/bin/editTxn
|
/usr/local/MariaDB/Columnstore/bin/editTxn
|
||||||
/usr/local/Calpont/bin/dbprof.pl
|
/usr/local/MariaDB/Columnstore/bin/dbprof.pl
|
||||||
/usr/local/Calpont/bin/dumpobm
|
/usr/local/MariaDB/Columnstore/bin/dumpobm
|
||||||
/usr/local/Calpont/bin/file2oid.pl
|
/usr/local/MariaDB/Columnstore/bin/file2oid.pl
|
||||||
/usr/local/Calpont/bin/print_journal
|
/usr/local/MariaDB/Columnstore/bin/print_journal
|
||||||
/usr/local/Calpont/bin/healthcheck
|
/usr/local/MariaDB/Columnstore/bin/healthcheck
|
||||||
/usr/local/Calpont/bin/glusterctl
|
/usr/local/MariaDB/Columnstore/bin/glusterctl
|
||||||
/usr/local/Calpont/bin/glusteradd
|
/usr/local/MariaDB/Columnstore/bin/glusteradd
|
||||||
/usr/local/Calpont/bin/glusterconf
|
/usr/local/MariaDB/Columnstore/bin/glusterconf
|
||||||
/usr/local/Calpont/bin/redistributeDB
|
/usr/local/MariaDB/Columnstore/bin/redistributeDB
|
||||||
/usr/local/Calpont/bin/databaseSizeReport
|
/usr/local/MariaDB/Columnstore/bin/databaseSizeReport
|
||||||
/usr/local/Calpont/bin/gdb
|
/usr/local/MariaDB/Columnstore/bin/gdb
|
||||||
#
|
#
|
||||||
/usr/local/Calpont/tools/copy2here.sh
|
/usr/local/MariaDB/Columnstore/tools/copy2here.sh
|
||||||
/usr/local/Calpont/tools/getlogs.sh
|
/usr/local/MariaDB/Columnstore/tools/getlogs.sh
|
||||||
/usr/local/Calpont/tools/getmodules.sh
|
/usr/local/MariaDB/Columnstore/tools/getmodules.sh
|
||||||
/usr/local/Calpont/tools/getps.sh
|
/usr/local/MariaDB/Columnstore/tools/getps.sh
|
||||||
/usr/local/Calpont/tools/getsar.sh
|
/usr/local/MariaDB/Columnstore/tools/getsar.sh
|
||||||
/usr/local/Calpont/tools/getuserinput.sh
|
/usr/local/MariaDB/Columnstore/tools/getuserinput.sh
|
||||||
/usr/local/Calpont/tools/prat
|
/usr/local/MariaDB/Columnstore/tools/prat
|
||||||
/usr/local/Calpont/tools/prat.sh
|
/usr/local/MariaDB/Columnstore/tools/prat.sh
|
||||||
/usr/local/Calpont/tools/ps
|
/usr/local/MariaDB/Columnstore/tools/ps
|
||||||
/usr/local/Calpont/tools/pscollect
|
/usr/local/MariaDB/Columnstore/tools/pscollect
|
||||||
/usr/local/Calpont/tools/README
|
/usr/local/MariaDB/Columnstore/tools/README
|
||||||
/usr/local/Calpont/tools/tarfiles.sh
|
/usr/local/MariaDB/Columnstore/tools/tarfiles.sh
|
||||||
#
|
#
|
||||||
%files libs
|
%files libs
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
|
|
||||||
/usr/local/Calpont/lib/libconfigcpp.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libconfigcpp.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libddlpackageproc.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libddlpackageproc.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libddlpackage.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libddlpackage.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libdmlpackageproc.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libdmlpackageproc.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libdmlpackage.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libdmlpackage.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libexecplan.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libexecplan.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libfuncexp.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libfuncexp.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libudfsdk.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libudfsdk.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libjoblist.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libjoblist.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libjoiner.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libjoiner.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libloggingcpp.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libloggingcpp.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libmessageqcpp.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libmessageqcpp.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libnetsnmpagent.so.5.2.1
|
/usr/local/MariaDB/Columnstore/lib/libnetsnmpagent.so.5.2.1
|
||||||
/usr/local/Calpont/lib/libnetsnmphelpers.so.5.2.1
|
/usr/local/MariaDB/Columnstore/lib/libnetsnmphelpers.so.5.2.1
|
||||||
/usr/local/Calpont/lib/libnetsnmpmibs.so.5.2.1
|
/usr/local/MariaDB/Columnstore/lib/libnetsnmpmibs.so.5.2.1
|
||||||
/usr/local/Calpont/lib/libnetsnmp.so.5.2.1
|
/usr/local/MariaDB/Columnstore/lib/libnetsnmp.so.5.2.1
|
||||||
/usr/local/Calpont/lib/libnetsnmptrapd.so.5.2.1
|
/usr/local/MariaDB/Columnstore/lib/libnetsnmptrapd.so.5.2.1
|
||||||
/usr/local/Calpont/lib/liboamcpp.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/liboamcpp.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libsnmpmanager.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libsnmpmanager.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libthreadpool.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libthreadpool.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libwindowfunction.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libwindowfunction.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libwriteengine.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libwriteengine.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libwriteengineclient.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libwriteengineclient.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libbrm.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libbrm.so.1.0.0
|
||||||
/usr/local/Calpont/lib/librwlock.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/librwlock.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libdataconvert.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libdataconvert.so.1.0.0
|
||||||
/usr/local/Calpont/lib/librowgroup.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/librowgroup.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libcacheutils.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libcacheutils.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libcommon.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libcommon.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libboost_idb.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libboost_idb.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libcompress.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libcompress.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libddlcleanuputil.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libddlcleanuputil.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libbatchloader.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libbatchloader.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libmysqlcl_idb.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libmysqlcl_idb.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libquerystats.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libquerystats.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libwriteengineredistribute.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libwriteengineredistribute.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libjemalloc.so.3.3.0
|
/usr/local/MariaDB/Columnstore/lib/libjemalloc.so.3.3.0
|
||||||
/usr/local/Calpont/lib/libidbdatafile.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libidbdatafile.so.1.0.0
|
||||||
/usr/local/Calpont/lib/hdfs-20.so
|
/usr/local/MariaDB/Columnstore/lib/hdfs-20.so
|
||||||
/usr/local/Calpont/lib/hdfs-12.so
|
/usr/local/MariaDB/Columnstore/lib/hdfs-12.so
|
||||||
/usr/local/Calpont/lib/libgcc_s.so.1
|
/usr/local/MariaDB/Columnstore/lib/libgcc_s.so.1
|
||||||
/usr/local/Calpont/lib/libstdc++.so.6.0.14
|
/usr/local/MariaDB/Columnstore/lib/libstdc++.so.6.0.14
|
||||||
/usr/local/Calpont/lib/libthrift.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libthrift.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libquerytele.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libquerytele.so.1.0.0
|
||||||
|
|
||||||
%files storage-engine
|
%files storage-engine
|
||||||
/usr/local/Calpont/lib/libcalmysql.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libcalmysql.so.1.0.0
|
||||||
/usr/local/Calpont/lib/libudf_mysql.so.1.0.0
|
/usr/local/MariaDB/Columnstore/lib/libudf_mysql.so.1.0.0
|
||||||
|
|
||||||
/usr/local/Calpont/mysql/mysql-Calpont
|
/usr/local/MariaDB/Columnstore/mysql/mysql-Calpont
|
||||||
/usr/local/Calpont/mysql/install_calpont_mysql.sh
|
/usr/local/MariaDB/Columnstore/mysql/install_calpont_mysql.sh
|
||||||
/usr/local/Calpont/mysql/syscatalog_mysql.sql
|
/usr/local/MariaDB/Columnstore/mysql/syscatalog_mysql.sql
|
||||||
/usr/local/Calpont/mysql/dumpcat_mysql.sql
|
/usr/local/MariaDB/Columnstore/mysql/dumpcat_mysql.sql
|
||||||
/usr/local/Calpont/mysql/dumpcat.pl
|
/usr/local/MariaDB/Columnstore/mysql/dumpcat.pl
|
||||||
/usr/local/Calpont/mysql/calsetuserpriority.sql
|
/usr/local/MariaDB/Columnstore/mysql/calsetuserpriority.sql
|
||||||
/usr/local/Calpont/mysql/calremoveuserpriority.sql
|
/usr/local/MariaDB/Columnstore/mysql/calremoveuserpriority.sql
|
||||||
/usr/local/Calpont/mysql/calshowprocesslist.sql
|
/usr/local/MariaDB/Columnstore/mysql/calshowprocesslist.sql
|
||||||
|
|
||||||
%config /usr/local/Calpont/mysql/my.cnf
|
%config /usr/local/MariaDB/Columnstore/mysql/my.cnf
|
||||||
|
|
||||||
#
|
#
|
||||||
# Scriptlets
|
# Scriptlets
|
||||||
@ -376,7 +376,7 @@ fi
|
|||||||
|
|
||||||
prefix=/usr/local
|
prefix=/usr/local
|
||||||
|
|
||||||
test -x /usr/local/Calpont/bin/post-install && /usr/local/Calpont/bin/post-install --prefix=$prefix --rpmmode=$rpmmode
|
test -x /usr/local/MariaDB/Columnstore/bin/post-install && /usr/local/MariaDB/Columnstore/bin/post-install --prefix=$prefix --rpmmode=$rpmmode
|
||||||
|
|
||||||
echo "InfinIDB RPM install completed"
|
echo "InfinIDB RPM install completed"
|
||||||
|
|
||||||
@ -428,7 +428,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $rpmmode = erase ]; then
|
if [ $rpmmode = erase ]; then
|
||||||
test -x /usr/local/Calpont/bin/pre-uninstall && /usr/local/Calpont/bin/pre-uninstall
|
test -x /usr/local/MariaDB/Columnstore/bin/pre-uninstall && /usr/local/MariaDB/Columnstore/bin/pre-uninstall
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
version=5.0
|
version=10.0
|
||||||
release=0
|
release=1
|
||||||
|
|
||||||
|
5
build/releasenum~
Normal file
5
build/releasenum~
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#
|
||||||
|
|
||||||
|
version=5.0
|
||||||
|
release=0
|
||||||
|
|
@ -148,7 +148,7 @@ public:
|
|||||||
void destroySemaphores()
|
void destroySemaphores()
|
||||||
{
|
{
|
||||||
key_t semkey;
|
key_t semkey;
|
||||||
char* semseed = "/usr/local/Calpont/etc/Calpont.xml";
|
char* semseed = "/usr/local/MariaDB/Columnstore/etc/Calpont.xml";
|
||||||
int sems, err;
|
int sems, err;
|
||||||
|
|
||||||
// semkey = ftok(semseed, 0x2149bdd2); // these things must match in the SM constructor
|
// semkey = ftok(semseed, 0x2149bdd2); // these things must match in the SM constructor
|
||||||
@ -166,7 +166,7 @@ public:
|
|||||||
void destroyShmseg()
|
void destroyShmseg()
|
||||||
{
|
{
|
||||||
key_t shmkey;
|
key_t shmkey;
|
||||||
char* shmseed = "/usr/local/Calpont/etc/Calpont.xml";
|
char* shmseed = "/usr/local/MariaDB/Columnstore/etc/Calpont.xml";
|
||||||
int shms, err;
|
int shms, err;
|
||||||
|
|
||||||
// shmkey = ftok(shmseed, 0x2149bdd2); // these things much match in the SM constructor
|
// shmkey = ftok(shmseed, 0x2149bdd2); // these things much match in the SM constructor
|
||||||
|
@ -1082,7 +1082,7 @@ public:
|
|||||||
int oid, oidBase;
|
int oid, oidBase;
|
||||||
|
|
||||||
// fake out the objmgr...
|
// fake out the objmgr...
|
||||||
setenv("CALPONT_CONFIG_FILE", "/usr/local/Calpont/etc/Calpont.xml", 1);
|
setenv("CALPONT_CONFIG_FILE", "/usr/local/MariaDB/Columnstore/etc/Calpont.xml", 1);
|
||||||
Config* cf = Config::makeConfig();
|
Config* cf = Config::makeConfig();
|
||||||
cf->setConfig("OIDManager", "OIDBitmapFile", "./oidbitmap");
|
cf->setConfig("OIDManager", "OIDBitmapFile", "./oidbitmap");
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ const uint32_t MAX_SIZE = 0x100000;
|
|||||||
const uint32_t MAX_ELEMENTS = 0x20000;
|
const uint32_t MAX_ELEMENTS = 0x20000;
|
||||||
const uint32_t NUM_THREADS = 4;
|
const uint32_t NUM_THREADS = 4;
|
||||||
const string datapath="/home/zzhu/genii/tools/dbbuilder/lineitem.tbl";
|
const string datapath="/home/zzhu/genii/tools/dbbuilder/lineitem.tbl";
|
||||||
//const string datapath="/usr/local/Calpont/bin/lineitem.tbl";
|
//const string datapath="/usr/local/MariaDB/Columnstore/bin/lineitem.tbl";
|
||||||
int numConsumers = 1;
|
int numConsumers = 1;
|
||||||
int numRuns = 1;
|
int numRuns = 1;
|
||||||
int printInterval = numRuns * 100000;
|
int printInterval = numRuns * 100000;
|
||||||
|
@ -4,14 +4,14 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
prefix=/usr/local
|
prefix=/usr/local
|
||||||
installdir=$prefix/Calpont
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
rpmmode=install
|
rpmmode=install
|
||||||
pwprompt=" "
|
pwprompt=" "
|
||||||
|
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
|
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
|
||||||
prefix="`echo $arg | awk -F= '{print $2}'`"
|
prefix="`echo $arg | awk -F= '{print $2}'`"
|
||||||
installdir=$prefix/Calpont
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
elif [ `expr -- "$arg" : '--rpmmode='` -eq 10 ]; then
|
elif [ `expr -- "$arg" : '--rpmmode='` -eq 10 ]; then
|
||||||
rpmmode="`echo $arg | awk -F= '{print $2}'`"
|
rpmmode="`echo $arg | awk -F= '{print $2}'`"
|
||||||
elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then
|
elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then
|
||||||
|
@ -21,7 +21,7 @@ CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2
|
|||||||
CXXFLAGS+=$(DEBUG_FLAGS) -Wall
|
CXXFLAGS+=$(DEBUG_FLAGS) -Wall
|
||||||
|
|
||||||
# Linker flags
|
# Linker flags
|
||||||
LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_WRITE_LIBS) $(IDB_COMMON_LIBS) -lthreadpool $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib
|
LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_WRITE_LIBS) $(IDB_COMMON_LIBS) -lthreadpool $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib
|
||||||
|
|
||||||
# install dir (set CALPONT_INSTALL_ROOT in env to override)
|
# install dir (set CALPONT_INSTALL_ROOT in env to override)
|
||||||
CALPONT_INSTALL_ROOT?=$(EXPORT_ROOT)
|
CALPONT_INSTALL_ROOT?=$(EXPORT_ROOT)
|
||||||
|
@ -23,7 +23,7 @@ CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2
|
|||||||
CXXFLAGS+=$(DEBUG_FLAGS) -Wall
|
CXXFLAGS+=$(DEBUG_FLAGS) -Wall
|
||||||
|
|
||||||
# Linker flags
|
# Linker flags
|
||||||
LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) -lboost_idb -Wl,--rpath -Wl,/usr/local/Calpont/lib -lrt
|
LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) -lboost_idb -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib -lrt
|
||||||
|
|
||||||
.PHONY: install clean test docs coverage leakcheck
|
.PHONY: install clean test docs coverage leakcheck
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2
|
|||||||
CXXFLAGS+=$(DEBUG_FLAGS) -Wall
|
CXXFLAGS+=$(DEBUG_FLAGS) -Wall
|
||||||
|
|
||||||
# Linker flags
|
# Linker flags
|
||||||
LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_WRITE_LIBS) $(IDB_COMMON_LIBS) -lthreadpool -lddlcleanuputil -lbatchloader $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib
|
LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_WRITE_LIBS) $(IDB_COMMON_LIBS) -lthreadpool -lddlcleanuputil -lbatchloader $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib
|
||||||
|
|
||||||
# install dir (set CALPONT_INSTALL_ROOT in env to override)
|
# install dir (set CALPONT_INSTALL_ROOT in env to override)
|
||||||
CALPONT_INSTALL_ROOT?=$(EXPORT_ROOT)
|
CALPONT_INSTALL_ROOT?=$(EXPORT_ROOT)
|
||||||
|
@ -23,7 +23,7 @@ CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2
|
|||||||
CXXFLAGS+=$(DEBUG_FLAGS) -Wall
|
CXXFLAGS+=$(DEBUG_FLAGS) -Wall
|
||||||
|
|
||||||
# Linker flags
|
# Linker flags
|
||||||
LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) -lcacheutils -lthreadpool $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib
|
LDFLAGS+=-L$(CALPONT_LIBRARY_PATH) $(IDB_COMMON_LIBS) -lcacheutils -lthreadpool $(IDB_SNMP_LIBS) -Wl,--rpath -Wl,/usr/local/MariaDB/Columnstore/lib
|
||||||
|
|
||||||
.PHONY: install clean test docs FORCE coverage leakcheck
|
.PHONY: install clean test docs FORCE coverage leakcheck
|
||||||
|
|
||||||
|
330
export/bin/binary_installer.sh
Executable file
330
export/bin/binary_installer.sh
Executable file
@ -0,0 +1,330 @@
|
|||||||
|
#!/usr/bin/expect
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
# Install RPM and custom OS files on system
|
||||||
|
# Argument 1 - Remote Module Name
|
||||||
|
# Argument 2 - Remote Server Host Name or IP address
|
||||||
|
# Argument 3 - User Password of remote server
|
||||||
|
# Argument 4 - Package name being installed
|
||||||
|
# Argument 5 - Module type?
|
||||||
|
# Argument 6 - Install Type, "initial" or "upgrade"
|
||||||
|
# Argument 7 - Server type?
|
||||||
|
# Argument 8 - Debug flag 1 for on, 0 for off
|
||||||
|
# Argument 9 - install dir (optional)
|
||||||
|
# Argument 10 - user name (optional)
|
||||||
|
set USERNAME root
|
||||||
|
set MODULE [lindex $argv 0]
|
||||||
|
set SERVER [lindex $argv 1]
|
||||||
|
set PASSWORD [lindex $argv 2]
|
||||||
|
set CALPONTPKG [lindex $argv 3]
|
||||||
|
set MODULETYPE [lindex $argv 4]
|
||||||
|
set INSTALLTYPE [lindex $argv 5]
|
||||||
|
set PKGTYPE "binary"
|
||||||
|
set SERVERTYPE [lindex $argv 6]
|
||||||
|
set MYSQLPORT [lindex $argv 7]
|
||||||
|
set DEBUG [lindex $argv 8]
|
||||||
|
set INSTALLDIR "/usr/local/MariaDB/Columnstore"
|
||||||
|
set IDIR [lindex $argv 9]
|
||||||
|
if { $IDIR != "" } {
|
||||||
|
set INSTALLDIR $IDIR
|
||||||
|
}
|
||||||
|
set env(INFINIDB_INSTALL_DIR) $INSTALLDIR
|
||||||
|
set PREFIX [file dirname $INSTALLDIR]
|
||||||
|
set USERNAME $env(USER)
|
||||||
|
set UNM [lindex $argv 10]
|
||||||
|
if { $UNM != "" } {
|
||||||
|
set USERNAME $UNM
|
||||||
|
}
|
||||||
|
|
||||||
|
set BASH "/bin/bash "
|
||||||
|
if { $DEBUG == "1" } {
|
||||||
|
set BASH "/bin/bash -x "
|
||||||
|
}
|
||||||
|
|
||||||
|
log_user $DEBUG
|
||||||
|
spawn -noecho /bin/bash
|
||||||
|
#
|
||||||
|
|
||||||
|
if { $INSTALLTYPE == "initial" || $INSTALLTYPE == "uninstall" } {
|
||||||
|
#
|
||||||
|
# remove Calpont files
|
||||||
|
#
|
||||||
|
send_user "Uninstall Calpont Package "
|
||||||
|
send " \n"
|
||||||
|
send date\n
|
||||||
|
send "ssh $USERNAME@$SERVER 'rm -f /etc/init.d/infinidb /etc/init.d/mysql-Calpont $INSTALLDIR/releasenum >/dev/null 2>&1'\n"
|
||||||
|
set timeout 20
|
||||||
|
expect {
|
||||||
|
"Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit 1}
|
||||||
|
"service not known" { send_user "FAILED: Invalid Host\n" ; exit 1}
|
||||||
|
"authenticity" { send "yes\n"
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
|
||||||
|
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
|
||||||
|
"Calpont uninstall completed" { send_user "DONE" }
|
||||||
|
}
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
"Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
|
||||||
|
"Calpont uninstall completed" { send_user "DONE" }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
}
|
||||||
|
if { $INSTALLTYPE == "uninstall" } {
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
sleep 10
|
||||||
|
#
|
||||||
|
# send the Calpont package
|
||||||
|
#
|
||||||
|
send_user "Copy New Calpont Package to Module "
|
||||||
|
send " \n"
|
||||||
|
send date\n
|
||||||
|
send "scp $CALPONTPKG $USERNAME@$SERVER:$CALPONTPKG\n"
|
||||||
|
set timeout 10
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
set timeout 120
|
||||||
|
expect {
|
||||||
|
"100%" { send_user "DONE" }
|
||||||
|
"scp:" { send_user "ERROR\n" ;
|
||||||
|
send_user "\n*** Installation ERROR\n" ;
|
||||||
|
exit 1 }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
|
||||||
|
"No such file or directory" { send_user "ERROR: Invalid package\n" ; exit 1 }
|
||||||
|
"Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
|
||||||
|
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
|
||||||
|
timeout { send_user "ERROR: Timeout\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
#sleep to make sure it's finished
|
||||||
|
sleep 5
|
||||||
|
#
|
||||||
|
# install package
|
||||||
|
#
|
||||||
|
send_user "Install Calpont Package on Module "
|
||||||
|
send " \n"
|
||||||
|
send date\n
|
||||||
|
send "ssh $USERNAME@$SERVER 'tar -C $PREFIX --exclude db -zxf $CALPONTPKG;cat $INSTALLDIR/releasenum'\n"
|
||||||
|
set timeout 10
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
set timeout 120
|
||||||
|
expect {
|
||||||
|
"release=" { send_user "DONE" }
|
||||||
|
"No such file" { send_user "ERROR: Binary Install Failed, binary/releasenum not found\n" ; exit 1 }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
|
||||||
|
"Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
|
||||||
|
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
|
||||||
|
timeout { send_user "ERROR: Timeout\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
#sleep to give time for cat Calpont/releasenum to complete
|
||||||
|
sleep 5
|
||||||
|
|
||||||
|
send_user "\n"
|
||||||
|
send_user "Run post-install script "
|
||||||
|
send " \n"
|
||||||
|
send date\n
|
||||||
|
send "ssh $USERNAME@$SERVER '$INSTALLDIR/bin/post-install --installdir=$INSTALLDIR'\n"
|
||||||
|
set timeout 10
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
set timeout 60
|
||||||
|
# check return
|
||||||
|
expect {
|
||||||
|
"InfiniDB syslog logging not working" { send_user "ERROR: InfiniDB System logging not setup\n" ; exit 1 }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
|
||||||
|
"Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
|
||||||
|
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
|
||||||
|
"postConfigure" { send_user "DONE" }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
sleep 10
|
||||||
|
#
|
||||||
|
if { $INSTALLTYPE == "initial"} {
|
||||||
|
#
|
||||||
|
# copy over calpont config file
|
||||||
|
#
|
||||||
|
send_user "Copy Calpont Config file to Module "
|
||||||
|
send " \n"
|
||||||
|
send date\n
|
||||||
|
send "scp $INSTALLDIR/etc/* $USERNAME@$SERVER:$INSTALLDIR/etc\n"
|
||||||
|
set timeout 10
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { send_user "DONE" }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
|
||||||
|
"Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
|
||||||
|
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
#
|
||||||
|
# copy over custom OS tmp files
|
||||||
|
#
|
||||||
|
send_user "Copy Custom OS files to Module "
|
||||||
|
send " \n"
|
||||||
|
send date\n
|
||||||
|
send "scp -r $INSTALLDIR/local/etc $USERNAME@$SERVER:$INSTALLDIR/local\n"
|
||||||
|
set timeout 10
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
set timeout 60
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { send_user "DONE" }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
|
||||||
|
"Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
|
||||||
|
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
#
|
||||||
|
# copy over calpont OS files
|
||||||
|
#
|
||||||
|
send_user "Copy Calpont OS files to Module "
|
||||||
|
send " \n"
|
||||||
|
send date\n
|
||||||
|
send "scp $INSTALLDIR/local/etc/$MODULE/* $USERNAME@$SERVER:$INSTALLDIR/local\n"
|
||||||
|
set timeout 10
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
"Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
|
||||||
|
}
|
||||||
|
set timeout 60
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { send_user "DONE" }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
|
||||||
|
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
#
|
||||||
|
# Start module installer to setup Customer OS files
|
||||||
|
#
|
||||||
|
send_user "Run Module Installer "
|
||||||
|
send " \n"
|
||||||
|
send date\n
|
||||||
|
send "ssh $USERNAME@$SERVER '$INSTALLDIR/bin/module_installer.sh --module=$MODULETYPE --port=$MYSQLPORT --installdir=$INSTALLDIR $MODULETYPE'\n"
|
||||||
|
set timeout 10
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
set timeout 60
|
||||||
|
expect {
|
||||||
|
"!!!Module" { send_user "DONE" }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
|
||||||
|
"FAILED" { send_user "ERROR: missing module file\n" ; exit 1 }
|
||||||
|
"Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
|
||||||
|
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
|
||||||
|
"No such file" { send_user "ERROR: File Not Found\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
sleep 10
|
||||||
|
if { $MODULETYPE == "um" || $SERVERTYPE == "2" || $SERVERTYPE == "pmwithum" } {
|
||||||
|
#
|
||||||
|
# run mysql setup scripts
|
||||||
|
#
|
||||||
|
send_user "Run MySQL Setup Scripts on Module "
|
||||||
|
send " \n"
|
||||||
|
send date\n
|
||||||
|
send "ssh $USERNAME@$SERVER '$INSTALLDIR/bin/post-mysqld-install --installdir=$INSTALLDIR'\n"
|
||||||
|
set timeout 10
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
set timeout 60
|
||||||
|
expect {
|
||||||
|
"ERROR" { send_user "ERROR: Daemon failed to run";
|
||||||
|
exit 1 }
|
||||||
|
"FAILED" { send_user "ERROR: Daemon failed to run";
|
||||||
|
exit 1 }
|
||||||
|
"Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
|
||||||
|
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
|
||||||
|
send " \n"
|
||||||
|
send date\n
|
||||||
|
send "ssh $USERNAME@$SERVER '$INSTALLDIR/bin/post-mysql-install --installdir=$INSTALLDIR'\n"
|
||||||
|
set timeout 10
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
set timeout 60
|
||||||
|
expect {
|
||||||
|
"Shutting down mysql." { send_user "DONE" }
|
||||||
|
timeout { send_user "DONE" }
|
||||||
|
"ERROR" { send_user "ERROR: Daemon failed to run";
|
||||||
|
exit 1 }
|
||||||
|
"FAILED" { send_user "ERROR: Daemon failed to run";
|
||||||
|
exit 1 }
|
||||||
|
"Read-only file system" { send_user "ERROR: local disk - Read-only file system\n" ; exit 1}
|
||||||
|
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# check InfiniDB syslog functionality
|
||||||
|
#
|
||||||
|
send_user "Check InfiniDB system logging functionality "
|
||||||
|
send " \n"
|
||||||
|
send date\n
|
||||||
|
send "ssh $USERNAME@$SERVER '$INSTALLDIR/bin/syslogSetup.sh check'\n"
|
||||||
|
set timeout 10
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
"Logging working" { send_user "DONE" }
|
||||||
|
timeout { send_user "DONE" }
|
||||||
|
"not working" { send_user "WARNING: InfiniDB system logging functionality not working" }
|
||||||
|
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
|
||||||
|
send_user "\nInstallation Successfully Completed on '$MODULE'\n"
|
||||||
|
exit 0
|
||||||
|
|
184
export/bin/columnstore
Executable file
184
export/bin/columnstore
Executable file
@ -0,0 +1,184 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# $Id: columnstore 3704 2013-08-07 03:33:20Z bwilkinson $
|
||||||
|
#
|
||||||
|
# columnstore Starts MariaDB Columnstore database platform
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# chkconfig: 2345 99 99
|
||||||
|
# description: MariaDB Columnstore is a database platform that utilizes Mysql
|
||||||
|
#
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: columnstore
|
||||||
|
# Required-Start: $local_fs $remote_fs $network $syslog $all
|
||||||
|
# Required-Stop: $local_fs $remote_fs $network $syslog
|
||||||
|
# Default-Start: 2 3 4 5
|
||||||
|
# Default-Stop: 0 1 6
|
||||||
|
# Short-Description: Start/stop InfiniDB DW DBMS
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
# Source function library.
|
||||||
|
if [ -f /etc/init.d/functions ]; then
|
||||||
|
. /etc/init.d/functions
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$INFINIDB_INSTALL_DIR" ]; then
|
||||||
|
test -f /etc/default/columnstore && . /etc/default/columnstore
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$INFINIDB_INSTALL_DIR" ]; then
|
||||||
|
INFINIDB_INSTALL_DIR=/usr/local/MariaDB/Columnstore
|
||||||
|
fi
|
||||||
|
|
||||||
|
export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR
|
||||||
|
|
||||||
|
InstallDir=$INFINIDB_INSTALL_DIR
|
||||||
|
|
||||||
|
if [ $InstallDir != "/usr/local/Calpont" ]; then
|
||||||
|
export PATH=$InstallDir/bin:$InstallDir/mysql/bin:/bin:/usr/bin
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$InstallDir/lib:$InstallDir/mysql/lib/mysql
|
||||||
|
fi
|
||||||
|
|
||||||
|
#hadoop
|
||||||
|
plugin=`$INFINIDB_INSTALL_DIR/bin/getConfig SystemConfig DataFilePlugin`
|
||||||
|
if [ -n "$plugin" ]; then
|
||||||
|
setenv=`$InstallDir/bin/getConfig SystemConfig DataFileEnvFile`
|
||||||
|
. $InstallDir/bin/$setenv >/dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -e $InstallDir/lib/libjemalloc.so ]; then
|
||||||
|
export LD_PRELOAD=$InstallDir/lib/libjemalloc.so
|
||||||
|
elif [ -e $InstallDir/lib/libjemalloc.so.1 ]; then
|
||||||
|
export LD_PRELOAD=$InstallDir/lib/libjemalloc.so.1
|
||||||
|
fi
|
||||||
|
|
||||||
|
test -f $InstallDir/post/functions && . $InstallDir/post/functions
|
||||||
|
|
||||||
|
mt=`module_type`
|
||||||
|
mid=`module_id`
|
||||||
|
|
||||||
|
has_um=`$InstallDir/bin/getConfig SystemModuleConfig ModuleCount2`
|
||||||
|
if [ "x$has_um" = x ]; then
|
||||||
|
has_um=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
user=$USER
|
||||||
|
if [ -z "$user" ]; then
|
||||||
|
user=root
|
||||||
|
fi
|
||||||
|
|
||||||
|
checkInstallSetup() {
|
||||||
|
InitialInstallFlag=`$InstallDir/bin/getConfig -c $InstallDir/etc/Calpont.xml Installation InitialInstallFlag`
|
||||||
|
if [ $InitialInstallFlag != "y" ]; then
|
||||||
|
echo "Please run the postConfigure install script, check the Installation Guide"
|
||||||
|
echo "for additional details"
|
||||||
|
rm -f /var/lock/subsys/columnstore
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
[ -f $InstallDir/bin/ProcMon ] || exit 0
|
||||||
|
|
||||||
|
start() {
|
||||||
|
if [ -f /var/lock/subsys/columnstore ]; then
|
||||||
|
echo "MariaDB Columnstore Database Platform already running"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
(mkdir -p /var/lock/subsys && touch /var/lock/subsys/columnstore) >/dev/null 2>&1
|
||||||
|
|
||||||
|
if [ -x $InstallDir/bin/columnstore.pre-start ]; then
|
||||||
|
$InstallDir/bin/columnstore.pre-start
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Error running MariaDB Columnstore pre-start script, not starting MariaDB Columnstore"
|
||||||
|
rm -f /var/lock/subsys/columnstore
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
checkInstallSetup
|
||||||
|
|
||||||
|
CoreFileFlag=`$InstallDir/bin/getConfig -c $InstallDir/etc/Calpont.xml Installation CoreFileFlag`
|
||||||
|
if [ $CoreFileFlag = "y" ]; then
|
||||||
|
SUDO=
|
||||||
|
if [ "$user" != "root" ]; then
|
||||||
|
SUDO="sudo"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#columnstore core files
|
||||||
|
$SUDO ulimit -c unlimited > /dev/null 2>&1
|
||||||
|
$SUDO sysctl -q -w kernel.core_uses_pid=1 > /dev/null 2>&1
|
||||||
|
$SUDO sysctl -q -w kernel.core_pattern=/var/log/Calpont/corefiles/core.%e.%p > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
RETVAL=0
|
||||||
|
echo "Starting MariaDB Columnstore Database Platform"
|
||||||
|
rm -f /tmp/StopCalpont
|
||||||
|
exec $InstallDir/bin/run.sh $InstallDir/bin/ProcMon > /dev/null 2>&1 &
|
||||||
|
|
||||||
|
return $RETVAL
|
||||||
|
}
|
||||||
|
stop() {
|
||||||
|
echo "Shutting down MariaDB Columnstore Database Platform"
|
||||||
|
touch /tmp/StopCalpont
|
||||||
|
pkill -9 ProcMon
|
||||||
|
pkill -9 ProcMgr
|
||||||
|
pkill -9 snmptrapd
|
||||||
|
sleep 1
|
||||||
|
$InstallDir/bin/clearShm
|
||||||
|
RETVAL=$?
|
||||||
|
rm -f /var/lock/subsys/columnstore
|
||||||
|
fuser -k 8604/tcp > /dev/null 2>&1
|
||||||
|
test -f $InstallDir/mysql/mysql-Calpont || return $RETVAL
|
||||||
|
$InstallDir/mysql/mysql-Calpont stop > /dev/null 2>&1
|
||||||
|
if [ -x $InstallDir/bin/columnstore.post-stop ]; then
|
||||||
|
$InstallDir/bin/columnstore.post-stop
|
||||||
|
fi
|
||||||
|
return $RETVAL
|
||||||
|
}
|
||||||
|
restart() {
|
||||||
|
stop
|
||||||
|
start
|
||||||
|
}
|
||||||
|
status() {
|
||||||
|
isrunning=0
|
||||||
|
if [ $EUID -eq 0 ]; then
|
||||||
|
if [ -f /var/lock/subsys/columnstore ]; then
|
||||||
|
isrunning=1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
pgrep ProcMon >/dev/null 2>&1
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
isrunning=1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ $isrunning -ne 0 ]; then
|
||||||
|
echo "MariaDB Columnstore is running"
|
||||||
|
else
|
||||||
|
echo "MariaDB Columnstore is not running"
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
start
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
stop
|
||||||
|
;;
|
||||||
|
restart)
|
||||||
|
restart
|
||||||
|
;;
|
||||||
|
condrestart)
|
||||||
|
[ -f /var/lock/subsys/columnstore ] && restart || :
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
status
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit $?
|
||||||
|
|
2
export/bin/columnstore.conf
Executable file
2
export/bin/columnstore.conf
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
/usr/local/Calpont/lib
|
||||||
|
|
9
export/bin/columnstore.def
Executable file
9
export/bin/columnstore.def
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Copy this file to /etc/default and rename it to 'infinidb'.
|
||||||
|
|
||||||
|
# Change this line to your InfiniDB installation directory
|
||||||
|
INFINIDB_INSTALL_DIR=/usr/local/Calpont
|
||||||
|
|
||||||
|
LD_LIBRARY_PATH=$INFINIDB_INSTALL_DIR/lib:$INFINIDB_INSTALL_DIR/mysql/lib/mysql
|
||||||
|
export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
|
13
export/bin/columnstoreAlias
Executable file
13
export/bin/columnstoreAlias
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
# InfiniDB Alias Commands
|
||||||
|
#
|
||||||
|
alias mcsmysql='/usr/local/Calpont/mysql/bin/mysql --defaults-file=/usr/local/Calpont/mysql/my.cnf -u root'
|
||||||
|
alias ma=/usr/local/Calpont/bin/mcsadmin
|
||||||
|
alias mcsadmin=/usr/local/Calpont/bin/mcsadmin
|
||||||
|
alias home='cd /usr/local/Calpont/'
|
||||||
|
alias log='cd /var/log/Calpont/'
|
||||||
|
alias core='cd /var/log/Calpont/corefiles'
|
||||||
|
alias tmsg='tail -f /var/log/messages'
|
||||||
|
alias tdebug='tail -f /var/log/Calpont/debug.log'
|
||||||
|
alias tinfo='tail -f /var/log/Calpont/info.log'
|
||||||
|
alias dbrm='cd /usr/local/Calpont/data1/systemFiles/dbrm'
|
||||||
|
alias module='cat /usr/local/Calpont/local/module'
|
35
export/bin/columnstoreLogRotate
Executable file
35
export/bin/columnstoreLogRotate
Executable file
@ -0,0 +1,35 @@
|
|||||||
|
#
|
||||||
|
# Calpont Log Rotate file that gets installed in /etc/logrotate.d
|
||||||
|
# as part of the RPM installation
|
||||||
|
#
|
||||||
|
|
||||||
|
/var/log/Calpont/*.log {
|
||||||
|
missingok
|
||||||
|
rotate 7
|
||||||
|
daily
|
||||||
|
dateext
|
||||||
|
copytruncate
|
||||||
|
olddir /var/log/Calpont/archive
|
||||||
|
}
|
||||||
|
/var/log/Calpont/*.log1 {
|
||||||
|
missingok
|
||||||
|
rotate 7
|
||||||
|
daily
|
||||||
|
nocreate
|
||||||
|
compress
|
||||||
|
olddir /var/log/Calpont/archive
|
||||||
|
}
|
||||||
|
/usr/local/Calpont/etc/Calpont.xml {
|
||||||
|
daily
|
||||||
|
dateext
|
||||||
|
copy
|
||||||
|
olddir /usr/local/Calpont/etc/
|
||||||
|
}
|
||||||
|
/usr/local/Calpont/mysql/db/*.err {
|
||||||
|
missingok
|
||||||
|
rotate 7
|
||||||
|
daily
|
||||||
|
dateext
|
||||||
|
copytruncate
|
||||||
|
olddir /usr/local/Calpont/mysql/db
|
||||||
|
}
|
7
export/bin/columnstoreSyslog
Executable file
7
export/bin/columnstoreSyslog
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
# Calpont Database Platform Logging
|
||||||
|
local1.=crit -/var/log/Calpont/crit.log
|
||||||
|
local1.=err -/var/log/Calpont/err.log
|
||||||
|
local1.=warning -/var/log/Calpont/warning.log
|
||||||
|
local1.=info -/var/log/Calpont/info.log
|
||||||
|
local1.=debug -/var/log/Calpont/debug.log
|
||||||
|
local2.=crit -/var/log/Calpont/data/data_mods.log
|
78
export/bin/columnstoreSyslog-ng
Executable file
78
export/bin/columnstoreSyslog-ng
Executable file
@ -0,0 +1,78 @@
|
|||||||
|
# Calpont Database Platform Logging
|
||||||
|
|
||||||
|
source s_infinidb {
|
||||||
|
# message generated by Syslog-NG
|
||||||
|
internal();
|
||||||
|
# standard Linux log source (this is the default place for the syslog()
|
||||||
|
# function to send logs to)
|
||||||
|
unix-stream("/dev/log");
|
||||||
|
# messages from the kernel
|
||||||
|
file("/proc/kmsg" log_prefix("kernel: "));
|
||||||
|
# use the following line if you want to receive remote UDP logging messages
|
||||||
|
# (this is equivalent to the "-r" syslogd flag)
|
||||||
|
# udp();
|
||||||
|
};
|
||||||
|
|
||||||
|
filter f_local1crit { facility(local1) and level(crit); };
|
||||||
|
filter f_local1err { facility(local1) and level(err); };
|
||||||
|
filter f_local1warning { facility(local1) and level(warning); };
|
||||||
|
filter f_local1info { facility(local1) and level(info); };
|
||||||
|
filter f_local1debug { facility(local1) and level(debug); };
|
||||||
|
filter f_local2crit { facility(local2) and level(crit); };
|
||||||
|
|
||||||
|
destination d_crit{
|
||||||
|
file("/var/log/Calpont/crit.log");
|
||||||
|
};
|
||||||
|
|
||||||
|
destination d_err{
|
||||||
|
file("/var/log/Calpont/err.log");
|
||||||
|
};
|
||||||
|
|
||||||
|
destination d_warning{
|
||||||
|
file("/var/log/Calpont/warning.log");
|
||||||
|
};
|
||||||
|
|
||||||
|
destination d_info{
|
||||||
|
file("/var/log/Calpont/info.log");
|
||||||
|
};
|
||||||
|
|
||||||
|
destination d_debug{
|
||||||
|
file("/var/log/Calpont/debug.log");
|
||||||
|
};
|
||||||
|
|
||||||
|
destination d_data_mods{
|
||||||
|
file("/var/log/Calpont/data/data_mods.log");
|
||||||
|
};
|
||||||
|
|
||||||
|
log{
|
||||||
|
source(s_infinidb);
|
||||||
|
filter(f_local1crit);
|
||||||
|
destination(d_crit);
|
||||||
|
};
|
||||||
|
|
||||||
|
log{
|
||||||
|
source(s_infinidb);
|
||||||
|
filter(f_local1err);
|
||||||
|
destination(d_err);
|
||||||
|
};
|
||||||
|
log{
|
||||||
|
source(s_infinidb);
|
||||||
|
filter(f_local1warning);
|
||||||
|
destination(d_warning);
|
||||||
|
};
|
||||||
|
log{
|
||||||
|
source(s_infinidb);
|
||||||
|
filter(f_local1info);
|
||||||
|
destination(d_info);
|
||||||
|
};
|
||||||
|
log{
|
||||||
|
source(s_infinidb);
|
||||||
|
filter(f_local1debug);
|
||||||
|
destination(d_debug);
|
||||||
|
};
|
||||||
|
log{
|
||||||
|
source(s_infinidb);
|
||||||
|
filter(f_local2crit);
|
||||||
|
destination(d_data_mods);
|
||||||
|
};
|
||||||
|
|
8
export/bin/columnstoreSyslog7
Executable file
8
export/bin/columnstoreSyslog7
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
# Calpont Database Platform Logging
|
||||||
|
local1.crit -/var/log/Calpont/crit.log
|
||||||
|
local1.err -/var/log/Calpont/err.log
|
||||||
|
local1.warning -/var/log/Calpont/warning.log
|
||||||
|
local1.info -/var/log/Calpont/info.log
|
||||||
|
local1.debug -/var/log/Calpont/debug.log
|
||||||
|
local2.crit -/var/log/Calpont/data/data_mods.log
|
||||||
|
|
118
export/bin/columnstoreUninstall.sh
Executable file
118
export/bin/columnstoreUninstall.sh
Executable file
@ -0,0 +1,118 @@
|
|||||||
|
#!/usr/bin/expect
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
# Uninstall Package from system
|
||||||
|
|
||||||
|
set INFINIDB_INSTALL_DIR "/usr/local/MariaDB/Columnstore"
|
||||||
|
set env(INFINIDB_INSTALL_DIR) $INFINIDB_INSTALL_DIR
|
||||||
|
|
||||||
|
set USERNAME $env(USER)
|
||||||
|
set PASSWORD " "
|
||||||
|
set DEBUG 0
|
||||||
|
|
||||||
|
set INFINIDBRPM1 "infinidb-libs"
|
||||||
|
set INFINIDBRPM2 "infinidb-platform"
|
||||||
|
set INFINIDBRPM3 "infinidb-enterprise"
|
||||||
|
set CONNECTORRPM1 "infinidb-mysql"
|
||||||
|
set CONNECTORRPM2 "infinidb-storage-engine"
|
||||||
|
|
||||||
|
spawn -noecho /bin/bash
|
||||||
|
|
||||||
|
for {set i 0} {$i<[llength $argv]} {incr i} {
|
||||||
|
set arg($i) [lindex $argv $i]
|
||||||
|
}
|
||||||
|
|
||||||
|
set i 0
|
||||||
|
while true {
|
||||||
|
if { $i == [llength $argv] } { break }
|
||||||
|
if { $arg($i) == "-h" } {
|
||||||
|
send_user "\n"
|
||||||
|
send_user "'calpontUninstall.sh' performs a system uninstall of the Calpont InfiniDB Packages.\n"
|
||||||
|
send_user "It will perform a shutdown of the InfiniDB software and the \n"
|
||||||
|
send_user "remove the Packages from all configured servers of the InfiniDB System.\n"
|
||||||
|
send_user "\n"
|
||||||
|
send_user "Usage: calpontUninstall.sh -p 'password' -d\n"
|
||||||
|
send_user " password - root password of the remote servers being un-installed'\n"
|
||||||
|
send_user " -d - Debug flag, output verbose information\n"
|
||||||
|
exit
|
||||||
|
} elseif { $arg($i) == "-p" } {
|
||||||
|
incr i
|
||||||
|
set PASSWORD $arg($i)
|
||||||
|
} elseif { $arg($i) == "-d" } {
|
||||||
|
set DEBUG 1
|
||||||
|
} elseif { $arg($i) == "-i" } {
|
||||||
|
incr i
|
||||||
|
set INSTALLDIR $arg($i)
|
||||||
|
} elseif { $arg($i) == "-u" } {
|
||||||
|
incr i
|
||||||
|
set USERNAME $arg($i)
|
||||||
|
}
|
||||||
|
incr i
|
||||||
|
}
|
||||||
|
|
||||||
|
log_user $DEBUG
|
||||||
|
|
||||||
|
set timeout 2
|
||||||
|
set INSTALL 2
|
||||||
|
send "$INFINIDB_INSTALL_DIR/bin/getConfig DBRM_Controller NumWorkers\n"
|
||||||
|
expect {
|
||||||
|
1 { set INSTALL 1 }
|
||||||
|
}
|
||||||
|
|
||||||
|
set PACKAGE "rpm"
|
||||||
|
send "$INFINIDB_INSTALL_DIR/bin/getConfig Installation EEPackageType\n"
|
||||||
|
expect {
|
||||||
|
rpm { set PACKAGE rpm }
|
||||||
|
deb { set PACKAGE deb }
|
||||||
|
binary { set PACKAGE binary }
|
||||||
|
}
|
||||||
|
|
||||||
|
set timeout 60
|
||||||
|
log_user $DEBUG
|
||||||
|
if { $INSTALL == "2" && $PASSWORD == " "} {puts "please enter the remote server root password, enter ./calpontUninstall.sh -h for additional info"; exit -1}
|
||||||
|
|
||||||
|
send_user "\nPerforming InfiniDB System Uninstall\n\n"
|
||||||
|
|
||||||
|
#
|
||||||
|
# shutdownSystem
|
||||||
|
#
|
||||||
|
send_user "Shutdown InfiniDB System "
|
||||||
|
expect -re {[$#] }
|
||||||
|
send "$INFINIDB_INSTALL_DIR/bin/mcsadmin shutdownsystem y\n"
|
||||||
|
expect {
|
||||||
|
"shutdownSystem " { send_user "DONE" }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
|
||||||
|
|
||||||
|
if { $INSTALL == "2"} {
|
||||||
|
set timeout 600
|
||||||
|
#
|
||||||
|
# Run installer
|
||||||
|
#
|
||||||
|
send_user "Run System Uninstaller "
|
||||||
|
send "$INFINIDB_INSTALL_DIR/bin/installer $INFINIDBRPM1 $INFINIDBRPM2 $INFINIDBRPM3 $CONNECTORRPM1 $CONNECTORRPM2 uninstall $PASSWORD n --nodeps dummymysqlpw $DEBUG\n"
|
||||||
|
expect {
|
||||||
|
"uninstall request successful" { send_user "DONE" }
|
||||||
|
"ERROR" { send_user "FAILED" ; exit -1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
}
|
||||||
|
|
||||||
|
if { $PACKAGE == "binary" } {
|
||||||
|
send "$INFINIDB_INSTALL_DIR/bin/pre-uninstall\n"
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { }
|
||||||
|
}
|
||||||
|
|
||||||
|
send_user "\n"
|
||||||
|
|
||||||
|
send_user "\nCalpont Package System Uninstall Completed\n\n"
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
send_user "\nCalpont Package System Uninstall Completed\n\n"
|
||||||
|
|
||||||
|
exit 0
|
340
export/bin/director_installer.sh
Executable file
340
export/bin/director_installer.sh
Executable file
@ -0,0 +1,340 @@
|
|||||||
|
#!/usr/bin/expect
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
# Install RPM and custom OS files on system
|
||||||
|
# Argument 1 - Remote Module Name
|
||||||
|
# Argument 2 - Remote Server Host Name or IP address
|
||||||
|
# Argument 3 - Root Password of remote server
|
||||||
|
# Argument 4 - Package name being installed
|
||||||
|
# Argument 5 - Install Type, "initial" or "upgrade"
|
||||||
|
# Argument 6 - Debug flag 1 for on, 0 for off
|
||||||
|
set timeout 10
|
||||||
|
set MODULE [lindex $argv 0]
|
||||||
|
set SERVER [lindex $argv 1]
|
||||||
|
set PASSWORD [lindex $argv 2]
|
||||||
|
set CALPONTRPM1 [lindex $argv 3]
|
||||||
|
set CALPONTRPM2 [lindex $argv 4]
|
||||||
|
set CALPONTRPM3 [lindex $argv 5]
|
||||||
|
set CALPONTMYSQLRPM [lindex $argv 6]
|
||||||
|
set CALPONTMYSQLDRPM [lindex $argv 7]
|
||||||
|
set INSTALLTYPE [lindex $argv 8]
|
||||||
|
set DEBUG [lindex $argv 9]
|
||||||
|
set INSTALLDIR "/usr/local/MariaDB/Columnstore"
|
||||||
|
set IDIR [lindex $argv 10]
|
||||||
|
if { $IDIR != "" } {
|
||||||
|
set INSTALLDIR $IDIR
|
||||||
|
}
|
||||||
|
set USERNAME "root"
|
||||||
|
set UNM [lindex $argv 11]
|
||||||
|
if { $UNM != "" } {
|
||||||
|
set USERNAME $UNM
|
||||||
|
}
|
||||||
|
|
||||||
|
log_user $DEBUG
|
||||||
|
spawn -noecho /bin/bash
|
||||||
|
#
|
||||||
|
if { $INSTALLTYPE == "initial" || $INSTALLTYPE == "uninstall" } {
|
||||||
|
#
|
||||||
|
# erase InfiniDB MySQL storage engine package
|
||||||
|
#
|
||||||
|
send_user "Erase InfiniDB MySQL Storage Engine Package on Module "
|
||||||
|
expect -re {[$#] }
|
||||||
|
send "ssh $USERNAME@$SERVER 'rpm -e --nodeps --allmatches calpont-mysql >/dev/null 2>&1; rpm -e --nodeps --allmatches infinidb-storage-engine'\n"
|
||||||
|
expect {
|
||||||
|
"Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit }
|
||||||
|
"service not known" { send_user "FAILED: Invalid Host\n" ; exit }
|
||||||
|
"authenticity" { send "yes\n"
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 }
|
||||||
|
}
|
||||||
|
# password for ssh
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { send_user "DONE" }
|
||||||
|
"uninstall completed" { send_user "DONE" }
|
||||||
|
"error: Failed dependencies" { send_user "ERROR: Failed dependencies\n" ; exit -1 }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 }
|
||||||
|
"not installed" { send_user "INFO: Package not installed" }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
#
|
||||||
|
# erase InfiniDB MySQL package
|
||||||
|
#
|
||||||
|
send_user "Erase InfiniDB MySQL Package on Module "
|
||||||
|
expect -re {[$#] }
|
||||||
|
send "ssh $USERNAME@$SERVER 'rpm -e --nodeps --allmatches calpont-mysqld >/dev/null 2>&1; rpm -e --nodeps --allmatches infinidb-mysql'\n"
|
||||||
|
expect "word: "
|
||||||
|
# password for ssh
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { send_user "DONE" }
|
||||||
|
"uninstall completed" { send_user "DONE" }
|
||||||
|
"error: Failed dependencies" { send_user "ERROR: Failed dependencies\n" ; exit -1 }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 }
|
||||||
|
"not installed" { send_user "INFO: Package not installed" }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
#
|
||||||
|
# erase InfiniDB packages
|
||||||
|
#
|
||||||
|
send_user "Erase InfiniDB Packages on Module "
|
||||||
|
expect -re {[$#] }
|
||||||
|
send "ssh $USERNAME@$SERVER 'rpm -e --nodeps --allmatches calpont >/dev/null 2>&1; rpm -e --nodeps --allmatches infinidb-enterprise >/dev/null 2>&1; rpm -e --nodeps --allmatches infinidb-libs infinidb-platform'\n"
|
||||||
|
expect "word: "
|
||||||
|
# password for ssh
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { send_user "DONE" }
|
||||||
|
"uninstall completed" { send_user "DONE" }
|
||||||
|
"error: Failed dependencies" { send_user "ERROR: Failed dependencies\n" ; exit -1 }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 }
|
||||||
|
"not installed" { send_user "INFO: Package not installed" }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
}
|
||||||
|
if { $INSTALLTYPE == "uninstall" } { exit 0 }
|
||||||
|
|
||||||
|
#
|
||||||
|
# send the InfiniDB package
|
||||||
|
#
|
||||||
|
expect -re {[$#] }
|
||||||
|
set timeout 20
|
||||||
|
send_user "Copy New InfiniDB Package to Module "
|
||||||
|
send "ssh $USERNAME@$SERVER 'rm -f /root/infinidb-*.rpm'\n"
|
||||||
|
expect "word: "
|
||||||
|
# password for ssh
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
# check return
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { }
|
||||||
|
}
|
||||||
|
send "scp $CALPONTRPM1 $CALPONTRPM2 $CALPONTRPM3 $USERNAME@$SERVER:.\n"
|
||||||
|
expect "word: "
|
||||||
|
# send the password
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
# check return
|
||||||
|
expect {
|
||||||
|
"100%" { send_user "DONE" }
|
||||||
|
"scp" { send_user "ERROR\n" ;
|
||||||
|
send_user "\n*** Installation ERROR\n" ;
|
||||||
|
exit -1 }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 }
|
||||||
|
"No such file or directory" { send_user "ERROR: Invalid package\n" ; exit -1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
#
|
||||||
|
# send the InfiniDB MySQL sotrage engine package
|
||||||
|
#
|
||||||
|
send_user "Copy New InfiniDB MySQL Storage Engine Package to Module "
|
||||||
|
send "scp $CALPONTMYSQLRPM $USERNAME@$SERVER:$CALPONTMYSQLRPM\n"
|
||||||
|
expect "word: "
|
||||||
|
# send the password
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
# check return
|
||||||
|
expect {
|
||||||
|
"100%" { send_user "DONE" }
|
||||||
|
"scp" { send_user "ERROR\n" ;
|
||||||
|
send_user "\n*** Installation ERROR\n" ;
|
||||||
|
exit -1 }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 }
|
||||||
|
"No such file or directory" { send_user "ERROR: Invalid package\n" ; exit -1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
#
|
||||||
|
# send the InfiniDB MySQL package
|
||||||
|
#
|
||||||
|
send_user "Copy New InfiniDB MySQL Package to Module "
|
||||||
|
send "scp $CALPONTMYSQLDRPM $USERNAME@$SERVER:$CALPONTMYSQLDRPM\n"
|
||||||
|
expect "word: "
|
||||||
|
# send the password
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
# check return
|
||||||
|
expect {
|
||||||
|
"100%" { send_user "DONE" }
|
||||||
|
"scp" { send_user "ERROR\n" ;
|
||||||
|
send_user "\n*** Installation ERROR\n" ;
|
||||||
|
exit -1 }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 }
|
||||||
|
"No such file or directory" { send_user "ERROR: Invalid package\n" ; exit -1 }
|
||||||
|
}
|
||||||
|
#
|
||||||
|
send_user "\n"
|
||||||
|
expect -re {[$#] }
|
||||||
|
set timeout 60
|
||||||
|
if { $INSTALLTYPE == "initial"} {
|
||||||
|
#
|
||||||
|
# install package
|
||||||
|
#
|
||||||
|
send_user "Install InfiniDB Packages on Module "
|
||||||
|
send "ssh $USERNAME@$SERVER 'rpm -ivh $CALPONTRPM1 $CALPONTRPM2 $CALPONTRPM3 $CALPONTMYSQLDRPM $CALPONTMYSQLRPM'\n"
|
||||||
|
expect "word: "
|
||||||
|
# password for ssh
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
# check return
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { send_user "DONE" }
|
||||||
|
"completed" { send_user "DONE" }
|
||||||
|
"error: Failed dependencies" { send_user "ERROR: Failed dependencies\n" ;
|
||||||
|
send_user "\n*** Installation ERROR\n" ;
|
||||||
|
exit -1 }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
expect -re {[$#] }
|
||||||
|
set timeout 10
|
||||||
|
#
|
||||||
|
# install package
|
||||||
|
#
|
||||||
|
send_user "Running InfiniDB MySQL Setup Scripts on Module "
|
||||||
|
send "ssh $USERNAME@$SERVER '$INSTALLDIR/bin/post-mysql-install'\n"
|
||||||
|
expect "word: "
|
||||||
|
# password for ssh
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
# check return
|
||||||
|
expect {
|
||||||
|
"Shutting down MySQL." { send_user "DONE" }
|
||||||
|
timeout { send_user "DONE" }
|
||||||
|
"ERROR" { send_user "ERROR: Daemon failed to run";
|
||||||
|
exit -1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
expect -re {[$#] }
|
||||||
|
#
|
||||||
|
# install package
|
||||||
|
#
|
||||||
|
send_user "Running InfiniDB MySQL Setup Scripts on Module "
|
||||||
|
send "ssh $USERNAME@$SERVER '$INSTALLDIR/bin/post-mysqld-install'\n"
|
||||||
|
expect "word: "
|
||||||
|
# password for ssh
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
# check return
|
||||||
|
expect {
|
||||||
|
"Shutting down MySQL." { send_user "DONE" }
|
||||||
|
timeout { send_user "DONE" }
|
||||||
|
"ERROR" { send_user "ERROR: Daemon failed to run";
|
||||||
|
exit -1 }
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
#
|
||||||
|
# upgrade package
|
||||||
|
#
|
||||||
|
expect -re {[$#] }
|
||||||
|
send_user "Upgrade InfiniDB Packages on Module "
|
||||||
|
send "ssh $USERNAME@$SERVER ' rpm -Uvh --noscripts $CALPONTRPM1 $CALPONTRPM2 $CALPONTRPM3 $CALPONTMYSQLDRPM $CALPONTMYSQLRPM'\n"
|
||||||
|
expect "word: "
|
||||||
|
# password for ssh
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
# check return
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { send_user "DONE" }
|
||||||
|
"completed" { send_user "DONE" }
|
||||||
|
"already installed" { send_user "INFO: Already Installed\n" ; exit -1 }
|
||||||
|
"error: Failed dependencies" { send_user "ERROR: Failed dependencies\n" ;
|
||||||
|
send_user "\n*** Installation ERROR\n" ;
|
||||||
|
exit -1 }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
expect -re {[$#] }
|
||||||
|
set timeout 10
|
||||||
|
#
|
||||||
|
# install package
|
||||||
|
#
|
||||||
|
send_user "Running InfiniDB MySQL Setup Scripts on Module "
|
||||||
|
send "ssh $USERNAME@$SERVER '$INSTALLDIR/bin/post-mysql-install'\n"
|
||||||
|
expect "word: "
|
||||||
|
# password for ssh
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
# check return
|
||||||
|
expect {
|
||||||
|
"Shutting down MySQL." { send_user "DONE" }
|
||||||
|
timeout { send_user "DONE" }
|
||||||
|
"ERROR" { send_user "ERROR: Daemon failed to run";
|
||||||
|
exit -1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
expect -re {[$#] }
|
||||||
|
#
|
||||||
|
# install package
|
||||||
|
#
|
||||||
|
send_user "Running InfiniDB MySQL Setup Scripts on Module "
|
||||||
|
send "ssh $USERNAME@$SERVER '$INSTALLDIR/bin/post-mysqld-install'\n"
|
||||||
|
expect "word: "
|
||||||
|
# password for ssh
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
# check return
|
||||||
|
expect {
|
||||||
|
"Shutting down MySQL." { send_user "DONE" }
|
||||||
|
timeout { send_user "DONE" }
|
||||||
|
"ERROR" { send_user "ERROR: Daemon failed to run";
|
||||||
|
exit -1 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
expect -re {[$#] }
|
||||||
|
set timeout 30
|
||||||
|
#
|
||||||
|
if { $INSTALLTYPE == "initial"} {
|
||||||
|
#
|
||||||
|
# copy over InfiniDB OS files
|
||||||
|
#
|
||||||
|
send_user "Copy InfiniDB OS files to Module "
|
||||||
|
send "scp $INSTALLDIR/local/etc/$MODULE/* $USERNAME@$SERVER:$INSTALLDIR/local/.\n"
|
||||||
|
expect "word: "
|
||||||
|
# send the password
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { send_user "DONE" }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
#
|
||||||
|
# copy over InfiniDB config file
|
||||||
|
#
|
||||||
|
send_user "Copy InfiniDB Config file to Module "
|
||||||
|
send "scp $INSTALLDIR/etc/* $USERNAME@$SERVER:$INSTALLDIR/etc/.\n"
|
||||||
|
expect "word: "
|
||||||
|
# send the password
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { send_user "DONE" }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
#
|
||||||
|
# copy over custom OS tmp files
|
||||||
|
#
|
||||||
|
send_user "Copy Custom OS files to Module "
|
||||||
|
send "scp -r $INSTALLDIR/local/etc $USERNAME@$SERVER:$INSTALLDIR/local/.\n"
|
||||||
|
expect "word: "
|
||||||
|
# send the password
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { send_user "DONE" }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
#
|
||||||
|
# Start module installer to setup Customer OS files
|
||||||
|
#
|
||||||
|
send_user "Run Module Installer "
|
||||||
|
send "ssh $USERNAME@$SERVER '$INSTALLDIR/bin/module_installer.sh'\n"
|
||||||
|
expect "word: "
|
||||||
|
# send the password
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
expect {
|
||||||
|
"!!!Module" { send_user "DONE" }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 }
|
||||||
|
"FAILED" { send_user "ERROR: missing OS file\n" ; exit -1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
}
|
||||||
|
#
|
||||||
|
send_user "\nInstallation Successfully Completed on '$MODULE'\n"
|
||||||
|
exit 0
|
||||||
|
|
74
export/bin/disable-rep-columnstore.sh
Executable file
74
export/bin/disable-rep-columnstore.sh
Executable file
@ -0,0 +1,74 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
# generic InfiniDB Disable Replication script.
|
||||||
|
#
|
||||||
|
# Notes: This script gets run by ProcMon:
|
||||||
|
|
||||||
|
# check log for error
|
||||||
|
checkForError() {
|
||||||
|
grep ERROR /tmp/disable-rep-status.log > /tmp/error.check
|
||||||
|
if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then
|
||||||
|
echo "ERROR: check log file: /tmp/disable-rep-status.log"
|
||||||
|
rm -f /tmp/error.check
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
rm -f /tmp/error.check
|
||||||
|
}
|
||||||
|
|
||||||
|
prefix=/usr/local
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
pwprompt=
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
|
||||||
|
prefix="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then
|
||||||
|
password="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
pwprompt="--password=$password"
|
||||||
|
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
|
||||||
|
installdir="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
prefix=`dirname $installdir`
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
test -f $installdir/post/functions && . $installdir/post/functions
|
||||||
|
|
||||||
|
>/tmp/disable-rep-status.log
|
||||||
|
|
||||||
|
#
|
||||||
|
# Run stop slave command
|
||||||
|
#
|
||||||
|
echo "Run stop slave command" >>/tmp/disable-rep-status.log
|
||||||
|
cat >/tmp/idb_disable-rep.sql <<EOD
|
||||||
|
stop slave;
|
||||||
|
EOD
|
||||||
|
|
||||||
|
cat /tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
|
||||||
|
#
|
||||||
|
# Run reset slave command
|
||||||
|
#
|
||||||
|
echo "Run start slave command" >>/tmp/disable-rep-status.log
|
||||||
|
cat >/tmp/idb_disable-rep.sql <<EOD
|
||||||
|
reset slave;
|
||||||
|
EOD
|
||||||
|
|
||||||
|
cat /tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
|
||||||
|
#alls good, 'OK' for success
|
||||||
|
echo "OK"
|
||||||
|
exit 0
|
74
export/bin/disable-rep-infinidb.sh
Executable file
74
export/bin/disable-rep-infinidb.sh
Executable file
@ -0,0 +1,74 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
# generic InfiniDB Disable Replication script.
|
||||||
|
#
|
||||||
|
# Notes: This script gets run by ProcMon:
|
||||||
|
|
||||||
|
# check log for error
|
||||||
|
checkForError() {
|
||||||
|
grep ERROR /tmp/disable-rep-status.log > /tmp/error.check
|
||||||
|
if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then
|
||||||
|
echo "ERROR: check log file: /tmp/disable-rep-status.log"
|
||||||
|
rm -f /tmp/error.check
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
rm -f /tmp/error.check
|
||||||
|
}
|
||||||
|
|
||||||
|
prefix=/usr/local
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
pwprompt=
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
|
||||||
|
prefix="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then
|
||||||
|
password="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
pwprompt="--password=$password"
|
||||||
|
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
|
||||||
|
installdir="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
prefix=`dirname $installdir`
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
test -f $installdir/post/functions && . $installdir/post/functions
|
||||||
|
|
||||||
|
>/tmp/disable-rep-status.log
|
||||||
|
|
||||||
|
#
|
||||||
|
# Run stop slave command
|
||||||
|
#
|
||||||
|
echo "Run stop slave command" >>/tmp/disable-rep-status.log
|
||||||
|
cat >/tmp/idb_disable-rep.sql <<EOD
|
||||||
|
stop slave;
|
||||||
|
EOD
|
||||||
|
|
||||||
|
cat /tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
|
||||||
|
#
|
||||||
|
# Run reset slave command
|
||||||
|
#
|
||||||
|
echo "Run start slave command" >>/tmp/disable-rep-status.log
|
||||||
|
cat >/tmp/idb_disable-rep.sql <<EOD
|
||||||
|
reset slave;
|
||||||
|
EOD
|
||||||
|
|
||||||
|
cat /tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
|
||||||
|
#alls good, 'OK' for success
|
||||||
|
echo "OK"
|
||||||
|
exit 0
|
184
export/bin/infinidb
Executable file
184
export/bin/infinidb
Executable file
@ -0,0 +1,184 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# $Id: infinidb 3704 2013-08-07 03:33:20Z bwilkinson $
|
||||||
|
#
|
||||||
|
# infinidb Starts Calpont InfiniDB database platform
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# chkconfig: 2345 99 99
|
||||||
|
# description: Calpont InfiniDB is a database platform that utilizes Mysql
|
||||||
|
#
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: infinidb
|
||||||
|
# Required-Start: $local_fs $remote_fs $network $syslog $all
|
||||||
|
# Required-Stop: $local_fs $remote_fs $network $syslog
|
||||||
|
# Default-Start: 2 3 4 5
|
||||||
|
# Default-Stop: 0 1 6
|
||||||
|
# Short-Description: Start/stop InfiniDB DW DBMS
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
# Source function library.
|
||||||
|
if [ -f /etc/init.d/functions ]; then
|
||||||
|
. /etc/init.d/functions
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$INFINIDB_INSTALL_DIR" ]; then
|
||||||
|
test -f /etc/default/infinidb && . /etc/default/infinidb
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$INFINIDB_INSTALL_DIR" ]; then
|
||||||
|
INFINIDB_INSTALL_DIR=/usr/local/Calpont
|
||||||
|
fi
|
||||||
|
|
||||||
|
export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR
|
||||||
|
|
||||||
|
InstallDir=$INFINIDB_INSTALL_DIR
|
||||||
|
|
||||||
|
if [ $InstallDir != "/usr/local/Calpont" ]; then
|
||||||
|
export PATH=$InstallDir/bin:$InstallDir/mysql/bin:/bin:/usr/bin
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$InstallDir/lib:$InstallDir/mysql/lib/mysql
|
||||||
|
fi
|
||||||
|
|
||||||
|
#hadoop
|
||||||
|
plugin=`$INFINIDB_INSTALL_DIR/bin/getConfig SystemConfig DataFilePlugin`
|
||||||
|
if [ -n "$plugin" ]; then
|
||||||
|
setenv=`$InstallDir/bin/getConfig SystemConfig DataFileEnvFile`
|
||||||
|
. $InstallDir/bin/$setenv >/dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -e $InstallDir/lib/libjemalloc.so ]; then
|
||||||
|
export LD_PRELOAD=$InstallDir/lib/libjemalloc.so
|
||||||
|
elif [ -e $InstallDir/lib/libjemalloc.so.1 ]; then
|
||||||
|
export LD_PRELOAD=$InstallDir/lib/libjemalloc.so.1
|
||||||
|
fi
|
||||||
|
|
||||||
|
test -f $InstallDir/post/functions && . $InstallDir/post/functions
|
||||||
|
|
||||||
|
mt=`module_type`
|
||||||
|
mid=`module_id`
|
||||||
|
|
||||||
|
has_um=`$InstallDir/bin/getConfig SystemModuleConfig ModuleCount2`
|
||||||
|
if [ "x$has_um" = x ]; then
|
||||||
|
has_um=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
user=$USER
|
||||||
|
if [ -z "$user" ]; then
|
||||||
|
user=root
|
||||||
|
fi
|
||||||
|
|
||||||
|
checkInstallSetup() {
|
||||||
|
InitialInstallFlag=`$InstallDir/bin/getConfig -c $InstallDir/etc/Calpont.xml Installation InitialInstallFlag`
|
||||||
|
if [ $InitialInstallFlag != "y" ]; then
|
||||||
|
echo "Please run the postConfigure install script, check the Installation Guide"
|
||||||
|
echo "for additional details"
|
||||||
|
rm -f /var/lock/subsys/infinidb
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
[ -f $InstallDir/bin/ProcMon ] || exit 0
|
||||||
|
|
||||||
|
start() {
|
||||||
|
if [ -f /var/lock/subsys/infinidb ]; then
|
||||||
|
echo "InfiniDB Database Platform already running"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
(mkdir -p /var/lock/subsys && touch /var/lock/subsys/infinidb) >/dev/null 2>&1
|
||||||
|
|
||||||
|
if [ -x $InstallDir/bin/infinidb.pre-start ]; then
|
||||||
|
$InstallDir/bin/infinidb.pre-start
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Error running InfiniDB pre-start script, not starting InfiniDB"
|
||||||
|
rm -f /var/lock/subsys/infinidb
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
checkInstallSetup
|
||||||
|
|
||||||
|
CoreFileFlag=`$InstallDir/bin/getConfig -c $InstallDir/etc/Calpont.xml Installation CoreFileFlag`
|
||||||
|
if [ $CoreFileFlag = "y" ]; then
|
||||||
|
SUDO=
|
||||||
|
if [ "$user" != "root" ]; then
|
||||||
|
SUDO="sudo"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#infinidb core files
|
||||||
|
$SUDO ulimit -c unlimited > /dev/null 2>&1
|
||||||
|
$SUDO sysctl -q -w kernel.core_uses_pid=1 > /dev/null 2>&1
|
||||||
|
$SUDO sysctl -q -w kernel.core_pattern=/var/log/Calpont/corefiles/core.%e.%p > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
RETVAL=0
|
||||||
|
echo "Starting InfiniDB Database Platform"
|
||||||
|
rm -f /tmp/StopCalpont
|
||||||
|
exec $InstallDir/bin/run.sh $InstallDir/bin/ProcMon > /dev/null 2>&1 &
|
||||||
|
|
||||||
|
return $RETVAL
|
||||||
|
}
|
||||||
|
stop() {
|
||||||
|
echo "Shutting down InfiniDB Database Platform"
|
||||||
|
touch /tmp/StopCalpont
|
||||||
|
pkill -9 ProcMon
|
||||||
|
pkill -9 ProcMgr
|
||||||
|
pkill -9 snmptrapd
|
||||||
|
sleep 1
|
||||||
|
$InstallDir/bin/clearShm
|
||||||
|
RETVAL=$?
|
||||||
|
rm -f /var/lock/subsys/infinidb
|
||||||
|
fuser -k 8604/tcp > /dev/null 2>&1
|
||||||
|
test -f $InstallDir/mysql/mysql-Calpont || return $RETVAL
|
||||||
|
$InstallDir/mysql/mysql-Calpont stop > /dev/null 2>&1
|
||||||
|
if [ -x $InstallDir/bin/infinidb.post-stop ]; then
|
||||||
|
$InstallDir/bin/infinidb.post-stop
|
||||||
|
fi
|
||||||
|
return $RETVAL
|
||||||
|
}
|
||||||
|
restart() {
|
||||||
|
stop
|
||||||
|
start
|
||||||
|
}
|
||||||
|
status() {
|
||||||
|
isrunning=0
|
||||||
|
if [ $EUID -eq 0 ]; then
|
||||||
|
if [ -f /var/lock/subsys/infinidb ]; then
|
||||||
|
isrunning=1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
pgrep ProcMon >/dev/null 2>&1
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
isrunning=1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ $isrunning -ne 0 ]; then
|
||||||
|
echo "InfiniDB is running"
|
||||||
|
else
|
||||||
|
echo "InfiniDB is not running"
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
start
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
stop
|
||||||
|
;;
|
||||||
|
restart)
|
||||||
|
restart
|
||||||
|
;;
|
||||||
|
condrestart)
|
||||||
|
[ -f /var/lock/subsys/infinidb ] && restart || :
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
status
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit $?
|
||||||
|
|
2
export/bin/infinidb.conf
Executable file
2
export/bin/infinidb.conf
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
/usr/local/Calpont/lib
|
||||||
|
|
9
export/bin/infinidb.def
Executable file
9
export/bin/infinidb.def
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Copy this file to /etc/default and rename it to 'infinidb'.
|
||||||
|
|
||||||
|
# Change this line to your InfiniDB installation directory
|
||||||
|
INFINIDB_INSTALL_DIR=/usr/local/Calpont
|
||||||
|
|
||||||
|
LD_LIBRARY_PATH=$INFINIDB_INSTALL_DIR/lib:$INFINIDB_INSTALL_DIR/mysql/lib/mysql
|
||||||
|
export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
|
112
export/bin/master-rep-columnstore.sh
Executable file
112
export/bin/master-rep-columnstore.sh
Executable file
@ -0,0 +1,112 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
# generic InfiniDB Master Replication script.
|
||||||
|
#
|
||||||
|
# Notes: This script gets run by ProcMon during installs and upgrades:
|
||||||
|
|
||||||
|
# check log for error
|
||||||
|
checkForError() {
|
||||||
|
grep ERROR /tmp/master-rep-status-$hostipaddr.log > /tmp/error.check
|
||||||
|
if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then
|
||||||
|
echo "ERROR: check log file: /tmp/master-rep-status-$hostipaddr.log"
|
||||||
|
rm -f /tmp/error.check
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
rm -f /tmp/error.check
|
||||||
|
}
|
||||||
|
|
||||||
|
prefix=/usr/local
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
pwprompt=
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
|
||||||
|
prefix="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then
|
||||||
|
password="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
pwprompt="--password=$password"
|
||||||
|
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
|
||||||
|
installdir="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
prefix=`dirname $installdir`
|
||||||
|
elif [ `expr -- "$arg" : '--hostIP='` -eq 9 ]; then
|
||||||
|
hostipaddr="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
test -f $installdir/post/functions && . $installdir/post/functions
|
||||||
|
|
||||||
|
repUser="idbrep"
|
||||||
|
password="Calpont1"
|
||||||
|
|
||||||
|
>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
|
||||||
|
#
|
||||||
|
# Create Replication User
|
||||||
|
#
|
||||||
|
echo "Create Replication User $repUser for node $hostipaddr" >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
cat >/tmp/idb_master-rep.sql <<EOD
|
||||||
|
CREATE USER '$repUser'@'$hostipaddr' IDENTIFIED BY '$password';
|
||||||
|
GRANT REPLICATION SLAVE ON *.* TO '$repUser'@'$hostipaddr';
|
||||||
|
EOD
|
||||||
|
|
||||||
|
cat /tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
|
||||||
|
#
|
||||||
|
# Grant table access for created user
|
||||||
|
#
|
||||||
|
echo "Grant table access for $repUser for node $hostipaddr" >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
cat >/tmp/idb_master-rep.sql <<EOD
|
||||||
|
use mysql
|
||||||
|
grant all on *.* to '$repUser'@'$hostipaddr' identified by 'Calpont1';
|
||||||
|
grant REPLICATION SLAVE on *.* to '$repUser'@'$hostipaddr' identified by 'Calpont1';
|
||||||
|
EOD
|
||||||
|
|
||||||
|
cat /tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
|
||||||
|
#
|
||||||
|
# Run SHOW MASTER STATUS
|
||||||
|
#
|
||||||
|
echo "Run SHOW MASTER STATUS to node log" >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
cat >/tmp/idb_master-rep.sql <<EOD
|
||||||
|
SHOW MASTER STATUS
|
||||||
|
EOD
|
||||||
|
|
||||||
|
cat /tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
|
||||||
|
echo "Run SHOW MASTER STATUS to master status log /tmp/show-master-status.log" >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
cat >/tmp/idb_master-rep.sql <<EOD
|
||||||
|
SHOW MASTER STATUS
|
||||||
|
EOD
|
||||||
|
|
||||||
|
cat /tmp/idb_master-rep.sql >/tmp/show-master-status.log
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_master-rep.sql >>/tmp/show-master-status.log
|
||||||
|
|
||||||
|
|
||||||
|
#alls good, 'OK' for success
|
||||||
|
echo "OK"
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
|
112
export/bin/master-rep-infinidb.sh
Executable file
112
export/bin/master-rep-infinidb.sh
Executable file
@ -0,0 +1,112 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
# generic InfiniDB Master Replication script.
|
||||||
|
#
|
||||||
|
# Notes: This script gets run by ProcMon during installs and upgrades:
|
||||||
|
|
||||||
|
# check log for error
|
||||||
|
checkForError() {
|
||||||
|
grep ERROR /tmp/master-rep-status-$hostipaddr.log > /tmp/error.check
|
||||||
|
if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then
|
||||||
|
echo "ERROR: check log file: /tmp/master-rep-status-$hostipaddr.log"
|
||||||
|
rm -f /tmp/error.check
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
rm -f /tmp/error.check
|
||||||
|
}
|
||||||
|
|
||||||
|
prefix=/usr/local
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
pwprompt=
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
|
||||||
|
prefix="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then
|
||||||
|
password="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
pwprompt="--password=$password"
|
||||||
|
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
|
||||||
|
installdir="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
prefix=`dirname $installdir`
|
||||||
|
elif [ `expr -- "$arg" : '--hostIP='` -eq 9 ]; then
|
||||||
|
hostipaddr="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
test -f $installdir/post/functions && . $installdir/post/functions
|
||||||
|
|
||||||
|
repUser="idbrep"
|
||||||
|
password="Calpont1"
|
||||||
|
|
||||||
|
>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
|
||||||
|
#
|
||||||
|
# Create Replication User
|
||||||
|
#
|
||||||
|
echo "Create Replication User $repUser for node $hostipaddr" >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
cat >/tmp/idb_master-rep.sql <<EOD
|
||||||
|
CREATE USER '$repUser'@'$hostipaddr' IDENTIFIED BY '$password';
|
||||||
|
GRANT REPLICATION SLAVE ON *.* TO '$repUser'@'$hostipaddr';
|
||||||
|
EOD
|
||||||
|
|
||||||
|
cat /tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
|
||||||
|
#
|
||||||
|
# Grant table access for created user
|
||||||
|
#
|
||||||
|
echo "Grant table access for $repUser for node $hostipaddr" >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
cat >/tmp/idb_master-rep.sql <<EOD
|
||||||
|
use mysql
|
||||||
|
grant all on *.* to '$repUser'@'$hostipaddr' identified by 'Calpont1';
|
||||||
|
grant REPLICATION SLAVE on *.* to '$repUser'@'$hostipaddr' identified by 'Calpont1';
|
||||||
|
EOD
|
||||||
|
|
||||||
|
cat /tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
|
||||||
|
#
|
||||||
|
# Run SHOW MASTER STATUS
|
||||||
|
#
|
||||||
|
echo "Run SHOW MASTER STATUS to node log" >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
cat >/tmp/idb_master-rep.sql <<EOD
|
||||||
|
SHOW MASTER STATUS
|
||||||
|
EOD
|
||||||
|
|
||||||
|
cat /tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
|
||||||
|
echo "Run SHOW MASTER STATUS to master status log /tmp/show-master-status.log" >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
cat >/tmp/idb_master-rep.sql <<EOD
|
||||||
|
SHOW MASTER STATUS
|
||||||
|
EOD
|
||||||
|
|
||||||
|
cat /tmp/idb_master-rep.sql >/tmp/show-master-status.log
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_master-rep.sql >>/tmp/show-master-status.log
|
||||||
|
|
||||||
|
|
||||||
|
#alls good, 'OK' for success
|
||||||
|
echo "OK"
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
|
167
export/bin/module_installer.sh
Executable file
167
export/bin/module_installer.sh
Executable file
@ -0,0 +1,167 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# $Id: module_installer.sh 421 2007-04-05 15:46:55Z dhill $
|
||||||
|
#
|
||||||
|
# Setup the Custom OS files during a System install on a module
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# append columnstore OS files to Linux OS file
|
||||||
|
#
|
||||||
|
#
|
||||||
|
|
||||||
|
prefix=/usr/local
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
rpmmode=install
|
||||||
|
user=$USER
|
||||||
|
if [ -z "$user" ]; then
|
||||||
|
user=root
|
||||||
|
fi
|
||||||
|
quiet=0
|
||||||
|
shiftcnt=0
|
||||||
|
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [ $(expr -- "$arg" : '--prefix=') -eq 9 ]; then
|
||||||
|
prefix="$(echo $arg | awk -F= '{print $2}')"
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
((shiftcnt++))
|
||||||
|
elif [ $(expr -- "$arg" : '--rpmmode=') -eq 10 ]; then
|
||||||
|
rpmmode="$(echo $arg | awk -F= '{print $2}')"
|
||||||
|
((shiftcnt++))
|
||||||
|
elif [ $(expr -- "$arg" : '--installdir=') -eq 13 ]; then
|
||||||
|
installdir="$(echo $arg | awk -F= '{print $2}')"
|
||||||
|
prefix=$(dirname $installdir)
|
||||||
|
((shiftcnt++))
|
||||||
|
elif [ $(expr -- "$arg" : '--user=') -eq 7 ]; then
|
||||||
|
user="$(echo $arg | awk -F= '{print $2}')"
|
||||||
|
((shiftcnt++))
|
||||||
|
elif [ $(expr -- "$arg" : '--quiet') -eq 7 ]; then
|
||||||
|
quiet=1
|
||||||
|
((shiftcnt++))
|
||||||
|
elif [ $(expr -- "$arg" : '--port') -eq 6 ]; then
|
||||||
|
mysqlPort="$(echo $arg | awk -F= '{print $2}')"
|
||||||
|
((shiftcnt++))
|
||||||
|
elif [ $(expr -- "$arg" : '--module') -eq 8 ]; then
|
||||||
|
module="$(echo $arg | awk -F= '{print $2}')"
|
||||||
|
((shiftcnt++))
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
shift $shiftcnt
|
||||||
|
|
||||||
|
if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFINIDB_INSTALL_DIR/lib:$INFINIDB_INSTALL_DIR/mysql/lib/mysql
|
||||||
|
fi
|
||||||
|
|
||||||
|
export INFINIDB_INSTALL_DIR=$installdir
|
||||||
|
|
||||||
|
cloud=`$INFINIDB_INSTALL_DIR/bin/getConfig Installation Cloud`
|
||||||
|
if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then
|
||||||
|
cp $INFINIDB_INSTALL_DIR/local/etc/*.pem /root/. > /dev/null 2>&1
|
||||||
|
|
||||||
|
if test -f $INFINIDB_INSTALL_DIR/local/etc/pm1/fstab ; then
|
||||||
|
echo "Setup fstab on Module"
|
||||||
|
touch /etc/fstab
|
||||||
|
rm -f /etc/fstab.columnstoreSave
|
||||||
|
mv /etc/fstab /etc/fstab.columnstoreSave
|
||||||
|
cat $INFINIDB_INSTALL_DIR/local/etc/pm1/fstab >> /etc/fstab
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
test -f $INFINIDB_INSTALL_DIR/post/functions && . $INFINIDB_INSTALL_DIR/post/functions
|
||||||
|
|
||||||
|
mid=`module_id`
|
||||||
|
|
||||||
|
#if um, cloud, separate system type, external um storage, then setup mount
|
||||||
|
if [ $module = "um" ]; then
|
||||||
|
if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then
|
||||||
|
systemtype=`$INFINIDB_INSTALL_DIR/bin/getConfig Installation ServerTypeInstall`
|
||||||
|
if [ $systemtype = "1" ]; then
|
||||||
|
umstoragetype=`$INFINIDB_INSTALL_DIR/bin/getConfig Installation UMStorageType`
|
||||||
|
if [ $umstoragetype = "external" ]; then
|
||||||
|
echo "Setup UM Volume Mount"
|
||||||
|
device=`$INFINIDB_INSTALL_DIR/bin/getConfig Installation UMVolumeDeviceName$mid`
|
||||||
|
mkdir -p $INFINIDB_INSTALL_DIR/mysql/db > /dev/null 2>&1
|
||||||
|
mount $device $INFINIDB_INSTALL_DIR/mysql/db -t ext2 -o defaults
|
||||||
|
chown mysql:mysql -R $INFINIDB_INSTALL_DIR/mysql > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
#if pm, create dbroot directories
|
||||||
|
if [ $module = "pm" ]; then
|
||||||
|
numdbroots=`$INFINIDB_INSTALL_DIR/bin/getConfig SystemConfig DBRootCount`
|
||||||
|
for (( id=1; id<$numdbroots+1; id++ )); do
|
||||||
|
mkdir -p $INFINIDB_INSTALL_DIR/data$id > /dev/null 2>&1
|
||||||
|
chmod 755 $INFINIDB_INSTALL_DIR/data$id
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Setup rc.local on Module"
|
||||||
|
if [ $EUID -eq 0 -a -f $INFINIDB_INSTALL_DIR/local/rc.local.columnstore ]; then
|
||||||
|
if [ $user = "root" ]; then
|
||||||
|
touch /etc/rc.local
|
||||||
|
rm -f /etc/rc.local.columnstoreSave
|
||||||
|
cp /etc/rc.local /etc/rc.local.columnstoreSave
|
||||||
|
cat $INFINIDB_INSTALL_DIR/local/rc.local.columnstore >> /etc/rc.local
|
||||||
|
else
|
||||||
|
sudo touch /etc/rc.local
|
||||||
|
sudo rm -f /etc/rc.local.columnstoreSave
|
||||||
|
sudo cp /etc/rc.local /etc/rc.local.columnstoreSave
|
||||||
|
sudo cat $INFINIDB_INSTALL_DIR/local/rc.local.columnstore >> /etc/rc.local
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $user != "root" ]; then
|
||||||
|
echo "Setup .bashrc on Module for non-root"
|
||||||
|
|
||||||
|
eval userhome=~$user
|
||||||
|
bashFile=$userhome/.bashrc
|
||||||
|
touch ${bashFile}
|
||||||
|
|
||||||
|
echo " " >> ${bashFile}
|
||||||
|
echo "export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR" >> ${bashFile}
|
||||||
|
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFINIDB_INSTALL_DIR/lib:$INFINIDB_INSTALL_DIR/mysql/lib/mysql" >> ${bashFile}
|
||||||
|
fi
|
||||||
|
|
||||||
|
plugin=`$INFINIDB_INSTALL_DIR/bin/getConfig SystemConfig DataFilePlugin`
|
||||||
|
if [ -n "$plugin" ]; then
|
||||||
|
echo "Setup .bashrc on Module for local-query"
|
||||||
|
|
||||||
|
setenv=`$INFINIDB_INSTALL_DIR/bin/getConfig SystemConfig DataFileEnvFile`
|
||||||
|
|
||||||
|
eval userhome=~$user
|
||||||
|
bashFile=$userhome/.bashrc
|
||||||
|
touch ${bashFile}
|
||||||
|
|
||||||
|
echo " " >> ${bashFile}
|
||||||
|
echo ". $INFINIDB_INSTALL_DIR/bin/$setenv" >> ${bashFile}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if mysqlrep is on and module has a my.cnf file, upgrade it
|
||||||
|
|
||||||
|
MySQLRep=`$INFINIDB_INSTALL_DIR/bin/getConfig Installation MySQLRep`
|
||||||
|
if [ $MySQLRep = "y" ]; then
|
||||||
|
if test -f $INFINIDB_INSTALL_DIR/mysql/my.cnf ; then
|
||||||
|
echo "Run Upgrade on my.cnf on Module"
|
||||||
|
$INFINIDB_INSTALL_DIR/bin/mycnfUpgrade > /tmp/mycnfUpgrade.log 2>&1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -f $INFINIDB_INSTALL_DIR/mysql/my.cnf ; then
|
||||||
|
echo "Run Mysql Port update on my.cnf on Module"
|
||||||
|
$INFINIDB_INSTALL_DIR/bin/mycnfUpgrade $mysqlPort > /tmp/mycnfUpgrade_port.log 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if um, run mysql install scripts
|
||||||
|
if [ $module = "um" ]; then
|
||||||
|
echo "Run post-mysqld-install"
|
||||||
|
$INFINIDB_INSTALL_DIR/bin/post-mysqld-install > /tmp/post-mysqld-install.log 2>&1
|
||||||
|
echo "Run post-mysql-install"
|
||||||
|
$INFINIDB_INSTALL_DIR/bin/post-mysql-install > /tmp/post-mysql-install.log 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
echo " "
|
||||||
|
echo "!!!Module Installation Successfully Completed!!!"
|
||||||
|
|
||||||
|
exit 0
|
2
export/bin/myCnf-exclude-args.text
Executable file
2
export/bin/myCnf-exclude-args.text
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
# List of my.cnf arguments that should be ignored during upgrade install
|
||||||
|
#
|
18
export/bin/myCnf-include-args.text
Executable file
18
export/bin/myCnf-include-args.text
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
# List of my.cnf arguments that should be checked and saved during upgrade install
|
||||||
|
#
|
||||||
|
infinidb_local_query
|
||||||
|
log-bin=mysql-bin
|
||||||
|
server-id
|
||||||
|
max_length_for_sort_data
|
||||||
|
tmpdir
|
||||||
|
log-error
|
||||||
|
general_log_file
|
||||||
|
slow_query_log_file
|
||||||
|
general-log
|
||||||
|
slow-query-log
|
||||||
|
character-set-server
|
||||||
|
collation-server
|
||||||
|
init-connect
|
||||||
|
binlog_format
|
||||||
|
secure-auth
|
||||||
|
port
|
44
export/bin/os_check.sh
Executable file
44
export/bin/os_check.sh
Executable file
@ -0,0 +1,44 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Determine the Linux distribution and version that is being run.
|
||||||
|
#
|
||||||
|
# Check for GNU/Linux distributions
|
||||||
|
if [ -f /etc/SuSE-release ]; then
|
||||||
|
DISTRIBUTION="suse"
|
||||||
|
elif [ -f /etc/UnitedLinux-release ]; then
|
||||||
|
DISTRIBUTION="united"
|
||||||
|
elif [ -f /etc/debian_version ]; then
|
||||||
|
DISTRIBUTION="debian"
|
||||||
|
elif [ -f /etc/lsb_version ]; then
|
||||||
|
DISTRIBUTION="ubuntu"
|
||||||
|
elif [ -f /etc/redhat-release ]; then
|
||||||
|
a=`grep -i 'red.*hat.*enterprise.*linux' /etc/redhat-release`
|
||||||
|
if test $? = 0; then
|
||||||
|
DISTRIBUTION=rhel
|
||||||
|
else
|
||||||
|
a=`grep -i 'red.*hat.*linux' /etc/redhat-release`
|
||||||
|
if test $? = 0; then
|
||||||
|
DISTRIBUTION=rh
|
||||||
|
else
|
||||||
|
a=`grep -i 'Fedora' /etc/redhat-release`
|
||||||
|
if test $? = 0; then
|
||||||
|
DISTRIBUTION=fedora
|
||||||
|
else
|
||||||
|
a=`grep -i 'cern.*e.*linux' /etc/redhat-release`
|
||||||
|
if test $? = 0; then
|
||||||
|
DISTRIBUTION=cel
|
||||||
|
else
|
||||||
|
a=`grep -i 'scientific linux cern' /etc/redhat-release`
|
||||||
|
if test $? = 0; then
|
||||||
|
DISTRIBUTION=slc
|
||||||
|
else
|
||||||
|
DISTRIBUTION="unknown"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
DISTRIBUTION="unknown"
|
||||||
|
fi
|
||||||
|
echo ${DISTRIBUTION}
|
69
export/bin/patch_installer.sh
Executable file
69
export/bin/patch_installer.sh
Executable file
@ -0,0 +1,69 @@
|
|||||||
|
#!/usr/bin/expect
|
||||||
|
#
|
||||||
|
# $Id: patch_installer.sh 421 2007-04-05 15:46:55Z dhill $
|
||||||
|
#
|
||||||
|
# Install Software Patch on Module
|
||||||
|
# Argument 1 - Remote Module Name
|
||||||
|
# Argument 2 - Remote Server Host Name or IP address
|
||||||
|
# Argument 3 - Root Password of remote server
|
||||||
|
# Argument 4 - Patch Directory Location
|
||||||
|
# Argument 5 - Install Directory Location
|
||||||
|
# Argument 6 - Software File being installed
|
||||||
|
# Argument 7 - Debug flag 1 for on, 0 for off
|
||||||
|
set timeout 20
|
||||||
|
set MODULE [lindex $argv 0]
|
||||||
|
set SERVER [lindex $argv 1]
|
||||||
|
set PASSWORD [lindex $argv 2]
|
||||||
|
set PATCHLOCATION [lindex $argv 3]
|
||||||
|
set INSTALLLOCATION [lindex $argv 4]
|
||||||
|
set FILE [lindex $argv 5]
|
||||||
|
set DEBUG [lindex $argv 6]
|
||||||
|
set USERNAME "root"
|
||||||
|
set UNM [lindex $argv 7]
|
||||||
|
if { $UNM != "" } {
|
||||||
|
set USERNAME $UNM
|
||||||
|
}
|
||||||
|
log_user $DEBUG
|
||||||
|
spawn -noecho /bin/bash
|
||||||
|
#
|
||||||
|
# mv file being install
|
||||||
|
#
|
||||||
|
send_user "Backup Current File on Module"
|
||||||
|
expect -re "# "
|
||||||
|
send "ssh $USERNAME@$SERVER 'mv $INSTALLLOCATION$FILE $INSTALLLOCATION$FILE'.patchSave''\n"
|
||||||
|
# accept the remote host fingerprint (assuming never logged in before)
|
||||||
|
expect -re "service not known" { send_user " FAILED: Invalid Host\n" ; exit }
|
||||||
|
expect -re "authenticity" { send "yes\n" }
|
||||||
|
expect -re "word: "
|
||||||
|
# password for ssh
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
# check return
|
||||||
|
expect {
|
||||||
|
-re "# " { send_user " DONE" }
|
||||||
|
-re "Permission denied" { send_user " FAILED: Invalid password\n" } exit;
|
||||||
|
-re "mv" { send_user " FAILED: copy filed\n" ; exit}
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
#
|
||||||
|
# send Patch File
|
||||||
|
#
|
||||||
|
send_user "Copy New Calpont Software File to Module"
|
||||||
|
expect -re "# "
|
||||||
|
send "scp $PATCHLOCATION$FILE $USERNAME@$SERVER:$INSTALLLOCATION$FILE\n"
|
||||||
|
expect -re "word: "
|
||||||
|
# send the password
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
# check return
|
||||||
|
expect {
|
||||||
|
-re "100%" { send_user " DONE" }
|
||||||
|
-re "scp" { send_user " FAILED\n" ;
|
||||||
|
send_user "\n*** Installation Failed\n" ;
|
||||||
|
exit }
|
||||||
|
-re "Permission denied" { send_user " FAILED: Invalid password\n" ; exit }
|
||||||
|
-re "No such file or directory" { send_user " FAILED: Invalid package\n" ; exit }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
|
||||||
|
send_user "\n!!!Patch Installation Successfully Completed!!!\n"
|
||||||
|
exit
|
||||||
|
|
319
export/bin/performance_installer.sh
Executable file
319
export/bin/performance_installer.sh
Executable file
@ -0,0 +1,319 @@
|
|||||||
|
#!/usr/bin/expect
|
||||||
|
#
|
||||||
|
# $Id: performance_installer.sh 1128 2009-01-05 16:36:59Z rdempsey $
|
||||||
|
#
|
||||||
|
# Install RPM and custom OS files on system
|
||||||
|
# Argument 1 - Remote Module Name
|
||||||
|
# Argument 2 - Remote Server Host Name or IP address
|
||||||
|
# Argument 3 - Root Password of remote server
|
||||||
|
# Argument 4 - Package name being installed
|
||||||
|
# Argument 5 - Install Type, "initial" or "upgrade"
|
||||||
|
# Argument 6 - Debug flag 1 for on, 0 for off
|
||||||
|
set timeout 30
|
||||||
|
set USERNAME root
|
||||||
|
set MODULE [lindex $argv 0]
|
||||||
|
set SERVER [lindex $argv 1]
|
||||||
|
set PASSWORD [lindex $argv 2]
|
||||||
|
set VERSION [lindex $argv 3]
|
||||||
|
set INSTALLTYPE [lindex $argv 4]
|
||||||
|
set PKGTYPE [lindex $argv 5]
|
||||||
|
set NODEPS [lindex $argv 6]
|
||||||
|
set DEBUG [lindex $argv 7]
|
||||||
|
set INSTALLDIR "/usr/local/MariaDB/Columnstore"
|
||||||
|
set IDIR [lindex $argv 8]
|
||||||
|
if { $IDIR != "" } {
|
||||||
|
set INSTALLDIR $IDIR
|
||||||
|
}
|
||||||
|
set USERNAME "root"
|
||||||
|
set UNM [lindex $argv 13]
|
||||||
|
if { $UNM != "" } {
|
||||||
|
set USERNAME $UNM
|
||||||
|
}
|
||||||
|
|
||||||
|
set BASH "/bin/bash "
|
||||||
|
if { $DEBUG == "1" } {
|
||||||
|
set BASH "/bin/bash -x "
|
||||||
|
}
|
||||||
|
|
||||||
|
set HOME "$env(HOME)"
|
||||||
|
|
||||||
|
log_user $DEBUG
|
||||||
|
spawn -noecho /bin/bash
|
||||||
|
#
|
||||||
|
if { $PKGTYPE == "rpm" } {
|
||||||
|
set PKGERASE "rpm -e --nodeps \$(rpm -qa | grep '^infinidb')"
|
||||||
|
set PKGERASE1 "rpm -e --nodeps "
|
||||||
|
|
||||||
|
set PKGINSTALL "rpm -ivh $NODEPS --force infinidb*$VERSION*"
|
||||||
|
set PKGUPGRADE "rpm -Uvh --noscripts infinidb*$VERSION*"
|
||||||
|
} else {
|
||||||
|
if { $PKGTYPE == "deb" } {
|
||||||
|
set PKGERASE "dpkg -P \$(dpkg --get-selections | grep '^infinidb')"
|
||||||
|
set PKGERASE1 "dpkg -P "
|
||||||
|
set PKGINSTALL "dpkg -i --force-confnew infinidb*$VERSION*"
|
||||||
|
set PKGUPGRADE "dpkg -i --force-confnew infinidb*$VERSION*"
|
||||||
|
} else {
|
||||||
|
if { $PKGTYPE != "bin" } {
|
||||||
|
send_user "Invalid Package Type of $PKGTYPE"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# check and see if remote server has ssh keys setup, set PASSWORD if so
|
||||||
|
send_user " "
|
||||||
|
send "ssh $USERNAME@$SERVER 'time'\n"
|
||||||
|
set timeout 60
|
||||||
|
expect {
|
||||||
|
"Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit 1 }
|
||||||
|
"service not known" { send_user "FAILED: Invalid Host\n" ; exit 1 }
|
||||||
|
"authenticity" { send "yes\n"
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"sys" { set PASSWORD "ssh" }
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
|
||||||
|
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
|
||||||
|
timeout { send_user "ERROR: Timeout to host\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { }
|
||||||
|
"sys" { }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
#BUG 5749 - SAS: didn't work on their system until I added the sleep 60
|
||||||
|
|
||||||
|
sleep 60
|
||||||
|
|
||||||
|
if { $INSTALLTYPE == "initial" || $INSTALLTYPE == "uninstall" } {
|
||||||
|
#
|
||||||
|
# erase package
|
||||||
|
#
|
||||||
|
send_user "Erase InfiniDB Packages on Module "
|
||||||
|
send "ssh $USERNAME@$SERVER '$PKGERASE ;$PKGERASE1 dummy'\n"
|
||||||
|
if { $PASSWORD != "ssh" } {
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set timeout 120
|
||||||
|
expect {
|
||||||
|
"package dummy" { send_user "DONE" }
|
||||||
|
"error: Failed dependencies" { send_user "ERROR: Failed dependencies\n" ; exit 1 }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
|
||||||
|
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
}
|
||||||
|
|
||||||
|
if { $INSTALLTYPE == "uninstall" } { exit 0 }
|
||||||
|
|
||||||
|
#
|
||||||
|
# send the package
|
||||||
|
#
|
||||||
|
set timeout 30
|
||||||
|
#expect -re {[$#] }
|
||||||
|
send_user "Copy New InfiniDB Package to Module "
|
||||||
|
send "ssh $USERNAME@$SERVER 'rm -f /root/infinidb-*.$PKGTYPE'\n"
|
||||||
|
if { $PASSWORD != "ssh" } {
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { }
|
||||||
|
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { }
|
||||||
|
}
|
||||||
|
|
||||||
|
send "scp $HOME/infinidb*$VERSION* $USERNAME@$SERVER:.;$PKGERASE dummy\n"
|
||||||
|
if { $PASSWORD != "ssh" } {
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set timeout 180
|
||||||
|
expect {
|
||||||
|
"package dummy" { send_user "DONE" }
|
||||||
|
"directory" { send_user "ERROR\n" ;
|
||||||
|
send_user "\n*** Installation ERROR\n" ;
|
||||||
|
exit 1 }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
|
||||||
|
#sleep to make sure it's finished
|
||||||
|
sleep 5
|
||||||
|
|
||||||
|
#
|
||||||
|
if { $INSTALLTYPE == "initial"} {
|
||||||
|
#
|
||||||
|
# install package
|
||||||
|
#
|
||||||
|
send_user "Install InfiniDB Packages on Module "
|
||||||
|
|
||||||
|
send "ssh $USERNAME@$SERVER '$PKGINSTALL infinidb*$VERSION* ;$PKGERASE dummy'\n"
|
||||||
|
if { $PASSWORD != "ssh" } {
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set timeout 180
|
||||||
|
expect {
|
||||||
|
"package dummy" { send_user "DONE" }
|
||||||
|
"error: Failed dependencies" { send_user "ERROR: Failed dependencies\n" ;
|
||||||
|
send_user "\n*** Installation ERROR\n" ;
|
||||||
|
exit 1 }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
"needs" { send_user "ERROR: disk space issue\n" ; exit 1 }
|
||||||
|
"conflicts" { send_user "ERROR: File Conflict issue\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
#sleep to make sure it's finished
|
||||||
|
sleep 5
|
||||||
|
set timeout 30
|
||||||
|
#expect -re {[$#] }
|
||||||
|
if { $INSTALLTYPE == "initial"} {
|
||||||
|
#
|
||||||
|
# copy over InfiniDB config file
|
||||||
|
#
|
||||||
|
send_user "Copy InfiniDB Config file to Module "
|
||||||
|
send "scp $INSTALLDIR/etc/* $USERNAME@$SERVER:$INSTALLDIR/etc/.\n"
|
||||||
|
if { $PASSWORD != "ssh" } {
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { send_user "DONE" }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
#sleep to make sure it's finished
|
||||||
|
sleep 5
|
||||||
|
#
|
||||||
|
# copy over custom OS tmp files
|
||||||
|
#
|
||||||
|
send_user "Copy Custom OS files to Module "
|
||||||
|
send "scp -r $INSTALLDIR/local/etc $USERNAME@$SERVER:$INSTALLDIR/local/.\n"
|
||||||
|
if { $PASSWORD != "ssh" } {
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { send_user "DONE" }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
#sleep to make sure it's finished
|
||||||
|
sleep 5
|
||||||
|
#
|
||||||
|
# copy over InfiniDB OS files
|
||||||
|
#
|
||||||
|
send_user "Copy InfiniDB OS files to Module "
|
||||||
|
send "scp $INSTALLDIR/local/etc/$MODULE/* $USERNAME@$SERVER:$INSTALLDIR/local/.\n"
|
||||||
|
if { $PASSWORD != "ssh" } {
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { send_user "DONE" }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
#
|
||||||
|
send_user "\n"
|
||||||
|
#sleep to make sure it's finished
|
||||||
|
sleep 5
|
||||||
|
#
|
||||||
|
# Start module installer to setup Custom OS files
|
||||||
|
#
|
||||||
|
send_user "Run Module Installer "
|
||||||
|
send "ssh $USERNAME@$SERVER '$BASH $INSTALLDIR/bin/module_installer.sh --module=pm'\n"
|
||||||
|
if { $PASSWORD != "ssh" } {
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
"!!!Module" { send_user "DONE" }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
|
||||||
|
"FAILED" { send_user "ERROR: missing OS file\n" ; exit 1 }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
"No such file" { send_user "ERROR: File Not Found\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# check InfiniDB syslog functionality
|
||||||
|
#
|
||||||
|
set timeout 30
|
||||||
|
#expect -re {[$#] }
|
||||||
|
|
||||||
|
send_user "Check InfiniDB system logging functionality "
|
||||||
|
send " \n"
|
||||||
|
send date\n
|
||||||
|
send "ssh $USERNAME@$SERVER '$BASH $INSTALLDIR/bin/syslogSetup.sh check'\n"
|
||||||
|
if { $PASSWORD != "ssh" } {
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
"Logging working" { send_user "DONE" }
|
||||||
|
timeout { send_user "DONE" }
|
||||||
|
"not working" { send_user "WARNING: InfiniDB system logging functionality not working" }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
|
||||||
|
#
|
||||||
|
send_user "\nInstallation Successfully Completed on '$MODULE'\n"
|
||||||
|
exit 0
|
||||||
|
# vim:ts=4 sw=4:
|
||||||
|
|
336
export/bin/post-install
Executable file
336
export/bin/post-install
Executable file
@ -0,0 +1,336 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# $Id: post-install 3705 2013-08-07 19:47:20Z dhill $
|
||||||
|
#
|
||||||
|
# Post-install steps for columnstore install
|
||||||
|
|
||||||
|
prefix=/usr/local
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
rpmmode=install
|
||||||
|
user=$USER
|
||||||
|
if [ -z "$user" ]; then
|
||||||
|
user=root
|
||||||
|
fi
|
||||||
|
quiet=0
|
||||||
|
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
|
||||||
|
prefix="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
elif [ `expr -- "$arg" : '--rpmmode='` -eq 10 ]; then
|
||||||
|
rpmmode="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
|
||||||
|
installdir="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
prefix=`dirname $installdir`
|
||||||
|
elif [ `expr -- "$arg" : '--user='` -eq 7 ]; then
|
||||||
|
user="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
elif [ `expr -- "$arg" : '--quiet'` -eq 7 ]; then
|
||||||
|
quiet=1
|
||||||
|
elif [ `expr -- "$arg" : '--plugin='` -eq 9 ]; then
|
||||||
|
plugin="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
else
|
||||||
|
echo "post-install: ignoring unknown argument: $arg" 1>&2
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then
|
||||||
|
export INFINIDB_INSTALL_DIR=$installdir
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib
|
||||||
|
else
|
||||||
|
# add library config file
|
||||||
|
/bin/cp -f $installdir/bin/infinidb.conf /etc/ld.so.conf.d/.
|
||||||
|
ldconfig
|
||||||
|
fi
|
||||||
|
|
||||||
|
#check 64-bit OS compatiable
|
||||||
|
arch=`uname -m`
|
||||||
|
patcnt=`expr "$arch" : 'i.86'`
|
||||||
|
is64bitos=1
|
||||||
|
if [ $patcnt -ne 0 ]; then
|
||||||
|
is64bitos=0
|
||||||
|
fi
|
||||||
|
is64bitpkg=1
|
||||||
|
file $installdir/bin/PrimProc | grep '64-bit' >/dev/null 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
is64bitpkg=0
|
||||||
|
fi
|
||||||
|
if [ $is64bitpkg -eq 1 -a $is64bitos -ne 1 ]; then
|
||||||
|
echo "ERROR: Incompatiable Version, package is intended for a x86_64 architecture"
|
||||||
|
echo "exiting...."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f $installdir/etc/Calpont.xml ]; then
|
||||||
|
echo "$installdir/etc/Calpont.xml not found, exiting"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd $installdir/lib || exit 1
|
||||||
|
for lib in *.so.1.0.0; do
|
||||||
|
blib=`basename $lib .1.0.0`
|
||||||
|
ln -sf $lib $blib
|
||||||
|
done
|
||||||
|
chown -h $user.$user *.so >/dev/null 2>&1
|
||||||
|
if [ -f libnetsnmp.so.5.2.1 ]; then
|
||||||
|
for lib in *.so.5.2.1; do
|
||||||
|
blib=`basename $lib .5.2.1`
|
||||||
|
ln -sf $lib $blib
|
||||||
|
ln -sf $lib ${blib}.5
|
||||||
|
done
|
||||||
|
chown -h $user.$user *.so *.so.5 >/dev/null 2>&1
|
||||||
|
fi
|
||||||
|
if [ -f libstdc++.so.6.0.14 ]; then
|
||||||
|
ln -sf libstdc++.so.6.0.14 libstdc++.so.6
|
||||||
|
chown -h $user.$user libstdc++.so.6 >/dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
ln -sf libjemalloc.so.3.3.0 libjemalloc.so
|
||||||
|
chown -h $user.$user libjemalloc.so >/dev/null 2>&1
|
||||||
|
|
||||||
|
# TODO-based on early experience with HDP it doesn't install bigtop
|
||||||
|
# so the code below will not correctly detect JAVA_HOME. Need to
|
||||||
|
# decide how to handle
|
||||||
|
# Autodetect JAVA_HOME if not defined
|
||||||
|
#if [ -e /usr/libexec/bigtop-detect-javahome ]; then
|
||||||
|
#. /usr/libexec/bigtop-detect-javahome
|
||||||
|
#elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
|
||||||
|
#. /usr/lib/bigtop-utils/bigtop-detect-javahome
|
||||||
|
#fi
|
||||||
|
#ln -sf $JAVA_HOME/jre/lib/amd64/server/libjvm.so
|
||||||
|
#chown -h $user.$user libjvm.so >/dev/null 2>&1
|
||||||
|
|
||||||
|
cd /
|
||||||
|
|
||||||
|
test -d /var/log/Calpont || mkdir /var/log/Calpont >/dev/null 2>&1
|
||||||
|
test -d /var/log/Calpont/archive || mkdir /var/log/Calpont/archive >/dev/null 2>&1
|
||||||
|
test -d /var/log/Calpont/corefiles || mkdir /var/log/Calpont/corefiles >/dev/null 2>&1
|
||||||
|
test -d /var/log/Calpont/trace || mkdir /var/log/Calpont/trace >/dev/null 2>&1
|
||||||
|
test -h /var/log/Calpont/data && rm -f /var/log/Calpont/data
|
||||||
|
test -d /var/log/Calpont/data || mkdir /var/log/Calpont/data >/dev/null 2>&1
|
||||||
|
# make sure trace dir is world-writable and sticky
|
||||||
|
chmod 1755 /var/log/Calpont/trace >/dev/null 2>&1
|
||||||
|
test -d $installdir/data || mkdir $installdir/data
|
||||||
|
test -d $installdir/data1 || mkdir $installdir/data1
|
||||||
|
test -d $installdir/data1/systemFiles || mkdir $installdir/data1/systemFiles
|
||||||
|
test -d $installdir/data1/systemFiles/dbrm || mkdir $installdir/data1/systemFiles/dbrm
|
||||||
|
test -d $installdir/data1/systemFiles/dataTransaction || rmdir $installdir/data1/systemFiles/dataTransaction >/dev/null 2>&1
|
||||||
|
test -d $installdir/data1/systemFiles/dataTransaction/archive || rmdir $installdir/data1/systemFiles/dataTransaction/archive >/dev/null 2>&1
|
||||||
|
chmod 1755 $installdir/data1 >/dev/null 2>&1
|
||||||
|
chmod -R 1755 $installdir/data1/systemFiles >/dev/null 2>&1
|
||||||
|
chmod 1755 $installdir/etc > /dev/null 2>&1
|
||||||
|
|
||||||
|
#create the bulk-load dirs
|
||||||
|
mkdir -p $installdir/data/bulk/data/import >/dev/null 2>&1
|
||||||
|
mkdir -p $installdir/data/bulk/log >/dev/null 2>&1
|
||||||
|
mkdir -p $installdir/data/bulk/job >/dev/null 2>&1
|
||||||
|
mkdir -p $installdir/data/bulk/rollback >/dev/null 2>&1
|
||||||
|
mkdir -p $installdir/data/bulk/tmpjob >/dev/null 2>&1
|
||||||
|
rm -f $installdir/data/bulk/tmpjob/* >/dev/null 2>&1
|
||||||
|
chmod -R 755 $installdir/data/bulk >/dev/null 2>&1
|
||||||
|
|
||||||
|
#create infinidb temp file directory
|
||||||
|
mkdir -p /tmp/infinidb_tmp_files >/dev/null 2>&1
|
||||||
|
|
||||||
|
#setup core file directory and link
|
||||||
|
mkdir /var/log/Calpont/corefiles > /dev/null 2>&1
|
||||||
|
chmod 755 /var/log/Calpont/corefiles > /dev/null 2>&1
|
||||||
|
|
||||||
|
#create mount directories
|
||||||
|
mkdir /mnt/tmp > /dev/null 2>&1
|
||||||
|
mkdir /var/log/Calpont/data/archive > /dev/null 2>&1
|
||||||
|
|
||||||
|
# install Calpont Log Rotate File
|
||||||
|
test -d $installdir/mysql/db || mkdir -p $installdir/mysql/db
|
||||||
|
cp $installdir/bin/columnstoreLogRotate /etc/logrotate.d/columnstore > /dev/null 2>&1
|
||||||
|
rm -rf $installdir/mysql/db/infinidb_log_archive > /dev/null 2>&1
|
||||||
|
|
||||||
|
# delete Calpont shared memory segments
|
||||||
|
$installdir/bin/Calpont/bin/clearShm > /dev/null 2>&1
|
||||||
|
|
||||||
|
#setup the infinidb service script
|
||||||
|
rm -f /etc/init.d/infinidb >/dev/null 2>&1
|
||||||
|
cp $installdir/bin/infinidb /etc/init.d >/dev/null 2>&1
|
||||||
|
if [ -x /sbin/chkconfig ]; then
|
||||||
|
/sbin/chkconfig --add infinidb > /dev/null 2>&1
|
||||||
|
/sbin/chkconfig infinidb on > /dev/null 2>&1
|
||||||
|
elif [ -x /usr/sbin/update-rc.d ]; then
|
||||||
|
/usr/sbin/update-rc.d infinidb defaults 99 > /dev/null 2>&1
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo "Package 'chkconfig' or 'update-rc.d' not installed, contact your sysadmin if you want to setup to autostart for infinidb"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#setup InfiniDB system logging
|
||||||
|
if [ $user = "root" ]; then
|
||||||
|
$installdir/bin/syslogSetup.sh install > /tmp/syslog_install.log 2>&1
|
||||||
|
chmod 777 -R /dev/shm
|
||||||
|
rm -f /etc/default/infinidb
|
||||||
|
else
|
||||||
|
sudo $installdir/bin/syslogSetup.sh --installdir=$installdir install > /tmp/syslog_install.log 2>&1
|
||||||
|
sudo chown $user:$user $installdir/etc/Calpont.xml
|
||||||
|
sudo chmod 755 /var/log
|
||||||
|
sudo chmod -R 755 /var/log/Calpont
|
||||||
|
sudo chmod -R 777 /dev/shm
|
||||||
|
sudo rm -f /var/lock/subsys/mysql-Calpont
|
||||||
|
sudo rm -f /tmp/StopCalpont
|
||||||
|
|
||||||
|
sed -i -e s@/usr/local/MariaDB/Columnstore@$installdir@g $installdir/bin/infinidb.def
|
||||||
|
sudo cp $installdir/bin/infinidb.def /etc/default/infinidb
|
||||||
|
fi
|
||||||
|
|
||||||
|
#check if InfiniDB system logging was setup
|
||||||
|
cat /tmp/syslog_install.log | grep 'No System Logging' >/dev/null 2>&1
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
cat /tmp/syslog_install.log
|
||||||
|
fi
|
||||||
|
|
||||||
|
#setup alias commands
|
||||||
|
eval userhome=~$user
|
||||||
|
bashFile=$userhome/.bashrc
|
||||||
|
touch ${bashFile}
|
||||||
|
if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then
|
||||||
|
sed -i -e s@/usr/local/MariaDB/Columnstore@$installdir@g $installdir/bin/columnstoreAlias
|
||||||
|
fi
|
||||||
|
egrep -qs 'Calpont Database Platform Alias Commands' ${bashFile}
|
||||||
|
rc1=$?
|
||||||
|
egrep -qs 'InfiniDB Alias Commands' ${bashFile}
|
||||||
|
rc2=$?
|
||||||
|
if [ $rc1 -ne 0 -a $rc2 -ne 0 ]; then
|
||||||
|
rm -f ${bashFile}.columnstoreSave
|
||||||
|
cp ${bashFile} ${bashFile}.columnstoreSave >/dev/null 2>&1
|
||||||
|
cat $installdir/bin/columnstoreAlias >> ${bashFile}
|
||||||
|
echo " " >> ${bashFile}
|
||||||
|
fi
|
||||||
|
|
||||||
|
#check and get amazon EC2 env variables
|
||||||
|
if [ -n "$EC2_HOME" ]; then
|
||||||
|
$installdir/bin/setConfig -d Installation EC2_HOME $EC2_HOME
|
||||||
|
|
||||||
|
if [ -n "$EC2_HOME" ]; then
|
||||||
|
$installdir/bin/setConfig -d Installation JAVA_HOME $JAVA_HOME
|
||||||
|
fi
|
||||||
|
|
||||||
|
$installdir/bin/setConfig -d Installation EC2_PATH $PATH:/home/ec2/bin:/opt/aws/bin
|
||||||
|
fi
|
||||||
|
|
||||||
|
#log install message
|
||||||
|
test -f $installdir/post/functions && . $installdir/post/functions
|
||||||
|
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib $installdir/bin/cplogger -i 19 "***** InfiniDB Installed *****"
|
||||||
|
|
||||||
|
#setup hadoop
|
||||||
|
hadoop=`which hadoop 2>/dev/null`
|
||||||
|
if [ -z $hadoop ]; then
|
||||||
|
#check for non-root user
|
||||||
|
if [ $installdir != "/usr/local/MariaDB/Columnstore" -a $quiet -eq 0 ]; then
|
||||||
|
cat <<EOD
|
||||||
|
The next steps are:
|
||||||
|
|
||||||
|
export INFINIDB_INSTALL_DIR=$installdir
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib:$installdir/mysql/lib/mysql
|
||||||
|
$installdir/bin/postConfigure -i $installdir
|
||||||
|
|
||||||
|
EOD
|
||||||
|
else
|
||||||
|
cat <<EOD
|
||||||
|
The next step is:
|
||||||
|
|
||||||
|
$installdir/bin/postConfigure
|
||||||
|
|
||||||
|
EOD
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
chmod 755 $installdir/bin/setenv-hdfs-12
|
||||||
|
chmod 755 $installdir/bin/setenv-hdfs-20
|
||||||
|
|
||||||
|
. $installdir/bin/setenv-hdfs-20
|
||||||
|
$installdir/bin/hdfsCheck $installdir/lib/hdfs-20.so > /tmp/hdfs-20-test.log 2>&1
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
#Passed set in config file
|
||||||
|
$installdir/bin/setConfig -d SystemConfig DataFilePlugin $installdir/lib/hdfs-20.so
|
||||||
|
$installdir/bin/setConfig -d SystemConfig DataFileEnvFile setenv-hdfs-20
|
||||||
|
|
||||||
|
#check for non-root user
|
||||||
|
if [ $installdir != "/usr/local/MariaDB/Columnstore" -a $quiet -eq 0 ]; then
|
||||||
|
cat <<EOD
|
||||||
|
|
||||||
|
If you are intending to install InfiniDB over Hadoop, the next steps are:
|
||||||
|
|
||||||
|
export INFINIDB_INSTALL_DIR=$installdir
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib:$installdir/mysql/lib/mysql
|
||||||
|
. $installdir/bin/setenv-hdfs-20
|
||||||
|
$installdir/bin/postConfigure -i $installdir
|
||||||
|
|
||||||
|
If you are intending to install InfiniDB without Hadoop, the next steps are:
|
||||||
|
|
||||||
|
export INFINIDB_INSTALL_DIR=$installdir
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib:$installdir/mysql/lib/mysql
|
||||||
|
$installdir/bin/postConfigure -i $installdir
|
||||||
|
|
||||||
|
EOD
|
||||||
|
else
|
||||||
|
cat <<EOD
|
||||||
|
|
||||||
|
If you are intending to install InfiniDB over Hadoop, the next steps are:
|
||||||
|
|
||||||
|
. $installdir/bin/setenv-hdfs-20
|
||||||
|
$installdir/bin/postConfigure
|
||||||
|
|
||||||
|
If you are intending to install InfiniDB without Hadoop, the next step is:
|
||||||
|
|
||||||
|
$installdir/bin/postConfigure
|
||||||
|
|
||||||
|
EOD
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
. $installdir/bin/setenv-hdfs-12
|
||||||
|
$installdir/bin/hdfsCheck $installdir/lib/hdfs-12.so > /tmp/hdfs-12-test.log 2>&1
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
#Passed set in config file
|
||||||
|
$installdir/bin/setConfig -d SystemConfig DataFilePlugin $installdir/lib/hdfs-12.so
|
||||||
|
$installdir/bin/setConfig -d SystemConfig DataFileEnvFile setenv-hdfs-12
|
||||||
|
|
||||||
|
if [ $installdir != "/usr/local/MariaDB/Columnstore" -a $quiet -eq 0 ]; then
|
||||||
|
cat <<EOD
|
||||||
|
|
||||||
|
If you are intending to install InfiniDB over Hadoop, the next steps are:
|
||||||
|
|
||||||
|
export INFINIDB_INSTALL_DIR=$installdir
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib:$installdir/mysql/lib/mysql:$libpath
|
||||||
|
. $installdir/bin/setenv-hdfs-12
|
||||||
|
$installdir/bin/postConfigure -i $installdir
|
||||||
|
|
||||||
|
If you are intending to install InfiniDB without Hadoop, the next steps are:
|
||||||
|
|
||||||
|
export INFINIDB_INSTALL_DIR=$installdir
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib:$installdir/mysql/lib/mysql
|
||||||
|
$installdir/bin/postConfigure -i $installdir
|
||||||
|
|
||||||
|
EOD
|
||||||
|
else
|
||||||
|
cat <<EOD
|
||||||
|
|
||||||
|
If you are intending to install InfiniDB over Hadoop, the next steps are:
|
||||||
|
|
||||||
|
. $installdir/bin/setenv-hdfs-12
|
||||||
|
$installdir/bin/postConfigure
|
||||||
|
|
||||||
|
If you are intending to install InfiniDB without Hadoop, the next step is:
|
||||||
|
|
||||||
|
$installdir/bin/postConfigure
|
||||||
|
|
||||||
|
EOD
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
cat <<EOD
|
||||||
|
|
||||||
|
If you are intending to install InfiniDB over Hadoop, the Hadoop sanity check did not pass.
|
||||||
|
Most likely there is an environment setup conflict or the hdfs services are down.
|
||||||
|
Please Contact InfiniDB Customer Support.
|
||||||
|
EOD
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
124
export/bin/post-mysql-install
Executable file
124
export/bin/post-mysql-install
Executable file
@ -0,0 +1,124 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# $Id: post-mysql-install 3661 2013-06-25 22:04:33Z dhill $
|
||||||
|
#
|
||||||
|
# Post-install steps for calpont-mysql install
|
||||||
|
|
||||||
|
# check log for error
|
||||||
|
checkForError() {
|
||||||
|
# check for password error
|
||||||
|
grep "ERROR 1045" /tmp/mysql_install.log > /tmp/error.check
|
||||||
|
if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then
|
||||||
|
password=`$installdir/bin/getMySQLpw`
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "MySQL Password missing or incorrect"
|
||||||
|
rm -f /tmp/error.check
|
||||||
|
$installdir/mysql/mysql-Calpont stop
|
||||||
|
sleep 2
|
||||||
|
exit 2;
|
||||||
|
fi
|
||||||
|
rm -f /tmp/error.check
|
||||||
|
return 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -f /tmp/error.check
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# See if engine infinidb exist
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
echo "checking for engine infinidb..."
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
--execute='show engines;' \
|
||||||
|
calpontsys | grep -i infinidb
|
||||||
|
|
||||||
|
#
|
||||||
|
# Add compressiontype column to SYSCOLUMN if applicable
|
||||||
|
#
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "infinidb doesn't exist"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "infinidb exist"
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
prefix=/usr/local
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
rpmmode=install
|
||||||
|
password=
|
||||||
|
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [ $(expr -- "$arg" : '--prefix=') -eq 9 ]; then
|
||||||
|
prefix="$(echo $arg | awk -F= '{print $2}')"
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
elif [ $(expr -- "$arg" : '--rpmmode=') -eq 10 ]; then
|
||||||
|
rpmmode="$(echo $arg | awk -F= '{print $2}')"
|
||||||
|
elif [ $(expr -- "$arg" : '--password=') -eq 11 ]; then
|
||||||
|
password="$(echo $arg | awk -F= '{print $2}')"
|
||||||
|
elif [ $(expr -- "$arg" : '--installdir=') -eq 13 ]; then
|
||||||
|
installdir="$(echo $arg | awk -F= '{print $2}')"
|
||||||
|
prefix=$(dirname $installdir)
|
||||||
|
else
|
||||||
|
echo "ignoring unknown argument: $arg" 1>&2
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then
|
||||||
|
export INFINIDB_INSTALL_DIR=$installdir
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFINIDB_INSTALL_DIR/lib:$INFINIDB_INSTALL_DIR/mysql/lib/mysql
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f $installdir/lib/libcalmysql.so.1.0.0 ]; then
|
||||||
|
libcalmysql=$installdir/lib/libcalmysql.so.1.0.0
|
||||||
|
libudfsdk=$installdir/lib/libudf_mysql.so.1.0.0
|
||||||
|
elif [ -f $installdir/lib/libcalmysql.so.1 ]; then
|
||||||
|
libcalmysql=$installdir/lib/libcalmysql.so.1
|
||||||
|
libudfsdk=$installdir/lib/libudf_mysql.so.1
|
||||||
|
else
|
||||||
|
libcalmysql=
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d $installdir/mysql/lib64/mysql/plugin -a -n "$libcalmysql" ]; then
|
||||||
|
cd $installdir/mysql/lib64/mysql/plugin
|
||||||
|
ln -sf $libcalmysql libcalmysql.so
|
||||||
|
ln -sf $libcalmysql libcalmysqlent.so
|
||||||
|
ln -sf $libudfsdk libudf_mysql.so
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then
|
||||||
|
sed -i -e s@/usr/local/MariaDB/Columnstore@$installdir@g $installdir/mysql/my.cnf
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -x $installdir/mysql/mysql-Calpont ]; then
|
||||||
|
|
||||||
|
# Restart in the same way that mysqld will be started normally.
|
||||||
|
$installdir/mysql/mysql-Calpont stop >/dev/null 2>&1
|
||||||
|
sleep 2
|
||||||
|
$installdir/mysql/mysql-Calpont start
|
||||||
|
|
||||||
|
sleep 5
|
||||||
|
|
||||||
|
# Install various Calpont stuff...
|
||||||
|
$installdir/mysql/install_calpont_mysql.sh --password=$password --installdir=$installdir
|
||||||
|
checkForError
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
# retry
|
||||||
|
$installdir/mysql/install_calpont_mysql.sh --password=$password --installdir=$installdir
|
||||||
|
checkForError
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "ERROR: missing or invalid password, or InfiniDB plugin install missing"
|
||||||
|
$installdir/mysql/mysql-Calpont stop
|
||||||
|
sleep 2
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
$installdir/mysql/mysql-Calpont stop
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
107
export/bin/post-mysqld-install
Executable file
107
export/bin/post-mysqld-install
Executable file
@ -0,0 +1,107 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# $Id: post-mysqld-install 3661 2013-06-25 22:04:33Z dhill $
|
||||||
|
#
|
||||||
|
# Post-install steps for infinidb-mysql install
|
||||||
|
|
||||||
|
prefix=/usr/local
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
rpmmode=install
|
||||||
|
user=mysql
|
||||||
|
if [ $EUID -ne 0 ]; then
|
||||||
|
user=$USER
|
||||||
|
fi
|
||||||
|
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
|
||||||
|
prefix="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
elif [ `expr -- "$arg" : '--rpmmode='` -eq 10 ]; then
|
||||||
|
rpmmode="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
|
||||||
|
installdir="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
prefix=`dirname $installdir`
|
||||||
|
elif [ `expr -- "$arg" : '--user='` -eq 7 ]; then
|
||||||
|
user="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
else
|
||||||
|
echo "post-mysqld-install: ignoring unknown argument: $arg" 1>&2
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
cd $installdir/mysql/lib64
|
||||||
|
for file in libmysqlclient libmysqlclient_r; do
|
||||||
|
ln -sf $file.so.18.0.0 $file.so
|
||||||
|
ln -sf $file.so.18.0.0 $file.so.18
|
||||||
|
done
|
||||||
|
cd $installdir/mysql/lib64/mysql/plugin
|
||||||
|
for file in ha_archive ha_blackhole ha_federated ha_innodb; do
|
||||||
|
ln -sf $file.so $file.so.0
|
||||||
|
done
|
||||||
|
|
||||||
|
### taken from MySQL-server-5.1.30-0.glibc23.i386.rpm
|
||||||
|
mysql_datadir=$installdir/mysql/db
|
||||||
|
|
||||||
|
# Create data directory if needed
|
||||||
|
if test ! -d $mysql_datadir; then mkdir -m 755 $mysql_datadir; fi
|
||||||
|
if test ! -d $mysql_datadir/mysql; then mkdir $mysql_datadir/mysql; fi
|
||||||
|
if test ! -d $mysql_datadir/test; then mkdir $mysql_datadir/test; fi
|
||||||
|
if test ! -d $installdir/mysql/lib; then mkdir $installdir/mysql/lib; fi
|
||||||
|
if test ! -d $installdir/mysql/lib/mysql; then mkdir $installdir/mysql/lib/mysql; fi
|
||||||
|
|
||||||
|
# Create a MySQL user and group. Do not report any problems if it already
|
||||||
|
# exists.
|
||||||
|
groupadd -r $user 2> /dev/null || true
|
||||||
|
useradd -m -r -d $mysql_datadir -s /bin/bash -c "MySQL server" -g $user $user 2> /dev/null || true
|
||||||
|
# The user may already exist, make sure it has the proper group nevertheless (BUG#12823)
|
||||||
|
usermod -g $user $user 2> /dev/null || true
|
||||||
|
|
||||||
|
# Change permissions so that the user that will run the MySQL daemon
|
||||||
|
# owns all database files.
|
||||||
|
chown -R $user:$user $installdir/mysql
|
||||||
|
|
||||||
|
# Initiate databases if needed
|
||||||
|
if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then
|
||||||
|
sed -i -e s@/usr/local/MariaDB/Columnstore@$installdir@g $installdir/mysql/my.cnf
|
||||||
|
fi
|
||||||
|
|
||||||
|
# InfiniDB testing hook...
|
||||||
|
test -x /usr/local/bin/idb-testing-mysql-pre-start && /usr/local/bin/idb-testing-mysql-pre-start $installdir/mysql
|
||||||
|
|
||||||
|
### Don't give the user the notes, we'll fix them ourselves...
|
||||||
|
$installdir/mysql/bin/mysql_install_db --rpm --user=$user --defaults-file=$installdir/mysql/my.cnf --basedir=$installdir/mysql >/dev/null
|
||||||
|
# Change permissions again to fix any new files.
|
||||||
|
chown -R $user:$user $mysql_datadir
|
||||||
|
|
||||||
|
# Fix permissions for the permission database so that only the user
|
||||||
|
# can read them.
|
||||||
|
chmod -R og-rw $mysql_datadir/mysql
|
||||||
|
|
||||||
|
# Change permissions again to fix any new files.
|
||||||
|
chown -R $user.$user $installdir/mysql
|
||||||
|
|
||||||
|
test -e /etc/init.d/mysql-Calpont || cp $installdir/mysql/mysql-Calpont /etc/init.d >/dev/null 2>&1
|
||||||
|
|
||||||
|
if [ -f $installdir/lib/libcalmysql.so.1.0.0 ]; then
|
||||||
|
libcalmysql=$installdir/lib/libcalmysql.so.1.0.0
|
||||||
|
libudfsdk=$installdir/lib/libudf_mysql.so.1.0.0
|
||||||
|
elif [ -f $installdir/lib/libcalmysql.so.1 ]; then
|
||||||
|
libcalmysql=$installdir/lib/libcalmysql.so.1
|
||||||
|
libudfsdk=$installdir/lib/libudf_mysql.so.1
|
||||||
|
else
|
||||||
|
libcalmysql=
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$libcalmysql" ]; then
|
||||||
|
|
||||||
|
cd $installdir/mysql/lib64/mysql/plugin
|
||||||
|
ln -sf $libcalmysql libcalmysql.so
|
||||||
|
ln -sf $libcalmysql libcalmysqlent.so
|
||||||
|
ln -sf $libudfsdk libudf_mysql.so
|
||||||
|
fi
|
||||||
|
|
||||||
|
# cleanup previous install mysql replication files
|
||||||
|
rm -rf $mysql_datadir/*relay*
|
||||||
|
rm -rf $mysql_datadir/mysql-bin.*
|
||||||
|
rm -rf $mysql_datadir/master.info
|
||||||
|
|
||||||
|
exit 0
|
156
export/bin/pre-uninstall
Executable file
156
export/bin/pre-uninstall
Executable file
@ -0,0 +1,156 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# $Id: post-uninstall 421 2007-04-05 15:46:55Z dhill $
|
||||||
|
#
|
||||||
|
# Post-uninstall steps for columnstore install
|
||||||
|
|
||||||
|
prefix=/usr/local
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
rpmmode=install
|
||||||
|
user=$USER
|
||||||
|
sudo=sudo
|
||||||
|
if [ -z "$user" ]; then
|
||||||
|
user=root
|
||||||
|
sudo=" "
|
||||||
|
fi
|
||||||
|
quiet=0
|
||||||
|
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
|
||||||
|
prefix="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
elif [ `expr -- "$arg" : '--rpmmode='` -eq 10 ]; then
|
||||||
|
rpmmode="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
|
||||||
|
installdir="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
prefix=`dirname $installdir`
|
||||||
|
elif [ `expr -- "$arg" : '--user='` -eq 7 ]; then
|
||||||
|
user="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
elif [ `expr -- "$arg" : '--quiet'` -eq 7 ]; then
|
||||||
|
quiet=1
|
||||||
|
else
|
||||||
|
echo "post-uninstall: ignoring unknown argument: $arg" 1>&2
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
#stop services
|
||||||
|
$installdir/bin/infinidb stop > /dev/null 2>&1
|
||||||
|
if test -f /etc/init.d/columnstore-Mysql ; then
|
||||||
|
$installdir/myql/columnstore-Mysql stop > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $installdir == "/usr/local/MariaDB/Columnstore" ]; then
|
||||||
|
# remove library config file
|
||||||
|
rm -f /etc/ld.so.conf.d/infinidb.conf
|
||||||
|
rm -f /etc/ld.so.cache
|
||||||
|
ldconfig
|
||||||
|
fi
|
||||||
|
|
||||||
|
# uninstall OS scripts updated by postConfigure
|
||||||
|
if test -f /root/.bashrc.columnstoreSave ; then
|
||||||
|
$sudo mv -f /root/.bashrc.columnstoreSave /root/.bashrc > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
if test -f /etc/exports.columnstoreSave ; then
|
||||||
|
$sudo mv -f /etc/exports.columnstoreSave /etc/exports > /dev/null 2>&1
|
||||||
|
else
|
||||||
|
$sudo rm -f /etc/exports > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
if test -f /etc/rc.d/rc.local.columnstoreSave ; then
|
||||||
|
$sudo mv -f /etc/rc.d/rc.local.columnstoreSave /etc/rc.d/rc.local > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
if test -f /etc/rc.local.columnstoreSave ; then
|
||||||
|
$sudo mv -f /etc/rc.local.columnstoreSave /etc/rc.local > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
export INFINIDB_INSTALL_DIR=$installdir
|
||||||
|
|
||||||
|
cloud=`$INFINIDB_INSTALL_DIR/bin/getConfig Installation Cloud`
|
||||||
|
if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then
|
||||||
|
if test -f /etc/fstab ; then
|
||||||
|
$sudo sed -i '/Calpont\/data/d' /etc/fstab > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
#remove log file directories
|
||||||
|
#rm -rf /var/log/Calpont > /dev/null 2>&1
|
||||||
|
#rm -f $installdir/mysql/db/*.err > /dev/null 2>&1
|
||||||
|
rm -f /var/log/Calpont/activeAlarms > /dev/null 2>&1
|
||||||
|
rm -f /var/log/Calpont/*.log1 > /dev/null 2>&1
|
||||||
|
rm -rf $installdir/mysql/db/infinidb_log_archive > /dev/null 2>&1
|
||||||
|
sudo rm -f /etc/default/infinidb
|
||||||
|
|
||||||
|
# remove Calpont Log Rotate File abd Transaction Log File
|
||||||
|
rm -f /etc/logrotate.d/columnstore > /dev/null 2>&1
|
||||||
|
rm -f /etc/cron.d/transactionLog > /dev/null 2>&1
|
||||||
|
|
||||||
|
# delete Calpont shared memory segments
|
||||||
|
pkill -9 ProcMon
|
||||||
|
$installdir/bin/clearShm > /dev/null 2>&1
|
||||||
|
|
||||||
|
# delete prat files
|
||||||
|
rm -f /etc/cron.d/ps > /dev/null 2>&1
|
||||||
|
rm -f /etc/pscollect > /dev/null 2>&1
|
||||||
|
/etc/init.d/crond reload > /dev/null 2>&1
|
||||||
|
systemctl reload crond.service > /dev/null 2>&1
|
||||||
|
|
||||||
|
# delete tmp files
|
||||||
|
rm -f $installdir/local/*.columnstore
|
||||||
|
rm -rf $installdir/local/etc/
|
||||||
|
rm -rf /tmp/bucketreuse
|
||||||
|
rm -f /tmp/columnstore.txt
|
||||||
|
rm -f /tmp/dbbuilder.*
|
||||||
|
rm -f /tmp/dbrmfiles
|
||||||
|
rm -f /var/lock/subsys/infinidb
|
||||||
|
rm -f /tmp/pkgcheck
|
||||||
|
rm -f /tmp/upgrade-status.log.*
|
||||||
|
rm -f /tmp/mount.log
|
||||||
|
rm -f $installdir/data/bulk/tmpjob/* >/dev/null 2>&1
|
||||||
|
rm -rf /tmp/infinidb_tmp_files
|
||||||
|
rm -f $installdir/local/moveDbrootTransactionLog
|
||||||
|
|
||||||
|
#delete any old setenv files under home directory
|
||||||
|
if [ $user = "root" ]; then
|
||||||
|
rm -f /root/setenv-hdfs*
|
||||||
|
else
|
||||||
|
rm -f /home/$user/setenv-hdfs*
|
||||||
|
fi
|
||||||
|
|
||||||
|
# delete core files
|
||||||
|
#rm -f /var/log/Calpont/corefiles/* > /dev/null 2>&1
|
||||||
|
|
||||||
|
#uninstall InfiniDB system logging
|
||||||
|
if [ -x $installdir/bin/syslogSetup.sh ]; then
|
||||||
|
if [ $user = "root" ]; then
|
||||||
|
$installdir/bin/syslogSetup.sh uninstall >/dev/null 2>&1
|
||||||
|
rm -f /etc/init.d/infinidb > /dev/null 2>&1
|
||||||
|
else
|
||||||
|
sudo $installdir/bin/syslogSetup.sh uninstall >/dev/null 2>&1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -x /sbin/chkconfig ]; then
|
||||||
|
/sbin/chkconfig infinidb off > /dev/null 2>&1
|
||||||
|
/sbin/chkconfig --del infinidb > /dev/null 2>&1
|
||||||
|
elif [ -x /usr/sbin/update-rc.d ]; then
|
||||||
|
/usr/sbin/update-rc.d -f infinidb remove > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $quiet != 1 ]; then
|
||||||
|
#make copy of Calpont.xml
|
||||||
|
/bin/cp -f $installdir/etc/Calpont.xml $installdir/etc/Calpont.xml.rpmsave > /dev/null 2>&1
|
||||||
|
/bin/cp -f $installdir/mysql/my.cnf $installdir/mysql/my.cnf.rpmsave > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#umount file systems
|
||||||
|
if [ $user = "root" ]; then
|
||||||
|
rm -f $installdir/data*/OAMdbrootCheck > /dev/null 2>&1
|
||||||
|
else
|
||||||
|
sudo rm -f $installdir/data*/OAMdbrootCheck > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#tell user to run post configure script
|
||||||
|
echo " "
|
||||||
|
echo "Calpont uninstall completed"
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
70
export/bin/remote_command.sh
Executable file
70
export/bin/remote_command.sh
Executable file
@ -0,0 +1,70 @@
|
|||||||
|
#!/usr/bin/expect
|
||||||
|
#
|
||||||
|
# $Id: remote_command.sh 3495 2012-12-17 22:51:40Z dhill $
|
||||||
|
#
|
||||||
|
# Remote command execution script to another server
|
||||||
|
# Argument 1 - Remote Server Host Name or IP address
|
||||||
|
# Argument 2 - Remote Server password
|
||||||
|
# Argument 3 - Command
|
||||||
|
# Argument 4 - debug flag
|
||||||
|
# Argument 5 - Remote user name (optional)
|
||||||
|
# Argument 6 - Force a tty to be allocated (optional)
|
||||||
|
set stty_init {cols 512 -opost};
|
||||||
|
set timeout 30
|
||||||
|
set SERVER [lindex $argv 0]
|
||||||
|
set PASSWORD [lindex $argv 1]
|
||||||
|
set COMMAND [lindex $argv 2]
|
||||||
|
set DEBUG [lindex $argv 3]
|
||||||
|
|
||||||
|
if {[info exists env(USER)]} {
|
||||||
|
set USERNAME $env(USER)
|
||||||
|
} else {
|
||||||
|
set USERNAME "root"
|
||||||
|
}
|
||||||
|
|
||||||
|
set UNM [lindex $argv 4]
|
||||||
|
if { $UNM != "" && $UNM != "-" } {
|
||||||
|
set USERNAME "$UNM"
|
||||||
|
}
|
||||||
|
set TTY ""
|
||||||
|
set TTYOPT [lindex $argv 5]
|
||||||
|
if { $TTYOPT != "" } {
|
||||||
|
set TTY "-t"
|
||||||
|
}
|
||||||
|
log_user $DEBUG
|
||||||
|
spawn -noecho /bin/bash
|
||||||
|
expect -re {[$#] }
|
||||||
|
|
||||||
|
if { $PASSWORD == "ssh" } {
|
||||||
|
set PASSWORD ""
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# send command
|
||||||
|
#
|
||||||
|
send "ssh $TTY $USERNAME@$SERVER $COMMAND\n"
|
||||||
|
expect {
|
||||||
|
"Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit 1}
|
||||||
|
"service not known" { send_user " FAILED: Invalid Host\n" ; exit 1}
|
||||||
|
"ssh: connect to host" { send_user " FAILED: Invalid Host\n" ; exit 1 }
|
||||||
|
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
"authenticity" { send "yes\n"
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
-re {[$#] } { exit 0 }
|
||||||
|
}
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { exit 0 }
|
||||||
|
"Permission denied" { send_user " FAILED: Invalid password\n" ; exit 1 }
|
||||||
|
"(y or n)" { send "y\n"
|
||||||
|
expect -re {[$#] } { exit 0 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exit 0
|
||||||
|
|
53
export/bin/remote_command_verify.sh
Executable file
53
export/bin/remote_command_verify.sh
Executable file
@ -0,0 +1,53 @@
|
|||||||
|
#!/usr/bin/expect
|
||||||
|
#
|
||||||
|
# $Id: remote_commend.sh 421 2007-04-05 15:46:55Z dhill $
|
||||||
|
#
|
||||||
|
# Remote command execution script to another server
|
||||||
|
# Argument 1 - Remote Server Host Name or IP address
|
||||||
|
# Argument 2 - Remote Server root password
|
||||||
|
# Argument 3 - Command
|
||||||
|
# Argument 4 - Good Response
|
||||||
|
# Argument 5 - Bad Response
|
||||||
|
# Argument 6 - timeout
|
||||||
|
# Argument 7 - Debug flag
|
||||||
|
set timeout 30
|
||||||
|
set SERVER [lindex $argv 0]
|
||||||
|
set USERNAME [lindex $argv 1]
|
||||||
|
set PASSWORD [lindex $argv 2]
|
||||||
|
set COMMAND [lindex $argv 3]
|
||||||
|
set GOOD_RESPONSE [lindex $argv 4]
|
||||||
|
set BAD_RESPONSE [lindex $argv 5]
|
||||||
|
set timeout [lindex $argv 6]
|
||||||
|
set DEBUG [lindex $argv 7]
|
||||||
|
log_user $DEBUG
|
||||||
|
spawn -noecho /bin/bash
|
||||||
|
expect -re {[$#] }
|
||||||
|
#
|
||||||
|
# send command
|
||||||
|
#
|
||||||
|
send "ssh $USERNAME@$SERVER '$COMMAND'\n"
|
||||||
|
expect {
|
||||||
|
-re "authenticity" { send "yes\n"
|
||||||
|
expect {
|
||||||
|
timeout { send_user "TIMEOUT\n" ; exit 2 }
|
||||||
|
-re "word: " { send "$PASSWORD\n" } abort
|
||||||
|
}
|
||||||
|
}
|
||||||
|
timeout { send_user "TIMEOUT\n" ; exit 2 }
|
||||||
|
-re "service not known" { send_user "FAILED: Invalid Host\n" ; exit 1 }
|
||||||
|
-re "Permission denied" { send_user "FAILED: Invalid Password\n" ; exit 1 }
|
||||||
|
-re "word: " { send "$PASSWORD\n" } abort
|
||||||
|
-re $GOOD_RESPONSE { send_user " " ; exit 0 }
|
||||||
|
-re $BAD_RESPONSE { send_user "FAILED\n" ; exit 1 }
|
||||||
|
-re "parser error" { send_user "FAILED: System Calpont.xml parse error\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
expect {
|
||||||
|
timeout { send_user "FAILED-TIMEOUT\n" ; exit 1 }
|
||||||
|
-re $GOOD_RESPONSE { send_user " " ; exit 0 }
|
||||||
|
-re $BAD_RESPONSE { send_user "FAILED\n" ; exit 1 }
|
||||||
|
-re "No such file" { send_user "FAILED\n" ; exit 1 }
|
||||||
|
-re "parser error" { send_user "FAILED: System Calpont.xml parse error\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
|
||||||
|
exit 1
|
||||||
|
|
53
export/bin/remote_scp_get.sh
Executable file
53
export/bin/remote_scp_get.sh
Executable file
@ -0,0 +1,53 @@
|
|||||||
|
#!/usr/bin/expect
|
||||||
|
#
|
||||||
|
# $Id: remote_commend.sh 421 2007-04-05 15:46:55Z dhill $
|
||||||
|
#
|
||||||
|
# Remote command execution script to another server
|
||||||
|
# Argument 1 - Remote Server Host Name or IP address
|
||||||
|
# Argument 2 - Remote Server root password
|
||||||
|
# Argument 3 - Command
|
||||||
|
set timeout 30
|
||||||
|
set USERNAME $env(USER)"@"
|
||||||
|
set SERVER [lindex $argv 0]
|
||||||
|
set PASSWORD [lindex $argv 1]
|
||||||
|
set FILE [lindex $argv 2]
|
||||||
|
set DEBUG [lindex $argv 3]
|
||||||
|
log_user $DEBUG
|
||||||
|
spawn -noecho /bin/bash
|
||||||
|
|
||||||
|
if { $PASSWORD == "ssh" } {
|
||||||
|
set PASSWORD ""
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# send command
|
||||||
|
#
|
||||||
|
expect -re {[$#] }
|
||||||
|
send "scp $USERNAME$SERVER:$FILE .\n"
|
||||||
|
expect {
|
||||||
|
"authenticity" { send "yes\n"
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"service not known" { send_user "FAILED: Invalid Host\n" ; exit 1 }
|
||||||
|
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
|
||||||
|
"Connection timed out" { send_user "FAILED: Connection timed out\n" ; exit 1 }
|
||||||
|
"lost connection" { send_user "FAILED: Connection refused\n" ; exit 1 }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
expect {
|
||||||
|
"100%" { send_user "DONE\n" }
|
||||||
|
"scp:" { send_user "FAILED\n" ; exit 1 }
|
||||||
|
"Permission denied" { send_user "FAILED: Invalid password\n" ; exit 1 }
|
||||||
|
"No such file or directory" { send_user "FAILED: No such file or directory\n" ; exit 1 }
|
||||||
|
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
#sleep to make sure it's finished
|
||||||
|
sleep 5
|
||||||
|
exit 0
|
||||||
|
|
54
export/bin/remote_scp_put.sh
Executable file
54
export/bin/remote_scp_put.sh
Executable file
@ -0,0 +1,54 @@
|
|||||||
|
#!/usr/bin/expect
|
||||||
|
#
|
||||||
|
# $Id: remote_commend.sh 421 2007-04-05 15:46:55Z dhill $
|
||||||
|
#
|
||||||
|
# Remote command execution script to another server
|
||||||
|
# Argument 1 - Remote Server Host Name or IP address
|
||||||
|
# Argument 2 - Remote Server root password
|
||||||
|
# Argument 3 - Command
|
||||||
|
set timeout 30
|
||||||
|
set USERNAME $env(USER)"@"
|
||||||
|
set SERVER [lindex $argv 0]
|
||||||
|
set PASSWORD [lindex $argv 1]
|
||||||
|
set FILE [lindex $argv 2]
|
||||||
|
set DEBUG [lindex $argv 3]
|
||||||
|
log_user $DEBUG
|
||||||
|
spawn -noecho /bin/bash
|
||||||
|
|
||||||
|
if { $PASSWORD == "ssh" } {
|
||||||
|
set PASSWORD ""
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# send command
|
||||||
|
#
|
||||||
|
expect -re "# "
|
||||||
|
send "scp $FILE $USERNAME$SERVER:$FILE\n"
|
||||||
|
expect {
|
||||||
|
-re "authenticity" { send "yes\n"
|
||||||
|
expect {
|
||||||
|
-re "word: " { send "$PASSWORD\n" }
|
||||||
|
-re "passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-re "service not known" { send_user "FAILED: Invalid Host\n" ; exit 1 }
|
||||||
|
-re "Connection refused" { send_user "FAILED: Connection refused\n" ; exit 1 }
|
||||||
|
-re "Connection timed out" { send_user "FAILED: Connection timed out\n" ; exit 1 }
|
||||||
|
-re "lost connection" { send_user "FAILED: Connection refused\n" ; exit 1 }
|
||||||
|
-re "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
-re "word: " { send "$PASSWORD\n" }
|
||||||
|
-re "passphrase" { send "$PASSWORD\n" }
|
||||||
|
-re "WARNING:" { send "rm -f /root/.ssh/known_hosts" ; exit 1 }
|
||||||
|
}
|
||||||
|
expect {
|
||||||
|
-re "100%" { send_user "DONE\n" }
|
||||||
|
-re "scp:" { send_user "FAILED\n" ; exit 1 }
|
||||||
|
-re "Permission denied" { send_user "FAILED: Invalid password\n" ; exit 1 }
|
||||||
|
-re "No such file or directory" { send_user "FAILED: Invalid file\n" ; exit 1 }
|
||||||
|
-re "Connection refused" { send_user "FAILED: Connection refused\n" ; exit 1 }
|
||||||
|
-re "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
#sleep to make sure it's finished
|
||||||
|
sleep 5
|
||||||
|
exit 0
|
||||||
|
|
89
export/bin/remotessh.exp
Executable file
89
export/bin/remotessh.exp
Executable file
@ -0,0 +1,89 @@
|
|||||||
|
set PROMPT "(\\$|#) "
|
||||||
|
|
||||||
|
proc auto_ssh_command { username password server commandstr } {
|
||||||
|
global PROMPT
|
||||||
|
|
||||||
|
#
|
||||||
|
# send command
|
||||||
|
#
|
||||||
|
send "ssh -t $username@$server $commandstr\n"
|
||||||
|
expect {
|
||||||
|
-re "Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit 1}
|
||||||
|
-re "service not known" { send_user " FAILED: Invalid Host\n" ; exit 1}
|
||||||
|
-re "ssh: connect to host" { send_user " FAILED: Invalid Host\n" ; exit 1 }
|
||||||
|
-re "Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
|
||||||
|
-re "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
-re "authenticity" { send "yes\n"
|
||||||
|
expect {
|
||||||
|
-re "word: " { send "$password\n" } abort
|
||||||
|
-re "passphrase" { send "$password\n" } abort
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-re "word: " { send "$password\n" } abort
|
||||||
|
-re "passphrase" { send "$password\n" } abort
|
||||||
|
}
|
||||||
|
|
||||||
|
set needsudopwd 0
|
||||||
|
expect {
|
||||||
|
-re $PROMPT { exit 0 }
|
||||||
|
-re "Permission denied, please try again" { send_user " FAILED: Invalid password\n" ; exit 1 }
|
||||||
|
-re ": Permission denied" { send_user " FAILED: Privilege error\n" ; exit 1 }
|
||||||
|
-re "(y or n)" { send "y\n"
|
||||||
|
expect -re $PROMPT { exit 0 }
|
||||||
|
}
|
||||||
|
-re "sudo\\] password for $username: " {
|
||||||
|
send "$password\n";
|
||||||
|
set needsudopwd 1
|
||||||
|
} abort
|
||||||
|
}
|
||||||
|
|
||||||
|
if {$needsudopwd} {
|
||||||
|
expect {
|
||||||
|
-re $PROMPT { exit 0 }
|
||||||
|
-re "try again" { send_user " FAILED: Invalid sudo password\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
proc auto_scp_command { username password server srcpath destpath } {
|
||||||
|
global PROMPT
|
||||||
|
send "scp $srcpath $username@$server:$destpath\n"
|
||||||
|
expect {
|
||||||
|
-re "Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit 1}
|
||||||
|
-re "service not known" { send_user " FAILED: Invalid Host\n" ; exit 1}
|
||||||
|
-re "ssh: connect to host" { send_user " FAILED: Invalid Host\n" ; exit 1 }
|
||||||
|
-re "Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
|
||||||
|
-re "Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
-re "authenticity" { send "yes\n"
|
||||||
|
expect {
|
||||||
|
-re "word: " { send "$password\n" } abort
|
||||||
|
-re "passphrase" { send "$password\n" } abort
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-re "word: " { send "$password\n" } abort
|
||||||
|
-re "passphrase" { send "$password\n" } abort
|
||||||
|
}
|
||||||
|
|
||||||
|
expect {
|
||||||
|
-re $PROMPT { exit 0 }
|
||||||
|
-re "Permission denied, please try again" { send_user " FAILED: Invalid password\n" ; exit 1 }
|
||||||
|
-re ": Permission denied" { send_user " FAILED: Privilege error\n" ; exit 1 }
|
||||||
|
-re "(y or n)" { send "y\n"
|
||||||
|
expect -re $PROMPT { exit 0 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
-re "100%" { send_user "DONE" } abort
|
||||||
|
-re "directory" { send_user "ERROR\n" ;
|
||||||
|
send_user "\n*** Installation ERROR\n" ;
|
||||||
|
exit 1 }
|
||||||
|
-re "Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
|
||||||
|
-re "No such file or directory" { send_user "ERROR: Invalid package\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
|
||||||
|
send_user "\n"
|
||||||
|
# sleep to make sure it's finished
|
||||||
|
sleep 5
|
||||||
|
}
|
54
export/bin/rsync.sh
Executable file
54
export/bin/rsync.sh
Executable file
@ -0,0 +1,54 @@
|
|||||||
|
#!/usr/bin/expect
|
||||||
|
#
|
||||||
|
# $Id: rsync.sh 2915 2012-05-23 16:01:34Z dhill $
|
||||||
|
#
|
||||||
|
# Remote Install RPM and custom OS files from postConfigure script
|
||||||
|
# Argument 1 - Remote Server Host Name or IP address
|
||||||
|
# Argument 2 - Root Password of remote server
|
||||||
|
# Argument 3 - Debug flag 1 for on, 0 for off
|
||||||
|
set USERNAME "root@"
|
||||||
|
set SERVER [lindex $argv 0]
|
||||||
|
set PASSWORD [lindex $argv 1]
|
||||||
|
set INSTALLDIR [lindex $argv 2]
|
||||||
|
set DEBUG 0
|
||||||
|
set DEBUG [lindex $argv 3]
|
||||||
|
log_user $DEBUG
|
||||||
|
spawn -noecho /bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
if { $PASSWORD == "ssh" } {
|
||||||
|
set USERNAME ""
|
||||||
|
set PASSWORD ""
|
||||||
|
}
|
||||||
|
|
||||||
|
set COMMAND "rsync -vopgr -e ssh --exclude=mysql/ --exclude=test/ --exclude=infinidb_vtable/ --exclude=infinidb_querystats/ --exclude=calpontsys/ --include=*/ --include=*/* --exclude=* $INSTALLDIR/mysql/db/ $USERNAME$SERVER:$INSTALLDIR/mysql/db/"
|
||||||
|
|
||||||
|
#
|
||||||
|
# run command
|
||||||
|
#
|
||||||
|
set timeout 60
|
||||||
|
send "$COMMAND\n"
|
||||||
|
expect {
|
||||||
|
-re "Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit -1}
|
||||||
|
-re "service not known" { send_user " FAILED: Invalid Host\n" ; exit -1}
|
||||||
|
-re "ssh: connect to host" { send_user " FAILED: Invalid Host\n" ; exit -1 }
|
||||||
|
-re "authenticity" { send "yes\n"
|
||||||
|
expect {
|
||||||
|
-re "word: " { send "$PASSWORD\n" }
|
||||||
|
-re "passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-re "word: " { send "$PASSWORD\n" }
|
||||||
|
-re "passphrase" { send "$PASSWORD\n" }
|
||||||
|
-re "failed" { send_user " FAILED: Failure, check tmp log\n" ; exit 1 }
|
||||||
|
-re "Permission denied" { send_user " FAILED: Invalid password\n" ; exit 1 }
|
||||||
|
-re "total size" { exit 0 }
|
||||||
|
}
|
||||||
|
expect {
|
||||||
|
-re "failed" { send_user " FAILED: Failure, check tmp log\n" ; exit 1 }
|
||||||
|
-re "Permission denied" { send_user " FAILED: Invalid password\n" ; exit 1 }
|
||||||
|
-re "total size" { exit 0 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
exit 0
|
67
export/bin/run.sh
Executable file
67
export/bin/run.sh
Executable file
@ -0,0 +1,67 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
|
||||||
|
usage="usage: run.sh [-vh] [-s sleep] [-t tries] executable"
|
||||||
|
|
||||||
|
vflg=0
|
||||||
|
sopt="5"
|
||||||
|
topt="0"
|
||||||
|
|
||||||
|
while getopts "vs:t:h" flag; do
|
||||||
|
case $flag in
|
||||||
|
v) vflg=1
|
||||||
|
;;
|
||||||
|
s) sopt=$OPTARG
|
||||||
|
;;
|
||||||
|
t) topt=$OPTARG
|
||||||
|
;;
|
||||||
|
h) echo $usage
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
\? | *) echo $usage 1>&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
shift $((OPTIND - 1))
|
||||||
|
|
||||||
|
exename="$1"
|
||||||
|
|
||||||
|
if [ -z "$exename" ]; then
|
||||||
|
echo $usage 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
shift
|
||||||
|
args="$@"
|
||||||
|
|
||||||
|
retries=1
|
||||||
|
keep_going=1
|
||||||
|
|
||||||
|
if [ $vflg -gt 0 ]; then
|
||||||
|
echo "starting $exename $args with sleep=$sopt and tries=$topt"
|
||||||
|
fi
|
||||||
|
|
||||||
|
while [ $keep_going -ne 0 ]; do
|
||||||
|
$exename $args
|
||||||
|
if [ -e /tmp/StopCalpont ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
if [ $topt -gt 0 -a $retries -ge $topt ]; then
|
||||||
|
keep_going=0
|
||||||
|
fi
|
||||||
|
((retries++))
|
||||||
|
if [ $keep_going -ne 0 -a $sopt -gt 0 ]; then
|
||||||
|
sleep $sopt
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ $vflg -gt 0 ]; then
|
||||||
|
echo "$exename exceeded its try count, quiting!" 1>&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 1
|
||||||
|
|
119
export/bin/slave-rep-columnstore.sh
Executable file
119
export/bin/slave-rep-columnstore.sh
Executable file
@ -0,0 +1,119 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
# generic InfiniDB Slave Replication script.
|
||||||
|
#
|
||||||
|
# Notes: This script gets run by ProcMon during installs and upgrades:
|
||||||
|
|
||||||
|
# check log for error
|
||||||
|
checkForError() {
|
||||||
|
grep ERROR /tmp/slave-rep-status.log > /tmp/error.check
|
||||||
|
if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then
|
||||||
|
echo "ERROR: check log file: /tmp/slave-rep-status.log"
|
||||||
|
rm -f /tmp/error.check
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
rm -f /tmp/error.check
|
||||||
|
}
|
||||||
|
|
||||||
|
prefix=/usr/local
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
pwprompt=
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
|
||||||
|
prefix="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then
|
||||||
|
password="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
pwprompt="--password=$password"
|
||||||
|
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
|
||||||
|
installdir="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
prefix=`dirname $installdir`
|
||||||
|
elif [ `expr -- "$arg" : '--masteripaddr='` -eq 15 ]; then
|
||||||
|
masteripaddr="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
elif [ `expr -- "$arg" : '--masterlogfile='` -eq 16 ]; then
|
||||||
|
masterlogfile="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
elif [ `expr -- "$arg" : '--masterlogpos='` -eq 15 ]; then
|
||||||
|
masterlogpos="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
elif [ `expr -- "$arg" : '--port='` -eq 7 ]; then
|
||||||
|
port="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
test -f $installdir/post/functions && . $installdir/post/functions
|
||||||
|
|
||||||
|
repUser="idbrep"
|
||||||
|
password="Calpont1"
|
||||||
|
|
||||||
|
>/tmp/slave-rep-status.log
|
||||||
|
|
||||||
|
#
|
||||||
|
# Run stop slave command
|
||||||
|
#
|
||||||
|
echo "Run stop slave command" >>/tmp/slave-rep-status.log
|
||||||
|
cat >/tmp/idb_slave-rep.sql <<EOD
|
||||||
|
stop slave;
|
||||||
|
EOD
|
||||||
|
|
||||||
|
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
||||||
|
|
||||||
|
#
|
||||||
|
# Run Change Master Command
|
||||||
|
#
|
||||||
|
echo "Run Change Master Command" >>/tmp/slave-rep-status.log
|
||||||
|
cat >/tmp/idb_slave-rep.sql <<EOD
|
||||||
|
CHANGE MASTER TO
|
||||||
|
MASTER_HOST='$masteripaddr',
|
||||||
|
MASTER_USER='$repUser',
|
||||||
|
MASTER_PASSWORD='$password',
|
||||||
|
MASTER_PORT=$port,
|
||||||
|
MASTER_LOG_FILE='$masterlogfile',
|
||||||
|
MASTER_LOG_POS=$masterlogpos;
|
||||||
|
MASTER_USE_GTID=$masterlogpos;
|
||||||
|
|
||||||
|
EOD
|
||||||
|
|
||||||
|
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
||||||
|
|
||||||
|
#
|
||||||
|
# Run start slave command
|
||||||
|
#
|
||||||
|
echo "Run start slave command" >>/tmp/slave-rep-status.log
|
||||||
|
cat >/tmp/idb_slave-rep.sql <<EOD
|
||||||
|
start slave;
|
||||||
|
EOD
|
||||||
|
|
||||||
|
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
||||||
|
|
||||||
|
#
|
||||||
|
# Run SHOW SLAVE STATUS
|
||||||
|
#
|
||||||
|
echo "Run SHOW SLAVE STATUS to node log" >>/tmp/slave-rep-status.log
|
||||||
|
cat >/tmp/idb_slave-rep.sql <<EOD
|
||||||
|
SHOW SLAVE STATUS\G
|
||||||
|
EOD
|
||||||
|
|
||||||
|
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
|
||||||
|
#alls good, 'OK' for success
|
||||||
|
echo "OK"
|
||||||
|
exit 0
|
119
export/bin/slave-rep-infinidb.sh
Executable file
119
export/bin/slave-rep-infinidb.sh
Executable file
@ -0,0 +1,119 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
# generic InfiniDB Slave Replication script.
|
||||||
|
#
|
||||||
|
# Notes: This script gets run by ProcMon during installs and upgrades:
|
||||||
|
|
||||||
|
# check log for error
|
||||||
|
checkForError() {
|
||||||
|
grep ERROR /tmp/slave-rep-status.log > /tmp/error.check
|
||||||
|
if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then
|
||||||
|
echo "ERROR: check log file: /tmp/slave-rep-status.log"
|
||||||
|
rm -f /tmp/error.check
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
rm -f /tmp/error.check
|
||||||
|
}
|
||||||
|
|
||||||
|
prefix=/usr/local
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
pwprompt=
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
|
||||||
|
prefix="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then
|
||||||
|
password="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
pwprompt="--password=$password"
|
||||||
|
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
|
||||||
|
installdir="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
prefix=`dirname $installdir`
|
||||||
|
elif [ `expr -- "$arg" : '--masteripaddr='` -eq 15 ]; then
|
||||||
|
masteripaddr="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
elif [ `expr -- "$arg" : '--masterlogfile='` -eq 16 ]; then
|
||||||
|
masterlogfile="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
elif [ `expr -- "$arg" : '--masterlogpos='` -eq 15 ]; then
|
||||||
|
masterlogpos="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
elif [ `expr -- "$arg" : '--port='` -eq 7 ]; then
|
||||||
|
port="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
test -f $installdir/post/functions && . $installdir/post/functions
|
||||||
|
|
||||||
|
repUser="idbrep"
|
||||||
|
password="Calpont1"
|
||||||
|
|
||||||
|
>/tmp/slave-rep-status.log
|
||||||
|
|
||||||
|
#
|
||||||
|
# Run stop slave command
|
||||||
|
#
|
||||||
|
echo "Run stop slave command" >>/tmp/slave-rep-status.log
|
||||||
|
cat >/tmp/idb_slave-rep.sql <<EOD
|
||||||
|
stop slave;
|
||||||
|
EOD
|
||||||
|
|
||||||
|
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
||||||
|
|
||||||
|
#
|
||||||
|
# Run Change Master Command
|
||||||
|
#
|
||||||
|
echo "Run Change Master Command" >>/tmp/slave-rep-status.log
|
||||||
|
cat >/tmp/idb_slave-rep.sql <<EOD
|
||||||
|
CHANGE MASTER TO
|
||||||
|
MASTER_HOST='$masteripaddr',
|
||||||
|
MASTER_USER='$repUser',
|
||||||
|
MASTER_PASSWORD='$password',
|
||||||
|
MASTER_PORT=$port,
|
||||||
|
MASTER_LOG_FILE='$masterlogfile',
|
||||||
|
MASTER_LOG_POS=$masterlogpos;
|
||||||
|
MASTER_USE_GTID=$masterlogpos;
|
||||||
|
|
||||||
|
EOD
|
||||||
|
|
||||||
|
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
||||||
|
|
||||||
|
#
|
||||||
|
# Run start slave command
|
||||||
|
#
|
||||||
|
echo "Run start slave command" >>/tmp/slave-rep-status.log
|
||||||
|
cat >/tmp/idb_slave-rep.sql <<EOD
|
||||||
|
start slave;
|
||||||
|
EOD
|
||||||
|
|
||||||
|
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
||||||
|
|
||||||
|
#
|
||||||
|
# Run SHOW SLAVE STATUS
|
||||||
|
#
|
||||||
|
echo "Run SHOW SLAVE STATUS to node log" >>/tmp/slave-rep-status.log
|
||||||
|
cat >/tmp/idb_slave-rep.sql <<EOD
|
||||||
|
SHOW SLAVE STATUS\G
|
||||||
|
EOD
|
||||||
|
|
||||||
|
cat /tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_slave-rep.sql >>/tmp/slave-rep-status.log
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
|
||||||
|
#alls good, 'OK' for success
|
||||||
|
echo "OK"
|
||||||
|
exit 0
|
36
export/bin/startupTests.sh
Executable file
36
export/bin/startupTests.sh
Executable file
@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# $Id: startupTests.sh 2937 2012-05-30 18:17:09Z rdempsey $
|
||||||
|
#
|
||||||
|
# startupTests - perform sanity testing on system DB at system startup time
|
||||||
|
# called by Process-Monitor
|
||||||
|
|
||||||
|
if [ -z "$INFINIDB_INSTALL_DIR" ]; then
|
||||||
|
test -f /etc/default/infinidb && . /etc/default/infinidb
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$INFINIDB_INSTALL_DIR" ]; then
|
||||||
|
INFINIDB_INSTALL_DIR=/usr/local/MariaDB/Columnstore
|
||||||
|
fi
|
||||||
|
|
||||||
|
export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR
|
||||||
|
|
||||||
|
test -f $INFINIDB_INSTALL_DIR/post/functions && . $INFINIDB_INSTALL_DIR/post/functions
|
||||||
|
|
||||||
|
for testScript in $INFINIDB_INSTALL_DIR/post/*.sh; do
|
||||||
|
if [ -x $testScript ]; then
|
||||||
|
eval $testScript
|
||||||
|
rc=$?
|
||||||
|
if [ $rc -ne 0 ]; then
|
||||||
|
cplogger -c 51 $testScript
|
||||||
|
echo "FAILED, check Critical log for additional info"
|
||||||
|
exit $rc
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo "OK"
|
||||||
|
|
||||||
|
cplogger -i 54
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
262
export/bin/syslogSetup.sh
Executable file
262
export/bin/syslogSetup.sh
Executable file
@ -0,0 +1,262 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# $Id: syslogSetup.sh 421 2007-04-05 15:46:55Z dhill $
|
||||||
|
#
|
||||||
|
# syslogSetup.sh - install / uninstall Calpont InfiniDB system logging configuration
|
||||||
|
|
||||||
|
# no point in going any further if not root... (only works in bash)
|
||||||
|
test $EUID -eq 0 || exit 0
|
||||||
|
|
||||||
|
prefix=/usr/local
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
syslog_conf=nofile
|
||||||
|
rsyslog7=0
|
||||||
|
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
|
||||||
|
prefix="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
|
||||||
|
installdir="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
prefix=`dirname $installdir`
|
||||||
|
elif [ `expr -- "$arg" : '--..*'` -ge 3 ]; then
|
||||||
|
echo "ignoring unknown argument: $arg" 1>&2
|
||||||
|
elif [ `expr -- "$arg" : '--'` -eq 2 ]; then
|
||||||
|
shift
|
||||||
|
break
|
||||||
|
else
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then
|
||||||
|
export INFINIDB_INSTALL_DIR=$installdir
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFINIDB_INSTALL_DIR/lib
|
||||||
|
fi
|
||||||
|
|
||||||
|
columnstoreSyslogFile=$installdir/bin/columnstoreSyslog
|
||||||
|
columnstoreSyslogFile7=$installdir/bin/columnstoreSyslog7
|
||||||
|
|
||||||
|
checkSyslog() {
|
||||||
|
#check which syslog daemon is being used
|
||||||
|
#first check which is running
|
||||||
|
daemon="nodaemon"
|
||||||
|
cnt=`ps -ef | grep -v grep | grep syslog-ng | wc -l`
|
||||||
|
if [ $cnt -gt 0 ]; then
|
||||||
|
daemon="syslog-ng"
|
||||||
|
else cnt=`ps -ef | grep -v grep | grep rsyslog | wc -l`
|
||||||
|
if [ $cnt -ge 1 ]; then
|
||||||
|
daemon="rsyslog"
|
||||||
|
else cnt=`ps -ef | grep -v grep | grep syslogd | wc -l`
|
||||||
|
if [ $cnt -ge 1 ]; then
|
||||||
|
if [ "$daemon" != "rsyslog" ]; then
|
||||||
|
daemon=syslog
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
#if none running, check installed
|
||||||
|
if [ "$daemon" = "nodaemon" ]; then
|
||||||
|
if [ -f /etc/init.d/syslog ]; then
|
||||||
|
daemon="syslog"
|
||||||
|
/etc/init.d/syslog start > /dev/null 2>&1
|
||||||
|
elif [ -f /etc/init.d/rsyslog ]; then
|
||||||
|
daemon="rsyslog"
|
||||||
|
/etc/init.d/rsyslog start > /dev/null 2>&1
|
||||||
|
elif [ -f /etc/init.d/syslog-ng ]; then
|
||||||
|
daemon="syslog-ng"
|
||||||
|
/etc/init.d/syslog-ng start > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
#if none running or installed, exit
|
||||||
|
if [ "$daemon" = "nodaemon" ]; then
|
||||||
|
echo ""
|
||||||
|
echo "*** No System Logging Application found (syslog, rsyslog, or syslog-ng)"
|
||||||
|
echo "*** For InfiniDB System Logging functionality, install a System Logging package and reinstall InfiniDB"
|
||||||
|
echo ""
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#check which syslog config file is installed
|
||||||
|
if [ "$daemon" = "syslog-ng" ]; then
|
||||||
|
if [ -f /etc/syslog-ng/syslog-ng.conf ]; then
|
||||||
|
syslog_conf=/etc/syslog-ng/syslog-ng.conf
|
||||||
|
columnstoreSyslogFile=$installdir/bin/columnstoreSyslog-ng
|
||||||
|
echo ""
|
||||||
|
echo "System logging being used: syslog-ng"
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
elif [ "$daemon" = "rsyslog" ]; then
|
||||||
|
#check if rsyslog version 7 or greater
|
||||||
|
rsyslogd -v > /tmp/rsyslog.ver
|
||||||
|
cnt=`grep "rsyslogd 7" /tmp/rsyslog.ver | wc -l`
|
||||||
|
if [ $cnt -gt 0 ]; then
|
||||||
|
rsyslog7=1
|
||||||
|
fi
|
||||||
|
cnt=`grep "rsyslogd 8" /tmp/rsyslog.ver | wc -l`
|
||||||
|
if [ $cnt -gt 0 ]; then
|
||||||
|
rsyslog7=1
|
||||||
|
fi
|
||||||
|
cnt=`grep "rsyslogd 9" /tmp/rsyslog.ver | wc -l`
|
||||||
|
if [ $cnt -gt 0 ]; then
|
||||||
|
rsyslog7=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f /etc/rsyslog.conf ]; then
|
||||||
|
cnt=`grep "/etc/rsyslog.d/" /etc/rsyslog.conf | wc -l`
|
||||||
|
if [ $cnt -gt 0 ]; then
|
||||||
|
if [ $rsyslog7 == 1 ]; then
|
||||||
|
syslog_conf=/etc/rsyslog.d/49-calpont.conf
|
||||||
|
else
|
||||||
|
syslog_conf=/etc/rsyslog.d/calpont.conf
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
syslog_conf=/etc/rsyslog.conf
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
echo "System logging being used: rsyslog"
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
elif [ "$daemon" = "syslog" ]; then
|
||||||
|
if [ -f /etc/syslog.conf ]; then
|
||||||
|
syslog_conf=/etc/syslog.conf
|
||||||
|
echo ""
|
||||||
|
echo "System logging being used: syslog"
|
||||||
|
echo ""
|
||||||
|
elif [ -d /etc/syslog-ng/syslog-ng.conf ]; then
|
||||||
|
syslog_conf=/etc/syslog-ng/syslog-ng.conf
|
||||||
|
columnstoreSyslogFile=$installdir/bin/columnstoreSyslog-ng
|
||||||
|
echo ""
|
||||||
|
echo "System logging being used: syslog-ng"
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo "*** No System Logging Application found (syslog, rsyslog, or syslog-ng)"
|
||||||
|
echo "*** For InfiniDB System Logging functionality, install a System Logging package and reinstall InfiniDB"
|
||||||
|
echo ""
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
install() {
|
||||||
|
checkSyslog
|
||||||
|
if [ ! -z "$syslog_conf" ] ; then
|
||||||
|
$installdir/bin/setConfig -d Installation SystemLogConfigFile ${syslog_conf} >/dev/null 2>&1
|
||||||
|
if [ "$syslog_conf" != /etc/rsyslog.d/calpont.conf ]; then
|
||||||
|
rm -f ${syslog_conf}.calpontSave
|
||||||
|
cp ${syslog_conf} ${syslog_conf}.calpontSave >/dev/null 2>&1
|
||||||
|
sed -i '/# Calpont/,$d' ${syslog_conf}.calpontSave > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
egrep -qs 'Calpont Database Platform Logging' ${syslog_conf}
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
#set the syslog for calpont logging
|
||||||
|
# remove older version incase it was installed by previous build
|
||||||
|
rm -rf /etc/rsyslog.d/calpont.conf
|
||||||
|
if [ $rsyslog7 == 1 ]; then
|
||||||
|
rm -f /etc/rsyslog.d/49-calpont.conf
|
||||||
|
cat ${columnstoreSyslogFile7} >> ${syslog_conf}
|
||||||
|
chown syslog:adm /var/log/Calpont
|
||||||
|
else
|
||||||
|
cat ${columnstoreSyslogFile} >> ${syslog_conf}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
pkill -hup syslogd > /dev/null 2>&1
|
||||||
|
pkill -hup syslog-ng > /dev/null 2>&1
|
||||||
|
pkill -hup rsyslogd > /dev/null 2>&1
|
||||||
|
/etc/init.d/rsyslog restart > /dev/null 2>&1
|
||||||
|
systemctl restart rsyslog.service > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
uninstall() {
|
||||||
|
checkSyslog
|
||||||
|
if [ ! -z "$syslog_conf" ] ; then
|
||||||
|
if [ "$syslog_conf" != /etc/rsyslog.d/calpont.conf ]; then
|
||||||
|
if [ "$syslog_conf" != /etc/rsyslog.d/49-calpont.conf ]; then
|
||||||
|
egrep -qs 'Calpont Database Platform Logging' ${syslog_conf}
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
if [ -f ${syslog_conf}.calpontSave ] ; then
|
||||||
|
#uninstall the syslog for calpont logging
|
||||||
|
mv -f ${syslog_conf} ${syslog_conf}.calpontBackup
|
||||||
|
mv -f ${syslog_conf}.calpontSave ${syslog_conf} >/dev/null 2>&1
|
||||||
|
if [ ! -f ${syslog_conf} ] ; then
|
||||||
|
cp ${syslog_conf}.calpontBackup ${syslog_conf}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
sed -i '/# Calpont/,$d' ${syslog_conf} > /dev/null 2>&1
|
||||||
|
else
|
||||||
|
rm -f "$syslog_conf"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
rm -f "$syslog_conf"
|
||||||
|
fi
|
||||||
|
|
||||||
|
pkill -hup syslogd > /dev/null 2>&1
|
||||||
|
pkill -hup syslog-ng > /dev/null 2>&1
|
||||||
|
/etc/init.d/rsyslog restart > /dev/null 2>&1
|
||||||
|
systemctl restart rsyslog.service > /dev/null 2>&1
|
||||||
|
|
||||||
|
$installdir/bin/setConfig -d Installation SystemLogConfigFile "unassigned"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
status() {
|
||||||
|
checkSyslog
|
||||||
|
if [ ! -z "$syslog_conf" ] ; then
|
||||||
|
egrep -qs 'Calpont Database Platform Logging' ${syslog_conf}
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo $syslog_conf
|
||||||
|
else
|
||||||
|
echo "No System Log Config File configured for InfiniDB System Logging"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
check() {
|
||||||
|
test -f $installdir/post/functions && . $installdir/post/functions
|
||||||
|
number=$RANDOM
|
||||||
|
cplogger -i 100 "InfiniDB Log Test: $number"
|
||||||
|
sleep 3
|
||||||
|
egrep -qs "InfiniDB Log Test: $number" /var/log/Calpont/info.log
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo "InfiniDB System Logging working"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "InfiniDB System Logging not working"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
install)
|
||||||
|
install
|
||||||
|
;;
|
||||||
|
uninstall)
|
||||||
|
uninstall
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
status
|
||||||
|
;;
|
||||||
|
check)
|
||||||
|
check
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo $"Usage: $0 {install|uninstall|status|check)"
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
/
|
161
export/bin/system_installer.sh
Executable file
161
export/bin/system_installer.sh
Executable file
@ -0,0 +1,161 @@
|
|||||||
|
#!/usr/bin/expect
|
||||||
|
#
|
||||||
|
# $Id: system_installer.sh 2804 2012-03-22 12:57:42Z pleblanc $
|
||||||
|
#
|
||||||
|
# Install RPM and custom OS files on system
|
||||||
|
# Argument 1 - Remote Module Name
|
||||||
|
# Argument 2 - Remote Server Host Name or IP address
|
||||||
|
# Argument 3 - Root Password of remote server
|
||||||
|
# Argument 4 - Package name being installed
|
||||||
|
# Argument 5 - Install Type, "initial" or "upgrade"
|
||||||
|
# Argument 6 - Debug flag 1 for on, 0 for off
|
||||||
|
set timeout 30
|
||||||
|
set USERNAME root
|
||||||
|
set MODULE [lindex $argv 0]
|
||||||
|
set SERVER [lindex $argv 1]
|
||||||
|
set PASSWORD [lindex $argv 2]
|
||||||
|
set RPMPACKAGE1 [lindex $argv 3]
|
||||||
|
set RPMPACKAGE2 [lindex $argv 4]
|
||||||
|
set RPMPACKAGE3 [lindex $argv 5]
|
||||||
|
set INSTALLTYPE [lindex $argv 6]
|
||||||
|
set DEBUG [lindex $argv 7]
|
||||||
|
log_user $DEBUG
|
||||||
|
spawn -noecho /bin/bash
|
||||||
|
#
|
||||||
|
if { $INSTALLTYPE == "initial" || $INSTALLTYPE == "uninstall" } {
|
||||||
|
#
|
||||||
|
# erase package
|
||||||
|
#
|
||||||
|
send_user "Erase InfiniDB Packages on Module "
|
||||||
|
expect -re {[$#] }
|
||||||
|
send "ssh $USERNAME@$SERVER 'rpm -e --nodeps --allmatches calpont >/dev/null 2>&1; rpm -e --nodeps --allmatches infinidb-enterprise >/dev/null 2>&1; rpm -e --nodeps --allmatches infinidb-libs infinidb-platform'\n"
|
||||||
|
expect {
|
||||||
|
"Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit }
|
||||||
|
"service not known" { send_user "FAILED: Invalid Host\n" ; exit }
|
||||||
|
"authenticity" { send "yes\n"
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
# password for ssh
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { send_user "DONE" }
|
||||||
|
"uninstall completed" { send_user "DONE" }
|
||||||
|
"ERROR dependencies" { send_user "ERROR: ERROR dependencies\n" ; exit -1 }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 }
|
||||||
|
"error: package" { send_user "INFO: Package not installed" }
|
||||||
|
"not installed" { send_user "INFO: Package not installed" }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
}
|
||||||
|
if { $INSTALLTYPE == "uninstall" } { exit 0 }
|
||||||
|
|
||||||
|
#
|
||||||
|
# send the package
|
||||||
|
#
|
||||||
|
expect -re {[$#] }
|
||||||
|
send_user "Copy New InfiniDB Packages to Module "
|
||||||
|
send "ssh $USERNAME@$SERVER 'rm -f /root/infinidb-*.rpm'\n"
|
||||||
|
expect "word: "
|
||||||
|
# password for ssh
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
# check return
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { }
|
||||||
|
}
|
||||||
|
send "scp $RPMPACKAGE1 $RPMPACKAGE2 $RPMPACKAGE3 $USERNAME@$SERVER:.\n"
|
||||||
|
expect "word: "
|
||||||
|
# send the password
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
# check return
|
||||||
|
expect {
|
||||||
|
"100%" { send_user "DONE" }
|
||||||
|
"scp" { send_user "ERROR\n" ;
|
||||||
|
send_user "\n*** Installation ERROR\n" ;
|
||||||
|
exit -1 }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 }
|
||||||
|
"No such file or directory" { send_user "ERROR: Invalid package\n" ; exit -1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
#
|
||||||
|
set timeout 60
|
||||||
|
if { $INSTALLTYPE == "initial"} {
|
||||||
|
#
|
||||||
|
# install package
|
||||||
|
#
|
||||||
|
send_user "Install InfiniDB Packages on Module "
|
||||||
|
send "ssh $USERNAME@$SERVER 'rpm -ivh $RPMPACKAGE1 $RPMPACKAGE2 $RPMPACKAGE3'\n"
|
||||||
|
expect "word: "
|
||||||
|
# password for ssh
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
# check return
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { send_user "DONE" }
|
||||||
|
"completed" { send_user "DONE" }
|
||||||
|
"ERROR dependencies" { send_user "ERROR: ERROR dependencies\n" ;
|
||||||
|
send_user "\n*** Installation ERROR\n" ;
|
||||||
|
exit -1 }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 }
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
#
|
||||||
|
# upgrade package
|
||||||
|
#
|
||||||
|
send_user "Upgrade InfiniDB Packages on Module "
|
||||||
|
send "ssh $USERNAME@$SERVER 'rpm -Uvh --noscripts $RPMPACKAGE1 $RPMPACKAGE2 $RPMPACKAGE3'\n"
|
||||||
|
expect "word: "
|
||||||
|
# password for ssh
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
# check return
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { send_user "DONE" }
|
||||||
|
"completed" { send_user "DONE" }
|
||||||
|
"already installed" { send_user "INFO: Already Installed\n" ; exit -1 }
|
||||||
|
"ERROR dependencies" { send_user "ERROR: ERROR dependencies\n" ;
|
||||||
|
send_user "\n*** Installation ERROR\n" ;
|
||||||
|
exit -1 }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
expect -re {[$#] }
|
||||||
|
send_user "\n"
|
||||||
|
set timeout 30
|
||||||
|
#
|
||||||
|
if { $INSTALLTYPE == "initial"} {
|
||||||
|
#
|
||||||
|
# copy over InfiniDB OS files
|
||||||
|
#
|
||||||
|
send_user "Copy InfiniDB OS files to Module "
|
||||||
|
send "scp /usr/local/MariaDB/Columnstore/local/etc/$MODULE/* $USERNAME@$SERVER:/usr/local/MariaDB/Columnstore/local/.\n"
|
||||||
|
expect "word: "
|
||||||
|
# send the password
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { send_user "DONE" }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 }
|
||||||
|
}
|
||||||
|
#
|
||||||
|
send_user "\n"
|
||||||
|
set timeout 120
|
||||||
|
#
|
||||||
|
# Start module installer to setup Customer OS files
|
||||||
|
#
|
||||||
|
send_user "Run Module Installer "
|
||||||
|
send "ssh $USERNAME@$SERVER '/usr/local/MariaDB/Columnstore/bin/module_installer.sh'\n"
|
||||||
|
expect "word: "
|
||||||
|
# send the password
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
expect {
|
||||||
|
"!!!Module" { send_user "DONE" }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit -1 }
|
||||||
|
"FAILED" { send_user "ERROR: missing OS file\n" ; exit -1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
}
|
||||||
|
#
|
||||||
|
send_user "\nInstallation Successfully Completed on '$MODULE'\n"
|
||||||
|
exit 0
|
||||||
|
|
12
export/bin/transactionLog
Executable file
12
export/bin/transactionLog
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#
|
||||||
|
# Calpont version with Daily running at midnight
|
||||||
|
#
|
||||||
|
|
||||||
|
SHELL=/bin/bash
|
||||||
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
MAILTO=root
|
||||||
|
HOME=/
|
||||||
|
|
||||||
|
# Translation Log Archiver, default to every 10 minutes
|
||||||
|
*/10 * * * * root /usr/local/Calpont/bin/transactionLogArchiver.sh
|
||||||
|
|
48
export/bin/transactionLogArchiver.sh
Executable file
48
export/bin/transactionLogArchiver.sh
Executable file
@ -0,0 +1,48 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# $Id: transactionLogArchiver.sh 1375 2009-04-30 13:53:06Z rdempsey $
|
||||||
|
|
||||||
|
DATE=`date +'%s'`
|
||||||
|
CDATA=/var/log/Calpont/data
|
||||||
|
|
||||||
|
if [ ! -d $CDATA/archive ]; then
|
||||||
|
echo "Installation error: $CDATA/archive is not a directory." 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f $CDATA/data_mods.log ]; then
|
||||||
|
# Don't bother rotating an empty log
|
||||||
|
if [ ! -s $CDATA/data_mods.log ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
cp $CDATA/data_mods.log $CDATA/archive >/dev/null 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Could not copy $CDATA/data_mods.log to $CDATA/archive" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# Is this a reportable/fatal error?
|
||||||
|
echo "No such file: $CDATA/data_mods.log" 1>&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -f $CDATA/data_mods.log >/dev/null 2>&1
|
||||||
|
touch $CDATA/data_mods.log >/dev/null 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Could not create $CDATA/data_mods.log" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
chmod 666 $CDATA/data_mods.log >/dev/null 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Could not set the perms on $CDATA/data_mods.log" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
pkill -HUP syslog >/dev/null 2>&1
|
||||||
|
|
||||||
|
mv $CDATA/archive/data_mods.log $CDATA/archive/data_mods.log.$DATE >/dev/null 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Could not move $CDATA/archive/data_mods.log to $CDATA/archive/data_mods.log.$DATE" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
444
export/bin/upgrade-columnstore.sh
Executable file
444
export/bin/upgrade-columnstore.sh
Executable file
@ -0,0 +1,444 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
# generic InfiniDB upgrade script.
|
||||||
|
#
|
||||||
|
# Notes: This script gets run every time InfiniDB starts up so it needs to be:
|
||||||
|
# 1) able to only do stuff once if needed and nothing if not needed
|
||||||
|
# 2) reasonably fast when there's nothing to do
|
||||||
|
|
||||||
|
# check log for error
|
||||||
|
checkForError() {
|
||||||
|
grep ERROR /tmp/upgrade-status.log.$$ > /tmp/error.check
|
||||||
|
if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then
|
||||||
|
echo "ERROR: check log file: /tmp/upgrade-status.log.$$"
|
||||||
|
rm -f /tmp/error.check
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
rm -f /tmp/error.check
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "x$1" != xdoupgrade ]; then
|
||||||
|
echo "Don't run this script by hand! You probably want to use install-infinidb.sh." 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
prefix=/usr/local
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
pwprompt=
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
|
||||||
|
prefix="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then
|
||||||
|
password="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
pwprompt="--password=$password"
|
||||||
|
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
|
||||||
|
installdir="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
prefix=`dirname $installdir`
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
test -f $installdir/post/functions && . $installdir/post/functions
|
||||||
|
|
||||||
|
mt=`module_type`
|
||||||
|
mid=`module_id`
|
||||||
|
|
||||||
|
# for CE version
|
||||||
|
if [ -z "$mt" ]; then
|
||||||
|
mt=pm
|
||||||
|
fi
|
||||||
|
if [ -z "$mid" ]; then
|
||||||
|
mid=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
has_um=`$installdir/bin/getConfig SystemModuleConfig ModuleCount2`
|
||||||
|
if [ -z "$has_um" ]; then
|
||||||
|
has_um=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
>/tmp/upgrade-status.log.$$
|
||||||
|
echo "mt = $mt" >>/tmp/upgrade-status.log.$$
|
||||||
|
echo "mid = $mid" >>/tmp/upgrade-status.log.$$
|
||||||
|
echo "has_um = $has_um" >>/tmp/upgrade-status.log.$$
|
||||||
|
|
||||||
|
#This upgrade only for UM or PM with no UM
|
||||||
|
if [ $has_um -eq 0 -o "x$mt" = xum ]; then
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# See if compressiontype column is in SYSCOLUMN
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
echo "checking calpontsys for compressiontype..." >>/tmp/upgrade-status.log.$$
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
--execute='describe syscolumn;' \
|
||||||
|
calpontsys | grep compressiontype >>/tmp/upgrade-status.log.$$ 2>&1
|
||||||
|
|
||||||
|
#
|
||||||
|
# Add compressiontype column to SYSCOLUMN if applicable
|
||||||
|
#
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "calpontsys needs upgrade for compressiontype" >>/tmp/upgrade-status.log.$$
|
||||||
|
echo "added compressiontype column" >>/tmp/upgrade-status.log.$$
|
||||||
|
cat >/tmp/idb_upgrade.sql <<EOD
|
||||||
|
alter table syscolumn add compressiontype int comment 'schema sync only';
|
||||||
|
EOD
|
||||||
|
cat /tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$ 2>&1
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
|
||||||
|
if [ $mid -eq 1 ]; then
|
||||||
|
echo "update compressiontype to backend" >>/tmp/upgrade-status.log.$$
|
||||||
|
cat >/tmp/idb_upgrade.sql <<EOD
|
||||||
|
select calonlinealter('alter table syscolumn add (compressiontype int)') as xxx;
|
||||||
|
update syscolumn set compressiontype=0 where compressiontype is null;
|
||||||
|
EOD
|
||||||
|
cat /tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$ 2>&1
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Verify that compressiontype was successfully added to SYSCOLUMN
|
||||||
|
#
|
||||||
|
rm -f /tmp/idb_upgrade.sql
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
--execute='describe syscolumn;' \
|
||||||
|
calpontsys | grep compressiontype >/tmp/upgrade-status-1.log 2>&1
|
||||||
|
rc=$?
|
||||||
|
cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$
|
||||||
|
if [ $rc -ne 0 ]; then
|
||||||
|
echo "FAILED adding compressiontype to SYSCOLUMN!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'`
|
||||||
|
rm -f /tmp/upgrade-status-1.log
|
||||||
|
if [ -z "$cnt" ]; then
|
||||||
|
cnt=0
|
||||||
|
fi
|
||||||
|
if [ $cnt -ne 1 ]; then
|
||||||
|
echo "FAILED adding compressiontype to SYSCOLUMN!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Verify that compressiontype (OID 1041) was successfully added to BRM
|
||||||
|
#
|
||||||
|
if [ $has_um -eq 0 ]; then
|
||||||
|
$installdir/bin/editem -o1041 1>/tmp/upgrade-status-1.log 2>/dev/null
|
||||||
|
rc=$?
|
||||||
|
cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$
|
||||||
|
if [ $rc -ne 0 ]; then
|
||||||
|
echo "FAILED adding compressiontype to BRM!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'`
|
||||||
|
rm -f /tmp/upgrade-status-1.log
|
||||||
|
if [ -z "$cnt" ]; then
|
||||||
|
cnt=0
|
||||||
|
fi
|
||||||
|
if [ $cnt -lt 2 ]; then
|
||||||
|
echo "FAILED adding compressiontype to BRM!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# See if autoincrement column is in SYSTABLE
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
echo "checking calpontsys for autoincrement..." >>/tmp/upgrade-status.log.$$
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
--execute='describe systable;' \
|
||||||
|
calpontsys | grep autoincrement >>/tmp/upgrade-status.log.$$ 2>&1
|
||||||
|
|
||||||
|
#
|
||||||
|
# Add autoincrement column to SYSTABLE if applicable
|
||||||
|
#
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "calpontsys needs upgrade for autoincrement" >>/tmp/upgrade-status.log.$$
|
||||||
|
echo "add autoincrement columns" >>/tmp/upgrade-status.log.$$
|
||||||
|
cat >/tmp/idb_upgrade.sql <<EOD
|
||||||
|
alter table systable add autoincrement int comment 'schema sync only';
|
||||||
|
EOD
|
||||||
|
cat /tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$ 2>&1
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
|
||||||
|
if [ $mid -eq 1 ]; then
|
||||||
|
echo "update autoincrement to backend" >>/tmp/upgrade-status.log.$$
|
||||||
|
cat >/tmp/idb_upgrade.sql <<EOD
|
||||||
|
select calonlinealter('alter table systable add (autoincrement int)') as xxx;
|
||||||
|
update systable set autoincrement=0 where autoincrement is null;
|
||||||
|
EOD
|
||||||
|
cat /tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$ 2>&1
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
#Verify that autoincrement was successfully added to SYSTABLE
|
||||||
|
#
|
||||||
|
rm -f /tmp/idb_upgrade.sql
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
--execute='describe systable;' \
|
||||||
|
calpontsys | grep autoincrement >/tmp/upgrade-status-1.log 2>&1
|
||||||
|
rc=$?
|
||||||
|
cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$
|
||||||
|
if [ $rc -ne 0 ]; then
|
||||||
|
echo "FAILED adding autoincrement to SYSTABLE!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'`
|
||||||
|
rm -f /tmp/upgrade-status-1.log
|
||||||
|
if [ -z "$cnt" ]; then
|
||||||
|
cnt=0
|
||||||
|
fi
|
||||||
|
if [ $cnt -ne 1 ]; then
|
||||||
|
echo "FAILED adding autoincrement to SYSTABLE!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Verify that autoincrement (OID 1011) was successfully added to BRM
|
||||||
|
#
|
||||||
|
if [ $has_um -eq 0 ]; then
|
||||||
|
$installdir/bin/editem -o1011 1>/tmp/upgrade-status-1.log 2>/dev/null
|
||||||
|
rc=$?
|
||||||
|
cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$
|
||||||
|
if [ $rc -ne 0 ]; then
|
||||||
|
echo "FAILED adding autoincrement to BRM!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'`
|
||||||
|
rm -f /tmp/upgrade-status-1.log
|
||||||
|
if [ "x$cnt" = x ]; then
|
||||||
|
cnt=0
|
||||||
|
fi
|
||||||
|
if [ $cnt -lt 2 ]; then
|
||||||
|
echo "FAILED adding autoincrement to BRM!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# See if nextvalue column is in SYSCOLUMN
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
echo "checking calpontsys for nextvalue..." >>/tmp/upgrade-status.log.$$
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
--execute='describe syscolumn;' \
|
||||||
|
calpontsys | grep nextvalue >>/tmp/upgrade-status.log.$$ 2>&1
|
||||||
|
|
||||||
|
#
|
||||||
|
# Add nextvalue column to SYSCOLUMN if applicable.
|
||||||
|
# Also set old autoincrement column in SYSCOLUMN to 'n'.
|
||||||
|
#
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "calpontsys needs upgrade for nextvalue" >>/tmp/upgrade-status.log.$$
|
||||||
|
echo "add nextvalue columns" >>/tmp/upgrade-status.log.$$
|
||||||
|
cat >/tmp/idb_upgrade.sql <<EOD
|
||||||
|
alter table syscolumn add nextvalue bigint comment 'schema sync only';
|
||||||
|
EOD
|
||||||
|
cat /tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$ 2>&1
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
|
||||||
|
if [ $mid -eq 1 ]; then
|
||||||
|
echo "update nextvalue to backend" >>/tmp/upgrade-status.log.$$
|
||||||
|
cat >/tmp/idb_upgrade.sql <<EOD
|
||||||
|
select calonlinealter('alter table syscolumn add (nextvalue bigint)') as xxx;
|
||||||
|
update syscolumn set nextvalue=1 where nextvalue is null;
|
||||||
|
update syscolumn set autoincrement='n' where autoincrement is null;
|
||||||
|
EOD
|
||||||
|
cat /tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$ 2>&1
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Verify that nextvalue was successfully added to SYSCOLUMN
|
||||||
|
#
|
||||||
|
rm -f /tmp/idb_upgrade.sql
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
--execute='describe syscolumn;' \
|
||||||
|
calpontsys | grep nextvalue >/tmp/upgrade-status-1.log 2>&1
|
||||||
|
rc=$?
|
||||||
|
cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$
|
||||||
|
if [ $rc -ne 0 ]; then
|
||||||
|
echo "FAILED adding nextvalue to SYSCOLUMN!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'`
|
||||||
|
rm -f /tmp/upgrade-status-1.log
|
||||||
|
if [ -z "$cnt" ]; then
|
||||||
|
cnt=0
|
||||||
|
fi
|
||||||
|
if [ $cnt -ne 1 ]; then
|
||||||
|
echo "FAILED adding nextvalue to SYSCOLUMN!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Verify that nextvalue (OID 1042) was successfully added to BRM
|
||||||
|
#
|
||||||
|
if [ $has_um -eq 0 ]; then
|
||||||
|
$installdir/bin/editem -o1042 1>/tmp/upgrade-status-1.log 2>/dev/null
|
||||||
|
rc=$?
|
||||||
|
cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$
|
||||||
|
if [ $rc -ne 0 ]; then
|
||||||
|
echo "FAILED adding nextvalue to BRM!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'`
|
||||||
|
rm -f /tmp/upgrade-status-1.log
|
||||||
|
if [ "x$cnt" = x ]; then
|
||||||
|
cnt=0
|
||||||
|
fi
|
||||||
|
if [ $cnt -lt 2 ]; then
|
||||||
|
echo "FAILED adding nextvalue to BRM!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# See if systable schema and tablename columns are varchar(128).
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
recreate=0
|
||||||
|
echo "checking calpontsys.systable schema and tablename for varchar(128)..." >>/tmp/upgrade-status.log.$$
|
||||||
|
colCount=` \
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
--execute='describe systable;' \
|
||||||
|
calpontsys | egrep "schema|tablename" | grep "varchar(128)" | wc -l`
|
||||||
|
if [ $colCount -ne 2 ]; then
|
||||||
|
recreate=1
|
||||||
|
echo "calpontsys needs upgrade to expand systable schema and tablename" >>/tmp/upgrade-status.log.$$
|
||||||
|
fi
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# See if syscolumn schema, tablename, and columname columns are varchar(128).
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
if [ $recreate -eq 0 ]; then
|
||||||
|
echo "checking calpontsys.syscolumn schema, tablename, columnname for varchar(128)..." >>/tmp/upgrade-status.log.$$
|
||||||
|
colCount=` \
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
--execute='describe syscolumn;' \
|
||||||
|
calpontsys | egrep "schema|tablename|columnname" | grep "varchar(128)" | wc -l`
|
||||||
|
if [ $colCount -ne 3 ]; then
|
||||||
|
recreate=1
|
||||||
|
echo "calpontsys needs upgrade to expand syscolumn schema, tablename, and columnname" >>/tmp/upgrade-status.log.$$
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# See if defaultvalue column in SYSCOLUMN is varchar(64)
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
if [ $recreate -eq 0 ]; then
|
||||||
|
echo "checking calpontsys for defaultvalue varchar(64)..." >>/tmp/upgrade-status.log.$$
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
--execute='describe syscolumn;' \
|
||||||
|
calpontsys | grep defaultvalue | grep 'varchar(64)' >>/tmp/upgrade-status.log.$$ 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
recreate=1
|
||||||
|
echo "calpontsys needs upgrade to change defaultvalue" >>/tmp/upgrade-status.log.$$
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Change defaultvalue column to varchar(64) if applicable
|
||||||
|
#
|
||||||
|
if [ $recreate -ne 0 ]; then
|
||||||
|
cat >/tmp/idb_upgrade.sql <<EOD
|
||||||
|
drop table if exists systable restrict;
|
||||||
|
drop table if exists syscolumn restrict;
|
||||||
|
EOD
|
||||||
|
cat /tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$ 2>&1
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
|
||||||
|
echo "create systable and syscolumn with schema sync only" >>/tmp/upgrade-status.log.$$
|
||||||
|
cat $installdir/mysql/syscatalog_mysql.sql >>/tmp/upgrade-status.log.$$
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys <$installdir/mysql/syscatalog_mysql.sql >>/tmp/upgrade-status.log.$$ 2>&1
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
|
||||||
|
#
|
||||||
|
# Verify column widths:
|
||||||
|
# varchar(64) for syscolumn.defaultvalue
|
||||||
|
# varchar(128) for systable (schema, tablename) and syscolumn (schema, tablename, and columnname).
|
||||||
|
#
|
||||||
|
rm -f /tmp/idb_upgrade.sql
|
||||||
|
echo "verify column widths" >>/tmp/upgrade-status.log.$$
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
--execute='describe syscolumn;' \
|
||||||
|
calpontsys | grep defaultvalue | grep 'varchar(64)' >/tmp/upgrade-status-1.log 2>&1
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
--execute='describe systable; describe syscolumn;' \
|
||||||
|
calpontsys | egrep "schema|tablename|columnname" | grep 'varchar(128)' >>/tmp/upgrade-status-1.log 2>&1
|
||||||
|
cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$
|
||||||
|
cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'`
|
||||||
|
rm -f /tmp/upgrade-status-1.log
|
||||||
|
if [ -z "$cnt" ]; then
|
||||||
|
cnt=0
|
||||||
|
fi
|
||||||
|
if [ $cnt -ne 6 ]; then
|
||||||
|
echo "FAILED width of schema, tablename, columnname, defaultvalue verification!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "OK"
|
444
export/bin/upgrade-infinidb.sh
Executable file
444
export/bin/upgrade-infinidb.sh
Executable file
@ -0,0 +1,444 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
# generic InfiniDB upgrade script.
|
||||||
|
#
|
||||||
|
# Notes: This script gets run every time InfiniDB starts up so it needs to be:
|
||||||
|
# 1) able to only do stuff once if needed and nothing if not needed
|
||||||
|
# 2) reasonably fast when there's nothing to do
|
||||||
|
|
||||||
|
# check log for error
|
||||||
|
checkForError() {
|
||||||
|
grep ERROR /tmp/upgrade-status.log.$$ > /tmp/error.check
|
||||||
|
if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then
|
||||||
|
echo "ERROR: check log file: /tmp/upgrade-status.log.$$"
|
||||||
|
rm -f /tmp/error.check
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
rm -f /tmp/error.check
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "x$1" != xdoupgrade ]; then
|
||||||
|
echo "Don't run this script by hand! You probably want to use install-infinidb.sh." 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
prefix=/usr/local
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
pwprompt=
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
|
||||||
|
prefix="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then
|
||||||
|
password="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
pwprompt="--password=$password"
|
||||||
|
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
|
||||||
|
installdir="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
prefix=`dirname $installdir`
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
test -f $installdir/post/functions && . $installdir/post/functions
|
||||||
|
|
||||||
|
mt=`module_type`
|
||||||
|
mid=`module_id`
|
||||||
|
|
||||||
|
# for CE version
|
||||||
|
if [ -z "$mt" ]; then
|
||||||
|
mt=pm
|
||||||
|
fi
|
||||||
|
if [ -z "$mid" ]; then
|
||||||
|
mid=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
has_um=`$installdir/bin/getConfig SystemModuleConfig ModuleCount2`
|
||||||
|
if [ -z "$has_um" ]; then
|
||||||
|
has_um=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
>/tmp/upgrade-status.log.$$
|
||||||
|
echo "mt = $mt" >>/tmp/upgrade-status.log.$$
|
||||||
|
echo "mid = $mid" >>/tmp/upgrade-status.log.$$
|
||||||
|
echo "has_um = $has_um" >>/tmp/upgrade-status.log.$$
|
||||||
|
|
||||||
|
#This upgrade only for UM or PM with no UM
|
||||||
|
if [ $has_um -eq 0 -o "x$mt" = xum ]; then
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# See if compressiontype column is in SYSCOLUMN
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
echo "checking calpontsys for compressiontype..." >>/tmp/upgrade-status.log.$$
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
--execute='describe syscolumn;' \
|
||||||
|
calpontsys | grep compressiontype >>/tmp/upgrade-status.log.$$ 2>&1
|
||||||
|
|
||||||
|
#
|
||||||
|
# Add compressiontype column to SYSCOLUMN if applicable
|
||||||
|
#
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "calpontsys needs upgrade for compressiontype" >>/tmp/upgrade-status.log.$$
|
||||||
|
echo "added compressiontype column" >>/tmp/upgrade-status.log.$$
|
||||||
|
cat >/tmp/idb_upgrade.sql <<EOD
|
||||||
|
alter table syscolumn add compressiontype int comment 'schema sync only';
|
||||||
|
EOD
|
||||||
|
cat /tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$ 2>&1
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
|
||||||
|
if [ $mid -eq 1 ]; then
|
||||||
|
echo "update compressiontype to backend" >>/tmp/upgrade-status.log.$$
|
||||||
|
cat >/tmp/idb_upgrade.sql <<EOD
|
||||||
|
select calonlinealter('alter table syscolumn add (compressiontype int)') as xxx;
|
||||||
|
update syscolumn set compressiontype=0 where compressiontype is null;
|
||||||
|
EOD
|
||||||
|
cat /tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$ 2>&1
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Verify that compressiontype was successfully added to SYSCOLUMN
|
||||||
|
#
|
||||||
|
rm -f /tmp/idb_upgrade.sql
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
--execute='describe syscolumn;' \
|
||||||
|
calpontsys | grep compressiontype >/tmp/upgrade-status-1.log 2>&1
|
||||||
|
rc=$?
|
||||||
|
cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$
|
||||||
|
if [ $rc -ne 0 ]; then
|
||||||
|
echo "FAILED adding compressiontype to SYSCOLUMN!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'`
|
||||||
|
rm -f /tmp/upgrade-status-1.log
|
||||||
|
if [ -z "$cnt" ]; then
|
||||||
|
cnt=0
|
||||||
|
fi
|
||||||
|
if [ $cnt -ne 1 ]; then
|
||||||
|
echo "FAILED adding compressiontype to SYSCOLUMN!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Verify that compressiontype (OID 1041) was successfully added to BRM
|
||||||
|
#
|
||||||
|
if [ $has_um -eq 0 ]; then
|
||||||
|
$installdir/bin/editem -o1041 1>/tmp/upgrade-status-1.log 2>/dev/null
|
||||||
|
rc=$?
|
||||||
|
cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$
|
||||||
|
if [ $rc -ne 0 ]; then
|
||||||
|
echo "FAILED adding compressiontype to BRM!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'`
|
||||||
|
rm -f /tmp/upgrade-status-1.log
|
||||||
|
if [ -z "$cnt" ]; then
|
||||||
|
cnt=0
|
||||||
|
fi
|
||||||
|
if [ $cnt -lt 2 ]; then
|
||||||
|
echo "FAILED adding compressiontype to BRM!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# See if autoincrement column is in SYSTABLE
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
echo "checking calpontsys for autoincrement..." >>/tmp/upgrade-status.log.$$
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
--execute='describe systable;' \
|
||||||
|
calpontsys | grep autoincrement >>/tmp/upgrade-status.log.$$ 2>&1
|
||||||
|
|
||||||
|
#
|
||||||
|
# Add autoincrement column to SYSTABLE if applicable
|
||||||
|
#
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "calpontsys needs upgrade for autoincrement" >>/tmp/upgrade-status.log.$$
|
||||||
|
echo "add autoincrement columns" >>/tmp/upgrade-status.log.$$
|
||||||
|
cat >/tmp/idb_upgrade.sql <<EOD
|
||||||
|
alter table systable add autoincrement int comment 'schema sync only';
|
||||||
|
EOD
|
||||||
|
cat /tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$ 2>&1
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
|
||||||
|
if [ $mid -eq 1 ]; then
|
||||||
|
echo "update autoincrement to backend" >>/tmp/upgrade-status.log.$$
|
||||||
|
cat >/tmp/idb_upgrade.sql <<EOD
|
||||||
|
select calonlinealter('alter table systable add (autoincrement int)') as xxx;
|
||||||
|
update systable set autoincrement=0 where autoincrement is null;
|
||||||
|
EOD
|
||||||
|
cat /tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$ 2>&1
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
#Verify that autoincrement was successfully added to SYSTABLE
|
||||||
|
#
|
||||||
|
rm -f /tmp/idb_upgrade.sql
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
--execute='describe systable;' \
|
||||||
|
calpontsys | grep autoincrement >/tmp/upgrade-status-1.log 2>&1
|
||||||
|
rc=$?
|
||||||
|
cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$
|
||||||
|
if [ $rc -ne 0 ]; then
|
||||||
|
echo "FAILED adding autoincrement to SYSTABLE!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'`
|
||||||
|
rm -f /tmp/upgrade-status-1.log
|
||||||
|
if [ -z "$cnt" ]; then
|
||||||
|
cnt=0
|
||||||
|
fi
|
||||||
|
if [ $cnt -ne 1 ]; then
|
||||||
|
echo "FAILED adding autoincrement to SYSTABLE!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Verify that autoincrement (OID 1011) was successfully added to BRM
|
||||||
|
#
|
||||||
|
if [ $has_um -eq 0 ]; then
|
||||||
|
$installdir/bin/editem -o1011 1>/tmp/upgrade-status-1.log 2>/dev/null
|
||||||
|
rc=$?
|
||||||
|
cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$
|
||||||
|
if [ $rc -ne 0 ]; then
|
||||||
|
echo "FAILED adding autoincrement to BRM!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'`
|
||||||
|
rm -f /tmp/upgrade-status-1.log
|
||||||
|
if [ "x$cnt" = x ]; then
|
||||||
|
cnt=0
|
||||||
|
fi
|
||||||
|
if [ $cnt -lt 2 ]; then
|
||||||
|
echo "FAILED adding autoincrement to BRM!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# See if nextvalue column is in SYSCOLUMN
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
echo "checking calpontsys for nextvalue..." >>/tmp/upgrade-status.log.$$
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
--execute='describe syscolumn;' \
|
||||||
|
calpontsys | grep nextvalue >>/tmp/upgrade-status.log.$$ 2>&1
|
||||||
|
|
||||||
|
#
|
||||||
|
# Add nextvalue column to SYSCOLUMN if applicable.
|
||||||
|
# Also set old autoincrement column in SYSCOLUMN to 'n'.
|
||||||
|
#
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "calpontsys needs upgrade for nextvalue" >>/tmp/upgrade-status.log.$$
|
||||||
|
echo "add nextvalue columns" >>/tmp/upgrade-status.log.$$
|
||||||
|
cat >/tmp/idb_upgrade.sql <<EOD
|
||||||
|
alter table syscolumn add nextvalue bigint comment 'schema sync only';
|
||||||
|
EOD
|
||||||
|
cat /tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$ 2>&1
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
|
||||||
|
if [ $mid -eq 1 ]; then
|
||||||
|
echo "update nextvalue to backend" >>/tmp/upgrade-status.log.$$
|
||||||
|
cat >/tmp/idb_upgrade.sql <<EOD
|
||||||
|
select calonlinealter('alter table syscolumn add (nextvalue bigint)') as xxx;
|
||||||
|
update syscolumn set nextvalue=1 where nextvalue is null;
|
||||||
|
update syscolumn set autoincrement='n' where autoincrement is null;
|
||||||
|
EOD
|
||||||
|
cat /tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$ 2>&1
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Verify that nextvalue was successfully added to SYSCOLUMN
|
||||||
|
#
|
||||||
|
rm -f /tmp/idb_upgrade.sql
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
--execute='describe syscolumn;' \
|
||||||
|
calpontsys | grep nextvalue >/tmp/upgrade-status-1.log 2>&1
|
||||||
|
rc=$?
|
||||||
|
cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$
|
||||||
|
if [ $rc -ne 0 ]; then
|
||||||
|
echo "FAILED adding nextvalue to SYSCOLUMN!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'`
|
||||||
|
rm -f /tmp/upgrade-status-1.log
|
||||||
|
if [ -z "$cnt" ]; then
|
||||||
|
cnt=0
|
||||||
|
fi
|
||||||
|
if [ $cnt -ne 1 ]; then
|
||||||
|
echo "FAILED adding nextvalue to SYSCOLUMN!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Verify that nextvalue (OID 1042) was successfully added to BRM
|
||||||
|
#
|
||||||
|
if [ $has_um -eq 0 ]; then
|
||||||
|
$installdir/bin/editem -o1042 1>/tmp/upgrade-status-1.log 2>/dev/null
|
||||||
|
rc=$?
|
||||||
|
cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$
|
||||||
|
if [ $rc -ne 0 ]; then
|
||||||
|
echo "FAILED adding nextvalue to BRM!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'`
|
||||||
|
rm -f /tmp/upgrade-status-1.log
|
||||||
|
if [ "x$cnt" = x ]; then
|
||||||
|
cnt=0
|
||||||
|
fi
|
||||||
|
if [ $cnt -lt 2 ]; then
|
||||||
|
echo "FAILED adding nextvalue to BRM!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# See if systable schema and tablename columns are varchar(128).
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
recreate=0
|
||||||
|
echo "checking calpontsys.systable schema and tablename for varchar(128)..." >>/tmp/upgrade-status.log.$$
|
||||||
|
colCount=` \
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
--execute='describe systable;' \
|
||||||
|
calpontsys | egrep "schema|tablename" | grep "varchar(128)" | wc -l`
|
||||||
|
if [ $colCount -ne 2 ]; then
|
||||||
|
recreate=1
|
||||||
|
echo "calpontsys needs upgrade to expand systable schema and tablename" >>/tmp/upgrade-status.log.$$
|
||||||
|
fi
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# See if syscolumn schema, tablename, and columname columns are varchar(128).
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
if [ $recreate -eq 0 ]; then
|
||||||
|
echo "checking calpontsys.syscolumn schema, tablename, columnname for varchar(128)..." >>/tmp/upgrade-status.log.$$
|
||||||
|
colCount=` \
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
--execute='describe syscolumn;' \
|
||||||
|
calpontsys | egrep "schema|tablename|columnname" | grep "varchar(128)" | wc -l`
|
||||||
|
if [ $colCount -ne 3 ]; then
|
||||||
|
recreate=1
|
||||||
|
echo "calpontsys needs upgrade to expand syscolumn schema, tablename, and columnname" >>/tmp/upgrade-status.log.$$
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# See if defaultvalue column in SYSCOLUMN is varchar(64)
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
if [ $recreate -eq 0 ]; then
|
||||||
|
echo "checking calpontsys for defaultvalue varchar(64)..." >>/tmp/upgrade-status.log.$$
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
--execute='describe syscolumn;' \
|
||||||
|
calpontsys | grep defaultvalue | grep 'varchar(64)' >>/tmp/upgrade-status.log.$$ 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
recreate=1
|
||||||
|
echo "calpontsys needs upgrade to change defaultvalue" >>/tmp/upgrade-status.log.$$
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Change defaultvalue column to varchar(64) if applicable
|
||||||
|
#
|
||||||
|
if [ $recreate -ne 0 ]; then
|
||||||
|
cat >/tmp/idb_upgrade.sql <<EOD
|
||||||
|
drop table if exists systable restrict;
|
||||||
|
drop table if exists syscolumn restrict;
|
||||||
|
EOD
|
||||||
|
cat /tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_upgrade.sql >>/tmp/upgrade-status.log.$$ 2>&1
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
|
||||||
|
echo "create systable and syscolumn with schema sync only" >>/tmp/upgrade-status.log.$$
|
||||||
|
cat $installdir/mysql/syscatalog_mysql.sql >>/tmp/upgrade-status.log.$$
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys <$installdir/mysql/syscatalog_mysql.sql >>/tmp/upgrade-status.log.$$ 2>&1
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
|
||||||
|
#
|
||||||
|
# Verify column widths:
|
||||||
|
# varchar(64) for syscolumn.defaultvalue
|
||||||
|
# varchar(128) for systable (schema, tablename) and syscolumn (schema, tablename, and columnname).
|
||||||
|
#
|
||||||
|
rm -f /tmp/idb_upgrade.sql
|
||||||
|
echo "verify column widths" >>/tmp/upgrade-status.log.$$
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
--execute='describe syscolumn;' \
|
||||||
|
calpontsys | grep defaultvalue | grep 'varchar(64)' >/tmp/upgrade-status-1.log 2>&1
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
--execute='describe systable; describe syscolumn;' \
|
||||||
|
calpontsys | egrep "schema|tablename|columnname" | grep 'varchar(128)' >>/tmp/upgrade-status-1.log 2>&1
|
||||||
|
cat /tmp/upgrade-status-1.log >>/tmp/upgrade-status.log.$$
|
||||||
|
cnt=`wc -l /tmp/upgrade-status-1.log | awk '{print $1}'`
|
||||||
|
rm -f /tmp/upgrade-status-1.log
|
||||||
|
if [ -z "$cnt" ]; then
|
||||||
|
cnt=0
|
||||||
|
fi
|
||||||
|
if [ $cnt -ne 6 ]; then
|
||||||
|
echo "FAILED width of schema, tablename, columnname, defaultvalue verification!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "OK"
|
323
export/bin/user_installer.sh
Executable file
323
export/bin/user_installer.sh
Executable file
@ -0,0 +1,323 @@
|
|||||||
|
#!/usr/bin/expect
|
||||||
|
#
|
||||||
|
# $Id: user_installer.sh 1066 20081113 21:44:44Z dhill $
|
||||||
|
#
|
||||||
|
# Install RPM and custom OS files on system
|
||||||
|
# Argument 1 - Remote Module Name
|
||||||
|
# Argument 2 - Remote Server Host Name or IP address
|
||||||
|
# Argument 3 - Root Password of remote server
|
||||||
|
# Argument 4 - Package name being installed
|
||||||
|
# Argument 5 - Install Type, "initial" or "upgrade"
|
||||||
|
# Argument 6 - Debug flag 1 for on, 0 for off
|
||||||
|
set timeout 30
|
||||||
|
set USERNAME root
|
||||||
|
set MODULE [lindex $argv 0]
|
||||||
|
set SERVER [lindex $argv 1]
|
||||||
|
set PASSWORD [lindex $argv 2]
|
||||||
|
set VERSION [lindex $argv 3]
|
||||||
|
set INSTALLTYPE [lindex $argv 4]
|
||||||
|
set PKGTYPE [lindex $argv 5]
|
||||||
|
set NODEPS [lindex $argv 6]
|
||||||
|
set MYSQLPW [lindex $argv 7]
|
||||||
|
set MYSQLPORT [lindex $argv 8]
|
||||||
|
set DEBUG [lindex $argv 9]
|
||||||
|
set INSTALLDIR "/usr/local/MariaDB/Columnstore"
|
||||||
|
set IDIR [lindex $argv 10]
|
||||||
|
if { $IDIR != "" } {
|
||||||
|
set INSTALLDIR $IDIR
|
||||||
|
}
|
||||||
|
set USERNAME "root"
|
||||||
|
set UNM [lindex $argv 11]
|
||||||
|
if { $UNM != "" } {
|
||||||
|
set USERNAME $UNM
|
||||||
|
}
|
||||||
|
|
||||||
|
if { $MYSQLPW == "none" } {
|
||||||
|
set MYSQLPW " "
|
||||||
|
}
|
||||||
|
|
||||||
|
set BASH "/bin/bash "
|
||||||
|
#if { $DEBUG == "1" } {
|
||||||
|
# set BASH "/bin/bash -x "
|
||||||
|
#}
|
||||||
|
|
||||||
|
set HOME "$env(HOME)"
|
||||||
|
|
||||||
|
log_user $DEBUG
|
||||||
|
spawn -noecho /bin/bash
|
||||||
|
#
|
||||||
|
if { $PKGTYPE == "rpm" } {
|
||||||
|
set PKGERASE "rpm -e --nodeps \$(rpm -qa | grep '^infinidb')"
|
||||||
|
set PKGERASE1 "rpm -e --nodeps "
|
||||||
|
|
||||||
|
set PKGINSTALL "rpm -ivh $NODEPS --force infinidb*$VERSION*"
|
||||||
|
set PKGUPGRADE "rpm -Uvh --noscripts infinidb*$VERSION*"
|
||||||
|
} else {
|
||||||
|
if { $PKGTYPE == "deb" } {
|
||||||
|
set PKGERASE "dpkg -P \$(dpkg --get-selections | grep '^infinidb')"
|
||||||
|
set PKGERASE1 "dpkg -P "
|
||||||
|
set PKGINSTALL "dpkg -i --force-confnew infinidb*$VERSION*"
|
||||||
|
set PKGUPGRADE "dpkg -i --force-confnew infinidb*$VERSION*"
|
||||||
|
} else {
|
||||||
|
send_user "Invalid Package Type of $PKGTYPE"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# check and see if remote server has ssh keys setup, set PASSWORD if so
|
||||||
|
send_user " "
|
||||||
|
send "ssh $USERNAME@$SERVER 'time'\n"
|
||||||
|
set timeout 60
|
||||||
|
expect {
|
||||||
|
"Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit 1 }
|
||||||
|
"service not known" { send_user "FAILED: Invalid Host\n" ; exit 1 }
|
||||||
|
"authenticity" { send "yes\n"
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"sys" { set PASSWORD "ssh" }
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
|
||||||
|
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
|
||||||
|
timeout { send_user "ERROR: Timeout to host\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { }
|
||||||
|
"sys" { }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
#BUG 5749 - SAS: didn't work on their system until I added the sleep 60
|
||||||
|
sleep 60
|
||||||
|
|
||||||
|
if { $INSTALLTYPE == "initial" || $INSTALLTYPE == "uninstall" } {
|
||||||
|
#
|
||||||
|
# erase InfiniDB packages
|
||||||
|
#
|
||||||
|
send_user "Erase InfiniDB Packages on Module "
|
||||||
|
send "ssh $USERNAME@$SERVER '$PKGERASE ;$PKGERASE1 dummy'\n"
|
||||||
|
if { $PASSWORD != "ssh" } {
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set timeout 120
|
||||||
|
expect {
|
||||||
|
"package dummy" { send_user "DONE" }
|
||||||
|
"error: Failed dependencies" { send_user "ERROR: Failed dependencies\n" ; exit 1 }
|
||||||
|
"Permission denied, please try again" { send_user "ERROR: Invalid password\n" ; exit 1 }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
}
|
||||||
|
|
||||||
|
if { $INSTALLTYPE == "uninstall" } { exit 0 }
|
||||||
|
|
||||||
|
#
|
||||||
|
# send the InfinIDB package
|
||||||
|
#
|
||||||
|
set timeout 30
|
||||||
|
#expect -re {[$#] }
|
||||||
|
send_user "Copy new InfiniDB Packages to Module "
|
||||||
|
send "ssh $USERNAME@$SERVER 'rm -f /root/infinidb-*.$PKGTYPE'\n"
|
||||||
|
if { $PASSWORD != "ssh" } {
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { }
|
||||||
|
"Connection refused" { send_user "ERROR: Connection refused\n" ; exit 1 }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
"No route to host" { send_user "ERROR: No route to host\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { }
|
||||||
|
}
|
||||||
|
|
||||||
|
send "scp $HOME/infinidb*$VERSION* $USERNAME@$SERVER:.;$PKGERASE dummy\n"
|
||||||
|
if { $PASSWORD != "ssh" } {
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set timeout 120
|
||||||
|
expect {
|
||||||
|
"package dummy" { send_user "DONE" }
|
||||||
|
"directory" { send_user "ERROR\n" ;
|
||||||
|
send_user "\n*** Installation ERROR\n" ;
|
||||||
|
exit 1 }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
|
||||||
|
#sleep to make sure it's finished
|
||||||
|
sleep 5
|
||||||
|
#
|
||||||
|
set timeout 30
|
||||||
|
expect -re {[$#] }
|
||||||
|
if { $INSTALLTYPE == "initial"} {
|
||||||
|
#
|
||||||
|
# install package
|
||||||
|
#
|
||||||
|
send_user "Install InfinIDB Packages on Module "
|
||||||
|
send "ssh $USERNAME@$SERVER '$PKGINSTALL ;$PKGERASE dummy'\n"
|
||||||
|
if { $PASSWORD != "ssh" } {
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set timeout 180
|
||||||
|
expect {
|
||||||
|
"package dummy" { send_user "DONE" }
|
||||||
|
"error: Failed dependencies" { send_user "ERROR: Failed dependencies\n" ;
|
||||||
|
send_user "\n*** Installation ERROR\n" ;
|
||||||
|
exit 1 }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
"needs" { send_user "ERROR: disk space issue\n" ; exit 1 }
|
||||||
|
"conflicts" { send_user "ERROR: File Conflict issue\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
|
||||||
|
set timeout 30
|
||||||
|
}
|
||||||
|
#sleep to make sure it's finished
|
||||||
|
sleep 5
|
||||||
|
#
|
||||||
|
if { $INSTALLTYPE == "initial"} {
|
||||||
|
#
|
||||||
|
# copy over InfiniDB config file
|
||||||
|
#
|
||||||
|
send_user "Copy InfiniDB Config file to Module "
|
||||||
|
send "scp $INSTALLDIR/etc/* $USERNAME@$SERVER:$INSTALLDIR/etc/.\n"
|
||||||
|
if { $PASSWORD != "ssh" } {
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
"directory" { send_user "ERROR\n" ;
|
||||||
|
send_user "\n*** Installation ERROR\n" ;
|
||||||
|
exit 1 }
|
||||||
|
-re {[$#] } { send_user "DONE" }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
#sleep to make sure it's finished
|
||||||
|
sleep 5
|
||||||
|
#
|
||||||
|
# copy over custom OS tmp files
|
||||||
|
#
|
||||||
|
send_user "Copy Custom OS files to Module "
|
||||||
|
send "scp -r $INSTALLDIR/local/etc $USERNAME@$SERVER:$INSTALLDIR/local/.\n"
|
||||||
|
if { $PASSWORD != "ssh" } {
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
"directory" { send_user "ERROR\n" ;
|
||||||
|
send_user "\n*** Installation ERROR\n" ;
|
||||||
|
exit 1 }
|
||||||
|
-re {[$#] } { send_user "DONE" }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
#sleep to make sure it's finished
|
||||||
|
sleep 5
|
||||||
|
#
|
||||||
|
# copy over InfiniDB OS files
|
||||||
|
#
|
||||||
|
send_user "Copy InfiniDB OS files to Module "
|
||||||
|
send "scp $INSTALLDIR/local/etc/$MODULE/* $USERNAME@$SERVER:$INSTALLDIR/local/.\n"
|
||||||
|
if { $PASSWORD != "ssh" } {
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
"directory" { send_user "ERROR\n" ;
|
||||||
|
send_user "\n*** Installation ERROR\n" ;
|
||||||
|
exit 1 }
|
||||||
|
-re {[$#] } { send_user "DONE" }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
#sleep to make sure it's finished
|
||||||
|
sleep 5
|
||||||
|
#
|
||||||
|
# Start module installer to setup Custom OS files
|
||||||
|
#
|
||||||
|
send_user "Run Module Installer "
|
||||||
|
send "ssh $USERNAME@$SERVER '$BASH $INSTALLDIR/bin/module_installer.sh --module=um --port=$MYSQLPORT'\n"
|
||||||
|
if { $PASSWORD != "ssh" } {
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set timeout 200
|
||||||
|
expect {
|
||||||
|
"!!!Module" { send_user "DONE" }
|
||||||
|
"FAILED" { send_user "ERROR: missing OS file\n" ; exit 1 }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
"No such file" { send_user "ERROR: File Not Found\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
set timeout 30
|
||||||
|
#expect -re {[$#] }
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# check InfiniDB syslog functionality
|
||||||
|
#
|
||||||
|
|
||||||
|
send_user "Check InfiniDB system logging functionality "
|
||||||
|
send " \n"
|
||||||
|
send date\n
|
||||||
|
send "ssh $USERNAME@$SERVER '$BASH $INSTALLDIR/bin/syslogSetup.sh check'\n"
|
||||||
|
if { $PASSWORD != "ssh" } {
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
"word: " { send "$PASSWORD\n" }
|
||||||
|
"passphrase" { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set timeout 30
|
||||||
|
expect {
|
||||||
|
"Logging working" { send_user "DONE" }
|
||||||
|
timeout { send_user "DONE" }
|
||||||
|
"not working" { send_user "WARNING: InfiniDB system logging functionality not working" }
|
||||||
|
"Connection closed" { send_user "ERROR: Connection closed\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
|
||||||
|
send_user "\nInstallation Successfully Completed on '$MODULE'\n"
|
||||||
|
exit 0
|
||||||
|
# vim:ts=4 sw=4:
|
||||||
|
|
173
export/bin/xm_installer.sh
Executable file
173
export/bin/xm_installer.sh
Executable file
@ -0,0 +1,173 @@
|
|||||||
|
#!/usr/bin/expect
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
# Install custom OS files on External Module
|
||||||
|
# Argument 1 - Remote Module Name
|
||||||
|
# Argument 2 - Remote Server Host Name or IP address
|
||||||
|
# Argument 3 - OAM Parent Host Name
|
||||||
|
# Argument 4 - Root Password of remote server
|
||||||
|
# Argument 5 - Debug flag 1 for on, 0 for off
|
||||||
|
set timeout 10
|
||||||
|
set USERNAME root
|
||||||
|
set MODULE [lindex $argv 0]
|
||||||
|
set SERVER [lindex $argv 1]
|
||||||
|
set OAMHOSTNAME [lindex $argv 2]
|
||||||
|
set PASSWORD [lindex $argv 3]
|
||||||
|
set DEBUG [lindex $argv 4]
|
||||||
|
log_user $DEBUG
|
||||||
|
spawn -noecho /bin/bash
|
||||||
|
#
|
||||||
|
# Validate Calpont RPM is installed
|
||||||
|
#
|
||||||
|
send_user "\n"
|
||||||
|
send_user "Check Calpont RPM installed "
|
||||||
|
expect -re "# "
|
||||||
|
send "ssh $USERNAME@$SERVER 'rpm -iq calpont'\n"
|
||||||
|
expect {
|
||||||
|
-re "Host key verification failed" { send_user "FAILED: Host key verification failed\n" ; exit }
|
||||||
|
-re "service not known" { send_user "FAILED: Invalid Host\n" ; exit }
|
||||||
|
-re "authenticity" { send "yes\n"
|
||||||
|
expect {
|
||||||
|
-re "word: " { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-re "word: " { send "$PASSWORD\n" }
|
||||||
|
}
|
||||||
|
expect {
|
||||||
|
-re "tools " { send_user "DONE" }
|
||||||
|
-re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 }
|
||||||
|
-re "package calpont" { send_user "ERROR: Calpont RPM not installed on External Module\n" ; exit -1 }
|
||||||
|
}
|
||||||
|
#
|
||||||
|
# Create mount directories
|
||||||
|
#
|
||||||
|
send_user "\n"
|
||||||
|
send_user "Create etc mount directory "
|
||||||
|
expect -re "# "
|
||||||
|
send "ssh $USERNAME@$SERVER 'mkdir /mnt/$OAMHOSTNAME\_etc'\n"
|
||||||
|
expect -re "word: "
|
||||||
|
# send the password
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
expect {
|
||||||
|
-re "# " { send_user "DONE" }
|
||||||
|
-re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 }
|
||||||
|
-re "mkdir: cannot" { send_user "DONE: already installed\n"
|
||||||
|
send_user "\nInstallation Successfully Completed on '$MODULE'\n"; exit 0 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
send_user "Create OAM mount directory "
|
||||||
|
send "ssh $USERNAME@$SERVER 'mkdir /mnt/$OAMHOSTNAME\_OAM'\n"
|
||||||
|
expect -re "word: "
|
||||||
|
# send the password
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
expect {
|
||||||
|
-re "# " { send_user "DONE" }
|
||||||
|
-re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 }
|
||||||
|
-re "mkdir: cannot" { send_user "DONE: already installed\n"
|
||||||
|
send_user "\nInstallation Successfully Completed on '$MODULE'\n"; exit 0 }
|
||||||
|
}
|
||||||
|
#
|
||||||
|
# copy over calpont OS files
|
||||||
|
#
|
||||||
|
send_user "\n"
|
||||||
|
send_user "Copy Mount File to Module "
|
||||||
|
send "scp /tmp/etc/$MODULE/*mount $USERNAME@$SERVER:/mnt/.\n"
|
||||||
|
expect -re "word: "
|
||||||
|
# send the password
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
expect {
|
||||||
|
-re "100%" { send_user "DONE" }
|
||||||
|
-re "scp" { send_user "ERROR\n" ;
|
||||||
|
send_user "\n*** Installation ERROR\n" ;
|
||||||
|
exit -1 }
|
||||||
|
-re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 }
|
||||||
|
-re "No such file or directory" { send_user "ERROR: Invalid file\n" ; exit -1 }
|
||||||
|
}
|
||||||
|
#
|
||||||
|
send_user "\n"
|
||||||
|
send_user "Copy Custom inittab to Module "
|
||||||
|
send "scp /tmp/etc/$MODULE/inittab.calpont $USERNAME@$SERVER:/tmp/.\n"
|
||||||
|
expect -re "word: "
|
||||||
|
# send the password
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
expect {
|
||||||
|
-re "100%" { send_user "DONE" }
|
||||||
|
-re "scp" { send_user "ERROR\n" ;
|
||||||
|
send_user "\n*** Installation ERROR\n" ;
|
||||||
|
exit -1 }
|
||||||
|
-re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 }
|
||||||
|
-re "No such file or directory" { send_user "ERROR: Invalid file\n" ; exit -1 }
|
||||||
|
}
|
||||||
|
#
|
||||||
|
send_user "\n"
|
||||||
|
send_user "Copy syslogd.conf to Module "
|
||||||
|
send "scp /etc/syslog.conf $USERNAME@$SERVER:/etc/.\n"
|
||||||
|
expect -re "word: "
|
||||||
|
# send the password
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
expect {
|
||||||
|
-re "100%" { send_user "DONE" }
|
||||||
|
-re "scp" { send_user "ERROR\n" ;
|
||||||
|
send_user "\n*** Installation ERROR\n" ;
|
||||||
|
exit -1 }
|
||||||
|
-re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 }
|
||||||
|
-re "No such file or directory" { send_user "ERROR: Invalid file\n" ; exit -1 }
|
||||||
|
}
|
||||||
|
#
|
||||||
|
# chmod of mount file
|
||||||
|
#
|
||||||
|
send_user "\n"
|
||||||
|
send_user "Run chmod on Mount File "
|
||||||
|
send "ssh $USERNAME@$SERVER 'chmod 755 /mnt/$OAMHOSTNAME\_*mount'\n"
|
||||||
|
expect -re "word: "
|
||||||
|
# send the password
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
expect {
|
||||||
|
-re "# " { send_user "DONE" }
|
||||||
|
-re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 }
|
||||||
|
}
|
||||||
|
#
|
||||||
|
# Update External Module inittab
|
||||||
|
#
|
||||||
|
send_user "\n"
|
||||||
|
send_user "Update inittab "
|
||||||
|
send "ssh $USERNAME@$SERVER 'cat /tmp/inittab.calpont >> /etc/inittab'\n"
|
||||||
|
expect -re "word: "
|
||||||
|
# send the password
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
expect {
|
||||||
|
-re "# " { send_user "DONE" }
|
||||||
|
-re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 }
|
||||||
|
}
|
||||||
|
#
|
||||||
|
# Restart External Module syslogd
|
||||||
|
#
|
||||||
|
send_user "\n"
|
||||||
|
send_user "Restart syslogd "
|
||||||
|
send "ssh $USERNAME@$SERVER 'service syslog restart'\n"
|
||||||
|
expect -re "word: "
|
||||||
|
# send the password
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
expect {
|
||||||
|
-re "# " { send_user "DONE" }
|
||||||
|
-re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 }
|
||||||
|
}
|
||||||
|
#
|
||||||
|
# startup ProcMon
|
||||||
|
#
|
||||||
|
send_user "\n"
|
||||||
|
send_user "Startup ProcMon "
|
||||||
|
send "ssh $USERNAME@$SERVER 'kill -HUP 1'\n"
|
||||||
|
expect -re "word: "
|
||||||
|
# send the password
|
||||||
|
send "$PASSWORD\n"
|
||||||
|
expect {
|
||||||
|
-re "# " { send_user "DONE" }
|
||||||
|
-re "Permission denied" { send_user "ERROR: Invalid password\n" ; exit -1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
#
|
||||||
|
send_user "\nInstallation Successfully Completed on '$MODULE'\n"
|
||||||
|
exit 0
|
||||||
|
|
1
export/local/module
Executable file
1
export/local/module
Executable file
@ -0,0 +1 @@
|
|||||||
|
pm1
|
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
# configures and installs net-snmp modules that we need
|
# configures and installs net-snmp modules that we need
|
||||||
|
|
||||||
prefix=/usr/local/Calpont
|
prefix=/usr/local/MariaDB/Columnstore
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
|
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
|
||||||
prefix="`echo $arg | awk -F= '{print $2}'`"
|
prefix="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
@ -9,23 +9,23 @@ prefix=/usr/local
|
|||||||
#get instance name from called
|
#get instance name from called
|
||||||
instanceName="$1"
|
instanceName="$1"
|
||||||
|
|
||||||
ec2=`$prefix/Calpont/bin/getConfig Installation EC2_HOME`
|
ec2=`$prefix/MariaDB/Columnstore/bin/getConfig Installation EC2_HOME`
|
||||||
|
|
||||||
if [ $ec2 == "unassigned" ]; then
|
if [ $ec2 == "unassigned" ]; then
|
||||||
echo "stopped"
|
echo "stopped"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
java=`$prefix/Calpont/bin/getConfig Installation JAVA_HOME`
|
java=`$prefix/MariaDB/Columnstore/bin/getConfig Installation JAVA_HOME`
|
||||||
path=`$prefix/Calpont/bin/getConfig Installation EC2_PATH`
|
path=`$prefix/MariaDB/Columnstore/bin/getConfig Installation EC2_PATH`
|
||||||
|
|
||||||
export PATH=$path
|
export PATH=$path
|
||||||
export EC2_HOME=$ec2
|
export EC2_HOME=$ec2
|
||||||
export JAVA_HOME=$java
|
export JAVA_HOME=$java
|
||||||
|
|
||||||
# get x509 Certification and Private Key
|
# get x509 Certification and Private Key
|
||||||
x509Cert=`$prefix/Calpont/bin/getConfig Installation AmazonX509Certificate`
|
x509Cert=`$prefix/MariaDB/Columnstore/bin/getConfig Installation AmazonX509Certificate`
|
||||||
x509PriKey=`$prefix/Calpont/bin/getConfig Installation AmazonX509PrivateKey`
|
x509PriKey=`$prefix/MariaDB/Columnstore/bin/getConfig Installation AmazonX509PrivateKey`
|
||||||
|
|
||||||
#get instance info
|
#get instance info
|
||||||
ec2-describe-instances -C $x509Cert -K $x509PriKey $instanceName > /tmp/instanceInfo 2> /dev/null
|
ec2-describe-instances -C $x509Cert -K $x509PriKey $instanceName > /tmp/instanceInfo 2> /dev/null
|
||||||
|
@ -88,9 +88,9 @@ if [ "$1" = "deassignElasticIP" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
test -f /usr/local/Calpont/post/functions && . /usr/local/Calpont/post/functions
|
test -f /usr/local/MariaDB/Columnstore/post/functions && . /usr/local/MariaDB/Columnstore/post/functions
|
||||||
|
|
||||||
ec2=`$prefix/Calpont/bin/getConfig Installation EC2_HOME`
|
ec2=`$prefix/MariaDB/Columnstore/bin/getConfig Installation EC2_HOME`
|
||||||
|
|
||||||
if [ $ec2 == "unassigned" ]; then
|
if [ $ec2 == "unassigned" ]; then
|
||||||
if [ "$1" = "getPrivateIP" ]; then
|
if [ "$1" = "getPrivateIP" ]; then
|
||||||
@ -102,21 +102,21 @@ if [ $ec2 == "unassigned" ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
java=`$prefix/Calpont/bin/getConfig Installation JAVA_HOME`
|
java=`$prefix/MariaDB/Columnstore/bin/getConfig Installation JAVA_HOME`
|
||||||
path=`$prefix/Calpont/bin/getConfig Installation EC2_PATH`
|
path=`$prefix/MariaDB/Columnstore/bin/getConfig Installation EC2_PATH`
|
||||||
|
|
||||||
export PATH=$path
|
export PATH=$path
|
||||||
export EC2_HOME=$ec2
|
export EC2_HOME=$ec2
|
||||||
export JAVA_HOME=$java
|
export JAVA_HOME=$java
|
||||||
|
|
||||||
# get Keys and region
|
# get Keys and region
|
||||||
AmazonAccessKeyFile=`$prefix/Calpont/bin/getConfig Installation AmazonAccessKey`
|
AmazonAccessKeyFile=`$prefix/MariaDB/Columnstore/bin/getConfig Installation AmazonAccessKey`
|
||||||
if [ $AmazonAccessKeyFile == "unassigned" ]; then
|
if [ $AmazonAccessKeyFile == "unassigned" ]; then
|
||||||
echo "FAILED: missing Config Setting AmazonAccessKey : $AmazonAccessKeyfile"
|
echo "FAILED: missing Config Setting AmazonAccessKey : $AmazonAccessKeyfile"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AmazonSecretKeyFile=`$prefix/Calpont/bin/getConfig Installation AmazonSecretKey`
|
AmazonSecretKeyFile=`$prefix/MariaDB/Columnstore/bin/getConfig Installation AmazonSecretKey`
|
||||||
if [ $AmazonSecretKeyFile == "unassigned" ]; then
|
if [ $AmazonSecretKeyFile == "unassigned" ]; then
|
||||||
echo "FAILED: missing Config Setting AmazonSecretKeyFile : $AmazonSecretKeyFile"
|
echo "FAILED: missing Config Setting AmazonSecretKeyFile : $AmazonSecretKeyFile"
|
||||||
exit 1
|
exit 1
|
||||||
@ -125,8 +125,8 @@ fi
|
|||||||
AmazonAccessKey=`cat $AmazonAccessKeyFile`
|
AmazonAccessKey=`cat $AmazonAccessKeyFile`
|
||||||
AmazonSecretKey=`cat $AmazonSecretKeyFile`
|
AmazonSecretKey=`cat $AmazonSecretKeyFile`
|
||||||
|
|
||||||
Region=`$prefix/Calpont/bin/getConfig Installation AmazonRegion`
|
Region=`$prefix/MariaDB/Columnstore/bin/getConfig Installation AmazonRegion`
|
||||||
subnet=`$prefix/Calpont/bin/getConfig Installation AmazonSubNetID`
|
subnet=`$prefix/MariaDB/Columnstore/bin/getConfig Installation AmazonSubNetID`
|
||||||
|
|
||||||
if test ! -f $AmazonAccessKeyfile ; then
|
if test ! -f $AmazonAccessKeyfile ; then
|
||||||
echo "FAILED: missing AmazonAccessKeyfile : $AmazonAccessKeyfile"
|
echo "FAILED: missing AmazonAccessKeyfile : $AmazonAccessKeyfile"
|
||||||
@ -193,7 +193,7 @@ getInstancePrivate() {
|
|||||||
|
|
||||||
getZone() {
|
getZone() {
|
||||||
#get from Calpont.xml if it's there, if not, get from instance then store
|
#get from Calpont.xml if it's there, if not, get from instance then store
|
||||||
zone=`$prefix/Calpont/bin/getConfig Installation AmazonZone`
|
zone=`$prefix/MariaDB/Columnstore/bin/getConfig Installation AmazonZone`
|
||||||
|
|
||||||
if [ "$zone" = "unassigned" ] || [ "$zone" = "" ]; then
|
if [ "$zone" = "unassigned" ] || [ "$zone" = "" ]; then
|
||||||
#get local Instance ID
|
#get local Instance ID
|
||||||
@ -213,7 +213,7 @@ getZone() {
|
|||||||
fi
|
fi
|
||||||
zone=`cat $describeInstanceFile | grep -m 1 $instance | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $11}'`
|
zone=`cat $describeInstanceFile | grep -m 1 $instance | awk '{gsub(/^[ \t]+|[ \t]+$/,"");print $11}'`
|
||||||
fi
|
fi
|
||||||
$prefix/Calpont/bin/setConfig Installation AmazonZone $zone
|
$prefix/MariaDB/Columnstore/bin/setConfig Installation AmazonZone $zone
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo $zone
|
echo $zone
|
||||||
|
@ -93,30 +93,30 @@ if [ "$1" = "createTag" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
test -f /usr/local/Calpont/post/functions && . /usr/local/Calpont/post/functions
|
test -f /usr/local/MariaDB/Columnstore/post/functions && . /usr/local/MariaDB/Columnstore/post/functions
|
||||||
|
|
||||||
ec2=`$prefix/Calpont/bin/getConfig Installation EC2_HOME`
|
ec2=`$prefix/MariaDB/Columnstore/bin/getConfig Installation EC2_HOME`
|
||||||
|
|
||||||
if [ $ec2 == "unassigned" ]; then
|
if [ $ec2 == "unassigned" ]; then
|
||||||
STATUS="unknown"
|
STATUS="unknown"
|
||||||
RETVAL=1
|
RETVAL=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
java=`$prefix/Calpont/bin/getConfig Installation JAVA_HOME`
|
java=`$prefix/MariaDB/Columnstore/bin/getConfig Installation JAVA_HOME`
|
||||||
path=`$prefix/Calpont/bin/getConfig Installation EC2_PATH`
|
path=`$prefix/MariaDB/Columnstore/bin/getConfig Installation EC2_PATH`
|
||||||
|
|
||||||
export PATH=$path
|
export PATH=$path
|
||||||
export EC2_HOME=$ec2
|
export EC2_HOME=$ec2
|
||||||
export JAVA_HOME=$java
|
export JAVA_HOME=$java
|
||||||
|
|
||||||
# get Keys and region
|
# get Keys and region
|
||||||
AmazonAccessKeyFile=`$prefix/Calpont/bin/getConfig Installation AmazonAccessKey`
|
AmazonAccessKeyFile=`$prefix/MariaDB/Columnstore/bin/getConfig Installation AmazonAccessKey`
|
||||||
if [ $AmazonAccessKeyFile == "unassigned" ]; then
|
if [ $AmazonAccessKeyFile == "unassigned" ]; then
|
||||||
echo "FAILED: missing Config Setting AmazonAccessKey : $AmazonAccessKeyfile"
|
echo "FAILED: missing Config Setting AmazonAccessKey : $AmazonAccessKeyfile"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AmazonSecretKeyFile=`$prefix/Calpont/bin/getConfig Installation AmazonSecretKey`
|
AmazonSecretKeyFile=`$prefix/MariaDB/Columnstore/bin/getConfig Installation AmazonSecretKey`
|
||||||
if [ $AmazonSecretKeyFile == "unassigned" ]; then
|
if [ $AmazonSecretKeyFile == "unassigned" ]; then
|
||||||
echo "FAILED: missing Config Setting AmazonSecretKeyFile : $AmazonSecretKeyFile"
|
echo "FAILED: missing Config Setting AmazonSecretKeyFile : $AmazonSecretKeyFile"
|
||||||
exit 1
|
exit 1
|
||||||
@ -135,7 +135,7 @@ if test ! -f $AmazonSecretKeyfile ; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
Region=`$prefix/Calpont/bin/getConfig Installation AmazonRegion`
|
Region=`$prefix/MariaDB/Columnstore/bin/getConfig Installation AmazonRegion`
|
||||||
|
|
||||||
|
|
||||||
checkInfostatus() {
|
checkInfostatus() {
|
||||||
@ -189,21 +189,21 @@ checkInfostatus() {
|
|||||||
|
|
||||||
createvolume() {
|
createvolume() {
|
||||||
# get zone
|
# get zone
|
||||||
zone=`$prefix/Calpont/bin/IDBInstanceCmds.sh getZone`
|
zone=`$prefix/MariaDB/Columnstore/bin/IDBInstanceCmds.sh getZone`
|
||||||
|
|
||||||
if [ $moduleType == "um" ]; then
|
if [ $moduleType == "um" ]; then
|
||||||
# get type
|
# get type
|
||||||
volumeType=`$prefix/Calpont/bin/getConfig Installation UMVolumeType`
|
volumeType=`$prefix/MariaDB/Columnstore/bin/getConfig Installation UMVolumeType`
|
||||||
if [ $volumeType == "io1" ]; then
|
if [ $volumeType == "io1" ]; then
|
||||||
# get IOPS
|
# get IOPS
|
||||||
volumeIOPS=`$prefix/Calpont/bin/getConfig Installation UMVolumeIOPS`
|
volumeIOPS=`$prefix/MariaDB/Columnstore/bin/getConfig Installation UMVolumeIOPS`
|
||||||
fi
|
fi
|
||||||
else # pm
|
else # pm
|
||||||
# get type
|
# get type
|
||||||
volumeType=`$prefix/Calpont/bin/getConfig Installation PMVolumeType`
|
volumeType=`$prefix/MariaDB/Columnstore/bin/getConfig Installation PMVolumeType`
|
||||||
if [ $volumeType == "io1" ]; then
|
if [ $volumeType == "io1" ]; then
|
||||||
# get IOPS
|
# get IOPS
|
||||||
volumeIOPS=`$prefix/Calpont/bin/getConfig Installation PMVolumeIOPS`
|
volumeIOPS=`$prefix/MariaDB/Columnstore/bin/getConfig Installation PMVolumeIOPS`
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -246,7 +246,7 @@ detachvolume() {
|
|||||||
((retries++))
|
((retries++))
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
test -f /usr/local/Calpont/post/functions && . /usr/local/Calpont/post/functions
|
test -f /usr/local/MariaDB/Columnstore/post/functions && . /usr/local/MariaDB/Columnstore/post/functions
|
||||||
cplogger -w 100 "detachvolume failed: $STATUS"
|
cplogger -w 100 "detachvolume failed: $STATUS"
|
||||||
echo "failed"
|
echo "failed"
|
||||||
exit 1
|
exit 1
|
||||||
@ -257,7 +257,7 @@ detachvolume() {
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
test -f /usr/local/Calpont/post/functions && . /usr/local/Calpont/post/functions
|
test -f /usr/local/MariaDB/Columnstore/post/functions && . /usr/local/MariaDB/Columnstore/post/functions
|
||||||
cplogger -w 100 "detachvolume failed status: $STATUS"
|
cplogger -w 100 "detachvolume failed status: $STATUS"
|
||||||
echo $STATUS
|
echo $STATUS
|
||||||
exit 1
|
exit 1
|
||||||
@ -281,7 +281,7 @@ attachvolume() {
|
|||||||
((retries++))
|
((retries++))
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
test -f /usr/local/Calpont/post/functions && . /usr/local/Calpont/post/functions
|
test -f /usr/local/MariaDB/Columnstore/post/functions && . /usr/local/MariaDB/Columnstore/post/functions
|
||||||
cplogger -w 100 "attachvolume failed: $STATUS"
|
cplogger -w 100 "attachvolume failed: $STATUS"
|
||||||
echo "failed"
|
echo "failed"
|
||||||
exit 1
|
exit 1
|
||||||
@ -292,7 +292,7 @@ attachvolume() {
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
test -f /usr/local/Calpont/post/functions && . /usr/local/Calpont/post/functions
|
test -f /usr/local/MariaDB/Columnstore/post/functions && . /usr/local/MariaDB/Columnstore/post/functions
|
||||||
cplogger -w 100 "attachvolume failed: $STATUS"
|
cplogger -w 100 "attachvolume failed: $STATUS"
|
||||||
echo $STATUS
|
echo $STATUS
|
||||||
exit 1
|
exit 1
|
||||||
|
275
oam/install_scripts/Doxyfile
Normal file
275
oam/install_scripts/Doxyfile
Normal file
@ -0,0 +1,275 @@
|
|||||||
|
# Doxyfile 1.4.1-KDevelop
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Project related configuration options
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
PROJECT_NAME = install_scripts.kdevelop
|
||||||
|
PROJECT_NUMBER = $VERSION$
|
||||||
|
OUTPUT_DIRECTORY =
|
||||||
|
CREATE_SUBDIRS = NO
|
||||||
|
OUTPUT_LANGUAGE = English
|
||||||
|
USE_WINDOWS_ENCODING = NO
|
||||||
|
BRIEF_MEMBER_DESC = YES
|
||||||
|
REPEAT_BRIEF = YES
|
||||||
|
ABBREVIATE_BRIEF = "The $name class" \
|
||||||
|
"The $name widget" \
|
||||||
|
"The $name file" \
|
||||||
|
is \
|
||||||
|
provides \
|
||||||
|
specifies \
|
||||||
|
contains \
|
||||||
|
represents \
|
||||||
|
a \
|
||||||
|
an \
|
||||||
|
the
|
||||||
|
ALWAYS_DETAILED_SEC = NO
|
||||||
|
INLINE_INHERITED_MEMB = NO
|
||||||
|
FULL_PATH_NAMES = YES
|
||||||
|
STRIP_FROM_PATH = /home/dhill/
|
||||||
|
STRIP_FROM_INC_PATH =
|
||||||
|
SHORT_NAMES = NO
|
||||||
|
JAVADOC_AUTOBRIEF = NO
|
||||||
|
MULTILINE_CPP_IS_BRIEF = NO
|
||||||
|
DETAILS_AT_TOP = NO
|
||||||
|
INHERIT_DOCS = YES
|
||||||
|
DISTRIBUTE_GROUP_DOC = NO
|
||||||
|
TAB_SIZE = 8
|
||||||
|
ALIASES =
|
||||||
|
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||||
|
OPTIMIZE_OUTPUT_JAVA = NO
|
||||||
|
SUBGROUPING = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Build related configuration options
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
EXTRACT_ALL = NO
|
||||||
|
EXTRACT_PRIVATE = NO
|
||||||
|
EXTRACT_STATIC = NO
|
||||||
|
EXTRACT_LOCAL_CLASSES = YES
|
||||||
|
EXTRACT_LOCAL_METHODS = NO
|
||||||
|
HIDE_UNDOC_MEMBERS = NO
|
||||||
|
HIDE_UNDOC_CLASSES = NO
|
||||||
|
HIDE_FRIEND_COMPOUNDS = NO
|
||||||
|
HIDE_IN_BODY_DOCS = NO
|
||||||
|
INTERNAL_DOCS = NO
|
||||||
|
CASE_SENSE_NAMES = YES
|
||||||
|
HIDE_SCOPE_NAMES = NO
|
||||||
|
SHOW_INCLUDE_FILES = YES
|
||||||
|
INLINE_INFO = YES
|
||||||
|
SORT_MEMBER_DOCS = YES
|
||||||
|
SORT_BRIEF_DOCS = NO
|
||||||
|
SORT_BY_SCOPE_NAME = NO
|
||||||
|
GENERATE_TODOLIST = YES
|
||||||
|
GENERATE_TESTLIST = YES
|
||||||
|
GENERATE_BUGLIST = YES
|
||||||
|
GENERATE_DEPRECATEDLIST= YES
|
||||||
|
ENABLED_SECTIONS =
|
||||||
|
MAX_INITIALIZER_LINES = 30
|
||||||
|
SHOW_USED_FILES = YES
|
||||||
|
SHOW_DIRECTORIES = YES
|
||||||
|
FILE_VERSION_FILTER =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to warning and progress messages
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
QUIET = NO
|
||||||
|
WARNINGS = YES
|
||||||
|
WARN_IF_UNDOCUMENTED = YES
|
||||||
|
WARN_IF_DOC_ERROR = YES
|
||||||
|
WARN_NO_PARAMDOC = NO
|
||||||
|
WARN_FORMAT = "$file:$line: $text"
|
||||||
|
WARN_LOGFILE =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the input files
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
INPUT = /home/dhill/InfiniDB_MariaDB/oam/install_scripts
|
||||||
|
FILE_PATTERNS = *.c \
|
||||||
|
*.cc \
|
||||||
|
*.cxx \
|
||||||
|
*.cpp \
|
||||||
|
*.c++ \
|
||||||
|
*.java \
|
||||||
|
*.ii \
|
||||||
|
*.ixx \
|
||||||
|
*.ipp \
|
||||||
|
*.i++ \
|
||||||
|
*.inl \
|
||||||
|
*.h \
|
||||||
|
*.hh \
|
||||||
|
*.hxx \
|
||||||
|
*.hpp \
|
||||||
|
*.h++ \
|
||||||
|
*.idl \
|
||||||
|
*.odl \
|
||||||
|
*.cs \
|
||||||
|
*.php \
|
||||||
|
*.php3 \
|
||||||
|
*.inc \
|
||||||
|
*.m \
|
||||||
|
*.mm \
|
||||||
|
*.dox \
|
||||||
|
*.C \
|
||||||
|
*.CC \
|
||||||
|
*.C++ \
|
||||||
|
*.II \
|
||||||
|
*.I++ \
|
||||||
|
*.H \
|
||||||
|
*.HH \
|
||||||
|
*.H++ \
|
||||||
|
*.CS \
|
||||||
|
*.PHP \
|
||||||
|
*.PHP3 \
|
||||||
|
*.M \
|
||||||
|
*.MM \
|
||||||
|
*.C \
|
||||||
|
*.H \
|
||||||
|
*.tlh \
|
||||||
|
*.diff \
|
||||||
|
*.patch \
|
||||||
|
*.moc \
|
||||||
|
*.xpm \
|
||||||
|
*.dox
|
||||||
|
RECURSIVE = yes
|
||||||
|
EXCLUDE =
|
||||||
|
EXCLUDE_SYMLINKS = NO
|
||||||
|
EXCLUDE_PATTERNS =
|
||||||
|
EXAMPLE_PATH =
|
||||||
|
EXAMPLE_PATTERNS = *
|
||||||
|
EXAMPLE_RECURSIVE = NO
|
||||||
|
IMAGE_PATH =
|
||||||
|
INPUT_FILTER =
|
||||||
|
FILTER_PATTERNS =
|
||||||
|
FILTER_SOURCE_FILES = NO
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to source browsing
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
SOURCE_BROWSER = NO
|
||||||
|
INLINE_SOURCES = NO
|
||||||
|
STRIP_CODE_COMMENTS = YES
|
||||||
|
REFERENCED_BY_RELATION = YES
|
||||||
|
REFERENCES_RELATION = YES
|
||||||
|
VERBATIM_HEADERS = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the alphabetical class index
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
ALPHABETICAL_INDEX = NO
|
||||||
|
COLS_IN_ALPHA_INDEX = 5
|
||||||
|
IGNORE_PREFIX =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the HTML output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_HTML = YES
|
||||||
|
HTML_OUTPUT = html
|
||||||
|
HTML_FILE_EXTENSION = .html
|
||||||
|
HTML_HEADER =
|
||||||
|
HTML_FOOTER =
|
||||||
|
HTML_STYLESHEET =
|
||||||
|
HTML_ALIGN_MEMBERS = YES
|
||||||
|
GENERATE_HTMLHELP = NO
|
||||||
|
CHM_FILE =
|
||||||
|
HHC_LOCATION =
|
||||||
|
GENERATE_CHI = NO
|
||||||
|
BINARY_TOC = NO
|
||||||
|
TOC_EXPAND = NO
|
||||||
|
DISABLE_INDEX = NO
|
||||||
|
ENUM_VALUES_PER_LINE = 4
|
||||||
|
GENERATE_TREEVIEW = NO
|
||||||
|
TREEVIEW_WIDTH = 250
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the LaTeX output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_LATEX = YES
|
||||||
|
LATEX_OUTPUT = latex
|
||||||
|
LATEX_CMD_NAME = latex
|
||||||
|
MAKEINDEX_CMD_NAME = makeindex
|
||||||
|
COMPACT_LATEX = NO
|
||||||
|
PAPER_TYPE = a4wide
|
||||||
|
EXTRA_PACKAGES =
|
||||||
|
LATEX_HEADER =
|
||||||
|
PDF_HYPERLINKS = NO
|
||||||
|
USE_PDFLATEX = NO
|
||||||
|
LATEX_BATCHMODE = NO
|
||||||
|
LATEX_HIDE_INDICES = NO
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the RTF output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_RTF = NO
|
||||||
|
RTF_OUTPUT = rtf
|
||||||
|
COMPACT_RTF = NO
|
||||||
|
RTF_HYPERLINKS = NO
|
||||||
|
RTF_STYLESHEET_FILE =
|
||||||
|
RTF_EXTENSIONS_FILE =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the man page output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_MAN = NO
|
||||||
|
MAN_OUTPUT = man
|
||||||
|
MAN_EXTENSION = .3
|
||||||
|
MAN_LINKS = NO
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the XML output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_XML = yes
|
||||||
|
XML_OUTPUT = xml
|
||||||
|
XML_SCHEMA =
|
||||||
|
XML_DTD =
|
||||||
|
XML_PROGRAMLISTING = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options for the AutoGen Definitions output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_AUTOGEN_DEF = NO
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# configuration options related to the Perl module output
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
GENERATE_PERLMOD = NO
|
||||||
|
PERLMOD_LATEX = NO
|
||||||
|
PERLMOD_PRETTY = YES
|
||||||
|
PERLMOD_MAKEVAR_PREFIX =
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the preprocessor
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
ENABLE_PREPROCESSING = YES
|
||||||
|
MACRO_EXPANSION = NO
|
||||||
|
EXPAND_ONLY_PREDEF = NO
|
||||||
|
SEARCH_INCLUDES = YES
|
||||||
|
INCLUDE_PATH =
|
||||||
|
INCLUDE_FILE_PATTERNS =
|
||||||
|
PREDEFINED =
|
||||||
|
EXPAND_AS_DEFINED =
|
||||||
|
SKIP_FUNCTION_MACROS = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration::additions related to external references
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
TAGFILES =
|
||||||
|
GENERATE_TAGFILE = install_scripts.tag
|
||||||
|
ALLEXTERNALS = NO
|
||||||
|
EXTERNAL_GROUPS = YES
|
||||||
|
PERL_PATH = /usr/bin/perl
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration options related to the dot tool
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
CLASS_DIAGRAMS = YES
|
||||||
|
HIDE_UNDOC_RELATIONS = YES
|
||||||
|
HAVE_DOT = NO
|
||||||
|
CLASS_GRAPH = YES
|
||||||
|
COLLABORATION_GRAPH = YES
|
||||||
|
GROUP_GRAPHS = YES
|
||||||
|
UML_LOOK = NO
|
||||||
|
TEMPLATE_RELATIONS = NO
|
||||||
|
INCLUDE_GRAPH = YES
|
||||||
|
INCLUDED_BY_GRAPH = YES
|
||||||
|
CALL_GRAPH = NO
|
||||||
|
GRAPHICAL_HIERARCHY = YES
|
||||||
|
DIRECTORY_GRAPH = YES
|
||||||
|
DOT_IMAGE_FORMAT = png
|
||||||
|
DOT_PATH =
|
||||||
|
DOTFILE_DIRS =
|
||||||
|
MAX_DOT_GRAPH_WIDTH = 1024
|
||||||
|
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||||
|
MAX_DOT_GRAPH_DEPTH = 1000
|
||||||
|
DOT_TRANSPARENT = NO
|
||||||
|
DOT_MULTI_TARGETS = NO
|
||||||
|
GENERATE_LEGEND = YES
|
||||||
|
DOT_CLEANUP = YES
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
# Configuration::additions related to the search engine
|
||||||
|
#---------------------------------------------------------------------------
|
||||||
|
SEARCHENGINE = NO
|
@ -9,16 +9,16 @@ include ../../rules.mak
|
|||||||
.PHONY: install clean test docs coverage leakcheck
|
.PHONY: install clean test docs coverage leakcheck
|
||||||
|
|
||||||
SCRIPTS=post-install pre-uninstall remote_command.sh \
|
SCRIPTS=post-install pre-uninstall remote_command.sh \
|
||||||
calpontLogRotate transactionLog transactionLogArchiver.sh system_installer.sh \
|
columnstoreLogRotate transactionLog transactionLogArchiver.sh system_installer.sh \
|
||||||
module_installer.sh patch_installer.sh xm_installer.sh startupTests.sh \
|
module_installer.sh startupTests.sh \
|
||||||
director_installer.sh user_installer.sh performance_installer.sh \
|
user_installer.sh performance_installer.sh \
|
||||||
remote_scp_get.sh calpontAlias run.sh upgrade-infinidb.sh \
|
remote_scp_get.sh columnstoreAlias run.sh upgrade-columnstore.sh \
|
||||||
post-mysql-install post-mysqld-install binary_installer.sh \
|
post-mysql-install post-mysqld-install binary_installer.sh \
|
||||||
os_check.sh infinidb calpontSyslog calpontSyslog-ng syslogSetup.sh \
|
os_check.sh columnstore columnstoreSyslog columnstoreSyslog-ng syslogSetup.sh \
|
||||||
remote_scp_put.sh calpontUninstall.sh infinidb.def \
|
remote_scp_put.sh columnstoreUninstall.sh columnstore.def \
|
||||||
remotessh.exp master-rep-infinidb.sh slave-rep-infinidb.sh rsync.sh \
|
remotessh.exp master-rep-columnstore.sh slave-rep-columnstore.sh rsync.sh \
|
||||||
myCnf-include-args.text myCnf-exclude-args.text remote_command_verify.sh \
|
myCnf-include-args.text myCnf-exclude-args.text remote_command_verify.sh \
|
||||||
calpontSyslog7 disable-rep-infinidb.sh infinidb.conf
|
columnstoreSyslog7 disable-rep-columnstore.sh columnstore.conf
|
||||||
|
|
||||||
LOCAL=module
|
LOCAL=module
|
||||||
|
|
||||||
|
57
oam/install_scripts/Makefile~
Executable file
57
oam/install_scripts/Makefile~
Executable file
@ -0,0 +1,57 @@
|
|||||||
|
include ../../rules.mak
|
||||||
|
#******************************************************************************************
|
||||||
|
#
|
||||||
|
# $Id: Makefile 3250 2012-09-26 17:44:13Z rdempsey $
|
||||||
|
#
|
||||||
|
# Copyright (C) 2009-2012 Calpont Corporation
|
||||||
|
# All rights reserved
|
||||||
|
#*****************************************************************************************/
|
||||||
|
.PHONY: install clean test docs coverage leakcheck
|
||||||
|
|
||||||
|
SCRIPTS=post-install pre-uninstall remote_command.sh \
|
||||||
|
columnstoreLogRotate transactionLog transactionLogArchiver.sh system_installer.sh \
|
||||||
|
module_installer.sh patch_installer.sh xm_installer.sh startupTests.sh \
|
||||||
|
director_installer.sh user_installer.sh performance_installer.sh \
|
||||||
|
remote_scp_get.sh columnstoreAlias run.sh upgrade-columnstore.sh \
|
||||||
|
post-mysql-install post-mysqld-install binary_installer.sh \
|
||||||
|
os_check.sh columnstore columnstoreSyslog columnstoreSyslog-ng syslogSetup.sh \
|
||||||
|
remote_scp_put.sh columnstoreUninstall.sh columnstore.def \
|
||||||
|
remotessh.exp master-rep-columnstore.sh slave-rep-columnstore.sh rsync.sh \
|
||||||
|
myCnf-include-args.text myCnf-exclude-args.text remote_command_verify.sh \
|
||||||
|
columnstoreSyslog7 disable-rep-columnstore.sh columnstore.conf
|
||||||
|
|
||||||
|
LOCAL=module
|
||||||
|
|
||||||
|
bootstrap:
|
||||||
|
umask 002; \
|
||||||
|
mkdir -p $(INSTALL_ROOT_BIN); \
|
||||||
|
pushd $(INSTALL_ROOT_BIN) >/dev/null; \
|
||||||
|
rm -f $(SCRIPTS); \
|
||||||
|
popd >/dev/null; \
|
||||||
|
$(INSTALL) $(SCRIPTS) $(INSTALL_ROOT_BIN)
|
||||||
|
pushd $(INSTALL_ROOT_BIN) >/dev/null; \
|
||||||
|
chmod -f 555 $(SCRIPTS); \
|
||||||
|
popd >/dev/null
|
||||||
|
umask 002; \
|
||||||
|
mkdir -p $(INSTALL_ROOT_LOCAL); \
|
||||||
|
pushd $(INSTALL_ROOT_LOCAL) >/dev/null; \
|
||||||
|
rm -f $(LOCAL); \
|
||||||
|
popd >/dev/null; \
|
||||||
|
$(INSTALL) $(LOCAL) $(INSTALL_ROOT_LOCAL)
|
||||||
|
pushd $(INSTALL_ROOT_LOCAL) >/dev/null; \
|
||||||
|
chmod -f 555 $(LOCAL); \
|
||||||
|
popd >/dev/null
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f $(OBJS) $(PROGRAM) core *~ *.tag *.d *.d.*
|
||||||
|
|
||||||
|
install: bootstrap
|
||||||
|
|
||||||
|
test:
|
||||||
|
|
||||||
|
docs:
|
||||||
|
|
||||||
|
coverage:
|
||||||
|
|
||||||
|
leakcheck:
|
||||||
|
|
@ -24,7 +24,7 @@ set PKGTYPE "binary"
|
|||||||
set SERVERTYPE [lindex $argv 6]
|
set SERVERTYPE [lindex $argv 6]
|
||||||
set MYSQLPORT [lindex $argv 7]
|
set MYSQLPORT [lindex $argv 7]
|
||||||
set DEBUG [lindex $argv 8]
|
set DEBUG [lindex $argv 8]
|
||||||
set INSTALLDIR "/usr/local/Calpont"
|
set INSTALLDIR "/usr/local/MariaDB/Columnstore"
|
||||||
set IDIR [lindex $argv 9]
|
set IDIR [lindex $argv 9]
|
||||||
if { $IDIR != "" } {
|
if { $IDIR != "" } {
|
||||||
set INSTALLDIR $IDIR
|
set INSTALLDIR $IDIR
|
||||||
|
@ -13,7 +13,7 @@ set PACKAGE " "
|
|||||||
set CONFIGFILE " "
|
set CONFIGFILE " "
|
||||||
set DEBUG 0
|
set DEBUG 0
|
||||||
set NODEPS "-h"
|
set NODEPS "-h"
|
||||||
set INSTALLDIR "/usr/local/Calpont"
|
set INSTALLDIR "/usr/local/MariaDB/Columnstore"
|
||||||
|
|
||||||
spawn -noecho /bin/bash
|
spawn -noecho /bin/bash
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
# Uninstall Package from system
|
# Uninstall Package from system
|
||||||
|
|
||||||
set INFINIDB_INSTALL_DIR "/usr/local/Calpont"
|
set INFINIDB_INSTALL_DIR "/usr/local/MariaDB/Columnstore"
|
||||||
set env(INFINIDB_INSTALL_DIR) $INFINIDB_INSTALL_DIR
|
set env(INFINIDB_INSTALL_DIR) $INFINIDB_INSTALL_DIR
|
||||||
|
|
||||||
set USERNAME $env(USER)
|
set USERNAME $env(USER)
|
||||||
|
184
oam/install_scripts/columnstore
Normal file
184
oam/install_scripts/columnstore
Normal file
@ -0,0 +1,184 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# $Id: columnstore 3704 2013-08-07 03:33:20Z bwilkinson $
|
||||||
|
#
|
||||||
|
# columnstore Starts MariaDB Columnstore database platform
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# chkconfig: 2345 99 99
|
||||||
|
# description: MariaDB Columnstore is a database platform that utilizes Mysql
|
||||||
|
#
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: columnstore
|
||||||
|
# Required-Start: $local_fs $remote_fs $network $syslog $all
|
||||||
|
# Required-Stop: $local_fs $remote_fs $network $syslog
|
||||||
|
# Default-Start: 2 3 4 5
|
||||||
|
# Default-Stop: 0 1 6
|
||||||
|
# Short-Description: Start/stop InfiniDB DW DBMS
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
# Source function library.
|
||||||
|
if [ -f /etc/init.d/functions ]; then
|
||||||
|
. /etc/init.d/functions
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$INFINIDB_INSTALL_DIR" ]; then
|
||||||
|
test -f /etc/default/columnstore && . /etc/default/columnstore
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$INFINIDB_INSTALL_DIR" ]; then
|
||||||
|
INFINIDB_INSTALL_DIR=/usr/local/MariaDB/Columnstore
|
||||||
|
fi
|
||||||
|
|
||||||
|
export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR
|
||||||
|
|
||||||
|
InstallDir=$INFINIDB_INSTALL_DIR
|
||||||
|
|
||||||
|
if [ $InstallDir != "/usr/local/Calpont" ]; then
|
||||||
|
export PATH=$InstallDir/bin:$InstallDir/mysql/bin:/bin:/usr/bin
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$InstallDir/lib:$InstallDir/mysql/lib/mysql
|
||||||
|
fi
|
||||||
|
|
||||||
|
#hadoop
|
||||||
|
plugin=`$INFINIDB_INSTALL_DIR/bin/getConfig SystemConfig DataFilePlugin`
|
||||||
|
if [ -n "$plugin" ]; then
|
||||||
|
setenv=`$InstallDir/bin/getConfig SystemConfig DataFileEnvFile`
|
||||||
|
. $InstallDir/bin/$setenv >/dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -e $InstallDir/lib/libjemalloc.so ]; then
|
||||||
|
export LD_PRELOAD=$InstallDir/lib/libjemalloc.so
|
||||||
|
elif [ -e $InstallDir/lib/libjemalloc.so.1 ]; then
|
||||||
|
export LD_PRELOAD=$InstallDir/lib/libjemalloc.so.1
|
||||||
|
fi
|
||||||
|
|
||||||
|
test -f $InstallDir/post/functions && . $InstallDir/post/functions
|
||||||
|
|
||||||
|
mt=`module_type`
|
||||||
|
mid=`module_id`
|
||||||
|
|
||||||
|
has_um=`$InstallDir/bin/getConfig SystemModuleConfig ModuleCount2`
|
||||||
|
if [ "x$has_um" = x ]; then
|
||||||
|
has_um=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
user=$USER
|
||||||
|
if [ -z "$user" ]; then
|
||||||
|
user=root
|
||||||
|
fi
|
||||||
|
|
||||||
|
checkInstallSetup() {
|
||||||
|
InitialInstallFlag=`$InstallDir/bin/getConfig -c $InstallDir/etc/Calpont.xml Installation InitialInstallFlag`
|
||||||
|
if [ $InitialInstallFlag != "y" ]; then
|
||||||
|
echo "Please run the postConfigure install script, check the Installation Guide"
|
||||||
|
echo "for additional details"
|
||||||
|
rm -f /var/lock/subsys/columnstore
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
[ -f $InstallDir/bin/ProcMon ] || exit 0
|
||||||
|
|
||||||
|
start() {
|
||||||
|
if [ -f /var/lock/subsys/columnstore ]; then
|
||||||
|
echo "MariaDB Columnstore Database Platform already running"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
(mkdir -p /var/lock/subsys && touch /var/lock/subsys/columnstore) >/dev/null 2>&1
|
||||||
|
|
||||||
|
if [ -x $InstallDir/bin/columnstore.pre-start ]; then
|
||||||
|
$InstallDir/bin/columnstore.pre-start
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Error running MariaDB Columnstore pre-start script, not starting MariaDB Columnstore"
|
||||||
|
rm -f /var/lock/subsys/columnstore
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
checkInstallSetup
|
||||||
|
|
||||||
|
CoreFileFlag=`$InstallDir/bin/getConfig -c $InstallDir/etc/Calpont.xml Installation CoreFileFlag`
|
||||||
|
if [ $CoreFileFlag = "y" ]; then
|
||||||
|
SUDO=
|
||||||
|
if [ "$user" != "root" ]; then
|
||||||
|
SUDO="sudo"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#columnstore core files
|
||||||
|
$SUDO ulimit -c unlimited > /dev/null 2>&1
|
||||||
|
$SUDO sysctl -q -w kernel.core_uses_pid=1 > /dev/null 2>&1
|
||||||
|
$SUDO sysctl -q -w kernel.core_pattern=/var/log/Calpont/corefiles/core.%e.%p > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
RETVAL=0
|
||||||
|
echo "Starting MariaDB Columnstore Database Platform"
|
||||||
|
rm -f /tmp/StopCalpont
|
||||||
|
exec $InstallDir/bin/run.sh $InstallDir/bin/ProcMon > /dev/null 2>&1 &
|
||||||
|
|
||||||
|
return $RETVAL
|
||||||
|
}
|
||||||
|
stop() {
|
||||||
|
echo "Shutting down MariaDB Columnstore Database Platform"
|
||||||
|
touch /tmp/StopCalpont
|
||||||
|
pkill -9 ProcMon
|
||||||
|
pkill -9 ProcMgr
|
||||||
|
pkill -9 snmptrapd
|
||||||
|
sleep 1
|
||||||
|
$InstallDir/bin/clearShm
|
||||||
|
RETVAL=$?
|
||||||
|
rm -f /var/lock/subsys/columnstore
|
||||||
|
fuser -k 8604/tcp > /dev/null 2>&1
|
||||||
|
test -f $InstallDir/mysql/mysql-Calpont || return $RETVAL
|
||||||
|
$InstallDir/mysql/mysql-Calpont stop > /dev/null 2>&1
|
||||||
|
if [ -x $InstallDir/bin/columnstore.post-stop ]; then
|
||||||
|
$InstallDir/bin/columnstore.post-stop
|
||||||
|
fi
|
||||||
|
return $RETVAL
|
||||||
|
}
|
||||||
|
restart() {
|
||||||
|
stop
|
||||||
|
start
|
||||||
|
}
|
||||||
|
status() {
|
||||||
|
isrunning=0
|
||||||
|
if [ $EUID -eq 0 ]; then
|
||||||
|
if [ -f /var/lock/subsys/columnstore ]; then
|
||||||
|
isrunning=1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
pgrep ProcMon >/dev/null 2>&1
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
isrunning=1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ $isrunning -ne 0 ]; then
|
||||||
|
echo "MariaDB Columnstore is running"
|
||||||
|
else
|
||||||
|
echo "MariaDB Columnstore is not running"
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
start
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
stop
|
||||||
|
;;
|
||||||
|
restart)
|
||||||
|
restart
|
||||||
|
;;
|
||||||
|
condrestart)
|
||||||
|
[ -f /var/lock/subsys/columnstore ] && restart || :
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
status
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit $?
|
||||||
|
|
2
oam/install_scripts/columnstore.conf
Normal file
2
oam/install_scripts/columnstore.conf
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/usr/local/Calpont/lib
|
||||||
|
|
9
oam/install_scripts/columnstore.def
Normal file
9
oam/install_scripts/columnstore.def
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Copy this file to /etc/default and rename it to 'infinidb'.
|
||||||
|
|
||||||
|
# Change this line to your InfiniDB installation directory
|
||||||
|
INFINIDB_INSTALL_DIR=/usr/local/Calpont
|
||||||
|
|
||||||
|
LD_LIBRARY_PATH=$INFINIDB_INSTALL_DIR/lib:$INFINIDB_INSTALL_DIR/mysql/lib/mysql
|
||||||
|
export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
|
16
oam/install_scripts/columnstore.upstart
Normal file
16
oam/install_scripts/columnstore.upstart
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# $Id$
|
||||||
|
|
||||||
|
description "Starts the InfiniDB Enterprise Process Monitor"
|
||||||
|
|
||||||
|
start on runlevel 2
|
||||||
|
start on runlevel 3
|
||||||
|
|
||||||
|
stop on runlevel 0
|
||||||
|
stop on runlevel 1
|
||||||
|
stop on runlevel 4
|
||||||
|
stop on runlevel 5
|
||||||
|
stop on runlevel 6
|
||||||
|
|
||||||
|
respawn
|
||||||
|
exec /usr/local/Calpont/bin/ProcMon
|
||||||
|
|
13
oam/install_scripts/columnstoreAlias
Normal file
13
oam/install_scripts/columnstoreAlias
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# InfiniDB Alias Commands
|
||||||
|
#
|
||||||
|
alias mcsmysql='/usr/local/Calpont/mysql/bin/mysql --defaults-file=/usr/local/Calpont/mysql/my.cnf -u root'
|
||||||
|
alias ma=/usr/local/Calpont/bin/mcsadmin
|
||||||
|
alias mcsadmin=/usr/local/Calpont/bin/mcsadmin
|
||||||
|
alias home='cd /usr/local/Calpont/'
|
||||||
|
alias log='cd /var/log/Calpont/'
|
||||||
|
alias core='cd /var/log/Calpont/corefiles'
|
||||||
|
alias tmsg='tail -f /var/log/messages'
|
||||||
|
alias tdebug='tail -f /var/log/Calpont/debug.log'
|
||||||
|
alias tinfo='tail -f /var/log/Calpont/info.log'
|
||||||
|
alias dbrm='cd /usr/local/Calpont/data1/systemFiles/dbrm'
|
||||||
|
alias module='cat /usr/local/Calpont/local/module'
|
167
oam/install_scripts/columnstoreInstall.sh
Executable file
167
oam/install_scripts/columnstoreInstall.sh
Executable file
@ -0,0 +1,167 @@
|
|||||||
|
#!/usr/bin/expect
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
# Install Package on system
|
||||||
|
|
||||||
|
set timeout 30
|
||||||
|
set USERNAME "root"
|
||||||
|
set RPMVERSION " "
|
||||||
|
set PASSWORD " "
|
||||||
|
set MYSQLPASSWORD dummymysqlpw
|
||||||
|
set PACKAGE " "
|
||||||
|
set CONFIGFILE " "
|
||||||
|
set DEBUG 0
|
||||||
|
set NODEPS "-h"
|
||||||
|
set INSTALLDIR "/usr/local/MariaDB/Columnstore"
|
||||||
|
|
||||||
|
spawn -noecho /bin/bash
|
||||||
|
|
||||||
|
for {set i 0} {$i<[llength $argv]} {incr i} {
|
||||||
|
set arg($i) [lindex $argv $i]
|
||||||
|
}
|
||||||
|
|
||||||
|
set i 0
|
||||||
|
while true {
|
||||||
|
if { $i == [llength $argv] } { break }
|
||||||
|
if { $arg($i) == "-h" } {
|
||||||
|
send_user "\n"
|
||||||
|
send_user "'calpontInstaller.sh' performs a system install of the Calpont InfiniDB Packages\n"
|
||||||
|
send_user "from the /root/ directory. These Packages would have already been installed\n"
|
||||||
|
send_user "on the local Module.\n"
|
||||||
|
send_user "Usage: calpontInstaller.sh -v 'infinidb-version' -p 'password' -t 'package-type' -c 'config-file'-m 'mysql-password' -d\n"
|
||||||
|
send_user " infinidb-version - InfiniDB Version, i.e. 1.0.0-1\n"
|
||||||
|
send_user " password - root password on the servers being installed'\n"
|
||||||
|
send_user " package-type - Package Type being installed (rpm, deb, or binary)\n"
|
||||||
|
send_user " config-file - Optional: Calpont.xml config file with directory location, i.e. /root/Calpont.xml\n"
|
||||||
|
send_user " Default version is $INSTALLDIR/etc/Calpont.xml.rpmsave\n"
|
||||||
|
send_user " mysql-password - MySQL password on the servers being installed'\n"
|
||||||
|
send_user " -d - Debug flag, output verbose information\n"
|
||||||
|
exit 0
|
||||||
|
} elseif { $arg($i) == "-v" } {
|
||||||
|
incr i
|
||||||
|
set RPMVERSION $arg($i)
|
||||||
|
} elseif { $arg($i) == "-p" } {
|
||||||
|
incr i
|
||||||
|
set PASSWORD $arg($i)
|
||||||
|
} elseif { $arg($i) == "-t" } {
|
||||||
|
incr i
|
||||||
|
set PACKAGE $arg($i)
|
||||||
|
} elseif { $arg($i) == "-c" } {
|
||||||
|
incr i
|
||||||
|
set CONFIGFILE $arg($i)
|
||||||
|
} elseif { $arg($i) == "-d" } {
|
||||||
|
set DEBUG 1
|
||||||
|
} elseif { $arg($i) == "-f" } {
|
||||||
|
set NODEPS "--nodeps"
|
||||||
|
} elseif { $arg($i) == "-m" } {
|
||||||
|
incr i
|
||||||
|
set MYSQLPASSWORD $arg($i)
|
||||||
|
} elseif { $arg($i) == "-i" } {
|
||||||
|
incr i
|
||||||
|
set INSTALLDIR $arg($i)
|
||||||
|
} elseif { $arg($i) == "-u" } {
|
||||||
|
incr i
|
||||||
|
set USERNAME $arg($i)
|
||||||
|
}
|
||||||
|
incr i
|
||||||
|
}
|
||||||
|
|
||||||
|
log_user $DEBUG
|
||||||
|
|
||||||
|
set timeout 2
|
||||||
|
send "$INSTALLDIR/bin/infinidb status\n"
|
||||||
|
expect {
|
||||||
|
"is running" { puts "InfiniDB is running, can't run calpontInstall.sh while InfiniDB is running. Exiting..\n";
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if { $CONFIGFILE == " " } {
|
||||||
|
set CONFIGFILE $INSTALLDIR/etc/Calpont.xml.rpmsave
|
||||||
|
}
|
||||||
|
|
||||||
|
if { [catch { open $CONFIGFILE "r"} handle ] } {
|
||||||
|
puts "Calpont Config file not found: $CONFIGFILE"; exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
exec rm -f $INSTALLDIR/etc/Calpont.xml.new > /dev/null 2>&1
|
||||||
|
exec mv -f $INSTALLDIR/etc/Calpont.xml $INSTALLDIR/etc/Calpont.xml.new > /dev/null 2>&1
|
||||||
|
exec /bin/cp -f $CONFIGFILE $INSTALLDIR/etc/Calpont.xml > /dev/null 2>&1
|
||||||
|
|
||||||
|
set timeout 2
|
||||||
|
set INSTALL 2
|
||||||
|
send "$INSTALLDIR/bin/getConfig DBRM_Controller NumWorkers\n"
|
||||||
|
expect {
|
||||||
|
1 { set INSTALL 1
|
||||||
|
set PASSWORD "dummy"
|
||||||
|
set RPMVERSION "rpm" }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if { $INSTALL == "2" && $PASSWORD == " "} {puts "please enter the remote server root password, enter ./calpontInstaller.sh -h for additional info"; exit 1}
|
||||||
|
|
||||||
|
if { $INSTALL == "2" && $RPMVERSION == " " } {puts "please enter Package version, enter ./calpontInstaller.sh -h for additional info"; exit 1}
|
||||||
|
|
||||||
|
send_user "\n"
|
||||||
|
|
||||||
|
if { $INSTALL == "2" } {
|
||||||
|
if { $PACKAGE == "rpm" } {
|
||||||
|
set CALPONTPACKAGE1 /root/infinidb-libs-$RPMVERSION*.rpm
|
||||||
|
set CALPONTPACKAGE2 /root/infinidb-platform-$RPMVERSION*.rpm
|
||||||
|
set CALPONTPACKAGE3 /root/infinidb-enterprise-$RPMVERSION*.rpm
|
||||||
|
set CONNECTORPACKAGE1 /root/infinidb-mysql-$RPMVERSION*.rpm
|
||||||
|
set CONNECTORPACKAGE2 /root/infinidb-storage-engine-$RPMVERSION*.rpm
|
||||||
|
send_user "Installing InfiniDB Packages: $CALPONTPACKAGE1, $CALPONTPACKAGE2, $CALPONTPACKAGE3, $CONNECTORPACKAGE1, $CONNECTORPACKAGE2\n\n"
|
||||||
|
set EEPKG "rpm"
|
||||||
|
} elseif { $PACKAGE == "deb" } {
|
||||||
|
set CALPONTPACKAGE1 /root/infinidb-libs_$RPMVERSION*.deb
|
||||||
|
set CALPONTPACKAGE2 /root/infinidb-platform_$RPMVERSION*.deb
|
||||||
|
set CALPONTPACKAGE3 /root/infinidb-enterprise_$RPMVERSION*.deb
|
||||||
|
set CONNECTORPACKAGE1 /root/infinidb-mysql_$RPMVERSION*.deb
|
||||||
|
set CONNECTORPACKAGE2 /root/infinidb-storage-engine_$RPMVERSION*.deb
|
||||||
|
send_user "Installing InfiniDB Packages: $CALPONTPACKAGE1, $CALPONTPACKAGE2, $CALPONTPACKAGE3, $CONNECTORPACKAGE1, $CONNECTORPACKAGE2\n\n"
|
||||||
|
set EEPKG "deb"
|
||||||
|
} elseif { $PACKAGE == "binary" } {
|
||||||
|
set CALPONTPACKAGE /root/infinidb-ent-$RPMVERSION*bin.tar.gz
|
||||||
|
set CONNECTORPACKAGE1 "nopkg"
|
||||||
|
set CONNECTORPACKAGE2 "nopkg"
|
||||||
|
send_user "Installing InfiniDB Package: $CALPONTPACKAGE\n\n"
|
||||||
|
set EEPKG "binary"
|
||||||
|
} else {
|
||||||
|
puts "please enter Valid Package Type, enter ./calpontInstaller.sh -h for additional info"; exit 1
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
set CALPONTPACKAGE1 "dummy.rpm"
|
||||||
|
set CALPONTPACKAGE2 "dummy.rpm"
|
||||||
|
set CALPONTPACKAGE3 "dummy.rpm"
|
||||||
|
set CONNECTORPACKAGE1 "dummy.rpm"
|
||||||
|
set CONNECTORPACKAGE2 "dummy.rpm"
|
||||||
|
set EEPKG "rpm"
|
||||||
|
}
|
||||||
|
|
||||||
|
send_user "Performing InfiniDB System Install, please wait...\n"
|
||||||
|
|
||||||
|
send "$INSTALLDIR/bin/setConfig -d Installation EEPackageType $EEPKG\n"
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { }
|
||||||
|
}
|
||||||
|
|
||||||
|
send_user "\n"
|
||||||
|
set timeout 600
|
||||||
|
#
|
||||||
|
# Run installer
|
||||||
|
#
|
||||||
|
send "$INSTALLDIR/bin/installer $CALPONTPACKAGE1 $CALPONTPACKAGE2 $CALPONTPACKAGE3 $CONNECTORPACKAGE1 $CONNECTORPACKAGE2 initial $PASSWORD n $NODEPS $MYSQLPASSWORD $DEBUG\n"
|
||||||
|
expect {
|
||||||
|
"InfiniDB Install Successfully Completed" { }
|
||||||
|
"ERROR" { send_user "FAILED: error returned from installer, execute with debug mode on to determine error\n" ; exit 1 }
|
||||||
|
"Enter MySQL password" { send_user "FAILED: a MySQL password is set\n" ; exit 1 }
|
||||||
|
timeout { send_user "FAILED: Timeout while running installer, execute with debug mode on to determine error\n" ; exit 1 }
|
||||||
|
}
|
||||||
|
|
||||||
|
send_user "\nCalpont Package System Install Completed\n\n"
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
# vim:ts=4 sw=4:
|
||||||
|
|
35
oam/install_scripts/columnstoreLogRotate
Normal file
35
oam/install_scripts/columnstoreLogRotate
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#
|
||||||
|
# Calpont Log Rotate file that gets installed in /etc/logrotate.d
|
||||||
|
# as part of the RPM installation
|
||||||
|
#
|
||||||
|
|
||||||
|
/var/log/Calpont/*.log {
|
||||||
|
missingok
|
||||||
|
rotate 7
|
||||||
|
daily
|
||||||
|
dateext
|
||||||
|
copytruncate
|
||||||
|
olddir /var/log/Calpont/archive
|
||||||
|
}
|
||||||
|
/var/log/Calpont/*.log1 {
|
||||||
|
missingok
|
||||||
|
rotate 7
|
||||||
|
daily
|
||||||
|
nocreate
|
||||||
|
compress
|
||||||
|
olddir /var/log/Calpont/archive
|
||||||
|
}
|
||||||
|
/usr/local/Calpont/etc/Calpont.xml {
|
||||||
|
daily
|
||||||
|
dateext
|
||||||
|
copy
|
||||||
|
olddir /usr/local/Calpont/etc/
|
||||||
|
}
|
||||||
|
/usr/local/Calpont/mysql/db/*.err {
|
||||||
|
missingok
|
||||||
|
rotate 7
|
||||||
|
daily
|
||||||
|
dateext
|
||||||
|
copytruncate
|
||||||
|
olddir /usr/local/Calpont/mysql/db
|
||||||
|
}
|
7
oam/install_scripts/columnstoreSyslog
Normal file
7
oam/install_scripts/columnstoreSyslog
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# Calpont Database Platform Logging
|
||||||
|
local1.=crit -/var/log/Calpont/crit.log
|
||||||
|
local1.=err -/var/log/Calpont/err.log
|
||||||
|
local1.=warning -/var/log/Calpont/warning.log
|
||||||
|
local1.=info -/var/log/Calpont/info.log
|
||||||
|
local1.=debug -/var/log/Calpont/debug.log
|
||||||
|
local2.=crit -/var/log/Calpont/data/data_mods.log
|
78
oam/install_scripts/columnstoreSyslog-ng
Executable file
78
oam/install_scripts/columnstoreSyslog-ng
Executable file
@ -0,0 +1,78 @@
|
|||||||
|
# Calpont Database Platform Logging
|
||||||
|
|
||||||
|
source s_infinidb {
|
||||||
|
# message generated by Syslog-NG
|
||||||
|
internal();
|
||||||
|
# standard Linux log source (this is the default place for the syslog()
|
||||||
|
# function to send logs to)
|
||||||
|
unix-stream("/dev/log");
|
||||||
|
# messages from the kernel
|
||||||
|
file("/proc/kmsg" log_prefix("kernel: "));
|
||||||
|
# use the following line if you want to receive remote UDP logging messages
|
||||||
|
# (this is equivalent to the "-r" syslogd flag)
|
||||||
|
# udp();
|
||||||
|
};
|
||||||
|
|
||||||
|
filter f_local1crit { facility(local1) and level(crit); };
|
||||||
|
filter f_local1err { facility(local1) and level(err); };
|
||||||
|
filter f_local1warning { facility(local1) and level(warning); };
|
||||||
|
filter f_local1info { facility(local1) and level(info); };
|
||||||
|
filter f_local1debug { facility(local1) and level(debug); };
|
||||||
|
filter f_local2crit { facility(local2) and level(crit); };
|
||||||
|
|
||||||
|
destination d_crit{
|
||||||
|
file("/var/log/Calpont/crit.log");
|
||||||
|
};
|
||||||
|
|
||||||
|
destination d_err{
|
||||||
|
file("/var/log/Calpont/err.log");
|
||||||
|
};
|
||||||
|
|
||||||
|
destination d_warning{
|
||||||
|
file("/var/log/Calpont/warning.log");
|
||||||
|
};
|
||||||
|
|
||||||
|
destination d_info{
|
||||||
|
file("/var/log/Calpont/info.log");
|
||||||
|
};
|
||||||
|
|
||||||
|
destination d_debug{
|
||||||
|
file("/var/log/Calpont/debug.log");
|
||||||
|
};
|
||||||
|
|
||||||
|
destination d_data_mods{
|
||||||
|
file("/var/log/Calpont/data/data_mods.log");
|
||||||
|
};
|
||||||
|
|
||||||
|
log{
|
||||||
|
source(s_infinidb);
|
||||||
|
filter(f_local1crit);
|
||||||
|
destination(d_crit);
|
||||||
|
};
|
||||||
|
|
||||||
|
log{
|
||||||
|
source(s_infinidb);
|
||||||
|
filter(f_local1err);
|
||||||
|
destination(d_err);
|
||||||
|
};
|
||||||
|
log{
|
||||||
|
source(s_infinidb);
|
||||||
|
filter(f_local1warning);
|
||||||
|
destination(d_warning);
|
||||||
|
};
|
||||||
|
log{
|
||||||
|
source(s_infinidb);
|
||||||
|
filter(f_local1info);
|
||||||
|
destination(d_info);
|
||||||
|
};
|
||||||
|
log{
|
||||||
|
source(s_infinidb);
|
||||||
|
filter(f_local1debug);
|
||||||
|
destination(d_debug);
|
||||||
|
};
|
||||||
|
log{
|
||||||
|
source(s_infinidb);
|
||||||
|
filter(f_local2crit);
|
||||||
|
destination(d_data_mods);
|
||||||
|
};
|
||||||
|
|
8
oam/install_scripts/columnstoreSyslog7
Normal file
8
oam/install_scripts/columnstoreSyslog7
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# Calpont Database Platform Logging
|
||||||
|
local1.crit -/var/log/Calpont/crit.log
|
||||||
|
local1.err -/var/log/Calpont/err.log
|
||||||
|
local1.warning -/var/log/Calpont/warning.log
|
||||||
|
local1.info -/var/log/Calpont/info.log
|
||||||
|
local1.debug -/var/log/Calpont/debug.log
|
||||||
|
local2.crit -/var/log/Calpont/data/data_mods.log
|
||||||
|
|
118
oam/install_scripts/columnstoreUninstall.sh
Executable file
118
oam/install_scripts/columnstoreUninstall.sh
Executable file
@ -0,0 +1,118 @@
|
|||||||
|
#!/usr/bin/expect
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
# Uninstall Package from system
|
||||||
|
|
||||||
|
set INFINIDB_INSTALL_DIR "/usr/local/MariaDB/Columnstore"
|
||||||
|
set env(INFINIDB_INSTALL_DIR) $INFINIDB_INSTALL_DIR
|
||||||
|
|
||||||
|
set USERNAME $env(USER)
|
||||||
|
set PASSWORD " "
|
||||||
|
set DEBUG 0
|
||||||
|
|
||||||
|
set INFINIDBRPM1 "infinidb-libs"
|
||||||
|
set INFINIDBRPM2 "infinidb-platform"
|
||||||
|
set INFINIDBRPM3 "infinidb-enterprise"
|
||||||
|
set CONNECTORRPM1 "infinidb-mysql"
|
||||||
|
set CONNECTORRPM2 "infinidb-storage-engine"
|
||||||
|
|
||||||
|
spawn -noecho /bin/bash
|
||||||
|
|
||||||
|
for {set i 0} {$i<[llength $argv]} {incr i} {
|
||||||
|
set arg($i) [lindex $argv $i]
|
||||||
|
}
|
||||||
|
|
||||||
|
set i 0
|
||||||
|
while true {
|
||||||
|
if { $i == [llength $argv] } { break }
|
||||||
|
if { $arg($i) == "-h" } {
|
||||||
|
send_user "\n"
|
||||||
|
send_user "'calpontUninstall.sh' performs a system uninstall of the Calpont InfiniDB Packages.\n"
|
||||||
|
send_user "It will perform a shutdown of the InfiniDB software and the \n"
|
||||||
|
send_user "remove the Packages from all configured servers of the InfiniDB System.\n"
|
||||||
|
send_user "\n"
|
||||||
|
send_user "Usage: calpontUninstall.sh -p 'password' -d\n"
|
||||||
|
send_user " password - root password of the remote servers being un-installed'\n"
|
||||||
|
send_user " -d - Debug flag, output verbose information\n"
|
||||||
|
exit
|
||||||
|
} elseif { $arg($i) == "-p" } {
|
||||||
|
incr i
|
||||||
|
set PASSWORD $arg($i)
|
||||||
|
} elseif { $arg($i) == "-d" } {
|
||||||
|
set DEBUG 1
|
||||||
|
} elseif { $arg($i) == "-i" } {
|
||||||
|
incr i
|
||||||
|
set INSTALLDIR $arg($i)
|
||||||
|
} elseif { $arg($i) == "-u" } {
|
||||||
|
incr i
|
||||||
|
set USERNAME $arg($i)
|
||||||
|
}
|
||||||
|
incr i
|
||||||
|
}
|
||||||
|
|
||||||
|
log_user $DEBUG
|
||||||
|
|
||||||
|
set timeout 2
|
||||||
|
set INSTALL 2
|
||||||
|
send "$INFINIDB_INSTALL_DIR/bin/getConfig DBRM_Controller NumWorkers\n"
|
||||||
|
expect {
|
||||||
|
1 { set INSTALL 1 }
|
||||||
|
}
|
||||||
|
|
||||||
|
set PACKAGE "rpm"
|
||||||
|
send "$INFINIDB_INSTALL_DIR/bin/getConfig Installation EEPackageType\n"
|
||||||
|
expect {
|
||||||
|
rpm { set PACKAGE rpm }
|
||||||
|
deb { set PACKAGE deb }
|
||||||
|
binary { set PACKAGE binary }
|
||||||
|
}
|
||||||
|
|
||||||
|
set timeout 60
|
||||||
|
log_user $DEBUG
|
||||||
|
if { $INSTALL == "2" && $PASSWORD == " "} {puts "please enter the remote server root password, enter ./calpontUninstall.sh -h for additional info"; exit -1}
|
||||||
|
|
||||||
|
send_user "\nPerforming InfiniDB System Uninstall\n\n"
|
||||||
|
|
||||||
|
#
|
||||||
|
# shutdownSystem
|
||||||
|
#
|
||||||
|
send_user "Shutdown InfiniDB System "
|
||||||
|
expect -re {[$#] }
|
||||||
|
send "$INFINIDB_INSTALL_DIR/bin/mcsadmin shutdownsystem y\n"
|
||||||
|
expect {
|
||||||
|
"shutdownSystem " { send_user "DONE" }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
|
||||||
|
|
||||||
|
if { $INSTALL == "2"} {
|
||||||
|
set timeout 600
|
||||||
|
#
|
||||||
|
# Run installer
|
||||||
|
#
|
||||||
|
send_user "Run System Uninstaller "
|
||||||
|
send "$INFINIDB_INSTALL_DIR/bin/installer $INFINIDBRPM1 $INFINIDBRPM2 $INFINIDBRPM3 $CONNECTORRPM1 $CONNECTORRPM2 uninstall $PASSWORD n --nodeps dummymysqlpw $DEBUG\n"
|
||||||
|
expect {
|
||||||
|
"uninstall request successful" { send_user "DONE" }
|
||||||
|
"ERROR" { send_user "FAILED" ; exit -1 }
|
||||||
|
}
|
||||||
|
send_user "\n"
|
||||||
|
}
|
||||||
|
|
||||||
|
if { $PACKAGE == "binary" } {
|
||||||
|
send "$INFINIDB_INSTALL_DIR/bin/pre-uninstall\n"
|
||||||
|
expect {
|
||||||
|
-re {[$#] } { }
|
||||||
|
}
|
||||||
|
|
||||||
|
send_user "\n"
|
||||||
|
|
||||||
|
send_user "\nCalpont Package System Uninstall Completed\n\n"
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
send_user "\nCalpont Package System Uninstall Completed\n\n"
|
||||||
|
|
||||||
|
exit 0
|
184
oam/install_scripts/columnstore~
Normal file
184
oam/install_scripts/columnstore~
Normal file
@ -0,0 +1,184 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# $Id: infinidb 3704 2013-08-07 03:33:20Z bwilkinson $
|
||||||
|
#
|
||||||
|
# infinidb Starts Calpont InfiniDB database platform
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# chkconfig: 2345 99 99
|
||||||
|
# description: Calpont InfiniDB is a database platform that utilizes Mysql
|
||||||
|
#
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: infinidb
|
||||||
|
# Required-Start: $local_fs $remote_fs $network $syslog $all
|
||||||
|
# Required-Stop: $local_fs $remote_fs $network $syslog
|
||||||
|
# Default-Start: 2 3 4 5
|
||||||
|
# Default-Stop: 0 1 6
|
||||||
|
# Short-Description: Start/stop InfiniDB DW DBMS
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
# Source function library.
|
||||||
|
if [ -f /etc/init.d/functions ]; then
|
||||||
|
. /etc/init.d/functions
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$INFINIDB_INSTALL_DIR" ]; then
|
||||||
|
test -f /etc/default/infinidb && . /etc/default/infinidb
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$INFINIDB_INSTALL_DIR" ]; then
|
||||||
|
INFINIDB_INSTALL_DIR=/usr/local/Calpont
|
||||||
|
fi
|
||||||
|
|
||||||
|
export INFINIDB_INSTALL_DIR=$INFINIDB_INSTALL_DIR
|
||||||
|
|
||||||
|
InstallDir=$INFINIDB_INSTALL_DIR
|
||||||
|
|
||||||
|
if [ $InstallDir != "/usr/local/Calpont" ]; then
|
||||||
|
export PATH=$InstallDir/bin:$InstallDir/mysql/bin:/bin:/usr/bin
|
||||||
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$InstallDir/lib:$InstallDir/mysql/lib/mysql
|
||||||
|
fi
|
||||||
|
|
||||||
|
#hadoop
|
||||||
|
plugin=`$INFINIDB_INSTALL_DIR/bin/getConfig SystemConfig DataFilePlugin`
|
||||||
|
if [ -n "$plugin" ]; then
|
||||||
|
setenv=`$InstallDir/bin/getConfig SystemConfig DataFileEnvFile`
|
||||||
|
. $InstallDir/bin/$setenv >/dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -e $InstallDir/lib/libjemalloc.so ]; then
|
||||||
|
export LD_PRELOAD=$InstallDir/lib/libjemalloc.so
|
||||||
|
elif [ -e $InstallDir/lib/libjemalloc.so.1 ]; then
|
||||||
|
export LD_PRELOAD=$InstallDir/lib/libjemalloc.so.1
|
||||||
|
fi
|
||||||
|
|
||||||
|
test -f $InstallDir/post/functions && . $InstallDir/post/functions
|
||||||
|
|
||||||
|
mt=`module_type`
|
||||||
|
mid=`module_id`
|
||||||
|
|
||||||
|
has_um=`$InstallDir/bin/getConfig SystemModuleConfig ModuleCount2`
|
||||||
|
if [ "x$has_um" = x ]; then
|
||||||
|
has_um=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
user=$USER
|
||||||
|
if [ -z "$user" ]; then
|
||||||
|
user=root
|
||||||
|
fi
|
||||||
|
|
||||||
|
checkInstallSetup() {
|
||||||
|
InitialInstallFlag=`$InstallDir/bin/getConfig -c $InstallDir/etc/Calpont.xml Installation InitialInstallFlag`
|
||||||
|
if [ $InitialInstallFlag != "y" ]; then
|
||||||
|
echo "Please run the postConfigure install script, check the Installation Guide"
|
||||||
|
echo "for additional details"
|
||||||
|
rm -f /var/lock/subsys/infinidb
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
[ -f $InstallDir/bin/ProcMon ] || exit 0
|
||||||
|
|
||||||
|
start() {
|
||||||
|
if [ -f /var/lock/subsys/infinidb ]; then
|
||||||
|
echo "InfiniDB Database Platform already running"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
(mkdir -p /var/lock/subsys && touch /var/lock/subsys/infinidb) >/dev/null 2>&1
|
||||||
|
|
||||||
|
if [ -x $InstallDir/bin/infinidb.pre-start ]; then
|
||||||
|
$InstallDir/bin/infinidb.pre-start
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Error running InfiniDB pre-start script, not starting InfiniDB"
|
||||||
|
rm -f /var/lock/subsys/infinidb
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
checkInstallSetup
|
||||||
|
|
||||||
|
CoreFileFlag=`$InstallDir/bin/getConfig -c $InstallDir/etc/Calpont.xml Installation CoreFileFlag`
|
||||||
|
if [ $CoreFileFlag = "y" ]; then
|
||||||
|
SUDO=
|
||||||
|
if [ "$user" != "root" ]; then
|
||||||
|
SUDO="sudo"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#infinidb core files
|
||||||
|
$SUDO ulimit -c unlimited > /dev/null 2>&1
|
||||||
|
$SUDO sysctl -q -w kernel.core_uses_pid=1 > /dev/null 2>&1
|
||||||
|
$SUDO sysctl -q -w kernel.core_pattern=/var/log/Calpont/corefiles/core.%e.%p > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
RETVAL=0
|
||||||
|
echo "Starting InfiniDB Database Platform"
|
||||||
|
rm -f /tmp/StopCalpont
|
||||||
|
exec $InstallDir/bin/run.sh $InstallDir/bin/ProcMon > /dev/null 2>&1 &
|
||||||
|
|
||||||
|
return $RETVAL
|
||||||
|
}
|
||||||
|
stop() {
|
||||||
|
echo "Shutting down InfiniDB Database Platform"
|
||||||
|
touch /tmp/StopCalpont
|
||||||
|
pkill -9 ProcMon
|
||||||
|
pkill -9 ProcMgr
|
||||||
|
pkill -9 snmptrapd
|
||||||
|
sleep 1
|
||||||
|
$InstallDir/bin/clearShm
|
||||||
|
RETVAL=$?
|
||||||
|
rm -f /var/lock/subsys/infinidb
|
||||||
|
fuser -k 8604/tcp > /dev/null 2>&1
|
||||||
|
test -f $InstallDir/mysql/mysql-Calpont || return $RETVAL
|
||||||
|
$InstallDir/mysql/mysql-Calpont stop > /dev/null 2>&1
|
||||||
|
if [ -x $InstallDir/bin/infinidb.post-stop ]; then
|
||||||
|
$InstallDir/bin/infinidb.post-stop
|
||||||
|
fi
|
||||||
|
return $RETVAL
|
||||||
|
}
|
||||||
|
restart() {
|
||||||
|
stop
|
||||||
|
start
|
||||||
|
}
|
||||||
|
status() {
|
||||||
|
isrunning=0
|
||||||
|
if [ $EUID -eq 0 ]; then
|
||||||
|
if [ -f /var/lock/subsys/infinidb ]; then
|
||||||
|
isrunning=1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
pgrep ProcMon >/dev/null 2>&1
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
isrunning=1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ $isrunning -ne 0 ]; then
|
||||||
|
echo "InfiniDB is running"
|
||||||
|
else
|
||||||
|
echo "InfiniDB is not running"
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
start
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
stop
|
||||||
|
;;
|
||||||
|
restart)
|
||||||
|
restart
|
||||||
|
;;
|
||||||
|
condrestart)
|
||||||
|
[ -f /var/lock/subsys/infinidb ] && restart || :
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
status
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit $?
|
||||||
|
|
@ -20,7 +20,7 @@ set CALPONTMYSQLRPM [lindex $argv 6]
|
|||||||
set CALPONTMYSQLDRPM [lindex $argv 7]
|
set CALPONTMYSQLDRPM [lindex $argv 7]
|
||||||
set INSTALLTYPE [lindex $argv 8]
|
set INSTALLTYPE [lindex $argv 8]
|
||||||
set DEBUG [lindex $argv 9]
|
set DEBUG [lindex $argv 9]
|
||||||
set INSTALLDIR "/usr/local/Calpont"
|
set INSTALLDIR "/usr/local/MariaDB/Columnstore"
|
||||||
set IDIR [lindex $argv 10]
|
set IDIR [lindex $argv 10]
|
||||||
if { $IDIR != "" } {
|
if { $IDIR != "" } {
|
||||||
set INSTALLDIR $IDIR
|
set INSTALLDIR $IDIR
|
||||||
|
74
oam/install_scripts/disable-rep-columnstore.sh
Normal file
74
oam/install_scripts/disable-rep-columnstore.sh
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
# generic InfiniDB Disable Replication script.
|
||||||
|
#
|
||||||
|
# Notes: This script gets run by ProcMon:
|
||||||
|
|
||||||
|
# check log for error
|
||||||
|
checkForError() {
|
||||||
|
grep ERROR /tmp/disable-rep-status.log > /tmp/error.check
|
||||||
|
if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then
|
||||||
|
echo "ERROR: check log file: /tmp/disable-rep-status.log"
|
||||||
|
rm -f /tmp/error.check
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
rm -f /tmp/error.check
|
||||||
|
}
|
||||||
|
|
||||||
|
prefix=/usr/local
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
pwprompt=
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
|
||||||
|
prefix="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then
|
||||||
|
password="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
pwprompt="--password=$password"
|
||||||
|
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
|
||||||
|
installdir="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
prefix=`dirname $installdir`
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
test -f $installdir/post/functions && . $installdir/post/functions
|
||||||
|
|
||||||
|
>/tmp/disable-rep-status.log
|
||||||
|
|
||||||
|
#
|
||||||
|
# Run stop slave command
|
||||||
|
#
|
||||||
|
echo "Run stop slave command" >>/tmp/disable-rep-status.log
|
||||||
|
cat >/tmp/idb_disable-rep.sql <<EOD
|
||||||
|
stop slave;
|
||||||
|
EOD
|
||||||
|
|
||||||
|
cat /tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
|
||||||
|
#
|
||||||
|
# Run reset slave command
|
||||||
|
#
|
||||||
|
echo "Run start slave command" >>/tmp/disable-rep-status.log
|
||||||
|
cat >/tmp/idb_disable-rep.sql <<EOD
|
||||||
|
reset slave;
|
||||||
|
EOD
|
||||||
|
|
||||||
|
cat /tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_disable-rep.sql >>/tmp/disable-rep-status.log
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
|
||||||
|
#alls good, 'OK' for success
|
||||||
|
echo "OK"
|
||||||
|
exit 0
|
@ -18,12 +18,12 @@ checkForError() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
prefix=/usr/local
|
prefix=/usr/local
|
||||||
installdir=$prefix/Calpont
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
pwprompt=
|
pwprompt=
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
|
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
|
||||||
prefix="`echo $arg | awk -F= '{print $2}'`"
|
prefix="`echo $arg | awk -F= '{print $2}'`"
|
||||||
installdir=$prefix/Calpont
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then
|
elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then
|
||||||
password="`echo $arg | awk -F= '{print $2}'`"
|
password="`echo $arg | awk -F= '{print $2}'`"
|
||||||
pwprompt="--password=$password"
|
pwprompt="--password=$password"
|
||||||
|
13
oam/install_scripts/install-columnstore.sh
Executable file
13
oam/install_scripts/install-columnstore.sh
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# $Id: install-infinidb.sh 421 2007-04-05 15:46:55Z dhill $
|
||||||
|
#
|
||||||
|
# install-infinidb.sh dummy EE version
|
||||||
|
|
||||||
|
echo " " 1>&2
|
||||||
|
echo " This install-infinidb.sh script is only used to install the Community Edition." 1>&2
|
||||||
|
echo " Please use the 'postConfigure' for installing the Enterprise Edition." 1>&2
|
||||||
|
echo " Check the Calpont InfiniDB Installation Document for further details." 1>&2
|
||||||
|
|
||||||
|
exit 1
|
||||||
|
|
102
oam/install_scripts/install_scripts.kdevelop
Normal file
102
oam/install_scripts/install_scripts.kdevelop
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
<?xml version = '1.0'?>
|
||||||
|
<kdevelop>
|
||||||
|
<general>
|
||||||
|
<author/>
|
||||||
|
<email>dhill@srvhill04.calpont.com</email>
|
||||||
|
<version>$VERSION$</version>
|
||||||
|
<projectmanagement>KDevCustomProject</projectmanagement>
|
||||||
|
<primarylanguage>C</primarylanguage>
|
||||||
|
<ignoreparts/>
|
||||||
|
</general>
|
||||||
|
<kdevcustomproject>
|
||||||
|
<run>
|
||||||
|
<mainprogram>install_scripts</mainprogram>
|
||||||
|
<directoryradio>executable</directoryradio>
|
||||||
|
</run>
|
||||||
|
</kdevcustomproject>
|
||||||
|
<kdevdebugger>
|
||||||
|
<general>
|
||||||
|
<dbgshell/>
|
||||||
|
</general>
|
||||||
|
</kdevdebugger>
|
||||||
|
<kdevdoctreeview>
|
||||||
|
<ignoretocs>
|
||||||
|
<toc>ada</toc>
|
||||||
|
<toc>ada_bugs_gcc</toc>
|
||||||
|
<toc>bash</toc>
|
||||||
|
<toc>bash_bugs</toc>
|
||||||
|
<toc>clanlib</toc>
|
||||||
|
<toc>fortran_bugs_gcc</toc>
|
||||||
|
<toc>gnome1</toc>
|
||||||
|
<toc>gnustep</toc>
|
||||||
|
<toc>gtk</toc>
|
||||||
|
<toc>gtk_bugs</toc>
|
||||||
|
<toc>haskell</toc>
|
||||||
|
<toc>haskell_bugs_ghc</toc>
|
||||||
|
<toc>java_bugs_gcc</toc>
|
||||||
|
<toc>java_bugs_sun</toc>
|
||||||
|
<toc>kde2book</toc>
|
||||||
|
<toc>libstdc++</toc>
|
||||||
|
<toc>opengl</toc>
|
||||||
|
<toc>pascal_bugs_fp</toc>
|
||||||
|
<toc>php</toc>
|
||||||
|
<toc>php_bugs</toc>
|
||||||
|
<toc>perl</toc>
|
||||||
|
<toc>perl_bugs</toc>
|
||||||
|
<toc>python</toc>
|
||||||
|
<toc>python_bugs</toc>
|
||||||
|
<toc>qt-kdev3</toc>
|
||||||
|
<toc>ruby</toc>
|
||||||
|
<toc>ruby_bugs</toc>
|
||||||
|
<toc>sdl</toc>
|
||||||
|
<toc>stl</toc>
|
||||||
|
<toc>sw</toc>
|
||||||
|
<toc>w3c-dom-level2-html</toc>
|
||||||
|
<toc>w3c-svg</toc>
|
||||||
|
<toc>w3c-uaag10</toc>
|
||||||
|
<toc>wxwidgets_bugs</toc>
|
||||||
|
</ignoretocs>
|
||||||
|
<ignoreqt_xml>
|
||||||
|
<toc>Guide to the Qt Translation Tools</toc>
|
||||||
|
<toc>Qt Assistant Manual</toc>
|
||||||
|
<toc>Qt Designer Manual</toc>
|
||||||
|
<toc>Qt Reference Documentation</toc>
|
||||||
|
<toc>qmake User Guide</toc>
|
||||||
|
</ignoreqt_xml>
|
||||||
|
<ignoredoxygen>
|
||||||
|
<toc>KDE Libraries (Doxygen)</toc>
|
||||||
|
</ignoredoxygen>
|
||||||
|
</kdevdoctreeview>
|
||||||
|
<kdevfilecreate>
|
||||||
|
<filetypes/>
|
||||||
|
<useglobaltypes>
|
||||||
|
<type ext="c" />
|
||||||
|
<type ext="h" />
|
||||||
|
</useglobaltypes>
|
||||||
|
</kdevfilecreate>
|
||||||
|
<kdevcppsupport>
|
||||||
|
<references/>
|
||||||
|
<codecompletion>
|
||||||
|
<includeGlobalFunctions>true</includeGlobalFunctions>
|
||||||
|
<includeTypes>true</includeTypes>
|
||||||
|
<includeEnums>true</includeEnums>
|
||||||
|
<includeTypedefs>false</includeTypedefs>
|
||||||
|
<automaticCodeCompletion>true</automaticCodeCompletion>
|
||||||
|
<automaticArgumentsHint>true</automaticArgumentsHint>
|
||||||
|
<automaticHeaderCompletion>true</automaticHeaderCompletion>
|
||||||
|
<codeCompletionDelay>250</codeCompletionDelay>
|
||||||
|
<argumentsHintDelay>400</argumentsHintDelay>
|
||||||
|
<headerCompletionDelay>250</headerCompletionDelay>
|
||||||
|
</codecompletion>
|
||||||
|
</kdevcppsupport>
|
||||||
|
<kdevfileview>
|
||||||
|
<groups>
|
||||||
|
<hidenonprojectfiles>false</hidenonprojectfiles>
|
||||||
|
<hidenonlocation>false</hidenonlocation>
|
||||||
|
</groups>
|
||||||
|
<tree>
|
||||||
|
<hidepatterns>*.o,*.lo,CVS</hidepatterns>
|
||||||
|
<hidenonprojectfiles>false</hidenonprojectfiles>
|
||||||
|
</tree>
|
||||||
|
</kdevfileview>
|
||||||
|
</kdevelop>
|
4
oam/install_scripts/install_scripts.kdevelop.filelist
Normal file
4
oam/install_scripts/install_scripts.kdevelop.filelist
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# KDevelop Custom Project File List
|
||||||
|
Makefile
|
||||||
|
Makefile.am
|
||||||
|
Makefile.in
|
BIN
oam/install_scripts/install_scripts.kdevelop.pcs
Normal file
BIN
oam/install_scripts/install_scripts.kdevelop.pcs
Normal file
Binary file not shown.
44
oam/install_scripts/install_scripts.kdevses
Normal file
44
oam/install_scripts/install_scripts.kdevses
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE KDevPrjSession>
|
||||||
|
<KDevPrjSession>
|
||||||
|
<DocsAndViews NumberOfDocuments="8" >
|
||||||
|
<Doc0 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/oam/install_scripts/binary_installer.sh" >
|
||||||
|
<View0 line="0" Type="Source" />
|
||||||
|
</Doc0>
|
||||||
|
<Doc1 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/oam/install_scripts/syslogSetup.sh" >
|
||||||
|
<View0 line="37" Type="Source" />
|
||||||
|
</Doc1>
|
||||||
|
<Doc2 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/oam/install_scripts/module_installer.sh" >
|
||||||
|
<View0 line="99" Type="Source" />
|
||||||
|
</Doc2>
|
||||||
|
<Doc3 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/oam/install_scripts/post-install" >
|
||||||
|
<View0 line="82" Type="Source" />
|
||||||
|
</Doc3>
|
||||||
|
<Doc4 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/oam/install_scripts/remote_installer.sh" >
|
||||||
|
<View0 line="24" Type="Source" />
|
||||||
|
</Doc4>
|
||||||
|
<Doc5 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/oam/install_scripts/pre-uninstall" >
|
||||||
|
<View0 line="5" Type="Source" />
|
||||||
|
</Doc5>
|
||||||
|
<Doc6 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/oam/install_scripts/Makefile" >
|
||||||
|
<View0 line="13" Type="Source" />
|
||||||
|
</Doc6>
|
||||||
|
<Doc7 NumberOfViews="1" URL="file:///home/dhill/InfiniDB_MariaDB/oam/install_scripts/columnstore" >
|
||||||
|
<View0 line="179" Type="Source" />
|
||||||
|
</Doc7>
|
||||||
|
</DocsAndViews>
|
||||||
|
<pluginList>
|
||||||
|
<kdevdebugger>
|
||||||
|
<breakpointList/>
|
||||||
|
</kdevdebugger>
|
||||||
|
<kdevbookmarks>
|
||||||
|
<bookmarks/>
|
||||||
|
</kdevbookmarks>
|
||||||
|
<kdevvalgrind>
|
||||||
|
<executable path="" params="" />
|
||||||
|
<valgrind path="" params="" />
|
||||||
|
<calltree path="" params="" />
|
||||||
|
<kcachegrind path="" />
|
||||||
|
</kdevvalgrind>
|
||||||
|
</pluginList>
|
||||||
|
</KDevPrjSession>
|
112
oam/install_scripts/master-rep-columnstore.sh
Normal file
112
oam/install_scripts/master-rep-columnstore.sh
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
# generic InfiniDB Master Replication script.
|
||||||
|
#
|
||||||
|
# Notes: This script gets run by ProcMon during installs and upgrades:
|
||||||
|
|
||||||
|
# check log for error
|
||||||
|
checkForError() {
|
||||||
|
grep ERROR /tmp/master-rep-status-$hostipaddr.log > /tmp/error.check
|
||||||
|
if [ `cat /tmp/error.check | wc -c` -ne 0 ]; then
|
||||||
|
echo "ERROR: check log file: /tmp/master-rep-status-$hostipaddr.log"
|
||||||
|
rm -f /tmp/error.check
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
rm -f /tmp/error.check
|
||||||
|
}
|
||||||
|
|
||||||
|
prefix=/usr/local
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
pwprompt=
|
||||||
|
for arg in "$@"; do
|
||||||
|
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
|
||||||
|
prefix="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
|
elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then
|
||||||
|
password="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
pwprompt="--password=$password"
|
||||||
|
elif [ `expr -- "$arg" : '--installdir='` -eq 13 ]; then
|
||||||
|
installdir="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
prefix=`dirname $installdir`
|
||||||
|
elif [ `expr -- "$arg" : '--hostIP='` -eq 9 ]; then
|
||||||
|
hostipaddr="`echo $arg | awk -F= '{print $2}'`"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
test -f $installdir/post/functions && . $installdir/post/functions
|
||||||
|
|
||||||
|
repUser="idbrep"
|
||||||
|
password="Calpont1"
|
||||||
|
|
||||||
|
>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
|
||||||
|
#
|
||||||
|
# Create Replication User
|
||||||
|
#
|
||||||
|
echo "Create Replication User $repUser for node $hostipaddr" >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
cat >/tmp/idb_master-rep.sql <<EOD
|
||||||
|
CREATE USER '$repUser'@'$hostipaddr' IDENTIFIED BY '$password';
|
||||||
|
GRANT REPLICATION SLAVE ON *.* TO '$repUser'@'$hostipaddr';
|
||||||
|
EOD
|
||||||
|
|
||||||
|
cat /tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
|
||||||
|
#
|
||||||
|
# Grant table access for created user
|
||||||
|
#
|
||||||
|
echo "Grant table access for $repUser for node $hostipaddr" >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
cat >/tmp/idb_master-rep.sql <<EOD
|
||||||
|
use mysql
|
||||||
|
grant all on *.* to '$repUser'@'$hostipaddr' identified by 'Calpont1';
|
||||||
|
grant REPLICATION SLAVE on *.* to '$repUser'@'$hostipaddr' identified by 'Calpont1';
|
||||||
|
EOD
|
||||||
|
|
||||||
|
cat /tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
|
||||||
|
#
|
||||||
|
# Run SHOW MASTER STATUS
|
||||||
|
#
|
||||||
|
echo "Run SHOW MASTER STATUS to node log" >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
cat >/tmp/idb_master-rep.sql <<EOD
|
||||||
|
SHOW MASTER STATUS
|
||||||
|
EOD
|
||||||
|
|
||||||
|
cat /tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_master-rep.sql >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
|
||||||
|
checkForError
|
||||||
|
|
||||||
|
echo "Run SHOW MASTER STATUS to master status log /tmp/show-master-status.log" >>/tmp/master-rep-status-$hostipaddr.log
|
||||||
|
cat >/tmp/idb_master-rep.sql <<EOD
|
||||||
|
SHOW MASTER STATUS
|
||||||
|
EOD
|
||||||
|
|
||||||
|
cat /tmp/idb_master-rep.sql >/tmp/show-master-status.log
|
||||||
|
$installdir/mysql/bin/mysql \
|
||||||
|
--defaults-file=$installdir/mysql/my.cnf \
|
||||||
|
--user=root $pwprompt \
|
||||||
|
calpontsys </tmp/idb_master-rep.sql >>/tmp/show-master-status.log
|
||||||
|
|
||||||
|
|
||||||
|
#alls good, 'OK' for success
|
||||||
|
echo "OK"
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
|
@ -18,12 +18,12 @@ checkForError() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
prefix=/usr/local
|
prefix=/usr/local
|
||||||
installdir=$prefix/Calpont
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
pwprompt=
|
pwprompt=
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
|
if [ `expr -- "$arg" : '--prefix='` -eq 9 ]; then
|
||||||
prefix="`echo $arg | awk -F= '{print $2}'`"
|
prefix="`echo $arg | awk -F= '{print $2}'`"
|
||||||
installdir=$prefix/Calpont
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then
|
elif [ `expr -- "$arg" : '--password='` -eq 11 ]; then
|
||||||
password="`echo $arg | awk -F= '{print $2}'`"
|
password="`echo $arg | awk -F= '{print $2}'`"
|
||||||
pwprompt="--password=$password"
|
pwprompt="--password=$password"
|
||||||
|
@ -5,12 +5,12 @@
|
|||||||
# Setup the Custom OS files during a System install on a module
|
# Setup the Custom OS files during a System install on a module
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# append calpont OS files to Linux OS file
|
# append columnstore OS files to Linux OS file
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
prefix=/usr/local
|
prefix=/usr/local
|
||||||
installdir=$prefix/Calpont
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
rpmmode=install
|
rpmmode=install
|
||||||
user=$USER
|
user=$USER
|
||||||
if [ -z "$user" ]; then
|
if [ -z "$user" ]; then
|
||||||
@ -22,7 +22,7 @@ shiftcnt=0
|
|||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
if [ $(expr -- "$arg" : '--prefix=') -eq 9 ]; then
|
if [ $(expr -- "$arg" : '--prefix=') -eq 9 ]; then
|
||||||
prefix="$(echo $arg | awk -F= '{print $2}')"
|
prefix="$(echo $arg | awk -F= '{print $2}')"
|
||||||
installdir=$prefix/Calpont
|
installdir=$prefix/MariaDB/Columnstore
|
||||||
((shiftcnt++))
|
((shiftcnt++))
|
||||||
elif [ $(expr -- "$arg" : '--rpmmode=') -eq 10 ]; then
|
elif [ $(expr -- "$arg" : '--rpmmode=') -eq 10 ]; then
|
||||||
rpmmode="$(echo $arg | awk -F= '{print $2}')"
|
rpmmode="$(echo $arg | awk -F= '{print $2}')"
|
||||||
@ -47,7 +47,7 @@ for arg in "$@"; do
|
|||||||
done
|
done
|
||||||
shift $shiftcnt
|
shift $shiftcnt
|
||||||
|
|
||||||
if [ $installdir != "/usr/local/Calpont" ]; then
|
if [ $installdir != "/usr/local/MariaDB/Columnstore" ]; then
|
||||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFINIDB_INSTALL_DIR/lib:$INFINIDB_INSTALL_DIR/mysql/lib/mysql
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INFINIDB_INSTALL_DIR/lib:$INFINIDB_INSTALL_DIR/mysql/lib/mysql
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -60,8 +60,8 @@ if [ $cloud = "amazon-ec2" ] || [ $cloud = "amazon-vpc" ]; then
|
|||||||
if test -f $INFINIDB_INSTALL_DIR/local/etc/pm1/fstab ; then
|
if test -f $INFINIDB_INSTALL_DIR/local/etc/pm1/fstab ; then
|
||||||
echo "Setup fstab on Module"
|
echo "Setup fstab on Module"
|
||||||
touch /etc/fstab
|
touch /etc/fstab
|
||||||
rm -f /etc/fstab.calpontSave
|
rm -f /etc/fstab.columnstoreSave
|
||||||
mv /etc/fstab /etc/fstab.calpontSave
|
mv /etc/fstab /etc/fstab.columnstoreSave
|
||||||
cat $INFINIDB_INSTALL_DIR/local/etc/pm1/fstab >> /etc/fstab
|
cat $INFINIDB_INSTALL_DIR/local/etc/pm1/fstab >> /etc/fstab
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -97,17 +97,17 @@ if [ $module = "pm" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Setup rc.local on Module"
|
echo "Setup rc.local on Module"
|
||||||
if [ $EUID -eq 0 -a -f $INFINIDB_INSTALL_DIR/local/rc.local.calpont ]; then
|
if [ $EUID -eq 0 -a -f $INFINIDB_INSTALL_DIR/local/rc.local.columnstore ]; then
|
||||||
if [ $user = "root" ]; then
|
if [ $user = "root" ]; then
|
||||||
touch /etc/rc.local
|
touch /etc/rc.local
|
||||||
rm -f /etc/rc.local.calpontSave
|
rm -f /etc/rc.local.columnstoreSave
|
||||||
cp /etc/rc.local /etc/rc.local.calpontSave
|
cp /etc/rc.local /etc/rc.local.columnstoreSave
|
||||||
cat $INFINIDB_INSTALL_DIR/local/rc.local.calpont >> /etc/rc.local
|
cat $INFINIDB_INSTALL_DIR/local/rc.local.columnstore >> /etc/rc.local
|
||||||
else
|
else
|
||||||
sudo touch /etc/rc.local
|
sudo touch /etc/rc.local
|
||||||
sudo rm -f /etc/rc.local.calpontSave
|
sudo rm -f /etc/rc.local.columnstoreSave
|
||||||
sudo cp /etc/rc.local /etc/rc.local.calpontSave
|
sudo cp /etc/rc.local /etc/rc.local.columnstoreSave
|
||||||
sudo cat $INFINIDB_INSTALL_DIR/local/rc.local.calpont >> /etc/rc.local
|
sudo cat $INFINIDB_INSTALL_DIR/local/rc.local.columnstore >> /etc/rc.local
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user