Skip to content

Commit

Permalink
Temporarily remove BPM in order to produce 0.26.1 release
Browse files Browse the repository at this point in the history
Revert "Adds BPM to broker"

This reverts commit de45cd2.

Co-authored-by: Winna Bridgewater <[email protected]>
  • Loading branch information
Kieron Browne and Winna Bridgewater committed Feb 21, 2019
1 parent c720f09 commit f77e90f
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 194 deletions.
4 changes: 0 additions & 4 deletions examples/deployment/operations/redis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
path: /instance_groups/name=broker/jobs/name=broker/properties/service_catalog/tags/-
value: redis

- type: replace
path: /instance_groups/name=broker/jobs/name=broker/properties/service_adapter?/mount_paths?/-
value: /var/vcap/jobs/service-adapter/config/service-adapter.conf

- type: replace
path: /instance_groups/name=broker/jobs/name=broker/properties/service_deployment?
value:
Expand Down
6 changes: 3 additions & 3 deletions jobs/broker/monit
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# 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.

check process broker
with pidfile /var/vcap/sys/run/bpm/broker/broker.pid
start program "/var/vcap/jobs/bpm/bin/bpm start broker"
stop program "/var/vcap/jobs/bpm/bin/bpm stop broker"
with pidfile /var/vcap/sys/run/broker/broker.pid
start program "/var/vcap/jobs/broker/bin/broker-ctl.sh start"
stop program "/var/vcap/jobs/broker/bin/broker-ctl.sh stop"
group vcap
10 changes: 3 additions & 7 deletions jobs/broker/spec
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
name: broker
templates:
post-start.erb: bin/post-start
broker-ctl.sh.erb: bin/broker-ctl.sh
broker.yml.erb: config/broker.yml
drain.sh.erb: bin/drain
broker.crt.erb: certs/broker.crt
broker.key.erb: certs/broker.key
bpm.yml.erb: config/bpm.yml

packages:
- broker
Expand Down Expand Up @@ -182,12 +182,8 @@ properties:
description: Secret of UAA client with permissions to read and write to BOSH CredHub

service_adapter.path:
description: The path to the service adapter binary located on the host with the broker
default: "/var/vcap/packages/odb-service-adapter/bin/service-adapter"

service_adapter.mount_paths:
description: "Filesystem paths to be mounted for use by the service adapter. This should include the paths to any config files."
default: []
description: the path to the service adapter binary located on the host with the broker
default: /var/vcap/packages/odb-service-adapter/bin/service-adapter

service_deployment.releases:
description: releases to deploy for each instance
Expand Down
34 changes: 0 additions & 34 deletions jobs/broker/templates/bpm.yml.erb

This file was deleted.

65 changes: 65 additions & 0 deletions jobs/broker/templates/broker-ctl.sh.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/bin/bash -eu

# Copyright (C) 2016-Present Pivotal Software, Inc. All rights reserved.
# This program and the accompanying materials are made available under the terms of the 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 -o pipefail

job_dir=/var/vcap/jobs/broker
log_dir=/var/vcap/sys/log/broker
run_dir=/var/vcap/sys/run/broker
run_script=/var/vcap/packages/broker/bin/on-demand-service-broker

pidfile=$run_dir/broker.pid

utils_path=/var/vcap/packages/broker_utils
source ${utils_path}/log.sh
source ${utils_path}/common.sh

ensure_dir $job_dir
ensure_dir $log_dir
ensure_dir $run_dir

export LOG_FILE=$log_dir/broker_ctl.log

case $1 in
start)
log info "starting broker"
echo $$ > $pidfile
ensure_dir $run_dir

exec chpst -u vcap:vcap $run_script \
-configFilePath /var/vcap/jobs/broker/config/broker.yml \
>> $log_dir/broker.log 2>&1
;;

stop)
log info "stopping broker"

set +e
kill -9 $(cat $pidfile)
kill_exit_code=$?

pkill -9 -f $run_script
pkill_exit_code=$?
set -e

if [[ $kill_exit_code -ne 0 && $pkill_exit_code -ne 0 ]]; then
echo "Failed to stop broker process"
exit 1
fi

rm -f $pidfile
;;

*)
log warning "operation '$1' is not supported"
echo "Usage: broker-ctl.sh start/stop" >&2
exit 1
;;

esac
2 changes: 1 addition & 1 deletion jobs/broker/templates/drain.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -eu
source /var/vcap/packages/broker_utils/common.sh

log_dir=/var/vcap/sys/log/broker
run_dir=/var/vcap/sys/run/bpm/broker
run_dir=/var/vcap/sys/run/broker
drain_log="${log_dir}/drain.log"

ensure_dir ${log_dir}
Expand Down
119 changes: 0 additions & 119 deletions spec/broker_bpm_spec.rb

This file was deleted.

10 changes: 0 additions & 10 deletions spec/fixtures/valid-broker-bpm-config-custom-adapter-path.yml

This file was deleted.

6 changes: 0 additions & 6 deletions spec/fixtures/valid-broker-bpm-config-no-mounts.yml

This file was deleted.

10 changes: 0 additions & 10 deletions spec/fixtures/valid-broker-bpm-config.yml

This file was deleted.

0 comments on commit f77e90f

Please sign in to comment.