~annegentle/openstackbook/epubtest

« back to all changes in this revision

Viewing changes to Commands.xml

  • Committer: Kiran Murari
  • Date: 2011-10-19 14:27:25 UTC
  • Revision ID: kiranmurari@gmail.com-20111019142725-px5wjal8hbf8aqdb
changes for diablo on oneiric

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
<title>User/Role Management</title>
9
9
<para>Add a new user</para>
10
10
<programlisting>
11
 
nova-manage user create  novaadmin
12
 
</programlisting>
13
 
 
 
11
nova-manage user create --name=novaadmin
 
12
</programlisting>
 
13
<para>Add a user along with access and secret keys.</para>
 
14
<programlisting>
 
15
nova-manage user create --name=novaadmin --access=myaccess --secret=mysecret
 
16
</programlisting>
14
17
<para>Add a user with admin privileges</para>
15
18
<programlisting>
16
 
nova-manage user admin  novaadmin
 
19
nova-manage user admin --name=novaadmin --access=myaccess --secret=mysecret
17
20
</programlisting>
18
21
 
19
22
<para>List existing users</para>
23
26
 
24
27
<para>Delete an existing user</para>
25
28
<programlisting>
26
 
nova-manage user delete  novaadmin
 
29
nova-manage user delete --name=novaadmin
27
30
</programlisting>
28
31
 
29
32
<para>Associate a user to a specific existing project</para>
30
33
<programlisting>
31
 
nova-manage project add proj  novaadmin
 
34
nova-manage project add --project=proj --user=novaadmin
32
35
</programlisting>
33
36
 
34
37
<para>Remove a  user from a specific existing project.</para>
35
38
<programlisting>
36
 
nova-manage project remove proj  novaadmin
 
39
nova-manage project remove --project=proj --user=novaadmin
37
40
</programlisting>
38
41
 
39
42
<para>View access key and secret keys of particular user.</para>
40
43
<programlisting>
41
 
nova-manage user exports  novaadmin
42
 
</programlisting>
43
 
 
44
 
<para>Add a role to a particular user. Please refer to the chapter on "Role Based Access Controls" for more details on role management.</para>
45
 
<programlisting>
46
 
nova-manage role add  novaadmin netadmin
47
 
</programlisting>
48
 
 
49
 
<para>Remove a role from a particular user</para>
50
 
<programlisting>
51
 
nova-manage role remove  novaadmin netadmin
 
44
nova-manage user exports --name=novaadmin
 
45
</programlisting>
 
46
 
 
47
<para>Adding a user sitewide role.</para>
 
48
<programlisting>
 
49
nova-manage role add --user=novaadmin --role=netadmin
 
50
</programlisting>
 
51
 
 
52
<para>Remove a sitewide role from a particular user</para>
 
53
<programlisting>
 
54
nova-manage role remove --user=novaadmin --role=netadmin
 
55
</programlisting>
 
56
<para>Adding a user project specific role.</para>
 
57
<programlisting>
 
58
nova-manage role add --user=novaadmin --role=netadmin --project=proj
 
59
</programlisting>
 
60
 
 
61
<para>Remove a project specific role from a particular user</para>
 
62
<programlisting>
 
63
nova-manage role remove --user=novaadmin --role=netadmin --project=proj
52
64
</programlisting>
53
65
 
54
66
<para>With the command below, you can change any or all of access key, secret key and admin role flag for a particular user.</para>
56
68
Syntax:
57
69
nova-manage user modify   username new_access_key new_secret_key admin_flag &lt;admin flag - T or F&gt;
58
70
 
59
 
nova-manage user modify   novaadmin mygreatnewaccesskey  ""  ""
60
 
 
61
 
nova-manage user modify   novaadmin "" mygreatsecretkey    ""
62
 
 
63
 
nova-manage user modify   novaadmin "" ""  T
 
71
nova-manage user modify --name=novaadmin  --access=mygreatnewaccesskey "" ""
 
72
 
 
73
nova-manage user modify --name=novaadmin "" --secret=mygreatsecretkey "" ""
 
