After Deprec

openstack_cloud_computing_cookbook

Issue link: https://read.uberflip.com/i/1334488

Contents of this Issue

Navigation

Page 63 of 317

Chapter 2 53 18. We need to edit the /etc/fstab file in our image, so that the root file system label remains constant when we spawn different instances: LABEL=uec-rootfs / ext4 defaults 0 1 19. To ensure we can log in using the keys we specify to run our instances, we add the following to the rc.local script: # Download the key from the meta server mkdir –-mode=0700 -p /root/.ssh echo >> /root/.ssh/authorized_keys curl -m 10 -s http://169.254.169.254/latest/meta-data/public- keys/0/openssh-key | grep 'ssh-rsa' >> /root/.ssh/authorized_keys chmod 0600 /root/.ssh/authorized_keys echo "AUTHORIZED_KEYS:" echo "************************" cat /root/.ssh/authorized_keys echo "************************" 20. Once done, we need to copy the kernel and ramdisk for use within Nova. sudo cp /mnt/boot/vmlinuz-2.6.32-220.7.1.el6.i686 CentOS-6.2-i386-vmlinuz sudo cp /mnt/boot/initramfs-2.6.32-220.7.1.el6.i686.img CentOS-6.2-i386-loader 21. We can now unmount our image, ready for upload to our OpenStack Compute environment, thus. sudo umount /mnt 22. We now change the label of our image to match what we specified in our fstab file. sudo tune2fs -L uec-rootfs CentOS-6.2-i386.img 23. We can finally upload this to our OpenStack Compute environment for use, thus. cloud-publish-image -t image -K CentOS-6.2-i386-vmlinuz -R CentOS-6.1-i386-loader i386 CentOS-6.1-i386.img images 24. After a short while, we can view this in the list of images we can use under OpenStack Compute. euca-describe-images www.it-ebooks.info

Articles in this issue

Links on this page

Archives of this issue

view archives of After Deprec - openstack_cloud_computing_cookbook