@@ -30,10 +30,6 @@ function echo_pass {
3030 echo -e " \033[0m"
3131}
3232
33- # echo pass or fail
34- # example
35- # echo echo_if 1 "Passed"
36- # echo echo_if 0 "Failed"
3733function echo_if {
3834 if [ $1 == 1 ]; then
3935 echo_pass $2
@@ -42,6 +38,18 @@ function echo_if {
4238 fi
4339}
4440
41+ function install_rabbitmq {
42+ echo " Installing RabbitMq..."
43+ wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.5/rabbitmq-server-generic-unix-3.6.5.tar.xz
44+
45+ echo ' deb http://www.rabbitmq.com/debian/ testing main' | sudo tee /etc/apt/sources.list.d/rabbitmq.list
46+ wget -O- https://www.rabbitmq.com/rabbitmq-release-signing-key.asc | sudo apt-key add -
47+ sudo apt-get update
48+ sudo apt-get install rabbitmq-server
49+
50+ echo " Restarting RabbitMq service"
51+ sudo service rabbitmq-server restart
52+ }
4553function install_mongodb {
4654 echo " Installing mongodb..."
4755 ./install_mongodb.sh
@@ -53,6 +61,7 @@ function install_gatekeeper {
5361function install_ruby {
5462 echo " Installing RVM..."
5563 gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
64+ curl -sSL https://rvm.io/mpapis.asc | gpg --import -
5665 \c url -sSL https://get.rvm.io | bash -s stable
5766 echo " Installation of RVM done."
5867
@@ -74,36 +83,34 @@ function install_npm {
7483
7584 echo " Installing Grunt and Bower..."
7685 cd ../ui
77- pwd
78- sudo npm install -g grunt grunt-cli bower
79- echo " Installation of Grunt and Bower done."
86+ echo " You need to install manually Grunt and Grunt-cli "
87+ # sudo npm install -g grunt grunt-cli bower
88+ # echo "Installation of Grunt and Bower done."
8089
81- sudo npm install
90+ # sudo npm install
8291
8392 echo " Installing Compass..."
8493 gem install compass
8594 echo " Installation of Compass done."
8695
8796 cd ../dependencies
8897 echo " NPM dependencies done."
89-
98+ echo " You need to move it to UI folder, and t install manually Grunt and Grunt-cli with the command: sudo npm install -g grunt grunt-cli bower"
99+ echo " Also, then use the following command: sudo npm install"
90100}
91101
92102echo -e -n " \033[1;36mChecking if mongodb is installed"
93103mongod --version > /dev/null 2>&1
94104MONGO_IS_INSTALLED=$?
95105if [ $MONGO_IS_INSTALLED -eq 0 ]; then
96106 echo " >>> MongoDB already installed"
97- # service mongod restart
98107else
99108 echo " Do you want to install mongodb? (y/n)"
100109 read install
101110 if [ " $install " = " y" ]; then
102111 echo -e -n " \033[1;31mMongodb is not installed... Installing..."
103112 install_mongodb
104113 fi
105- # ./install_mongodb.sh
106- # bash -c "$(curl -fsSL https://raw.githubusercontent.com/steveneaston/Vaprobash/master/scripts/mongodb.sh)" bash $1 $2
107114fi
108115
109116echo -e -n " \033[1;36mChecking if gatekeeper is installed"
@@ -158,9 +165,24 @@ else
158165 fi
159166fi
160167
168+ echo -e -n " \033[1;36mChecking if rabbitmq is installed"
169+ rabbitmq-server --version > /dev/null 2>&1
170+ RABBITMQ_IS_INSTALLED=$?
171+ if [ $RABBITMQ_IS_INSTALLED -eq 0 ]; then
172+ echo " >>> RabbitMQ already installed"
173+ else
174+ echo " Do you want to install rabbitmq for monitoring? (y/n)"
175+ read install
176+ if [ " $install " = " y" ]; then
177+ echo -e -n " \033[1;31mRabbitmq is not installed... Installing..."
178+ install_rabbitmq
179+ fi
180+ fi
181+
161182echo -e -n " \033[1;36mChecking if dependencies are installed\n"
162183echo " mongod $( echo_if $( program_is_installed mongo) ) "
163184echo " ruby $( echo_if $( program_is_installed ruby) ) "
164185echo " bundler $( echo_if $( program_is_installed bundler) ) "
165186echo " node $( echo_if $( program_is_installed node) ) "
166187echo " npm $( echo_if $( program_is_installed npm) ) "
188+ echo " rabbitmq $( echo_if $( program_is_installed rabbitmq-server) ) "
0 commit comments