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

Use monasca/python for monasca/persister-python #224

Merged
merged 6 commits into from
Oct 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 8 additions & 15 deletions monasca-persister-python/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
FROM alpine:3.5
ARG PYTHON_VERSION
ARG TIMESTAMP_SLUG
FROM monasca/python:${PYTHON_VERSION}-${TIMESTAMP_SLUG}

ARG PERSISTER_REPO=https://github.com/openstack/monasca-persister.git
ARG PERSISTER_BRANCH="master"
ARG PERSISTER_BRANCH=master
ARG CONSTRAINTS_BRANCH=master

# To force a rebuild, pass --build-arg REBUILD="$(DATE)" when running
# `docker build`
Expand All @@ -23,19 +26,9 @@ ENV CONFIG_TEMPLATE=true \
INFLUX_PASSWORD=password \
INFLUX_DB=mon

RUN apk add --no-cache python py2-pip py2-jinja2 && \
apk add --no-cache --virtual build-dep \
python-dev git make g++ linux-headers && \
git clone \
--single-branch --depth=1 -b $PERSISTER_BRANCH \
$PERSISTER_REPO /monasca-persister && \
pip install influxdb && \
cd /monasca-persister && \
pip install -r requirements.txt && \
python setup.py install && \
cd / && \
rm -rf /monasca-persister && \
apk del build-dep
RUN /build.sh -r ${PERSISTER_REPO} -b ${PERSISTER_BRANCH} \
-q ${CONSTRAINTS_BRANCH} -d "influxdb Jinja2" && \
rm -rf /build.sh

COPY persister.conf.j2 /etc/monasca-persister/
COPY template.py start.sh kafka_wait_for_topics.py /
Expand Down
23 changes: 20 additions & 3 deletions monasca-persister-python/build.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,43 @@
repository: monasca/persister
variants:
- tag: 1.5.0-python
- tag: 1.6.0-python
aliases:
- :latest
- :latest-python
- :1.6.0
- :1.6
- :1
- :1-python
args:
PERSISTER_BRANCH: 1.6.0
PYTHON_VERSION: '2'
TIMESTAMP_SLUG: 20170809-155207

- tag: 1.5.0-python
aliases:
- :1.5.0
- :1.5
- :1.5-python
- :1
- :1-python
args:
PERSISTER_BRANCH: 1.5.0
PYTHON_VERSION: '2'
TIMESTAMP_SLUG: 20170809-155207

- tag: ocata-python
aliases:
- :ocata
args:
PERSISTER_BRANCH: stable/ocata
PYTHON_VERSION: '2'
TIMESTAMP_SLUG: 20170809-155207
CONSTRAINTS_BRANCH: stable/ocata

- tag: master
aliases:
- :master-{date}-{time}
- :master-python
args:
PERSISTER_BRANCH: master
PYTHON_VERSION: '2'
TIMESTAMP_SLUG: 20170809-155207
CONSTRAINTS_BRANCH: master
3 changes: 1 addition & 2 deletions monasca-persister-python/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,4 @@ else
cp /etc/monasca-persister/persister.conf.j2 /etc/monasca-persister/persister.conf
fi

python /usr/lib/python2.7/site-packages/monasca_persister/persister.py \
--config-file /etc/monasca-persister/persister.conf
monasca-persister --config-file /etc/monasca-persister/persister.conf