cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7581
Views
5
Helpful
23
Comments
Sean Merrow
Level 4
Level 4

Hello Everyone,

[June 23, 2011] UPDATE:

I fixed two bugs in the script:

  • When performing a clean install, if you requested the script to install VSES, it would instead install VSVM.
  • If the path to the script and software files contained a space, the installation would fail.

I want to bring to your attention a new tool I’ve developed to assist partners, customers, and Cisco engineers with VSM software installations and upgrades. 

The Challenge

Not all VSM users and installers are proficient with Linux and I’ve always felt that it would be great if they could perform an installation or upgrade and not have to be concerned with what an RPM file is, or how to uninstall and/or install one.  Not worry about Java, JRE, or symbolic links, and not forget to update the MySQL database, or worse, accidentally run the database_create script instead of database_update.  An upgrade process  that would verify that they have the necessary files on the server prior to launching the upgrade would be invaluable. 

I'd even say that those proficient with Linux and the VSM environment would likely appreciate an easier upgrade process.

The Solution

With the attached script, you can simply download the necessary VSM software .zip files from Cisco.com and put them and the script in any directory on the server.  You can then run the script and answer only a few simple YES or NO questions and feel comfortable that the installation or upgrade will be a success.  The entire process is scrolled to the screen as well as logged to a file for analysis, if necessary, after the upgrade/install.

How to use the script to perform and install or upgrade

  1. Download the necessary .zip files from Cisco.com
  2. Copy them to the VSM server in any directory
  3. Copy this script to the same directory as the .zip files
  4. Make this script executable   (chmod +x vsmSoftware631.sh)
  5. Run the script (./vsmSoftware631.sh)
  6. Answer simple questions when prompted.

Tips

  • If the script errors out when you try to run it, then it may have been converted to DOS format during the transfer.  The typical error if this happens is /bin/bash^M unrecognized interpreter.   Try running the following command first, then run the script again

o    dos2unix –k vsmSoftware631.sh

  • If you need to e-mail the script to someone and it gets blocked by e-mail, then you can remove the .sh extension.  The script file can have any file extension you want, or none at all.  It will work.

Explanation

The script can do a clean install or an upgrade.  The clean install will allow you to choose which VSM components you want to install, then verify that the necessary .zip files are present.  Any existing components will be removed.  If VSOM is being installed, then the database_create.sh script is called.  When this is called, it will first check for an existing database (from a prior installation), and if one exists, it will ask you if you want to create a new one or not.  If you choose no to this prompt, then you’ll need to manually update the database when finished.

If you choose the upgrade option when launching the script, then it will only upgrade VSM components that are currently installed on the system.  If VSOM is installed, it will backup, then update the MySQL database as part of the upgrade.

Please use the script and I'd love to get your feedback here.  Let me know what you like about it, what you don't like about it, and what suggestions you have for it.  Of course, I also want to know if you run into any problems caused by the script.  This script is not officially supported by our developement team, but I will try to get updates out as soon as possible when a bug...er...newly discovered feature...is found.

Thank you,

Sean

Sean Merrow     CCIE 25197

Physical Security CSE

Cisco Systems

Comments
Scott Olsen
Level 6
Level 6

Doooode... thank you!  I'll have a chance to try this out over the next couple weeks.  I'll let you know how it turns out!

Have a good weekend!

mcwalter
Level 3
Level 3

Thx Sean. I will use this in the lab in the coming weeks.

teddycousins
Level 1
Level 1

Hey Sean - you've helped me in the past with my TAC Case for my site in the Philippines on a RAID rebuild. Thanks for putting this document assistant together b/c I'm about to upgrade all of my VSMS servers here shortly.

I do have a couple of questions though before I actually start the upgrade from 5.1.1 to 6.3.1:

  • In other documentation it states that MySQL and it's dependencies need to be installed before VSM. Does your script allow for that?
  • Does your script also allow for all VSMS dependencies installs also?
  • Will the RAID config on each server need to be rebuilt after the upgrade?
  • I also found that i'll need to modify the host name via "/etc/hosts". Is this really required?

These are just a few questions I've come up with and I hope they don't sound too "stoopid", but I'm trying to create a pretty seamless process as I upgrade more than 20 servers in various locations. Otherwise, I'll be opening up mucho TAC cases left and right for any issues I may run into.

Any guidance would be greatly appreciated!

Sean Merrow
Level 4
Level 4

Hi Teddy,

I would recommend that you open a case with TAC as this is a fairly large project.  Do the first upgrade with TAC assistance and document your steps so they can be followed for the rest of the servers.

The script was not tested against 5.1.1, however you should be able to use it with some extra steps.  Before you do so, I would strongly recommend backing up both VSOM and VSMS prior to the upgrade, and have your 5.1.1 Recovery DVD on hand in case you need to roll back.  Then follow these steps:

  1. Copy the 6.3.1 software files onto the server
  2. Copy this script into the same directory
  3. Make the script executable
  4. Run the script with the upgrade option

When the script is done, you'll need to manually run the pre-6.0 upgrade script, which will delete all of your existing archives:

/usr/BWhttpd/bin/upgrade_pre_6.0

Then make sure the following directories have the correct owner and permissions:

