Permalink
Browse files

first commit

  • Loading branch information...
0 parents commit f6f6c3da18c01ac7ed731796c99ae3faf8c51f70 @ardentperf committed Mar 28, 2011
Showing with 568 additions and 0 deletions.
  1. +34 −0 README.txt
  2. +22 −0 build-1.bat
  3. +22 −0 build-2.bat
  4. +22 −0 build-3.bat
  5. +22 −0 build-4.bat
  6. +22 −0 build-5a.bat
  7. +22 −0 build-5b.bat
  8. +81 −0 dobuild.bat
  9. +102 −0 dojump.bat
  10. +54 −0 jumpstart-0.bat
  11. +22 −0 jumpstart-1.bat
  12. +22 −0 jumpstart-2.bat
  13. +22 −0 jumpstart-3.bat
  14. +22 −0 jumpstart-4.bat
  15. +22 −0 jumpstart-5a.bat
  16. +22 −0 jumpstart-5b.bat
  17. BIN lzop.exe
  18. BIN md5sum.exe
  19. +33 −0 setupenv.bat
@@ -0,0 +1,34 @@
+RAC-ATTACK : Scripts for "jumpstart" framework in RAC Attack classes
+
+===========================================================================
+Copyright 2011 Jeremy Schneider
+
+RAC-ATTACK is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+RAC-ATTACK is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with RAC-ATTACK. If not, see <http://www.gnu.org/licenses/>.
+===========================================================================
+
+These are batch files intended to be run on Windows workstations.
+
+Instructions:
+1. Edit setupenv.bat with appropriate values
+2. Step through labs and create jumpstart points with build-* scripts
+3. Create shortcuts on the workstation desktop to each of the jumpstart-* scripts
+
+
+NOTE: LZOP and MD5SUM are both GPL products
+--> I obtained this copy of LZOP from http://www.lzop.org
+--> I obtained this copy of MD5SUM from http://www.etree.org/md5com.html
+
+
+jeremy.schneider@ardentperf.com
+http://www.ardentperf.com
@@ -0,0 +1,22 @@
+REM
+REM Copyright 2011 Jeremy Schneider
+REM
+REM This file is part of RAC-ATTACK.
+REM
+REM RAC-ATTACK is free software: you can redistribute it and/or modify
+REM it under the terms of the GNU General Public License as published by
+REM the Free Software Foundation, either version 3 of the License, or
+REM (at your option) any later version.
+REM
+REM RAC-ATTACK is distributed in the hope that it will be useful,
+REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+REM GNU General Public License for more details.
+REM
+REM You should have received a copy of the GNU General Public License
+REM along with RAC-ATTACK. If not, see <http://www.gnu.org/licenses/>.
+REM
+REM
+
+set SOURCEDIR=RAC-1-os
+call dobuild.bat
@@ -0,0 +1,22 @@
+REM
+REM Copyright 2011 Jeremy Schneider
+REM
+REM This file is part of RAC-ATTACK.
+REM
+REM RAC-ATTACK is free software: you can redistribute it and/or modify
+REM it under the terms of the GNU General Public License as published by
+REM the Free Software Foundation, either version 3 of the License, or
+REM (at your option) any later version.
+REM
+REM RAC-ATTACK is distributed in the hope that it will be useful,
+REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+REM GNU General Public License for more details.
+REM
+REM You should have received a copy of the GNU General Public License
+REM along with RAC-ATTACK. If not, see <http://www.gnu.org/licenses/>.
+REM
+REM
+
+set SOURCEDIR=RAC-2-vmware
+call dobuild.bat
@@ -0,0 +1,22 @@
+REM
+REM Copyright 2011 Jeremy Schneider
+REM
+REM This file is part of RAC-ATTACK.
+REM
+REM RAC-ATTACK is free software: you can redistribute it and/or modify
+REM it under the terms of the GNU General Public License as published by
+REM the Free Software Foundation, either version 3 of the License, or
+REM (at your option) any later version.
+REM
+REM RAC-ATTACK is distributed in the hope that it will be useful,
+REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+REM GNU General Public License for more details.
+REM
+REM You should have received a copy of the GNU General Public License
+REM along with RAC-ATTACK. If not, see <http://www.gnu.org/licenses/>.
+REM
+REM
+
+set SOURCEDIR=RAC-3-clusterware
+call dobuild.bat
@@ -0,0 +1,22 @@
+REM
+REM Copyright 2011 Jeremy Schneider
+REM
+REM This file is part of RAC-ATTACK.
+REM
+REM RAC-ATTACK is free software: you can redistribute it and/or modify
+REM it under the terms of the GNU General Public License as published by
+REM the Free Software Foundation, either version 3 of the License, or
+REM (at your option) any later version.
+REM
+REM RAC-ATTACK is distributed in the hope that it will be useful,
+REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+REM GNU General Public License for more details.
+REM
+REM You should have received a copy of the GNU General Public License
+REM along with RAC-ATTACK. If not, see <http://www.gnu.org/licenses/>.
+REM
+REM
+
+set SOURCEDIR=RAC-4-database
+call dobuild.bat
@@ -0,0 +1,22 @@
+REM
+REM Copyright 2011 Jeremy Schneider
+REM
+REM This file is part of RAC-ATTACK.
+REM
+REM RAC-ATTACK is free software: you can redistribute it and/or modify
+REM it under the terms of the GNU General Public License as published by
+REM the Free Software Foundation, either version 3 of the License, or
+REM (at your option) any later version.
+REM
+REM RAC-ATTACK is distributed in the hope that it will be useful,
+REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+REM GNU General Public License for more details.
+REM
+REM You should have received a copy of the GNU General Public License
+REM along with RAC-ATTACK. If not, see <http://www.gnu.org/licenses/>.
+REM
+REM
+
+set SOURCEDIR=RAC-5a-asmDB
+call dobuild.bat
@@ -0,0 +1,22 @@
+REM
+REM Copyright 2011 Jeremy Schneider
+REM
+REM This file is part of RAC-ATTACK.
+REM
+REM RAC-ATTACK is free software: you can redistribute it and/or modify
+REM it under the terms of the GNU General Public License as published by
+REM the Free Software Foundation, either version 3 of the License, or
+REM (at your option) any later version.
+REM
+REM RAC-ATTACK is distributed in the hope that it will be useful,
+REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+REM GNU General Public License for more details.
+REM
+REM You should have received a copy of the GNU General Public License
+REM along with RAC-ATTACK. If not, see <http://www.gnu.org/licenses/>.
+REM
+REM
+
+set SOURCEDIR=RAC-5b-ocfs2DB
+call dobuild.bat
@@ -0,0 +1,81 @@
+REM
+REM Copyright 2011 Jeremy Schneider
+REM
+REM This file is part of RAC-ATTACK.
+REM
+REM RAC-ATTACK is free software: you can redistribute it and/or modify
+REM it under the terms of the GNU General Public License as published by
+REM the Free Software Foundation, either version 3 of the License, or
+REM (at your option) any later version.
+REM
+REM RAC-ATTACK is distributed in the hope that it will be useful,
+REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+REM GNU General Public License for more details.
+REM
+REM You should have received a copy of the GNU General Public License
+REM along with RAC-ATTACK. If not, see <http://www.gnu.org/licenses/>.
+REM
+REM
+
+call setupenv.bat
+
+echo "CAUTION: THIS WILL DELETE THE CURRENT IMAGES. ARE YOU SURE? (CTRL-C to ABORT)"
+pause
+time /t
+
+call %VMRUNBIN% -T server -h https://localhost:8333/sdk -u %USERNAME% -p %MYPASS% stop "[RAC11g] collabn1\collabn1.vmx" hard
+call %VMRUNBIN% -T server -h https://localhost:8333/sdk -u %USERNAME% -p %MYPASS% unregister "[RAC11g] collabn1\collabn1.vmx"
+call %VMRUNBIN% -T server -h https://localhost:8333/sdk -u %USERNAME% -p %MYPASS% stop "[RAC11g] collabn2\collabn1.vmx" hard
+call %VMRUNBIN% -T server -h https://localhost:8333/sdk -u %USERNAME% -p %MYPASS% unregister "[RAC11g] collabn2\collabn1.vmx"
+time /t
+
+%DESTDRIVE%
+cd \%DESTDIR%\collabn1
+del /q vmware*.log
+%MD5BIN% * >checksum.md5
+
+type checksum.md5 | find /V "checksum" > c2.md5
+move /Y c2.md5 checksum.md5
+time /t
+
+cd \%DESTDIR%\collabn2
+del /q vmware*.log
+%MD5BIN% * >checksum.md5
+
+type checksum.md5 | find /V "checksum" > c2.md5
+move /Y c2.md5 checksum.md5
+time /t
+
+%DESTDRIVESHARED%
+
+cd \%DESTDIRSHARED%
+del /q *.RESLCK
+%MD5BIN% * >checksum.md5
+
+type checksum.md5 | find /V "checksum" > c2.md5
+move /Y c2.md5 checksum.md5
+time /t
+
+
+%SOURCEDRIVE%
+mkdir \%SOURCEDIR%
+mkdir \%SOURCEDIR%.prev
+
+del /q \%SOURCEDIR%.prev\*.lzo
+move /y \%SOURCEDIR%\* \%SOURCEDIR%.prev
+
+cd \%SOURCEDIR%
+%LZOPBIN% -FPvo collabn1.lzo %DESTDRIVE%\%DESTDIR%\collabn1\*
+time /t
+%LZOPBIN% -FPvo collabn2.lzo %DESTDRIVE%\%DESTDIR%\collabn2\*
+time /t
+%LZOPBIN% -FPvo shared.lzo %DESTDRIVESHARED%\%DESTDIRSHARED%\*
+time /t
+
+
+call %VMRUNBIN% -T server -h https://localhost:8333/sdk -u %USERNAME% -p %MYPASS% register "[RAC11g] collabn1\collabn1.vmx"
+call %VMRUNBIN% -T server -h https://localhost:8333/sdk -u %USERNAME% -p %MYPASS% register "[RAC11g] collabn2\collabn1.vmx"
+time /t
+
+pause
@@ -0,0 +1,102 @@
+REM
+REM Copyright 2011 Jeremy Schneider
+REM
+REM This file is part of RAC-ATTACK.
+REM
+REM RAC-ATTACK is free software: you can redistribute it and/or modify
+REM it under the terms of the GNU General Public License as published by
+REM the Free Software Foundation, either version 3 of the License, or
+REM (at your option) any later version.
+REM
+REM RAC-ATTACK is distributed in the hope that it will be useful,
+REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+REM GNU General Public License for more details.
+REM
+REM You should have received a copy of the GNU General Public License
+REM along with RAC-ATTACK. If not, see <http://www.gnu.org/licenses/>.
+REM
+REM
+
+call setupenv.bat
+
+REM ====================== Cleanup Current Files ======================
+time /t
+
+call %VMRUNBIN% -T server -h https://localhost:8333/sdk -u %USERNAME% -p %MYPASS% stop "[RAC11g] collabn1\collabn1.vmx" hard
+call %VMRUNBIN% -T server -h https://localhost:8333/sdk -u %USERNAME% -p %MYPASS% unregister "[RAC11g] collabn1\collabn1.vmx"
+call %VMRUNBIN% -T server -h https://localhost:8333/sdk -u %USERNAME% -p %MYPASS% stop "[RAC11g] collabn2\collabn1.vmx" hard
+call %VMRUNBIN% -T server -h https://localhost:8333/sdk -u %USERNAME% -p %MYPASS% unregister "[RAC11g] collabn2\collabn1.vmx"
+time /t
+
+mkdir %DESTDRIVE%\%DESTDIR%
+mkdir %DESTDRIVE%\%DESTDIR%\collabn1
+mkdir %DESTDRIVE%\%DESTDIR%\collabn2
+mkdir %DESTDRIVE%\%DESTDIR%.prev
+mkdir %DESTDRIVE%\%DESTDIR%.prev\collabn1
+mkdir %DESTDRIVE%\%DESTDIR%.prev\collabn2
+
+mkdir %DESTDRIVESHARED%\%DESTDIRSHARED%
+mkdir %DESTDRIVESHARED%\%DESTDIRSHARED%.prev
+
+del /q %DESTDRIVE%\%DESTDIR%.prev\collabn1\*
+del /q %DESTDRIVE%\%DESTDIR%.prev\collabn2\*
+del /q %DESTDRIVESHARED%\%DESTDIRSHARED%.prev\*
+
+move /y %DESTDRIVE%\%DESTDIR%\collabn1\* %DESTDRIVE%\%DESTDIR%.prev\collabn1
+move /y %DESTDRIVE%\%DESTDIR%\collabn2\* %DESTDRIVE%\%DESTDIR%.prev\collabn2
+move /y %DESTDRIVESHARED%\%DESTDIRSHARED%\* %DESTDRIVESHARED%\%DESTDIRSHARED%.prev
+time /t
+
+REM ====================== Decompress New Files ======================
+%DESTDRIVE%
+
+cd \%DESTDIR%
+echo %SOURCEDRIVE%\%SOURCEDIR% >source.txt
+
+cd \%DESTDIR%\collabn1
+rem type %SOURCEDRIVE%\%SOURCEDIR%\collabn1.lzo | %LZOPBIN% -vdNp
+rem *** Windows TYPE command is fastest but can't handle >4GB files
+%LZOPBIN% -vdNp %SOURCEDRIVE%\%SOURCEDIR%\collabn1.lzo
+time /t
+
+cd \%DESTDIR%\collabn2
+rem type %SOURCEDRIVE%\%SOURCEDIR%\collabn2.lzo | %LZOPBIN% -vdNp
+rem *** Windows TYPE command is fastest but can't handle >4GB files
+%LZOPBIN% -vdNp %SOURCEDRIVE%\%SOURCEDIR%\collabn2.lzo
+time /t
+
+
+%DESTDRIVESHARED%
+
+cd \%DESTDIRSHARED%
+echo %SOURCEDRIVE%\%SOURCEDIR% >source.txt
+
+cd \%DESTDIRSHARED%
+rem type %SOURCEDRIVE%\%SOURCEDIR%\shared.lzo | %LZOPBIN% -vdNp
+rem *** Windows TYPE command is fastest but can't handle >4GB files
+%LZOPBIN% -vdNp %SOURCEDRIVE%\%SOURCEDIR%\shared.lzo
+time /t
+
+call %VMRUNBIN% -T server -h https://localhost:8333/sdk -u %USERNAME% -p %MYPASS% register "[RAC11g] collabn1\collabn1.vmx"
+call %VMRUNBIN% -T server -h https://localhost:8333/sdk -u %USERNAME% -p %MYPASS% register "[RAC11g] collabn2\collabn1.vmx"
+
+REM ====================== Check New Files ======================
+time /t
+%DESTDRIVE%
+
+cd \%DESTDIR%\collabn1
+%MD5BIN% --check checksum.md5
+time /t
+
+cd \%DESTDIR%\collabn2
+%MD5BIN% --check checksum.md5
+time /t
+
+%DESTDRIVESHARED%
+
+cd \%DESTDIRSHARED%
+%MD5BIN% --check checksum.md5
+time /t
+
+pause
Oops, something went wrong.

0 comments on commit f6f6c3d

Please sign in to comment.