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

Update mongo and redis #613

Merged
merged 18 commits into from
Dec 28, 2020
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
4 changes: 4 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
REDIS_PASSWORD=openstudio
REDIS_URL=redis://:openstudio@queue:6379
MONGO_USER=openstudio
MONGO_PASSWORD=openstudio
64 changes: 64 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,70 @@
OpenStudio Server
=================

Version 3.1.0-1
-------------

* #[613](https://github.com/NREL/OpenStudio-server/pull/613/files) Update Mongo and Redis versions and allow for custom password for both Redis and Mongo when launching OpenStudio-server.


Version 3.1.0
-------------

Date Range 06/26/20 - 10/26/20

* [#555](https://github.com/NREL/OpenStudio-server/pull/555) - Update Ruby gem envs in the openstudio_meta cli
* [#561](https://github.com/NREL/OpenStudio-server/pull/561) - Fixes [#560](https://github.com/NREL/OpenStudio-server/issues/560) - Fixes unzip method
* [#563](https://github.com/NREL/OpenStudio-server/pull/563) - Add linux support for extracted gems.
* [#564](https://github.com/NREL/OpenStudio-server/pull/564) - Remove hardcoded openstudio version and sha
* [#566](https://github.com/NREL/OpenStudio-server/pull/566) - Make tmpname deprecate
* [#571](https://github.com/NREL/OpenStudio-server/pull/571) - Make downloading files back to server optional
* [#602](https://github.com/NREL/OpenStudio-server/pull/602) - Add algorithmic test suites
* [#597](https://github.com/NREL/OpenStudio-server/pull/597) - Save the travis gem package artifacts
* [#599](https://github.com/NREL/OpenStudio-server/pull/599) - Save the windows gem package artifacts
* [#580](https://github.com/NREL/OpenStudio-server/issues/580) - add report capability to PSO
* [#579](https://github.com/NREL/OpenStudio-server/pull/579) - Update nokogiri
* [#585](https://github.com/NREL/OpenStudio-server/pull/585) - Update docker-compose version
* [#589](https://github.com/NREL/OpenStudio-server/pull/589) - Use most recent rubocop rules


Version 3.0.1
-------------
Date Range 04/28/20 - 06/26/20

* Updated OpenStudio SDK from v3.0.0 to v3.0.1
* Fixed [#561](https://github.com/NREL/OpenStudio-server/issues/561) #561 Fix unzipping issue.


Version 3.0.0
-------------
Date Range 12/9/19 - 04/27/20

* Updated OpenStudio SDK from v2.9.1 to v3.0.0
* Updated EnergyPlus from v9.2.0 to v9.3.0
* Updated Ruby from 2.2.4 to Ruby 2.5.5
* Fixed [#543](https://github.com/NREL/OpenStudio-server/issues/543) Increased the scp timeouts for larger data files.
* Fixed [#537](https://github.com/NREL/OpenStudio-server/issues/537) Added timeout settings as user args


Version 2.9.1
-------------

Date Range 10/11/19 - 12/9/2019

* Fixed [#526](https://github.com/NREL/OpenStudio-server/issues/526) Adding checks for valid CLI options and adding debug flag as optional.
* Updating to bson 4.50 for MongoDB support


Version 2.9.0
-------------

Date Range 6/5/19 - 10/11/19

* [#483](https://github.com/NREL/OpenStudio-server/issues/483) Added support for develop3 (3.x OpenStudio releases)
* [#507](https://github.com/NREL/OpenStudio-server/issues/507) Update server/Gemfile to openstudio-analysis 1.0.2 once available develop3
* [#503](https://github.com/NREL/OpenStudio-server/issues/503) Updated local Linux/OSX testing for 3x


Version 2.8.1
-------------

Expand Down
14 changes: 8 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ MAINTAINER Nicholas Long [email protected]

# Install required libaries.
# realpath - needed for wait-for-it
RUN sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6 && \
echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | \
sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list && \
apt-get update \
&& apt-get install -y --no-install-recommends \
RUN apt-get update && apt-get install -y wget gnupg \
&& wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | apt-key add - \
#RUN sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6 && \
&& echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.4 multiverse" | \
tee /etc/apt/sources.list.d/mongodb-org-4.4.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
apt-transport-https \
autoconf \
bison \
Expand Down Expand Up @@ -44,7 +46,7 @@ RUN sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F37303
libyaml-dev \
libice-dev \
libsm-dev \
mongodb-org-tools \
mongodb-database-tools \
procps \
python-numpy \
python3-numpy \
Expand Down
25 changes: 17 additions & 8 deletions ci/travis/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ else
rm ruby-2.5.5-darwin.tar.gz

# Install mongodb from a download. Brew is hanging and requires building mongo. This also speeds up the builds.
curl -SLO https://fastdl.mongodb.org/osx/mongodb-osx-ssl-x86_64-3.4.18.tgz
tar xvzf mongodb-osx-ssl-x86_64-3.4.18.tgz
cp mongodb-osx-x86_64-3.4.18/bin/* /usr/local/bin/
curl -SLO https://fastdl.mongodb.org/osx/mongodb-macos-x86_64-4.4.2.tgz
tar xvzf mongodb-macos-x86_64-4.4.2.tgz
cp mongodb-macos-x86_64-4.4.2/bin/* /usr/local/bin/
rm -r mongodb-osx*

# Install openstudio -- Use the install script that is in this repo now, the one on OpenStudio/develop has changed
Expand Down Expand Up @@ -58,17 +58,26 @@ else
elif [ "${TRAVIS_OS_NAME}" == "linux" ]; then
echo "Setting up Ubuntu for unit tests and Rubocop"
# install pipe viewer to throttle printing logs to screen (not a big deal in linux, but it is in osx)
sudo apt-get update && sudo apt-get install -y wget gnupg software-properties-common build-essential
sudo wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.4 multiverse | tee /etc/apt/sources.list.d/mongodb-org-4.4.list"
sudo apt-get update
sudo apt-get install -y pv tree mongodb libqdbm14
# per travis docs, mongodb and redis should already be installed and started from services key in bionic, but this isn't working. explicitly install.
# the latest version of redis-server now binds to ipv6 which is not supported on travis (disabled). redis-server will fail to start due to the this so below
# is a work around to install it, configure to it only binds to ipv4.
sudo apt-get install redis-server || true
sudo systemctl stop redis-server.service
sudo sed -e 's/^bind.*/bind 127.0.0.1/' /etc/redis/redis.conf > redis.conf
sudo mv redis.conf /etc/redis/redis.conf
wget https://download.redis.io/releases/redis-6.0.9.tar.gz
tar xzf redis-6.0.9.tar.gz && cd redis-6.0.9
make && sudo make install
sudo cp utils/systemd-redis_server.service /etc/systemd/system/redis.service
cd $TRAVIS_BUILD_DIR
rm redis-6.0.9.tar.gz
#sudo apt-get install redis-server || true
#sudo systemctl stop redis-server.service
#sudo sed -e 's/^bind.*/bind 127.0.0.1/' /etc/redis/redis.conf > redis.conf
#sudo mv redis.conf /etc/redis/redis.conf
sudo systemctl start redis-server.service || true
sudo systemctl status redis-server.service
sudo apt-get install -y pv tree mongodb libqdbm14
sudo systemctl start mongodb

# install portable ruby - required for build that will eventually be published
Expand Down
26 changes: 21 additions & 5 deletions docker-compose.deploy.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Version used to deploy the latest version of the server from docker hub.

version: '3.4'
services:
db:
image: mongo:3.4.10
image: mongo:4.4.2
ports:
- "27017:27017"
deploy:
Expand All @@ -13,10 +12,14 @@ services:
resources:
reservations:
cpus: "1"
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_USER}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD}
queue:
image: redis:4.0.6
ports:
- "6379:6379"
image: redis:6.0.9
ports:
- "6379:6379"
command: "redis-server --requirepass ${REDIS_PASSWORD}"
web:
image: nrel/openstudio-server:latest
ports:
Expand All @@ -25,6 +28,9 @@ services:
environment:
- OS_SERVER_NUMBER_OF_WORKERS=${OS_SERVER_NUMBER_OF_WORKERS}
- QUEUES=analysis_wrappers
- REDIS_URL=${REDIS_URL}
- MONGO_USER=${MONGO_USER}
- MONGO_PASSWORD=${MONGO_PASSWORD}
volumes:
- osdata:/mnt/openstudio
depends_on:
Expand All @@ -42,6 +48,9 @@ services:
environment:
- OS_SERVER_NUMBER_OF_WORKERS=${OS_SERVER_NUMBER_OF_WORKERS}
- QUEUES=background,analyses
- REDIS_URL=${REDIS_URL}
- MONGO_USER=${MONGO_USER}
- MONGO_PASSWORD=${MONGO_PASSWORD}
volumes:
- osdata:/mnt/openstudio
depends_on:
Expand All @@ -62,6 +71,9 @@ services:
environment:
- QUEUES=simulations
- COUNT=1
- REDIS_URL=${REDIS_URL}
- MONGO_USER=${MONGO_USER}
- MONGO_PASSWORD=${MONGO_PASSWORD}
volumes:
- /mnt/openstudio
depends_on:
Expand Down Expand Up @@ -91,6 +103,10 @@ services:
resources:
reservations:
cpus: "1"
environment:
- REDIS_URL=${REDIS_URL}
- MONGO_USER=${MONGO_USER}
- MONGO_PASSWORD=${MONGO_PASSWORD}
volumes:
osdata:
external: true
Expand Down
20 changes: 18 additions & 2 deletions docker-compose.local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,19 @@
version: '3.4'
services:
db:
image: mongo:3.4.10
image: mongo:4.4.2
ports:
- "27017:27017"
volumes:
- dbdata:/data/db
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_USER}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD}
queue:
image: redis:4.0.6
image: redis:6.0.9
ports:
- "6379:6379"
command: "redis-server --requirepass ${REDIS_PASSWORD}"
web:
image: 127.0.0.1:5000/openstudio-server
build:
Expand All @@ -22,6 +26,9 @@ services:
environment:
- OS_SERVER_NUMBER_OF_WORKERS=${OS_SERVER_NUMBER_OF_WORKERS}
- QUEUES=analysis_wrappers
- REDIS_URL=${REDIS_URL}
- MONGO_USER=${MONGO_USER}
- MONGO_PASSWORD=${MONGO_PASSWORD}
depends_on:
- db
- queue
Expand All @@ -40,6 +47,9 @@ services:
environment:
- OS_SERVER_NUMBER_OF_WORKERS=${OS_SERVER_NUMBER_OF_WORKERS}
- QUEUES=background,analyses
- REDIS_URL=${REDIS_URL}
- MONGO_USER=${MONGO_USER}
- MONGO_PASSWORD=${MONGO_PASSWORD}
depends_on:
- db
- queue
Expand All @@ -58,6 +68,9 @@ services:
- OS_SERVER_NUMBER_OF_WORKERS=${OS_SERVER_NUMBER_OF_WORKERS}
- QUEUES=simulations
- COUNT=1
- REDIS_URL=${REDIS_URL}
- MONGO_USER=${MONGO_USER}
- MONGO_PASSWORD=${MONGO_PASSWORD}
depends_on:
- web
- db
Expand All @@ -69,6 +82,9 @@ services:
build: ./docker/R
environment:
- OS_SERVER_NUMBER_OF_WORKERS=${OS_SERVER_NUMBER_OF_WORKERS}
- REDIS_URL=${REDIS_URL}
- MONGO_USER=${MONGO_USER}
- MONGO_PASSWORD=${MONGO_PASSWORD}
volumes:
- osdata:/mnt/openstudio
depends_on:
Expand Down
22 changes: 19 additions & 3 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@
version: '3.4'
services:
db:
image: mongo:3.4.10
image: mongo:4.4.2
ports:
- "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_USER}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD}
queue:
image: redis:4.0.6
image: redis:6.0.9
ports:
- "6379:6379"
command: "redis-server --requirepass ${REDIS_PASSWORD}"
web:
image: nrel/openstudio-server:latest
build:
Expand All @@ -28,6 +32,9 @@ services:
- MAX_REQUESTS=10
- MAX_POOL=10
- QUEUES=analysis_wrappers
- REDIS_URL=${REDIS_URL}
- MONGO_USER=${MONGO_USER}
- MONGO_PASSWORD=${MONGO_PASSWORD}
depends_on:
- db
- queue
Expand All @@ -49,6 +56,9 @@ services:
environment:
- OS_SERVER_NUMBER_OF_WORKERS=1
- QUEUES=background,analyses
- REDIS_URL=${REDIS_URL}
- MONGO_USER=${MONGO_USER}
- MONGO_PASSWORD=${MONGO_PASSWORD}
depends_on:
- db
- queue
Expand All @@ -67,6 +77,9 @@ services:
- OS_SERVER_NUMBER_OF_WORKERS=1
- QUEUES=simulations
- COUNT=1
- REDIS_URL=${REDIS_URL}
- MONGO_USER=${MONGO_USER}
- MONGO_PASSWORD=${MONGO_PASSWORD}
depends_on:
- web
- db
Expand All @@ -78,6 +91,9 @@ services:
build: ./docker/R
environment:
- OS_SERVER_NUMBER_OF_WORKERS=1
- REDIS_URL=${REDIS_URL}
- MONGO_USER=${MONGO_USER}
- MONGO_PASSWORD=${MONGO_PASSWORD}
volumes:
- osdata:/mnt/openstudio
depends_on:
Expand All @@ -88,4 +104,4 @@ volumes:
osdata:
external: true



Loading