I just added a key, and made an API access token, in DO and tried to spin up a instance, and yet, I got this error:
ITASK [genesis-digitalocean : Add the SSH key to DigitalOcean if it doesn't already exist] ***
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "dopy >= 0.3.2 required for this module"}
TASK [genesis-digitalocean : fail] *********************************************
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "* The API Access Token might be incorrect or missing the Write Scope. OR * The SSH key may already exist in the DigitalOcean Control Panel under a different name. OR * The dopy Python module might not be installed. Use `pip install dopy==0.3.5` to install this module. On the latest version of OS X, dopy > 0.3.5 is currently broken."}
to retry, use: --limit @/home/dave/Repos/streisand/playbooks/digitalocean.retry
PLAY RECAP *********************************************************************
localhost : ok=3 changed=1 unreachable=0 failed=1
I then made a new API token and SSH key, and got the same response. What could be happening here?
Please describe your problem in greater detail. Provide any relevant logs or screenshots.
Crap, sorry. I accidentally hit enter.
Fixed now.
Have you checked the dopy dependency?
Yes, both python2 and python3 have the most recent version. I even updated ansible for good measure.
Have you used two different ssh key names when setting up instances? Check your DigitalOcean Settings > Security and make sure only an appropriately named SSH key that matches the one in your user directory is there.
I recommend deleting any keys created by Streisand and starting over if you're unsure.
DigitalOcean only has one ssh key that I made: setone
And my .ssh directory only has four files:
id_rsa id_rsa.pub known_hosts known_hosts.old
I just set this up on DO and had the same problem. Make sure that your python install path and dopy (and other pip packages) are symlinked. That fixed it for me. The ssh key on DO should match your id_rsa.pub try cat ~/.ssh/id_rsa.pub and verify this.
symlinked
Is there a tutorial on this?
See http://stackoverflow.com/questions/13354207/how-to-symlink-python-in-homebrew
TLDR: run brew link --overwrite python if you're using a Homebrew version of python
It said 'brew' wasn't a valid command:
No command 'brew' found, did you mean:
Command 'qbrew' from package 'qbrew' (universe)
Command 'brec' from package 'bplay' (universe)
brew: command not found
brew is an OS X thing - I think you're on Ubuntu?
Yes.
Don't bother with the symlinking. Use virtualenv instead. Here's what worked for me:
% cd streisand
# Create a python2 virtual environment.
# On Arch, this is in `extra/python2-virtualenv`.
# On Ubuntu, I believe it's in `python-virtualenv` and is named `virtualenv.py`.
% virtualenv2 .
# Enter the virtual environment. This step might be different depending on your shell.
% source bin/activate
% pip install dopy six
% ./streisand
I also had this issue. I'm on OS X, but using MacPorts instead of Homebrew. What solved it for me was:
sudo port select python python27
(You can check the currently selected version with port select python, and what I had before running the command above was none.)
I believe this issue is sufficiently stale to be unactionable. If you're still having problems using the code from master I recommend you open a new issue providing the details requested by the issue template. Thanks!
Using anaconda instead of virtualenv2 on modern Mac OS
brew cask install caskroom/cask/anaconda
cd streisand
conda create -n streisand pip
source activate streisand
pip install dopy six ansible
./streisand
I had to specify Python 2.7 to get it work, so updated script
cd streisand
conda create -n streisand python=2.7 pip
source activate streisand
pip install dopy six ansible
./streisand
Most helpful comment
Don't bother with the symlinking. Use virtualenv instead. Here's what worked for me: