Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 0 additions & 68 deletions installation_and_upgrade/Jenkinsfile_vhd_creation

This file was deleted.

64 changes: 0 additions & 64 deletions installation_and_upgrade/Jenkinsfile_vhd_release_creation

This file was deleted.

84 changes: 6 additions & 78 deletions installation_and_upgrade/ibex_install_utils/install_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from ibex_install_utils.tasks.python_tasks import PythonTasks
from ibex_install_utils.tasks.server_tasks import ServerTasks
from ibex_install_utils.tasks.system_tasks import SystemTasks
from ibex_install_utils.tasks.vhd_tasks import VHDTasks
from ibex_install_utils.user_prompt import UserPrompt


Expand Down Expand Up @@ -81,15 +80,6 @@ def __init__(
file_utils,
)

self._vhd_tasks = VHDTasks(
user_prompt,
server_source_dir,
client_source_dir,
genie_python3_dir,
ibex_version,
file_utils,
)

self._backup_tasks = BackupTasks(
user_prompt,
server_source_dir,
Expand Down Expand Up @@ -291,60 +281,6 @@ def run_developer_update(self) -> None:
self._system_tasks.create_virtual_envs()
self._system_tasks.update_rust()

def run_vhd_creation(self) -> None:
"""Automated job which creates a set of VHDs containing all IBEX components.

Note: this will run under jenkins, don't add interactive tasks to this list.
"""
# To try to start from a clean state if we already have partially mounted VHDs
self._vhd_tasks.request_dismount_vhds()

self._vhd_tasks.copy_vhds_to_local_area()
self._vhd_tasks.request_mount_vhds()
try:
self._server_tasks.install_ibex_server()
self._python_tasks.install_genie_python3()
self._mysql_tasks.install_mysql_for_vhd()
self._client_tasks.install_ibex_client()
self._server_tasks.setup_config_repository()

# Some config upgrade steps require MySQL to be running
# For the VHD build, we can always assume we have a MYSQL_PASSWORD env variable
mysql_password = os.getenv("MYSQL_PASSWORD")
if mysql_password is None:
raise Exception("MYSQL_PASSWORD environment variable not set")
with self._mysql_tasks.temporarily_run_mysql(mysql_password):
self._server_tasks.upgrade_instrument_configuration()

self._server_tasks.setup_calibrations_repository()
self._server_tasks.update_calibrations_repository()
self._vhd_tasks.initialize_var_dir()
finally:
self._vhd_tasks.request_dismount_vhds()

self._vhd_tasks.deploy_vhds()

def mount_vhds(self) -> None:
"""Task which actually mounts the VHDs (will be run as admin)"""
self._vhd_tasks.mount_vhds()

def dismount_vhds(self) -> None:
"""Task which actually dismounts the VHDs (will be run as admin)"""
self._vhd_tasks.dismount_vhds()

def request_dismount_vhds(self) -> None:
"""Standalone task to request VHDs to be dismounted"""
self._vhd_tasks.request_dismount_vhds()

def run_vhd_post_install(self) -> None:
"""This job is run by the MDT build system when it has built
a windows image and mounted the VHDS
It will tidy up and remaining jobs that were not possible when
the vdh was created e.g. register mysql service
"""
# self._server_tasks.update_icp(self.icp_in_labview_modules())
self._mysql_tasks.configure_mysql_for_vhd_post_install()


# All possible upgrade tasks
UPGRADE_TYPES = {
Expand Down Expand Up @@ -401,20 +337,12 @@ def run_vhd_post_install(self) -> None:
UpgradeInstrument.run_update_journal_parser,
"update journal parser",
),
"developer_update": (UpgradeInstrument.run_developer_update, "install latest developer tools"),
"create_vhds": (
UpgradeInstrument.run_vhd_creation,
"create a set of VHDS containing the latest IBEX release",
),
"mount_vhds": (UpgradeInstrument.mount_vhds, "task to mount VHDs if needed"),
"dismount_vhds": (UpgradeInstrument.dismount_vhds, "task to dismount VHDs if needed"),
"request_dismount_vhds": (
UpgradeInstrument.request_dismount_vhds,
"task to request a dismount of VHDs if needed",
"developer_update": (
UpgradeInstrument.run_developer_update,
"install latest developer tools",
),
"run_vhd_post_install": (
UpgradeInstrument.run_vhd_post_install,
"Run final task on system after VHD has been mounted locally",
"save_motor_params": (
UpgradeInstrument.save_motor_params,
"Save motor parameters to csv file",
),
"save_motor_params": (UpgradeInstrument.save_motor_params, "Save motor parameters to csv file"),
}
Loading
Loading