Browse Source

update local.conf for devstack

Change-Id: If09374018c06fe4b9ed261927fbb1e77094a0349
Derek Schultz 2 years ago
parent
commit
8b28d214ab
1 changed files with 52 additions and 33 deletions
  1. 52
    33
      examples/openstack-alarms/README.md

+ 52
- 33
examples/openstack-alarms/README.md View File

@@ -1,13 +1,11 @@
1
-Integrating OpenStack Telemetry alarming with Picasso
2
-=====================================================
1
+## Integrating OpenStack Telemetry alarming with Picasso
2
+
3 3
 
4 4
 OpenStack Aodh is the alarming service for OpenStack Telemetry.
5
-The Ceilometer service collects and transforms data from OpenStack services. 
5
+The Ceilometer service collects and transforms data from OpenStack services.
6 6
 Using Aodh, users/operators are able to setup alarms to trigger based on custom rules.
7
-This is useful for autoscaling, which is provided by Heat.
8 7
 
9
-Deploying DevStack
10
-------------------
8
+### Deploying DevStack
11 9
 
12 10
 To see how Aodh can be integrated with Picasso, we recommend using DevStack as the simplest and fastest way to get both Aodh and Picasso services running along with Nova, Glance and Neutron services.
13 11
 In order to get DevStack use following commands:
@@ -18,26 +16,51 @@ git clone git://git.openstack.org/openstack-dev/devstack.git $DEVSTACK_DIR
18 16
 ```
19 17
 
20 18
 Create a file, `$DEVSTACK_DIR/local.conf` with the following text:
19
+
21 20
 ```bash
22 21
 [[local|localrc]]
23 22
 
24 23
 enable_plugin aodh https://git.openstack.org/openstack/aodh
25
-enable_plugin functions_plugin git@github.com:iron-io/functions-devstack-plugin.git master
24
+enable_plugin picasso git@github.com:iron-io/picasso.git
25
+
26
+# Picasso configuration
27
+PICASSO_REPO=${PICASSO_REPO:-git@github.com:iron-io/picasso.git}
28
+PICASSO_BRANCH=${PICASSO_BRANCH:-master}
29
+PICASSO_DIR=${PICASSO_DIR:-${DEST}/picasso}
30
+PICASSO_PORT=${PICASSO_PORT:-10001}
31
+PICASSO_LOG_LEVEL=${PICASSO_LOG_LEVEL:-DEBUG}
32
+PICASSO_LOG_FILE=${PICASSO_LOG_FILE:-/var/log/picasso-api.log}
33
+
34
+# Picasso client configuration
35
+PICASSO_CLIENT_REPO=${PICASSO_CLIENT_REPO:-git@github.com:iron-io/python-picassoclient.git}
36
+PICASSO_CLIENT_DIR=${PICASSO_CLIENT_DIR:-${DEST}/python-picassoclient}
37
+PICASSO_CLIENT_BRANCH=${PICASSO_CLIENT_BRANCH:-master}
26 38
 
