简体   繁体   中英

Create a frontend website for Horizon OpenStack

I have setup a private cloud which has 2 computes and the back end is working successfully. OpenStack and Horizon is used to create and manage instances.

Basically, Horizon would be used on an administrator level and not by the user. So for the user to enter inputs like RAM, Disk Storage, Image etc, i want to create a frontend (ReactJS, NodeJS) website though which they can provide the details for VM creation.

The flow would be:

  1. User provides all details through an HTML form.
  2. Those details go to the Administrator sitting who will check the details and then approve the request.

  3. Once the request is approved, VM is created and user can manage the VM.

I want to achieve somewhat like the above.

The goal is to not allow access for the user to create, manage VM instances through horizon.

Any help ?

EDITS

The flow should be the following :

  1. Login to the front end user dashboard.
  2. Allow user to create a flavor by accepting the values.
  3. Store the values into MySQL DB.
  4. Admin would get the request inn his login. An 'Accept' and 'Decline' button would be there on each flavor entry. If admin accepts, using shelljs the openstack flavor creation command is run and the output is saved in db.

  5. The user could get the accepted flavor on his side.

  6. The user would create a VM instance by selecting the flavor which he recieved above.
  7. Using openstack create server command, the VM would be created and a token url would be generated which will be displayed to the user.

8.When user clicks on the url, VM is launched.

So the above is the goal to be achieved using React, NodeJS and MySQL.

The difficult parts would be:-

  1. Running the openstack cli commands using shelljs
  2. Generating a token url.

I hope there might be a way to do this.

Thanks

Not sure how to help you on this. Some ideas:

You will need a python backend unless you want your backend to talk to the OpenStack REST API directly. Similarly to Horizon, using the Django Python web framework will save you some time with using the python client APIs

Then you can build a frontend app with ReactJS and BackboneJS. Since ReactJS itself will not let you communicate with the HTTP Response generated by your backend. Also, you should look into Redux to deal with the data flow.

Here is an open source project which does what you want mostly: https://github.com/cyverse/atmosphere/

HTH

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM