Skip to content
Open
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
17 changes: 6 additions & 11 deletions installation_and_upgrade/ibex_install_utils/install_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,12 @@ def run_test_update(self) -> None:
self._mysql_tasks.install_mysql()
self._server_tasks.upgrade_instrument_configuration()
self._server_tasks.install_wiring_tables()
self._client_tasks.install_ibex_client()
self._system_tasks.upgrade_notepad_pp()
self._server_tasks.setup_log_rotation()
self._server_tasks.update_journal_parser()

def remove_all_and_install_client_and_server(self) -> None:
"""Either install or upgrade the ibex client and server"""
def remove_all_and_install_uktena_and_server(self) -> None:
"""Either install or upgrade the ibex server"""
self._system_tasks.confirm(
"This script removes IBEX client and server and installs "
"the latest build of both, and upgrade the "
Expand All @@ -149,7 +148,6 @@ def remove_all_and_install_client_and_server(self) -> None:
self._server_tasks.install_ibex_server(use_old_galil)
self._server_tasks.update_icp(self.icp_in_labview_modules(), register_icp=False)
self._python_tasks.install_genie_python3()
self._client_tasks.install_ibex_client()
self._server_tasks.upgrade_instrument_configuration()
self._server_tasks.install_shared_scripts_repository()

Expand All @@ -176,7 +174,6 @@ def run_instrument_install(self) -> None:
self._server_tasks.update_icp(self.icp_in_labview_modules())
self._python_tasks.install_genie_python3()
self._mysql_tasks.install_mysql()
self._client_tasks.install_ibex_client()
self._git_tasks.checkout_to_release_branch()
self._server_tasks.setup_config_repository()
self._server_tasks.upgrade_instrument_configuration()
Expand Down Expand Up @@ -239,7 +236,6 @@ def run_instrument_deploy_main(self) -> None:
self._python_tasks.install_genie_python3()
self._mysql_tasks.install_mysql()
self._system_tasks.install_or_upgrade_vc_redist()
self._client_tasks.install_ibex_client()
self._git_tasks.checkout_to_release_branch()
self._server_tasks.upgrade_instrument_configuration()
self._server_tasks.update_shared_scripts_repository()
Expand Down Expand Up @@ -305,7 +301,6 @@ def run_vhd_creation(self) -> None:
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
Expand Down Expand Up @@ -370,12 +365,12 @@ def run_vhd_post_install(self) -> None:
"instrument_deploy part after the start of instrument",
),
"install_latest_incr": (
UpgradeInstrument.remove_all_and_install_client_and_server,
"install just the latest incremental build of the server, client and genie_python",
UpgradeInstrument.remove_all_and_install_uktena_and_server,
"install just the latest incremental build of the server and uktena",
),
"install_latest": (
UpgradeInstrument.remove_all_and_install_client_and_server,
"install just the latest clean build of the server, client and genie_python",
UpgradeInstrument.remove_all_and_install_uktena_and_server,
"install just the latest clean build of the server and uktena",
),
"update_icp": (
UpgradeInstrument.run_update_icp,
Expand Down
40 changes: 13 additions & 27 deletions installation_and_upgrade/ibex_install_utils/tasks/client_tasks.py
Original file line number Diff line number Diff line change
@@ -1,61 +1,47 @@
import os
import subprocess

from ibex_install_utils.run_process import RunProcess
from ibex_install_utils.task import task
from ibex_install_utils.tasks import BaseTasks
from ibex_install_utils.tasks.common_paths import APPS_BASE_DIR, GUI_PATH
from ibex_install_utils.tasks.common_paths import GUI_PATH


class ClientTasks(BaseTasks):
@task("Installing IBEX Client with builtin python")
def install_ibex_client(self):
"""
Install the ibex client with builtin python.

"""
self._install_set_version_of_ibex_client(self._client_source_dir)

def _install_set_version_of_ibex_client(self, source_dir):
"""
Install a given version of the Ibex client.
Args:
source_dir: source directory for the client
"""
self._file_utils.mkdir_recursive(APPS_BASE_DIR)

RunProcess(source_dir, "install_gui_with_builtin_python.bat", prog_args=["NOINT"]).run()

@task("Starting IBEX gui")
def start_ibex_gui(self):
def start_ibex_gui(self) -> None:
"""
Start the IBEX GUI
:return:
"""
subprocess.Popen([os.path.join(GUI_PATH, "ibex-client.exe")], cwd=GUI_PATH)

@task("Client release tests")
def perform_client_tests(self):
def perform_client_tests(self) -> None:
"""
Test that the client works
"""
self.prompt.prompt_and_raise_if_not_yes(
"Check that the version displayed in the client is as expected after the deployment"
)
self.prompt.prompt_and_raise_if_not_yes(
"Confirm that genie_python works from within the client and via genie_python.bat (this includes "
"Confirm that genie_python works from within the client and via genie_python.bat (this "
"includes "
"verifying that the 'g.' and 'inst.' prefixes work as expected)"
"If the font cannot be seen in the genie_python.bat change default terminal colours to white on black."
"If the font cannot be seen in the genie_python.bat change default terminal colours"
" to white on black."
)
self.prompt.prompt_and_raise_if_not_yes(
"Verify that the current configuration is consistent with the system prior to upgrade"
)
self.prompt.prompt_and_raise_if_not_yes(
"Verify that all the links from the 'Weblinks' perspective still work (i.e. the address gets resolved)"
"Verify that all the links from the 'Weblinks' perspective still work (i.e. the address"
" gets resolved)"
)
self.prompt.prompt_and_raise_if_not_yes(
"Verify that the dashboard gives the instrument name with no NDX prefix (if it does switch to the current instrument)"
"Verify that the dashboard gives the instrument name with no NDX prefix (if it does"
" switch to the current instrument)"
)
self.prompt.prompt_and_raise_if_not_yes(
"Verify that the server status is showing as UP (the DAE might be off causing it to be PARTIAL, this is acceptable)"
"Verify that the server status is showing as UP (the DAE might be off causing it to be"
" PARTIAL, this is acceptable)"
)
Original file line number Diff line number Diff line change
Expand Up @@ -466,11 +466,6 @@ def user_confirm_upgrade_type_on_machine(self, machine_type: str) -> None:
)
print(f" Server source: {self._server_source_dir}")
print(f" version: {server_version}")
client_version = self._read_file(
os.path.join(self._client_source_dir, "Client", "VERSION.txt"), "UNKNOWN"
)
print(f" Client source: {self._client_source_dir}")
print(f" version: {client_version}")
python_version = self._read_file(
os.path.join(self._genie_python_3_source_dir, "VERSION.txt"), "UNKNOWN"
)
Expand Down
Loading