]>
Commit | Line | Data |
---|---|---|
530dddec GD |
1 | kong-app |
2 | ========= | |
3 | ||
4 | This role aims at creating on a remote kong the service, routes and plugins needed by an app | |
5 | ||
6 | Requirements | |
7 | ------------ | |
8 | ||
9 | None at the moment | |
10 | ||
11 | Role Variables | |
12 | -------------- | |
507bb99c GD |
13 | * `kong_servers`: an array of kong\_server to configure with followin configuration: |
14 | * `kong_app_admin_url` the kong admin url (mandatory). | |
15 | * `kong_app_admin_apikey` the apikey to use kong admin api. Default to "" | |
0d2ed34f | 16 | * `services` an array of services to setup (default to []) |
507bb99c GD |
17 | * `name` the name of the service to create for this app, mandatory |
18 | * `url` the url of the backend of the app, mandatory | |
fb5b4527 GD |
19 | * `upstream` if the url reference an upstream a dict with the configuration |
20 | * `conf` the configuration as expected by kong for an upstream creataion | |
21 | * `targets` an array of dict defining a target for kong | |
22 | * `target` the host:port to reach the target | |
23 | * `weight` the weight of the target | |
507bb99c GD |
24 | * `plugins` An array of plugins to activate with their name and config in a dict |
25 | * `name` | |
26 | * `config` | |
27 | * `routes` An array of routes to create for this service. | |
28 | * `hosts` | |
29 | * `paths` | |
30 | * `protocols` | |
31 | * `methods` | |
530dddec GD |
32 | |
33 | Dependencies | |
34 | ------------ | |
35 | ||
36 | ||
37 | ||
38 | Example Playbook | |
39 | ---------------- | |
40 | ||
41 | - hosts: localhost | |
42 | roles: | |
0d2ed34f GD |
43 | - { role: kong-app, kong_servers: [ kong_app_admin_url: http://localhost:8001, |
44 | services: [ name:example, | |
767c0e53 GD |
45 | url: http://example.com, |
46 | plugins: [], | |
0d2ed34f | 47 | routes: [ { hosts: [my.kong.example], paths: [/] } ]]] |
530dddec GD |
48 | } |
49 | ||
50 | License | |
51 | ------- | |
52 | ||
53 | TBD | |
54 | ||
55 | Author Information | |
56 | ------------------ | |
57 | ||
58 | FretLink Team |