Skip to content

Commit

Permalink
Added yum repo to the build server
Browse files Browse the repository at this point in the history
  • Loading branch information
mambelli committed Dec 21, 2024
1 parent 606e839 commit 38db23d
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 0 deletions.
14 changes: 14 additions & 0 deletions workspaces/build-workspace/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ RUN yum -y install https://linux-mirrors.fnal.gov/linux/fermilab/almalinux/9/yum
# Kerberos cache does not work properly in containers, using files
COPY build-workspace/config/0_file_ccache /etc/krb5.conf.d/0_file_ccache

# To export the RPMs in a yum repository
RUN yum -y install httpd createrepo_c

# This must be after all dnf/yum and pip commands
# Cleaning YUM and DNF all caches (including disabled repos) and pip caches to reduce size of image
RUN rm -rf /var/cache/yum/* /var/cache/dnf/* /root/.cache/pip/*
Expand All @@ -59,6 +62,17 @@ RUN mkdir -p /opt/osg/svnrepo && \
popd; done && \
chown -R abc: /opt/osg

# YUM repo setup
RUN mkdir -p /opt/repo/main /opt/repo/alt && \
chown -R abc: /opt/repo
COPY --chown=abc:abc build-workspace/config/build.repo /opt/repo/
COPY build-workspace/config/yumrepo.conf /etc/httpd/conf.d/

# Deploy utility scripts
COPY build-workspace/scripts /opt/scripts
COPY shared/scripts/create-host-certificate.sh /opt/scripts
RUN ln -s /opt/scripts/* /usr/local/bin

# Default entry point
CMD ["/bin/bash"]

Expand Down
16 changes: 16 additions & 0 deletions workspaces/build-workspace/config/build.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# SPDX-FileCopyrightText: 2020 Fermi Research Alliance, LLC
# SPDX-License-Identifier: Apache-2.0

[gwms-build]
name=GlideinWMS Build Server for Enterprise Linux 9 - x86_64
baseurl=http://build-workspace.glideinwms.org/repo/main/
enabled=1
gpgcheck=0
priority=75

[gwms-build-alt]
name=GlideinWMS Build Server for Enterprise Linux 9 - x86_64
baseurl=http://build-workspace.glideinwms.org/repo/alt/
enabled=0
gpgcheck=0
priority=75
13 changes: 13 additions & 0 deletions workspaces/build-workspace/config/yumrepo.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Configuration for the YUM repository

# SPDX-FileCopyrightText: 2020 Fermi Research Alliance, LLC
# SPDX-License-Identifier: Apache-2.0

Alias /repo /opt/repo
<Directory /opt/repo>
# Apache 2.4
Require all granted
Options Indexes FollowSymLinks MultiViews
#Options -Indexes
AllowOverride
</Directory>
8 changes: 8 additions & 0 deletions workspaces/build-workspace/scripts/startup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

# SPDX-FileCopyrightText: 2020 Fermi Research Alliance, LLC
# SPDX-License-Identifier: Apache-2.0

GWMS_DIR=/opt/gwms

bash /opt/scripts/create-host-certificate.sh -d "$GWMS_DIR"/secrets
25 changes: 25 additions & 0 deletions workspaces/compose-buildserver.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SPDX-FileCopyrightText: 2020 Fermi Research Alliance, LLC
# SPDX-License-Identifier: Apache-2.0

# This compose file deploys the build and YUM server.

services:

ce-workspace:
container_name: build-workspace.glideinwms.org
build:
context: .
cache_from:
- ${IMAGE_NAMESPACE-glideinwms}/build-workspace:${IMAGE_LABEL-latest}
dockerfile: build-workspace/Dockerfile
image: ${IMAGE_NAMESPACE-glideinwms}/build-workspace:${IMAGE_LABEL-latest}
networks:
- gwms
hostname: build-workspace.glideinwms.org
tty: true
stdin_open: true
stop_grace_period: 2s

networks:
gwms:
driver: bridge

0 comments on commit 38db23d

Please sign in to comment.