This is an automated email from the ASF dual-hosted git repository.

liujun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-samples.git

commit f2894491ab3c51f0e2b0d9e14f0041c3fddbfa8d
Author: chickenlj <[email protected]>
AuthorDate: Sat Sep 7 15:37:31 2024 +0800

    update demo
---
 11-quickstart/Dockerfile                           |   1 +
 11-quickstart/Kubernetes-manifests.yaml            | 120 +++++++++++++++++++++
 11-quickstart/README.md                            |   1 -
 .../src/main/resources/application.yml             |   2 +-
 .../src/main/resources/templates/header.html       |   2 +-
 .../src/main/resources/templates/home.html         |   2 +-
 6 files changed, 124 insertions(+), 4 deletions(-)

diff --git a/11-quickstart/Dockerfile b/11-quickstart/Dockerfile
index 0bdf43500..8595ab0d6 100644
--- a/11-quickstart/Dockerfile
+++ b/11-quickstart/Dockerfile
@@ -14,6 +14,7 @@ ARG APP_FILE
 
 # Remember to change the port according to the RPC protocol you select
 EXPOSE 50051
+EXPOSE 22222
 
 # copy the JAR file into the root and rename
 RUN cp ./quickstart-service/target/${APP_FILE} app.jar
diff --git a/11-quickstart/Kubernetes-manifests.yaml 
b/11-quickstart/Kubernetes-manifests.yaml
new file mode 100644
index 000000000..79307eda8
--- /dev/null
+++ b/11-quickstart/Kubernetes-manifests.yaml
@@ -0,0 +1,120 @@
+# Namespace
+apiVersion: v1
+kind: Namespace
+metadata:
+  name: dubbo-quickstart
+---
+apiVersion: v1
+kind: Namespace
+metadata:
+  name: dubbo-system
+---
+
+# Nacos
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: nacos
+  namespace: dubbo-system
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: nacos
+  template:
+    metadata:
+      labels:
+        app: nacos
+    spec:
+      containers:
+        - name: consumer
+          image: 
nacos-registry.cn-hangzhou.cr.aliyuncs.com/nacos/nacos-server:v2.1.2
+          imagePullPolicy: Always
+          resources:
+            requests:
+              memory: "2Gi"
+              cpu: "500m"
+          ports:
+            - containerPort: 8848
+              name: client
+            - containerPort: 9848
+              name: client-rpc
+          env:
+            - name: NACOS_SERVER_PORT
+              value: "8848"
+            - name: NACOS_APPLICATION_PORT
+              value: "8848"
+            - name: PREFER_HOST_MODE
+              value: "hostname"
+            - name: MODE
+              value: "standalone"
+            - name: NACOS_AUTH_ENABLE
+              value: "true"
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: nacos
+  namespace: dubbo-system
+spec:
+  type: ClusterIP
+  sessionAffinity: None
+  selector:
+    app: nacos
+  ports:
+    - port: 8848
+      name: server
+      targetPort: 8848
+    - port: 9848
+      name: client-rpc
+      targetPort: 9848
+---
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: quickstart
+  namespace: dubbo-quickstart
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: quickstart
+  template:
+    metadata:
+      labels:
+        app: quickstart
+    spec:
+      containers:
+        - name: quickstart
+          image: 
sca-registry.cn-hangzhou.cr.aliyuncs.com/dubbo/dubbo-quickstart:1.0
+          imagePullPolicy: Always
+          ports:
+            - name: dubbo
+              containerPort: 50051
+              protocol: TCP
+            - name: dubbo-qos
+              containerPort: 22222
+              protocol: TCP
+          env:
+            - name: JAVA_TOOL_OPTIONS
+              value: "-Dnacos.address=nacos.dubbo-system.svc"
+---
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: quickstart
+  namespace: dubbo-quickstart
+spec:
+  selector:
+    app: quickstart
+  ports:
+    - name: tcp
+      port: 50051
+      targetPort: 50051
+    - name: http
+      port: 22222
+      targetPort: 22222
+---
+
diff --git a/11-quickstart/README.md b/11-quickstart/README.md
index d117e50d8..5cbbb8aa1 100644
--- a/11-quickstart/README.md
+++ b/11-quickstart/README.md
@@ -52,4 +52,3 @@ For further reference, please consider the following sections:
 * [Dubbo triple protocol 
reference](https://dubbo.apache.org/zh-cn/overview/mannual/java-sdk/reference-manual/protocol/triple/)
 * [Dubbo Zookeeper registry configuration 
reference](https://docs.spring.io/spring-boot/docs/3.1.2/reference/htmlsingle/#web.servlet.spring-mvc.template-engines)
 
-
diff --git 
a/11-quickstart/quickstart-service/src/main/resources/application.yml 
b/11-quickstart/quickstart-service/src/main/resources/application.yml
index edbf785f2..824e01bb0 100644
--- a/11-quickstart/quickstart-service/src/main/resources/application.yml
+++ b/11-quickstart/quickstart-service/src/main/resources/application.yml
@@ -14,7 +14,7 @@
 
 dubbo:
   registry:
-    address: zookeeper://${zookeeper.address:127.0.0.1}:2181
+    address: nacos://${nacos.address:127.0.0.1}:8848
   protocol:
     name: tri
     port: 50051
diff --git 
a/online_bontique_demo/frontend/src/main/resources/templates/header.html 
b/online_bontique_demo/frontend/src/main/resources/templates/header.html
index 3e8bff311..857aa9b1c 100644
--- a/online_bontique_demo/frontend/src/main/resources/templates/header.html
+++ b/online_bontique_demo/frontend/src/main/resources/templates/header.html
@@ -23,7 +23,7 @@
     <meta name="viewport" content="width=device-width, initial-scale=1.0, 
shrink-to-fit=no">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
     <title th:text="${is_cymbal_brand} ? 'Cymbal Shops' : 'Online 
Boutique'"></title>
-    <link 
href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"; 
rel="stylesheet" 
integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB"
 crossorigin="anonymous">
+    <link href="../static/styles/bootstrap.min.css" rel="stylesheet" 
integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB"
 crossorigin="anonymous">
     <link rel="preconnect" href="https://fonts.googleapis.com";>
     <link rel="preconnect" href="https://fonts.gstatic.com"; crossorigin>
     <link 
href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap";
 rel="stylesheet">
diff --git 
a/online_bontique_demo/frontend/src/main/resources/templates/home.html 
b/online_bontique_demo/frontend/src/main/resources/templates/home.html
index d4e14616b..876fa279b 100644
--- a/online_bontique_demo/frontend/src/main/resources/templates/home.html
+++ b/online_bontique_demo/frontend/src/main/resources/templates/home.html
@@ -20,7 +20,7 @@
 <head>
   <title>Home</title>
   <link rel="stylesheet" th:href="@{/styles/styles.css}">
-  <link rel="stylesheet" href="../static/bootstrap.min.css">
+  <link rel="stylesheet" href="../static/styles/bootstrap.min.css">
 
 </head>
 <body>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to