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

Chef server ctl external database support #6643

Merged
merged 4 commits into from
Feb 3, 2022

Conversation

vivekshankar1
Copy link
Collaborator

@vivekshankar1 vivekshankar1 commented Jan 31, 2022

🔩 Description: What code changed, and why?

Earlier automate-cs-nginx had hardcoded erchef and bifrost db uri in its codebase. Now we are dynamically creating the connection string to support both external and embedded database. We have also given options to pass custom connection string and custom service path.

⛓️ Related Resources

#4285

👍 Definition of Done

All chef-server-ctl commands should work properly

chef-server-ctl cleanup-bifrost
chef-server-ctl grant-server-admin-permissions admin

👟 How to Build and Test the Change

  • patch an external postgres database
  • rebuild components/automate-cs-nginx
  • Check if below commands are working:
chef-server-ctl user-create -f /tmp/admin.pem admin Admin User admin@example.com password;
chef-server-ctl cleanup-bifrost
chef-server-ctl grant-server-admin-permissions admin

✅ Checklist

All PRs must tick these:

With occasional exceptions, all PRs from Progress employees must tick these:

  • Is the code clear? (complicated code or lots of comments--subdivide and use well-named methods, meaningful variable names, etc.)
  • Consistency checked? (user notifications, user prompts, visual patterns, code patterns, variable names)
  • Repeated code blocks eliminated? (adapt and reuse existing components, blocks, functions, etc.)
  • Spelling, grammar, typos checked? (at a minimum use make spell in any component directory)
  • Code well-formatted? (indents, line breaks, etc. improve rather than hinder readability)

All PRs from Progress employees should tick these if appropriate:

  • Tests added/updated? (all new code needs new tests)
  • Docs added/updated? (all customer-facing changes)

Please add a note next to any checkbox above if you are NOT ticking it.

📷 Screenshots, if applicable

Signed-off-by: Vivek Shankar <vshankar@progress.com>
Signed-off-by: Vivek Shankar <vshankar@progress.com>
@vivekshankar1 vivekshankar1 added the Team: S.H.I.E.L.D. This Label is used on S.H.I.E.L.D. Operations (Tasks / Stories) label Jan 31, 2022
@vivekshankar1 vivekshankar1 self-assigned this Jan 31, 2022
@netlify
Copy link

netlify bot commented Jan 31, 2022

👷 Deploy Preview for chef-automate processing.

🔨 Explore the source changes: afc0846

🔍 Inspect the deploy log: https://app.netlify.com/sites/chef-automate/deploys/61f7d2e8eeff440008cf0ac2

Signed-off-by: Vivek Shankar <vshankar@progress.com>
@vivekshankar1 vivekshankar1 changed the title Chef server ctl external databse support Chef server ctl external database support Jan 31, 2022
Signed-off-by: Vivek Shankar <vshankar@progress.com>
@sonarcloud
Copy link

sonarcloud bot commented Jan 31, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
32.9% 32.9% Duplication

@shaik80
Copy link
Member

shaik80 commented Feb 3, 2022

when I run below cmd, i am getting user not found

chef-server-ctl grant-server-admin-permissions admin

Screenshot 2022-02-03 at 6 19 20 PM

this the list of db which is using username as dbuser

Screenshot 2022-02-03 at 6 19 46 PM

@shaik80
Copy link
Member

shaik80 commented Feb 3, 2022

To solve this issue need to create admin user

chef-server-ctl user-create -f /tmp/admin.pem admin Admin User admin@example.com password;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acceptance: verified Team: S.H.I.E.L.D. This Label is used on S.H.I.E.L.D. Operations (Tasks / Stories)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants