Beispiel #1
0
def _link_to_troubleshooting() -> None:
    """
    Link to documentation for further troubleshooting.
    """
    message = (
        'If you continue to experience problems, more information is '
        'available at '
        'http://dcos-e2e.readthedocs.io/en/latest/docker-backend.html#troubleshooting'  # noqa: E501
        '.')

    info(message=message)
Beispiel #2
0
def _check_memory() -> CheckLevels:
    """
    Show information about the memory available to Docker.
    """
    client = docker_client()
    docker_memory = client.info()['MemTotal']
    docker_for_mac = bool(client.info()['OperatingSystem'] == 'Docker for Mac')
    message = (
        'Docker has approximately {memory:.1f} GB of memory available. '
        'The amount of memory required depends on the workload. '
        'For example, creating large clusters or multiple clusters requires '
        'a lot of memory.\n'
        'A four node cluster seems to work well on a machine with 9 GB '
        'of memory available to Docker.').format(memory=docker_memory / 1024 /
                                                 1024 / 1024)
    mac_message = ('\n'
                   'To dedicate more memory to Docker for Mac, go to '
                   'Docker > Preferences > Advanced.')
    if docker_for_mac:
        message += mac_message

    info(message=message)
    return CheckLevels.NONE