azavea / pfb-network-connectivity

PFB Bicycle Network Connectivity
Other
40 stars 11 forks source link

Fix pip installation and remove azavea.pip ansible role #828

Closed KlaasH closed 3 years ago

KlaasH commented 3 years ago

Overview

The URL of the 'get-pip.py' script now has a version number, which broke provisioning. In two places, actually, since we need pip at the very beginning to install Ansible inside the VM, then we also had the Azavea pip role being used by the Azavea aws-cli role.

Having a second place where we install pip, especially one that's very simple but not very actively maintained, isn't worth it. So this clones the aws-cli role into a local role and drops the dependency on the pip role. Since pip is installed in the Vagrantfile provisioning, it will always be there.

Also, Ansible still wants to use Python 2 by default, but that's no good. Not that the VM is a user-facing environment, but we already upgraded most of this project and it doesn't make sense to keep using Python 2 if we don't have to. This makes sure Ansible and the AWS CLI both get installed in Python 3.

Notes

Testing Instructions

Checklist

Resolves #827

kevinearldenny commented 3 years ago

@KlaasH I'm still running into some issues here when trying to build a new container locally - see logs attached setup.log

KlaasH commented 3 years ago

I forgot about the new group_var. I've updated the comment above.

It would be nice if there were a tracked all file and the environment-specific variables lived in a different tracked-example/untracked-file pair. But probably transitioning to that would be overkill for a file that changes pretty seldom and only causes some mild temporary confusion when we miss copying over a change.

kevinearldenny commented 3 years ago

Okay, it looks like after copying over the ansible_python_interpreter variable this is working good. 👍