Skip to content

Commit

Permalink
Merge pull request #709 from NREL/mongo_upgrade
Browse files Browse the repository at this point in the history
bump mongo to 6.0.7
  • Loading branch information
brianlball committed Aug 10, 2023
2 parents 234789f + 4bba5ba commit 6386ea1
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 27 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/security-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ jobs:
OS_SERVER_NUMBER_OF_WORKERS: 4
BUILD_TYPE: docker
COMPOSE_INTERACTIVE_NO_CLI: 1
- name: Cleanup Docker resources and space
shell: bash
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Run docker vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ ENV DEBIAN_FRONTEND=noninteractive
# Install required libaries.
# realpath - needed for wait-for-it
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 - \
&& echo "deb http://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | \
tee /etc/apt/sources.list.d/mongodb-org-4.4.list \
&& wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | apt-key add - \
&& echo "deb http://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse" | \
tee /etc/apt/sources.list.d/mongodb-org-6.0.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
apt-transport-https \
Expand Down
10 changes: 5 additions & 5 deletions ci/github-actions/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ else
rm ruby-2.7.2-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-macos-x86_64-4.4.2.tgz
tar xvzf mongodb-macos-x86_64-4.4.2.tgz
sudo cp mongodb-macos-x86_64-4.4.2/bin/* /usr/local/bin/
curl -SLO https://fastdl.mongodb.org/osx/mongodb-macos-x86_64-6.0.7.tgz
tar xvzf mongodb-macos-x86_64-6.0.7.tgz
sudo cp mongodb-macos-x86_64-6.0.7/bin/* /usr/local/bin/
rm -r mongodb-macos*

# Install openstudio -- Use the install script that is in this repo now, the one on OpenStudio/develop has changed
Expand Down Expand Up @@ -63,8 +63,8 @@ else
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 focal/mongodb-org/4.4 multiverse | tee /etc/apt/sources.list.d/mongodb-org-4.4.list"
sudo wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add -
echo "deb http://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse | tee /etc/apt/sources.list.d/mongodb-org-6.0.list"
sudo apt-get update
sudo apt-get install -y pv tree mongodb libqdbm14 libxml2-dev
# explicitly install. the latest version of redis-server
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version: '3.4'
services:
db:
image: mongo:4.4.2
image: mongo:6.0.7
ports:
- "27017:27017"
deploy:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
version: '3.4'
services:
db:
image: mongo:4.4.2
image: mongo:6.0.7
ports:
- "27017:27017"
volumes:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
version: '3.4'
services:
db:
image: mongo:4.4.2
image: mongo:6.0.7
ports:
- "27017:27017"
environment:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
version: '3.4'
services:
db:
image: mongo:4.4.2
image: mongo:6.0.7
ports:
- "27017:27017"
volumes:
Expand Down
4 changes: 2 additions & 2 deletions local_setup_scripts/nuke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ echo "pull images"
docker pull registry:2.6
docker pull nrel/openstudio-server:$1
docker pull nrel/openstudio-rserve:$1
docker pull mongo:4.4.2
docker pull mongo:6.0.7
docker pull redis:6.0.9

echo "create registry"
Expand All @@ -26,7 +26,7 @@ sleep 10
echo "tag"
docker tag nrel/openstudio-server:$1 127.0.0.1:5000/openstudio-server
docker tag nrel/openstudio-rserve:$1 127.0.0.1:5000/openstudio-rserve
docker tag mongo:4.4.2 127.0.0.1:5000/mongo
docker tag mongo:6.0.7 127.0.0.1:5000/mongo
docker tag redis:6.0.9 127.0.0.1:5000/redis
sleep 3
echo "push"
Expand Down
4 changes: 2 additions & 2 deletions local_setup_scripts/rebuild_sr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ cd docker/R/
#docker image rm 127.0.0.1:5000/openstudio-rserve -f
docker build . -t="127.0.0.1:5000/openstudio-rserve"
docker push 127.0.0.1:5000/openstudio-rserve
docker pull mongo:4.4.2
docker tag mongo:4.4.2 127.0.0.1:5000/mongo
docker pull mongo:6.0.7
docker tag mongo:6.0.7 127.0.0.1:5000/mongo
docker push 127.0.0.1:5000/mongo
docker pull redis:6.0.9
docker tag redis:6.0.9 127.0.0.1:5000/redis
Expand Down
4 changes: 2 additions & 2 deletions local_setup_scripts/win64/nuke.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ echo "pull images"
docker pull registry:2.6
docker pull nrel/openstudio-server:$Args
docker pull nrel/openstudio-rserve:$Args
docker pull mongo:3.4.10
docker pull mongo:6.0.7
docker pull redis:4.0.6

echo "create registry"
Expand All @@ -26,7 +26,7 @@ sleep 10
echo "tag"
docker tag nrel/openstudio-server:$Args 127.0.0.1:5000/openstudio-server
docker tag nrel/openstudio-rserve:$Args 127.0.0.1:5000/openstudio-rserve
docker tag mongo:3.4.10 127.0.0.1:5000/mongo
docker tag mongo:6.0.7 127.0.0.1:5000/mongo
docker tag redis:4.0.6 127.0.0.1:5000/redis
sleep 3
echo "push"
Expand Down
4 changes: 2 additions & 2 deletions local_setup_scripts/win64/nuke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ echo "pull images"
docker pull registry:2.6
docker pull nrel/openstudio-server:$1
docker pull nrel/openstudio-rserve:$1
docker pull mongo:4.4.2
docker pull mongo:6.0.7
docker pull redis:6.0.9

echo "create registry"
Expand All @@ -26,7 +26,7 @@ sleep 10
echo "tag"
docker tag nrel/openstudio-server:$1 127.0.0.1:5000/openstudio-server
docker tag nrel/openstudio-rserve:$1 127.0.0.1:5000/openstudio-rserve
docker tag mongo:4.4.2 127.0.0.1:5000/mongo
docker tag mongo:6.0.7 127.0.0.1:5000/mongo
docker tag redis:6.0.9 127.0.0.1:5000/redis
sleep 3
echo "push"
Expand Down
4 changes: 2 additions & 2 deletions local_setup_scripts/win64/rebuild_sr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ cd docker/R
#docker image rm 127.0.0.1:5000/openstudio-rserve -f
docker build . -t="127.0.0.1:5000/openstudio-rserve"
docker push 127.0.0.1:5000/openstudio-rserve
docker pull mongo:4.4.2
docker tag mongo:4.4.2 127.0.0.1:5000/mongo
docker pull mongo:6.0.7
docker tag mongo:6.0.7 127.0.0.1:5000/mongo
docker push 127.0.0.1:5000/mongo
docker pull redis:6.0.9
docker tag redis:6.0.9 127.0.0.1:5000/redis
Expand Down
4 changes: 2 additions & 2 deletions local_setup_scripts/win64/rebuild_sr_no_rm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ cd docker/R
#docker image rm 127.0.0.1:5000/openstudio-rserve -f
docker build . -t="127.0.0.1:5000/openstudio-rserve"
docker push 127.0.0.1:5000/openstudio-rserve
docker pull mongo:4.4.2
docker tag mongo:4.4.2 127.0.0.1:5000/mongo
docker pull mongo:6.0.7
docker tag mongo:6.0.7 127.0.0.1:5000/mongo
docker push 127.0.0.1:5000/mongo
docker pull redis:6.0.9
docker tag redis:6.0.9 127.0.0.1:5000/redis
Expand Down
4 changes: 2 additions & 2 deletions server/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ gem 'tzinfo-data', '~>1.2021.1'
gem 'loofah', '2.20.0'

# database modules
gem 'mongoid', '7.2.1'
gem 'mongoid', '7.4.3'
#gem 'mongoid-paperclip'
# forked gem is neccessary as mongoid-paperclip relies on mimemagic which now requires freedesktop.org.xml at run time"
gem 'mongoid-paperclip', :github => 'tijcolem/mongoid-paperclip', :ref => 'master'
Expand Down Expand Up @@ -69,7 +69,7 @@ gem 'sassc', '~> 2.4.0'

gem 'openstudio-workflow', '= 2.3.1'
#gem 'openstudio-analysis', :github => 'NREL/OpenStudio-analysis-gem', :ref => 'develop'
gem 'openstudio-analysis', '= 1.3.2'
gem 'openstudio-analysis', '= 1.3.4'

# Remove urbanopt cli gems for minor for releases as they use different versions of ext gems
gem 'urbanopt-cli', '= 0.9.2'
Expand Down
2 changes: 1 addition & 1 deletion spec/tests/openstudio_meta_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# mongod must be in the path, if you are on Windows you can use the following
if Gem.win_platform?
ENV['PATH'] = "C:/Program Files/MongoDB/Server/3.0/bin;#{ENV['PATH']}" # @todo it would be good to un-hard-code this
ENV['PATH'] = "C:/Program Files/MongoDB/Server/6.0/bin;#{ENV['PATH']}" # @todo it would be good to un-hard-code this
end

def which(cmd)
Expand Down

0 comments on commit 6386ea1

Please sign in to comment.