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

Adding s3 configurations for cookbooks in infra server #7796

Merged
merged 15 commits into from
Apr 10, 2023
Merged

Conversation

YashviJain01
Copy link
Collaborator

@YashviJain01 YashviJain01 commented Mar 28, 2023

🔩 Description: What code changed, and why?

Added configurations so that cookbooks can be uploaded and fetched on the automate server.

⛓️ Related Resources

https://chefio.atlassian.net/browse/CHEF-1287
https://chefio.atlassian.net/browse/CHEF-3760

👍 Definition of Done

Now if we patch the configuration s3 gets connected to chef server as a bookshelf.

👟 How to Build and Test the Change

Patch the below config:

[erchef.v1.sys.api]
s3_enabled=true
s3_bucket_name="chef-1"
s3_external_url="test"



[bookshelf.v1.sys.bookshelf]
aws_access_id=""
aws_secret_key=""

Upload cookbooks via knife commands

✅ 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

Before patching the config:-

image

After patching the config:-
image

Operations performed after patching the config:-

image

Checksums files in s3:-

image

Making s3 disbaled by the s3_enabled flag using:-

[erchef.v1.sys.api]
s3_enabled=false
s3_bucket_name="test"
s3_external_url="test"



[bookshelf.v1.sys.bookshelf]
aws_access_id="test"
aws_secret_key="test"

image

Operations performed after patching the config:-

image

As no cookbooks are uploaded now in s3.

@netlify
Copy link

netlify bot commented Mar 28, 2023

Deploy Preview for chef-automate ready!

Name Link
🔨 Latest commit 986781d
🔍 Latest deploy log https://app.netlify.com/sites/chef-automate/deploys/6433e29a0a8bb50008f37f47
😎 Deploy Preview https://deploy-preview-7796--chef-automate.netlify.app/automate/chef_infra_external_cookbooks_in_chef_automate
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions github-actions bot added the documentation Anything related to the Automate docs. label Mar 28, 2023
@YashviJain01 YashviJain01 marked this pull request as ready for review March 28, 2023 15:18
@YashviJain01 YashviJain01 requested a review from a team as a code owner March 28, 2023 15:18
@kalroy kalroy requested a review from jashaik March 28, 2023 15:19
Yashvi Jain and others added 10 commits April 3, 2023 16:55
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Kallol Roy <kallol.roy@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: dishanktiwari2501 <dtiwari@progress.com>
Signed-off-by: dishanktiwari2501 <dtiwari@progress.com>
Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
Signed-off-by: dishanktiwari2501 <dtiwari@progress.com>
Copy link
Collaborator

@kalroy kalroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good except a doc change. Approved when done

kalroy and others added 3 commits April 6, 2023 09:37
Signed-off-by: Kallol Roy <kallol.roy@progress.com>
Signed-off-by: dishanktiwari2501 <dtiwari@progress.com>
Signed-off-by: dishanktiwari2501 <dtiwari@progress.com>
Copy link
Collaborator

@dishanktiwari2501 dishanktiwari2501 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Done!

Signed-off-by: Yashvi Jain <yashvi.jain@progress.com>
@sonarcloud
Copy link

sonarcloud bot commented Apr 10, 2023

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

No Coverage information No Coverage information
No Duplication information No Duplication information

@kalroy kalroy merged commit 024d740 into main Apr 10, 2023
@kalroy kalroy deleted the yashvi/s3_config branch April 10, 2023 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Anything related to the Automate docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants