Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading chef server components with the latest version #6183

Merged
merged 4 commits into from
Dec 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .expeditor/verify_private.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ steps:
- label: "a1migration"
command:
- integration/run_test integration/tests/a1migration.sh
timeout_in_minutes: 20
timeout_in_minutes: 30
expeditor:
executor:
linux:
Expand Down
5 changes: 5 additions & 0 deletions .license_scout.yml
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,9 @@ fallbacks:
- name: core/ruby26
license_id: BSD-2-Clause
license_content: https://raw.githubusercontent.com/ruby/ruby/trunk/COPYING
- name: core/ruby27
license_id: BSD-2-Clause
license_content: https://raw.githubusercontent.com/ruby/ruby/trunk/COPYING
- name: core/cacerts
license_id: MPL-2.0
license_content: https://curl.haxx.se/docs/caextract.html
Expand Down Expand Up @@ -459,6 +462,8 @@ exceptions:
reason: Exception made by Chef Legal
- name: core/ruby30
reason: Ruby license (previously shipped in Automate 1)
- name: core/ruby27
reason: Exception made for chef server upgrade


ruby:
Expand Down
4 changes: 2 additions & 2 deletions components/automate-cs-bookshelf/habitat/plan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pkg_name="automate-cs-bookshelf"
pkg_description="Wrapper package for chef/bookshelf"
pkg_origin="chef"
# WARNING: Version managed by .expeditor/update_chef_server.sh
pkg_version="14.4.4"
pkg_version="14.11.36"
vendor_origin="chef"
pkg_maintainer="Chef Software Inc. <support@chef.io>"
pkg_license=("Chef-MLSA")
Expand All @@ -15,7 +15,7 @@ pkg_deps=(
chef/mlsa
"${local_platform_tools_origin:-chef}/automate-platform-tools"
# WARNING: Version pin managed by .expeditor/update_chef_server.sh
"${vendor_origin}/bookshelf/14.4.4/20210520120637"
"${vendor_origin}/bookshelf/14.11.36/20211227114241"
)

pkg_binds=(
Expand Down
12 changes: 6 additions & 6 deletions components/automate-cs-nginx/habitat/plan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ vendor_origin="chef"
pkg_maintainer="Chef Software Inc. <support@chef.io>"
pkg_license=('Chef-MLSA')
# WARNING: Version managed by .expeditor/update_chef_server.sh
pkg_version="14.4.4"
pkg_version="14.11.36"
pkg_deps=(
core/coreutils
chef/mlsa
Expand All @@ -18,10 +18,10 @@ pkg_deps=(
# chef-server-* packages.
#
core/curl/7.68.0/20200601114640
core/ruby26/2.6.5/20200404043345
core/ruby27/2.7.0/20200404045319
# WARNING: Version pin managed by .expeditor/update_chef_server.sh
"${vendor_origin}/chef-server-nginx/14.4.4/20210520121142"
"${vendor_origin}/chef-server-ctl/14.4.4/20210520120637"
"${vendor_origin}/chef-server-nginx/14.11.36/20211227114734"
"${vendor_origin}/chef-server-ctl/14.11.36/20211227114241"
)

pkg_bin_dirs=(bin)
Expand Down Expand Up @@ -63,7 +63,7 @@ scaffolding_go_binary_list=(
chef_automate_hab_binding_mode="relaxed"

do_prepare() {
GO_LDFLAGS="-X main.RubyPath=$(pkg_path_for core/ruby26)"
GO_LDFLAGS="-X main.RubyPath=$(pkg_path_for core/ruby27)"
GO_LDFLAGS="$GO_LDFLAGS -X main.ChefServerCtlPath=$(pkg_path_for chef/chef-server-ctl)"
GO_LDFLAGS="$GO_LDFLAGS -X main.KnifePath=${pkg_prefix}/bin/knife"
GO_LDFLAGS="$GO_LDFLAGS -X main.Version=${pkg_version}/${pkg_release}"
Expand All @@ -79,5 +79,5 @@ do_install() {
install "$PLAN_CONTEXT/bin/knife" "$wrapper_bin_path/knife"

sed -i "s!__BUILDTIME_HAB_PKG_PATH_CHEF_SERVER_CTL__!$(pkg_path_for chef/chef-server-ctl)!g" "$wrapper_bin_path/knife"
sed -i "s!__BUILDTIME_HAB_PKG_PATH_RUBY__!$(pkg_path_for core/ruby26)!g" "$wrapper_bin_path/knife"
sed -i "s!__BUILDTIME_HAB_PKG_PATH_RUBY__!$(pkg_path_for core/ruby27)!g" "$wrapper_bin_path/knife"
}
4 changes: 2 additions & 2 deletions components/automate-cs-oc-bifrost/habitat/plan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pkg_name="automate-cs-oc-bifrost"
pkg_description="Wrapper package for chef/oc_bifrost"
pkg_origin="chef"
# WARNING: Version managed by .expeditor/update_chef_server.sh
pkg_version="14.4.4"
pkg_version="14.11.36"
vendor_origin="chef"
pkg_maintainer="Chef Software Inc. <support@chef.io>"
pkg_license=("Chef-MLSA")
Expand All @@ -15,7 +15,7 @@ pkg_deps=(
chef/mlsa
"${local_platform_tools_origin:-chef}/automate-platform-tools"
# WARNING: Version pin managed by .expeditor/update_chef_server.sh
"${vendor_origin}/oc_bifrost/14.4.4/20210520120641"
"${vendor_origin}/oc_bifrost/14.11.36/20211227114250"
)

pkg_binds=(
Expand Down
2 changes: 1 addition & 1 deletion components/automate-cs-oc-erchef/habitat/hooks/run
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ HOME="{{pkg.svc_data_path}}" BUNDLE_GEMFILE="{{pkgPathFor "chef/oc_erchef"}}/Gem
bundle exec ruby "{{pkg.svc_config_path}}/chef_server_data_bootstrap.rb"

# ruby vars are needed in order to make depselector start up
export PATH={{pkgPathFor "core/ruby26"}}/bin:${PATH}
export PATH={{pkgPathFor "core/ruby27"}}/bin:${PATH}
export LD_LIBRARY_PATH={{pkgPathFor "core/libffi"}}/lib:${LD_LIBRARY_PATH}
export GEM_HOME={{pkgPathFor "chef/oc_erchef"}}/vendor/bundle
export GEM_PATH={{pkgPathFor "chef/oc_erchef"}}/vendor/bundle
Expand Down
4 changes: 2 additions & 2 deletions components/automate-cs-oc-erchef/habitat/plan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pkg_name="automate-cs-oc-erchef"
pkg_description="Wrapper package for chef/oc_erchef"
pkg_origin="chef"
# WARNING: Version managed by .expeditor/update_chef_server.sh
pkg_version="14.4.4"
pkg_version="14.11.36"
vendor_origin="chef"
pkg_maintainer="Chef Software Inc. <support@chef.io>"
pkg_license=("Chef-MLSA")
Expand All @@ -16,7 +16,7 @@ pkg_deps=(
chef/mlsa
"${local_platform_tools_origin:-chef}/automate-platform-tools"
# WARNING: Version pin managed by .expeditor/update_chef_server.sh
"${vendor_origin}/oc_erchef/14.4.4/20210520120641"
"${vendor_origin}/oc_erchef/14.11.36/20211227114250"
)

pkg_build_deps=(
Expand Down
2 changes: 1 addition & 1 deletion integration/tests/a1migration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ do_test_deploy() {
chef_server_migration_smoke_tests
## skipping status test because of the missing file in automate - /etc/opscode/chef-server-running.json
## adding smoke tag or else all the test will be considered skipping only the status test
PATH="/hab/bin:/bin" chef-server-ctl test --smoke --skip-status
PATH="/hab/bin:/bin" chef-server-ctl test --smoke --skip-status --skip=response_headers

workflow_server_migration_smoke_tests
}
Expand Down
2 changes: 1 addition & 1 deletion integration/tests/chef_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ do_test_deploy() {
umask 022
## skipping status test because of the missing file in automate - /etc/opscode/chef-server-running.json
## adding smoke tag or else all the test will be considered skipping only the status test
PATH="/hab/bin:/bin" chef-server-ctl test --smoke --skip-status
PATH="/hab/bin:/bin" chef-server-ctl test --smoke --skip-status --skip=response_headers
test_chef_server_ctl
test_knife
test_cookbook_caching
Expand Down
2 changes: 1 addition & 1 deletion integration/tests/chef_server_backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ do_deploy() {
do_test_deploy() {
## skipping status test because of the missing file in automate - /etc/opscode/chef-server-running.json
## adding smoke tag or else all the test will be considered skipping only the status test
PATH="/hab/bin:/bin" chef-server-ctl test --smoke --skip-status
PATH="/hab/bin:/bin" chef-server-ctl test --smoke --skip-status --skip=response_headers
test_chef_server_ctl
do_test_deploy_default
}
Expand Down
2 changes: 1 addition & 1 deletion integration/tests/chef_server_only.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ do_deploy() {
do_test_deploy() {
## skipping status test because of the missing file in automate - /etc/opscode/chef-server-running.json
## adding smoke tag or else all the test will be considered skipping only the status test
PATH="/hab/bin:/bin" chef-server-ctl test --smoke --skip-status
PATH="/hab/bin:/bin" chef-server-ctl test --smoke --skip-status --skip=response_headers
test_chef_server_ctl
}
4 changes: 2 additions & 2 deletions integration/tests/chef_server_upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ do_deploy() {
do_test_deploy() {
## skipping status test because of the missing file in automate - /etc/opscode/chef-server-running.json
## adding smoke tag or else all the test will be considered skipping only the status test
PATH="/hab/bin:/bin" chef-server-ctl test --smoke --skip-status
PATH="/hab/bin:/bin" chef-server-ctl test --smoke --skip-status --skip=response_headers
test_chef_server_ctl
test_knife
do_test_deploy_default
Expand All @@ -33,7 +33,7 @@ do_test_deploy() {
do_test_upgrade() {
## skipping status test because of the missing file in automate - /etc/opscode/chef-server-running.json
## adding smoke tag or else all the test will be considered skipping only the status test
PATH="/hab/bin:/bin" chef-server-ctl test --smoke --skip-status
PATH="/hab/bin:/bin" chef-server-ctl test --smoke --skip-status --skip=response_headers
test_chef_server_ctl
test_knife
do_test_upgrade_default
Expand Down
2 changes: 1 addition & 1 deletion integration/tests/ha_chef_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ EOH
do_test_deploy() {
## skipping status test because of the missing file in automate - /etc/opscode/chef-server-running.json
## adding smoke tag or else all the test will be considered skipping only the status test
hab pkg exec chef/automate-cs-nginx chef-server-ctl test --smoke --skip-status
hab pkg exec chef/automate-cs-nginx chef-server-ctl test --smoke --skip-status --skip=response_headers
}

do_cleanup() {
Expand Down