-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_openstackid
More file actions
executable file
·74 lines (66 loc) · 2.15 KB
/
install_openstackid
File metadata and controls
executable file
·74 lines (66 loc) · 2.15 KB
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
#!/bin/bash
# Uncomment to debug
set -o xtrace
# Ensure script is not run as root
if [ "$EUID" -ne "0" ]; then
echo "************************" >&2
echo "* $(date +"%F %T.%N") ERROR: This script must be run as root." >&2
echo "************************" >&2
exit 1
fi
# Global Vars
_callerUser=$(who -m | awk '{print $1;}')
_callerUser=${_callerUser-$1}
_callerUser=${_callerUser-'vagrant'}
_home="/home/$_callerUser"
_password='secure123'
# REQUIREMENTS
# Apache
apt-get update -y
apt-get install -y apache2 git
# MySQL
apt-get install -y python-setuptools python-mysqldb
debconf-set-selections <<< "mysql-server mysql-server/root_password password ${_password}"
debconf-set-selections <<< "mysql-server mysql-server/root_password_again password ${_password}"
apt-get install -y mysql-server
apt-get install -y libapache2-mod-auth-mysql php5-mysql
mysql_install_db
# PHP
apt-get install -y php5 libapache2-mod-php5 php5-mcrypt
apt-get install -y php5-cli php5-curl php5-mysql
php5enmod mcrypt
exit
cat <<EOF >> "/etc/apache2/mods-enabled/dir.conf"
<IfModule mod_dir.c>
DirectoryIndex index.php index.html index.cgi index.pl index.php index.xhtml index.htm
</IfModule>
EOF
# Redis
cd $_home
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make
#start redis server -- add /etc/redis.conf
#redis-server
exit
# INSTALL OPENSTACKID SERVER
cd $_home
git clone https://github.com/openstack-infra/openstackid.git
cd openstackid/
curl -s https://getcomposer.org/installer | php
echo "production" > bootstrap/environment.php
#chown -R $_callerUser:$_callerUser ../openstackid/
#sudo -H -u $_callerUser bash -c 'php composer.phar install --prefer-dist'
php composer.phar install --prefer-dist
php composer.phar dump-autoload --optimize
exit
# change composer.json
# run composer update
# change config/app.php
php artisan vendor:publish --provider="Greggilbert\Recaptcha\RecaptchaServiceProvider"
php artisan migrate --env=produccion
php artisan db:seed --env=produccion
phpunit --bootstrap vendor/autoload.php
#give proper rights to app/storage folder (775 and proper users)
vendor/bin/behat --config /home/smarcet/git/openstackid/behat.ym