Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install OpenStack Nova Computing Cloud with Puppet

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to use Puppet to install OpenStack Nova computing cloud. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.

OpenStack emerged from the partnership between Rackpace Cloud and NASA, which provides cloud computing services that run on standardized hardware. Now a community of more than 60 companies is developing it. OpenStack is licensed by the Apache server and consists of many smaller projects, including the Nova computing platform and a large-scale scalable redundant storage system, Swift.

One way to use OpenStack is to use Puppet and install an OpenStack Nova computing cloud, which is what we will talk about in this article. The Nova computing component is roughly equivalent to the function of Amazon EC2. It allows you to use images, including AMI images, to deploy virtual machines and manage these deployed instances.

First, we are going to build a Ubuntu 11.04 host (Ubuntu Natty's ISO file). * choose a physical host instead of a virtual machine, not only for performance reasons, but also because virtualization within a virtualization can lead to unpredictable results. If you want to run many different images, you will need a lot of hard disk space, at least 10 to 20 gigabytes.

Next, you need to install Puppet and Git on the host:

$sudo apt-get install ruby rubygems git$ sudo gem install puppet

Nova needs to be installed through a PPA, or personal package archive, which is a package repository that contains the current development version of Nova computing components. This is necessary because Nova is in a state of excessive research and development, and the recently packaged distribution does not yet exist.

$sudo apt-get install-y python-software-properties$ sudo add-apt-repository ppa:nova-core/trunk

Then you need to update the APT repository to get the details of the new PPA:

$sudo apt-get update

At this point, download the Puppet Lab OpenStack component from OpenStack using Git.

$cd ~ & & git clone-recursegit://github.com/puppetlabs/puppetlabs-openstack.git

Copy the downloaded component to the Puppet component path:

$sudo cp-R ~ / puppetlabs-openstack/modules/* / etc/puppet/

Now you have everything you need to install Nova on the host. To actually install, you need to trigger and run a local Puppet on the host.

$sudo puppet apply-- verbose ~ / puppetlabs-openstack/manifests/all.pp

This will run the all.pp Puppet manifest, which will install and configure all components of Nova as well as its support packages and prerequisites.

Once Puppet is running (it may take some time because it has to download a lot of packages), then you need to add some images in AMI format.

$cd / tmp$ mkdir lucid_ami & & cd lucid_ami$ wget-Q-O-http://173.203.107.207/ubuntu-lucid.tar | tar xSv

This downloads and unzips a compressed file that includes a clear example Ubuntu image that we can use to create an instance. You will then add these images, including a memory disk, a kernel, and an operating system image, to a service called Glance, an OpenStack service for discovering, recording, and retrieving images.

First add the memory disk and kernel.

$glance add name=ramdisk disk_format=ari container_format=ari is_public=True

< initrd.img-2.6.32-23-server$ glance add name=kernel disk_format=aki container_format=aki is_public=True < vmlinuz-2.6.32-23-server 然后你可以列出已经被添加的镜像: $ glance index 发现2个公开的镜像... 编号名称磁盘格式容器格式大小2kernelakiaki40993601ramdiskariari7988037 你应该看到了你的内存盘镜像#1以及我们的内核#2。然后你可以连同我们明晰的操作系统镜像一起使用它们并也把它添加进去: $ glance add name=lucid_ami disk_format=ami container_format=ami is_public=True ramdisk_id=1 kernel_id=2 < ubuntu-lucid.img 然后再次列出镜像文件,发现你现在拥有镜像#3:一个你将其作为一个虚拟实例推出的明晰的Ubuntu AMI。 $ glance index 发现3个公开的镜像文件... 编号名称磁盘格式容器格式大小3lucid_amiamiami5242880002kernelakiaki40993601ramdiskariari7988037 你也可以添加其它的多种格式的镜像到Glance。 接下来,你需要通过运行一些Nova子命令来设置你到Nova的访问权限和身份验证,这会产生一个密钥对,用来验证我们的Nova实例(类似于使用Amazon AWS的密钥对)。这些相同的命令还会创建一个Bash脚本,用来设置合适的环境变量来验证Nova。 $ cd ~$ sudo nova-manage project zipfile nova novaadmin 现在,你应该拥有了一个包含密钥对和Bash脚本在内的被称为nova.zip的压缩文件,它需要解压: $ unzip nova.zip 运行Bash脚本来填充我们的身份认证和环境变量。在你可以通过一个命令行会话与Nova进行交互之前,你需要运行这个脚本,或者把它的运行作为登录的一部分。 $ source novarc ***,添加你的密钥对,调用配对的openstack: $ euca-add-keypair openstack >

~ / cert.pem

Now you can use this key pair to run an instance. Find a mirror to run:

$nova image-list+----+ | number | name | status | 1 | ramdisk | ACTIVE | | 2 | kernel | ACTIVE | | 3 | lucid_ami | ACTIVE | +-+

Then look for a feature of the image to run. The feature describes the size and type of the image you are going to run. In the Amazon AWS world, this is the difference between a small, medium and large instance. You will find that this feature is similar to Amazon EC2.

$nova flavor-list+----+-+ | ID | Name | Memory_MB | Swap | Local_GB | VCPUs | RXTX_Quota | RXTX_Cap | +- -+ | 1 | m1.tiny | 512 | | 0 | 2 | m1.small | 2048 | | 20 | 3 | m1.medium | 4096 | | 40 | | 4 | m1.large | 8192 | | 80 | | | | 5 | m1.xlarge | 16384 | 16384 | +-+ |

In this example, we will choose to run a small feature of the ami-00000003 image instance, which is the clear Ubuntu image you just added, and use the openstack key pair:

$euca-run-instances ami-00000003-k openstack-t m1.tiny

It will take several minutes to start and configure the instance, and you can track its status using the following command:

$euca-describe-instancesi-00000001 ami-00000003 11.0.0.2 11.0.0.2 building m1.tiny

Here you can see that the instance has been started and has been assigned an IP address: 11.0.0.2. With this IP address and your key pair, you can now connect to the new instance through SSH.

$ssh-I ~ / cert.pem root@11.0.0.2

When you log in to the new instance, you can set it up, deploy the application on it, and use it until you no longer need it (you can terminate the instance with the euca-terminate-instance command). You can also generate other instances and enable yourself to run your own open source cloud.

OpenStack is just getting started, while many additional projects, including authentication and database services, are under way, and existing components are being extended and updated every day. If you want to learn more about OpenStack, you can refer to some documentation or take a look at the mailing list where you can get help or participate in research and development.

This is the end of this article on "how to use Puppet to install OpenStack Nova computing cloud". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report