Skip to content

Commit

Permalink
Merge pull request #651 from NREL/develop
Browse files Browse the repository at this point in the history
Update to OpenStudio 3.4.0-rc1
  • Loading branch information
tijcolem committed Apr 12, 2022
2 parents c4fd9d7 + 53705e5 commit 8e586f9
Show file tree
Hide file tree
Showing 14 changed files with 47 additions and 58 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/openstudio-server-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ on: [push, pull_request]

env:
USE_TESTING_TIMEOUTS: "true"
OPENSTUDIO_VERSION: 3.3.0
OPENSTUDIO_VERSION_SHA: ad235ff36e
OPENSTUDIO_VERSION_EXT: ""
OPENSTUDIO_VERSION: 3.4.0
OPENSTUDIO_VERSION_SHA: fb391396ca
OPENSTUDIO_VERSION_EXT: "-rc1"
DOCKER_COMPOSE_VERSION: 1.21.1
BUNDLE_WITHOUT: native_ext

Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
- name: docker
shell: bash
run: |
export OPENSTUDIO_TAG=3.3.0
export OPENSTUDIO_TAG=3.4.0-rc1
sed -i -E "s/.git//g" .dockerignore
docker volume create --name=osdata
docker images --all
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# NOTES: Currently this is one big dockerfile and non-optimal.

#may include suffix
ARG OPENSTUDIO_VERSION=3.3.0
ARG OPENSTUDIO_VERSION=3.4.0-rc1
FROM nrel/openstudio:$OPENSTUDIO_VERSION as base
MAINTAINER Nicholas Long nicholas.long@nrel.gov

Expand Down Expand Up @@ -159,5 +159,5 @@ RUN echo "Running in testing environment - Installing Firefox and Gecko Driver"
COPY /docker/server/run-server-tests.sh /usr/local/bin/run-server-tests
RUN chmod +x /usr/local/bin/run-server-tests
# Test adding the git repo to the container for coveralls
# The #TEST# will be removed in the travis test script to be run in the test container
# The #TEST# will be removed in the test script to be run in the test container
#TEST#COPY .git /opt/openstudio/.git
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# OpenStudio Server

[![Build Status][travis-img]][travis-url]
[![Build Status][gh-img]][gh-url]
[![Coverage Status][coveralls-img]][coveralls-url]
Windows Build (Under Development): [![Build status][appveyor-img]][appveyor-url]

Windows Build (Under Development): [![Windows Build Status][appveyor-img]][appveyor-url]

