Skip to content

Commit

Permalink
Adding mongodb dependencies to XDMoD (#1656)
Browse files Browse the repository at this point in the history
* Adding mongodb deps for xdmod

* Updating centos8 image

* working on circleci ui tests

* Adding os specific composer files

With the divergence between CentOS7 and 8 in regards to how they handle
the mongodb driver installation ( via rpm in CentOS7 vs via pecl in 8)
in addition to which driver is actually installed ( pecl's mongo library
vs. pecl's mongodb library do to the mongo library being abandoned ), it
has become necessary, at least temporarily, that we maintain a different
composer.json file for el7 vs. el8 builds. This will only impact el8
installations that want to utilize the `xdmod-supremm` module, and only
in that there are two additional system requirements, a
`yum install php-devel php-pear` and a `pecl install mongodb`.

These changes necessitated a modification of the CircleCI build so that
the `COMPOSER` environment variable is set to point to the appropriate
composer-el[7|8].json file.

Another note is that these changes / additional composer.json file will
only be necessary until 10.5 when we discontinue support for CentOS7.

* Updating the CircleCI composer cache

By adding the OS specific composer.json files we now also need to
update the CircleCI composer caches to account for this.

* Updating centos8 composer deps

* Ensuring that QA tests use composer.json

* second times the charm?

* third times the charm

* Updating README.md to account for the split composer files

* Appeasing style gods

* less is more

Co-authored-by: Ryan Rathsam <[email protected]>
  • Loading branch information
ryanrath and Ryan Rathsam authored Jul 1, 2022
1 parent 46f742b commit 3c368bf
Show file tree
Hide file tree
Showing 6 changed files with 5,328 additions and 101 deletions.
69 changes: 48 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
version: 2.1

executors:
centos7:
centos7: &centos7-executor
docker:
- image: tools-ext-01.ccr.xdmod.org/xdmod-9.5.0:centos7.9-0.3
centos8: &centos8-executor
docker:
- image: tools-ext-01.ccr.xdmod.org/centos8-0.3:base
- image: tools-ext-01.ccr.xdmod.org/centos8.4:base
jobs:
build:
parameters:
Expand Down Expand Up @@ -38,17 +38,43 @@ jobs:
#- setup_remote_docker:
# docker_layer_caching: true
# Download and cache dependencies
- restore_cache:
keys:
# "composer.lock" can be used if it is committed to the repo
- v1-dependencies-{{ checksum "composer.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- when:
condition:
equal: [ *centos8-executor, << parameters.os >> ]
steps:
- run:
name: Setup Environment Variables for centos8
command: |
echo "export COMPOSER=composer-el8.json" >> $BASH_ENV
- restore_cache:
keys:
# "composer.lock" can be used if it is committed to the repo
- v1-el8-dependencies-{{ checksum "composer-el8.json" }}
# fallback to using the latest cache if no exact match is found
- v1-el8-dependencies-
- save_cache:
key: v1-el8-dependencies-{{ checksum "composer-el8.json" }}
paths:
- ./vendor
- when:
condition:
equal: [ *centos7-executor, << parameters.os >> ]
steps:
- run:
name: Setup Environment Variables for centos7
command: |
echo "export COMPOSER=composer-el7.json" >> $BASH_ENV
- restore_cache:
keys:
# "composer.lock" can be used if it is committed to the repo
- v1-el7-dependencies-{{ checksum "composer-el7.json" }}
# fallback to using the latest cache if no exact match is found
- v1-el7-dependencies-
- save_cache:
key: v1-el7-dependencies-{{ checksum "composer-el7.json" }}
paths:
- ./vendor
- run: composer install --no-progress
- save_cache:
key: v1-dependencies-{{ checksum "composer.json" }}
paths:
- ./vendor
- run:
name: Create Test Artifact Directories
command: |
Expand All @@ -65,11 +91,13 @@ jobs:
name: Make sure that the Composer Test Depedencies are installed
command: composer install --no-progress
- run:
name: Setup & Run QA Tests
command: ./tests/ci/scripts/qa-test-setup.sh
name: Make sure that we reset COMPOSER when upgrading.
command: |
echo "export COMPOSER=composer.json" >> $BASH_ENV
- run:
name: Make sure that the Composer Test Depedencies are installed
command: composer install --no-progress
name: Setup & Run QA Tests
command: |
./tests/ci/scripts/qa-test-setup.sh
- run: ./tests/regression/runtests.sh
- run:
name: Setup Configuration Files for Integration Tests
Expand All @@ -85,15 +113,14 @@ jobs:
condition:
equal: [ *centos8-executor, << parameters.os >> ]
steps:
- run:
name: Update the chromedriver version for Centos8
command: sed -i 's/91.0.0/92.0.0/' /root/project/tests/ui/package.json
- run:
name: Install new chromedriver
command: |
cd /root/project/tests/ui
pushd /root/project/tests/ui
rm -rf node_modules
rm -f package-lock.json
npm install
cd /root/project
popd
- run: ./tests/ui/runtests.sh --headless --log-junit ~/phpunit
- run:
name: 'Run SSO Tests'
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,10 @@ below on these or any other platforms, please let us know. The tested version
of composer is 1.3.2 (TravisCI builds use --stable)

1. Change directory to the root of the Open XDMoD repository.
1. Install Composer dependencies for Open XDMoD.
2. Install Composer dependencies for Open XDMoD.
- `export COMPOSER=composer-el[7|8].json`
- use `el7` if you are building this on CentOS7 w/ PHP5.4
- use `el8` if you are building this on CentOS8 ( or equivalent ) w/ PHP7.2
- `composer install`
- Depending on the versions of various software installed on your system,
you may run into errors. If you do, see the [Building FAQ](#building-faq)
Expand Down
File renamed without changes.
Loading

0 comments on commit 3c368bf

Please sign in to comment.