att-comdev / halcyon-kubernetes

Ansible playbooks for a kubadm-based kubernetes deployment, on supporting any cloud and any kubeadm-enabled OS.
Apache License 2.0
35 stars 22 forks source link

feat: Use a venv with halcyon #46

Closed retr0h closed 7 years ago

retr0h commented 7 years ago

The instructions require a minimum version of Ansible. Enforce these dependencies through a venv. Particularly useful when switching between halcyon and other projects. Also, useful for the future as Halcyon expands, and may require additional pypi dependencies.


This change is Reviewable

v1k0d3n commented 7 years ago

@retr0h very nice addition, and very welcome! thank you for checking out, using and submitting to the project. LGTM

aric49 commented 7 years ago

Testing your changes locally, i am getting the following errors when I run make.. Looks like the virtualenv might require setuptools to run?

aric@host:~/tmp/halcyon-kubernetes$ make
if [ ! -d venv ]; then \
    virtualenv --no-setuptools venv; \
fi
New python executable in /home/aric/tmp/halcyon-kubernetes/venv/bin/python
Installing pip, wheel...done.
. venv/bin/activate; pip install -r requirements.txt
Collecting ansible==2.2.1 (from -r requirements.txt (line 1))
  Using cached ansible-2.2.1.0.tar.gz
Could not import setuptools which is required to install from a source distribution.
Please install setuptools.
Makefile:4: recipe for target 'venv/bin/activate' failed
make: *** [venv/bin/activate] Error 1

I have the following versions of setuptools and virtualenv on my laptop in my parent Python installation:

virtualenv (15.1.0)
setuptools (26.1.1)
v1k0d3n commented 7 years ago

@aric49 where are we on the jenkins pipeline for Halcyon? i think the team is ready to add this back, correct?

retr0h commented 7 years ago

Testing your changes locally, i am getting the following errors when I run make.. Looks like the virtualenv might require setuptools to run?

This looks more like a problematic python/pip/venv environment than a problem with this patchset.

aric49 commented 7 years ago

@retr0h -- I wouldn't be surprised if this was an issue on my end... I've had a lot of issues with Python/Pip dependencies on my workstation. @v1k0d3n Can you validate this works for you, and if so, then we can merge.

I retract my last comment. I got the venv configuration running by uninstalling and re-installing the virtualenv pip package:

pip uninstall virtualenv; pip install virtualenv

LGTM. Good to merge.

v1k0d3n commented 7 years ago

thanks for the update. LGTM.