Browse Source

Removing runner-user forever

msmith-techempower 8 years ago
parent
commit
c546a307e9

+ 0 - 1
benchmark.cfg.example

@@ -3,7 +3,6 @@
 client_host=127.0.0.1
 client_host=127.0.0.1
 client_identity_file=None
 client_identity_file=None
 client_user=techempower
 client_user=techempower
-runner_user=testrunner
 database_host=127.0.0.1
 database_host=127.0.0.1
 database_identity_file=None
 database_identity_file=None
 database_os=linux
 database_os=linux

+ 2 - 2
config/php-fpm.conf

@@ -139,8 +139,8 @@ events.mechanism = epoll
 ;       will be used.
 ;       will be used.
 ; Note: TFB does not run php-fpm as root, and therefore these directives are 
 ; Note: TFB does not run php-fpm as root, and therefore these directives are 
 ;       ignored. Commenting them out avoids spurious log messages
 ;       ignored. Commenting them out avoids spurious log messages
-; user = testrunner
-; group = testrunner
+; user = 
+; group = 
 
 
 ; The address on which to accept FastCGI requests.
 ; The address on which to accept FastCGI requests.
 ; Valid syntaxes are:
 ; Valid syntaxes are:

+ 0 - 18
config/travis_setup.sh

@@ -39,26 +39,8 @@ echo "database_host=127.0.0.1"                         >> benchmark.cfg
 echo "server_host=127.0.0.1"                           >> benchmark.cfg
 echo "server_host=127.0.0.1"                           >> benchmark.cfg
 echo "client_user=travis"                              >> benchmark.cfg
 echo "client_user=travis"                              >> benchmark.cfg
 echo "database_user=travis"                            >> benchmark.cfg
 echo "database_user=travis"                            >> benchmark.cfg
-echo "runner_user=testrunner"                          >> benchmark.cfg
-
-# Create the new testrunner user
-sudo useradd testrunner
-# Give him a home dir
-sudo mkdir /home/testrunner
-# Make testrunner the owner of his home dir
-sudo chown testrunner:testrunner /home/testrunner
-# Add the testrunner user to every group that the travis user is in
-sudo sed -i 's|:travis|:travis,testrunner,benchmarkdbuser|g' /etc/group
-# Maybe unneeded - add the travis user to the testrunner group
-sudo sed -i 's|testrunner:x:\(.*\):|testrunner:x:\1:travis|g' /etc/group
-# Need to add testrunner to the sudoers group AND default him to a sudoers
-# because the travis user isn't in the sudo group - he's a sudoer.
-echo "testrunner ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers
-# Set the default shell for testrunner to /bin/bash
-sudo sed -i 's|/home/testrunner:/bin/sh|/home/testrunner:/bin/bash|g' /etc/passwd
 
 
 mkdir installs
 mkdir installs
-sudo chown testrunner:testrunner installs
 
 
 # =============Setup Databases===========================
 # =============Setup Databases===========================
 # NOTE: Do not run `--install database` in travis-ci! 
 # NOTE: Do not run `--install database` in travis-ci! 

+ 1 - 29
deployment/vagrant-common/bootstrap.sh

@@ -59,7 +59,6 @@ if [ ! -e "~/.firstboot" ]; then
   echo "export TFB_DATABASE_HOST=$DATABA_IP" >> ~/.bash_profile
   echo "export TFB_DATABASE_HOST=$DATABA_IP" >> ~/.bash_profile
   echo "export TFB_CLIENT_USER=$USER" >> ~/.bash_profile
   echo "export TFB_CLIENT_USER=$USER" >> ~/.bash_profile
   echo "export TFB_DATABASE_USER=$USER" >> ~/.bash_profile
   echo "export TFB_DATABASE_USER=$USER" >> ~/.bash_profile
-  echo "export TFB_RUNNER_USER=testrunner" >> ~/.bash_profile
   echo "export FWROOT=$HOME/FrameworkBenchmarks" >> ~/.bash_profile 
   echo "export FWROOT=$HOME/FrameworkBenchmarks" >> ~/.bash_profile 
   source ~/.bash_profile
   source ~/.bash_profile
 
 
@@ -75,12 +74,6 @@ if [ ! -e "~/.firstboot" ]; then
   echo $CLIENT_IP TFB-client   | sudo tee --append /etc/hosts
   echo $CLIENT_IP TFB-client   | sudo tee --append /etc/hosts
   echo $SERVER_IP TFB-server   | sudo tee --append /etc/hosts
   echo $SERVER_IP TFB-server   | sudo tee --append /etc/hosts
 
 
-  # Add user to run tests
-  sudo adduser --disabled-password --gecos "" testrunner
-  # WARN: testrunner will NOT have sudo access by round 11
-  #       please begin migrating scripts to not rely on sudo.
-  sudo bash -c "echo 'testrunner ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/90-tfb-testrunner"
-
   # Update hostname to reflect our current role
   # Update hostname to reflect our current role
   if [ "$ROLE" != "all" ]; then
   if [ "$ROLE" != "all" ]; then
     echo "Updating hostname"
     echo "Updating hostname"
@@ -111,8 +104,7 @@ if [ ! -e "~/.firstboot" ]; then
 
 
     # vboxfs does not support chown or chmod, which we need. 
     # vboxfs does not support chown or chmod, which we need. 
     # We therefore bind-mount a normal linux directory so we can
     # We therefore bind-mount a normal linux directory so we can
-    # use these operations. This enables us to 
-    # use `chown -R testrunner:testrunner $FWROOT/installs` later
+    # use these operations.
     #echo "Mounting over your installs folder"
     #echo "Mounting over your installs folder"
     #mkdir -p /tmp/TFB_installs
     #mkdir -p /tmp/TFB_installs
     #mkdir -p /FrameworkBenchmarks/installs
     #mkdir -p /FrameworkBenchmarks/installs
@@ -125,26 +117,6 @@ if [ ! -e "~/.firstboot" ]; then
     source ~/FrameworkBenchmarks/toolset/setup/linux/prerequisites.sh
     source ~/FrameworkBenchmarks/toolset/setup/linux/prerequisites.sh
   #fi
   #fi
 
 
-  # Everyone gets SSH access to localhost
-  echo "Setting up SSH access to localhost"
-  ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa
-  cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
-  sudo -u testrunner mkdir -p /home/testrunner/.ssh
-  sudo -u testrunner ssh-keygen -t rsa -N '' -f /home/testrunner/.ssh/id_rsa
-  sudo -u testrunner bash -c "cat /home/testrunner/.ssh/id_rsa.pub >> /home/testrunner/.ssh/authorized_keys"
-  sudo -u testrunner bash -c "cat /home/vagrant/.ssh/authorized_keys >> /home/testrunner/.ssh/authorized_keys"
-  chmod 600 ~/.ssh/authorized_keys
-  sudo -u testrunner chmod 600 /home/testrunner/.ssh/authorized_keys
-  
-  export RUNNER=testrunner
-  export ME=$(id -u -n)
-  sudo chown $RUNNER:$RUNNER /home/$RUNNER
-  sudo sed -i 's|:'"$ME"'|:'"$ME"','"$RUNNER"'|g' /etc/group
-  sudo sed -i 's|'"$ME"':x:\(.*\):|'"$ME"':x:\1:'"$RUNNER"'|g' /etc/group
-  sudo sed -i 's|'"$RUNNER"':x:\(.*\):|'"$RUNNER"':x:\1:'"$ME"'|g' /etc/group
-  echo "$RUNNER ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers
-  sudo sed -i 's|/home/'"$RUNNER"':.*|/home/'"$RUNNER"':/bin/bash|g' /etc/passwd
-
   # Enable remote SSH access if we are running production environment
   # Enable remote SSH access if we are running production environment
   # Note : this is always copied from the local working copy using a
   # Note : this is always copied from the local working copy using a
   #        file provisioner. While they exist in the git clone we just 
   #        file provisioner. While they exist in the git clone we just 

+ 4 - 6
deployment/vagrant-common/core.rb

@@ -106,12 +106,10 @@ def provider_virtualbox(config, role, ip_address='172.16.0.16')
     # The VirtualBox file system for shared folders (vboxfs)
     # The VirtualBox file system for shared folders (vboxfs)
     # does not support posix's chown/chmod - these can only 
     # does not support posix's chown/chmod - these can only 
     # be set at mount time, and they are uniform for the entire
     # be set at mount time, and they are uniform for the entire
-    # shared directory. We require chown, because we have the 
-    # testrunner user account, so this is a problem. To mitigate
-    # the effects, we set the folders and files to 777 permissions. 
-    # Even though we cannot chown them to testrunner, with 777 and 
-    # owner vagrant *most* of the software works ok. Occasional 
-    # issues are still possible. 
+    # shared directory. To mitigate the effects, we set the 
+    # folders and files to 777 permissions. 
+    # With 777 and wner vagrant *most* of the software works ok. 
+    # Occasional issues are still possible. 
     #
     #
     # See mitchellh/vagrant#4997
     # See mitchellh/vagrant#4997
     # See http://superuser.com/a/640028/136050
     # See http://superuser.com/a/640028/136050

+ 0 - 3
frameworks/PHP/README.md

@@ -136,9 +136,6 @@ because some gitignore files in this repo contain `*.lock` to avoid Ruby's lock
 If you are prompted for input during the `run-tests.py` script above, then you
 If you are prompted for input during the `run-tests.py` script above, then you
 need to generate your lock file manually so that you may answer the input 
 need to generate your lock file manually so that you may answer the input 
 queries as they are shown. Use these steps
 queries as they are shown. Use these steps
-
-    # Switch to the user that runs tests
-    sudo su testrunner
     
     
     # Define the environment variables you need (modify as needed)
     # Define the environment variables you need (modify as needed)
     export IROOT=/home/you/FrameworkBenchmarks/installs
     export IROOT=/home/you/FrameworkBenchmarks/installs

+ 2 - 9
toolset/run-tests.py

@@ -126,7 +126,6 @@ def main(argv=None):
     parser.add_argument('-s', '--server-host', default=serverHost, help='The application server.')
     parser.add_argument('-s', '--server-host', default=serverHost, help='The application server.')
     parser.add_argument('-c', '--client-host', default=clientHost, help='The client / load generation server.')
     parser.add_argument('-c', '--client-host', default=clientHost, help='The client / load generation server.')
     parser.add_argument('-u', '--client-user', default=clientUser, help='The username to use for SSH to the client instance.')
     parser.add_argument('-u', '--client-user', default=clientUser, help='The username to use for SSH to the client instance.')
