#!/bin/bash declare Version=1.1.7 declare Password="F@stSCM!" echo "Running ${0##*/} v$Version." # Installing Helix Swarm and Git Fusion packages. sudo yum install perforce-git-fusion -y sudo yum install perforce-swarm -y sudo yum install perforce-cli -y # Call 'useradd perforce' before installing any Perforce package so we get # the perforce user home directory where we want it. sudo useradd -c "Perforce Admin" perforce sudo yum install perforce-server -y echo "Allowing user 'perforce' sudo privileges." echo 'perforce ALL=(ALL:ALL) NOPASSWD: ALL' > /tmp/perforce sudo chmod 0440 /tmp/perforce sudo chown root:root /tmp/perforce sudo mv /tmp/perforce /etc/sudoers.d/. echo "Creating initial SDP dirs." declare DirList="/p4 /hxdepots/reset /hxdepots/p4/common/bin/cbd /hxmetadata1 /hxlogs" mkdirCmd="sudo /bin/mkdir -p $DirList" echo "Running: $mkdirCmd" $mkdirCmd chownCmd="sudo chown -R perforce:perforce $DirList" echo "Running: $chownCmd" $chownCmd echo "Setting up environment niceties for perforce user." BASH_PROFILE=/tmp/.bash_profile.perforce echo '[[ -f /etc/bashrc ]] && source /etc/bashrc' > $BASH_PROFILE echo '[[ -f ~/.bashrc ]] && source ~/.bashrc' >> $BASH_PROFILE sudo chown perforce:perforce $BASH_PROFILE sudo mv -f $BASH_PROFILE ~perforce/.bash_profile BASHRC=/tmp/.bashrc.perforce echo '[[ -f /p4/common/bin/p4_vars ]] && source /p4/common/bin/p4_vars 1'> $BASHRC echo "export PS1='\$USER@\${HOSTNAME%%.*}:\$PWD '" >> $BASHRC echo "alias md='/bin/mkdir -p'" >> $BASHRC echo "alias rd=/bin/rmdir" >> $BASHRC echo "alias o='p4 opened ...'" >> $BASHRC echo "alias go='cd /p4/common/bin/cbd/test && source manual_test_env.sh'" >> $BASHRC echo 'set -o vi' >> $BASHRC sudo chown perforce:perforce $BASHRC sudo mv -f $BASHRC ~perforce/.bashrc echo "Setting password for perforce user to: $Password" echo "perforce:$Password" | sudo chpasswd echo "Setting up environment niceties for vagrant user." echo "alias go='sudo su - perforce'" >> ~/.bashrc echo 'set -o vi' >> ~/.bashrc exit 0
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#13 | 22188 | C. Thomas Tyler | Fixed logic creating suders file for perforce user. | ||
#12 | 21805 | C. Thomas Tyler | Routine merge down to dev from main. | ||
#11 | 19285 | C. Thomas Tyler |
Added niceties for users 'perforce' and 'vagrant', mainly a 'go' for each. So you can now get set up for testing by doing: vagrant ssh go go The first call to 'go' executes as the vagrant user. It just does a 'sudo su - perforce' to change you to the perforce user. The second call to 'go' executes as the perforce user. It sets up the shell environment for CBD testing. Added a ReadMe.md documenting this and describing files in this directory. |
||
#10 | 19253 | C. Thomas Tyler | Routine merge-down from main to dev. | ||
#9 | 15152 | C. Thomas Tyler |
Routine Merge Down to dev from main for CBD, using: p4 merge -b perforce_software-cbd-dev |
||
#8 | 15039 | C. Thomas Tyler |
Merge Down CBD to dev from main to pick up test suite improvements and an exception bug fix in Cbd.py. |
||
#7 | 14997 | C. Thomas Tyler | Enhanced dir boostrapping. | ||
#6 | 14990 | C. Thomas Tyler |
Removed call to Helix Installer; it now belongs in test_sdp.sh, where it is easier to re-use in frequent iterations, and keeping this script restricted to one-time bootstrap steps. |
||
#5 | 14907 | C. Thomas Tyler |
Moved test data files into 'shared' folder to make them available on the 'helix-01' text VM, and tweaked test_cbd.sh to reference them there. |
||
#4 | 14904 | C. Thomas Tyler |
Prepared CentOS VM, initialized by Vagrant (command-line virtual machine management) for ground-up test environment building, starting from the vanilla CentOS OS installation. Modified startup scripts to use the Helix Installer to simpfliy the bulk of the installation. Added test config file for testing on Vagrant-initialized 'helix-01' box. |
||
#3 | 14851 | C. Thomas Tyler |
Enhanced to use Helix Installer ("HI") project's SDP reset script. Changed CBD password to one less likey to be rejected on systems with stringent password requirements. This is a WIP change. |
||
#2 | 11359 | C. Thomas Tyler | chmod +x for bootstrap=*.sh scripts. | ||
#1 | 11354 | C. Thomas Tyler | Started work on Vagrant test harness. |