1 Star 0 Fork 0

aaawoyucheng / cloud-init-guide

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
02-exploration.txt 1.81 KB
一键复制 编辑 原始数据 按行查看 历史
Matt Dorn 提交于 2016-04-27 03:43 . initial commit
# 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
1
https://gitee.com/aaawoyucheng/cloud-init-guide.git
git@gitee.com:aaawoyucheng/cloud-init-guide.git
aaawoyucheng
cloud-init-guide
cloud-init-guide
master

搜索帮助