Browse Source

Update README for install

Alex Schneider 11 years ago
parent
commit
04869ab98f
1 changed files with 99 additions and 42 deletions
  1. 99 42
      toolset/setup/README.md

+ 99 - 42
toolset/setup/README.md

@@ -23,48 +23,105 @@ Refer to [Benchmark Suite Deployment README file](../deployment/README.md) for t
 
 ## Linux server and client setup
 
-To coordinate the tests via scripting, the servers need to be able to work together. So once the instances are running, the first thing you'll want to do is copy your ssh key to the application server instance so that you can ssh between the two machines:
-
-	sftp -i path-to-ssh-key ubuntu@server-instance-ip
-	put path-to-ssh-key .ssh/
-	exit
-
-This will copy your private ssh key file to ~/.ssh on the Linux server, where it will be used to connect to the benchmark client.
-
-Now, connect via ssh to the Linux server:
-
-    ssh -i path-to-ssh-key ubuntu@server-instance-ip
-
-On the Linux server, check out the latest version from GitHub:
-
-	cd ~
-    sudo apt-get install git -qq
-	git clone https://github.com/TechEmpower/FrameworkBenchmarks.git
-	cd FrameworkBenchmarks
-
-As it currently stands, the script that runs the tests makes some assumptions about where the code is placed. We assume that the FrameworkBenchmarks repository will be located in your home directory.
-
-Next, we're going to setup the Linux server and the client with the required software:
-
-	toolset/run-tests.py -s server-private-ip -c client-private-ip -i path-to-ssh-key --install-software --list-tests &> install.log
-    
-This step can take a couple hours. If you like, you can open another shell and watch the progress:
-
-    tail -f ~/FrameworkBenchmarks/install.log | grep '^INSTALL'
-
-After the installation is done, reboot both the Linux server and the Linux client.
-
-When they are online again, connect via ssh to the Linux server and type these commands for additional setup:
-
-    source ~/.bash_profile
-    # For your first time through the tests, set the ulimit for open files
-    ulimit -n 8192
-    # Most software is installed automatically by the script, but running the mongo command below from
-    # the install script was causing some errors. For now this needs to be run manually.
-    cd installs && curl -sS https://getcomposer.org/installer | php -- --install-dir=bin
-    cd ..
-    sudo apt-get remove --purge openjdk-6-jre openjdk-6-jre-headless
-    mongo --host client-private-ip < config/create.js
+### Installing the Framework Benchmark App Server
+
+1. Install [Ubuntu 14.04](http://www.ubuntu.com/download/server) with username `tfb`
+2. If Ubuntu is already installed, run the following command and follow the prompts.
+```bash
+$ sudo adduser tfb
+```
+2. Log in as `tfb`
+3. Fully update **NOTE**: If you update the kernel (linux-firmware), it is generally a good idea to reboot aftewards.
+```bash
+$ sudo apt-get update && sudo apt-get upgrade
+```
+4. Run the command: `sudo visudo`
+5. Change line 20 in from `%sudo   ALL=(ALL:ALL) ALL` to `%sudo   ALL=NOPASSWD: ALL`
+6. Run the following (Don't enter a password, just hit enter when the prompt pops up). **NOTE** This is still necessary if the client and database are on the same computer as the server
+```bash
+$ ssh-keygen
+$ ssh-copy-id <database ip>
+$ ssh-copy-id <client ip>
+```
+6. Install git and clone the Framework Benchmarks repository
+```bash
+$ sudo apt-get install git
+$ cd ~
+$ git clone https://github.com/TechEmpower/FrameworkBenchmarks.git
+$ cd FrameworkBenchmarks
+```
+7. Install the server software. This will take a long time
+```bash
+$ nohup python toolset/run-tests.py -s <server hostname/ip> -c <client hostname/ip> -u tfb --install-software --install server --list-tests &
+```
+8. If you want to view the process of installing, do the following. The session can be interrupted easily so no need to worry about keeping a connection.
+```bash
+$ tail -f nohup.out
+```
+9. Reboot when the install is done
+10. If you are setting up any other servers, do so before proceeding.
+11. Run the following commands
+```bash
+cd ~/FrameworkBenchmarks
+source ~/.bash_profile
+# For your first time through the tests, set the ulimit for open files
+ulimit -n 8192
+# Most software is installed automatically by the script, but running the mongo command below from
+# the install script was causing some errors. For now this needs to be run manually.
+cd installs && curl -sS https://getcomposer.org/installer | php -- --install-dir=bin
+cd ..
+sudo apt-get remove --purge openjdk-6-jre openjdk-6-jre-headless
+mongo --host database-private-ip < config/create.js
+```
+12. Edit your ~/.bashrc file to change the following
+ * Change `TFB_SERVER_HOST=<ip address>` to the server's IP address
+ * Change `TFB_CLIENT_HOST=<ip address>` to the client's ip address
+ * Change `TFB_DATABASE_HOST=<ip address>` to the database's ip address.
+ * Change `TFB_CLIENT_IDENTITY_FILE=<path>` to the id file you specified when you ran ssh-keygen (probably /home/tfb/.ssh/id_rsa.pub if you don't know what it is)
+
+---
+
+### Installing the Framework Benchmark Database Server
+
+1. Install [Ubuntu 14.04](http://www.ubuntu.com/download/server) with username `tfb`
+2. Log in as `tfb`
+3. Fully update **NOTE**: If you update the kernel (linux-firmware), it is generally a good idea to reboot aftewards.
+```bash
+$ sudo apt-get update && sudo apt-get upgrade
+```
+4. Run the command: `sudo visudo`
+5. Change line 20 in from `%sudo   ALL=(ALL:ALL) ALL` to `%sudo   ALL=NOPASSWD: ALL`
+6. Make the folder `/ssd`
+```bash
+$ sudo mkdir /ssd
+```
+7. Create a ramdisk on /ssd by executing the following commands:
+```bash
+$ sudo -i
+# echo "none     /ssd     ramfs  defaults   0     0" >> /etc/fstab
+# mount /ssd
+```
+8. On the app server, run the following from the FrameworkBenchmark directory (this should only take a small amount of time, several minutes or so):
+```bash
+$ toolset/run-tests.py -s <server hostname/ip> -c <client hostname/ip> -d <database hostname/ip> -u tfb --install-software --install database --list-tests
+```
+
+---
+
+### Installing the Framework Benchmark Load Server
+
+1. Install [Ubuntu 14.04](http://www.ubuntu.com/download/server) with username `tfb`
+2. Log in as `tfb`
+3. Fully update **NOTE**: If you update the kernel (linux-firmware), it is generally a good idea to reboot aftewards.
+```bash
+$ sudo apt-get update && sudo apt-get upgrade
+```
+4. Run the command: `sudo visudo`
+5. Change line 20 in from `%sudo   ALL=(ALL:ALL) ALL` to `%sudo   ALL=NOPASSWD: ALL`
+6. On the app server, run the following from the FrameworkBenchmark directory (this should only take a small amount of time, several minutes or so):
+```bash
+$ toolset/run-tests.py -s <server hostname/ip> -c <client hostname/ip> -d <database hostname/ip> -u tfb --install-software --install client --list-tests
+```
 
 You can validate that the setup worked by running a smoke test like this: