Skip to content

Commit

Permalink
Update CI builds for 11.0.
Browse files Browse the repository at this point in the history
Co-Authored-By: ryanrath <[email protected]>
  • Loading branch information
aaronweeden and ryanrath committed Dec 8, 2023
1 parent dad52f8 commit c9b5261
Show file tree
Hide file tree
Showing 14 changed files with 38 additions and 79 deletions.
19 changes: 8 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
version: 2.1

executors:
centos7:
rocky8: &rocky8-executor
docker:
- image: tools-ext-01.ccr.xdmod.org/xdmod-10.0.0:centos7.9-0.6
centos8: &centos8-executor
docker:
- image: tools-ext-01.ccr.xdmod.org/centos8-0.1:base
- image: tools-ext-01.ccr.xdmod.org/xdmod-10.5.0-x86_64:rockylinux8.5-0.3

jobs:
build:
Expand All @@ -18,16 +15,16 @@ jobs:
executor: << parameters.os >>
environment:
COMPOSER_ALLOW_SUPERUSER: 1
XDMOD_REALMS: 'jobs,storage'
XDMOD_BRANCH: xdmod10.5
XDMOD_REALMS: 'jobs,storage,cloud'
XDMOD_BRANCH: xdmod11.0
XDMOD_MODULE_NAME: appkernels
XDMOD_IS_CORE: yes
XDMOD_INSTALL_DIR: /xdmod
XDMOD_TEST_MODE: << parameters.install-type >>
steps:
- run:
name: Install Python3
command: yum -y install --setopt=tsflags=nodocs python3
command: dnf -y install --setopt=tsflags=nodocs python3
- run:
name: Generate OpenSSL Key
command: openssl genrsa -rand /proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/uptime 2048 > /etc/pki/tls/private/localhost.key
Expand All @@ -41,7 +38,7 @@ jobs:
- run:
name: Setup Environment Variables
command: |
echo "export XDMOD_APPKERNELS_DIR=$HOME/project" >> $BASH_ENV
echo "export XDMOD_APPKERNEL_DIR=$HOME/project" >> $BASH_ENV
echo "export XDMOD_SOURCE_DIR=$HOME/xdmod" >> $BASH_ENV
- run:
name: Setup & Run Tests
Expand All @@ -59,5 +56,5 @@ workflows:
- build:
matrix:
parameters:
os: [centos7]
install-type: ["fresh_install"]
os: [rocky8]
install-type: ["fresh_install", "upgrade"]
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM tools-ext-01.ccr.xdmod.org/xdmod-10.0.0:centos7.9-0.6
FROM tools-ext-01.ccr.xdmod.org/xdmod-10.5.0-x86_64:rockylinux8.5-0.3

# install python3 for akrr build
RUN yum -y install --setopt=tsflags=nodocs python3
RUN dnf -y install --setopt=tsflags=nodocs python3
4 changes: 2 additions & 2 deletions Tests.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

FROM tas-tools-ext-01.ccr.xdmod.org/centos7_6-open8.5.1:latest

RUN yum -y install --setopt=tsflags=nodocs python3 openssh-server && \
yum clean all
RUN dnf -y install --setopt=tsflags=nodocs python3 openssh-server && \
dnf clean all

COPY . /root/src/ubccr/xdmod-appkernels
WORKDIR /root/src/ubccr/xdmod-appkernels
Expand Down
2 changes: 1 addition & 1 deletion build.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xdmod-appkernels",
"version": "10.5.0",
"version": "11.0.0",
"release": "1.0",
"files": {
"include_paths": [
Expand Down
2 changes: 1 addition & 1 deletion classes/AppKernel/AppKernelDb.php
Original file line number Diff line number Diff line change
Expand Up @@ -2733,7 +2733,7 @@ public function calculateControls(
$larger = true;
$attr = explode(',', $metricAttribute);

if (isset($attr[2]) && count($attr[2]) > 0) {
if (isset($attr[2]) && strlen($attr[2]) > 0) {
$larger = substr($attr[2], 0, 1) != 'S';
}
if (isset($attr[1]) && $attr[1] !== '') {
Expand Down
2 changes: 1 addition & 1 deletion configuration/portal_settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ appkernels = "on"
[appkernels-general]

; The version number is updated during the upgrade process.
version = "10.5.0"
version = "11.0.0"

; App kernel database and metric configuration.
[appkernel]
Expand Down
4 changes: 2 additions & 2 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ defaults:
type: "pages"
values:
layout: "page"
version: "10.5"
sw_version: "10.5.0"
version: "11.0"
sw_version: "11.0.0"
style: "effervescence"
tocversion: "toc"

Expand Down
2 changes: 1 addition & 1 deletion docs/ak-install-rpm.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: Application Kernels RPM Installation Guide
Install RPM Package
-------------------

# yum install xdmod-appkernels-{{ page.sw_version }}-1.0.el7.noarch.rpm
# dnf install xdmod-appkernels-{{ page.sw_version }}-1.0.el8.noarch.rpm

Run Configuration Script
------------------------
Expand Down
47 changes: 0 additions & 47 deletions shippable.yml

This file was deleted.

6 changes: 3 additions & 3 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Run Tests with specific XDMoD branch

```shell script
docker run -it --rm -p 20080:8080 \
-e XDMOD_BRANCH=xdmod10.5 \
-e XDMOD_BRANCH=xdmod11.0 \
pseudo_repo/xdmod-appkernels-tests:latest
```

Expand All @@ -24,7 +24,7 @@ Same without rebuilding image by attaching host directory
```shell script
# in xdmod-appkernels directory
docker run -it --rm -p 20080:8080 \
-e XDMOD_BRANCH=xdmod10.5 \
-e XDMOD_BRANCH=xdmod11.0 \
-v `pwd`:/root/src/ubccr/xdmod-appkernels \
pseudo_repo/xdmod-appkernels-tests:latest
```
Expand All @@ -34,7 +34,7 @@ Using local XDMoD and adding remote debugging capabilities with port forwarding
# in xdmod-appkernels directory
docker run -it --rm \
-p 20443:443 -p 23306:3306 -p 20022:22 \
-e XDMOD_BRANCH=xdmod10.5 \
-e XDMOD_BRANCH=xdmod11.0 \
-v `pwd`/../xdmod:/root/src/ubccr/xdmod \
-v `pwd`/../xdmod-qa:/root/src/ubccr/xdmod-qa \
-v `pwd`:/root/src/ubccr/xdmod-appkernels \
Expand Down
1 change: 1 addition & 0 deletions tests/artifacts/create_akrr_db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ GRANT ALL ON mod_appkernel.* TO 'akrruser'@'localhost';
GRANT SELECT ON modw.* TO 'akrruser'@'localhost';
GRANT ALL ON mod_akrr.* TO 'xdmod'@'localhost';
GRANT ALL ON mod_appkernel.* TO 'xdmod'@'localhost';
FLUSH PRIVILEGES;
16 changes: 12 additions & 4 deletions tests/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ if [ "$(realpath "$XDMOD_DIR/open_xdmod/modules/appkernels")" != "$(realpath "$X
echo "$XDMOD_DIR/open_xdmod/modules/appkernels do not point to $XDMOD_APPKERNEL_DIR"
fi

COMPOSER=composer-el7.json composer install -d ../xdmod --no-progress
composer install -d ../xdmod --no-progress

# build xdmod rpms
cd ../xdmod
Expand Down Expand Up @@ -92,7 +92,7 @@ then
mysql -u root mod_appkernel < $XDMOD_APPKERNEL_DIR/tests/artifacts/mod_appkernel_xdmod_dev_test.sql

# install akrr
yum install -y $AKRR_DIR/dist/akrr-*.noarch.rpm
dnf install -y $AKRR_DIR/dist/akrr-*.noarch.rpm

# copy akrr config
cp -r $XDMOD_APPKERNEL_DIR/tests/artifacts/akrr ~/
Expand All @@ -114,7 +114,7 @@ then
# Add an upstream branch so that the QA tests will run successfully
git remote add upstream https://github.com/ubccr/xdmod-appkernels.git

git clone --depth=1 --branch=v1 https://github.com/ubccr/xdmod-qa.git .qa
git clone --depth=1 --branch=v2 https://github.com/ubccr/xdmod-qa.git .qa

cd $XDMOD_APPKERNEL_DIR
$SHIPPABLE_BUILD_DIR/.qa/scripts/install.sh ./
Expand Down Expand Up @@ -142,10 +142,18 @@ then
# Configure xdmod appkernels
expect $XDMOD_APPKERNEL_DIR/tests/ci/scripts/xdmod-appkernels-setup.tcl | col -b

# Ingest AK runs
xdmod-akrr-ingestor -q -l load -c -r

# Test report
appkernel_reports_manager -m centerdirector -v -d -e 2019-02-28

cd $SHIPPABLE_BUILD_DIR
git clone --depth=1 --branch=migrate_travis https://github.com/ryanrath/xdmod-qa.git .qa
git clone --depth=1 --branch=v2 https://github.com/ubccr/xdmod-qa.git .qa

cd $XDMOD_APPKERNEL_DIR
git remote add upstream https://github.com/ubccr/xdmod-appkernels.git

$SHIPPABLE_BUILD_DIR/.qa/scripts/install.sh ./
$SHIPPABLE_BUILD_DIR/.qa/scripts/build.sh
fi
6 changes: 3 additions & 3 deletions tests/utils/cmd_setup
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ setup_xdebug(){
cd
rpm -qa | grep php-pecl-xdebug > /dev/null 2>&1
if [ $? != 0 ]; then
yum install php-pecl-xdebug -y
dnf install php-pecl-xdebug -y
fi

grep 'xdebug.remote_host' /etc/php.d/xdebug.ini > /dev/null 2>&1
Expand All @@ -28,7 +28,7 @@ EOT

# Install SSHD, allow root to access
setup_sshd(){
yum install -y openssh-server
dnf install -y openssh-server

mkdir /var/run/sshd

Expand Down Expand Up @@ -129,7 +129,7 @@ END
runuser -l $AKRRUSER -c "echo \"export PATH=/root/akrr/bin:\$PATH\" >> $AKRRUSER_HOME/.bashrc"

# Install dependencies
yum install -y python MySQL-python openssl curl
dnf install -y python MySQL-python openssl curl
# akrr.sh start
}

Expand Down
2 changes: 1 addition & 1 deletion xdmod-appkernels.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Source: %{name}-%{version}__PRERELEASE__.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}__PRERELEASE__-%{release}-XXXXXX)
BuildArch: noarch
BuildRequires: php-cli
Requires: xdmod >= 10.5.0, xdmod < 10.6.0
Requires: xdmod >= 11.0.0, xdmod < 11.1.0

%description
This package provides application kernel support for Open XDMoD. The
Expand Down

0 comments on commit c9b5261

Please sign in to comment.