39
+# Functions parameters
40
+FUNCTIONS_REPO=${FUNCTIONS_REPO:-git@github.com:iron-io/functions.git}
41
+FUNCTIONS_BRANCH=${FUNCTIONS_BRANCH:-master}
42
+FUNCTIONS_PORT=${FUNCTIONS_PORT:-10501}
43
+FUNCTIONS_DB=${FUNCTIONS_DBPATH:-bolt://$FUNCTIONS_DIR/devstack.functions.storage.db?bucket=funcs}
44
+FUNCTIONS_MQ=${FUNCTIONS_DBPATH:-bolt://$FUNCTIONS_DIR/devstack.functions.queue.db}
45
+FUNCTIONS_LOG_LEVEL=${FUNCTIONS_LOG_LEVEL:-DEBUG}
46
+
47
+DOCKERD_OPTS=${DOCKERD_OPTS:---dns 8.8.8.8 --dns 8.8.4.4 --storage-driver=overlay2 -H fd://}
27 48
 ```
49
+
28 50
 Start DevStack installation
51
+
29 52
 ```bash
30 53
 ./stack.sh
31 54
 ```
32 55
 
33
-Creating app and route
34
-----------------------
56
+### Creating app and route
57
+
35 58
 
36 59
 Once DevStack is installed, create a Picasso app:
60
+
37 61
 ```bash
38 62
 openstack fn apps create alarm-notifier-app
39
-```
40
-```
63
+
41 64
 +-------------+--------------------------------------------------+
42 65
 | Field       | Value                                            |
43 66
 +-------------+--------------------------------------------------+
@@ -54,8 +77,7 @@ openstack fn apps create alarm-notifier-app
54 77
 Create a route:
55 78
 ```bash
56 79
 openstack fn routes create alarm-notifier-app-f6fdaab020e /hello async iron/hello --is-public
57
-```
58
-```
80
+
59 81
 +-----------------+------------+
60 82
 | Field           | Value      |
61 83
 +-----------------+------------+
@@ -72,8 +94,7 @@ openstack fn routes create alarm-notifier-app-f6fdaab020e /hello async iron/hell
72 94
 Bootstrap VM on cirros image:
73 95
 ```bash
74 96
 nova boot --image $(glance image-list | awk '/cirros-0.3.4-x86_64-uec / {print $2}') --flavor 42 test_alarms
75
-```
76
-```
97
+
77 98
 +--------------------------------------+----------------------------------------------------------------+
78 99
 | Property                             | Value                                                          |
79 100
 +--------------------------------------+----------------------------------------------------------------+
@@ -107,26 +128,24 @@ nova boot --image $(glance image-list | awk '/cirros-0.3.4-x86_64-uec / {print $
107 128
 | updated                              | 2016-12-12T22:17:56Z                                           |
108 129
 | user_id                              | d0ec76f99e3c4e588119c8f6858a4ba3                               |
109 130
 +--------------------------------------+----------------------------------------------------------------+
110
-
111 131
 ```
112 132
 
113 133
 Create Aodh alarm:
114 134
 
115 135
 ```bash
116
-aodh alarm create \ 
117
-    --type threshold \ 
118
-    --name cpu_high \ 
119
-    --description 'instance running hot' \ 
120
-    --meter-name cpu_util \ 
121
-    --threshold 20.0 \ 
122
-    --comparison-operator gt \ 
123
-    --statistic max \ 
124
-    --period 600 \ 
125
-    --evaluation-periods 1 \ 
126
-    --alarm-action $(openstack fn routes expose-url testapp-f6fdaab020ec4cdf85db37 /hello) \ 
136
+aodh alarm create \
137
+    --type threshold \
138
+    --name cpu_high \
139
+    --description 'instance running hot' \
140
+    --meter-name cpu_util \
141
+    --threshold 20.0 \
142
+    --comparison-operator gt \
143
+    --statistic max \
144
+    --period 600 \
145
+    --evaluation-periods 1 \
146
+    --alarm-action $(openstack fn routes expose-url testapp-f6fdaab020ec4cdf85db37 /hello) \
127 147
     --query resource_id=$(nova list | grep test_alarms | awk '{print $2}')
128
-```
129
-```
148
+
130 149
 +---------------------------+------------------------------------------------------------------------+
131 150
 | Field                     | Value                                                                  |
132 151
 +---------------------------+------------------------------------------------------------------------+
@@ -156,17 +175,17 @@ aodh alarm create \
156 175
 | type                      | threshold                                                              |
157 176
 | user_id                   | d0ec76f99e3c4e588119c8f6858a4ba3                                       |
158 177
 +---------------------------+------------------------------------------------------------------------+
159
-
160 178
 ```
179
+
161 180
 To trigger the alarm, generate CPU load on the provisioned VM:
181
+
162 182
 ```bash
163 183
 ssh cirros@10.0.0.7
164 184
 cirros@10.0.0.7 password: 
165 185
 dd if=/dev/zero of=/dev/null
166 186
 ```
167
-Once our threshold has been reached, Aodh will notify with an HTTP Callback to our async function assigned to the route we created.
168 187
 
169
-Conclusion
170
-----------
188
+Once our threshold has been reached, Aodh will notify with an HTTP Callback to our async function assigned to the route we created.
171 189
 
190
+### Conclusion
172 191
 Picasso's ability to provide public sync/async function routes can be used to integrate with web hooks, such as Aodh, the OpenStack Telemetry alarming service.

Loading…
Cancel
Save