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

Remove capacity mode and burst mode from docs #9

Merged
merged 1 commit into from
Feb 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions content/contributing/local_development.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
title = "Local development"
+++

## Setup Environment
## Admin-UI and UI
### Requirements
* npm

TODO
### Setup
1. Copy `src/environments/environment.local.example.ts` to `src/environments/environment.local.ts`
2. Edit `src/environments/environment.local.ts` so that that the gargantua backend URL is placed under `server`.
3. Run `npm start run:local` to start your local UI/Admin-UI server

## Gargantua
### Requirements
TODO
26 changes: 0 additions & 26 deletions content/docs/architecture/resources/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ metadata:
name: sample-environment
namespace: hobbyfarm-system
spec:
burst_capable: true
burst_count_capacity:
example-template: 100
capacity_mode: count
count_capacity:
example-template: 500
display_name: sample-environment
Expand All @@ -35,28 +31,6 @@ spec:

## Configuration

### `burst_capable`

Bursting was the original name given to HobbyFarm's capability to dynamically provision VMs. Setting `spec.burst_capable` to `true` on an environment means that this environment is tolerant of dynamically created VMs.

> This field may be removed in a future release of HobbyFarm. External provisioners generally do not distinguish between ahead-of-time (AOT) provisioning and dynamic or on-demand provisioning. Thus an environment may not need to define this property at all. To track this discussion, please see https://github.com/hobbyfarm/hobbyfarm/issues/236.

### `burst_count_capacity`

This field is a `map[string]int` designed to inform HobbyFarm how much capacity is available for dynamic provisioning in an environment. For dynamic provisioning to work, administrators need to set a count of the number of provisionable VM templates in this map.

> This field may be removed in a future release of HobbyFarm. It is confusing to set the capacity of an environment in two locations. Further, removal of the concept of "bursting" from HobbyFarm may render this field useless. To track this discussion, please see https://github.com/hobbyfarm/hobbyfarm/issues/236

### `capacity_mode`

Possible values: `count` and `resource`

The capacity mode of an environment determines whether HobbyFarm schedules VMs based on how many VMs are already provisioned, or how much consumption there is of the basic resources (cpu, memory, storage).

Practical usage almost always sets the value of this field to `count`.

> This field may be removed in a future release of HobbyFarm. Real-world usage of HobbyFarm has shown that most users rely solely on the `count` strategy and do not utilize `resource`. To track this discussion, please see https://github.com/hobbyfarm/hobbyfarm/issues/237.

### `count_capacity`

This field is a `map[string]int` designed to inform HobbyFarm about the capacity of the environment for a particular VM template. Each key in this map is the name of the VM template, and the value is the number of total VMs of that type that the environment can support.
Expand Down
18 changes: 9 additions & 9 deletions content/docs/architecture/resources/virtualmachinetemplate.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ spec:
id: example-vmt
name: Example VMTemplate
image: ami-08921390234098
resources:
cpu: 2
memory: 4096
storage: 10
config_map: {"key": "value", "another_key": ... [] ...}
```


Expand All @@ -41,10 +38,13 @@ Display name for the VM template.

Default value for the image to use when provisioning this VM. Acceptable values will depend upon the provisioner in use. Useful either as a default value for a default provisioner, or when multiple environments use the same provisioner. Can be overridden via configuration in the `Environment` resource.

### `resources`
### `config_map`
The ConfigMap provides the ability to customize more values given to the provisioner. Useful if the provisioner can distinguish between Regions or different sizing options.

This field defines counts and quantities of consumption for VMs created from this template. In other words how many CPU, how much memory, and how much storage is expected to be consumed by each VM utilizing this template.
An example for a configmap vor VMs on Hetzner could look the following

This field has three "sub-values", `cpu`, `memory`, and `storage`. CPU is defined as the number of vCPUs; memory as the MiB of memory used; storage as the GiB of storage allocated.

> This field may be removed in a future release of HobbyFarm. Real-world usage of HobbyFarm has shown that most users rely solely on how many VMs are created, not the resources consumed by each VM. To track this discussion, please see https://github.com/hobbyfarm/hobbyfarm/issues/237.
```yaml
server_type: cx21 # Hetzner has available sizings cx11, cx21, cx31 ...
ssh_username: root # Default SSH Username is root
location: nbg1 # Region
```