sql-server-deployment.sh 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/bash
  2. #
  3. # Bash script to deploy Web Framework Benchmarks on Windows Azure.
  4. #
  5. # Step 7: SQL Server setup.
  6. #
  7. # For now, SQL Server setup is done manually.
  8. #
  9. set -o nounset -o errexit
  10. BENCHMARK_DEPLOYMENT_HOME="toolset/deployment"
  11. if [ ! -d "$BENCHMARK_DEPLOYMENT_HOME" ]; then echo "Could not find the '$BENCHMARK_DEPLOYMENT_HOME' directory. This script must be run from the FrameworkBenchmarks directory."; exit 1; fi
  12. source "$BENCHMARK_DEPLOYMENT_HOME/common/bash-common.sh"
  13. if [ -z "$1" ]; then fail "The deployment configuration file name must be provided as an argument."; fi
  14. BENCHMARK_DEPLOYMENT_CONFIGURATION=$1
  15. if [ ! -f $BENCHMARK_DEPLOYMENT_CONFIGURATION ]; then fail "File not found: $BENCHMARK_DEPLOYMENT_CONFIGURATION"; fi
  16. source "$BENCHMARK_DEPLOYMENT_CONFIGURATION"
  17. information "******************************************************************************"
  18. information "Benchmark Suite Deployment: SQL Server setup"
  19. information "******************************************************************************"
  20. LOCAL_SQLSERVER_BOOTSTRAP_FILE="toolset/setup/windows/setup-sqlserver-bootstrap.ps1"
  21. if iscygwin; then
  22. LOCAL_SQLSERVER_BOOTSTRAP_FILE=`cygpath -w "$LOCAL_SQLSERVER_BOOTSTRAP_FILE"`
  23. fi
  24. cat <<_EOF_
  25. Instructions for SQL Server setup:
  26. 1. Connect to the SQL Server using this command:
  27. mstsc /v:$BENCHMARK_SQL_SERVER /admin /f
  28. User name is $BENCHMARK_SQL_SERVER_USER and the password is the one you defined earlier.
  29. 2. Copy to the remote server the file located at
  30. $LOCAL_SQLSERVER_BOOTSTRAP_FILE
  31. 3. On the remote server, right-click on the pasted file and select "Run with PowerShell".
  32. _EOF_