-
Notifications
You must be signed in to change notification settings - Fork 174
MongoDB Solution #1669
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
Merged
Merged
MongoDB Solution #1669
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
docs/learning/solutions/database-management/mongo-example.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # MongoDB - Build an Example Database | ||
|
|
||
| This solution demonstrates how to use the MongoDB plugin in Rundeck through a practical example job. The example creates a sample database structure that you can use to test and learn MongoDB operations within Rundeck. | ||
|
|
||
| ## Pre-requisites & Environment Setup | ||
|
|
||
| - Environment setup with active Enterprise Runner | ||
| - MongoDB installed and accessible from your Enterprise Runner | ||
| - MongoDB user with appropriate permissions for database operations | ||
| - Password stored in KeyStorage (default path: keys/mongodb) | ||
| - Be sure to select a runner before starting the job. No Runners are selected by default. | ||
|
|
||
| ## MongoDB Plugin Overview | ||
|
|
||
| The MongoDB plugin allows you to execute MongoDB commands directly from Rundeck jobs. Each step in the job demonstrates different capabilities of the plugin: | ||
|
|
||
| ### Key Plugin Parameters | ||
|
|
||
| For specific docs on these parameters check out the [Plugin documentation](/manual/jobs/job-plugins/workflow-steps/mongodb.md). The list below explains how the default job definition is configured. | ||
|
|
||
| - Database Deployment: Default "MongoDB". If you are using Atlas this will need to be changed. | ||
| - MongoDB Server: Default "mongodb". The runner will use this DNS name to connect to the MongoDB Server. Adjust for your environment or ensure "mongodb" resolves to the host you want to connect to. | ||
| - Database Name: Default "ecommerce_db". | ||
| - Username: Default "admin". If you need to use a different user change this value | ||
| - Password from Key Storage: Default "keys/mongodb". If the path to your stored MongoDB password in KeyStorage is different use the selection tool to pick it. | ||
| - MongoDB Command: The MongoDB command the step will execute | ||
|
|
||
| ## Example Job Structure | ||
|
|
||
| The example job demonstrates these operations in sequence, creating a sample e-commerce database: | ||
|
|
||
| 1. Database cleanup/creation | ||
| 2. Collection creation | ||
| 3. Sample data insertion | ||
| 4. Index creation | ||
| 5. Verification query | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| Common issues and their solutions: | ||
|
|
||
| - **Connection Failures:** Verify MongoDB host accessibility from the Enterprise Runner | ||
| - **Authentication Errors:** Check user permissions and KeyStorage path |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.