Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mgmt 3108 - use latest release image for installing SNO with bootstrap-in-place #371

Merged
merged 2 commits into from
Jan 3, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
MGMT-3108 Update BIP to use work with quay.io/eranco74/ocp-release:bo…
…otstrap-in-place release image
  • Loading branch information
eranco74 committed Jan 3, 2021
commit 9092ca3cbd90298f321a96e0836e1254ba7f519e
15 changes: 7 additions & 8 deletions discovery-infra/bootstrap_in_place.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,12 @@
SSH_KEY = os.path.join("ssh_key", "key")


def installer_generate():
logging.info("Installer generate manifests")
utils.run_command(f"{INSTALLER_BINARY} create manifests --dir={IBIP_DIR}")
def installer_generate(openshift_release_image):
logging.info("Installer generate ignitions")
# TODO delete
shutil.copy(f"{RESOURCES_DIR}/sno_manifest.yaml", os.path.join(IBIP_DIR, "openshift"))
utils.run_command(f"{INSTALLER_BINARY} create ignition-configs --dir={IBIP_DIR}")
bip_env={"OPENSHIFT_INSTALL_RELEASE_IMAGE": openshift_release_image,
"OPENSHIFT_INSTALL_EXPERIMENTAL_BOOTSTRAP_IN_PLACE": "true",
"OPENSHIFT_INSTALL_EXPERIMENTAL_BOOTSTRAP_IN_PLACE_COREOS_INSTALLER_ARGS": "/dev/vda"}
utils.run_command_with_output(f"{INSTALLER_BINARY} create ignition-configs --dir={IBIP_DIR}", env=bip_env)


def download_live_image(download_path, rhcos_version=None):
Expand Down Expand Up @@ -160,10 +159,10 @@ def execute_ibip_flow(args):
setup_files_and_folders(args, net_asset, controller.cluster_name)

utils.extract_installer(openshift_release_image, BUILD_DIR)
installer_generate()
installer_generate(openshift_release_image)

download_live_image(f"{BUILD_DIR}/installer-image.iso")
image_path = embed("installer-image.iso", "bootstrap.ign", EMBED_IMAGE_NAME)
image_path = embed("installer-image.iso", "bootstrap-in-place-for-live-iso.ign", EMBED_IMAGE_NAME)

logging.info("Starting node...")
controller.image_path = image_path
Expand Down
22 changes: 0 additions & 22 deletions discovery-infra/resources/sno_manifest.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions discovery-infra/test_infra/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ def _io_buffer_to_str(buf):
return out, err, process.returncode


def run_command_with_output(command):
def run_command_with_output(command, env=None):
with subprocess.Popen(
command, shell=True, stdout=subprocess.PIPE, bufsize=1, universal_newlines=True
command, shell=True, stdout=subprocess.PIPE, bufsize=1, universal_newlines=True, env=env,
) as p:
for line in p.stdout:
print(line, end="") # process line here
Expand Down