setup.sh 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #!/bin/bash
  2. # This file describes how to gather the prerequisites of your test implementation, set
  3. # them up, and finally execute your test application(s) and exit in a state where the
  4. # test is read to respond to HTTP requests to the port/urls described in your
  5. # benchmark_config.json
  6. # fw_depends will search toolset/setup/linux/** for named shell files and execute them.
  7. # These files will set up the sandboxed runtime to have the softwares required when your
  8. # test is ready to go. For example:
  9. #
  10. # fw_depends Java
  11. #
  12. # If you are adding a new piece of software, ensure that you first create the setup
  13. # script in the appropriate place and that it follows the same paradigms illustrated
  14. # in the existing scripts.
  15. # Three HOST entries are provided to this script:
  16. #
  17. # TFB-database = The IP address of the database
  18. # TFB-client = The IP address of the client making the HTTP requests
  19. # TFB-server = The IP address of this machine servicing HTTP requests
  20. #
  21. # This is the preferred way of resolving these IP addresses. However, some applications
  22. # do not support internal name resolution and will bypass the system's HOST file and
  23. # attempt to resolve externally (which will fail). In those cases, use the $DBHOST
  24. # environment variable described below.
  25. # Very often, you will need variables to be set up in order to run your application
  26. # implementation. The suite provides several variables to this shell script to be used
  27. # for just this reason.
  28. #
  29. # $DBHOST = the IP address of the database machine
  30. # $TROOT = the test's root directory (the directory in which this file resides)
  31. # $FWROOT = the framework benchmark root (the root of this repository)
  32. # $IROOT = the sandbox installation root directory (your installed software as well
  33. # as anything installed via fw_depends is inside this dir)
  34. # $MAX_CONCURRENCY
  35. # = the concurrently levels set from the suite configuration file
  36. #
  37. # Below is an example of how to replace a connect string in an application config file
  38. # so that the application will start up with the correct IP:
  39. #
  40. # sed -i 's|db.ConnectString = .*/|db.ConnectString = '"$DBHOST"':3306/|g' app.conf
  41. # Lastly, you will need to start your test implementation application in a daemon or
  42. # detached mode. For example:
  43. #
  44. # go run hello.go &
  45. # Note: all comments except for the first line of this file can be deleted.