Skip to content

Instantly share code, notes, and snippets.

@mandeepbal
Last active April 2, 2020 10:22
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save mandeepbal/7bcb0c1e0fe1739c1dde to your computer and use it in GitHub Desktop.
Save mandeepbal/7bcb0c1e0fe1739c1dde to your computer and use it in GitHub Desktop.
ManageIQ Install
#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
#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 root login password 'smartvm'"
psql -c "alter database vmdb_development owner to root"
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/booz-allen-hamilton/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
@vittalgit
Copy link

Hi,
I am following the steps provided to setup manageiq, when I am trying to clone from https://github.com/booz-allen-hamilton/manageiq/ it's not working, if you update the it will be good. Thank you providing great information for initial setup.

Regards,
Vittal

@mirosatan
Copy link

This is not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment