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

Console (UI/API): Add the “Shared vCPU” label for the instance types #837

Open
vitabaks opened this issue Dec 10, 2024 · 2 comments
Open
Labels
API PostgreSQL Cluster Console API console PostgreSQL Cluster Console enhancement Improvement of the current functionality good first issue Good for newcomers UI PostgreSQL Cluster Console UI

Comments

@vitabaks
Copy link
Owner

vitabaks commented Dec 10, 2024

Related #835

Please implement a feature to clearly display the “Shared vCPU” label for instance types that use shared virtual CPUs. This will improve clarity and help users differentiate between shared and dedicated vCPU instances when selecting instance types.

Use Case:

  • Users can quickly identify instance types with shared vCPUs during instance type selection.

Expected Outcome:

  • Instance types with shared vCPUs are visibly marked with a “Shared vCPU” indicator in the UI/API.
@vitabaks vitabaks added console PostgreSQL Cluster Console UI PostgreSQL Cluster Console UI API PostgreSQL Cluster Console API labels Dec 10, 2024
@vitabaks vitabaks changed the title TODO: Add “Shared vCPU” Indicator for Relevant Instance Types Console (UI/API): Add “Shared vCPU” Indicator for Relevant Instance Types Dec 10, 2024
@vitabaks vitabaks changed the title Console (UI/API): Add “Shared vCPU” Indicator for Relevant Instance Types Console (UI/API): Add “Shared vCPU” indicator for relevant instance types Dec 10, 2024
@vitabaks vitabaks added good first issue Good for newcomers enhancement Improvement of the current functionality labels Dec 10, 2024
@vitabaks
Copy link
Owner Author

Details

Table: cloud_instances

postgres=# \d cloud_instances
                             Table "public.cloud_instances"
     Column     |            Type             | Collation | Nullable |      Default      
----------------+-----------------------------+-----------+----------+-------------------
 cloud_provider | text                        |           | not null | 
 instance_group | text                        |           | not null | 
 instance_name  | text                        |           | not null | 
 arch           | text                        |           | not null | 'amd64'::text
 cpu            | integer                     |           | not null | 
 ram            | integer                     |           | not null | 
 price_hourly   | numeric                     |           | not null | 
 price_monthly  | numeric                     |           | not null | 
 currency       | character(1)                |           | not null | '$'::bpchar
 updated_at     | timestamp without time zone |           |          | CURRENT_TIMESTAMP
 shared_cpu     | boolean                     |           |          | false
Indexes:
    "cloud_instances_pkey" PRIMARY KEY, btree (cloud_provider, instance_group, instance_name)
Foreign-key constraints:
    "cloud_instances_cloud_provider_fkey" FOREIGN KEY (cloud_provider) REFERENCES cloud_providers(provider_name)
Triggers:
    handle_updated_at BEFORE UPDATE ON cloud_instances FOR EACH ROW EXECUTE FUNCTION extensions.moddatetime('updated_at')
postgres=# select * from cloud_instances where shared_cpu order by cloud_provider, cpu, ram;
 cloud_provider | instance_group | instance_name | arch  | cpu | ram | price_hourly | price_monthly | currency |        updated_at         | shared_cpu 
----------------+----------------+---------------+-------+-----+-----+--------------+---------------+----------+---------------------------+------------
 aws            | Small Size     | t3.small      | amd64 |   2 |   2 |        0.021 |        14.976 | $        | 2024-12-12 08:50:08.61843 | t
 aws            | Small Size     | t3.medium     | amd64 |   2 |   4 |        0.042 |        29.952 | $        | 2024-12-12 08:50:08.61843 | t
 azure          | Small Size     | Standard_B1ms | amd64 |   1 |   2 |        0.021 |        15.111 | $        | 2024-12-12 08:50:08.61843 | t
 azure          | Small Size     | Standard_B2s  | amd64 |   2 |   4 |        0.042 |        30.368 | $        | 2024-12-12 08:50:08.61843 | t
 digitalocean   | Small Size     | s-2vcpu-2gb   | amd64 |   2 |   2 |        0.027 |        18.000 | $        | 2024-12-12 08:50:08.61843 | t
 digitalocean   | Small Size     | s-2vcpu-4gb   | amd64 |   2 |   4 |        0.036 |        24.000 | $        | 2024-12-12 08:50:08.61843 | t
 gcp            | Small Size     | e2-small      | amd64 |   2 |   2 |        0.017 |        12.228 | $        | 2024-12-12 08:50:08.61843 | t
 gcp            | Small Size     | e2-medium     | amd64 |   2 |   4 |        0.034 |        24.457 | $        | 2024-12-12 08:50:08.61843 | t
 hetzner        | Small Size     | CPX11         | amd64 |   2 |   2 |       0.0082 |          5.09 | $        | 2024-12-12 08:50:08.61843 | t
 hetzner        | Small Size     | CX22          | amd64 |   2 |   4 |       0.0074 |          4.59 | $        | 2024-12-10 00:00:00       | t
 hetzner        | Small Size     | CPX21         | amd64 |   3 |   4 |       0.0138 |          8.59 | $        | 2024-12-12 08:50:08.61843 | t
 hetzner        | Small Size     | CX32          | amd64 |   4 |   8 |       0.0127 |          7.59 | $        | 2024-12-10 00:00:00       | t
 hetzner        | Small Size     | CPX31         | amd64 |   4 |   8 |        0.025 |         15.59 | $        | 2024-12-10 00:00:00       | t
 hetzner        | Medium Size    | CPX41         | amd64 |   8 |  16 |       0.0464 |         28.09 | $        | 2024-12-10 00:00:00       | t
 hetzner        | Medium Size    | CX42          | amd64 |   8 |  16 |       0.0304 |         18.59 | $        | 2024-12-10 00:00:00       | t
 hetzner        | Medium Size    | CPX51         | amd64 |  16 |  32 |       0.0979 |         61.09 | $        | 2024-12-10 00:00:00       | t
 hetzner        | Medium Size    | CX52          | amd64 |  16 |  32 |       0.0611 |         36.09 | $        | 2024-12-10 00:00:00       | t
(17 rows)

API: external/deployments

image
image

In the user interface (UI), display “Shared vCPU” as part of the instance type for those instances where the API returns "shared_cpu": true.

Example: CPX11 (Shared vCPU)

@vitabaks
Copy link
Owner Author

cc @nelsonic

@vitabaks vitabaks changed the title Console (UI/API): Add “Shared vCPU” indicator for relevant instance types Console (UI/API): Add the “Shared vCPU” label for the instance types Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API PostgreSQL Cluster Console API console PostgreSQL Cluster Console enhancement Improvement of the current functionality good first issue Good for newcomers UI PostgreSQL Cluster Console UI
Projects
None yet
Development

No branches or pull requests

1 participant