From Fedora Project Wiki

No edit summary
No edit summary
Line 10: Line 10:
## This sets up a user in mongodb, namely "webservice1", with password "test". We'll use these credentials for the web service connection set up.
## This sets up a user in mongodb, namely "webservice1", with password "test". We'll use these credentials for the web service connection set up.
## Start storage: {{command|thermostat storage --start}}
## Start storage: {{command|thermostat storage --start}}
## Make sure that port 27518 is accessible from outside of VM1 (check iptebles config).
## Make sure that port 27518 is accessible from outside of VM1 (check firewall config): {{command|sudo firewall-cmd --add-port 27518/tcp}}
# Setting up the web service on VM2:
# Setting up the web service on VM2:
## TODO
## First, we need to tell the web app where our backing storage node is. In order to do so edit web.xml: {{command|sudo vim /usr/share/tomcat/webapps/thermostat/WEB-INF/web.xml}}. It should contain the following sections (you can leave the rest as is):
<pre>
    <init-param>
      <param-name>storage.endpoint</param-name>
      <param-value>mongodb://192.168.122.153:27518</param-value>
    </init-param>
    <init-param>
      <param-name>storage.username</param-name>
      <param-value>webservice1</param-value>
    </init-param>
    <init-param>
      <param-name>storage.password</param-name>
      <param-value>test</param-value>
    </init-param>
</pre>
# Setting up host names:
# Setting up host names:
## TODO
## TODO

Revision as of 12:21, 23 May 2013

Description

This test case tests whether Thermostat works correctly in a remote setup. This test will require at least 3 F19 virtual machines which can communicate with each other via a virtual network. One virtual machine acts as backing storage node. The second virtual machine will have the web service running connecting to the remote backing storage node. The third VM will be used to run thermostat agent and client components, connecting to the second node running the web service.

Setup

  1. For simplicity we identify the three VMs by their IP (netmask 255.255.255.0). VM1 = 192.168.122.153, VM2 = 192.168.122.168, VM3 = 192.168.122.39
  2. On all three VMs install thermostat
  3. On one of the VM, VM2, install thermostat-webapp
  4. Setting up storage on VM1:
    1. Get the storage IP binding setup script: wget http://jerboaa.fedorapeople.org/thermostat/testday20130523/setup_remote_storage.sh
    2. Since VM1 has IP 192.168.122.153 we execute the script as follows: bash setup_remote_storage.sh 192.168.122.153 ~/.thermostat
    3. This sets up a user in mongodb, namely "webservice1", with password "test". We'll use these credentials for the web service connection set up.
    4. Start storage: thermostat storage --start
    5. Make sure that port 27518 is accessible from outside of VM1 (check firewall config): sudo firewall-cmd --add-port 27518/tcp
  5. Setting up the web service on VM2:
    1. First, we need to tell the web app where our backing storage node is. In order to do so edit web.xml: sudo vim /usr/share/tomcat/webapps/thermostat/WEB-INF/web.xml. It should contain the following sections (you can leave the rest as is):
    <init-param>
      <param-name>storage.endpoint</param-name>
      <param-value>mongodb://192.168.122.153:27518</param-value>
    </init-param>
    <init-param>
      <param-name>storage.username</param-name>
      <param-value>webservice1</param-value>
    </init-param>
    <init-param>
      <param-name>storage.password</param-name>
      <param-value>test</param-value>
    </init-param>
  1. Setting up host names:
    1. TODO

How to test

  1. TODO

Expected Results

  1. TODO