Rename `initialize` function to `_initialize`

Since we removed the need to call the `initialize` function in the
previous patch, we can make it private.

Signed-off-by: Pang Yan Han <yanhan@viki.com>
Create `get_return_value_from_result_of_execute_runs_once` function

This allows us to retrieve the return value from a local Fabric task
decorated with the `fabric.decorators.runs_once` and run using the
`fabric.tasks.execute` function.

Signed-off-by: Pang Yan Han <yanhan@viki.com>
Add `viki.fabric.docker` module

This module contains Docker related Fabric tasks which will help
simplify future development for people authoring Docker related Fabric
scripts.

Signed-off-by: Pang Yan Han <yanhan@viki.com>
Rename `initialize` function to `_initialize`

Since we removed the need to call the `initialize` function in the
previous patch, we can make it private.

Signed-off-by: Pang Yan Han <yanhan@viki.com>
Use global `VIKI_FABRIC_CONFIG_KEY_NAME` to hold `viki_fabric_config` string

The global is housed in `viki/fabric/__init__.py`; eventually direct
access of the `env.viki_fabric_config` dict should be replaced using
helper functions.

Signed-off-by: Pang Yan Han <yanhan@viki.com>
viki.fabric.helpers - create `get_in_viki_fabric_config` function

This is used to retrieve values read from the `viki_fabric_config.yml`
file under the `viki.fabric.VIKI_FABRIC_CONFIG_KEY_NAME` key.

Signed-off-by: Pang Yan Han <yanhan@viki.com>
viki.fabric.helpers - add `env_has_nested_keys` function

This allows us to determine if a series of nested keys exists within
`fabric.api.env`

Signed-off-by: Pang Yan Han <yanhan@viki.com>
viki.fabric.helpers - add `get_in_env` function

and write `get_in_viki_fabric_config` in terms of `get_in_env`.

Signed-off-by: Pang Yan Han <yanhan@viki.com>
Check that all expected keys exist in env[VIKI_FABRIC_CONFIG_KEY_NAME]["viki.fabric.git"]

by using `assert`

Signed-off-by: Pang Yan Han <yanhan@viki.com>
viki.fabric.git - add `_` prefix to private globals

Signed-off-by: Pang Yan Han <yanhan@viki.com>
Add documentation on configuring viki-fabric-helpers library

Signed-off-by: Pang Yan Han <yanhan@viki.com>
viki.fabric.docker - Reword parts of docstrings for Fabric tasks

Signed-off-by: Pang Yan Han <yanhan@viki.com>
Add short guide to `viki.fabric.docker` module

Signed-off-by: Pang Yan Han <yanhan@viki.com>
Add link to Example Script that shows usage of a helper function

This concrete example should explain things a lot better than the
original docstring.

Signed-off-by: Pang Yan Han <yanhan@viki.com>
viki.fabric.docker - try docker push and pull without docker login

before resorting to using `docker login` on failure. This is because
`docker login` at minimum, requires the user to press the Enter key when
he/she is already logged in to the Docker registry.

Signed-off-by: Pang Yan Han <yanhan@viki.com>