I would like to write a program on an open-stack cloud. When I search for resources, all I find are installation and Admin manuals.

I have a cloud installed, now how do I run a program on it? An example of using the message queue or the blob-store would be nice.

Does anyone know of a good programming tutorial for this?

有帮助吗?

解决方案

You need to be more clear when you say 'write a program on an Openstack cloud'.

a. If you mean that you want to write recipes to control and play with your VMs in an Openstack cloud, they you should consider installing and using the following packages:

  • python-novaclient - client library for OpenStack Compute API
  • python-nova-adminclient - client for administering Openstack Nova

The above two libraries expose everything you will need to write an application.

b. If however, you are looking forward to contribute to Openstack project, they should prepare you development environment first and then register yourself on Launchpad. The code has moved to GitHub but the blueprints and bug discussions are still on launchpad.

Hope it helps. Let me know if you need further help in this regard.

其他提示

'Hello world' is not suitable example program for openstack.

Yes ofcourse you can setup your php dev environment in an instance and can develop programs in it. In this example you are just consuming openstack as an end user.

The real power of openstack can be recognised in this example:

You can design an application (eg: DB as a Service). In this applciation , the user just clicks a 'Request DB Instance' button and then he will be provided a 'ipaddress','port number' and credentials for his connection string. So that he can connect his application to the generated database.

In the background you can use python apis call for creating a new vm , install the os and install the required softwares (Database service) all these will be done by openstack automatically.

This is a simple example application (PAAS) which runs above Openstack.

I made a research on your question, Look at the API functions here i.e. object api, compute api etc apis, without these functionality getting finished, all the openstack is you cannot code anything programming wise. Anything you do is only you build a cloud and execute commands manually.

From what I understand, the motivation behind OpenStack is NOT building a server, nor API, nor a database.

OpenStack is about managing an environment of multiple machines, databases and the networking to connect them all.

For example, as I understand it, you should be able to implement a feature on your OpenStack cloud to create 10 VMs and 3 DBs. This can be created using a click on the dashboard or invoke some API.

Once a VM is up, you can install a Linux image on it. A web-server, for example, can then be deployed on that new VM, though this, I think, is unrelated to OpenStack.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top