Skip to content

Commit

Permalink
Merge branch 'main' of github.com:cloudfoundry/bosh into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
git committed Aug 16, 2024
2 parents b5dd016 + 3c89d70 commit f9f6045
Show file tree
Hide file tree
Showing 799 changed files with 292 additions and 312 deletions.
8 changes: 4 additions & 4 deletions ci/dockerfiles/docker-cpi/create-and-upload-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,24 @@ pushd "${bosh_path}" > /dev/null
bosh_release_path="$(realpath "$(find . -maxdepth 1 -name "*.tgz")")"
popd > /dev/null

bosh upload-release ${bosh_release_path} --name=bosh
bosh upload-release "${bosh_release_path}" --name=bosh


pushd "${src_dir}/src/go/src/github.com/cloudfoundry/bosh-release-acceptance-tests/assets/linked-templates-release" > /dev/null
pushd "${src_dir}/src/brats/assets/linked-templates-release" > /dev/null
if [[ ! -e $(find . -maxdepth 1 -name "*.tgz") ]]; then
bosh reset-release
bosh create-release --force --tarball release.tgz
fi
popd > /dev/null

pushd ${BOSH_DEPLOYMENT_PATH} > /dev/null
pushd "${BOSH_DEPLOYMENT_PATH}" > /dev/null
inner_bosh_dir="/tmp/inner-bosh/director/$node_number"
node_number=$1
if [[ -n "$node_number" ]]; then
inner_bosh_dir="/tmp/inner-bosh/director/${node_number}"
fi

mkdir -p ${inner_bosh_dir}
mkdir -p "${inner_bosh_dir}"

export BOSH_DIRECTOR_IP="10.245.0.$((10+$node_number))"

Expand Down
2 changes: 1 addition & 1 deletion ci/dockerfiles/integration/build-docker-args.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ image_resource:
inputs:
- name: bosh-deployment
- name: bosh-src
- name: bosh-src-dockerfiles

outputs:
- name: docker-build-args
Expand All @@ -17,5 +18,4 @@ run:
path: bosh-src-dockerfiles/ci/dockerfiles/integration/build-docker-args.sh

params:
BRANCH:
GITHUB_ACCESS_TOKEN:
8 changes: 4 additions & 4 deletions ci/dockerfiles/warden-cpi/create-and-upload-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,24 @@ pushd "${bosh_path}" > /dev/null
bosh_release_path="$(realpath "$(find . -maxdepth 1 -name "*.tgz")")"
popd > /dev/null

bosh upload-release ${bosh_release_path} --name=bosh
bosh upload-release "${bosh_release_path}" --name=bosh


pushd "${src_dir}/src/go/src/github.com/cloudfoundry/bosh-release-acceptance-tests/assets/linked-templates-release" > /dev/null
pushd "${src_dir}/src/brats/assets/linked-templates-release" > /dev/null
if [[ ! -e $(find . -maxdepth 1 -name "*.tgz") ]]; then
bosh reset-release
bosh create-release --force --tarball release.tgz
fi
popd > /dev/null

pushd ${BOSH_DEPLOYMENT_PATH} > /dev/null
pushd "${BOSH_DEPLOYMENT_PATH}" > /dev/null
inner_bosh_dir="/tmp/inner-bosh/director/$node_number"
node_number=$1
if [[ -n "$node_number" ]]; then
inner_bosh_dir="/tmp/inner-bosh/director/${node_number}"
fi

mkdir -p ${inner_bosh_dir}
mkdir -p "${inner_bosh_dir}"

export BOSH_DIRECTOR_IP="10.245.0.$((10+$node_number))"

Expand Down
17 changes: 12 additions & 5 deletions ci/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -721,20 +721,27 @@ jobs:
trigger: true
- get: golang-docker-image
trigger: true
- get: ubuntu-docker-image
trigger: true
- get: bosh-src-dockerfiles
trigger: true
- get: bosh-src
- get: bosh-deployment
- get: ubuntu-docker-image
params:
depth: 1
- task: build-docker-args
file: bosh-src-dockerfiles/ci/dockerfiles/integration/build-docker-args.yml
params:
GITHUB_ACCESS_TOKEN: ((github_public_repo_token))
- put: integration-image
inputs:
- bosh-src-dockerfiles
- docker-build-args
params:
tag_as_latest: true
build: .
build_args_file: docker-build-args/docker-build-args.json
dockerfile: bosh-src-dockerfiles/ci/dockerfiles/integration/Dockerfile
BRANCH: ((branch_name))
tag_as_latest: true
get_params:
skip_download: true

