You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2018/09/05 19:52:14 UTC

[GitHub] Fokko closed pull request #3844: [AIRFLOW-3003] Pull the krb5 image instead of building

Fokko closed pull request #3844: [AIRFLOW-3003] Pull the krb5 image instead of building
URL: https://github.com/apache/incubator-airflow/pull/3844
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/scripts/ci/2-setup-kdc.sh b/scripts/ci/2-setup-kdc.sh
index 56824f5a5e..c5cd381c2f 100755
--- a/scripts/ci/2-setup-kdc.sh
+++ b/scripts/ci/2-setup-kdc.sh
@@ -30,7 +30,7 @@ KRB5_KTNAME=/etc/airflow.keytab
 cat /etc/hosts
 echo "hostname: ${FQDN}"
 
-sudo cp $DIRNAME/krb5/krb-conf/client/krb5.conf /etc/krb5.conf
+sudo cp $DIRNAME/krb5/krb5.conf /etc/krb5.conf
 
 echo -e "${PASS}\n${PASS}" | sudo kadmin -p ${ADMIN}/admin -w ${PASS} -q "addprinc -randkey airflow/${FQDN}"
 sudo kadmin -p ${ADMIN}/admin -w ${PASS} -q "ktadd -k ${KRB5_KTNAME} airflow"
diff --git a/scripts/ci/docker-compose.yml b/scripts/ci/docker-compose.yml
index 32e0a536c1..4accf119f6 100644
--- a/scripts/ci/docker-compose.yml
+++ b/scripts/ci/docker-compose.yml
@@ -57,8 +57,7 @@ services:
       - ./openldap/ldif:/container/service/slapd/assets/config/bootstrap/ldif/custom
 
   krb5-kdc-server:
-    build: ./krb5
-    image: krb5-kdc-server
+    image: godatadriven/krb5-kdc-server
     hostname: krb5-kdc-server
     domainname: example.com
 
diff --git a/scripts/ci/krb5/Dockerfile b/scripts/ci/krb5/Dockerfile
deleted file mode 100644
index cdb4cf979e..0000000000
--- a/scripts/ci/krb5/Dockerfile
+++ /dev/null
@@ -1,52 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-FROM ubuntu:xenial
-
-# environment variables
-ENV DEBIAN_FRONTEND noninteractive
-
-# Kerberos server
-RUN apt-get update && apt-get install --no-install-recommends -y \
-    ntp \
-    python-dev \
-    python-pip \
-    python-wheel \
-    python-setuptools \
-    python-pkg-resources \
-    krb5-admin-server \
-    krb5-kdc
-
-RUN mkdir /app/
-
-# Supervisord
-RUN pip install supervisor==3.3.4
-RUN mkdir -p /var/log/supervisord/
-
-COPY ./krb-conf/server/kdc.conf /etc/krb5kdc/kdc.conf
-COPY ./krb-conf/server/kadm5.acl /etc/krb5kdc/kadm5.acl
-COPY ./krb-conf/client/krb5.conf /etc/krb5.conf
-COPY ./start_kdc.sh /app/start_kdc.sh
-
-# supervisord
-COPY ./supervisord.conf /etc/supervisord.conf
-
-WORKDIR /app
-
-# when container is starting
-CMD ["/bin/bash", "/app/start_kdc.sh"]
diff --git a/scripts/ci/krb5/krb-conf/server/kadm5.acl b/scripts/ci/krb5/krb-conf/server/kadm5.acl
deleted file mode 100644
index 41d17385ff..0000000000
--- a/scripts/ci/krb5/krb-conf/server/kadm5.acl
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-*/admin@TEST.LOCAL    *
diff --git a/scripts/ci/krb5/krb-conf/server/kdc.conf b/scripts/ci/krb5/krb-conf/server/kdc.conf
deleted file mode 100644
index c21095f418..0000000000
--- a/scripts/ci/krb5/krb-conf/server/kdc.conf
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-[kdcdefaults]
-kdc_ports = 88
-kdc_tcp_ports = 88
-
-[realms]
-TEST.LOCAL = {
-  #master_key_type = aes256-cts
-  acl_file = /etc/krb5kdc/kadm5.acl
-  dict_file = /usr/share/dict/words
-  admin_keytab = /var/krb5kdc/kadm5.keytab
-  max_renewable_life = 7d 0h 0m 0s
-  supported_enctypes = aes256-cts:normal aes128-cts:normal des3-hmac-sha1:normal arcfour-hmac:normal des-hmac-sha1:normal des-cbc-md5:normal des-cbc-crc:normal
-}
diff --git a/scripts/ci/krb5/krb-conf/client/krb5.conf b/scripts/ci/krb5/krb5.conf
similarity index 92%
rename from scripts/ci/krb5/krb-conf/client/krb5.conf
rename to scripts/ci/krb5/krb5.conf
index 471737a964..77c78d686e 100644
--- a/scripts/ci/krb5/krb-conf/client/krb5.conf
+++ b/scripts/ci/krb5/krb5.conf
@@ -30,7 +30,7 @@ renew_lifetime = 7d
 forwardable = true
 
 [realms]
- TEST.LOCAL = {
-   kdc = krb5-kdc-server:88
-   admin_server = krb5-kdc-server
- }
+TEST.LOCAL = {
+  kdc = krb5-kdc-server:88
+  admin_server = krb5-kdc-server
+}
diff --git a/scripts/ci/krb5/start_kdc.sh b/scripts/ci/krb5/start_kdc.sh
deleted file mode 100755
index 6e02f006fa..0000000000
--- a/scripts/ci/krb5/start_kdc.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env bash
-
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-set -exuo pipefail
-
-FQDN=`hostname`
-ADMIN="admin"
-PASS="airflow"
-KRB5_KTNAME=/etc/airflow.keytab
-
-cat /etc/hosts
-echo "hostname: ${FQDN}"
-# create kerberos database
-echo -e "${PASS}\n${PASS}" | kdb5_util create -s
-# create admin
-echo -e "${PASS}\n${PASS}" | kadmin.local -q "addprinc ${ADMIN}/admin"
-# create airflow
-echo -e "${PASS}\n${PASS}" | kadmin.local -q "addprinc -randkey airflow"
-echo -e "${PASS}\n${PASS}" | kadmin.local -q "addprinc -randkey airflow/${FQDN}"
-kadmin.local -q "ktadd -k ${KRB5_KTNAME} airflow"
-kadmin.local -q "ktadd -k ${KRB5_KTNAME} airflow/${FQDN}"
-
-# Start services
-/usr/local/bin/supervisord -n -c /etc/supervisord.conf
diff --git a/scripts/ci/krb5/supervisord.conf b/scripts/ci/krb5/supervisord.conf
deleted file mode 100644
index 165e5cde84..0000000000
--- a/scripts/ci/krb5/supervisord.conf
+++ /dev/null
@@ -1,43 +0,0 @@
-;
-; Licensed to the Apache Software Foundation (ASF) under one
-; or more contributor license agreements.  See the NOTICE file
-; distributed with this work for additional information
-; regarding copyright ownership.  The ASF licenses this file
-; to you under the Apache License, Version 2.0 (the
-; "License"); you may not use this file except in compliance
-; with the License.  You may obtain a copy of the License at
-;
-;   http://www.apache.org/licenses/LICENSE-2.0
-;
-; Unless required by applicable law or agreed to in writing,
-; software distributed under the License is distributed on an
-; "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-; KIND, either express or implied.  See the License for the
-; specific language governing permissions and limitations
-; under the License.
-
-; supervisord.conf - kdc-server
-
-[supervisord]
-logfile=/var/log/supervisord/supervisord.log    ; supervisord log file
-logfile_maxbytes=50MB                           ; maximum size of logfile before rotation
-logfile_backups=10                              ; number of backed up logfiles
-loglevel=error                                  ; info, debug, warn, trace
-pidfile=/var/run/supervisord.pid                ; pidfile location
-nodaemon=false                                  ; run supervisord as a daemon
-minfds=1024                                     ; number of startup file descriptors
-minprocs=200                                    ; number of process descriptors
-user=root                                       ; default user
-childlogdir=/var/log/supervisord/               ; where child log files will live
-
-[program:krb5-kdc]
-command=service krb5-kdc start
-autostart=true
-autorestart=true
-
-[program:krb5-admin-server]
-command=service krb5-admin-server start
-autostart=true
-autorestart=true
-
-[supervisorctl]


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services