Skip to content

Commit

Permalink
Add container package
Browse files Browse the repository at this point in the history
  • Loading branch information
treydock committed Jul 24, 2024
1 parent 1498f09 commit 19fd6d0
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 2 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,30 @@ jobs:
- name: Test k8s-bootstrap
run: /bin/bash hooks/k8s-bootstrap/k8s-bootstrap-ondemand.sh test hooks/hook.env.example

docker-tests:
runs-on: ubuntu-latest
name: Docker tests
steps:
- name: Checkout ${{ github.sha }}
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.OSC_ROBOT_DOCKERHUB_USER }}
password: ${{ secrets.OSC_ROBOT_DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: false
file: packaging/container/Dockerfile
build-args: ['VERSION=3.1']
tags: ohiosupercomputer/ondemand:latest
platforms: linux/amd64,linux/arm64

e2e-tests:
strategy:
fail-fast: false
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ RUN dnf -y update && \
ondemand-apache \
ondemand-ruby \
ondemand-nodejs \
ondemand-python \
ondemand-dex \
ondemand-passenger \
ondemand-nginx && \
Expand All @@ -39,7 +38,7 @@ RUN mkdir -p /opt/ood
RUN mkdir -p /var/www/ood/{apps,public,discover}
RUN mkdir -p /var/www/ood/apps/{sys,dev,usr}

COPY docker/launch-ood /opt/ood/launch
COPY packaging/container/launch-ood /opt/ood/launch
COPY mod_ood_proxy /opt/ood/mod_ood_proxy
COPY nginx_stage /opt/ood/nginx_stage
COPY ood-portal-generator /opt/ood/ood-portal-generator
Expand Down
44 changes: 44 additions & 0 deletions packaging/container/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
FROM rockylinux/rockylinux:8
LABEL maintainer="[email protected]; [email protected]"

ARG VERSION=3.1

# setup the ondemand repositories
RUN dnf -y install https://yum.osc.edu/ondemand/${VERSION}/ondemand-release-web-${VERSION}-1.el8.noarch.rpm

# install all the dependencies
RUN dnf -y update && \
dnf install -y dnf-utils epel-release && \
dnf config-manager --set-enabled powertools && \
dnf -y module enable nodejs:18 ruby:3.1 && \
dnf install -y \
ondemand \
ondemand-dex && \
dnf clean all && rm -rf /var/cache/dnf/*

COPY launch-ood /opt/ood/launch

# copy configuration files
RUN mkdir -p /etc/ood/config
RUN cp /opt/ood/nginx_stage/share/nginx_stage_example.yml /etc/ood/config/nginx_stage.yml
RUN cp /opt/ood/ood-portal-generator/share/ood_portal_example.yml /etc/ood/config/ood_portal.yml

# make some misc directories & files
RUN mkdir -p /var/lib/ondemand-nginx/config/apps/{sys,dev,usr}
RUN touch /var/lib/ondemand-nginx/config/apps/sys/{dashboard,shell,myjobs}.conf

# setup sudoers for apache
RUN echo -e 'Defaults:apache !requiretty, !authenticate \n\
Defaults:apache env_keep += "NGINX_STAGE_* OOD_*" \n\
apache ALL=(ALL) NOPASSWD: /opt/ood/nginx_stage/sbin/nginx_stage' >/etc/sudoers.d/ood

# run the OOD executables to setup the env
RUN /opt/ood/ood-portal-generator/sbin/update_ood_portal --insecure
RUN /opt/ood/nginx_stage/sbin/update_nginx_stage
# this one bc centos:8 doesn't generate localhost cert
RUN /usr/libexec/httpd-ssl-gencerts

EXPOSE 8080
EXPOSE 5556
EXPOSE 3035
CMD [ "/opt/ood/launch" ]
File renamed without changes.
File renamed without changes.

0 comments on commit 19fd6d0

Please sign in to comment.