Expand Down Expand Up @@ -869,7 +876,7 @@ jobs:
GEM_DIRS: src
GIT_USER_NAME: CI Bot
GIT_USER_EMAIL: cf-bosh-eng@pivotal.io
PACKAGE: ruby-3.2
PACKAGE: ruby-3.3
VENDOR: true
VENDOR_PATH: vendor/cache
- task: test
Expand Down Expand Up @@ -994,7 +1001,7 @@ jobs:
params:
GIT_USER_NAME: CI Bot
GIT_USER_EMAIL: cf-bosh-eng@pivotal.io
PACKAGE: ruby-3.2
PACKAGE: ruby-3.3
PACKAGE_PREFIX: "director"
PRIVATE_YML: |
blobstore:
Expand Down
6 changes: 3 additions & 3 deletions ci/tasks/test-brats-performance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ src_dir="${script_dir}/../../.."

export BOSH_DEPLOYMENT_PATH="/usr/local/bosh-deployment"

source ${src_dir}/bosh-src/ci/dockerfiles/docker-cpi/start-bosh.sh
source "${src_dir}/bosh-src/ci/dockerfiles/docker-cpi/start-bosh.sh"
source /tmp/local-bosh/director/env

bosh int /tmp/local-bosh/director/creds.yml --path /jumpbox_ssh/private_key > /tmp/jumpbox_ssh_key.pem
Expand All @@ -31,13 +31,13 @@ bosh -n update-cloud-config \
-o "${src_dir}/bosh-src/ci/dockerfiles/docker-cpi/outer-cloud-config-ops.yml" \
-v network=director_network

bosh -n upload-stemcell $CANDIDATE_STEMCELL_TARBALL_PATH
bosh -n upload-stemcell "${CANDIDATE_STEMCELL_TARBALL_PATH}"
bosh upload-release /usr/local/bpm.tgz
bosh upload-release "$(bosh int ${BOSH_DEPLOYMENT_PATH}/docker/cpi.yml --path /name=cpi/value/url)" \
--sha1 "$(bosh int ${BOSH_DEPLOYMENT_PATH}/docker/cpi.yml --path /name=cpi/value/sha1)"
bosh upload-release "$(bosh int ${BOSH_DEPLOYMENT_PATH}/jumpbox-user.yml --path /release=os-conf/value/url)" \
--sha1 "$(bosh int ${BOSH_DEPLOYMENT_PATH}/jumpbox-user.yml --path /release=os-conf/value/sha1)"

pushd ${src_dir}/bosh-src/src/go/src/github.com/cloudfoundry/bosh-release-acceptance-tests > /dev/null
pushd "${src_dir}/bosh-src/src/brats" > /dev/null
go run github.com/onsi/ginkgo/v2/ginkgo --timeout=24h -r --race --nodes 1 performance
popd > /dev/null
48 changes: 26 additions & 22 deletions ci/tasks/test-brats.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
#!/usr/bin/env bash

set -eu
set -eu -o pipefail

script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
src_dir="${script_dir}/../../.."

export OVERRIDDEN_BOSH_DEPLOYMENT=$(realpath "$(dirname $0)/../../../bosh-deployment")
OVERRIDDEN_BOSH_DEPLOYMENT=$(realpath "$(dirname $0)/../../../bosh-deployment")
export OVERRIDDEN_BOSH_DEPLOYMENT
if [[ -e ${OVERRIDDEN_BOSH_DEPLOYMENT}/bosh.yml ]];then
export BOSH_DEPLOYMENT_PATH=${OVERRIDDEN_BOSH_DEPLOYMENT}
else
export BOSH_DEPLOYMENT_PATH="/usr/local/bosh-deployment"
fi

set +e
source /tmp/local-bosh/director/env
set -e
if ! bosh env; then
if [ ! -f /tmp/local-bosh/director/env ]; then
source "${src_dir}/bosh-src/ci/dockerfiles/docker-cpi/start-bosh.sh"
fi

source /tmp/local-bosh/director/env

bosh int /tmp/local-bosh/director/creds.yml --path /jumpbox_ssh/private_key > /tmp/jumpbox_ssh_key.pem
Expand Down Expand Up @@ -48,24 +44,32 @@ bosh -n update-cloud-config \
-o "${src_dir}/bosh-src/ci/dockerfiles/docker-cpi/outer-cloud-config-ops.yml" \
-v network=director_network

bosh -n upload-stemcell $CANDIDATE_STEMCELL_TARBALL_PATH
bosh -n upload-stemcell "${CANDIDATE_STEMCELL_TARBALL_PATH}"

apt-get update
apt-get install -y mysql-client postgresql-client

