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

DO NOT MERGE| Changes required to build automate with Chef-server via LTS changes. #3978

Open
wants to merge 31 commits into
base: CHEF-11677/CHEF-12498/lbaker
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
90f1f19
adding config for nginx and fixing pipeline.
talktovikas Jan 9, 2025
e3aa7b8
changing ruby versions
talktovikas Jan 9, 2025
319f115
adding psql-17-client from LTS
talktovikas Jan 9, 2025
cbac837
oc-id changes from Shravani branch.
talktovikas Jan 9, 2025
438c49c
fixing dep in oc-id.
talktovikas Jan 9, 2025
e91e48f
adding LTS client to bifrost.
talktovikas Jan 9, 2025
bafc289
added erchef-postgres client.
talktovikas Jan 9, 2025
2f61294
fixing nginx.
talktovikas Jan 9, 2025
3b51124
changing the automate branch for automate which have LTS changes.
talktovikas Jan 10, 2025
224b665
removing automate branch
talktovikas Jan 23, 2025
82ab922
TEST:mentioning LTS-channel.
talktovikas Jan 27, 2025
b7471b6
chaning the hab refresh Channel.
talktovikas Jan 28, 2025
75ec27b
fixing NGINX.
talktovikas Jan 28, 2025
5e91964
fixing refresh channel in Nginx.
talktovikas Jan 28, 2025
004b2ab
refresh not working.
talktovikas Jan 28, 2025
b2f361c
fixing components in Automate
talktovikas Jan 28, 2025
a7530bd
pining bookshelf and bifrost in dev. when in automate.
talktovikas Jan 28, 2025
5b53c12
fixing automate erchef.
talktovikas Jan 28, 2025
3d0efe5
pining the version to fix Nginx in automate work.
talktovikas Jan 28, 2025
c25a61a
fixing fallback dev
talktovikas Jan 30, 2025
c4cd9f6
hab refesh channel at automate.
talktovikas Jan 30, 2025
c1339e3
adding flag to each comp.
talktovikas Jan 30, 2025
67419ee
adding flags
talktovikas Jan 30, 2025
a50c914
changing pipeline config.
talktovikas Jan 30, 2025
4a904dc
changing flag
talktovikas Jan 30, 2025
440d9cc
adding new variables in verify pipeline.
talktovikas Jan 30, 2025
d0f1953
using custom pipeline in automate.
talktovikas Feb 3, 2025
09c2023
fixing build commnad.
talktovikas Feb 3, 2025
fd1dfd3
unpinning pkg dependencies for automate-cs-nginx.
talktovikas Feb 3, 2025
a2e0054
commenting other components for speed.
talktovikas Feb 3, 2025
2fe5860
uncommenting cs-components
talktovikas Feb 3, 2025
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
33 changes: 18 additions & 15 deletions .expeditor/automate_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ export HAB_STUDIO_SECRET_HAB_FEAT_IGNORE_LOCAL=false
export HAB_FEAT_IGNORE_LOCAL=false
export HAB_STUDIO_HOST_ARCH=x86_64-linux
export HAB_FEAT_OFFLINE_INSTALL=true
export HAB_BLDR_CHANNEL: "LTS-2024"
export HAB_STUDIO_SECRET_HAB_FALLBACK_CHANNEL: "LTS-2024"
export HAB_FALLBACK_CHANNEL: "LTS-2024"
export HAB_BLDR_CHANNEL="LTS-2024"
export HAB_STUDIO_SECRET_HAB_FALLBACK_CHANNEL="LTS-2024"
export HAB_FALLBACK_CHANNEL="dev"

curl https://raw.githubusercontent.com/habitat-sh/habitat/main/components/hab/install.sh | sudo bash

sudo -E hab pkg install core/ruby
sudo -E hab pkg install core/ruby3_4
export PATH
PATH="$(hab pkg path core/ruby)/bin:$PATH"
sudo -E "$(hab pkg path core/ruby)"/bin/gem install toml
PATH="$(hab pkg path core/ruby3_4)/bin:$PATH"
sudo -E "$(hab pkg path core/ruby3_4)"/bin/gem install toml

export JOB_TEMP_ROOT
JOB_TEMP_ROOT=$(mktemp -d /tmp/job-root-XXXXXX)
Expand All @@ -30,7 +30,8 @@ HAB_CACHE_KEY_PATH="$JOB_TEMP_ROOT/keys"
echo "--- :key: Generating fake origin key"
hab license accept
hab origin key generate

export HAB_BLDR_CHANNEL=LTS-2024
export HAB_REFRESH_CHANNEL=LTS-2024
for pkg_name in `echo "bookshelf chef-server-ctl oc-id oc_bifrost oc_erchef openresty-noroot"`
do
echo "generating package for $pkg_name"
Expand All @@ -40,11 +41,13 @@ done
./.expeditor/replace.sh "nginx" "src"

echo "generating package for nginx"
openresty_hart=$(ls -1t results/chef-openresty*.hart | head -1)
HAB_FEAT_OFFLINE_INSTALL=true HAB_FEAT_IGNORE_LOCAL=false HAB_ORIGIN=chef HAB_CACHE_KEY_PATH="$JOB_TEMP_ROOT/keys" DO_CHECK=true HAB_BLDR_CHANNEL=dev hab studio run -D "set -e; hab pkg install $openresty_hart; hab pkg build src/nginx"
openresty_hart=$(ls -1t results/*openresty*.hart | head -1)
HAB_FEAT_OFFLINE_INSTALL=true HAB_FEAT_IGNORE_LOCAL=false HAB_ORIGIN=chef HAB_CACHE_KEY_PATH="$JOB_TEMP_ROOT/keys" DO_CHECK=true HAB_BLDR_CHANNEL=LTS-2024 HAB_REFRESH_CHANNEL=LTS-2024 hab studio run -D "set -e; hab pkg install $openresty_hart; export HAB_REFRESH_CHANNEL=LTS-2024; hab pkg build src/nginx"

git clone https://github.com/chef/automate.git
cd automate
git checkout vikas/LTS-pipeline
# git checkout dave/LTS-channel # this is the branch that has the changes for LTS channel

RESOLVED_RESULTS_DIR=$(realpath results/)
export DO_CHECK=true
Expand All @@ -60,16 +63,16 @@ oc_id=$(ls -1t results/chef-oc_id*.hart | head -1)
bifrost_hart=$(ls -1t results/chef-oc_bifrost*.hart | head -1)
erchef_hart=$(ls -1t results/chef-oc_erchef*.hart | head -1)

#No releases of chef/automate-scaffolding exist in the 'LTS-2024' channel== this is for bookshelf.
HAB_FEAT_OFFLINE_INSTALL=true HAB_FEAT_IGNORE_LOCAL=false HAB_ORIGIN=chef HAB_CACHE_KEY_PATH="$JOB_TEMP_ROOT/keys" DO_CHECK=true HAB_BLDR_CHANNEL=LTS-2024 HAB_REFRESH_CHANNEL=LTS-2024 hab studio run -D "set -e; hab pkg install $bookshelf_hart; export HAB_STUDIO_SECRET_HAB_FALLBACK_CHANNEL=dev; hab pkg build components/automate-cs-bookshelf"

HAB_FEAT_OFFLINE_INSTALL=true HAB_FEAT_IGNORE_LOCAL=false HAB_ORIGIN=chef HAB_CACHE_KEY_PATH="$JOB_TEMP_ROOT/keys" DO_CHECK=true HAB_BLDR_CHANNEL=dev hab studio run -D "set -e; hab pkg install $bookshelf_hart; hab pkg build components/automate-cs-bookshelf"

HAB_FEAT_OFFLINE_INSTALL=true HAB_FEAT_IGNORE_LOCAL=false HAB_ORIGIN=chef HAB_CACHE_KEY_PATH="$JOB_TEMP_ROOT/keys" DO_CHECK=true HAB_BLDR_CHANNEL=dev hab studio run -D "set -e; hab pkg install $bifrost_hart; hab pkg build components/automate-cs-oc-bifrost"
HAB_FEAT_OFFLINE_INSTALL=true HAB_FEAT_IGNORE_LOCAL=false HAB_ORIGIN=chef HAB_CACHE_KEY_PATH="$JOB_TEMP_ROOT/keys" DO_CHECK=true HAB_BLDR_CHANNEL=LTS-2024 HAB_REFRESH_CHANNEL=LTS-2024 hab studio run -D "set -e; hab pkg install $bifrost_hart; export HAB_STUDIO_SECRET_HAB_FALLBACK_CHANNEL=dev; hab pkg build components/automate-cs-oc-bifrost"

HAB_FEAT_OFFLINE_INSTALL=true HAB_FEAT_IGNORE_LOCAL=false HAB_ORIGIN=chef HAB_CACHE_KEY_PATH="$JOB_TEMP_ROOT/keys" DO_CHECK=true HAB_BLDR_CHANNEL=dev hab studio run -D "set -e; hab pkg install $erchef_hart; hab pkg build components/automate-cs-oc-erchef"
HAB_FEAT_OFFLINE_INSTALL=true HAB_FEAT_IGNORE_LOCAL=false HAB_ORIGIN=chef HAB_CACHE_KEY_PATH="$JOB_TEMP_ROOT/keys" DO_CHECK=true HAB_BLDR_CHANNEL=LTS-2024 HAB_REFRESH_CHANNEL=LTS-2024 hab studio run -D "set -e; hab pkg install $erchef_hart; export HAB_STUDIO_SECRET_HAB_FALLBACK_CHANNEL=dev; hab pkg build components/automate-cs-oc-erchef"

HAB_FEAT_OFFLINE_INSTALL=true HAB_FEAT_IGNORE_LOCAL=false HAB_ORIGIN=chef HAB_CACHE_KEY_PATH="$JOB_TEMP_ROOT/keys" DO_CHECK=true HAB_BLDR_CHANNEL=dev hab studio run -D "set -e; hab pkg install $oc_id; hab pkg build components/automate-cs-ocid"
HAB_FEAT_OFFLINE_INSTALL=true HAB_FEAT_IGNORE_LOCAL=false HAB_ORIGIN=chef HAB_CACHE_KEY_PATH="$JOB_TEMP_ROOT/keys" DO_CHECK=true HAB_BLDR_CHANNEL=LTS-2024 HAB_REFRESH_CHANNEL=LTS-2024 hab studio run -D "set -e; hab pkg install $oc_id; export HAB_STUDIO_SECRET_HAB_FALLBACK_CHANNEL=dev; hab pkg build components/automate-cs-ocid"

HAB_FEAT_OFFLINE_INSTALL=true HAB_FEAT_IGNORE_LOCAL=false HAB_ORIGIN=chef HAB_CACHE_KEY_PATH="$JOB_TEMP_ROOT/keys" DO_CHECK=true HAB_BLDR_CHANNEL=dev hab studio run -D "set -e; hab pkg install $nginx; hab pkg build components/automate-cs-nginx"
HAB_FEAT_OFFLINE_INSTALL=true HAB_FEAT_IGNORE_LOCAL=false HAB_ORIGIN=chef HAB_CACHE_KEY_PATH="$JOB_TEMP_ROOT/keys" DO_CHECK=true HAB_BLDR_CHANNEL=LTS-2024 HAB_REFRESH_CHANNEL=LTS-2024 hab studio run -D "set -e; hab pkg install $nginx; export HAB_STUDIO_SECRET_HAB_FALLBACK_CHANNEL=dev; hab pkg build components/automate-cs-nginx"

.expeditor/create-manifest.rb
mv manifest.json results/build.json
Expand Down
6 changes: 3 additions & 3 deletions .expeditor/build.habitat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
env:
HAB_BLDR_CHANNEL: "LTS-2024"
HAB_STUDIO_SECRET_HAB_FALLBACK_CHANNEL: "LTS-2024"
HAB_FALLBACK_CHANNEL: "LTS-2024"
HAB_FALLBACK_CHANNEL: "dev"

origin: chef
smart_build: false
studio_secrets:
HAB_BLDR_CHANNEL:
value: "LTS-2024"
HAB_STUDIO_SECRET_HAB_FALLBACK_CHANNEL:
value: "LTS-2024"
value: "dev"
HAB_FALLBACK_CHANNEL:
value: "LTS-2024"
value: "dev"


3 changes: 3 additions & 0 deletions .expeditor/verify.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,10 @@ steps:
ALLOW_LOCAL_PACKAGES: true
HAB_STUDIO_SUP: false
HAB_NONINTERACTIVE: true
HAB_REFRESH_CHANNEL: LTS-2024
GOPROXY: "https://proxy.golang.org,direct"
HAB_BLDR_CHANNEL: LTS-2024
HAB_FALLBACK_CHANNEL: "dev"
expeditor:
secrets:
HAB_STUDIO_SECRET_GITHUB_TOKEN:
Expand Down
2 changes: 1 addition & 1 deletion src/bookshelf/habitat/plan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pkg_deps=(
core/coreutils
core/gcc-libs
core/sqitch
core/postgresql-client
core/postgresql17-client
)
pkg_build_deps=(core/make core/git core/gcc)
pkg_bin_dirs=(bin)
Expand Down
3 changes: 2 additions & 1 deletion src/oc-id/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -495,10 +495,11 @@ GEM
activesupport (>= 5.2)
sprockets (>= 3.0.0)
sqlite3 (1.6.2)
mini_portile2 (~> 2.8.0)
sqlite3-ruby (1.3.3)
sqlite3 (>= 1.3.3)
sslshake (1.3.1)
stringio (3.0.6)
stringio (3.1.2)
strings (0.2.1)
strings-ansi (~> 0.2)
unicode-display_width (>= 1.5, < 3.0)
Expand Down
11 changes: 7 additions & 4 deletions src/oc-id/habitat/plan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ pkg_maintainer="The Chef Server Maintainers <support@chef.io>"
pkg_license=('Apache-2.0')
pkg_deps=(
core/sqitch
core/postgresql-client
core/postgresql17-client
core/curl
core/node14
core/ruby30
core/node
core/ruby3_4
core/rsync
core/sed
core/libffi
Expand Down Expand Up @@ -103,7 +103,10 @@ do_install() {
--with-xml2-lib=$(pkg_path_for core/libxml2)/lib \
--with-xslt-include=$(pkg_path_for core/libxslt)/include/libxslt \
--with-xslt-lib=$(pkg_path_for core/libxslt)/lib
bundle install --path "${HOME}/vendor/bundle" --binstubs="${HOME}/bin" --shebang ruby --deployment
bundle config set path "${HOME}/vendor/bundle"
bundle config set deployment 'true'
bundle config set --local shebang 'ruby'
bundle install --binstubs="${HOME}/bin"
# fix tzdata location
echo "Adding core/tzdata zoneinfo search path to tzinfo gem"
grep -l DEFAULT_SEARCH_PATH $HOME/vendor/bundle/ruby/*/gems/tzinfo*/lib/tzinfo/zoneinfo_data_source.rb | while read -r f; do
Expand Down
2 changes: 1 addition & 1 deletion src/oc_bifrost/habitat/plan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pkg_deps=(
core/curl
core/gcc-libs
core/sqitch
core/postgresql-client
core/postgresql17-client
)
pkg_build_deps=(core/make core/git core/gcc)
pkg_bin_dirs=(bin)
Expand Down
2 changes: 1 addition & 1 deletion src/oc_erchef/habitat/plan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pkg_deps=(
core/gcc-libs
core/ruby3_4
core/sqitch
core/postgresql-client
core/postgresql17-client
core/gecode3
core/libffi
core/glibc
Expand Down
Loading