Skip to content

Commit fecccfc

Browse files
author
zhaozhou
committed
update wiki
1 parent 6496d0a commit fecccfc

File tree

2 files changed

+119
-116
lines changed

2 files changed

+119
-116
lines changed

README.md

Lines changed: 2 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -23,124 +23,10 @@ docker-compose up
2323
```
2424

2525
### Test And Verify:
26-
#### 1. Config : [http://localhost:9000/user-service/dev](http://localhost:9000/user-service/dev)
27-
#### 2. Eureka-dashbord : [http://localhost:9001/](http://localhost:9001/)
28-
![](doc/images/eureka-admin.png)
26+
27+
[detail](doc/1.Test And Verify.md)
2928

30-
```bash
31-
$curl -s -H "Accept:application/json" http://localhost:9001/eureka/apps | jq '.applications.application[] | {service: .name, ip: .instance[].ipAddr, prot: .instance[].port."$"}'
32-
```
33-
34-
```json
35-
{
36-
"service": "TURBINE-DASHBORD",
37-
"ip": "172.18.0.10",
38-
"prot": 9010
39-
}
40-
{
41-
"service": "TRADE-SERVICE",
42-
"ip": "172.18.0.8",
43-
"prot": 9007
44-
}
45-
{
46-
"service": "API-GATEWAY",
47-
"ip": "172.18.0.11",
48-
"prot": 9006
49-
}
50-
{
51-
"service": "SERVICE-EXT",
52-
"ip": "172.18.0.9",
53-
"prot": 9005
54-
}
55-
{
56-
"service": "ZIPKIN-UI",
57-
"ip": "172.18.0.6",
58-
"prot": 9012
59-
}
60-
{
61-
"service": "CONFIG-SERVER",
62-
"ip": "172.18.0.5",
63-
"prot": 9000
64-
}
65-
{
66-
"service": "USER-SERVICE",
67-
"ip": "172.18.0.7",
68-
"prot": 9002
69-
}
70-
```
71-
#### 3. Turbine-dashbord : [http://localhost:9010/hystrix](http://localhost:9010/hystrix)
72-
73-
![](doc/images/Hystrix Dashboard.png)
74-
Paste url [http://localhost:9010/turbine.stream](http://localhost:9010/turbine.stream) in Hystrix Dashboard, and moniter stream.
75-
![](doc/images/Hystrix Stream turbine.png)
76-
77-
78-
#### 4. Zipkin UI
79-
80-
http://localhost:9012
81-
![](doc/images/zipkin01.png)
82-
![](doc/images/zipkin02.png)
83-
84-
#### 5. Get token and test api
85-
86-
With `implicit grant`, sikp code grant. Use the following URL in a web browser
87-
88-
89-
[http://localhost:9006/oauth/authorize?client_id=client&secret_id=secret&response_type=token&redirect_uri=http://localhost](http://localhost:9006/oauth/authorize?client_id=client&secret_id=secret&response_type=token&redirect_uri=http://localhost)
90-
91-
Login(`user`/`password`), and redirect to a URL like:
92-
93-
```
94-
http://localhost:9006/#
95-
access_token=92fd0e5f-4dba-44cd-b199-7fe1aae5a300
96-
&token_type=bearer
97-
&expires_in=43180
98-
&scope=app
99-
100-
```
101-
102-
`TOKEN = 92fd0e5f-4dba-44cd-b199-7fe1aae5a300`
103-
104-
105-
```bash
106-
$ curl -s http://localhost:9006/ext/user\?id\=1\&token\=sy\&access_token\=92fd0e5f-4dba-44cd-b199-7fe1aae5a300 |jq .
107-
```
108-
109-
```json
110-
{
111-
"id": 1,
112-
"loginName": "erdaoya",
113-
"nickName": "erdaoya",
114-
"password": "1234",
115-
"mobile": "12345678909",
116-
"email": "xx@gmail.com",
117-
"gender": 0,
118-
"registerTime": 2017,
119-
}
120-
```
121-
```bash
122-
curl -s http://localhost:9006/user/persionalInfo\?id\=1\&token\=sy\&access_token\=92fd0e5f-4dba-44cd-b199-7fe1aae5a300 |jq .
123-
```
124-
```json
125-
{
126-
"id": 1,
127-
"loginName": "erdaoya",
128-
"nickName": "erdaoya",
129-
"password": "1234",
130-
"mobile": "12345678909",
131-
"email": "xx@gmail.com",
132-
"gender": 0,
133-
"registerTime": 2017,
134-
"updateTime": null
135-
}
136-
```
13729

138-
#### 5. Admin
139-
140-
[http://localhost:9003/](http://localhost:9003/)
141-
![](doc/images/admin01.png)
142-
![](doc/images/admin02.png)
143-
![](doc/images/admin03.png)
14430

14531
## Architecture
14632
![](doc/images/MicroService.png)

doc/1.Test And Verify.md

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
### Test And Verify
2+
#### 1. Config : [http://localhost:9000/user-service/dev](http://localhost:9000/user-service/dev)
3+
#### 2. Eureka-dashbord : [http://localhost:9001/](http://localhost:9001/)
4+
![](doc/images/eureka-admin.png)
5+
6+
```bash
7+
$curl -s -H "Accept:application/json" http://localhost:9001/eureka/apps | jq '.applications.application[] | {service: .name, ip: .instance[].ipAddr, prot: .instance[].port."$"}'
8+
```
9+
10+
```json
11+
{
12+
"service": "TURBINE-DASHBORD",
13+
"ip": "172.18.0.10",
14+
"prot": 9010
15+
}
16+
{
17+
"service": "TRADE-SERVICE",
18+
"ip": "172.18.0.8",
19+
"prot": 9007
20+
}
21+
{
22+
"service": "API-GATEWAY",
23+
"ip": "172.18.0.11",
24+
"prot": 9006
25+
}
26+
{
27+
"service": "SERVICE-EXT",
28+
"ip": "172.18.0.9",
29+
"prot": 9005
30+
}
31+
{
32+
"service": "ZIPKIN-UI",
33+
"ip": "172.18.0.6",
34+
"prot": 9012
35+
}
36+
{
37+
"service": "CONFIG-SERVER",
38+
"ip": "172.18.0.5",
39+
"prot": 9000
40+
}
41+
{
42+
"service": "USER-SERVICE",
43+
"ip": "172.18.0.7",
44+
"prot": 9002
45+
}
46+
```
47+
#### 3. Turbine-dashbord : [http://localhost:9010/hystrix](http://localhost:9010/hystrix)
48+
49+
![](doc/images/Hystrix Dashboard.png)
50+
Paste url [http://localhost:9010/turbine.stream](http://localhost:9010/turbine.stream) in Hystrix Dashboard, and moniter stream.
51+
![](doc/images/Hystrix Stream turbine.png)
52+
53+
54+
#### 4. Zipkin UI
55+
56+
http://localhost:9012
57+
![](doc/images/zipkin01.png)
58+
![](doc/images/zipkin02.png)
59+
60+
#### 5. Get token and test api
61+
With `implicit grant`, sikp code grant. Use the following URL in a web browser
62+
63+
[http://localhost:9006/oauth/authorize?client_id=client&secret_id=secret&response_type=token&redirect_uri=http://localhost](http://localhost:9006/oauth/authorize?client_id=client&secret_id=secret&response_type=token&redirect_uri=http://localhost)
64+
65+
Login(`user`/`password`), and redirect to a URL like:
66+
67+
```
68+
http://localhost:9006/#
69+
access_token=92fd0e5f-4dba-44cd-b199-7fe1aae5a300
70+
&token_type=bearer
71+
&expires_in=43180
72+
&scope=app
73+
74+
```
75+
76+
`TOKEN = 92fd0e5f-4dba-44cd-b199-7fe1aae5a300`
77+
78+
79+
```bash
80+
$ curl -s http://localhost:9006/ext/user\?id\=1\&token\=sy\&access_token\=92fd0e5f-4dba-44cd-b199-7fe1aae5a300 |jq .
81+
```
82+
83+
```json
84+
{
85+
"id": 1,
86+
"loginName": "erdaoya",
87+
"nickName": "erdaoya",
88+
"password": "1234",
89+
"mobile": "12345678909",
90+
"email": "xx@gmail.com",
91+
"gender": 0,
92+
"registerTime": 2017,
93+
}
94+
```
95+
```bash
96+
curl -s http://localhost:9006/user/persionalInfo\?id\=1\&token\=sy\&access_token\=92fd0e5f-4dba-44cd-b199-7fe1aae5a300 |jq .
97+
```
98+
```json
99+
{
100+
"id": 1,
101+
"loginName": "erdaoya",
102+
"nickName": "erdaoya",
103+
"password": "1234",
104+
"mobile": "12345678909",
105+
"email": "xx@gmail.com",
106+
"gender": 0,
107+
"registerTime": 2017,
108+
"updateTime": null
109+
}
110+
```
111+
112+
#### 6. Admin
113+
114+
[http://localhost:9003/](http://localhost:9003/)
115+
![](doc/images/admin01.png)
116+
![](doc/images/admin02.png)
117+
![](doc/images/admin03.png)

0 commit comments

Comments
 (0)