metal-stack-cloud / api

MIT License
1 stars 0 forks source link

Introduce Product Type Enum #98

Closed Conceptiks closed 1 year ago

Conceptiks commented 1 year ago

The current API-response for getPrices() constrains the layout of the pricing page, where I would like to categorise different "types" of prices based on "products".

If we could introduce a new enum-field productType and possibly even a short description within the API, that would allow for much more organized, structure pricing page:

{
    productType: "networking" | "controlplane" | "compute" | "backup"
    description: string
}

I am not sure about the exact ENUMS for productType, this is just a first draft.

Let's discuss!

Pilzington commented 1 year ago

My proposal:

Product ProductType
storage storage
c1-medium-x86 machine
ip networking
c1-xlarge-x86 machine
c1-large-x86 machine
n1-medium-x86 machine
snapshot networking
volume storage
controlplane machine/controlplane ?
Gerrit91 commented 1 year ago

I think I'd suggest storage, network, compute, kubernetes

Pilzington commented 1 year ago

We should think about good descriptions for our products. @philiphaas Maybe you have better ideas than me. 😄

Product ProductType Description
ip network Connect to the internet.
c1-large-x86 compute Our big work horse for difficult tasks
c1-medium-x86 compute Our medium sized server.
n1-medium-x86 compute Our small sized server.
snapshot storage Backup your data.
volume storage Store your data.
controlplane kubernetes The control plane offers a highly available kube-apiserver, a dedicated firewall, IDS events and private networking with an internet gateway.
Conceptiks commented 1 year ago

@Pilzington Thank you for working on this so quickly!

Just to provide some further context, this will be helpful as part of this PR: https://github.com/metal-stack-cloud/website/pull/178

Within this PR, this is the filtering I currently have to do: https://github.com/metal-stack-cloud/website/blob/561a8581ce475abc8261996865225b0326db0388/sites/website/src/routes/%5Blang%5D/(landingpage)/prices/%2Bpage.svelte#L29C5-L33C73


As for descriptions, how about usage/workload recommendations for the compute resources? Below are some concepts

Product | ProductType | Description -- | -- | -- ip | network | Connect to the internet with ephemeral or static public facing IPv4 addresses. c1-large-x86 | compute | _Idea 1 (workload intensity and max. recommended nodes)_ Recommended for the most complex workloads or roughly 20 worker nodes. c1-medium-x86 | compute | _Idea 2 (more concrete examples)_ Perfect for scaling large APIs or running BI software n1-medium-x86 | compute | _Idea 3 (more playful with example workloads)_ Smooth sailing for simple workloads or just to try our service snapshot | storage | Backup your _cluster instances_ or _persistent volumes_. volume | storage | High performance NVMe-over-TCP persistent storage. controlplane | kubernetes | Includes a highly available kube-apiserver, a dedicated firewall, IDS events and private networking with an internet gateway.
philiphaas commented 1 year ago

@Pilzington Thank you for working on this so quickly!

Just to provide some further context, this will be helpful as part of this PR: metal-stack-cloud/website#178

Within this PR, this is the filtering I currently have to do: https://github.com/metal-stack-cloud/website/blob/561a8581ce475abc8261996865225b0326db0388/sites/website/src/routes/%5Blang%5D/(landingpage)/prices/%2Bpage.svelte#L29C5-L33C73

As for descriptions, how about usage/workload recommendations for the compute resources? Below are some concepts Product ProductType Description ip network Connect to the internet with ephemeral or static public facing IPv4 addresses. c1-large-x86 compute Idea 1 (workload intensity and max. recommended nodes) Recommended for the most complex workloads or roughly 20 worker nodes. c1-medium-x86 compute Idea 2 (more concrete examples) Perfect for scaling large APIs or running BI software n1-medium-x86 compute Idea 3 (more playful with example workloads) Smooth sailing for simple workloads or just to try our service snapshot storage Backup your cluster instances or persistent volumes. volume storage High performance NVMe-over-TCP persistent storage. controlplane kubernetes Includes a highly available kube-apiserver, a dedicated firewall, IDS events and private networking with an internet gateway.

I like the descriptions by @Conceptiks. As for the server sizes, I would go with Idea 1.

Pilzington commented 1 year ago

@Conceptiks I am not sure what you mean by or roughly 20 worker nodes

philiphaas commented 1 year ago

c1-large-x86 | compute | Our big work horse for difficult tasks. Recommended for complex workloads. c1-medium-x86 | compute | Our medium sized server. An all-rounder for all kinds of workloads. n1-medium-x86 | compute | Our small sized server. Recommended for simpler, less complex workloads.

Something like this @Pilzington?