Last active
October 19, 2017 11:43
-
-
Save AnneTheAgile/22f641b41a99482b5065 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Mac/64 version ansible 1.6.2 | |
# https://binstar.org/annetheagile/ansible | |
# 2014-06-04Wed15:18:02 | |
# 2014-07-08Tue12:18:42 Add- create new env info | |
# What is there now? | |
$ conda info -e | |
aws-boto-ansible ~/anaconda/envs/aws-boto-ansible | |
root * ~/anaconda | |
# Create a fresh environment | |
$ conda create -p ~/anaconda/envs/pymongo anaconda python=2.7 | |
# Rename the folder if desired to later rename, eg pymongo-bottle | |
$ source activate ~/anaconda/envs/pymongo | |
# IFF Hardware compatible, eg; Google: site:binstar.org mac aPkg | |
$ conda install -c https://conda.binstar.org/annetheagile pymongo | |
$ conda install -c https://conda.binstar.org/annetheagile bottle | |
$ python | |
Python 2.7.8 |Anaconda 2.0.1 (x86_64)| (default, Jul 2 2014, 15:36:00) | |
>>> import bottle | |
>>> print (bottle.__version__) | |
0.12.7 | |
>>> import pymongo | |
>>> print (pymongo.version) | |
2.7 | |
# How to create Conda packages from pypi | |
# Example: | |
# https://pypi.python.org/pypi/ansible. | |
# Instructions: | |
# Environment; Mac osx 10.9.3, 64-bit | |
$ which python | |
~/anaconda/bin/python | |
$ python --version | |
Python 2.7.6 :: Anaconda 2.0.0 (x86_64) | |
$ conda --version | |
conda 3.5.2 | |
$ conda info -e | |
aws-boto-ansible ~/anaconda/envs/aws-boto-ansible | |
root * ~/anaconda | |
$ source activate aws-boto-ansible | |
...prepending ~/anaconda/envs/aws-boto-ansible/bin to PATH | |
$ conda info -e | |
# conda environments: | |
aws-boto-ansible * ~/anaconda/envs/aws-boto-ansible | |
root ~/anaconda | |
# Prep: Make and install 1 other Pypi package dependency that is not in anaconda; | |
# httplib2 | |
$ # for pypi package, conda knows their names | |
$ conda skeleton pypi ansible | |
$ sudo conda build ansible | |
Password: | |
BUILD START: ansible-1.6.2-py27_0 | |
Fetching package metadata: ... | |
Solving package specifications: . | |
The following packages will be linked: | |
package | build | |
---------------------------|----------------- | |
ecdsa-0.11 | py27_0 hard-link | |
jinja2-2.7.2 | py27_0 hard-link | |
markupsafe-0.18 | py27_0 hard-link | |
openssl-1.0.1g | 0 hard-link | |
paramiko-1.14.0 | py27_0 hard-link | |
pycrypto-2.6.1 | py27_0 hard-link | |
python-2.7.7 | 0 hard-link | |
pyyaml-3.11 | py27_0 hard-link | |
readline-6.2 | 2 hard-link | |
setuptools-3.6 | py27_0 hard-link | |
sqlite-3.8.4.1 | 0 hard-link | |
tk-8.5.15 | 0 hard-link | |
yaml-0.1.4 | 1 hard-link | |
zlib-1.2.7 | 1 hard-link | |
... | |
===== ansible-1.6.2-py27_0 OK ===== | |
TEST END: ansible-1.6.2-py27_0 | |
# If you want to upload this package to binstar.org later, type: | |
# $ binstar upload /Users/annemoroney/anaconda/conda-bld/osx-64/ansible-1.6.2-py27_0.tar.bz2 | |
# To have conda build upload to binstar automatically, use | |
# $ conda config --set binstar_upload yes | |
$ binstar upload ~/anaconda/conda-bld/osx-64/ansible-1.6.2-py27_0.tar.bz2 | |
# GOTCHA's | |
# Cannot do standard install | |
# $ conda install ansible | |
# Need its dependencies first | |
# Don't do #1 of 2 | |
$ conda build --build-recipe ansible | |
...conda-build: error: unrecognized arguments: --build-recipe | |
# Don't do #2 of 2 | |
$ conda build ansible | |
...creating /usr/share/ansible | |
error: could not create '/usr/share/ansible': Permission denied |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Urls;
[1] Input; https://pypi.python.org/pypi/ansible
[1A] Source code; https://github.com/ansible/ansible
[2] Output; https://binstar.org/annetheagile/ansible
Docs that Helped;
[] Blog about Pypi to Conda conversions; http://www.peterbronez.com/Using%20PyPi%20Packages%20with%20Conda
[] Google search the binstar site, which enables seeking particular versions. Here, 2.29 doesn't exist but 2.23 does:
site:https://binstar.org/ boto 2.23
https://www.google.com/search?q=site%3Ahttps%3A%2F%2Fbinstar.org%2F+boto+2.23&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a#
[] A confusing thread but one that did confirm the above. http://stackoverflow.com/questions/18640305/how-to-keep-track-of-pip-installed-packages-in-an-anaconda-conda-env
Docs that did Not help; //FUTURE - help edit the docs
[] Binstar Search is mostly unhelpful, unless there are very few packages. The reason is that
https://binstar.org/search?q=ansible
[] Binstar Docs / Installing Conda packages. I couldn't get the syntax to work ; http://docs.binstar.org/conda.html
[] This 'Binstar' repo offers to let you install by pip, which is not helpful since I went to Binstar to install by conda; https://binstar.org/pypi/ansible
FUTURE;
[1B] Running from source might be recommended; http://docs.ansible.com/intro_installation.html#getting-ansible
Ansible is trivially easy to run from a checkout, root permissions are not required to use it and there is no software to actually install for Ansible itself. No daemons or database setup are required. Because of this, many users in our community use the development version of Ansible all of the time,
[] Ansible Examples, included in repo; https://github.com/ansible/ansible-examples/tree/master/hadoop
[] Ansible Galaxy, for Jenkins; https://galaxy.ansible.com/list#/roles/440
This role was created in 2014 by Jeff Geerling (@geerlingguy), author of Ansible for DevOps. You can find out more about the book at http://ansiblefordevops.com/, and learn about the author at http://jeffgeerling.com/.
[] Ansible-Vagrant helper; be able to update, ping hosts. Updated 20d ago.
https://github.com/michaelcontento/ansible-vagrant
$ ansible-vagrant-update-hosts
[]On conda;
https://binstar.org/pypi/ansible-vagrant
PAST / Related;
[] httplib2 is A comprehensive HTTP client library in Python
http://code.google.com/p/httplib2/wiki/Examples
import httplib2
h = httplib2.Http(".cache")
resp, content = h.request("http://example.org/", "GET")
OTHER / Slightly Related;
Vagrant
[] Vagrant Docs ; https://docs.vagrantup.com/v2/providers/basic_usage.html
[] 2014.01 Vagrant / Ansible / Ec2 tutorial by Cloud Scaleable startups blog; http://www.iheavy.com/2014/01/16/how-to-deploy-on-amazon-ec2-with-vagrant/
[] 2013.11 Vagrant / Ansible / Hadoop ; http://leonidmirsky.com/ansible/hadoop/devops/2013/11/19/creating-hadoop-test-environment-with-ansible-and-vagrant.html
[] 2013.08 Vagrant Synced Folders Permissions ; http://jeremykendall.net/2013/08/09/vagrant-synced-folders-permissions/
[] 2014.02 Vagrant / Docker Tutorial for Mac ; http://johnzanchetta.wordpress.com/2014/02/08/setting-up-a-docker-dev-environment-on-mac-os-x/