EnergyPlus Local Development Environment
Created by: john525
NOTE: I'm having configuration issues on my environment (DAS-231) and Jose's trying to help me solve it. These instructions are mainly for him as he tries to replicate the issue. Once Jose and I resolve this issue, we can have a full PR review with the rest of the team.
Run the following commands, changing paths if your local environment is different from the standard setup:
# Checkout associated BPEngine changes
cd ~/blocpower/libraries/bpengine
git checkout eplus_fix2 && git pull
# Checkout associated BlocLink changes
cd ~/blocpower/microservices/bloclink
git checkout eplus_fix2 && git pull
cat eplus.env >> .env
# Checkout out associated Dashboard changes
cd ~/blocpower/microservices/dashboard
git checkout eplus_fix2 && git pull
# Clone Pentaho repo and checkout associated pentaho changes
cd ~/blocpower/microservices
git clone -q https://github.com/Blocp/pentaho.git
cd ~/blocpower/microservices/pentaho
git checkout eplus_fix2 && git pull
# Finally, checkout the changes in this repository and recreate the necessary volumes/containers
cd ~/blocpower/development
docker-compose rm -fs postgresql bloclink dashboard
docker volume rm development_pgdata
git checkout eplus_fix2 && git pull
docker-compose up -d
Then run docker-compose exec rabbit bash, and inside that shell run:
rabbitmqctl add_user blocpower blocpower2017
rabbitmqctl set_permissions blocpower -p / '.*' '.*' '.*'
rabbitmqctl set_user_tags blocpower administrator
exit
Then run docker-compose exec worker bash, and inside that shell run:
yes | pip uninstall bpeng
pip install -e /app_lib/bpengine/
exit
Now run docker-compose restart worker and check that it is stays stable and alive with docker-compose logs -f worker.
Look at these two links (Dashboard, and one of the API endpoints it relies on), to see if they load with or without error: http://0.0.0.0:5501/buildings/12345/envelope/ http://0.0.0.0:5410/buildings/12345/api/v2/simulation-list/
If all that works, you can now spin up a pentaho container with the following commands:
eval $(aws ecr get-login | sed -e 's/-e none//g')
docker run -itd -p 127.0.0.1:8081:8081/tcp -v 'development_ep_sim':'/eplus_data' -v '/Users/johnlhota/blocpower/pentaho/pentaho/eplus':'/pentaho-di/.kettle' --network=development_default --name pentaho --env-file /Users/johnlhota/blocpower/microservices/pentaho/prod.env 763311425122.dkr.ecr.us-east-1.amazonaws.com/pentaho:v1.1