Skip to content

Instantly share code, notes, and snippets.

@Yuri-M-Dias
Last active February 28, 2016 23:01
Show Gist options
  • Save Yuri-M-Dias/73f59ab441a8040d9089 to your computer and use it in GitHub Desktop.
Save Yuri-M-Dias/73f59ab441a8040d9089 to your computer and use it in GitHub Desktop.
Protractor with cucumber provision
#!/usr/bin/env bash
echo "Provision VM START"
echo "=========================================="
#install nodejs
sudo apt-get update
sudo apt-get install -y python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get -y install nodejs
#install mongo db
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get update
sudo apt-get install mongodb-10gen
sudo apt-get update
#install base npm packages
sudo npm install -g bower
sudo npm install -g grunt-cli
sudo npm install -g express
sudo npm install -g yo
sudo npm install -g protractor@2.4.0
sudo npm install -g cucumber@0.7.0
sudo aptitude install -y xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic xvfb x11-apps
sudo aptitude install -y imagemagick firefox google-chrome-stable
mkdir XvfbOut
/usr/bin/Xvfb :99 -ac -screen 0 1024x768x24 & > XvfbOut/log.txt
export DISPLAY=:99
#/vagrant/.../node_modules/protractor/bin/webdriver-manager start
echo ""
echo "=========================================="
echo "Node setup:"
node -v
echo "Provision VM finished"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment