Skip to content
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #41 from mcauto/master
Browse files Browse the repository at this point in the history
fix build fail & v2.4.0 & github actions
  • Loading branch information
PeterGrace authored Dec 5, 2020
2 parents 625070f + 4c8af8c commit a4ddfd6
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 8 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Docker Image CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Build the Docker image
run: docker build . --file Dockerfile --tag petergrace/opentsdb-docker:latest
21 changes: 13 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
FROM alpine:latest

ENV TINI_VERSION v0.18.0
ENV TSDB_VERSION 2.3.1
ENV TSDB_VERSION 2.4.0
ENV HBASE_VERSION 1.4.4
ENV GNUPLOT_VERSION 5.2.4
ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk
ENV PATH $PATH:/usr/lib/jvm/java-1.8-openjdk/bin/
ENV ALPINE_PACKAGES "rsyslog bash openjdk8 make wget libgd libpng libjpeg libwebp libjpeg-turbo cairo pango lua"
ENV BUILD_PACKAGES "build-base autoconf automake git python cairo-dev pango-dev gd-dev lua-dev readline-dev libpng-dev libjpeg-turbo-dev libwebp-dev"
ENV BUILD_PACKAGES "build-base autoconf automake git python3-dev cairo-dev pango-dev gd-dev lua-dev readline-dev libpng-dev libjpeg-turbo-dev libwebp-dev sed"
ENV HBASE_OPTS "-XX:+UseConcMarkSweepGC -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap"
ENV JVMARGS "-XX:+UseConcMarkSweepGC -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -enableassertions -enablesystemassertions"

Expand All @@ -26,17 +26,22 @@ RUN apk --update add apk-tools \
WORKDIR /opt/opentsdb/

# Add build deps, build opentsdb, and clean up afterwards.
RUN apk add --virtual builddeps \
${BUILD_PACKAGES} \
&& : Install OpenTSDB and scripts \
&& wget --no-check-certificate \
RUN set -ex && apk add --virtual builddeps ${BUILD_PACKAGES}

RUN ln -s /usr/bin/python3 /usr/bin/python

RUN wget --no-check-certificate \
-O v${TSDB_VERSION}.zip \
https://github.com/OpenTSDB/opentsdb/archive/v${TSDB_VERSION}.zip \
&& unzip v${TSDB_VERSION}.zip \
&& rm v${TSDB_VERSION}.zip \
&& cd /opt/opentsdb/opentsdb-${TSDB_VERSION} \
&& echo "tsd.http.request.enable_chunked = true" >> src/opentsdb.conf \
&& echo "tsd.http.request.max_chunk = 1000000" >> src/opentsdb.conf \
&& echo "tsd.http.request.max_chunk = 1000000" >> src/opentsdb.conf

RUN cd /opt/opentsdb/opentsdb-${TSDB_VERSION} \
&& find . | xargs grep -s central.maven.org | cut -f1 -d : | xargs sed -i "s/http:\/\/central/https:\/\/repo1/g" \
&& find . | xargs grep -s repo1.maven.org | cut -f1 -d : | xargs sed -i "s/http:\/\/repo1/https:\/\/repo1/g" \
&& ./build.sh \
&& cp build-aux/install-sh build/build-aux \
&& cd build \
Expand All @@ -45,7 +50,7 @@ RUN apk add --virtual builddeps \
&& rm -rf /opt/opentsdb/opentsdb-${TSDB_VERSION}

RUN cd /tmp && \
wget https://datapacket.dl.sourceforge.net/project/gnuplot/gnuplot/${GNUPLOT_VERSION}/gnuplot-${GNUPLOT_VERSION}.tar.gz && \
wget https://sourceforge.net/projects/gnuplot/files/gnuplot/${GNUPLOT_VERSION}/gnuplot-${GNUPLOT_VERSION}.tar.gz && \
tar xzf gnuplot-${GNUPLOT_VERSION}.tar.gz && \
cd gnuplot-${GNUPLOT_VERSION} && \
./configure && \
Expand Down
3 changes: 3 additions & 0 deletions files/create_tsdb_tables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ export HBASE_HOME=/opt/hbase
export TSDB_VERSION="::TSDB_VERSION::"
export JAVA_HOME="::JAVA_HOME::"

# https://github.com/OpenTSDB/opentsdb/issues/1481
sed -i "s/, TTL => '\$TSDB_TTL'//g" /usr/local/share/opentsdb/tools/create_table.sh

/usr/local/share/opentsdb/tools/create_table.sh
touch /data/hbase/opentsdb_tables_created.txt

0 comments on commit a4ddfd6

Please sign in to comment.