Below are the steps required to deply Milestone 2 and 3 relases on our live systems. This is meant to be a living document so as you complete individual tasks add any deployment tasks to this document. Before deployment we can review and clean up this document as needed. It's important to get the task and details written down, but formatting and order of operations can be determined later. So don't spend too much time trying to figure out where a task belongs in the list. NOTE: Unless otherwise specified, all tasks can be run as a normal dev user, however, you will need sudo access. ################### ## Prerequisites ## ################### # # Any task that can be performed before an actual rollout that does not affect # currently running processes. These should be fairly low risk tasks. # i.e. Install software libraries # ** Setup CVS on CM01 ** - Run cygwin setup and ensure that cvs and vim are installed - Add geeks group by editing /etc/group geeks:x:400: - Update /etc/passwd and set default group to 400 for all developers - Create the /app/tools directory Mode: 2775 ** Install Prereqs on CM01 Cygwin ** - install tools with cygwin setup.exe: perl, make, gcc - install perl libraries via cpan: Net::SCP, XML::Simple, Win32::Daemon, Proc::Background, Win32 (?) ** Install required libraries on RPS01 and RPSO2 ** - Build and install ImageMagick with JPEG, Tiff, and PNG support using the build script. You will be prompted for your password to gain access to sudo. ( This might take a while ) $ /app/tools/rps/bin/release_scripts/M3_CM/build_image_magick - Build and install Math Pari libs $ wget ftp://megrez.math.u-bordeaux.fr/pub/pari/unix/pari-2.3.3.tar.gz $ tar xvf pari-2.3.3.tar.gz $ cd pari-2.3.3 $ ./Configure && make && sudo make install - Install Perl CPAN modules (RPS) ( Math::Pari might have a lib dependancy ) $ sudo perl -MCPAN -e 'install Math::Pari' $ sudo perl -MCPAN -e 'install Net::SFTP' $ sudo perl -MCPAN -e 'install Image::Magick' $ sudo perl -MCPAN -e 'install Date::Format' $ sudo perl -MCPAN -e 'install Time::HiRes' ** Create image upload directory ** $ sudo mkdir -m 755 -p /app/data/images $ sudo chown wwwadmin:geeks /app/data/images ** Create PID spool directory ** $ sudo mkdir /var/run/royaltyshare ** Install audio processing libraries for media server $ /app/tools/rps/bin/release_scripts/M3_CM/build_audio_libraries ** Setup CVS for deployment ** Setup CM01 Users/Directories - Create user 'web' -- Create identity file/key pair/whatever SCP needs... - Create cygwin symlink: '/media' => '/cygdrive/D/media' - Grant 'web' read/write permissions to '/media' ** Setup CM01 Mount - media folder ** - Update the legacy media mount which contains mounts to all removable media # Ensure no /media mounts are mounted, if the are, umount them $ sudo mv /media /mnt/media # update /etc/fstab and change all /media to /mnt/media - Create the mount credentials. Add the following to /etc/cifspw username=web password=getImages - Update the systems mount table. Add the following line to /etc/fstab: //172.24.1.32/media /media cifs ro,file_mode=0755,dir_mode=0755,gid=400,credentials=/etc/cifspw 0 0 - Mount the share $ sudo mkdir -p /media $ sudo mount /media *** Install/configure Windows Job Scheduler - Copy /app/tools/job/conf/job_scheduler.conf to /etc/job_scheduler.conf - update scheduler conf file (/etc/job_scheduler.conf) - install service perl /app/tools/job/bin/install_windows_job_scheduler.pl - start service ############# ## Rollout ## ############# # # Deploy the release. This is any task that will have a direct impact on # current processes or require system down time. i.e. Pushing code live or # updating database schemas. # ** Backup all databases ** ** client_db_mod.pl for "UPDATE product_digital SET dist_allow = 1" ** ** Update database schema ** ( start with updating primary-key addition/s ) ** Add new commands to database ** ssh raptor01 scp /app/tools/rps/bin/release_scripts/M3_CM/RSCOMMON.permission . mysql -uroot RSCOMMON < RSCOMMON.permission ** populate new lookup tables ** ** populate new rscommon tables ** ( distribution_service, etc. ) ################## ## Post Rollout ## ################## # # Anything tasks that should be run after the rollout process is complete, but # all systems are turned back on. # ** Test run all new cron scripts ** ** Setup Logging ** - Create the log directory $ sudo mkdir /var/log/royaltyshare - Setup log rotation. Add the following to /etc/logrotate.d/royaltyshare /var/log/royaltyshare/*log { missingok } ** Update Crontab ** - Setup crontabs on RPS01 and RPS02: $ sudo crontab -e -u root * * * * * /app/tools/mediaserve/bin/process_images -x cm_error@royaltyshare.com >> /var/log/royaltyshare/process_images.log * * * * * /app/tools/mediaserve/bin/process_audio -x cm_error@royaltyshare.com >> /var/log/royaltyshare/process_audio.log - Add the following line to the crontab on RPS01: $ sudo crontab -e -u root 0 8 * * * /app/tools/mediaserve/bin/unmatch_notify -x cm_error@royaltyshare.com -r cm_update@royaltyshare.com 0 8 * * * /app/tools/distribution/bin/update_notification -x cm_error@royaltyshare.com -r cm_update@royaltyshare.com 0 8 * * * /app/tools/distribution/bin/delivery_report -x cm_error@royaltyshare.com -r cm_update@royaltyshare.com 0 20 * * * /app/tools/distribution/bin/create_cm_jobs -x cm_error@royaltyshare.com >> /var/log/royaltyshare/cm_jobs.log