OpenStack Training
OpenStack Training
April, 2014
Belmiro Moreira
@belmiromoreira
What is OpenStack?
What is OpenStack?
"Founded by Rackspace Hosting and NASA, OpenStack has grown
to be a global software community of developers collaborating
on a standard and massively scalable open source cloud operating
system."
"All of the code for OpenStack is freely available under the Apache
2.0 license. Anyone can run it, build on it, or submit changes back
to the project."
4
What is OpenStack?
At CERN we have the following OpenStack projects deployed:
- compute service (nova)
- image service (glance)
- dashboard service (horizon)
- block storage service (cinder)
- metering service (telemetry)
- identity service (keystone)
5
1
8
2) Change its permissions so that only you can read and write to the file
$ chmod 0600 my_keypair.pem!
1
12
1
2
13
14
3
4
5
15
16
1
17
OS_AUTH_URL=https://openstack.cern.ch:5000/v2.0!
OS_TENANT_ID=<tenant-id>!
OS_TENANT_NAME=<tenant-name>!
OS_USERNAME=<username>!
!
# With Keystone you pass the keystone password.!
echo "Please enter your OpenStack Password: "!
read -sr OS_PASSWORD_INPUT!
export OS_PASSWORD=$OS_PASSWORD_INPUT!
18
!
19
21
+--------------------------------------+--------------------------------------------------------------------------+!
| Property
| Value
|!
+--------------------------------------+--------------------------------------------------------------------------+!
| OS-DCF:diskConfig
| MANUAL
|!
| OS-EXT-AZ:availability_zone
| nova
|!
| OS-EXT-STS:power_state
| 0
|!
| OS-EXT-STS:task_state
| scheduling
|!
| OS-EXT-STS:vm_state
| building
|!
| OS-SRV-USG:launched_at
| |!
| OS-SRV-USG:terminated_at
| |!
| accessIPv4
|
|!
| accessIPv6
|
|!
| config_drive
|
|!
| created
| 2014-03-14T22:14:23Z
|!
| flavor
| m1.tiny (1)
|!
| hostId
|
|!
| id
| 3e822ed1-e27c-4ef8-b84d-c02f00585d5c
|!
| image
| SLC6 Server - x86_64 [2014-01-30] (321b8583-967f-4f56-913e-2a10e058ff37) |!
| key_name
| my_keypair
|!
| metadata
| {}
|!
| name
| my-vm
|!
| os-extended-volumes:volumes_attached | []
|!
| progress
| 0
|!
| security_groups
| default
|!
| status
| BUILD
|!
| tenant_id
| 4d679467-f828-41bc-90fa-ef8633594a6f
|!
| updated
| 2014-03-14T22:14:23Z
|!
| user_id
| belmiro
|!
+--------------------------------------+--------------------------------------------------------------------------+!
22
23
24
25
26
27
+--------------------------------------+--------------------------------------------------------------------------+!
| Property
| Value
|!
+--------------------------------------+--------------------------------------------------------------------------+!
| CERN_NETWORK network
| 188.184.149.211
|!
| OS-DCF:diskConfig
| MANUAL
|!
| OS-EXT-AZ:availability_zone
| nova
|!
| OS-EXT-STS:power_state
| 1
|!
| OS-EXT-STS:task_state
| |!
| OS-EXT-STS:vm_state
| active
|!
| OS-SRV-USG:launched_at
| 2014-02-26T22:27:29.000000
|!
| OS-SRV-USG:terminated_at
| |!
| accessIPv4
|
|!
| accessIPv6
|
|!
| config_drive
|
|!
| created
| 2014-02-26T22:24:18Z
|!
| flavor
| m1.tiny (1)
|!
| hostId
| 859af9ab61d4627edbf8dee026e5124c4e6220545b5fabdd30e564dd
|!
| id
| 7a78ea0e-47bf-48fe-af62-157492285afa
|!
| image
| SLC6 Server - x86_64 [2014-01-30] (321b8583-967f-4f56-913e-2a10e058ff37) |!
| key_name
| |!
| metadata
| {"cern-services": "false"}
|!
| name
| demo-001
|!
| os-extended-volumes:volumes_attached | []
|!
| progress
| 0
|!
| security_groups
| default
|!
| status
| ACTIVE
|!
| tenant_id
| 4d679467-f828-41bc-90fa-ef8633594a6f
|!
| updated
| 2014-02-26T22:27:29Z
|!
| user_id
| belmiro
|!
+--------------------------------------+--------------------------------------------------------------------------+!
28
2
1
29
30
(...)!
31
2
3
1
32
33
Copy the address and use your preferred browser to open the console
34
35
36
4
5
6
37
38
39
40
41
42
2
1
44
45
2
1
3
46
47
2
1
3
48
5
49
50
+--------------------------------------+----------+---------------+------------+-------------+------------------------------+!
| ID
| Name
| Status
| Task State | Power State | Networks
|!
+--------------------------------------+----------+---------------+------------+-------------+------------------------------+!
| 7a78ea0e-47bf-48fe-af62-157492285afa | demo-001 | VERIFY_RESIZE | | Running
| CERN_NETWORK=188.184.149.211 |!
(...)!
!
$ nova show 7a78ea0e-47bf-48fe-af62-157492285afa!
+--------------------------------------+--------------------------------------------------------------------------+!
| Property
| Value
|!
+--------------------------------------+--------------------------------------------------------------------------+!
| CERN_NETWORK network
| 188.184.149.211
|!
| OS-DCF:diskConfig
| MANUAL
|!
| OS-EXT-AZ:availability_zone
| nova
|!
| OS-EXT-STS:power_state
| 1
|!
| OS-EXT-STS:task_state
| |!
| OS-EXT-STS:vm_state
| resized
|!
(...)!
| flavor
| m1.small (2)
|!
| id
| 7a78ea0e-47bf-48fe-af62-157492285afa
|!
(...)!
!
51
52
53
54
+--------------------------------------+-------------------------------------------+-------------+------------------+-------------+--------+!
| ID
| Name
| Disk Format | Container Format | Size
| Status |!
+--------------------------------------+-------------------------------------------+-------------+------------------+-------------+--------+!
| 9207a644-f390-43a8-911d-19bd74f136f5 | demo-006-snapshot
| qcow2
| bare
| 2468937728 | active |!
(...)!
55
56
57
58
59
To change the "Main User" and "Responsible" of an existing device in LanDB created by OpenStack use:
"nova meta <instance_uuid> set"
"landb-mainuser=<user or egroup>"
"landb-responsible=<user or egroup>"
60
61
62
63
64
65
66
6
67
68
69
70
71
73
What's next...
This guide is only a brief OpenStack introduction for users.
For more information:
- http://docs.openstack.org
- https://information-technology.web.cern.ch/book/cern-private-cloud-userguide
74
[email protected]
@belmiromoreira