Replace mongo shell interaction with script

In the section of 'Install the Telemetry service', we need to create
the database and a ceilometer database user. Currently we use mongo
shell and require user to interact with it. However, we can use
mongo script and do it via single copy and paste.

Change-Id: I6b88f920c9576aabdc190affc807a0f566ee4c5e
This commit is contained in:
ZhiQiang Fan 2014-02-07 11:59:13 +08:00
parent 4ddeb388fb
commit 00e56ce3d1

View File

@ -91,12 +91,11 @@
<step>
<para>Create the database and a <literal>ceilometer</literal>
database user:</para>
<screen><prompt>#</prompt> <userinput>mongo --host <replaceable>controller</replaceable></userinput>
<prompt>></prompt> <userinput>use ceilometer</userinput>
<prompt>></prompt> <userinput>db.addUser( { user: "ceilometer",
pwd: "<replaceable>CEILOMETER_DBPASS</replaceable>",
roles: [ "readWrite", "dbAdmin" ]
} )</userinput></screen>
<screen><prompt>#</prompt> <userinput>mongo --host <replaceable>controller</replaceable> --eval '
db = db.getSiblingDB("ceilometer");
db.addUser({user: "ceilometer",
pwd: "<replaceable>CEILOMETER_DBPASS</replaceable>",
roles: [ "readWrite", "dbAdmin" ]})'</userinput></screen>
</step>
<step>
<para>Configure the Telemetry service to use the database:</para>