Browse Source

Added more instructions on how to configure keystone middleware

Change-Id: Ia67eb7e3d83d5cee21eed8c29762dd3756c130da
Tong Li 3 years ago
parent
commit
b9131a526a
1 changed files with 35 additions and 24 deletions
  1. 35
    24
      README.md

+ 35
- 24
README.md View File

@@ -30,6 +30,12 @@ install Java, Kafka and ElasticSearch if you want to know more::
30 30
     http://kafka.apache.org/documentation.html#introduction
31 31
     https://www.elastic.co/products/elasticsearch
32 32
 
33
+Use vagrant to setup kiloeyes and agent
34
+=======================================
35
+A vagrant sub project has been created in vagrant directory to allow users to
36
+setup kiloeyes and agent very easily if couple of clean machines are setup.
37
+[Read more on how to use the sub project](vagrant/README.md)
38
+
33 39
 Install Kiloeyes
34 40
 ================
35 41
 Get the source code::
@@ -136,8 +142,8 @@ directory named covhtml. Open up the index.html from a browser to see the summar
136 142
 of the unit test coverage and the details.
137 143
 
138 144
 
139
-Install an all-in-one kiloeyes clean ubuntu system
140
-==================================================
145
+Install an all-in-one kiloeyes onto a clean ubuntu system
146
+=========================================================
141 147
 
142 148
 Install java 8::
143 149
 
@@ -181,7 +187,7 @@ Install Kafka 0.9.0.0 scala 2.11 build::
181 187
          ./bin/zookeeper-server-start.sh ./config/zookeeper.properties
182 188
          ./bin/kafka-server-start.sh ./config/server.properties 
183 189
 
184
-    4. Try to create a topic and make sure things running all right:
190
+    4. Try to create a topic and make sure things running ok:
185 191
 
186 192
          ./bin/kafka-topics.sh --create --topic test --zookeeper localhost:2181 --partitions 1 --replication-factor 1
187 193
 
@@ -213,21 +219,18 @@ Install monasca-agent from the source::
213 219
 
214 220
         git clone https://github.com/openstack/monasca-agent.git
215 221
 
216
-2. Change requirements.txt due to a bug in the monasca-agent project::
217
-
218
-        requests==2.8.1
219
-        psutil=3.4.2
220
-
221
-3. Install the requirements::
222
+2. Install the requirements::
222 223
 
223 224
         sudo apt-get install python-dev python-pip
225
+        pip install "requests>=2.9.1"
226
+        pip install "psutil>=3.4.2"
224 227
         sudo pip install -r requirements.txt
225 228
 
226
-4. Install monasca agents::
229
+3. Install monasca agents::
227 230
 
228 231
         sudo python setup.py install
229 232
 
230
-5. Run the following command to create agent configurations::
233
+4. Run the following command to create agent configurations::
231 234
 
232 235
         sudo monasca-setup --username KEYSTONE_USERNAME --password KEYSTONE_PASSWORD --project_name KEYSTONE_PROJECT_NAME --keystone_url http://URL_OF_KEYSTONE_API:5000/v3
233 236
 
@@ -235,29 +238,29 @@ Install monasca-agent from the source::
235 238
     URL_OF_KEYSTONE_API with correct value according to your openstack
236 239
     keystone setups
237 240
 
238
-6. If the above runs with no errors, you need to add the following in
241
+5. If the above runs with no errors, you need to add the following in
239 242
 /etc/monasca/agent/supervisor.conf file::
240 243
 
241 244
         [inet_http_server]
242 245
         port = localhost:9001
243 246
 
244
-7. Check configuration file at /etc/monasca/agent/agent.yml, the content
247
+6. Check configuration file at /etc/monasca/agent/agent.yml, the content
245 248
 should look like the following::
246 249
 
247 250
         keystone_url: http://192.168.15.5:5000/v3
248 251
         username: <<id to use to post data>>
249 252
         password: <<user password>>
250
-        project_name: service
253
+        project_name: <<kiloeyes project name>>
251 254
         url: null
252 255
 
253 256
     You can create a user in keystone for agent. Make sure that the user is
254 257
     in the project named service.
255 258
 
256
-8. Restart monasca agent services on the machine by running the following command::
259
+7. Restart monasca agent services on the machine by running the following command::
257 260
 
258 261
         sudo service monasca-agent restart
259 262
 
260
-9. Agent log files will be in /var/log/monasca/agent directory.
263
+8. Agent log files will be in /var/log/monasca/agent directory.
261 264
 
262 265
 
263 266
 Enable keystone middleware for security
@@ -267,7 +270,9 @@ to be done.
267 270
 
268 271
 1. Install keystone middleware::
269 272
 
270
-        sudo apt-get install python-keystonemiddleware
273
+        apt-get update
274
+        apt-get -qqy install git python-dev python-pip
275
+        pip install keystonemiddleware
271 276
 
272 277
 2. Edit /etc/kiloeyes/kiloeyes.ini file to insert the middleware in the pipeline::
273 278
 
@@ -278,15 +283,21 @@ to be done.
278 283
         [filter:authtoken]
279 284
         paste.filter_factory = keystonemiddleware.auth_token:filter_factory
280 285
         delay_auth_decision = false
281
-3. Edit /etc/kiloeyes/kiloeyes.conf file to configure the middleware::
286
+3. Edit /etc/kiloeyes/kiloeyes.conf file to configure the middleware,The
287
+   following configuration assumes that the user, password, project and keystone
288
+   server IP are all already available. If not, use keystone commands to create
289
+   them. If you are using devstack, you can use demo project, demo id and its
290
+   password for the configuration.
282 291
 
283 292
         [keystone_authtoken]
284
-        identity_uri = http://<<keystone_ip>>:5000
285
-
286
-        auth_type = token
287
-        admin_user = admin
288
-        admin_password = <<admin password>>
289
-        admin_tenant_name = admin
293
+        password = <<demo-password>>
294
+        username = demo
295
+        user_domain_id = default
296
+        project_name = demo
297
+        project_domain_id = default
298
+        auth_type = password
299
+        auth_url = http://<<keystone_ip>>:5000
300
+        auth_uri = http://<<keystone_ip>>:5000
290 301
 
291 302
 4. Restart kiloeyes api server::
292 303
 

Loading…
Cancel
Save