-    parser.add_argument('-r', '--runner-user', default=runnerUser, help='The user to run each test as.')
     parser.add_argument('-i', '--client-identity-file', dest='client_identity_file', default=clientIden,
     parser.add_argument('-i', '--client-identity-file', dest='client_identity_file', default=clientIden,
                         help='The key to use for SSH to the client instance.')
                         help='The key to use for SSH to the client instance.')
     parser.add_argument('-d', '--database-host', default=databaHost,
     parser.add_argument('-d', '--database-host', default=databaHost,
@@ -176,16 +175,10 @@ def main(argv=None):
 
 
     # Verify and massage options
     # Verify and massage options
     if args.client_user is None:
     if args.client_user is None:
-      print 'Usernames (e.g. --client-user, --runner-user, and --database-user) are required!'
+      print 'Usernames (e.g. --client-user, and --database-user) are required!'
       print 'The system will SSH into the client and the database for the install stage'
       print 'The system will SSH into the client and the database for the install stage'
       print 'Aborting'
       print 'Aborting'
-      exit(1)
-
-    if args.runner_user is None:
-      print 'Usernames (e.g. --client-user, --runner-user, and --database-user) are required!'
-      print 'The system will run each test as the runner-user'
-      print 'Aborting'
-      exit(1)        
+      exit(1)    
 
 
     if args.database_user is None:
     if args.database_user is None:
       args.database_user = args.client_user
       args.database_user = args.client_user

+ 0 - 3
toolset/setup/linux/frameworks/ffead-cpp.sh

@@ -22,9 +22,6 @@ cp -R ffead-cpp-2.0-bin/ ${TROOT}
 mv ${TROOT}/ffead-cpp-2.0-bin ${TROOT}/ffead-cpp-2.0
 mv ${TROOT}/ffead-cpp-2.0-bin ${TROOT}/ffead-cpp-2.0
 rm -rf ffead-cpp-2.0/
 rm -rf ffead-cpp-2.0/
 
 
-sudo chown -R testrunner:testrunner ${TROOT}/ffead-cpp-2.0
-sudo chmod -R g+rw ${TROOT}/ffead-cpp-2.0
-
 sudo sed -i 's|localhost|'${DBHOST}'|g' ${TROOT}/ffead-cpp-2.0/web/te-benchmark/config/sdorm*
 sudo sed -i 's|localhost|'${DBHOST}'|g' ${TROOT}/ffead-cpp-2.0/web/te-benchmark/config/sdorm*
 
 
 sudo rm -f /etc/odbcinst.ini
 sudo rm -f /etc/odbcinst.ini

+ 1 - 1
toolset/setup/linux/frameworks/jester.sh

@@ -14,7 +14,7 @@ cd jester
 # 2015-06-25
 # 2015-06-25
 git checkout 71b8cc069a0d271d619c2dc41bc6479047885587
 git checkout 71b8cc069a0d271d619c2dc41bc6479047885587
 nimble update
 nimble update
-# If /home/testrunner/.nimble/pkgs/jester exists, write over it.
+# If ~/.nimble/pkgs/jester exists, write over it.
 echo 'y' | nimble install
 echo 'y' | nimble install
 
 
 echo "export JESTER_HOME=${JESTER}" > $IROOT/jester.installed
 echo "export JESTER_HOME=${JESTER}" > $IROOT/jester.installed

+ 2 - 2
toolset/setup/linux/languages/php5.sh

@@ -22,8 +22,8 @@ cd php5
 echo "Configuring PHP5 quietly..."
 echo "Configuring PHP5 quietly..."
 ./configure --prefix=$PHP_HOME --with-pdo-mysql \
 ./configure --prefix=$PHP_HOME --with-pdo-mysql \
   --with-mysql --with-mcrypt --enable-intl --enable-mbstring \
   --with-mysql --with-mcrypt --enable-intl --enable-mbstring \
-  --enable-fpm --with-fpm-user=testrunner --with-fpm-group=testrunner \
-  --with-openssl --with-mysqli --with-zlib --enable-opcache --quiet
+  --enable-fpm --with-openssl --with-mysqli --with-zlib \
+  --enable-opcache --quiet
 echo "Making PHP5 quietly..."
 echo "Making PHP5 quietly..."
 make --quiet
 make --quiet
 echo "Installing PHP5 quietly"
 echo "Installing PHP5 quietly"

+ 2 - 2
toolset/setup/linux/languages/php7.sh

@@ -17,8 +17,8 @@ cd php7
 echo "Configuring PHP quietly..."
 echo "Configuring PHP quietly..."
 ./configure --prefix=$PHP_HOME --with-pdo-mysql \
 ./configure --prefix=$PHP_HOME --with-pdo-mysql \
   --with-mcrypt --enable-intl --enable-mbstring \
   --with-mcrypt --enable-intl --enable-mbstring \
-  --enable-fpm --with-fpm-user=testrunner --with-fpm-group=testrunner \
-  --with-openssl --with-mysqli --with-zlib --enable-opcache --quiet
+  --enable-fpm --with-openssl --with-mysqli \
+  --with-zlib --enable-opcache --quiet
 echo "Making PHP quietly..."
 echo "Making PHP quietly..."
 make --quiet
 make --quiet
 echo "Installing PHP quietly"
 echo "Installing PHP quietly"