Skip to content

Commit b19d49d

Browse files
committed
fix(builder): configure to use http with minio and fetcher, https with outside storage
we’ve removed ssl support for minio in alpha. it will be added later. see deis/minio#22 for related changes
1 parent 647c9a3 commit b19d49d

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

rootfs/etc/confd/templates/builder

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,18 +97,20 @@ fi
9797

9898
git archive --format=tar.gz ${GIT_SHA} > ${APP_NAME}.tar.gz
9999

100+
HTTP_PREFIX="http"
100101
# if minio is in the cluster, use it. otherwise use fetcher
101102
# TODO: figure out something for using S3 also
102103
if [[ -n "$DEIS_MINIO_SERVICE_HOST" && -n "$DEIS_MINIO_SERVICE_PORT" ]]; then
103104
S3EP=${DEIS_MINIO_SERVICE_HOST}:${DEIS_MINIO_SERVICE_PORT}
104105
elif [[ -n "$DEIS_OUTSIDE_STORAGE_HOST" && -n "$DEIS_OUTSIDE_STORAGE_HOST" ]]; then
106+
HTTP_PREFIX="https"
105107
S3EP=${DEIS_OUTSIDE_STORAGE_HOST}:${DEIS_OUTSIDE_STORAGE_HOST}
106108
elif [ -z "$S3EP" ]; then
107109
S3EP=${HOST}:3000
108110
fi
109111

110-
TAR_URL=http://$S3EP/git/home/${SLUG_NAME}/tar
111-
PUSH_URL=http://$S3EP/git/home/${SLUG_NAME}/push
112+
TAR_URL=$HTTP_PREFIX://$S3EP/git/home/${SLUG_NAME}/tar
113+
PUSH_URL=$HTTP_PREFIX://$S3EP/git/home/${SLUG_NAME}/push
112114

113115
sed -i -- "s#repo_name#$META_NAME#g" /etc/${SLUG_NAME}.yaml
114116
sed -i -- "s#puturl#$PUSH_URL#g" /etc/${SLUG_NAME}.yaml
@@ -122,8 +124,8 @@ cp $CERT_FILE /etc/ssl/certs/deis-minio-self-signed-cert.crt
122124
mkdir -p /var/minio-conf
123125
CONFIG_DIR=/var/minio-conf
124126
MC_PREFIX="mc -C $CONFIG_DIR --quiet"
125-
$MC_PREFIX config host all "https://$S3EP" $ACCESS_KEY $ACCESS_SECRET
126-
$MC_PREFIX mb "${S3EP}/git"
127+
$MC_PREFIX config host all "$HTTP_PREFIX://$S3EP" $ACCESS_KEY $ACCESS_SECRET
128+
$MC_PREFIX mb "$HTTP_PREFIX://${S3EP}/git"
127129
$MC_PREFIX cp ${APP_NAME}.tar.gz $TAR_URL
128130
echo "stored tarfile in $TAR_URL"
129131

0 commit comments

Comments
 (0)