Skip to content

Commit a95e894

Browse files
authored
Merge pull request #169 from vgjm/dev
feat: improve quick-start, add introduction to bookinfo in deploy-demo
2 parents 2f20671 + f688c93 commit a95e894

File tree

9 files changed

+30830
-9480
lines changed

9 files changed

+30830
-9480
lines changed

docs/guides/deploy/deploy-demo.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
22

33
# Deploy Demo Application
44

5-
Nocalhost IDE plugin has built-in demo application, you can quickly install it through the following steps:
5+
Nocalhost IDE plugin has a built-in demo application called bookinfo. You can quickly install it through the following steps:
66

77
1. Select any namespace from the cluster tree
88
2. Click on the <img src={useBaseUrl('/img/icons/install-app-icon.jpg')} width="20" /> icon to deploy application
9-
3. Select `Install Quick Demo` to install the demo application
9+
3. Select `Deploy Demo` to install the demo application
1010

1111
<figure className="img-frame">
1212
<img className="gif-img" src={useBaseUrl('/img/opt/deploy-demo.gif')} />
@@ -19,3 +19,29 @@ Quick demo application comes with port-forward configured. After demo has succes
1919

2020
:::
2121

22+
## Introduction to the bookinfo application
23+
24+
Bookinfo is a typical microservice architecture application, which derives from Istio samples(https://github.com/istio/istio/tree/master/samples/bookinfo). However, we commit some changes to demonstrate nocalhost better. Here are some main changes we have made:
25+
26+
- Simplifying different version of reviews service to one version. Nocalhost does not target on how to manage service traffic or canary deployment.
27+
- Splitting source codes from mono-repo into five independent repositories. In fact, diffrent microservices are developed by diffrent teams with different access rules.
28+
- Switching the framework of reviews service to spring-boot. Everyone loves spring-boot.
29+
- Configuring GitHub Action for every microservice to automatically build Docker images.
30+
- Adding a .nocalhost directory to support development with nocalhost.
31+
32+
This demo application consists of the following 5 services:
33+
34+
- productpage(Request Entrance): https://github.com/nocalhost/bookinfo-productpage
35+
- reviews: https://github.com/nocalhost/bookinfo-reviews
36+
- details: https://github.com/nocalhost/bookinfo-details
37+
- ratings: https://github.com/nocalhost/bookinfo-ratings
38+
- authors: https://github.com/nocalhost/bookinfo-authors
39+
40+
Every service has its own program language and runtime environment. All of them have been configured to use docker as the container runtime, you can find Dockerfile in their corresponding repositories.
41+
42+
The microservices' structure of bookinfo is shown by the following image:
43+
44+
<figure className="img-frame">
45+
<img className="gif-img" src={useBaseUrl('/img/intro/structure-of-bookinfo.png')} />
46+
<figcaption>Microservices' structure of bookinfo</figcaption>
47+
</figure>

docs/guides/hot-reload.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,6 @@ containers:
9999

100100
```
101101

102+
## What's Next?
102103

104+
Now you have understood what DevMode is and how it works. Nocalhost supports a lot of configurations that control the actions when Nocalhost enter DevMode. If you are interested in Nocalhost configurations, you can check [CONFIGURATION](https://nocalhost.dev/docs/config/config-en).

docs/quick-start.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
3131

3232
:::tip JetBrains Plugin
3333

34-
Nocalhost does fully supports JetBrains, please refer to [Install JetBrains Plugin](./installation##install-jetbrains-plugin).
34+
Nocalhost does fully support JetBrains, please refer to [Install JetBrains Plugin](./installation##install-jetbrains-plugin).
3535

3636
:::
3737

@@ -100,9 +100,9 @@ We are using the bookinfo application as an example here. You can use your own a
100100

101101
Make sure you have successfully deployed workloads within your Kubernetes Cluster, then:
102102

103-
1. Expand the workloads tree, find the workload you want to develop
103+
1. Expand the workloads tree, find the productpage workload to begin our development
104104
2. Click <img className="svg-icon" src={useBaseUrl('/img/icons/dev_start.svg')} width="18" /> to start the `Development Mode (DevMode)`
105-
3. Specify the source code local directory or you can clone from existing Git repository.
105+
3. Clone source code from a Git repository (or you can associate with a local derectory).
106106
4. Nocalhost will open a new VS Code window, and start the `DevMode` automatically.
107107

108108
<figure className="img-frame">
@@ -126,7 +126,7 @@ When entering DevMode, the application main process will not automatically start
126126

127127
:::
128128

129-
**2.** View the running result on [http://127.0.0.1:39080](http://127.0.0.1:39080) in your web browser
129+
**2.** View the running result on [http://127.0.0.1:39080/productpage](http://127.0.0.1:39080/productpage) in your web browser
130130

131131
<figure className="img-frame">
132132
<img className="gif-img" src={useBaseUrl('/img/opt/main-process.gif')} />
@@ -141,7 +141,7 @@ In our `bookinfo` demo, we've already set the port-forward to 39080:9080, which
141141

142142
### Change the code
143143

144-
**1.** Modify code in `productpage.py` and see change in web browser. **Do not** forget to save your change.
144+
**1.** Modify code in `productpage.py` and see change in web browser. Find the `getProducts` function in line 379 and change the `'title'` of the return value from `'The Comedy of Errors'` to `'Hello Nocalhost'`. **Do not** forget to save your change.
145145

146146
**2.** Refresh the web browser and see the code change
147147

@@ -154,6 +154,10 @@ In our `bookinfo` demo, we've already set the port-forward to 39080:9080, which
154154

155155
## What's Next?
156156

157+
Now you are ready to develop with Nocalhost. But if you still want more details about Nocalhost, you can consult [USER GUIDES](https://nocalhost.dev/docs/guides/manage-cluster), or if you are a team leader, then you can try [Nocalhost Server](https://nocalhost.dev/docs/server/server-overview) and understand how Nocalhost can improve your team's efficiency.
158+
159+
You can also:
160+
157161
- Refer to Nocalhost's [Introduction](./introduction)
158162
- Visit our [Github Repo](https://github.com/nocalhost/nocalhost)
159163
- Join our [Slack](https://nocalhost.slack.com/) or scan the code to join our WeChat Group

docs/server/nh-dep.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ Service dependencies can be defined through `services[*].dependLabelSelector` in
66

77
**`Nocalhost Dep`** will inject an `initContainer` into the container when deploying an application. The `initContainer` will ensure that the services it depends on run successfully and then create the related container.
88

9+
## What's Next?
10+
11+
You have finished Nocalhost Server section. You can use Nocalhost to accelerate your team's development process. But we recommend you to read the [Best Prictices](https://nocalhost.dev/docs/practice/cloud/k8s-compatible) section before using Nocalhost.

docs/summary.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
## Try Nocalhost
2+
- [What's Nocalhost](https://nocalhost.dev/docs/introduction)
3+
- [Install Nocalhost](https://nocalhost.dev/docs/installation)
4+
- [Quick Start](https://nocalhost.dev/docs/quick-start)
5+
6+
## Develop with Nocalhost
7+
- [Manage cluster](https://nocalhost.dev/docs/guides/manage-cluster)
8+
- [Deploy demo application](https://nocalhost.dev/docs/guides/deploy/deploy-demo)
9+
- [Enter DevMode(Replace)](https://nocalhost.dev/docs/guides/develop-service-replace-en)
10+
- [Remote debug](https://nocalhost.dev/docs/guides/debug/vscode-debug)
11+
- [Connect remote terminal](https://nocalhost.dev/docs/guides/debug/access-terminal)
12+
- [View logs](https://nocalhost.dev/docs/guides/debug/log-viewer)
13+
14+
## Nocalhost Configuration
15+
- [Introduction of Nocalhost configuration](https://nocalhost.dev/docs/config/config-overview-en)
16+
- [How to configure Nocalhost](https://nocalhost.dev/docs/config/configure-en)
17+
- [Dev configuration of Nocalhost](https://nocalhost.dev/docs/config/config-spec-en)
18+
- [Deployment configuration of Nocalhost](https://nocalhost.dev/docs/config/config-deployment-en)
19+
20+
## Nocalhost Server
21+
- [Introduction of Nocalhost Server](https://nocalhost.dev/docs/server/server-overview)
22+
- [Use Nocalhost Server](https://nocalhost.dev/docs/server/deploy-server)
23+
- [Upgrade repository](https://nocalhost.dev/docs/server/upgrade)
24+
- [Manage user](https://nocalhost.dev/docs/server/manage-user)
25+
- [Manage cluster](https://nocalhost.dev/docs/server/manage-cluster)
26+
- [Isolated devspace](https://nocalhost.dev/docs/server/manage-devspace-iso)
27+
- [Mesh devspace](https://nocalhost.dev/docs/server/manage-devspace-mesh)
28+
- [Use Nocalhost Server in Kubesphere](https://nocalhost.dev/docs/server/deploy-in-kubesphere-en)

0 commit comments

Comments
 (0)