def install_pre_req()

in bicep/files-to-load/cyclecloud_install.py [0:0]


def install_pre_req():
    print("Installing pre-requisites for CycleCloud server")

    # not strictly needed, but it's useful to have the AZ CLI
    # Taken from https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-yum?view=azure-cli-latest

    if "ubuntu" in str(platform.platform()).lower():
        _catch_sys_error(["apt", "update", "-y"])
        _catch_sys_error(["apt", "install", "-y", "openjdk-8-jre-headless"])
        _catch_sys_error(["apt", "install", "-y", "unzip"])
        _catch_sys_error(["apt", "install", "-y", "python3-venv"])
        _catch_sys_error(["apt", "install", "-y", "azure-cli"])
    else:
        _catch_sys_error(["yum", "install", "-y", "java-1.8.0-openjdk-headless"])
        _catch_sys_error(["yum", "install", "-y", "azure-cli"])