Purpose of this Document
This document is intended to assist customers who wish to bridge the gap between the one click install process that existed for the legacy collectors and the installation of the next generation (Java) collector by providing a one click (or unattended install) process - with our 4.x release of the Vyopta Data Collector, the upgrade process became more involved, requiring customers to use the Windows command line utility to upgrade the collector.
Why use an auto-update process?
Vyopta regularly releases new versions of our 4.x Vyotpa Data Collector, which include the following:
- new features and bug fixes from our previous versions.
- updated internal stack that protects you from security vulnerabilities
- updates to support new firmware version of you on-premise infrastructure and endpoints
We recognise that the upgrade process for the collector is less convenient previously, and are therefore providing an alternative: the attached batch file will do upgrade for you automatically - the documentation regarding this file is below, but once configured to your environment it's execution can be as simple as double-clicking the batch file to execute it.
Is is also possible to use the Windows Task Scheduler to execute the file at a later time, thus providing for unattended, out of hours, upgrades
Caveats
This information and scripted upgrade are being provided as an example only. Depending on the needs in a particular organisation, the process may not be applicable or may require modification - modifications required to support a particular environment will need to be undertaken locally, and may be driven by such factors as:
- Service Management (ITIL etc)
- Change control requirements
- Local security policies
Vyopta will not be able to assist in making such modifications.
The provided process has been tested upon a default Windows installation, with default security policies, and has be verified to work under those conditions - there should be no expectation that it will function unmodified in other environments.
Using the Automatic Update Procedure
Getting and Installing the File
Firstly download the AutoUpgrade.bat file that is attached to this article
Once downloaded, copy the file to the same location as your VyoptaCollector.exe is installed in. In the following example, VyoptaCollector.exe is located in the folder C:\VyotpaCollector
Configuring the Batch File
Once copied edit the file in a text editor. Notepad++ is used in the screenshot below.
Two changes must be made to configure the file to tour environment: the installation directory must be set, and a path set to contain backups of the previous installation to permit fall-back
Please proceed as follows:
1) On line 5 (indicated with the blue arrow), change the value of C:\VyoptaCollector to the location of the collector installation (which should be the location of the batch file). If the collector is installed in C:\Vyopta\VyoptaCollector46 then the following would be correct
set CollectorFolder=C:\Vyopta\VyoptaCollector46
2) On line 6 (indicated with a red arrow), change the value of C:\VyoptaCollectorBackup to the location where backups should be stored by AutoUpdater. In the above example, the backups are stored in C:\VyoptaCollectorBack. Ensure that the backup folder is outside the main collector folder so that each backup does not contain all previous backups.
The the AutoUpdater runs, it performs the following steps:
- Sets the location of the collector install folder and backup folder
- Checks to see that the execution has elevated rights (the process will show an error message and fail if elevated privileges are not available).
- Checks to see if a new version is available - no further action will be taken if no upgrade is possible
- Stop the existing Vyopta Collector service
- Make a copy of the complete VyoptaCollector folder, and place it in the backup folder with a date time on the folder. Sample in the screenshot below.
- Uninstall the existing collector (vyoptacollector.exe -uninstall)
- Delete all folders that start with a dot character (.cache, .logs etc)
- Delete the existing vyoptacollector.exe file
- Download the new GA version of the vyoptacollector.exe from the Vyopta Cloud
- Install the new collector that we just downloaded (vyoptacollector.exe -install)
This batch file has been made available in order to facilitate the upgrade of the Vyopta collector for our customers - however, it is the responsibility of the customer to self-support the use of this file, which should considered as illustrative only. It should be expected that changes will be required to the provided example in order to accommodate any particular environment
How can I get Windows to run the batch file automatically?
Once configured, the Vyopta Collector update batch file can set up to be executed by Windows Task Manager according to your schedule.
For example, to run the auto update at 1AM every day in order to ensure that the local collector is upgraded within 24 hours of the release of a new version by Vyopta.
To enable this, please do the following:
Launch Task Scheduler on the collector server. Once open, click on Create Basic Task, as shown in the red box in the screenshot below
This will launch the Task Wizard. Please assign a name for the Basic Task - for example, 'Vyotpa Auto Upgrade', and then click Next
The Task Trigger form should now be shown, as shown below - change the Trigger to be Daily (which is the default), or select when to update based on any of the conditions below. Once the task start has been defined, click Next
The wizard will now prompt for the task start time - configured to 1am in the screenshot below, in order that the upgrade will not impact business hours - the recurrence can be seen to be set to every day. Again, adjust these setting to suit he environment and then click Next
The next screen will prompt for the action to be taken at the scheduled time - select Start a program and click Next
Select the AutoUpgrade.bat file from above that is in the collector's installation folder - either enter the path or click on Browse and navigate to the file. In the Start in text field, enter the collector's installation folder as shown in the screenshot below.
Click Next.
A summary of the settings provided is now shown. If there are no errors, click Finish, otherwise made any corrections using the Back button.
As when running the batch file manually, it is necessary that the scheduled process runs with elevated privileges. To set this, please do the following
From the Task Scheduler main screen, right click on the task added and click on Properties in the pop-up menu. In the Properties form presented, select the Run with highest privileges radio button as circled in red below, and click OK
At this point, the automated process to upgrade the collector is complete - it can be tested by clicking on Run in the Actions Menu (as shown by the red arrow).
Comments
Please sign in to leave a comment.