if [ -d database-metadata ]; then
export RDS_MYSQL_EXTERNAL_DB_HOST="$(jq -r .aws_mysql_endpoint database-metadata/metadata | cut -d':' -f1)"
export RDS_POSTGRES_EXTERNAL_DB_HOST="$(jq -r .aws_postgres_endpoint database-metadata/metadata | cut -d':' -f1)"
export GCP_MYSQL_EXTERNAL_DB_HOST="$(jq -r .gcp_mysql_endpoint database-metadata/metadata)"
export GCP_POSTGRES_EXTERNAL_DB_HOST="$(jq -r .gcp_postgres_endpoint database-metadata/metadata)"
export GCP_MYSQL_EXTERNAL_DB_CA="$(jq -r .gcp_mysql_ca database-metadata/metadata)"
export GCP_MYSQL_EXTERNAL_DB_CLIENT_CERTIFICATE="$(jq -r .gcp_mysql_client_cert database-metadata/metadata)"
export GCP_MYSQL_EXTERNAL_DB_CLIENT_PRIVATE_KEY="$(jq -r .gcp_mysql_client_key database-metadata/metadata)"
export GCP_POSTGRES_EXTERNAL_DB_CA="$(jq -r .gcp_postgres_ca database-metadata/metadata)"
export GCP_POSTGRES_EXTERNAL_DB_CLIENT_CERTIFICATE="$(jq -r .gcp_postgres_client_cert database-metadata/metadata)"
export GCP_POSTGRES_EXTERNAL_DB_CLIENT_PRIVATE_KEY="$(jq -r .gcp_postgres_client_key database-metadata/metadata)"
RDS_MYSQL_EXTERNAL_DB_HOST="$(jq -r .aws_mysql_endpoint database-metadata/metadata | cut -d':' -f1)"
export RDS_MYSQL_EXTERNAL_DB_HOST
RDS_POSTGRES_EXTERNAL_DB_HOST="$(jq -r .aws_postgres_endpoint database-metadata/metadata | cut -d':' -f1)"
export RDS_POSTGRES_EXTERNAL_DB_HOST
GCP_MYSQL_EXTERNAL_DB_HOST="$(jq -r .gcp_mysql_endpoint database-metadata/metadata)"
export GCP_MYSQL_EXTERNAL_DB_HOST
GCP_POSTGRES_EXTERNAL_DB_HOST="$(jq -r .gcp_postgres_endpoint database-metadata/metadata)"
export GCP_POSTGRES_EXTERNAL_DB_HOST
GCP_MYSQL_EXTERNAL_DB_CA="$(jq -r .gcp_mysql_ca database-metadata/metadata)"
export GCP_MYSQL_EXTERNAL_DB_CA
GCP_MYSQL_EXTERNAL_DB_CLIENT_CERTIFICATE="$(jq -r .gcp_mysql_client_cert database-metadata/metadata)"
export GCP_MYSQL_EXTERNAL_DB_CLIENT_CERTIFICATE
GCP_MYSQL_EXTERNAL_DB_CLIENT_PRIVATE_KEY="$(jq -r .gcp_mysql_client_key database-metadata/metadata)"
export GCP_MYSQL_EXTERNAL_DB_CLIENT_PRIVATE_KEY
GCP_POSTGRES_EXTERNAL_DB_CA="$(jq -r .gcp_postgres_ca database-metadata/metadata)"
export GCP_POSTGRES_EXTERNAL_DB_CA
GCP_POSTGRES_EXTERNAL_DB_CLIENT_CERTIFICATE="$(jq -r .gcp_postgres_client_cert database-metadata/metadata)"
export GCP_POSTGRES_EXTERNAL_DB_CLIENT_CERTIFICATE
GCP_POSTGRES_EXTERNAL_DB_CLIENT_PRIVATE_KEY="$(jq -r .gcp_postgres_client_key database-metadata/metadata)"
export GCP_POSTGRES_EXTERNAL_DB_CLIENT_PRIVATE_KEY
fi

pushd bosh-src > /dev/null
scripts/test-brats
popd > /dev/null
bosh-src/scripts/test-brats
2 changes: 1 addition & 1 deletion ci/tasks/test-brats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ run:
path: bosh-src/ci/tasks/test-brats.sh

