-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathopenstack-train-devops4-glance.txt
524 lines (482 loc) · 34.3 KB
/
openstack-train-devops4-glance.txt
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
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
https://docs.openstack.org/glance/train/install/install-ubuntu.html
Image
wei@wei-ThinkPad-X1-Extreme:~$ sudo mysql -u root --password=MARIADB_PASS --execute="CREATE DATABASE IF NOT EXISTS glance;GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' IDENTIFIED BY 'GLANCE_DBPASS';GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY 'GLANCE_DBPASS';"
wei@wei-ThinkPad-X1-Extreme:~$ openstack user create --domain default --password GLANCE_PASS glance
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| domain_id | default |
| enabled | True |
| id | 56910098dc364f85a3359e2b881278f4 |
| name | glance |
| options | {} |
| password_expires_at | None |
+---------------------+----------------------------------+
wei@wei-ThinkPad-X1-Extreme:~$ openstack role add --project service --user glance admin
wei@wei-ThinkPad-X1-Extreme:~$ openstack service create --name glance --description "Openstack Image" image
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | Openstack Image |
| enabled | True |
| id | 803574e33e994cb19e1e88b874d98ea9 |
| name | glance |
| type | image |
+-------------+----------------------------------+
wei@wei-ThinkPad-X1-Extreme:~$ openstack endpoint create --region RegionOne image public http://controller:9292
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 3b2ff722cc014fc887cc2b426e6da555 |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 803574e33e994cb19e1e88b874d98ea9 |
| service_name | glance |
| service_type | image |
| url | http://controller:9292 |
+--------------+----------------------------------+
wei@wei-ThinkPad-X1-Extreme:~$ openstack endpoint create --region RegionOne image internal http://controller:9292
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | ad0ce1fe013a4870a28f683cd658bd01 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 803574e33e994cb19e1e88b874d98ea9 |
| service_name | glance |
| service_type | image |
| url | http://controller:9292 |
+--------------+----------------------------------+
wei@wei-ThinkPad-X1-Extreme:~$ openstack endpoint create --region RegionOne image admin http://controller:9292
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 80db8289d9dc4ec68a5816218af0795e |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 803574e33e994cb19e1e88b874d98ea9 |
| service_name | glance |
| service_type | image |
| url | http://controller:9292 |
+--------------+----------------------------------+
wei@wei-ThinkPad-X1-Extreme:~$ sudo apt-get install -y glance
[sudo] password for wei:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
fonts-liberation2 fonts-opensymbol gir1.2-geocodeglib-1.0
gir1.2-gst-plugins-base-1.0 gir1.2-gstreamer-1.0 gir1.2-gudev-1.0
gir1.2-udisks-2.0 grilo-plugins-0.3-base gstreamer1.0-gtk3
libboost-date-time1.65.1 libboost-filesystem1.65.1 libboost-iostreams1.65.1
libboost-locale1.65.1 libcdr-0.1-1 libclucene-contribs1v5 libclucene-core1v5
libcmis-0.5-5v5 libcolamd2 libdazzle-1.0-0 libe-book-0.1-1
libedataserverui-1.2-2 libeot0 libepubgen-0.1-1 libetonyek-0.1-1 libexiv2-14
libfreerdp-client2-2 libfreerdp2-2 libgc1c2 libgee-0.8-2 libgexiv2-2
libgom-1.0-0 libgpgmepp6 libgpod-common libgpod4 liblangtag-common
liblangtag1 liblirc-client0 libllvm8 liblua5.3-0 libmediaart-2.0-0
libmspub-0.1-1 libodfgen-0.1-1 libqqwing2v5 libraw16 librevenge-0.0-0
libsgutils2-2 libssh-4 libsuitesparseconfig5 libvncclient1 libwinpr2-2
libxapian30 libxmlsec1-nss lp-solve media-player-info syslinux
syslinux-common syslinux-legacy usb-creator-common
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
glance-api glance-common libblas3 libgfortran4 libisns0 liblapack3 libpq5
open-iscsi os-brick-common python3-automaton python3-barbicanclient
python3-castellan python3-cffi python3-cursive python3-ddt python3-glance
python3-glance-store python3-kazoo python3-networkx python3-numpy
python3-os-brick python3-os-win python3-oslo.privsep python3-oslo.reports
python3-oslo.rootwrap python3-oslo.vmware python3-ply python3-psutil
python3-psycopg2 python3-pycparser python3-retrying python3-semantic-version
python3-simplegeneric python3-suds python3-swiftclient python3-taskflow
python3-wsme
Suggested packages:
python-automaton-doc python-castellan-doc python3-dev python-cursive-doc
python3-rados python3-rbd python-kazoo-doc python3-pydotplus python3-scipy
gfortran python-numpy-doc python3-nose python3-numpy-dbg python-os-brick-doc
python-os-win-doc python-oslo.privsep-doc python-oslo.reports-doc
python-ply-doc python-psutil-doc python-psycopg2-doc
python-semantic-version-doc python3-pydot
The following NEW packages will be installed:
glance glance-api glance-common libblas3 libgfortran4 libisns0 liblapack3
libpq5 open-iscsi os-brick-common python3-automaton python3-barbicanclient
python3-castellan python3-cffi python3-cursive python3-ddt python3-glance
python3-glance-store python3-kazoo python3-networkx python3-numpy
python3-os-brick python3-os-win python3-oslo.privsep python3-oslo.reports
python3-oslo.rootwrap python3-oslo.vmware python3-ply python3-psutil
python3-psycopg2 python3-pycparser python3-retrying python3-semantic-version
python3-simplegeneric python3-suds python3-swiftclient python3-taskflow
python3-wsme
0 upgraded, 38 newly installed, 0 to remove and 0 not upgraded.
Need to get 8,483 kB of archives.
After this operation, 47.5 MB of additional disk space will be used.
Get:1 http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/train/main amd64 os-brick-common all 2.10.0-0ubuntu1~cloud0 [4,980 B]
Get:2 http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/train/main amd64 python3-castellan all 1.3.1-0ubuntu1~cloud0 [41.1 kB]
Get:3 http://cn.archive.ubuntu.com/ubuntu bionic/main amd64 libisns0 amd64 0.97-2build1 [110 kB]
Get:4 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 open-iscsi amd64 2.0.874-5ubuntu2.7 [280 kB]
Get:5 http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/train/main amd64 python3-ddt all 1.2.1-2ubuntu1~cloud0 [7,288 B]
Get:6 http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/train/main amd64 python3-os-win all 4.3.2-0ubuntu1~cloud0 [157 kB]
Get:7 http://cn.archive.ubuntu.com/ubuntu bionic/main amd64 libblas3 amd64 3.7.1-4ubuntu1 [140 kB]
Get:8 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgfortran4 amd64 7.4.0-1ubuntu1~18.04.1 [492 kB]
Get:9 http://cn.archive.ubuntu.com/ubuntu bionic/main amd64 liblapack3 amd64 3.7.1-4ubuntu1 [2,112 kB]
Get:10 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpq5 amd64 10.10-0ubuntu0.18.04.1 [108 kB]
Get:11 http://cn.archive.ubuntu.com/ubuntu bionic/universe amd64 python3-automaton all 1.14.0-0ubuntu1 [15.0 kB]
Get:12 http://cn.archive.ubuntu.com/ubuntu bionic/universe amd64 python3-barbicanclient all 4.6.0-0ubuntu1 [43.1 kB]
Get:13 http://cn.archive.ubuntu.com/ubuntu bionic/main amd64 python3-ply all 3.11-1 [46.6 kB]
Get:14 http://cn.archive.ubuntu.com/ubuntu bionic/universe amd64 python3-pycparser all 2.18-2 [67.7 kB]
Get:15 http://cn.archive.ubuntu.com/ubuntu bionic/universe amd64 python3-cffi all 1.11.5-1 [67.4 kB]
Get:16 http://cn.archive.ubuntu.com/ubuntu bionic/universe amd64 python3-cursive all 0.2.1-0ubuntu1 [14.3 kB]
Get:17 http://cn.archive.ubuntu.com/ubuntu bionic/universe amd64 python3-retrying all 1.3.3-3 [7,980 B]
Get:18 http://cn.archive.ubuntu.com/ubuntu bionic/universe amd64 python3-suds all 0.7~git20150727.94664dd-5 [145 kB]
Get:19 http://cn.archive.ubuntu.com/ubuntu bionic/universe amd64 python3-kazoo all 2.2.1-1ubuntu1 [79.8 kB]
Get:20 http://cn.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 python3-networkx all 1.11-1ubuntu3 [606 kB]
Get:21 http://cn.archive.ubuntu.com/ubuntu bionic/main amd64 python3-numpy amd64 1:1.13.3-2ubuntu1 [1,943 kB]
Get:22 http://cn.archive.ubuntu.com/ubuntu bionic/universe amd64 python3-simplegeneric all 0.8.1-1 [11.5 kB]
Get:23 http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/train/main amd64 python3-oslo.privsep all 1.33.3-0ubuntu1~cloud0 [22.9 kB]
Get:24 http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/train/main amd64 python3-os-brick all 2.10.0-0ubuntu1~cloud0 [126 kB]
Get:25 http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/train/main amd64 python3-oslo.rootwrap all 5.16.1-0ubuntu1~cloud0 [25.9 kB]
Get:26 http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/train/main amd64 python3-oslo.vmware all 2.34.1-0ubuntu1~cloud0 [163 kB]
Get:27 http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/train/main amd64 python3-swiftclient all 1:3.8.1-0ubuntu1~cloud0 [68.5 kB]
Get:28 http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/train/main amd64 python3-glance-store all 1.0.0-0ubuntu1~cloud0 [98.7 kB]
Get:29 http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/train/main amd64 python3-psutil amd64 5.5.1-1ubuntu0.19.10.1~cloud0 [167 kB]
Get:30 http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/train/main amd64 python3-oslo.reports all 1.30.0-0ubuntu1~cloud0 [26.9 kB]
Get:31 http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/train/main amd64 python3-psycopg2 amd64 2.7.7-1~cloud0 [160 kB]
Get:32 http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/stein/main amd64 python3-semantic-version all 2.6.0-2~cloud0 [11.1 kB]
Get:33 http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/train/main amd64 python3-taskflow all 3.7.1-0ubuntu2~cloud0 [253 kB]
Get:34 http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/train/main amd64 python3-wsme all 0.9.3-3~cloud0 [61.6 kB]
Get:35 http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/train/main amd64 glance-common all 2:19.0.0-0ubuntu1~cloud0 [90.2 kB]
Get:36 http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/train/main amd64 python3-glance all 2:19.0.0-0ubuntu1~cloud0 [676 kB]
Get:37 http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/train/main amd64 glance-api all 2:19.0.0-0ubuntu1~cloud0 [18.4 kB]
Get:38 http://ubuntu-cloud.archive.canonical.com/ubuntu bionic-updates/train/main amd64 glance all 2:19.0.0-0ubuntu1~cloud0 [15.3 kB]
Fetched 8,483 kB in 3min 9s (44.8 kB/s)
Extracting templates from packages: 100%
Preconfiguring packages ...
Selecting previously unselected package libisns0:amd64.
(Reading database ... 209471 files and directories currently installed.)
Preparing to unpack .../00-libisns0_0.97-2build1_amd64.deb ...
Unpacking libisns0:amd64 (0.97-2build1) ...
Selecting previously unselected package open-iscsi.
Preparing to unpack .../01-open-iscsi_2.0.874-5ubuntu2.7_amd64.deb ...
Unpacking open-iscsi (2.0.874-5ubuntu2.7) ...
Selecting previously unselected package libblas3:amd64.
Preparing to unpack .../02-libblas3_3.7.1-4ubuntu1_amd64.deb ...
Unpacking libblas3:amd64 (3.7.1-4ubuntu1) ...
Selecting previously unselected package libgfortran4:amd64.
Preparing to unpack .../03-libgfortran4_7.4.0-1ubuntu1~18.04.1_amd64.deb ...
Unpacking libgfortran4:amd64 (7.4.0-1ubuntu1~18.04.1) ...
Selecting previously unselected package liblapack3:amd64.
Preparing to unpack .../04-liblapack3_3.7.1-4ubuntu1_amd64.deb ...
Unpacking liblapack3:amd64 (3.7.1-4ubuntu1) ...
Selecting previously unselected package libpq5:amd64.
Preparing to unpack .../05-libpq5_10.10-0ubuntu0.18.04.1_amd64.deb ...
Unpacking libpq5:amd64 (10.10-0ubuntu0.18.04.1) ...
Selecting previously unselected package os-brick-common.
Preparing to unpack .../06-os-brick-common_2.10.0-0ubuntu1~cloud0_all.deb ...
Unpacking os-brick-common (2.10.0-0ubuntu1~cloud0) ...
Selecting previously unselected package python3-automaton.
Preparing to unpack .../07-python3-automaton_1.14.0-0ubuntu1_all.deb ...
Unpacking python3-automaton (1.14.0-0ubuntu1) ...
Selecting previously unselected package python3-barbicanclient.
Preparing to unpack .../08-python3-barbicanclient_4.6.0-0ubuntu1_all.deb ...
Unpacking python3-barbicanclient (4.6.0-0ubuntu1) ...
Selecting previously unselected package python3-castellan.
Preparing to unpack .../09-python3-castellan_1.3.1-0ubuntu1~cloud0_all.deb ...
Unpacking python3-castellan (1.3.1-0ubuntu1~cloud0) ...
Selecting previously unselected package python3-ply.
Preparing to unpack .../10-python3-ply_3.11-1_all.deb ...
Unpacking python3-ply (3.11-1) ...
Selecting previously unselected package python3-pycparser.
Preparing to unpack .../11-python3-pycparser_2.18-2_all.deb ...
Unpacking python3-pycparser (2.18-2) ...
Selecting previously unselected package python3-cffi.
Preparing to unpack .../12-python3-cffi_1.11.5-1_all.deb ...
Unpacking python3-cffi (1.11.5-1) ...
Selecting previously unselected package python3-cursive.
Preparing to unpack .../13-python3-cursive_0.2.1-0ubuntu1_all.deb ...
Unpacking python3-cursive (0.2.1-0ubuntu1) ...
Selecting previously unselected package python3-ddt.
Preparing to unpack .../14-python3-ddt_1.2.1-2ubuntu1~cloud0_all.deb ...
Unpacking python3-ddt (1.2.1-2ubuntu1~cloud0) ...
Selecting previously unselected package python3-os-win.
Preparing to unpack .../15-python3-os-win_4.3.2-0ubuntu1~cloud0_all.deb ...
Unpacking python3-os-win (4.3.2-0ubuntu1~cloud0) ...
Selecting previously unselected package python3-oslo.privsep.
Preparing to unpack .../16-python3-oslo.privsep_1.33.3-0ubuntu1~cloud0_all.deb ...
Unpacking python3-oslo.privsep (1.33.3-0ubuntu1~cloud0) ...
Selecting previously unselected package python3-retrying.
Preparing to unpack .../17-python3-retrying_1.3.3-3_all.deb ...
Unpacking python3-retrying (1.3.3-3) ...
Selecting previously unselected package python3-os-brick.
Preparing to unpack .../18-python3-os-brick_2.10.0-0ubuntu1~cloud0_all.deb ...
Unpacking python3-os-brick (2.10.0-0ubuntu1~cloud0) ...
Selecting previously unselected package python3-oslo.rootwrap.
Preparing to unpack .../19-python3-oslo.rootwrap_5.16.1-0ubuntu1~cloud0_all.deb ...
Unpacking python3-oslo.rootwrap (5.16.1-0ubuntu1~cloud0) ...
Selecting previously unselected package python3-suds.
Preparing to unpack .../20-python3-suds_0.7~git20150727.94664dd-5_all.deb ...
Unpacking python3-suds (0.7~git20150727.94664dd-5) ...
Selecting previously unselected package python3-oslo.vmware.
Preparing to unpack .../21-python3-oslo.vmware_2.34.1-0ubuntu1~cloud0_all.deb ...
Unpacking python3-oslo.vmware (2.34.1-0ubuntu1~cloud0) ...
Selecting previously unselected package python3-swiftclient.
Preparing to unpack .../22-python3-swiftclient_1%3a3.8.1-0ubuntu1~cloud0_all.deb ...
Unpacking python3-swiftclient (1:3.8.1-0ubuntu1~cloud0) ...
Selecting previously unselected package python3-glance-store.
Preparing to unpack .../23-python3-glance-store_1.0.0-0ubuntu1~cloud0_all.deb ...
Unpacking python3-glance-store (1.0.0-0ubuntu1~cloud0) ...
Selecting previously unselected package python3-kazoo.
Preparing to unpack .../24-python3-kazoo_2.2.1-1ubuntu1_all.deb ...
Unpacking python3-kazoo (2.2.1-1ubuntu1) ...
Selecting previously unselected package python3-networkx.
Preparing to unpack .../25-python3-networkx_1.11-1ubuntu3_all.deb ...
Unpacking python3-networkx (1.11-1ubuntu3) ...
Selecting previously unselected package python3-numpy.
Preparing to unpack .../26-python3-numpy_1%3a1.13.3-2ubuntu1_amd64.deb ...
Unpacking python3-numpy (1:1.13.3-2ubuntu1) ...
Selecting previously unselected package python3-psutil.
Preparing to unpack .../27-python3-psutil_5.5.1-1ubuntu0.19.10.1~cloud0_amd64.deb ...
Unpacking python3-psutil (5.5.1-1ubuntu0.19.10.1~cloud0) ...
Selecting previously unselected package python3-oslo.reports.
Preparing to unpack .../28-python3-oslo.reports_1.30.0-0ubuntu1~cloud0_all.deb ...
Unpacking python3-oslo.reports (1.30.0-0ubuntu1~cloud0) ...
Selecting previously unselected package python3-psycopg2.
Preparing to unpack .../29-python3-psycopg2_2.7.7-1~cloud0_amd64.deb ...
Unpacking python3-psycopg2 (2.7.7-1~cloud0) ...
Selecting previously unselected package python3-semantic-version.
Preparing to unpack .../30-python3-semantic-version_2.6.0-2~cloud0_all.deb ...
Unpacking python3-semantic-version (2.6.0-2~cloud0) ...
Selecting previously unselected package python3-simplegeneric.
Preparing to unpack .../31-python3-simplegeneric_0.8.1-1_all.deb ...
Unpacking python3-simplegeneric (0.8.1-1) ...
Selecting previously unselected package python3-taskflow.
Preparing to unpack .../32-python3-taskflow_3.7.1-0ubuntu2~cloud0_all.deb ...
Unpacking python3-taskflow (3.7.1-0ubuntu2~cloud0) ...
Selecting previously unselected package python3-wsme.
Preparing to unpack .../33-python3-wsme_0.9.3-3~cloud0_all.deb ...
Unpacking python3-wsme (0.9.3-3~cloud0) ...
Selecting previously unselected package glance-common.
Preparing to unpack .../34-glance-common_2%3a19.0.0-0ubuntu1~cloud0_all.deb ...
Unpacking glance-common (2:19.0.0-0ubuntu1~cloud0) ...
Selecting previously unselected package python3-glance.
Preparing to unpack .../35-python3-glance_2%3a19.0.0-0ubuntu1~cloud0_all.deb ...
Unpacking python3-glance (2:19.0.0-0ubuntu1~cloud0) ...
Selecting previously unselected package glance-api.
Preparing to unpack .../36-glance-api_2%3a19.0.0-0ubuntu1~cloud0_all.deb ...
Unpacking glance-api (2:19.0.0-0ubuntu1~cloud0) ...
Selecting previously unselected package glance.
Preparing to unpack .../37-glance_2%3a19.0.0-0ubuntu1~cloud0_all.deb ...
Unpacking glance (2:19.0.0-0ubuntu1~cloud0) ...
Setting up python3-swiftclient (1:3.8.1-0ubuntu1~cloud0) ...
Setting up python3-semantic-version (2.6.0-2~cloud0) ...
Setting up python3-kazoo (2.2.1-1ubuntu1) ...
Setting up python3-simplegeneric (0.8.1-1) ...
Setting up libgfortran4:amd64 (7.4.0-1ubuntu1~18.04.1) ...
Setting up python3-oslo.rootwrap (5.16.1-0ubuntu1~cloud0) ...
Setting up libisns0:amd64 (0.97-2build1) ...
Setting up python3-barbicanclient (4.6.0-0ubuntu1) ...
update-alternatives: using /usr/bin/python3-barbican to provide /usr/bin/barbican (barbican) in auto mode
Setting up glance-common (2:19.0.0-0ubuntu1~cloud0) ...
Setting up python3-castellan (1.3.1-0ubuntu1~cloud0) ...
Setting up python3-cursive (0.2.1-0ubuntu1) ...
Setting up open-iscsi (2.0.874-5ubuntu2.7) ...
Created symlink /etc/systemd/system/sockets.target.wants/iscsid.socket → /lib/systemd/system/iscsid.socket.
Created symlink /etc/systemd/system/iscsi.service → /lib/systemd/system/open-iscsi.service.
Created symlink /etc/systemd/system/sysinit.target.wants/open-iscsi.service → /lib/systemd/system/open-iscsi.service.
Setting up python3-psutil (5.5.1-1ubuntu0.19.10.1~cloud0) ...
Setting up python3-suds (0.7~git20150727.94664dd-5) ...
Setting up python3-ddt (1.2.1-2ubuntu1~cloud0) ...
Setting up libblas3:amd64 (3.7.1-4ubuntu1) ...
update-alternatives: using /usr/lib/x86_64-linux-gnu/blas/libblas.so.3 to provide /usr/lib/x86_64-linux-gnu/libblas.so.3 (libblas.so.3-x86_64-linux-gnu) in auto mode
Setting up libpq5:amd64 (10.10-0ubuntu0.18.04.1) ...
Setting up python3-os-win (4.3.2-0ubuntu1~cloud0) ...
Setting up python3-wsme (0.9.3-3~cloud0) ...
Setting up python3-networkx (1.11-1ubuntu3) ...
Setting up os-brick-common (2.10.0-0ubuntu1~cloud0) ...
Setting up python3-oslo.vmware (2.34.1-0ubuntu1~cloud0) ...
Setting up python3-retrying (1.3.3-3) ...
Setting up python3-ply (3.11-1) ...
Setting up python3-automaton (1.14.0-0ubuntu1) ...
Setting up python3-oslo.reports (1.30.0-0ubuntu1~cloud0) ...
Setting up liblapack3:amd64 (3.7.1-4ubuntu1) ...
update-alternatives: using /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/x86_64-linux-gnu/liblapack.so.3 (liblapack.so.3-x86_64-linux-gnu) in auto mode
Setting up python3-psycopg2 (2.7.7-1~cloud0) ...
Setting up python3-pycparser (2.18-2) ...
Setting up python3-cffi (1.11.5-1) ...
Setting up python3-taskflow (3.7.1-0ubuntu2~cloud0) ...
Setting up python3-numpy (1:1.13.3-2ubuntu1) ...
Setting up python3-oslo.privsep (1.33.3-0ubuntu1~cloud0) ...
Processing triggers for initramfs-tools (0.130ubuntu3.9) ...
update-initramfs: Generating /boot/initrd.img-5.3.0-28-generic
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for systemd (237-3ubuntu10.33) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Setting up python3-os-brick (2.10.0-0ubuntu1~cloud0) ...
Setting up python3-glance-store (1.0.0-0ubuntu1~cloud0) ...
Setting up python3-glance (2:19.0.0-0ubuntu1~cloud0) ...
Setting up glance-api (2:19.0.0-0ubuntu1~cloud0) ...
Created symlink /etc/systemd/system/multi-user.target.wants/glance-api.service → /lib/systemd/system/glance-api.service.
Setting up glance (2:19.0.0-0ubuntu1~cloud0) ...
Processing triggers for systemd (237-3ubuntu10.33) ...
Processing triggers for ureadahead (0.100.0-21) ...
wei@wei-ThinkPad-X1-Extreme:~$ sudo sed -i "s%connection = sqlite:////var/lib/glance/glance.sqlite%# &\nconnection=mysql+pymysql://glance:GLANCE_DBPASS@localhost/glance%;s%^\[keystone_authtoken\]$%&\nwww_authenticate_url=http://controller:5000\nauth_url=http://controller:5000\nmemcached_servers=localhost:11211\nauth_type=password\nproject_domain_name=Default\nuser_domain_name=Default\nproject_name=service\nusername=glance\npassword=GLANCE_PASS%;s/^\[paste_deploy\]$/&\nflavor=keystone/;s%^\[glance_store\]$%&\nstores=file,http\ndefault_store=file\nfilesystem_store_datadir=/var/lib/glance/images/%" /etc/glance/glance-api.conf
wei@wei-ThinkPad-X1-Extreme:~$ sudo systemctl restart glance-api
wei@wei-ThinkPad-X1-Extreme:~$ sudo systemctl status glance-api
● glance-api.service - OpenStack Image Service API
Loaded: loaded (/lib/systemd/system/glance-api.service; enabled; vendor prese
Active: active (running) since Fri 2020-01-31 23:33:33 CST; 12s ago
Main PID: 31693 (glance-api)
Tasks: 9 (limit: 4915)
CGroup: /system.slice/glance-api.service
├─31693 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glanc
├─31718 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glanc
├─31719 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glanc
├─31720 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glanc
├─31721 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glanc
├─31722 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glanc
├─31723 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glanc
├─31724 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glanc
└─31725 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glanc
1月 31 23:33:33 wei-ThinkPad-X1-Extreme systemd[1]: Started OpenStack Image Serv
wei@wei-ThinkPad-X1-Extreme:~$ sudo su -s /bin/sh -c "glance-manage db_sync" glance
/usr/lib/python3/dist-packages/oslo_db/sqlalchemy/enginefacade.py:1374: OsloDBDeprecationWarning: EngineFacade is deprecated; please use oslo_db.sqlalchemy.enginefacade
expire_on_commit=expire_on_commit, _conf=conf)
2020-02-01 00:21:30.506 2051 INFO alembic.runtime.migration [-] Context impl MySQLImpl.
2020-02-01 00:21:30.507 2051 INFO alembic.runtime.migration [-] Will assume non-transactional DDL.
2020-02-01 00:21:30.513 2051 INFO alembic.runtime.migration [-] Context impl MySQLImpl.
2020-02-01 00:21:30.513 2051 INFO alembic.runtime.migration [-] Will assume non-transactional DDL.
INFO [alembic.runtime.migration] Context impl MySQLImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
INFO [alembic.runtime.migration] Running upgrade -> liberty, liberty initial
INFO [alembic.runtime.migration] Running upgrade liberty -> mitaka01, add index on created_at and updated_at columns of 'images' table
INFO [alembic.runtime.migration] Running upgrade mitaka01 -> mitaka02, update metadef os_nova_server
INFO [alembic.runtime.migration] Running upgrade mitaka02 -> ocata_expand01, add visibility to images
INFO [alembic.runtime.migration] Running upgrade ocata_expand01 -> pike_expand01, empty expand for symmetry with pike_contract01
INFO [alembic.runtime.migration] Running upgrade pike_expand01 -> queens_expand01
INFO [alembic.runtime.migration] Running upgrade queens_expand01 -> rocky_expand01, add os_hidden column to images table
INFO [alembic.runtime.migration] Running upgrade rocky_expand01 -> rocky_expand02, add os_hash_algo and os_hash_value columns to images table
INFO [alembic.runtime.migration] Running upgrade rocky_expand02 -> train_expand01, empty expand for symmetry with train_contract01
INFO [alembic.runtime.migration] Context impl MySQLImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
Upgraded database to: train_expand01, current revision(s): train_expand01
INFO [alembic.runtime.migration] Context impl MySQLImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
INFO [alembic.runtime.migration] Context impl MySQLImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
Database migration is up to date. No migration needed.
INFO [alembic.runtime.migration] Context impl MySQLImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
INFO [alembic.runtime.migration] Context impl MySQLImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
INFO [alembic.runtime.migration] Running upgrade mitaka02 -> ocata_contract01, remove is_public from images
INFO [alembic.runtime.migration] Running upgrade ocata_contract01 -> pike_contract01, drop glare artifacts tables
INFO [alembic.runtime.migration] Running upgrade pike_contract01 -> queens_contract01
INFO [alembic.runtime.migration] Running upgrade queens_contract01 -> rocky_contract01
INFO [alembic.runtime.migration] Running upgrade rocky_contract01 -> rocky_contract02
INFO [alembic.runtime.migration] Running upgrade rocky_contract02 -> train_contract01
INFO [alembic.runtime.migration] Context impl MySQLImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
Upgraded database to: train_contract01, current revision(s): train_contract01
INFO [alembic.runtime.migration] Context impl MySQLImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
Database is synced successfully.
wei@wei-ThinkPad-X1-Extreme:~$ sudo apt-get install curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
fonts-liberation2 fonts-opensymbol gir1.2-geocodeglib-1.0
gir1.2-gst-plugins-base-1.0 gir1.2-gstreamer-1.0 gir1.2-gudev-1.0
gir1.2-udisks-2.0 grilo-plugins-0.3-base gstreamer1.0-gtk3
libboost-date-time1.65.1 libboost-filesystem1.65.1 libboost-iostreams1.65.1
libboost-locale1.65.1 libcdr-0.1-1 libclucene-contribs1v5 libclucene-core1v5
libcmis-0.5-5v5 libcolamd2 libdazzle-1.0-0 libe-book-0.1-1
libedataserverui-1.2-2 libeot0 libepubgen-0.1-1 libetonyek-0.1-1 libexiv2-14
libfreerdp-client2-2 libfreerdp2-2 libgc1c2 libgee-0.8-2 libgexiv2-2
libgom-1.0-0 libgpgmepp6 libgpod-common libgpod4 liblangtag-common
liblangtag1 liblirc-client0 libllvm8 liblua5.3-0 libmediaart-2.0-0
libmspub-0.1-1 libodfgen-0.1-1 libqqwing2v5 libraw16 librevenge-0.0-0
libsgutils2-2 libssh-4 libsuitesparseconfig5 libvncclient1 libwinpr2-2
libxapian30 libxmlsec1-nss lp-solve media-player-info syslinux
syslinux-common syslinux-legacy usb-creator-common
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
libcurl4
The following NEW packages will be installed:
curl libcurl4
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 373 kB of archives.
After this operation, 1,038 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcurl4 amd64 7.58.0-2ubuntu3.8 [214 kB]
Get:2 http://cn.archive.ubuntu.com/ubuntu bionic-updates/main amd64 curl amd64 7.58.0-2ubuntu3.8 [159 kB]
Fetched 373 kB in 5s (75.7 kB/s)
Selecting previously unselected package libcurl4:amd64.
(Reading database ... 212559 files and directories currently installed.)
Preparing to unpack .../libcurl4_7.58.0-2ubuntu3.8_amd64.deb ...
Unpacking libcurl4:amd64 (7.58.0-2ubuntu3.8) ...
Selecting previously unselected package curl.
Preparing to unpack .../curl_7.58.0-2ubuntu3.8_amd64.deb ...
Unpacking curl (7.58.0-2ubuntu3.8) ...
Setting up libcurl4:amd64 (7.58.0-2ubuntu3.8) ...
Setting up curl (7.58.0-2ubuntu3.8) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
wei@wei-ThinkPad-X1-Extreme:~$ wget https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2
--2020-01-31 23:39:12-- https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2
Resolving cloud.centos.org (cloud.centos.org)... 162.254.149.130
Connecting to cloud.centos.org (cloud.centos.org)|162.254.149.130|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 942407680 (899M)
Saving to: ‘CentOS-7-x86_64-GenericCloud.qcow2’
wei@wei-ThinkPad-X1-Extreme:~$ curl -jkSLO https://cloud-images.ubuntu.com/releases/bionic/release/ubuntu-18.04-server-cloudimg-amd64.img
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
2 328M 2 9648k 0 0 12610 0 7:35:42 0:13:03 7:22:39 16244^C
wei@wei-ThinkPad-X1-Extreme:~$ curl -jkSLO https://mirrors.tuna.tsinghua.edu.cn/ubuntu-cloud-images/xenial/current/xenial-server-cloudimg-amd64-disk1.img
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 283M 100 283M 0 0 4249k 0 0:01:08 0:01:08 --:--:-- 5977k
wei@wei-ThinkPad-X1-Extreme:~$ wget http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img
--2020-01-31 23:58:40-- http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img
Resolving download.cirros-cloud.net (download.cirros-cloud.net)... 64.90.42.85, 2607:f298:6:a036::bd6:a72a
Connecting to download.cirros-cloud.net (download.cirros-cloud.net)|64.90.42.85|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12716032 (12M)
wei@wei-ThinkPad-X1-Extreme:~$ glance image-create --name "cirros" --file Downloads/cirros-0.4.0-x86_64-disk.img --disk-format qcow2 --container-format bare --visibility public
+------------------+----------------------------------------------------------------------------------+
| Property | Value |
+------------------+----------------------------------------------------------------------------------+
| checksum | 443b7623e27ecf03dc9e01ee93f67afe |
| container_format | bare |
| created_at | 2020-01-31T16:22:34Z |
| disk_format | qcow2 |
| id | 32dce14c-3639-4a15-87f0-3d4c32974778 |
| min_disk | 0 |
| min_ram | 0 |
| name | cirros |
| os_hash_algo | sha512 |
| os_hash_value | 6513f21e44aa3da349f248188a44bc304a3653a04122d8fb4535423c8e1d14cd6a153f735bb0982e |
| | 2161b5b5186106570c17a9e58b64dd39390617cd5a350f78 |
| os_hidden | False |
| owner | 93797cdbbe434ef9bdf2a1a3d56c6a54 |
| protected | False |
| size | 12716032 |
| status | active |
| tags | [] |
| updated_at | 2020-01-31T16:22:34Z |
| virtual_size | Not available |
| visibility | public |
+------------------+----------------------------------------------------------------------------------+
wei@wei-ThinkPad-X1-Extreme:~$ glance image-list
+--------------------------------------+--------+
| ID | Name |
+--------------------------------------+--------+
| 32dce14c-3639-4a15-87f0-3d4c32974778 | cirros |
+--------------------------------------+--------+