1
+ # #######
2
+ # base #
3
+ # #######
4
+
1
5
# Specify the opensciencegrid/software-base image tag
2
6
ARG BASE_YUM_REPO=release
3
7
4
- FROM opensciencegrid/software-base:$BASE_YUM_REPO
5
-
8
+ FROM opensciencegrid/software-base:$BASE_YUM_REPO AS base
6
9
LABEL maintainer
"OSG Software <[email protected] >"
7
10
11
+ # previous arg has gone out of scope
8
12
ARG BASE_YUM_REPO=release
9
13
10
14
# Ensure that the 'condor' UID/GID matches across containers
@@ -31,15 +35,87 @@ RUN if [[ $BASE_YUM_REPO = release ]]; then \
31
35
yum clean all && \
32
36
rm -rf /var/cache/yum/
33
37
34
- COPY etc/osg/image-config.d/* /etc/osg/image-config.d/
35
- COPY etc/condor-ce/config.d/* /usr/share/condor-ce/config.d/
36
- COPY usr/local/bin/* /usr/local/bin/
37
- COPY etc/supervisord.d/* /etc/supervisord.d/
38
+ COPY base/ etc/osg/image-config.d/* /etc/osg/image-config.d/
39
+ COPY base/ etc/condor-ce/config.d/* /usr/share/condor-ce/config.d/
40
+ COPY base/ usr/local/bin/* /usr/local/bin/
41
+ COPY base/ etc/supervisord.d/* /etc/supervisord.d/
38
42
39
43
# do the bad thing of overwriting the existing cron job for fetch-crl
40
- ADD etc/cron.d/fetch-crl /etc/cron.d/fetch-crl
44
+ ADD base/ etc/cron.d/fetch-crl /etc/cron.d/fetch-crl
41
45
RUN chmod 644 /etc/cron.d/fetch-crl
42
46
43
47
# HACK: override condor_ce_jobmetrics from SOFTWARE-4183 until it is released in
44
48
# HTCondor-CE.
45
- COPY overrides/condor_ce_jobmetrics /usr/share/condor-ce/condor_ce_jobmetrics
49
+ COPY base/overrides/condor_ce_jobmetrics /usr/share/condor-ce/condor_ce_jobmetrics
50
+
51
+ # ################
52
+ # osg-ce-condor #
53
+ # ################
54
+
55
+ FROM base AS osg-ce-condor
56
+ ARG BASE_YUM_REPO=release
57
+ LABEL maintainer
"OSG Software <[email protected] >"
58
+
59
+ RUN if [[ $BASE_YUM_REPO = release ]]; then \
60
+ yumrepo=osg-upcoming; else \
61
+ yumrepo=osg-upcoming-$BASE_YUM_REPO; fi && \
62
+ yum install -y --enablerepo=$yumrepo \
63
+ osg-ce-condor && \
64
+ yum clean all && \
65
+ rm -rf /var/cache/yum/
66
+
67
+ COPY osg-ce-condor/etc/osg/image-config.d/* /etc/osg/image-config.d/
68
+ COPY osg-ce-condor/etc/condor/config.d/* /etc/condor/config.d/
69
+ COPY osg-ce-condor/usr/local/bin/* /usr/local/bin/
70
+ COPY osg-ce-condor/etc/supervisord.d/* /etc/supervisord.d/
71
+
72
+ # ############
73
+ # hosted-ce #
74
+ # ############
75
+
76
+ FROM base AS hosted-ce
77
+ LABEL maintainer
"OSG Software <[email protected] >"
78
+
79
+ ARG BASE_YUM_REPO=release
80
+
81
+ RUN if [[ $BASE_YUM_REPO = release ]]; then \
82
+ yumrepo=osg-upcoming; else \
83
+ yumrepo=osg-upcoming-$BASE_YUM_REPO; fi && \
84
+ yum install -y --enablerepo=$yumrepo \
85
+ osg-ce-bosco && \
86
+ rm -rf /var/cache/yum/
87
+
88
+ COPY hosted-ce/30-remote-site-setup.sh /etc/osg/image-config.d/
89
+
90
+ # HACK: override condor_ce_jobmetrics from SOFTWARE-4183 until it is released in
91
+ # HTCondor-CE.
92
+ ADD hosted-ce/overrides/condor_ce_jobmetrics /usr/share/condor-ce/condor_ce_jobmetrics
93
+
94
+ # Use "ssh -q" in bosco_cluster until the chang has been upstreamed to condor
95
+ COPY hosted-ce/overrides/ssh_q.patch /tmp
96
+ RUN patch -d / -p0 < /tmp/ssh_q.patch
97
+
98
+ # Enable bosco_cluster xtrace
99
+ COPY hosted-ce/overrides/bosco_cluster_xtrace.patch /tmp
100
+ RUN patch -d / -p0 < /tmp/bosco_cluster_xtrace.patch
101
+
102
+ # HACK: Don't copy over the SSH pub key to the remote side. We set
103
+ # this up with the site out of band.
104
+ COPY hosted-ce/overrides/skip_key_copy.patch /tmp
105
+ RUN patch -d / -p0 < /tmp/skip_key_copy.patch
106
+
107
+ # Fix Ubuntu20 OS detection (SOFTWARE-4463)
108
+ # Can be dropped when HTCONDOR-242 is involved
109
+ COPY hosted-ce/overrides/HTCONDOR-242.remote-os-detection.patch /tmp
110
+ RUN [[ $BASE_YUM_REPO == 'development' ]] || patch -d / -p0 < /tmp/HTCONDOR-242.remote-os-detection.patch
111
+
112
+ # Set up Bosco override dir from Git repo (SOFTWARE-3903)
113
+ # Expects a Git repo with the following directory structure:
114
+ # RESOURCE_NAME_1/
115
+ # bosco_override/
116
+ # ...
117
+ # RESOURCE_NAME_2/
118
+ # bosco_override/
119
+ # ...
120
+ # ...
121
+ COPY hosted-ce/bosco-override-setup.sh /usr/local/bin
0 commit comments