Browse Source

Finish doc changes for dropping demo.getambassador.io.

Flynn 6 months ago
parent
commit
62faad4229
No account linked to committer's email address
2 changed files with 17 additions and 14 deletions
  1. 1
    2
      demo/services/qotm.py
  2. 16
    12
      docs/about/quickstart.md

+ 1
- 2
demo/services/qotm.py View File

@@ -221,8 +221,7 @@ def specific_quote(idx):
221 221
 
222 222
         quotes[idx] = j['quote']
223 223
 
224
-    return RichStatus.OK(quote=quotes[idx],
225
-                         json=request.args.get('json', False))
224
+    return RichStatus.OK(quote=quotes[idx], json=request.args.get('json', False))
226 225
 
227 226
 ####
228 227
 # POST /quote adds a new quote to our list. It requires a JSON dictionary

+ 16
- 12
docs/about/quickstart.md View File

@@ -22,34 +22,38 @@ Some of the most important information - your Ambassador version, how recently A
22 22
 
23 23
 ## 3. The Quote of the Moment Service
24 24
 
25
-Since Ambassador is an API gateway, its primary purpose is to provide access to microservices. The demo is preconfigured with a mapping that connects the `/qotm/` resource to the "Quote of the Moment" service -- a demo service that supplies quotations. You can try it out here:
25
+Since Ambassador is an API gateway, its primary purpose is to provide access to microservices. The demo is preconfigured with a mapping that connects the `/qotm/` resource to the "Quote of the Moment" service -- a demo service that supplies quotations. You can try it out by opening
26
+
27
+`http://localhost:8080/qotm/`
28
+
29
+in your browser, or from the command line as
26 30
 
27 31
 ```shell
28
-curl http://localhost:8080/qotm/
32
+curl 'http://localhost:8080/qotm/?json=true'
29 33
 ```
30 34
 
31
-This request will route to the `qotm` service at `demo.getambassador.io`, and return a quote in a JSON object.
35
+This request will route to the `qotm` service at `demo.getambassador.io`, and return a random quote for this very moment.
32 36
 
33
-You can also see the mapping by clicking the `mapping-qotm.yaml` link from the diagnostic overview, or by opening
34
-
35
-`http://localhost:8080/ambassador/v0/diag/mapping-qotm.yaml`
37
+You can see details of the mapping by clicking the blue `http://localhost:8080/qotm/ link at the very bottom of the `Ambassador Route Table` in the diagnostics overview.
36 38
 
37 39
 ## 4. Authentication
38 40
 
39
-On the diagnostic overview, you can also see that Ambassador is configured to do authentication -- click the `auth.yaml` link, or open
41
+On the diagnostic overview, you can also see that Ambassador is configured to do authentication -- in the middle fo the overview page, you'll see the `Ambassador Services In Use` section, and you can click the `tcp://127.0.0.1:5050` link for details on the `AuthService` configuration. This demo auth service is running inside the Docker container with Ambassador and the Quote of the Moment service, and Ambassador uses it to mediate access to everything behind the Ambassador.
42
+
43
+You saw above that access to the diagnostic overview required you to authenticate as an administrator. Getting a random Quote of the Moment does not require authentication, but to get a specific quote, you'll have to authenticate as a demo user. To see this in action, open
40 44
 
41
-`http://localhost:8080/ambassador/v0/diag/auth.yaml`
45
+`http://localhost:8080/qotm/quote/5` 
42 46
 
43
-for more here. Ambassador uses a demo authentication service at `demo.getambassador.io` to mediate access to the Quote of the Moment: simply getting a random quote is allowed without authentication, but to get a specific quote, you'll have to authenticate:
47
+in your brower. From the command line, you can see that 
44 48
 
45 49
 ```shell
46
-curl -v http://localhost:8080/qotm/quote/5
50
+curl -v 'http://localhost:8080/qotm/quote/5?json=true'
47 51
 ```
48 52
 
49 53
 will return a 401, but
50 54
 
51 55
 ```shell
52
-curl -v -u username:password http://localhost:8080/qotm/quote/5
56
+curl -v -u username:password 'http://localhost:8080/qotm/quote/5?json=true'
53 57
 ```
54 58
 
55 59
 will succeed. (Note that that's literally "username" and "password" -- the demo auth service is deliberately not very secure!)
@@ -58,4 +62,4 @@ Note that it's up to the auth service to decide what needs authentication -- tea
58 62
 
59 63
 ## Next steps
60 64
 
61
-We've just walked through some of the core features of Ambassador in a local configuration. Next, we'll walk through how to configure these features in Kubernetes.
65
+We've just walked through some of the core features of Ambassador in a local configuration. To see Ambassador in action on Kubernetes, check out the [Kubernetes intall guide](/user-guide/install).

Loading…
Cancel
Save