74
 
 
75
nova-manage user modify --name=novaadmin "" ""  --is_admin=T
64
76
</programlisting>
65
77
 
66
78
<para>Check if a particular user has a specific role or not. The role can be either local or global. The output of the command will be True or False</para>
67
79
<programlisting>
68
 
nova-manage role has  novaadmin cloudadmin
 
80
nova-manage role has --user=novaadmin --role=cloudadmin
69
81
True
70
82
 
71
 
nova-manage role has  novaadmin netadmin proj
 
83
nova-manage role has --role=novaadmin --role=netadmin --project=proj
72
84
False
73
85
</programlisting>
74
86
</section>
79
91
<para>The following commands help you create and manage projects.  "nova-manage account" command is an alias to "nova-manage project" and you can use them interchangeably.</para>
80
92
 
81
93
<para>Create a project. It requires you to mention name of the project admin as well. css1 is the name of the project and user5 is the name of the project admin here.</para>
82
 
<programlisting>nova-manage project create css1 user5</programlisting>
 
94
<programlisting>nova-manage project create --project=css1 --user=user5 --desc="My new project"</programlisting>
83
95
 
84
96
<para>List the registered projects.</para>
85
97
<programlisting>
88
100
 
89
101
<para>Download the credentials and associated file for a specific project. Please refer to the chapter on "Installation &amp; Configuration" for more details.</para>
90
102
<programlisting>
91
 
nova-manage project zipfile csscorp user5 /home/user5/mysec.zip
 
103
nova-manage project zipfile --project=csscorp --user=user5 --file=/home/user5/mysec.zip
92
104
</programlisting>
93
105
 
94
106
<para>Delete an existing project.</para>
95
107
<programlisting>
96
 
nova-manage project delete css1
 
108
nova-manage project delete --project=css1
97
109
</programlisting>
98
110
 
99
111
<para>Check the project wise resource allocation. The output will look like this:</para>
100
112
<programlisting>
101
 
nova-manage project quota css1
 
113
nova-manage project quota --project=css1
102
114
        metadata_items: 128
103
115
        gigabytes: 1000
104
116
        floating_ips: 10
141
153
 
142
154
<para>Define a new instance type</para>
143
155
<programlisting>
144
 
nova-manage flavor create m1.verytiny 256 2 20 6 0 0 0
 
156
nova-manage flavor create --name=m1.miniscule --memory=128 --cpu=1 --local_gb=20 --flavor=6 --swap=0 --rxtx_quota=0 --rxtx_cap=0
145
157
</programlisting>
146
158
 
147
159
<para>Remove an existing instance type.</para>
148
160
<programlisting>
149
 
nova-manage flavor delete m1.verytiny
150
 
m1.verytiny deleted
 
161
nova-manage flavor delete --name=m1.miniscule
 
162
m1.miniscule deleted
151
163
</programlisting>
152
164
</section>
153
165
 
165
177
<para>Disable a running service</para>
166
178
<programlisting>
167
179
nova-manage service disable &lt;hostname&gt; &lt;service&gt;
168
 
nova-manage service disable server2 nova-compute
 
180
nova-manage service disable --host=server2 --service=nova-compute
169
181
 
170
182
nova-manage service list
171
183
        server1 nova-network enabled  :- ) 2011-04-06 17:05:11
177
189
<para>Re-enable a service that is currently disabled</para>
178
190
<programlisting>
179
191
Syntax: nova-manage service enable &lt;hostname&gt; &lt;service&gt;
180
 
nova-manage service enable server2 nova-compute
 
192
nova-manage service enable --host=server2 --service=nova-compute
181
193
 
182
194
nova-manage service list
183
195
        server1 nova-scheduler enabled  :- ) 2011-04-06 17:08:23
190
202
<programlisting>
191
203
Syntax: nova-manage service describe_resource &lt;hostname&gt;
192
204
 
193
 
nova-manage service describe_resource server1
 
205
nova-manage service describe_resource --host=server1
194
206
HOST            PROJECT         cpu     mem(mb)         disk(gb)
195
207
server1(total)                  2       3961            224
196
208
server1(used)                   1       654             30