Skip to content
Open
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
4 changes: 2 additions & 2 deletions .travis/build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if [ "$status" -gt 0 ]; then
fi

#allow the database to come up
sleep 10
sleep 60

curl -sl -I http://localhost:8086/ping
status=$?
Expand All @@ -50,7 +50,7 @@ fi

echo " "
echo "Importing data"
docker exec -it $did /bin/bash -c "influx -import -path=/tmp/ghi_dhi_bulkload.txt -precision ms"
docker exec -it $did /bin/bash -c "influx -import -path=/tmp/ghi_dhi_bulkload.txt -precision s; influx -import -path=/tmp/loadprofile_measurement_out.txt -precision s"
status=$?
if [ $status -ne 0 ]; then
echo "Error: influxdb ping status $status"
Expand Down
7 changes: 5 additions & 2 deletions .travis/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@ setup_dependencies() {
sudo apt install realpath python python-pip -y
sudo apt install --only-upgrade docker-ce -y

sudo pip install docker-compose || true

docker info

sudo rm /usr/local/bin/docker-compose
curl -L https://github.com/docker/compose/releases/download/1.25.0/docker-compose-`uname -s`-`uname -m` > docker-compose
chmod +x docker-compose
sudo mv docker-compose /usr/local/bin
docker-compose --version
}

Expand Down
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ RUN apt-get update \
&& rm -rf /var/cache/apt/archives/* \
&& pip3 install -r /tmp/timeseries/weather/solar-forecasting/requirements.txt \
&& cd /tmp/timeseries/weather/solar-forecasting \
&& python3 build_bulk_load_file.py
&& python3 build_bulk_load_file.py \
&& cd /tmp/timeseries/loadprofiles \
&& python3 loadprofile_measurement_bulk.py

FROM influxdb:latest

COPY --from=influxdbbuild /tmp/timeseries/weather/solar-forecasting/ghi_dhi_bulkload.txt /tmp/ghi_dhi_bulkload.txt
COPY --from=influxdbbuild /tmp/timeseries/loadprofiles/loadprofile_measurement_out.txt /tmp/loadprofile_measurement_out.txt
COPY --from=influxdbbuild /dockerbuildversion.txt /dockerbuildversion.txt
COPY ./influxdb.conf /etc/influxdb/influxdb.conf

Expand Down
8 changes: 8 additions & 0 deletions timeseries/loadprofiles/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@


Make sure influxdb is loaded

To build bulkload file: python3 loadprofile_measurement_bulk.py

At command prompt: influx -import -path=loadprofile_measurement_out.txt -precision s

Loading