Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
EOS-22890: install script - add logic to handle local repo (#1491)
Browse files Browse the repository at this point in the history
* EOS-22890: install script - add logic to handle local repo

Signed-off-by: Pritam Bhavsar <pritam.bhavsar@seagate.com>

* fix typo

Signed-off-by: Pritam Bhavsar <pritam.bhavsar@seagate.com>

* Resolve conflicts

Signed-off-by: Pritam Bhavsar <pritam.bhavsar@seagate.com>

* Fix bugs found in testing on hw nw

Signed-off-by: Pritam Bhavsar <pritam.bhavsar@seagate.com>

* Address codacy issues

Signed-off-by: Pritam Bhavsar <pritam.bhavsar@seagate.com>

* Changes related to ISOs

Signed-off-by: Pritam Bhavsar <pritam.bhavsar@seagate.com>

* Add support of ISOs in cluster create command

Signed-off-by: Pritam Bhavsar <pritam.bhavsar@seagate.com>

* Address codacy

Signed-off-by: Pritam Bhavsar <pritam.bhavsar@seagate.com>

* Codacy issues

Signed-off-by: Pritam Bhavsar <pritam.bhavsar@seagate.com>

* Address codacy

Signed-off-by: Pritam Bhavsar <pritam.bhavsar@seagate.com>

* Bug fixes

Signed-off-by: Pritam Bhavsar <pritam.bhavsar@seagate.com>
  • Loading branch information
83bhp committed Jul 23, 2021
1 parent c6ba4b9 commit e505e25
Show file tree
Hide file tree
Showing 3 changed files with 508 additions and 376 deletions.
20 changes: 17 additions & 3 deletions lr-cli/cortx_setup/commands/cluster/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,27 @@ def run(self, **kwargs):
if not target_build:
raise ValueError("'target_build' is mandatory to bootstrap. "
"Please provide valid build URL in command.")
if target_build.startswith('file'):
#ISO based deployment
kwargs['source'] = 'iso'
kwargs['target_build'] = None

# ISO files validation
if kwargs['source'] == 'iso':
if not (kwargs['iso_cortx'] or kwargs['iso_os']):
iso_files = [fn for fn in os.listdir("/opt/isos/")
if fn.endswith('.iso')]
for name in iso_files:
if "single" in name:
ISO_SINGLE_FILE = "/opt/isos/" + name
elif "os" in name:
ISO_OS_FILE = "/opt/isos/" + name
kwargs['iso_cortx'] = ISO_SINGLE_FILE
kwargs['iso_os'] = ISO_OS_FILE
if not (os.path.isfile(ISO_SINGLE_FILE)
or os.path.isfile(ISO_OS_FILE)):
raise ValueError(
"iso single file and iso os file paths are mandatory "
"to bootstrap. Please provide valid paths in command.")
f"No Cortx ISO found:{ISO_SINGLE_FILE} & {ISO_OS_FILE}"
"Please download and keep them at /opt/isos and try again")

cluster_dict = {key:kwargs[key]
for key in kwargs if key in cluster_args}
Expand Down

0 comments on commit e505e25

Please sign in to comment.