-
Notifications
You must be signed in to change notification settings - Fork 15
/
02-exploration.txt
72 lines (51 loc) · 1.81 KB
/
02-exploration.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
# Boot a cirros instance
nova boot --image cirros --flavor m1.summit myfirstmetainstance
# View console-log
nova console-log myfirstmetainstance
# Get VNC console
nova get-vnc-console myfirstmetainstance novnc
# Open the URL in your browser.
# username: cirros
# password: cubswin:)
#
# To scroll up/down within the VNC console..
# Windows/Linux: Shift + Page Up and Shift + Page Down
# Macbook: Fn + Shift + Up and Fn + Shift + Down
# List block devices
sudo blkid
# Mount config drive
sudo mount /dev/sr0 /mnt
# Examine contents of config drive
cd /mnt/openstack/latest
ls
# Examine contents of meta_data.json
cat meta_data.json
# Examine contents of network_data.json
cat network_data.json
# Examine contents of vendor_data.json
cat vendor_data.json
# Clear the console
clear
# Observe the route to the Metadata service
ip route
# Query Metadata service
curl http://169.254.169.254/openstack/latest/meta_data.json
# From the command line interface, view the current quota
nova quota-show
# Update the server with a new key/value pair
nova meta myfirstmetainstance set openstacksummit=austin
# Fun Tip: You can inject metadata at instnace boot by running the following
# nova boot --image <your_image> --flavor <your_flavor> --meta=key1=value1 --meta=key2=value2 myinstance
# From the instance, query the Metadata service again
# You should now be able to see the newly injected metadata.
curl http://169.254.169.254/openstack/latest/meta_data.json
# Remove the key/value pair
nova meta myfirstmetainstance delete openstacksummit=austin
# From the instance, query the Metadata service again
# You should now be able to see the newly injected metadata.
curl http://169.254.169.254/openstack/latest/meta_data.json
# Log out of instance
exit
######!!!From Your SSH Session!!!######
# Delete the instance
nova delete myfirstmetainstance