The below documentation has not been recently reviewed. Please refer to the [wiki](https://github.com/NREL/OpenStudio-server/wiki) for current documentation.

Expand Down Expand Up @@ -125,7 +126,7 @@ nodes upon instantiation in a cluster.
## Testing procedure

The OpenStudio Server project uses several CI systems to test both local and cloud deployments across multiple
platforms. TravisCI is used to build and test local deployments of the server on OSX hardware for each commit, as well
platforms. GitHub Actions is used to build and test local deployments of the server on OSX hardware for each commit, as well
as to build and test docker containers for each commit. It is important to note that during the middle of the
day, these tests can take several hours to begin. Finally, AppVeyor is used to build and test local deployments against
Windows.
Expand All @@ -140,7 +141,7 @@ For cloud deployments, the two critical artifacts are the docker containers and
automated, and unlikely to be automated for several reason. The docker containers, however, are extensively tested using
the same rspec functionality as mentioned above.

For a pull request to be merged under regular order, all CI tests need to return green: TravisCI PR and push and AppVeyor
For a pull request to be merged under regular order, all CI tests need to return green: GitHub Actions and AppVeyor
PR and push. All of these tests write verbose results and logs on failure, which should allow for local reproduction
of the bug and subsequent fixes. In the case of a failure of the CI infrastructure, please open an issue in the
repository regarding the failure.
Expand Down Expand Up @@ -168,10 +169,10 @@ chmod -R 777 gems # Modify privileges on the installed gems

Please contact @tijcolem, @bball, or @nllong with any question regarding this project. Thanks for you interest!

[coveralls-img]: https://coveralls.io/repos/github/NREL/OpenStudio-server/badge.svg?branch=dockerize
[coveralls-img]: https://coveralls.io/repos/github/NREL/OpenStudio-server/badge.svg?branch=develop
[coveralls-url]: https://coveralls.io/github/NREL/OpenStudio-server
[travis-img]: https://travis-ci.org/NREL/OpenStudio-server.svg?branch=dockerize-travis
[travis-url]: https://travis-ci.org/NREL/OpenStudio-server
[gh-img]: https://github.com/nrel/openstudio-server/actions/workflows/openstudio-server-tests.yml/badge.svg?branch=develop
[gh-url]: https://github.com/nrel/openstudio-server/actions
[appveyor-img]: https://ci.appveyor.com/api/projects/status/j7hqgh2p7bae9xn8/branch/dockerize-appveyor?svg=true
[appveyor-url]: https://ci.appveyor.com/project/rHorsey/openstudio-server/branch/dockerize-appveyor

6 changes: 3 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ image: Visual Studio 2019

environment:
USE_TESTING_TIMEOUTS: "true"
OPENSTUDIO_VERSION: 3.3.0
OPENSTUDIO_VERSION_SHA: ad235ff36e
OPENSTUDIO_VERSION_EXT: ""
OPENSTUDIO_VERSION: 3.4.0
OPENSTUDIO_VERSION_SHA: fb391396ca
OPENSTUDIO_VERSION_EXT: "-rc1"
OPENSTUDIO_TEST_EXE: C:\projects\openstudio\bin\openstudio.exe
BUILD_TYPE: "test"
SKIP_COVERALLS: "true"
Expand Down
2 changes: 1 addition & 1 deletion bin/resources/local/rspec_command
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ rspec_path = File.absolute_path(File.join(__FILE__, './../../../../gems/bin/rspe
::ENV['OS_SERVER_LOG_PATH'] = File.join(output_dir, 'logs', 'rails.log')
::ENV['RAILS_ENV'] = 'local-test'

#If this is a CI build (travis, github actions, etc..) and the BUILD_TYPE=test omit the openstudio_algo_spec.rb tests
# If this is a CI build (github actions, etc..) and the BUILD_TYPE=test omit the openstudio_algo_spec.rb tests
if ENV['BUILD_TYPE'] == 'test'
sys_call = " \"#{ruby_exe}\" \"#{bundle_path}\" exec \"#{ruby_exe}\" \"#{rspec_path}\" --tag ~depends_r --tag ~depends_gecko --tag ~depends_resque --exclude-pattern "\
"\"**/models/cluster_spec.rb,**/features/*_algo_spec.rb\""
Expand Down
22 changes: 6 additions & 16 deletions ci/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# CI (continuous integration) testing regime

This folder contains scripts specific to each CI to allow for automated testing and deployment of the project.
Two platforms are used for testing the server: TravisCI and AppVeyor. This document begins by describing the overall
Two platforms are used for testing the server: GitHub Actions and AppVeyor. This document begins by describing the overall
strategy of the various testing frameworks, followed by sections on each CI platform.

## Testing strategy
Expand Down Expand Up @@ -45,15 +45,14 @@ I don't know quite why we test on pure ubuntu, but we do, and if the tests break

## Testing platforms

Tests are run on Travis, Circle, and AppVeyor. A few comments on each.
Tests are run on GitHub Actions and AppVeyor. A few comments on each.

### Travis
### GitHub Actions

This is currently the projects preferred testing platform. Build stages are not enabled yet, however they should be. We
test pure ubuntu and OSX on Travis. All scripts live in the travis folder. Green tests are required for both commits
and PRs, which is to say the commit SHA code has to pass, as well as the merge of the PR, before a PR can be merged
into develop. Worth noting that travis.org has a hard one hour time-limit for builds, so we can't test our docker-based
use case on travis until we speed up build time, or switch over to travis.com with its two hour build limit.
test pure ubuntu and OSX on GitHub Actions. All scripts live in the `ci/github-actions` folder. Green tests are required
for both commits and PRs, which is to say the commit SHA code has to pass, as well as the merge of the PR, before a PR c
an be merged into develop.

### AppVeyor

Expand All @@ -62,12 +61,3 @@ Critical scripts are in the appveyor folder. Both powershell and command prompt
also required for both commit and PR before merges can take place on develop. AppVeyor is exclusively used for Windows
testing. There are times when the integration test must be retried up to three times before success - the reason for
this is not clearly understood, however the retry mechanic is implemented and working successfully.

### Circle

Circle 2.0 presents significant challenges for the docker-deployment use case. As such, the project is still using the
1.0 circle framework. This has significant limitations. It would be nice to migrate this use case to Travis if at all
possible. Circle 1.0 only supports commit tests. This test must be green before merging to develop. The circle testing
scripts live implicitly in the [docker-compose testing template](https://github.com/NREL/OpenStudio-server/blob/develop/docker-compose.test.yml)
in the repo root and in [run-server-tests.sh](https://github.com/NREL/OpenStudio-server/blob/develop/docker/server/run-server-tests.sh)
in the /docker/server folder.
3 changes: 2 additions & 1 deletion ci/appveyor/setup.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ REM install develop build
set OS_INSTALL_NAME=OpenStudio-%OPENSTUDIO_VERSION%%OPENSTUDIO_VERSION_EXT%%%2B%OPENSTUDIO_VERSION_SHA%-Windows.exe
echo Install name is %OS_INSTALL_NAME%
REM curl -SLO --insecure https://openstudio-builds.s3.amazonaws.com/%OPENSTUDIO_VERSION%/%OS_INSTALL_NAME%
curl -SLO --insecure https://openstudio-builds.s3.amazonaws.com/3.3.0/%OS_INSTALL_NAME%
REM curl -SLO --insecure https://openstudio-builds.s3.amazonaws.com/3.3.0/%OS_INSTALL_NAME%
curl -SLO --insecure https://openstudio-ci-builds.s3-us-west-2.amazonaws.com/3.4.0-rc1/signed/%OS_INSTALL_NAME%
dir .
REM Install OpenStudio
%OS_INSTALL_NAME% --script ci/appveyor/install-windows.qs
Expand Down
5 changes: 3 additions & 2 deletions ci/github-actions/install_openstudio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ if [ ! -z ${OPENSTUDIO_VERSION} ] && [ ! -z ${OPENSTUDIO_SHA} ]; then
# OPENSTUDIO_VERSION_EXT may be empty
OPENSTUDIO_DOWNLOAD_FILENAME=OpenStudio-${OPENSTUDIO_VERSION}${OPENSTUDIO_VERSION_EXT}%2B${OPENSTUDIO_SHA}-Ubuntu-18.04.deb
echo "Installing OpenStudio ${OPENSTUDIO_DOWNLOAD_FILENAME}"
OPENSTUDIO_DOWNLOAD_BASE_URL=https://openstudio-builds.s3.amazonaws.com/3.3.0/
#OPENSTUDIO_DOWNLOAD_BASE_URL=https://openstudio-builds.s3.amazonaws.com/3.3.0/
OPENSTUDIO_DOWNLOAD_BASE_URL=https://openstudio-ci-builds.s3-us-west-2.amazonaws.com/3.4.0-rc1/
OPENSTUDIO_DOWNLOAD_URL=$OPENSTUDIO_DOWNLOAD_BASE_URL/$OPENSTUDIO_DOWNLOAD_FILENAME

# copying this from the docker-openstudio dockerfile
apt-get update && apt-get install -y curl vim gdebi-core libgmp-dev libffi-dev build-essential zlib1g-dev vim git locales sudo
#export OPENSTUDIO_DOWNLOAD_URL=https://openstudio-builds.s3.amazonaws.com/${OPENSTUDIO_VERSION}/$OPENSTUDIO_DOWNLOAD_FILENAME
export OPENSTUDIO_DOWNLOAD_URL=https://openstudio-builds.s3.amazonaws.com/3.3.0/$OPENSTUDIO_DOWNLOAD_FILENAME
export OPENSTUDIO_DOWNLOAD_URL=https://openstudio-ci-builds.s3-us-west-2.amazonaws.com/3.4.0-rc1/$OPENSTUDIO_DOWNLOAD_FILENAME

echo "OpenStudio Package Download URL is ${OPENSTUDIO_DOWNLOAD_URL}"
curl -SLO $OPENSTUDIO_DOWNLOAD_URL
Expand Down
2 changes: 1 addition & 1 deletion ci/github-actions/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ else
export OS_NAME=OpenStudio-${OPENSTUDIO_VERSION}${OPENSTUDIO_VERSION_EXT}%2B${OPENSTUDIO_VERSION_SHA}-Darwin
export OS_NAME_WITH_PLUS=OpenStudio-${OPENSTUDIO_VERSION}${OPENSTUDIO_VERSION_EXT}+${OPENSTUDIO_VERSION_SHA}-Darwin
#curl -SL --insecure https://openstudio-builds.s3.amazonaws.com/${OPENSTUDIO_VERSION}/${OS_NAME}.tar.gz -o $OS_NAME_WITH_PLUS.tar.gz
curl -SL --insecure https://openstudio-builds.s3.amazonaws.com/3.3.0/${OS_NAME}.tar.gz -o $OS_NAME_WITH_PLUS.tar.gz
curl -SL --insecure https://openstudio-ci-builds.s3-us-west-2.amazonaws.com/3.4.0-rc1/${OS_NAME}.tar.gz -o $OS_NAME_WITH_PLUS.tar.gz
# OSX downloads with %2B but installs with + sign. These are the encoded chars in url strings.
#hdiutil attach ${OS_NAME}.dmg
#sed -i -e "s|REPLACEME|$HOME/openstudio|" ci/github-actions/install-mac.qs
Expand Down
4 changes: 0 additions & 4 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ services:
environment:
- CI
- COVERALLS_REPO_TOKEN
- TRAVIS=true
- TRAVIS_JOB_ID
- TRAVIS_BRANCH
- TRAVIS_PULL_REQUEST
- OS_SERVER_NUMBER_OF_WORKERS=1
- MAX_REQUESTS=10
- MAX_POOL=10
Expand Down
10 changes: 5 additions & 5 deletions docker/deployment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,16 @@ Packer command is: packer build -machine-readable -var-file=user_variables.json

## Build process for official release

This script should only ever be run after the successful completion of a build of the master branch of this repo on
[TravisCI](https://travis-ci.org/NREL/OpenStudio-server). This automatically pushes tested docker images to
This script should only ever be run after the successful completion of a build of the main branch of this repo on
[GitHub Actions](https://github.com/NREL/OpenStudio-server/actions). This automatically pushes tested docker images to
[DockerHub](http://hub.docker.com/r/nrel) for both the [OpenStudio Server](http://hub.docker.com/r/nrel/openstudio-server/tags/)
and [OpenStudio Rserve](http://hub.docker.com/r/nrel/openstudio-rserve/tags/) images. These two images are what is
provisioned within the AMI built, and as such have to be created as DockerHub artefacts beforehand. For the purposes of
automation, however, a successful TravisCI build on the master branch is sufficient for executing the
provisioned within the AMI built, and as such have to be created as DockerHub artifacts beforehand. For the purposes of
automation, however, a successful GitHub Action build on the main branch is sufficient for executing the
`build_deploy_ami.py` script.

This script begins by collecting version information from the repository. This requires the cloned repository to have
the same SHA as the successful TravisCI build, i.e. latest master. This information, along with the AWS access and
the same SHA as the successful GitHub Action build, i.e. latest master. This information, along with the AWS access and
secret keys, is used to execute packer. Packer spins up a small (c3.xlarge) server from a base Ubuntu AMI. This server
then is configured based off of the [packer JSON file](http://github.com/NREL/OpenStudio-server/blob/develop/docker/deployment/openstudio_server_docker_base.json).
The log file of this process is written to the output directory as `build.log` and should be persisted in case of a
Expand Down
12 changes: 6 additions & 6 deletions server/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ ruby '~>2.7.0'
# gem update --system 2.7.8
# gem 'rubygems-update', '2.7.8'

gem 'rails', '6.1.3.1'
gem 'rails', '~> 6.1.3'
gem 'rake', '~> 13.0'

# added for support of the project rakefile
gem 'colored'

# data modules
gem 'jbuilder', '~> 2.11.2'
gem 'nokogiri', '~> 1.11.3'
gem 'nokogiri', '~> 1.11.7'
gem 'rubyzip', '~> 2.3.0'
gem 'tzinfo-data', '~>1.2021.1'

Expand Down Expand Up @@ -71,8 +71,8 @@ gem 'openstudio-workflow', '= 2.3.1'
gem 'openstudio-analysis', '= 1.2.0'

# Remove urbanopt cli gems for minor for releases as they use different versions of ext gems
#gem 'urbanopt-cli', '= 0.6.0'
#gem 'urbanopt-reopt', '= 0.6.0'
gem 'urbanopt-cli', '= 0.7.1'
gem 'urbanopt-reopt', '= 0.7.0'

## End commonly updated gems

Expand Down Expand Up @@ -117,15 +117,15 @@ group :development, :test do
gem 'capybara', '~> 3.35.3'
gem 'coveralls', '0.7.1', require: false
gem 'public_suffix', '~> 4.0.6'
gem 'puma', '~> 5.4.0' # used by capybara
gem 'puma', '~> 5.6.0' # used by capybara
gem 'rspec', '~> 3.10.0'
gem 'rspec-rails', '~> 5.0.1'
gem 'rspec-retry', '~> 0.6.2'
gem 'ruby-prof', '~> 1.4.3'
gem 'selenium-webdriver', '~> 3.142.7'

gem 'psych', '~> 3.3.1'
gem 'rubocop', '~> 0.54.0'
gem 'rubocop', '~> 1.15.0'
gem 'rubocop-checkstyle_formatter', '~> 0.4.0'
gem 'rubocop-rspec', '~> 1.26.0'

Expand Down
6 changes: 3 additions & 3 deletions server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ brew install geckodriver

There are several layers of testing for OpenStudio Server and each uses a different software solution.

* Unit/Functional Tests: Unit tests are run using TravisCI and AppVeyor. The functional tests use geckodriver and
* Unit/Functional Tests: Unit tests are run using GitHub Actions and AppVeyor. The functional tests use geckodriver and
selenium to test the frontend end.
* Integration Tests: These tests verify that the version of OpenStudio works with the version of OpenStudio Server and
the meta CLI. These are run as part of the Unit/Functional tests.
* Docker Tests and Publishing Containers: The Docker tests are run before publishing the new containers. The tests and
publishing scripts are run on TravisCI. These are only run the develop and master branch.
* Rubocop: These tests verify that the code meets the ruby / rails standard. These tests are currently run on travis.
publishing scripts are run on GitHub Actions. These are only run the develop and master branch.
* Rubocop: These tests verify that the code meets the ruby / rails standard. These tests are currently run on GitHub Actions.

# TODOs

Expand Down
6 changes: 3 additions & 3 deletions server/app/lib/openstudio_server/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
# *******************************************************************************

module OpenstudioServer
VERSION = '3.3.0'.freeze
VERSION = '3.4.0'.freeze
# format should be ^.*\-{1}[a-z]+[0-9]+
# for example: -rc1, -beta6, -customusecase0
VERSION_EXT = ''.freeze # with preceding - or +
OS_SHA = 'ad235ff36e'.freeze
VERSION_EXT = '-rc1'.freeze # with preceding - or +
OS_SHA = 'fb391396ca'.freeze
end

0 comments on commit 8e586f9

Please sign in to comment.