-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmoscli.html
246 lines (225 loc) · 6.19 KB
/
moscli.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<style>
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote {
margin: 0;
padding: 0;
}
body {
font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", Arial, sans-serif;
font-size: 13px;
line-height: 18px;
color: #737373;
background-color: white;
margin: 10px 13px 10px 13px;
}
table {
margin: 10px 0 15px 0;
border-collapse: collapse;
}
td,th {
border: 1px solid #ddd;
padding: 3px 10px;
}
th {
padding: 5px 10px;
}
a {
color: #0069d6;
}
a:hover {
color: #0050a3;
text-decoration: none;
}
a img {
border: none;
}
p {
margin-bottom: 9px;
}
h1,
h2,
h3,
h4,
h5,
h6 {
color: #404040;
line-height: 36px;
}
h1 {
margin-bottom: 18px;
font-size: 30px;
}
h2 {
font-size: 24px;
}
h3 {
font-size: 18px;
}
h4 {
font-size: 16px;
}
h5 {
font-size: 14px;
}
h6 {
font-size: 13px;
}
hr {
margin: 0 0 19px;
border: 0;
border-bottom: 1px solid #ccc;
}
blockquote {
padding: 13px 13px 21px 15px;
margin-bottom: 18px;
font-family:georgia,serif;
font-style: italic;
}
blockquote:before {
content:"\201C";
font-size:40px;
margin-left:-10px;
font-family:georgia,serif;
color:#eee;
}
blockquote p {
font-size: 14px;
font-weight: 300;
line-height: 18px;
margin-bottom: 0;
font-style: italic;
}
code, pre {
font-family: Monaco, Andale Mono, Courier New, monospace;
}
code {
background-color: #fee9cc;
color: rgba(0, 0, 0, 0.75);
padding: 1px 3px;
font-size: 12px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
pre {
display: block;
padding: 14px;
margin: 0 0 18px;
line-height: 16px;
font-size: 11px;
border: 1px solid #d9d9d9;
white-space: pre-wrap;
word-wrap: break-word;
}
pre code {
background-color: #fff;
color:#737373;
font-size: 11px;
padding: 0;
}
sup {
font-size: 0.83em;
vertical-align: super;
line-height: 0;
}
* {
-webkit-print-color-adjust: exact;
}
@media screen and (min-width: 914px) {
body {
width: 854px;
margin:10px auto;
}
}
@media print {
body,code,pre code,h1,h2,h3,h4,h5,h6 {
color: black;
}
table, pre {
page-break-inside: avoid;
}
}
</style>
<title>
```
$ keystone tenant-create --name teraproj --description 'sample project'
$ keystone user-create --name tera --tenant teraproj</title>
</head>
<body>
<pre><code>$ keystone tenant-create --name teraproj --description 'sample project'
$ keystone user-create --name tera --tenant teraproj --pass nova --email [email protected]
$ keystone user-role-add --user tera --role admin --tenant teraproj
$ keystone user-role-remove --user tera --role _member_ --tenant teraproj
$ keystone user-role-add --user demo --role _member_ --tenant teraproj
$ nova quota-show --tenant fa08ab5f7f6e478cad8d83e02fa97ce9
$ cinder quota-show fa08ab5f7f6e478cad8d83e02fa97ce9
$ nova quota-update --instances 2 --cores 4 fa08ab5f7f6e478cad8d83e02fa97ce9
$ cinder quota-update --gigabytes 3 fa08ab5f7f6e478cad8d83e02fa97ce9
$ neutron net-create --tenant-id fa08ab5f7f6e478cad8d83e02fa97ce9 teranet
$ neutron subnet-create --tenant-id fa08ab5f7f6e478cad8d83e02fa97ce9 --name terasubnet --gateway 10.2.0.225 --allocation-pool start=10.2.0.240,end=10.2.0.245 teranet 10.2.0.224/27
$ neutron
$ neutron router-create --tenant-id fa08ab5f7f6e478cad8d83e02fa97ce9 trouter
$ neutron router-list
$ neutron net-list
$ neutron router-gateway-set 4f7a5dce-eeda-40af-81e7-cb98ffbfff75 6ab4b856-9cbb-45cd-acb4-ca456664d4cc
$ neutron router-list
$ neutron subnet-list
$ neutron router-interface-add 4f7a5dce-eeda-40af-81e7-cb98ffbfff75 subnet=terasubnet
$ neutron router-port-list trouter
$ nova secgroup-create custom
$ nova secgroup-list-rules custom
$ nova secgroup-add-rule custom icmp -1 -1 0.0.0.0/0
$ nova secgroup-add-rule custom tcp 22 22 0.0.0.0/0
$ nova secgroup-add-rule custom tcp 80 80 0.0.0.0/0
$ nova boot --image cirros-0.3.2-x86_64-uec --flavor m1.tiny tera
$ nova add-secgroup tera custom
$ nova show tera
$ glance image-list
$ glance image-create --name ubuntu --container-format bare --disk-format qcow2 --location http://127.0.0.1:8090/ubuntu1204.img
$ nova list
$ ceilometer alarm-threshold-create --name cpu_high --description 'Instance running hot' -m cpu_util --statistic avg --period 600 --evaluation-periods 3 --comparison-operator gt --threshold 80 --alarm-action 'log://' -q resource_id=bb10b8b7-01d9-4f1c-ba82-c5cb28b3ffd5
$ nova net-list
$ nova boot --image cirros-0.3.2-x86_64-uec --flavor m1.tiny --nic net-id=23bd8516-388c-45d8-9a78-79b629c3db17 --security-groups default,custom demo
$ neutron subnet-list
$ neutron lb-pool-create --name tpool --lb-method ROUND_ROBIN --protocol HTTP --subnet-id ff34f086-9f91-471b-b7b4-75df0c2d2192
$ neutron lb-member-create --address 10.2.0.242 --protocol-port 80 tpool
$ neutron lb-member-create --address 10.2.0.240 --protocol-port 80 tpool
$ neutron
(neutron) lb-healthmonitor-create --delay 3 --type HTTP --max-retries 3 --timeout 3
CTRL + C
$ neutron lb-healthmonitor-associate e9fb8f89-1302-47cf-816f-21a1459f9f02 tpool
$ neutron lb-vip-create --name tvip --protocol-port 80 --protocol HTTP --subnet-id ff34f086-9f91-471b-b7b4-75df0c2d2192 tpool
$ nova floating-ip-create
$ neutron floatingip-show 20a07975-9bba-494a-9b84-8b62a2d7c782
$ neutron lb-vip-list
$ neutron lb-vip-show 87a559b9-8fa8-42f6-ae76-b600ea2d6fd7
$ neutron floatingip-associate 20a07975-9bba-494a-9b84-8b62a2d7c782 27e1e91d-041d-418c-967c-dce65d54ff39
$ ip route add
$ nohup sh -c \
"while true; do echo -e 'HTTP/1.0 200 OK\r\n\r\ndemo' \ | sudo nc -l -p 80 ; done" &
$ cinder create --display-name vol1 1
$ nova volume-attach demo 45ec70c2-1ee6-444c-b48a-27734f9ed632 /dev/vdb
$ swift post workshop
$ swift upload --object-name test.jpg workshop /home/stack/files/test.jpg
$ swift upload --object-name test.mov \ --segment-size 10485760 workshop /home/stack/files/test.mov
$ cd ~/devstack/
$ ./rejoin-stack.sh
戻る:ctrl+a+p
進む:ctrl+a+n
ctrl+c->ヒストリ->プロセス起動
元のスクリーンに戻る:ctrl+a, ctrl+d
screen切り替え:rejoin-stack.sh
</code></pre>
</body>
</html>