Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with thehive4py requirements #1912

Open
latundetoks opened this issue Sep 17, 2018 · 5 comments
Open

Issues with thehive4py requirements #1912

latundetoks opened this issue Sep 17, 2018 · 5 comments

Comments

@latundetoks
Copy link

Running Elastalert as a docker image. My latest update gives an error "No local packages or working download links found for thehive4py>=1.4.4"

Seems the requirement for thehive4py (added recently) breaks my installation and when I check here: https://pypi.org/simple/thehive4py/, there is no tar file for theHive4py-1.4.4.

@MonaxGT
Copy link
Contributor

MonaxGT commented Sep 17, 2018

Hi, i add this lib with pip2 install command.

pip2 show TheHive4py
Name: thehive4py
Version: 1.4.4
Summary: Python API client for TheHive.
Home-page: https://github.com/TheHive-Project/Thehive4py
Author: TheHive-Project
Author-email: [email protected]
License: AGPL-V3
Location: /usr/local/lib/python2.7/dist-packages
Requires: python-magic, future, requests

On origin github 1.4.4 version was created at 2 July source

@Qmando
Copy link
Member

Qmando commented Sep 17, 2018

@latundetoks
Can you share your dockerfile? Is it pip, setuptools or something else that is failing?

@latundetoks
Copy link
Author

@Qmando , it seems to be the requirement to install theHive4py on an alpine docker image.

Searching for thehive4py>=1.4.4
Reading https://pypi.python.org/simple/thehive4py/
No local packages or working download links found for thehive4py>=1.4.4
error: Could not find suitable distribution for Requirement.parse('thehive4py>=1.4.4')

@Qmando
Copy link
Member

Qmando commented Sep 18, 2018

Works fine for me.

$ cat Dockerfile
FROM alpine:latest
ARG ELASTALERT_VERSION=v0.1.36
ENV ELASTALERT_VERSION=${ELASTALERT_VERSION}
# URL from which to download Elastalert.
ARG ELASTALERT_URL=https://github.com/Yelp/elastalert/archive/$ELASTALERT_VERSION.zip
ENV ELASTALERT_URL=${ELASTALERT_URL}
# Elastalert home directory full path.
ENV ELASTALERT_HOME /opt/elastalert

WORKDIR /opt

RUN apk add --update --no-cache ca-certificates openssl-dev openssl python2-dev python2 py2-pip py2-yaml libffi-dev gcc musl-dev wget && \
# Download and unpack Elastalert.
    wget -O elastalert.zip "${ELASTALERT_URL}" && \
    unzip elastalert.zip && \
    rm elastalert.zip && \
    mv e* "${ELASTALERT_HOME}"

WORKDIR "${ELASTALERT_HOME}"

# Install Elastalert.
# see: https://github.com/Yelp/elastalert/issues/1654
RUN sed -i 's/jira>=1.0.10/jira>=1.0.10,<1.0.15/g' setup.py && \
    python setup.py install && \
    pip install -r requirements.txt
$ docker build .
Sending build context to Docker daemon  489.8MB
Step 1/10 : FROM alpine:latest
...
 ---> 3cfe457dffbb
Successfully built 3cfe457dffbb

Specifically, the relevant section:

Searching for thehive4py>=1.4.4
Reading https://pypi.org/simple/thehive4py/
Downloading https://files.pythonhosted.org/packages/06/cf/3a2940cfa54a15056cebf283baa6de50e425b8eea065aebd54c3e90b5911/thehive4py-1.4.4-py2.py3-none-any.whl#sha256=4e999abdf22899379d54711ac8f3177808d5ec337fefe018d4d3b151e1fd3879
Best match: thehive4py 1.4.4
Processing thehive4py-1.4.4-py2.py3-none-any.whl
Installing thehive4py-1.4.4-py2.py3-none-any.whl to /usr/lib/python2.7/site-packages
writing requirements to /usr/lib/python2.7/site-packages/thehive4py-1.4.4-py2.7.egg/EGG-INFO/requires.txt
Adding thehive4py 1.4.4 to easy-install.pth file

Installed /usr/lib/python2.7/site-packages/thehive4py-1.4.4-py2.7.egg

@cfiske
Copy link

cfiske commented Sep 27, 2018

I was having the same issue on CentOS 7.1, Python 2.7.
I tried @MonaxGT 's suggestion and installed it manually via pip2. After that the Elastalert install worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants