Replies: 6 comments 13 replies
-
The code is available at https://github.com/ebauman/gargantua/blob/new-provisioning/v4/pkg/apis/hobbyfarm.io/v4alpha1/types.go |
Beta Was this translation helpful? Give feedback.
-
When a |
Beta Was this translation helpful? Give feedback.
-
Can you be more precise abou why |
Beta Was this translation helpful? Give feedback.
-
What is the usecase für |
Beta Was this translation helpful? Give feedback.
-
Maybe rename |
Beta Was this translation helpful? Give feedback.
-
Do we want to add a field for shared Virtual machines to |
Beta Was this translation helpful? Give feedback.
-
I propose a major overhaul of how provisioning works in HobbyFarm today. Due to the breadth of changes required, this work will end up touching tangential resources such as ScheduledEvents, and AccessCodes.
I have created a
v4alpha1
package with what I propose as the new types for this rebuild. Below is the godoc generated from this package. In this doc I have placed many comments about how I think the new types should work, interact, and overall thoughts on this direction. Please review and let me know your thoughts.Eamon
Updated 2/28/24 to include changes from discussion below.
Expand this to see the godoc
v4alpha1
Index
Constants
Variables
type AccessCode
AccessCode stores a string which grants access to any number of Scenarios, Courses, ScheduledEvents, or MachineSets. It can be considered a sort of password, a pre-shared key.
type AccessCodeList
type AccessCodeSpec
type AccessCodeState
type AccessCodeStatus
type AvailabilityConfiguration
type BindStrategy
type ConnectProtocol
ConnectProtocol is an array of protocols that MAY be supported by the machine. The presence of a protocol in this list, plus an endpoint for that protocol defined in EnvironmentSpec will drive connection options for users.
type Environment
Environment is the representation of a specific instance of a provider. Here, "specific instance" means an account or location or instance into which machines can be provisioned by the defined Provider for this Environment. An example of an Environment for an AWS provider would be a particular AWS account, or particular region within an AWS account. Environments encapsulate not only the configuration of the provider but also how users should connect to their machines. It is not a requirement that separate Environments have separate endpoints for connection, or that they use separate cloud provider credentials. Instead, Environments should be used anywhere that top-level configuration items for machine provisioning may change. Or, separate Environments can be used to provide lower-level or more restricted capacity to public or untrusted users.
type EnvironmentList
type EnvironmentSpec
type EnvironmentStatus
type ExpirationStrategy
type Machine
Machine is the record of an instance of a MachineTemplate as provisioned via a Provider into an Environment. For example, a Machine should have a 1:1 correlation with e.g. an EC2 instance or a DigitalOcean droplet. The Machine object carries the configuration from HF and the status from the Provider of the machine.
type MachineClaim
MachineClaim is an object representing a User's desire to claim a Machine for their exclusive use. A MachineClaim does not necessarily represent the fulfillment of this desire. For example, a MachineClaim is created any time a user wants to use a Machine. However, if no Machine is available that matches the claim criteria, then the claim may fail.
type MachineClaimList
type MachineClaimPhase
type MachineClaimSpec
type MachineClaimStatus
type MachineList
type MachinePersistenceStrategy
type MachineRequirement
MachineRequirement defines for a given MachineType and MachineTemplate, how many of that kind of machine are required. For MachineTypeShared, this is a per- ScheduledEvent requirement. For MachineTypeUser this is a per-User requirement.
Provisioning scenarios:
type MachineSet
MachineSet defines a collection of machines that are scheduled together. All machines in a MachineSet are of identical configuration, MachineTemplate, etc. The settings on the MachineSetSpec struct define how a provider should provision these machines.
type MachineSetAvailability
type MachineSetList
type MachineSetSpec
type MachineSetStatus
type MachineSpec
type MachineStatus
type MachineTemplate
MachineTemplate is an object that represents a specific instance of machine that can be provisioned into one or more Environments by one or more Providers. A MachineTemplate is meant to bridge the gap between environments by providing a stable representation of a machine that environments can utilize. For example, a MachineTemplate may be created with the name "ClusterNode-Ubuntu-2004". It is then up to each Environment to define options necessary for that environment to allow the creation of a `ClusterNode-Ubuntu-2004` machine. A common use case here is to define in the MachineTemplate any configuration that can span providers or environments. Items such as cloud config or ssh username which are not specific to a provider implementation. Then, further configuration can be done on the Environment. Those further configurations could be items such as the machine image or AMI, or perhaps the security group, which are both examples of environment-specific options.
type MachineTemplateList
type MachineTemplateSpec
type MachineType
MachineType defines what type of machine is defined in this template. For example, a machine may be MachineTypeUser which is a machine that can be assigned to a user. A MachineTypeShared may be accessible by multiple users.
type PrintingOption
type Provider
Provider is an object that represents the capability to provision machines. Providers are usually implemented as 3rd party operators that interact with HobbyFarm through the boundaries of objects such as Machines, MachineSets, and Environments.
type ProviderList
type ProviderSpec
type ProvisioningStrategy
type ScheduledEvent
ScheduledEvent is the representation of a period of time during which content is available to users. A ScheduledEvent not only defines what content is available but also how users shall have access to Machine resources during that period of time.
type ScheduledEventList
type ScheduledEventSpec
type ScheduledEventStatus
type Session
type SessionList
type SessionSpec
type SessionStatus
Generated by gomarkdoc
Beta Was this translation helpful? Give feedback.
All reactions