params:
FOCUS_SPEC: ""
FOCUS_SPEC:
RDS_MYSQL_EXTERNAL_DB_USER: replace-me
RDS_MYSQL_EXTERNAL_DB_PASSWORD: replace-me
RDS_MYSQL_EXTERNAL_DB_NAME: replace-me
Expand Down
2 changes: 1 addition & 1 deletion docs/running_tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export BOSH_CLIENT=admin
export BOSH_CLIENT_SECRET=`bosh int ~/workspace/bosh-deployment/vbox/creds.yml --path /admin_password`
export BOSH_CA_CERT=`bosh int ~/workspace/bosh-deployment/vbox/creds.yml --path /director_ssl/ca`
export BOSH_ENVIRONMENT='vbox'
ginkgo -r src/go/src/github.com/cloudfoundry/bosh-release-acceptance-tests
ginkgo -r src/brats
```

## Determining which tests suites to run
Expand Down
23 changes: 9 additions & 14 deletions scripts/test-brats
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env bash
set -e
set -eu -o pipefail
set -x

script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

Expand All @@ -13,17 +14,11 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# BOSH_DIRECTOR_RELEASE_PATH
# BOSH_BINARY_PATH

pushd "${script_dir}/../src/go/src/github.com/cloudfoundry/bosh-release-acceptance-tests" || exit 1
if [[ -n "${FOCUS_SPEC+x}" ]];then
go run github.com/onsi/ginkgo/v2/ginkgo -r -v \
--race --randomize-suites --randomize-all \
--skip-package=performance \
--focus="${FOCUS_SPEC}" \
-nodes 5 \
brats
else
go run github.com/onsi/ginkgo/v2/ginkgo -r -v \
--race --randomize-suites --randomize-all \
--skip-package=performance
fi
pushd "${script_dir}/../src/brats" || exit 1
go run github.com/onsi/ginkgo/v2/ginkgo -r -v \
--race --randomize-suites --randomize-all \
--skip-package=performance \
--focus="${FOCUS_SPEC:-}" \
-nodes 5 \
.
popd
2 changes: 1 addition & 1 deletion src/.ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.5
3.3.4
6 changes: 1 addition & 5 deletions src/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ gem 'bosh_common', path: 'bosh_common'

gem 'rake', '~>13.0.3'

# Bumping to openssl 3.2.0 while we are still on Ruby 3.2. This version
# implements features necessary to support running on a FIPS stemcell.
# If this is modified, it will need to be modified in the gemspecs for each
# gem.
gem 'openssl', '>=3.2.0'
gem 'openssl'

# json version is hardcoded in release director and health_monitor
# when modified needs to be updated there as well
Expand Down
20 changes: 10 additions & 10 deletions src/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PATH
remote: bosh-core
specs:
bosh-core (0.0.0)
openssl (>= 3.2.0)
openssl

PATH
remote: bosh-dev
Expand All @@ -13,15 +13,15 @@ PATH
bosh_common
bundler
logging
openssl (>= 3.2.0)
openssl

PATH
remote: bosh-director-core
specs:
bosh-director-core (0.0.0)
bosh-template (~> 0.0.0)
bosh_common (~> 0.0.0)
openssl (>= 3.2.0)
openssl

PATH
remote: bosh-director
Expand All @@ -38,7 +38,7 @@ PATH
logging (~> 2.2.2)
membrane (~> 1.1.0)
nats-pure
openssl (>= 3.2.0)
openssl
prometheus-client (~> 2.1.0)
puma
rack-test
Expand All @@ -65,7 +65,7 @@ PATH
logging (~> 2.2.2)
nats-pure
net-smtp
openssl (>= 3.2.0)
openssl
puma
riemann-client
sinatra (~> 2.2.0)
Expand All @@ -76,7 +76,7 @@ PATH
bosh-nats-sync (0.0.0)
cf-uaa-lib (~> 3.2.1)
logging (~> 2.2.2)
openssl (>= 3.2.0)
openssl
rest-client
rufus-scheduler

Expand All @@ -85,15 +85,15 @@ PATH
specs:
bosh-template (0.0.0)
activesupport
openssl (>= 3.2.0)
openssl
semi_semantic (~> 1.2.0)

PATH
remote: bosh_common
specs:
bosh_common (0.0.0)
logging (~> 2.2.2)
openssl (>= 3.2.0)
openssl
semi_semantic (~> 1.2.0)

GEM
Expand Down Expand Up @@ -383,7 +383,7 @@ DEPENDENCIES
mysql2
nats-pure (~> 2.3)
net-ssh
openssl (>= 3.2.0)
openssl
parallel_tests (~> 2.0)
pg
pry-byebug
Expand All @@ -407,4 +407,4 @@ DEPENDENCIES
webmock

BUNDLED WITH
2.4.22
2.5.11
2 changes: 1 addition & 1 deletion src/bosh-core/bosh-core.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = %w[lib]

spec.add_dependency 'openssl', '>=3.2.0'
spec.add_dependency 'openssl'
end
2 changes: 1 addition & 1 deletion src/bosh-dev/bosh-dev.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'bosh-director'
spec.add_dependency 'bundler'
spec.add_dependency 'logging'
spec.add_dependency 'openssl', '>=3.2.0'
spec.add_dependency 'openssl'

spec.add_development_dependency 'fakefs'
end
Loading

0 comments on commit f9f6045

Please sign in to comment.