Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
4

Setting up OpenStudio-server on a local machine

asked 2017-04-26 17:34:54 -0500

updated 2017-04-26 17:38:36 -0500

I'm trying to launch OpenStudio-server on a local machine.

It seems that one can either use Vagrant or Docker (there's also AMI, but that's Amazon specific so I'm not interested). I have never used either, and they seem to overlap quite significantly. Even more confusing, apparently Vagrant can run Docker inside.

  • Which one should I use? 1
  • Can I use neither if I have full control of the machine I want to install it on and do not want to deploy it later? 2

1 Since I assume the answer is "it depends what you want to do", for context (see this question), I have other machines on my LAN network (Windows and Mac), on which I'd like to dispatch parametric runs.

2 I've tried running ruby bin/openstudio_meta install_gems then ruby bin/openstudio_meta start_local --worker-number=2 --debug ~/OS-server-test/ but obviously it failed

E, [2017-04-27T00:10:58.771060 #18153] ERROR -- : Mongod returned non-zero status code  `2`. Please refer to `~/OS-server-test/logs/mongod.log`.
E, [2017-04-27T00:10:58.771322 #18153] ERROR -- : File `~/OS-server-test/local_configuration.json` not found. It is possible that processes have been orphaned.
edit retag flag offensive close merge delete

Comments

I created a new tag, openstudio-server

Julien Marrec's avatar Julien Marrec  ( 2017-04-26 17:35:10 -0500 )edit

Note that I have successfully installed OpenStudio-server using Docker Toolbox given the instructions here and I can indeed dispatch my runs to it. I'm still interested in finding out if Vagrant might be better, and whether I can completely forgo Vagrant/Docker approach and run stuff natively (I assume that's going to be faster, might be wrong...)

Julien Marrec's avatar Julien Marrec  ( 2017-04-26 18:52:51 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted
4

answered 2017-04-28 10:41:23 -0500

updated 2017-04-28 10:41:57 -0500

The Vagrant approach was deprecated once we transitioned to OpenStudio 2.0. There are major performance issues related to our Vagrant setup with regards to disk IO, etc. Docker is the recommended approach.

To run algorithms locally, you have 2 options to setup your own OS Server:

  1. checkout https://github.com/NREL/OpenStudio-se... locally and build your own Docker containers.

  2. use the already built docker containers and do the following:

docker pull nrel/openstudio-server:2.1.1

docker pull nrel/openstudio-rserve:2.1.1

docker pull mongo

docker volume create --name osdata

Once the containers are spun up, use docker-compose with the .yml file located here and then from that folder run

docker-compose up

to add workers (ex, 44 workers for a 48 core box):

docker-compose scale worker=44

edit flag offensive delete link more

Comments

When I type docker-compose up in a folder in which I have downloaded the yml file,

WARNING: The OS_SERVER_NUMBER_OF_WORKERS variable is not set. Defaulting to a blank string.

ERROR: build path /path_to_my_local_folder_where_yml_file_is/docker/R either does not exist, is not accessible, or is not a valid URL

sudo docker-compose up ain't doing it either.

Julien Marrec's avatar Julien Marrec  ( 2017-06-21 09:46:58 -0500 )edit
1

yes, you can either make OS_SERVER_NUMBER_OF_WORKERS an Environment variable (which specifies the number of workers you want) or change this line here to use a scalar instead of an ENV.(as well as the other instances in the file)

BrianLBall's avatar BrianLBall  ( 2017-06-21 09:53:13 -0500 )edit

Fine for the env variable, though that's just a warning. If I do mkdir docker/R, I then get ERROR: Cannot locate specified Dockerfile: Dockerfile

Julien Marrec's avatar Julien Marrec  ( 2017-06-21 09:59:53 -0500 )edit

Do I need to run docker-compose up in the github clone repo itself?

Julien Marrec's avatar Julien Marrec  ( 2017-06-21 10:12:05 -0500 )edit
1

yes, i run it at the root project checkout where the Dockerfile and docker-compose.yml files are

BrianLBall's avatar BrianLBall  ( 2017-06-21 10:17:19 -0500 )edit
1

answered 2017-04-26 18:07:09 -0500

miwamasa's avatar

updated 2017-04-26 19:31:26 -0500

I use Dockertools with OracleVirtualBox on my Window Machine to run OpenStudio-server.

This question might be related.

I havent tryed Vagrant, but I can run the server via docker on windows local virutal machine.

Following is the brief overview what I did, It might depends on the windows version and proxy setting

After installing Dockertools on my windows 8.1 pro machine and run docker deamon, then from the "Docker Quickstart Terminal" in my case,

change directory to the pat/OpenStudio-server folder, then type,

docker-compose -f docker-compose.deploy.yml up

If you are lucky the servers are deployed.

You must setup port forwarding in order to access from your local PAT2.0 on windows to the server which is running on the container you just have deployed on the VirtualBox.

edit flag offensive delete link more
-1

answered 2017-04-26 18:16:06 -0500

Chienman's avatar

I've never tried setting up the server on a local machine, but from what I can see of the instructions, the Docker approach requires having an AWS account and VPC set up. Personally I like this approach better because you can make your machine huge to store all the results and you can spawn lots of workers (just remember to shut down the VM when you're done)

edit flag offensive delete link more

Comments

The docker approach does not limit deployment to AWS - quite the contrary. It was selected because it enables deployment to a variety of providers. Improved documentation to support these use cases is in the backlog.

ljbrackney's avatar ljbrackney  ( 2017-04-26 18:44:52 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Careers

Question Tools

1 follower

Stats

Asked: 2017-04-26 17:34:54 -0500

Seen: 803 times

Last updated: Apr 28 '17