-
-
Save normalfaults/4b592881d337a19e15e7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Based on : http://manageiq.org/community/install-from-source/ | |
#Launch a CentOS AMI from AWS (ami-8997afe0), m3.large, 20GB root mount | |
#Update the VM | |
yum update -y | |
yum install -y wget vim telnet git | |
service iptables stop | |
#Create User | |
useradd miqbuilder | |
passwd miqbuilder | |
#change the passwd to somthing. I used miqbuilder | |
#Install EPEL package | |
cd /tmp | |
wget http://mirror.nexcess.net/epel/6/i386/epel-release-6-8.noarch.rpm | |
yum -y install epel-release-6-8.noarch.rpm | |
#Add miqbuilder to sudoers | |
echo "" >> /etc/sudoers | |
echo "" >> /etc/sudoers | |
echo "miqbuilder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers | |
#Install Pre-reqs | |
yum -y install git libxml2-devel libxslt libxslt-devel sudo | |
yum -y install postgresql-server postgresql-devel memcached | |
#Start memcached and turn on chkconfig | |
service memcached start | |
chkconfig memcached on | |
#Initialize the database: | |
service postgresql initdb | |
#Overwrite the pg_hba conf with only a local connection | |
cp /var/lib/pgsql/data/pg_hba.conf /tmp/pg_hba.con_20140618 | |
echo "local all all trust" > /var/lib/pgsql/data/pg_hba.conf | |
#Add Listening address so conf file | |
echo "" >> /var/lib/pgsql/data/postgresql.conf | |
echo "listen_addresses = '*'" >> /var/lib/pgsql/data/postgresql.conf | |
#Start the database | |
service postgresql start | |
#Run the commands below as the postgres user | |
su - postgres | |
for i in test production development;do createdb vmdb_$i;done | |
psql -c "create role evm login password 'smartvm'" | |
psql -c "alter database vmdb_development owner to evm" | |
exit | |
#Setup Ruby environment | |
su - miqbuilder | |
curl -sSL https://get.rvm.io | bash -s stable | |
exit | |
su - miqbuilder | |
rvm install 1.9.3 | |
gem uninstall bundler | |
#this might error | |
gem uninstall -i /home/miqbuilder/.rvm/gems/ruby-1.9.3-p547@global bundler | |
#reply Y to the prompt | |
gem install bundler -v '1.3.5' | |
gem install ruby-graphviz | |
#Clone ManageIQ Repos and install dependencies | |
git clone https://github.com/ManageIQ/manageiq | |
cd manageiq/vmdb | |
bundle install --without qpid | |
cd .. | |
vmdb/bin/rake build:shared_objects | |
cd vmdb | |
bundle install --without qpid | |
#Ensure that ManageIQ is connecting to the right database. Edit the config/database.pg.yml file. Add the evm user for the base . | |
#line 17 | |
# username: evm | |
vim config/database.pg.yml | |
#Create Database tables | |
bin/rake db:migrate | |
#Start ManageIQ | |
bin/rake evm:start | |
You should now be able to access the ManageIQ console at | |
<IP_ADDRESS>:3000 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment