# Shade not available via yum?

**URL:** <https://forum.ansible.com/t/shade-not-available-via-yum/22628>\
**Category:** Ansible Project\
**Created:** [September 23, 2016, 3:17pm UTC](https://forum.ansible.com/t/shade-not-available-via-yum/22628 "2016-09-23T15:17:19Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Richard\_Eggert](https://avatars.discourse-cdn.com/v4/letter/r/d9b06d/32.png) [@Richard\_Eggert](https://forum.ansible.com/u/Richard_Eggert)\
**Post date:** [September 23, 2016, 3:17pm UTC](https://forum.ansible.com/t/shade-not-available-via-yum/22628/1 "2016-09-23T15:17:19Z")

</div>

I installed Ansible using yum on CentOS 6.8 via a corporate mirror of EPEL. However, when I attempted to use the os\_server module to interact with the OpenStack API, it failed saying that “shade” is required. When I went to install Shade via Yum, I discovered to my horror and dismay that Shade (python-shade) is not available from EPEL, making it impossible to install via Yum. I attempted to install it via pip but quickly fell into the ninth circle of Python Dependency Hell.

How could Ansible be available via EPEL while not also making available one of the libraries that a module it ships with depends upon? Was this an oversight?

---

<div class="post-metadata">

**Author:** ![David\_Shrewsbury1](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@David\_Shrewsbury1](https://forum.ansible.com/u/David_Shrewsbury1)\
**Post date:** [September 23, 2016, 5:12pm UTC](https://forum.ansible.com/t/shade-not-available-via-yum/22628/2 "2016-09-23T17:12:52Z")

</div>

Ansible isn’t responsible for packaging and shipping of the libraries that the  
modules may use. Shade isn’t packaged on Centos or EPEL simply because  
no one from the community has stepped up to make those packages available.  
It is available on Ubuntu and Fedora distributions, but that doesn’t help you  
unfortunately.

Installing it via pip was the right thing for you to do in your circumstance, but  
I’m curious as the “Python Dependency Hell” you mentioned. Could you elaborate  
on that a bit (if nothing else just to satisfy my curiosity)?

-Dave

---

<div class="post-metadata">

**Author:** ![Richard\_Eggert](https://avatars.discourse-cdn.com/v4/letter/r/d9b06d/32.png) [@Richard\_Eggert](https://forum.ansible.com/u/Richard_Eggert)\
**Post date:** [September 23, 2016, 5:49pm UTC](https://forum.ansible.com/t/shade-not-available-via-yum/22628/3 "2016-09-23T17:49:58Z")

</div>

The first thing I ran into was a conflict with the installed version of pbr.

To get around this, I set up a virtualenv, and tried installing into that.

I then went down a rabbit hole of dealing with a few dozen transitive dependencies, at least a few of which required me to install gcc in order to install them.

In a few cases, I found that the latest installed version of a transitive dependency depended on a newer version of another library than what was available from the corporate Pypi mirror. I got around these issues by manually specifying older versions of the libraries that had such dependencies.

I managed to get pretty far like this, until pip tried to install cffi, which resulted in a compilation error from gcc:  
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe2 in position 75: ordinal not in range(128)

I then tried setting the environment variable LC\_ALL=C as I had seen suggested in various places. This resulted in another error:

‘FFI\_DEFAULT\_ABI’ undeclared

Another Google search later, and I yum installed libffi-devel and tried again. cffi installed successfully.

I then attempted to install shade again. This resulted in dozens of compilation errors from \_openssl.c while attempting to transitively install the cryptography library.

I had no idea what to do at this point and gave up.

~Rich

---

<div class="post-metadata">

**Author:** ![David\_Shrewsbury1](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@David\_Shrewsbury1](https://forum.ansible.com/u/David_Shrewsbury1)\
**Post date:** [September 23, 2016, 5:55pm UTC](https://forum.ansible.com/t/shade-not-available-via-yum/22628/4 "2016-09-23T17:55:37Z")

</div>

Oh yuck.

Yeah, mixing distribution packages with pip packages can get really ugly, especially  
as the operating system distribution gets older and package versions get further apart.

-Dave

---

<div class="post-metadata">

**Author:** ![John\_Favorite](https://avatars.discourse-cdn.com/v4/letter/j/ba9def/32.png) [@John\_Favorite](https://forum.ansible.com/u/John_Favorite)\
**Post date:** [September 23, 2016, 6:06pm UTC](https://forum.ansible.com/t/shade-not-available-via-yum/22628/5 "2016-09-23T18:06:37Z")

</div>

I just go pip route when it comes to ansible. Here is my vagrant repo to get you up and running for anyone interested (if nothing else but to cheat off)

[https://github.com/OldCrowEW/vagrant-ansible](https://github.com/OldCrowEW/vagrant-ansible)

---

<div class="post-metadata">

**Author:** ![Richard\_Eggert](https://avatars.discourse-cdn.com/v4/letter/r/d9b06d/32.png) [@Richard\_Eggert](https://forum.ansible.com/u/Richard_Eggert)\
**Post date:** [September 23, 2016, 6:10pm UTC](https://forum.ansible.com/t/shade-not-available-via-yum/22628/6 "2016-09-23T18:10:38Z")

</div>

I also tried forgoing the virtualenv insanity and just upgrading (via pip) the pbr library in site-packages (which was installed via yum). I was able to upgrade it (to 1.10.0), but when I went to install shade, pip didn’t seem to recognize that pbr had been upgraded (it still gave me the same “pbr\>=1.8” dependency failure). I even tried installing pbr 1.8.0 specifically, to no avail.

~ Rich

---

<div class="post-metadata">

**Author:** ![Richard\_Eggert](https://avatars.discourse-cdn.com/v4/letter/r/d9b06d/32.png) [@Richard\_Eggert](https://forum.ansible.com/u/Richard_Eggert)\
**Post date:** [September 23, 2016, 6:21pm UTC](https://forum.ansible.com/t/shade-not-available-via-yum/22628/7 "2016-09-23T18:21:45Z")

</div>

Installing everything via pip didn’t work either. I still wound up with the same error when attempting to install cryptography.

I guess I’ll be stuck using shell commands to interact with OpenStack. :-/

---

<div class="post-metadata">

**Author:** ![John\_Favorite](https://avatars.discourse-cdn.com/v4/letter/j/ba9def/32.png) [@John\_Favorite](https://forum.ansible.com/u/John_Favorite)\
**Post date:** [September 23, 2016, 6:30pm UTC](https://forum.ansible.com/t/shade-not-available-via-yum/22628/8 "2016-09-23T18:30:35Z")

</div>

Richard,

Could you dump your ~/.bash\_history ? I have had to work around this issue too. Perhaps we can find a working solution with help from this mailing list.

---

<div class="post-metadata">

**Author:** ![Richard\_Eggert](https://avatars.discourse-cdn.com/v4/letter/r/d9b06d/32.png) [@Richard\_Eggert](https://forum.ansible.com/u/Richard_Eggert)\
**Post date:** [September 23, 2016, 7:38pm UTC](https://forum.ansible.com/t/shade-not-available-via-yum/22628/9 "2016-09-23T19:38:42Z")

</div>

Unfortunately, that’s not an option. I’m working on a private network, and that sort of thing would not meet the approval of the Network Nazis.

I can try reproducing the problem at home, though I might not be able to, since it’s a different OS (Ubuntu instead of CentOS) with a different network environment (direct Internet access instead of a corporate enclave).

~Rich.

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [September 23, 2016, 7:39pm UTC](https://forum.ansible.com/t/shade-not-available-via-yum/22628/10 "2016-09-23T19:39:34Z")

</div>

Here is what is required:

yum install -y epel-release  
yum install -y python-pip python-devel libffi-devel openssl-devel gcc  
pip install -U pip  
pip install shade

You could skip epel-release and python-pip by doing:

yum install -y python-devel libffi-devel openssl-devel gcc  
curl -s [https://bootstrap.pypa.io/get-pip.py](https://bootstrap.pypa.io/get-pip.py) | python  
pip install shade

---

<div class="post-metadata">

**Author:** ![John\_Favorite](https://avatars.discourse-cdn.com/v4/letter/j/ba9def/32.png) [@John\_Favorite](https://forum.ansible.com/u/John_Favorite)\
**Post date:** [September 23, 2016, 8:22pm UTC](https://forum.ansible.com/t/shade-not-available-via-yum/22628/11 "2016-09-23T20:22:02Z")

</div>

Ah yes, closed networks. Fun times. You can test on vagrant box to get centos.

---

<div class="post-metadata">

**Author:** ![Richard\_Eggert](https://avatars.discourse-cdn.com/v4/letter/r/d9b06d/32.png) [@Richard\_Eggert](https://forum.ansible.com/u/Richard_Eggert)\
**Post date:** [September 26, 2016, 2:34pm UTC](https://forum.ansible.com/t/shade-not-available-via-yum/22628/12 "2016-09-26T14:34:14Z")

</div>

This worked, though I had to make the following tweak:

pip install -U “pip\<8.1.2”

Otherwise, transitive installation of oslo.i18n fails due to conversion of the dot to a dash when it queries the pypi mirror.

Thanks a lot!

~Rich

---

<div class="post-metadata">

**Author:** ![Richard\_Eggert](https://avatars.discourse-cdn.com/v4/letter/r/d9b06d/32.png) [@Richard\_Eggert](https://forum.ansible.com/u/Richard_Eggert)\
**Post date:** [September 26, 2016, 5:19pm UTC](https://forum.ansible.com/t/shade-not-available-via-yum/22628/13 "2016-09-26T17:19:32Z")

</div>

I also needed to yum install python-importlib, as well as fix the file permissions on the files added by pip to site-packages.

However, now I’m running into a version conflict with the stevedore package. python-keystoneclient wants stevedore \>= 1.16.0, but stevedore 1.10+ doesn’t support Python 2.6.

~Rich

---

<div class="post-metadata">

**Author:** ![Richard\_Eggert](https://avatars.discourse-cdn.com/v4/letter/r/d9b06d/32.png) [@Richard\_Eggert](https://forum.ansible.com/u/Richard_Eggert)\
**Post date:** [September 26, 2016, 6:14pm UTC](https://forum.ansible.com/t/shade-not-available-via-yum/22628/14 "2016-09-26T18:14:58Z")

</div>

Doh! I just realized that there is NO version of Shade that officially supports Python 2.6. ☹

---

<div class="post-metadata">

**Author:** ![Richard\_Eggert](https://avatars.discourse-cdn.com/v4/letter/r/d9b06d/32.png) [@Richard\_Eggert](https://forum.ansible.com/u/Richard_Eggert)\
**Post date:** [September 26, 2016, 6:36pm UTC](https://forum.ansible.com/t/shade-not-available-via-yum/22628/15 "2016-09-26T18:36:05Z")

</div>

I finally got os\_server\_facts working. I even created an Ansible role to configure the control server to get it to work. 🙂

I ended up creating a pip requirements file to get the right set of dependencies for Shade:

shade  
stevedore\<1.10  
python-keystoneclient\<2.0  
wrapt  
oslo.serialization\<2.0  
oslo.i18n\<3.0  
oslo.config\<3.0  
python-swiftclient\<3.0  
python-designateclient\<2.0