chown nobody: /usr/BWhttpd/root/run/*
chmod 777 /usr/BWhttpd/root/run/*
chown nobody: /usr/BWhttpd/root/run
chmod 755 /usr/BWhttpd/root/run

With regard to your specific questions:

In other documentation it states that MySQL and it's dependencies need to be installed before VSM. Does your script allow for that?

The OS will not be touched in this upgrade, so the existing installation of MySQL will remain.  As part of the upgrade, there are several mysql update scripts that will be run to bring it up to date.


Does your script also allow for all VSMS dependencies installs also?

Yes, the 5.1.1 VSMS RPM will be removed and the 6.3.1 VSMS RPM will be installed, along with the RPMs that VSMS is dependant on.


Will the RAID config on each server need to be rebuilt after the upgrade?

Neither the RAID configuration nor the OS will be modified by this upgrade.  Only VSM will be upgraded and the MySQL VSOM database (if present) will be updated.


I also found that i'll need to modify the host name via "/etc/hosts". Is this really required?

It may or may not.  Check the output of vscheck when your finished the upgrade.  If your installation is working fine when you are done, then you shouldn't need to change anything.

Hope this helps,

Sean

Cory Blackman
Level 1
Level 1

Very nice, i will test it out, it's something we all said was needed to remove the factors of human error...

mcwalter
Level 3
Level 3

Hi Sean,

We used your script to get a 421/621 up to 631 and it worked just fine. Took a while on the MSQL database upgrades. Had us nervous for a bit

Sean Merrow
Level 4
Level 4

Thanks for the follow-up.  Glad it worked for you.

Sean

TaylorW47
Level 1
Level 1

Just did an upgrade from 6.3.0 to 6.3.1 - worked flawlessly, very easy to run - Thank you!

Cory Blackman
Level 1
Level 1

Excellent!  But I would say to move the intro VSOM & VSVM questions together and then the VSMS & VSES questions together, rather than the way they are interleaved now, much better question flow if together, imo.

Cory Blackman
Level 1
Level 1

What is this servername/hostname error from?

Video Surveillence Media Server
----------------------------------
Storage Pecentage   98
REPOS:              None configured
CLIP_REPOS:         None configured
BWM_REPOS:          None configured
EVENT_REPOS:        None configured
ServerName:         !!The HTTPD ServerName 'HOUCAMMEDIA01' is different from the hostname 'HOUCAMMEDIA01.qs.local'
Error: Cannot get version
----------------------------------

Cory Blackman
Level 1
Level 1

I noticed some other things the script failed to do:

1)  The script did not perform a clean MySQL database replacement, nor did it update the DB from 6.0.0 to 6.3.1 (we had o do it by hand afterwards on our VSOM/VSVM server).

2)  The script did not do the Health Dashboard Icon MySQL fix.  (we also had to do this by hand).

3)  The script did not install the VSDocs on the VSOM/VSVM install (it may not be needed since it's not included in either zip file, but we unzipped it from the VSMS zip file and installed that rpm).

Sean Merrow
Level 4
Level 4

Thanks for the feedback Cory.

Sean

Sean Merrow
Level 4
Level 4

I believe that is referring to the hostname in httpd.conf vs. /etc/hosts.  Typically isn't a problem.

Sean

Sean Merrow
Level 4
Level 4

Hey Cory,

1)  The script did not perform a clean  MySQL database replacement, nor did it update the DB from 6.0.0 to 6.3.1  (we had o do it by hand afterwards on our VSOM/VSVM server).

If you choose option 1, which is clean install, then it will run the database_create.sh script which will indeed over-write your current database.  If a database already exists, it will as you if you want to overwrite the database or keep the existing one.  If you keep the existing one, then you will need to manually update the database when finished.  This is explained early on after launching the script and includes the command you will need to manually run to complete the DB update.  Also, the system will check to see if the /usr/BWhttpd/ directory exists.  If it does, it will ask if you want to keep that folder and all the configs in it, or delete it for a truly clean install.

If you choose option 2, which is the upgrade, then it will only run the database_update.sh script which should perform the mysql update.

2)  The script did not do the Health Dashboard Icon MySQL fix.  (we also had to do this by hand).

Correct.  The script was never intended to implement work-arounds for bugs.  It is only intended to simplify the documented upgrade process.

3)   The script did not install the VSDocs on the VSOM/VSVM install (it may  not be needed since it's not included in either zip file, but we  unzipped it from the VSMS zip file and installed that rpm).

Yes, this is because neither the VSOM nor the VSVM .zip files downloaded from Cisco.com contain the VSDocs rpm.  Also, if you are ever installing only VSOM on a server, note that the VSOM .zip file does not contain the VSTools rpm.  If you want to install the VSTools on a VSOM-only server, then you would need to copy that rpm from the VSMS .zip file.

I hope this clears up some of the reasons.  The script basically just uses all the same commands you would use if you followed the documented upgrade/install procedure, with a few additional enhancements.

Thanks,

Sean

Cory Blackman
Level 1
Level 1

In regards to 1), we chose option 1 and still had to clean out the old database on a 6.0.0 to 6.3.1 upgrade as well as perform the db upgrades, i will email the log to you as soon as i can be onsite again so you may see what's up with either the script or the user (me).  This script still saved a large amount of steps and time. =)

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: