Skip to content

Commit

Permalink
some more changes
Browse files Browse the repository at this point in the history
Signed-off-by: jan shahid shaik <[email protected]>
  • Loading branch information
jashaik committed Feb 5, 2025
1 parent 5fb9829 commit c7a152f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ def bifrost_superuser_id_from_env
fd = ENV['CHEF_SECRETS_FD']
if fd
f = IO.for_fd(fd.to_i)
puts "bifrost super from env========>"
puts fd
puts f
puts f.read()
puts "end of print"
secrets = JSON.parse(f.read())
secrets['oc_bifrost']['superuser_id']
else
Expand All @@ -102,7 +107,7 @@ def get_pg_database_uri()
dbname = ENV['PGDATABASE']
if dbname.match('redacted') != nil
userpass = pg_superuser_id_from_env()
dbname.sub!('<redacted>',userpass)
dbname.dup.sub!('<redacted>',userpass)
else
dbname
end
Expand Down
3 changes: 2 additions & 1 deletion components/automate-cs-oc-erchef/habitat/hooks/run
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ exec 0<&-

source "{{pkg.svc_var_path}}/etc/pg.env"
HOME="{{pkg.svc_data_path}}" BUNDLE_GEMFILE="{{pkgPathFor "chef/oc_erchef"}}/Gemfile" \
secrets-helper exec --secret oc_bifrost.superuser_id -- \
secrets-helper exec --secret oc_bifrost.superuser_id \
--optional-secret userconfig.pg_superuser_password -- \
bundle exec ruby "{{pkg.svc_config_path}}/chef_server_data_bootstrap.rb"

# ruby vars are needed in order to make depselector start up
Expand Down
1 change: 1 addition & 0 deletions components/automate-cs-ocid/habitat/templates/pg.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export DATABASE_URL="{{ pg_uri "automate-cs-ocid" }}"

0 comments on commit c7a152f

Please sign in to comment.