Skip to content

Commit

Permalink
Merge pull request #315 from SUSE/fdb-enable-tls-opensuse-base
Browse files Browse the repository at this point in the history
Fdb enable tls opensuse base
  • Loading branch information
nwmac authored Feb 19, 2020
2 parents daedc68 + 278e28d commit ec897c3
Show file tree
Hide file tree
Showing 133 changed files with 8,525 additions and 5,071 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ docs
coverage
dist
.dist
tmp
outputs
coverage
e2e-reports
vendor
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ src/backend/*/vendor/
.v8flags*

*.bak
secrets.yaml
./secrets.yaml
build/dev_config.json
e2e-reports/
.stratos-git-metadata.json
Expand Down
11 changes: 1 addition & 10 deletions build/tools/mysqldb-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,6 @@ rm dockerize
echo "Just waiting a few seconds for the DB to come online ..."
docker exec -t ${ID} /dockerize -wait file:///var/run/mysql/mysql.sock -timeout 1m

echo "Database ready"
docker exec -t ${ID} /init.sh

mkdir -p ${STRATOS_PATH}/src/jetstream/db
cp ${STRATOS_PATH}/deploy/db/dbconf.yml ${STRATOS_PATH}/src/jetstream/db

if [ -f ${STRATOS_PATH}/src/jetstream/jetstream ]; then
${STRATOS_PATH}/src/jetstream/jetstream --env=mariadb-dev up
else
echo "Build the Stratos backend and run db migrations with:"
echo " ./jetstream --env=mariadb-local up"
fi
echo "Database ready"
10 changes: 0 additions & 10 deletions build/tools/postgres-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,3 @@ echo "Just waiting a few seconds for the DB to come online ..."
sleep 5

echo "Database ready"

mkdir -p ${STRATOS_PATH}/src/jetstream/db
cp ${STRATOS_PATH}/deploy/db/dbconf.yml ${STRATOS_PATH}/src/jetstream/db

if [ -f ${STRATOS_PATH}/src/jetstream/jetstream ]; then
${STRATOS_PATH}/src/jetstream/jetstream --env=postgres-dev up
else
echo "Build the Stratos backend and run db migrations with:"
echo " ./jetstream --env=postgres-local up"
fi
24 changes: 24 additions & 0 deletions custom-src/deploy/kubernetes/custom-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This file is included in the build script

printf "${BOLD}${YELLOW}"
echo
echo "==========================================================================="
echo "SUSE Helm Chart Customization script loaded <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
echo "==========================================================================="
echo
printf "${RESET}"

# Script must provide a function named 'custom_image_build'

function custom_image_build() {

log "-- Building/publishing Foundation DB Server"
patchAndPushImage stratos-fdbserver Dockerfile "${STRATOS_PATH}/deploy/containers/monocular/fdb-server"

log "-- Building/publishing Foundation DB Document Layer"
patchAndPushImage stratos-fdbdoclayer Dockerfile "${STRATOS_PATH}/deploy/containers/monocular/fdb-doclayer"

# Build and push an image for the Helm Repo Sync Tool
log "-- Building/publishing Monocular Chart Repo Sync Tool"
patchAndPushImage stratos-chartsync Dockerfile "${STRATOS_PATH}/src/jetstream/plugins/monocular/chart-repo"
}
22 changes: 0 additions & 22 deletions deploy/Dockerfile.bk
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,9 @@ FROM splatform/stratos-bk-base:leap15_1 as common-build
COPY --from=builder /home/stratos/src/jetstream/jetstream /srv/
RUN chmod +x /srv/jetstream

# use --target=db-migrator to build db-migrator image
FROM splatform/stratos-bk-base:leap15_1 as db-migrator
WORKDIR /src
COPY deploy/db/dbconf.yml db/dbconf.yml
COPY deploy/db/scripts/development.sh .
COPY deploy/db/scripts/wait-for-it.sh .
COPY --from=common-build /srv/jetstream .
RUN chmod +x wait-for-it.sh
RUN chmod +x development.sh
CMD bash /src/wait-for-it.sh -t 90 mariadb:3306 && bash /src/development.sh

# use --target=postflight-job to build prod postflight-job
FROM splatform/stratos-bk-base:leap15_1 as postflight-job
RUN zypper -n in mariadb-client
COPY --from=common-build /srv/jetstream /usr/local/bin/jetstream
COPY deploy/db/dbconf.yml db/dbconf.yml
COPY deploy/db/scripts/run-postflight-job.k8s.sh /run-postflight-job.sh
CMD ["/run-postflight-job.sh"]

# use --target=prod-build to build a backend image for Kubernetes
FROM splatform/stratos-bk-base:leap15_1 as prod-build
RUN zypper in -y curl
COPY deploy/containers/proxy/entrypoint.sh /entrypoint.sh
COPY /deploy/db/scripts/run-preflight-job.sh /run-preflight-job.sh
COPY /deploy/db/scripts/migrate-volumes.sh /migrate-volumes.sh
COPY /deploy/tools/generate_cert.sh /generate_cert.sh
COPY --from=common-build /srv /srv
RUN mkdir /srv/templates
Expand Down
3 changes: 3 additions & 0 deletions deploy/Dockerfile.init
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM splatform/stratos-bk-init-base:leap15_1
COPY /deploy/containers/config-init/config-init.sh /config-init.sh
COPY /deploy/tools/generate_cert.sh /generate_cert.sh
4 changes: 3 additions & 1 deletion deploy/ci/automation/helmtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ NAMESPACE=stratos-ns
HELM_REPO=https://cloudfoundry.github.io/stratos
HELM_REPO_NAME=cfstratos

DEV_IMAGE_VERSION=2.0.0-dev
# Image tag to use - this script only builds the chart
# Normally we use the nightly images for testing here
DEV_IMAGE_VERSION=${STRATOS_IMAGE_TAG:-3.0.0-nightly}

function deleteRelease {
helm delete ${NAME} --purge
Expand Down
57 changes: 0 additions & 57 deletions deploy/ci/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,30 +28,6 @@ resources:
stop: 2:00 AM
location: UTC
# Docker Images
- name: jetstream-dc-image
type: docker-image
source:
username: ((docker-username))
password: ((docker-password))
repository: ((docker-organization))/stratos-dc-jetstream
- name: dc-db-migrator-image
type: docker-image
source:
username: ((docker-username))
password: ((docker-password))
repository: ((docker-organization))/stratos-dc-db-migrator
- name: mariadb-dc-image
type: docker-image
source:
username: ((docker-username))
password: ((docker-password))
repository: ((docker-organization))/stratos-dc-mariadb
- name: ui-dc-image
type: docker-image
source:
username: ((docker-username))
password: ((docker-password))
repository: ((docker-organization))/stratos-dc-console
- name: jetstream-helm-image
type: docker-image
source:
Expand Down Expand Up @@ -81,7 +57,6 @@ groups:
- name: tests
jobs:
- build-helm-images
- build-dc-images
- build-aio-image

jobs:
Expand Down Expand Up @@ -117,38 +92,6 @@ jobs:
tag_as_latest: true
timeout: 2h30m

- name: build-dc-images
plan:
- get: stratos
- get: after-midnight
trigger: true
- aggregate:
- do:
- put: jetstream-dc-image
params:
dockerfile: stratos/deploy/Dockerfile.bk
build: stratos/
target_name: dev-build
tag_as_latest: true
- put: dc-db-migrator-image
params:
dockerfile: stratos/deploy/Dockerfile.bk
build: stratos/
target_name: db-migrator
tag_as_latest: true
- put: mariadb-dc-image
params:
dockerfile: stratos/deploy/db/Dockerfile.mariadb
build: stratos/deploy/db
tag_as_latest: true
- put: ui-dc-image
params:
dockerfile: stratos/deploy/Dockerfile.ui
build: stratos/
target_name: prod-build
tag_as_latest: true
timeout: 2h30m

- name: build-aio-image
public: true
serial: true
Expand Down
8 changes: 4 additions & 4 deletions deploy/ci/console-dev-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ resources:
username: ((docker-username))
password: ((docker-password))
repository: ((docker-repository))/stratos-jetstream
- name: postflight-image
- name: config-init-image
type: docker-image
source:
username: ((docker-username))
password: ((docker-password))
repository: ((docker-repository))/stratos-postflight-job
repository: ((docker-repository))/stratos-config-init
- name: mariadb-image
type: docker-image
source:
Expand Down Expand Up @@ -122,9 +122,9 @@ jobs:
build_args_file: image-tag/build-args
patch_base_reg: ((patch-base-reg))
patch_base_tag: ((patch-base-tag))
- put: postflight-image
- put: config-init-image
params:
dockerfile: stratos/deploy/Dockerfile.bk
dockerfile: stratos/deploy/Dockerfile.init
build: stratos/
target_name: postflight-job
tag: image-tag/v2-alpha-tag
Expand Down
Loading

0 comments on commit ec897c3

Please sign in to comment.