Skip to content

BasicSetup

Tomasz Kaik edited this page Aug 19, 2019 · 10 revisions

Basic Setup

This setup makes use of the Vagrant module, a pseudo-cookbook which is responsible for local environment provisioning using Vagrant (powered by Chef + Berkshelf under the hood).

Overview

Currently a virtual machine with the following services is created:

  • Karaf
  • Apache
  • Tomcat
  • ActiveMQ
  • MongoDb
  • Browsermob
  • Selenium Grid hub

aet-setup-vagrant

All services run using default ports. For communication please use the following IP address:

  • 192.168.123.100

Prerequisites

By default the Vagrant virtual machine needs 6 GB of RAM and 4 vCPUs, so please make sure that you have enough memory on your machine (16 GB is recommended).

You need to download and install the following software:

Set up Vagrant

Open a command prompt as the administrator and execute the following commands:

  • vagrant plugin install vagrant-omnibus
  • vagrant plugin install vagrant-berkshelf --plugin-version 5.1.2
  • vagrant plugin install vagrant-hostmanager

Note Whenever you'd like to keep all Vagrant related data and virtual machine disks in non-standard directories please set the VAGRANT_HOME variable for the location (by default it is set to $HOME/vagrant.d) and update VirtualBox settings (File -> Preferences -> General) to move all disks to other directory.

Download or clone (git clone git@github.com:Cognifide/aet.git) the AET source code and navigate to the vagrant module directory. Execute following commands to start the virtual machine (this process may take a few minutes):

  • berks install - downloads Chef dependencies from external sources. It acts as mvn clean install, but for Chef cookbooks.
  • berks update
  • vagrant up - creates a new virtual machine (the .box file will be downloaded during the first run), runs Chef inside it, sets domains and port forwarding up.

See the Vagrant README file for more Vagrant details, useful commands, etc.

Set up Selenium Grid node

When your Vagrant virtual machine is up and running, you need to start a Selenium Grid node process to be able to run AET suites. To start the node process on your host machine (e.g. Windows):

java -Dwebdriver.chrome.driver="<path/to/chromedriver>" -jar <path/to/selenium-server-standalone.jar> -role node -hub http://192.168.123.100:4444/grid/register -browser "browserName=chrome,maxInstances=20" -maxSession 20

Note: 192.168.123.100 is Vagrant IP

Go to Selenium Grid Console and check if Chrome WebDrivers are available

Troubleshooting

See Troubleshooting page.

Clone this wiki locally