-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the readme for sample app codes, and update the code-sample page (#…
…6059) * feat: add the readme for sample app codes, and modify the code-sample page to include bookstore app * fix: fix the wrong link * fix: add a note box to mention all 3 parts of knative are being convered in bookstore tutorial
- Loading branch information
Showing
4 changed files
with
113 additions
and
0 deletions.
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