Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable VM creation options #72

Open
uakfdotb opened this issue Jun 1, 2016 · 3 comments
Open

Configurable VM creation options #72

uakfdotb opened this issue Jun 1, 2016 · 3 comments

Comments

@uakfdotb
Copy link
Member

uakfdotb commented Jun 1, 2016

See #66 and #71.

It should be possible to set up plans so that plan metadata is set according to user-submitted preferences, which can be collected from the VM creation page. Ideally, each preference can be associated with an additional hourly charge.

This proposal needs more details.

@uakfdotb
Copy link
Member Author

uakfdotb commented Jun 1, 2016

Here is one possibility:

User can define configurable options:

CREATE TABLE options (
    id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
    name VARCHAR(64) NOT NULL,
    helptext VARCHAR(256) NOT NULL,
    order_id INT NOT NULL,
    metadata_key VARCHAR(64) NOT NULL
);
CREATE TABLE option_values (
    id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
    option_id INT NOT NULL,
    description VARCHAR(256) NOT NULL,
    metadata_value VARCHAR(256) NOT NULL,
    price BIGINT NOT NULL DEFAULT 0
);

User can associate regions with options (via another table; note that it is regions and not plans since the VM creation page includes both plans and these options, although we could load it via JS if we wanted to). Client can set options, which will be passed as part of the plan metadata to the VM interface.

VMs also need to be associated with options so that the user can be charged the correct amount, in case price is non-zero.

@jamesmr89
Copy link

This looks looks like a good approach, as an admin I would bind options to regions, and endusers would have the ability to enable/disable them when creating vms?

The assoisiation is key with billing is key.

@uakfdotb
Copy link
Member Author

uakfdotb commented Jun 2, 2016

Yeah. Probably the options will be able to be arbitrary, but if the only two options are yes/no then it will show a checkbox instead of a select dropdown. Should probably support text field options too somehow. Still need to think about it some more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants