Skip to content

Commit fa35052

Browse files
authored
Merge pull request #153 from ubccr/isc-hpc-updates
First pass at updates for ISC HPC
2 parents bdee951 + 4aa5df3 commit fa35052

17 files changed

Lines changed: 2340 additions & 32 deletions

.env

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
HPCTS_VERSION="2022.07"
1+
HPCTS_VERSION="2023.05"
22
SLURM_VERSION="21.08.8-2"
33
MARIADB_VERSION=10.3
44
MONGODB_VERSION=5.0
5+
COLDFRONT_RESTORE="true"

coldfront/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ RUN /build/install.sh && rm -rf /build
1313
COPY --chown=coldfront:coldfront local_settings.py /etc/coldfront/local_settings.py
1414
COPY --chown=coldfront:coldfront coldfront.env /etc/coldfront/coldfront.env
1515
COPY --chown=coldfront:coldfront checkdb.py /srv/www/checkdb.py
16+
COPY coldfront.dump /usr/share/coldfront/coldfront.dump
1617
COPY coldfront-nginx.conf /etc/nginx/conf.d/coldfront.conf
1718
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
1819
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

coldfront/coldfront.dump

Lines changed: 2290 additions & 0 deletions
Large diffs are not rendered by default.

coldfront/entrypoint.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ then
2424

2525
if ! coldfront show_users_in_project_but_not_in_allocation &> /dev/null; then
2626
echo "-- Initializing coldfront database..."
27-
coldfront initial_setup
27+
coldfront initial_setup -f
2828

2929
echo "-- Generating static css files..."
3030
coldfront collectstatic
@@ -34,6 +34,11 @@ then
3434
coldfront shell
3535
fi
3636

37+
if [ "$2" = "true" ]; then
38+
echo "---> Restoring coldfront database..."
39+
mysql --host mysql --user coldfrontapp --password=9obCuAphabeg coldfront < /usr/share/coldfront/coldfront.dump
40+
fi
41+
3742
echo "---> Starting nginx on coldfront..."
3843
/sbin/nginx
3944

coldfront/install.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ ARCHTYPE=`uname -m`
1111

1212
log_info "Installing required packages for coldfront.."
1313
dnf install -y \
14-
python3 \
15-
python3-devel \
14+
python39-devel \
1615
memcached \
1716
nginx \
1817
openssl \

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ services:
160160
context: ./coldfront
161161
args:
162162
HPCTS_VERSION: $HPCTS_VERSION
163-
command: ["serve"]
163+
command: ["serve", $COLDFRONT_RESTORE]
164164
hostname: coldfront
165165
container_name: coldfront
166166
networks:

hpcts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ log_warn() {
1010

1111
start() {
1212
log_info "Fetching latest HPC Toolset Images.."
13-
docker-compose pull
13+
docker compose pull
1414

1515
log_info "Starting HPC Toolset Cluster.."
16-
docker-compose up -d --no-build
16+
docker compose up -d --no-build
1717

1818
log_info "Coldfront URL: https://localhost:2443"
1919
log_info "OnDemand URL: https://localhost:3443"
@@ -23,14 +23,14 @@ start() {
2323

2424
stop() {
2525
log_info "Stopping HPC Toolset Cluster containers.."
26-
docker-compose stop
26+
docker compose stop
2727
}
2828

2929
destroy() {
3030
log_info "Stopping and removing HPC Toolset Cluster containers and volumes.."
31-
docker-compose stop && \
32-
docker-compose rm -f -v && \
33-
docker-compose down -v
31+
docker compose stop && \
32+
docker compose rm -f -v && \
33+
docker compose down -v
3434
}
3535

3636
cleanup() {

ondemand/Dockerfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
ARG HPCTS_VERSION=latest
22

33
FROM --platform=linux/amd64 ubccr/hpcts:slurm-${HPCTS_VERSION} as stage-amd64
4-
RUN dnf install -y https://yum.osc.edu/ondemand/2.0/ondemand-release-web-2.0-1.noarch.rpm
4+
RUN dnf install -y https://yum.osc.edu/ondemand/3.0/ondemand-release-web-3.0-1.noarch.rpm
55
RUN dnf install -y netcat ondemand ondemand-dex
6-
RUN sed -i 's/\-nohttpd//' /opt/ood/ondemand/root/usr/share/gems/2.7/ondemand/2.0.27/gems/ood_core-0.19.0/lib/ood_core/batch_connect/templates/vnc.rb
76

87
FROM --platform=linux/arm64 ubccr/hpcts:slurm-${HPCTS_VERSION} as stage-arm64
98
RUN dnf install -y file lsof sudo gcc gcc-c++ git \
@@ -16,7 +15,6 @@ COPY . /build
1615
RUN /build/install-dex-arm64.sh
1716
RUN /build/install-passenger-arm64.sh
1817
RUN /build/install-ood-arm64.sh
19-
RUN sed -i 's/\-nohttpd//' /usr/share/gems/gems/ood_core-0.19.0/lib/ood_core/batch_connect/templates/vnc.rb
2018
RUN rm -rf /build
2119

2220
ARG TARGETARCH
@@ -35,6 +33,4 @@ COPY notebook_data /data/notebook_data
3533
COPY initializers/dashboard.rb /etc/ood/config/apps/dashboard/initializers/dashboard.rb
3634
COPY themes/hpc-coop /usr/share/ondemand-dex/web/themes/hpc-coop
3735

38-
RUN sed -i '/ passenger_load_shell_envvars off;/a passenger_preload_bundler on;' /opt/ood/nginx_stage/templates/pun.conf.erb
39-
4036
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

ondemand/cluster-config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ v2:
1313
vnc:
1414
script_wrapper: |
1515
export PATH="/opt/TurboVNC/bin:$PATH"
16-
export WEBSOCKIFY_CMD="/usr/bin/websockify"
16+
export WEBSOCKIFY_CMD="/usr/local/bin/websockify"
1717
%s
1818
custom:
1919
xdmod:

ondemand/install-dex-arm64.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ log_info() {
77
printf "\n\e[0;35m $1\e[0m\n\n"
88
}
99

10-
DEX_VERSION=${DEX_VERSION:-2.31.1}
11-
DEX_PATCH_VERSION=${DEX_PATCH_VERSION:-703e26bc109e86d00be22ef1803bdb96b2dc09e2}
10+
DEX_VERSION=${DEX_VERSION:-2.32.0}
11+
DEX_PATCH_VERSION=${DEX_PATCH_VERSION:-9366a1969bd656daa1df44e0bdd02f14437ed466}
1212

1313
dnf install -y golang-bin
1414
log_info "Install dex ${DEX_VERSION}..."

0 commit comments

Comments
 (0)