-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add the readme for sample app codes, and update the code-sample page #6059
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
8436a4d
feat: add the readme for sample app codes, and modify the code-sample…
Leo6Leo 4c0c504
fix: fix the wrong link
Leo6Leo 4dac637
fix: add a note box to mention all 3 parts of knative are being conve…
Leo6Leo 4529ee4
Merge branch 'main' into update-code-sample-pages
Leo6Leo 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
This file contains 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,38 @@ | ||
# Knative Bookstore Code Samples | ||
|
||
This folder contains code samples for the Knative Bookstore tutorial, an end-to-end sample application demonstrating Knative's capabilities in building an event-driven architecture. | ||
|
||
## Tutorial | ||
|
||
For a comprehensive guide on building this application and learning about Knative, please visit the [Knative Bookstore Tutorial](https://knative.dev/bookstore/page-0/welcome-knative-bookstore-tutorial/). | ||
|
||
This tutorial covers: | ||
- Setting up your environment | ||
- Implementing event-driven architecture with Knative | ||
- Deploying and connecting various microservices | ||
- Integrating machine learning models | ||
- Connecting to external services like Slack | ||
|
||
Whether you're new to Knative or looking to deepen your understanding, this tutorial provides valuable insights into building scalable, event-driven applications. | ||
|
||
## Contents | ||
|
||
The files are organized into two main folders: | ||
|
||
1. **/start**: Contains the initial code structure and base files to begin the tutorial. | ||
|
||
2. **/solution**: Includes the complete, fully implemented version of the Knative Bookstore application. | ||
|
||
For more details on the directory structure and contents of each folder, please refer to their respective README files: | ||
|
||
- [Start README](start/README.md) | ||
- [Solution README](solution/README.md) | ||
|
||
## Getting Started | ||
|
||
1. Clone this repository | ||
2. Navigate to the `/start` directory to begin the tutorial | ||
3. Follow the Knative Bookstore Tutorial for step-by-step instructions | ||
4. Refer to the `/solution` directory if you need to check the final implementation | ||
|
||
Happy coding! |
45 changes: 45 additions & 0 deletions
45
code-samples/eventing/bookstore-sample-app/solution/README.md
This file contains 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,45 @@ | ||
|
||
# Knative Bookstore Tutorial - Solution Directory | ||
|
||
Welcome to the solution directory of the Knative Bookstore tutorial. This directory contains the fully implemented version of the event-driven bookstore application using Knative. | ||
|
||
You can find the tutorial for this solution [here](https://knative.dev/bookstore/page-0/welcome-knative-bookstore-tutorial/). | ||
|
||
## Directory Structure | ||
|
||
Here's an overview of the components in the solution: | ||
|
||
- `bad-word-filter/`: Knative Function for filtering out inappropriate content | ||
- `db-service/`: Database service for storing book reviews and comments | ||
- `frontend/`: User interface for the bookstore application built with Next.js | ||
- `node-server/`: Node.js server for handling backend operations | ||
- `sentiment-analysis-app/`: Knative Function for analyzing the sentiment of book reviews | ||
- `sequence/`: Knative Sequence setup for orchestrating workflows | ||
- `slack-sink/`: Integration with Slack for notifications with Apache Camel | ||
|
||
## Additional Files | ||
|
||
- `setup.sh`: Script for setting up the required services including installing Knative, frontend, and backend node-server | ||
- `solution.sh`: Script for installing everything, deploying the entire solution. **It includes the setup script as well.** | ||
|
||
## Running the Solution | ||
|
||
1. Have a running Kubernetes cluster. | ||
2. Install all the prerequisites and deploy the entire solution using the `solution.sh` script: | ||
``` | ||
./solution.sh | ||
``` | ||
If you encountered any permission issues, run the following command: | ||
``` | ||
chmod +x solution.sh | ||
``` | ||
|
||
## Next Steps | ||
|
||
- Explore each component to understand how they work together in an event-driven architecture. | ||
- Compare this solution with your own implementation if you've completed the tutorial. | ||
- Experiment with modifying or extending the solution to add new features. | ||
|
||
## Need Help? | ||
|
||
If you encounter any issues or have questions about the solution, refer to the main tutorial documentation or reach out to the Knative community for support. |
26 changes: 26 additions & 0 deletions
26
code-samples/eventing/bookstore-sample-app/start/README.md
This file contains 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,26 @@ | ||
# Knative Bookstore Tutorial - Start Directory | ||
|
||
Welcome to the starting point of the Knative Bookstore tutorial. This directory contains the initial setup and base files for building your event-driven bookstore application using Knative. | ||
|
||
## Directory Structure | ||
|
||
Here's an overview of the components you'll be working with: | ||
|
||
- `db-service/`: Database service for storing book reviews and comments | ||
- `frontend/`: User interface for the bookstore application built with Next.js | ||
- `node-server/`: Node.js server for handling backend operations | ||
- `sequence/`: Knative Sequence setup for orchestrating workflows | ||
- `slack-sink/`: Integration with Slack for notifications with Apache Camel | ||
- `setup.sh`: Script for setting up the required services including installing Knative, frontend, and backend node-server | ||
## Getting Started | ||
|
||
1. Familiarize yourself with the directory structure above. | ||
2. Each subdirectory contains starter code and placeholders for the services you'll be building. | ||
3. Follow the [Knative Bookstore Tutorial](https://knative.dev/bookstore/page-0/welcome-knative-bookstore-tutorial/) for step-by-step instructions on how to implement each component. | ||
4. As you progress through the tutorial, you'll be adding code and configurations to these directories. | ||
|
||
Remember, this is just the starting point. By the end of the tutorial, you'll have a fully functional event-driven bookstore application. | ||
|
||
## Need Help? | ||
|
||
If you encounter any issues or have questions, refer to the main tutorial documentation or reach out to the Knative community for support. |
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: maybe we can indicate that this uses serving and eventing and functions? The other items in this list mention serving/eventing so it can be a little confusing to figure out which is used from just the text here