Skip to content

Mount or create IBEX VHDs

John Holt edited this page Apr 24, 2020 · 25 revisions

Wiki > Deployment > Mount or create IBEX VHDs

Deployment

The new architecture for deployment is to deploy onto VHDs which will be copied to the desired places and linked in; this was a result of discussions of making deployment quicker.

Part of the system

System VHD

There needs to be a system VHD, this has been created by Chris and will be detailed CHRIS TODO. This contains windows and user level programs (probably including labview).

App VHD

IBEX applications needs to be placed on a disk these should be generic for all instruments. In practice hot fixes will make them different, we record hotfixes and these are reapplied on upgrade of needed.

Configuration Settings VHD

IBEX settings are placed on a setting VHD, these will be created once when the instrument is converted to use VHDs and after that this will be persisted through IBEX and Windows upgrades. On Upgrade the configuration will need to be upgrades and the common calibration files need to be updated.

Var VHD

These contain part of the system which change often. We are undecided what to do on upgrade:

  • Either: Create the VHD when migrated and on upgrade truncate the database, move old log files and old autosave files. Then upgrade the database.
  • Or: Every upgrade use a new common VHD copy across autosave files (maybe these should live in settings), dump the data schema for interesting tables and reimport it.

For the test system I have gone with the first approach because it was easy. I like the second approach better.

Cross disks

There are some things which are cross disks, e.g. the database is a service but is stored on the apps. Do these instructions live in an upgrade script? How do we unmount and mount the disks during upgrade? The upgrade process needs thinking about.

VHD Creation

Create empty VHDs

  1. Copy the three empty vhdx files (empty_apps.vhdx, empty_var.vhdx,empty_settings.vhdx) to a local disk (from CompGroup\chris) and rename to apps.vhdx, var.vhdx and settings.vhdx.
  2. These are pre-configured to be 30GB each.
  3. Fill them following the steps below and then copy back to the same place appending the release version to each disk. e.g. apps_5.1.2.vhdx.

Mount a VHD

  1. Open cmd in O3 mode
  2. diskmgmt.msc
  3. Click Action -> Attach VHD
    • I had to click help first
  4. Select location of VHD

Dismounting VHD

  1. Close the VHD and copy back
    1. Right click on drive on left at the bottom
    2. Detach VHD
    3. Copy file back to the source

VHD Contents

IBEX Apps to VHD

  1. Mount the VHD (see above)
  2. Open the mapped drive and copy the following:
    1. Copy EPICS
    2. Copy Client
    3. Copy EPICS UTILS
    4. Copy Python
    5. Copy Python3
    6. Copy ICP Binaries into EPICS
    7. Copy MySql

IBEX Settings VHD

Either:

  1. Copy current settings to VHD

Or:

  1. Follow instructions to create config and common config from the developer's setup

IBEX Var VHD

Either:

  1. Copy current var to VHD

Or:

  1. Follow instructions to create a blank database and copy that to the disk
  2. Add other directories meant to be in var from the developer's setup e.g. log, autosave

Automation Idea

To automate this I would suggest setting up a new path in the install utils. Then mount the VHD at the correct points c:\instrument and then run tasks as usual.

Clone this wiki locally