Score:0

Approach to map custom users with OpenStack

bi flag

I'm trying to build a simple app where users create their own instances (vms) and I charge them by the billing time (similar to DO). My app uses OpenStack as a backend to do all the heavy lifting.

The question is about the best approach to associate users in my app with my OpenStack deployment.

Should I map each user in my app to a user/project in OpenStack? should I map all users in my app to a single project in OpenStack? what is the best way to do this considering the need to get usage information for the instances to charge the user?

us flag
Does [cloudkitty](https://docs.openstack.org/cloudkitty/latest/) cover your requirements?
Elianny L avatar
bi flag
not really because my users won't access the OpenStack dashboard but I didn't know cloudkitty, very interesting indeed. Thanks.
Score:0
la flag

Two considerations:

  • Ask yourself the question:

    • do your users only need access to their VM and your app?

      And will your app make the relevant API calls for your users (like for example power off, power on, reboot VM)
      Then your app might be much simpler as you only need to maintain roles and access controls there.

    • Or will you allow your users themselves to access to the OpenStack API's / Horizon dashboard directly?
      Because then more isolation between your users at the OpenStack level will be essential and providing each end-user with their own project would be the only thing that makes sense.

  • Not every OpenStack deployment offers/enables the same features so first explore what is possible for you. Can you install features? Is ceilometer available to you or will you need to do your own resource usage tracking to enable billing?

Elianny L avatar
bi flag
Users won't have access to OpenStack API's/Horizon dashboard directly. They will only have access to the dashboard in my app (to manage the VMs). I can install any feature I want to the OpenStack deployment, including ceilometer. I was planning to only bill by uptime for now. In that scenario, what do you recommend for the users mapping?
diya avatar
la flag
When your users won't access OpenStack and only your app does, I wouldn't create any users (other than you and your app) on OpenStack. As a first level approach consider keeping it simple: bill users at a rate consistent with the flavor/T-shirt size of the instance and start billing when a user creates the VM in your app and continues until the users deletes the VM in your app, ignoring the much more correct but complicated accounting and billing metrics that OpenStack can generate.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.