-
Notifications
You must be signed in to change notification settings - Fork 74
/
VagrantProvisionCentOS7Rpm.sh
executable file
·86 lines (67 loc) · 3.11 KB
/
VagrantProvisionCentOS7Rpm.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/usr/bin/env bash
set -e
###################################################
# VERY IMPORTANT: Set the $HOOT_HOME environment #
# variable prior to running this script if ~/hoot #
# isn't the correct location for HOOT_HOME #
###################################################
if [ -z "$HOOT_HOME" ]; then
HOOT_HOME=~/hoot
fi
echo HOOT_HOME: $HOOT_HOME
#################################################
export LANG=en_US.UTF-8
# Common set of file versions
source $HOOT_HOME/VagrantProvisionVars.sh
echo "Adding software repositories..."
# Ensure that CentOS Yum repository data is GPG-verified.
echo "### Configuring CentOS to verify repository metadata ###" | tee -a CentOS_install.txt
sudo yum-config-manager \
--save \
--setopt=base.repo_gpgcheck=1 \
--setopt=extras.repo_gpgcheck=1 \
--setopt=updates.repo_gpgcheck=1 &> /dev/null
# add EPEL repo for extra packages
echo "### Add epel repo ###" | tee -a CentOS_install.txt
sudo yum -y install epel-release 2>&1 | tee -a CentOS_install.txt
# add GEOINT for spatial libraries and utilities.
echo "### Add geoint-deps repo ###" | tee -a CentOS_install.txt
sudo $HOOT_HOME/scripts/yum/geoint-repo.sh
# configure PGDG repository for PostgreSQL
echo "### Add pgdg repo ###" | tee -a CentOS_install.txt
sudo $HOOT_HOME/scripts/yum/pgdg-repo.sh $POSTGRESQL_VERSION
# Now check if we should use the release or nightly (master) RPM's
# NOTE: The nightly RPM's are not signed
if [ "${NIGHTLY:-yes}" = "no" ]; then
echo "### Adding the Hoot release repo ###" | tee -a CentOS_install.txt
sudo yum-config-manager --add-repo https://hoot-repo.s3.amazonaws.com/el7/release/hoot.repo
else
echo "### Adding the Hoot nightly master repo ###" | tee -a CentOS_install.txt
sudo yum-config-manager --add-repo https://hoot-repo.s3.amazonaws.com/el7/master/hoot.repo
fi
if [ "${YUMUPDATE:-no}" = "yes" ]; then
echo "Updating OS..."
echo "### Yum Upgrade ###" | tee -a CentOS_install.txt
sudo yum -q -y upgrade 2>&1 | tee -a CentOS_install.txt
fi
if [ "${COREONLY:-no}" = "yes" ]; then
# Just the core
echo "### Installing hootenanny-core ###" | tee -a CentOS_install.txt
sudo yum install -y hootenanny-core 2>&1 | tee -a CentOS_install.txt
echo "### Done ###" | tee -a CentOS_install.txt
else
# Core, UI & services
echo "### Installing Hootenanny-autostart ###" | tee -a CentOS_install.txt
sudo yum install -y hootenanny-autostart 2>&1 | tee -a CentOS_install.txt
echo "### Done ###" | tee -a CentOS_install.txt
fi
# Sanity check
hoot version
echo "### Enable SSL for Tomcat ###" | tee -a CentOS_install.txt
sudo $HOOT_HOME/scripts/tomcat/configure_tomcat_ssl.sh
echo "### Configure OAuth redirect url for port 8443 ###" | tee -a CentOS_install.txt
sudo $HOOT_HOME/scripts/tomcat/configure_oauth_8443.sh
echo "See VAGRANT.md for additional configuration instructions and then run 'vagrant ssh' to log into the Hootenanny virtual machine."
echo "See $HOOT_HOME/docs on the virtual machine for Hootenanny documentation files."
echo "If the webApp is installed, it is at http://localhost:8443/hootenanny-id"
##########################################