Created
May 13, 2015 12:19
-
-
Save AdamSaleh/ee3b4babfdb6b3b7384e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # put fhcap boostrap here | |
| echo "WORKSPACE: $WORKSPACE" | |
| mkdir tests | |
| cd tests | |
| echo "cloning ci-ops-mobile, fhcap and uart repositories" | |
| git clone git://git.app.eng.bos.redhat.com/ci-ops-mobile.git | |
| git clone [email protected]:fheng/fhcap.git | |
| git clone [email protected]:fheng/fh-uart.git | |
| cd fhcap | |
| gem install bundle | |
| bundle install --path vendor/bundle | |
| bundle exec librarian-chef install | |
| echo '#!/bin/bash' >> thos.sh | |
| echo 'cat << EOF | bundle exec thor dev:bootstrap -y 2> /dev/null' >> thos.sh | |
| echo 'no' >> thos.sh | |
| echo 'vm' >> thos.sh | |
| echo 'EOF' >> thos.sh | |
| echo "fhcap bootstrapping" | |
| cat thos.sh | |
| chmod +x thos.sh | |
| ./thos.sh | |
| echo "sourcing mobile-jenkins-openrc.sh" | |
| chmod +x $WORKSPACE/tests/ci-ops-mobile/mobile-jenkins-openrc.sh | |
| source $WORKSPACE/tests/ci-ops-mobile/mobile-jenkins-openrc.sh | |
| cd flavours/provision_openstack | |
| export OS_KEY_PATH=$WORKSPACE/tests/ci-ops-mobile/config/keys/default.pem | |
| export FH_NODE_PREFIX=fhcap-smikloso | |
| echo "executing of vagrant up" | |
| vagrant up --provider=openstack | |
| echo "getting IP address of fhcap machine" | |
| IP_ADDRESS=$(vagrant ssh-config | grep HostName | tr -s " " | cut -d" " -f3) | |
| echo "adding $IP_ADDRESS to /etc/hosts" | |
| echo "$IP_ADDRESS testing.feedhenry.me" >> /etc/hosts | |
| echo "updating mysql shard and flushing" | |
| vagrant ssh -c "mysql -u root -proot -e 'update shard0.sys_Sub set aaaActive=0 where guid !=\"\";'" | |
| vagrant ssh -c "echo 'flush_all' | nc localhost 11211" | |
| vagrant ssh -c "sudo /etc/init.d/tomcat6 restart" | |
| # better to wait for tomcat to fully restart | |
| # safe time is about 2 minutes, to be super sure, lets double it | |
| sleep 240 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment