summaryrefslogtreecommitdiffstats
path: root/tests/lib/installers/local
blob: 50c3686fbfb756fcc22d2d19be8ae8ac6874de86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash

COMPUTE_USER=${COMPUTE_USER:-$(whoami)}
ssh_opts_cpu="$ssh_opts"

function installer_get_ssh_keys {
    echo "INSTALLER_TYPE set to 'local'. Assuming SSH keys already exchanged with $COMPUTE_HOST"
    return
}

function installer_apply_patches {
    # Noop
    return
}

function setup_installer {
    installer_get_ssh_keys
    installer_apply_patches
}

function get_compute_ip_from_hostname {
    local compute_host=$1

    if is_set COMPUTE_IP; then
        echo "Using pre-configured COMPUTE_IP=$COMPUTE_IP ..."
        return
    fi
    COMPUTE_IP=$(getent hosts "$compute_host" | awk '{ print $1 }')
    die_if_not_set $LINENO COMPUTE_IP \
        "Could not resolve $compute_host. Either manually set COMPUTE_IP or enable DNS resolution."
}

function cleanup_installer {
    # Noop
    return
}