-
Notifications
You must be signed in to change notification settings - Fork 471
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alexander Demichev
committed
Sep 3, 2020
1 parent
494c4df
commit 810fd73
Showing
1 changed file
with
129 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
--- | ||
title: dedicated-instances | ||
authors: | ||
- "@alexander-demichev" | ||
reviewers: | ||
- "@JoelSpeed" | ||
- "@enxebre" | ||
approvers: | ||
- "@JoelSpeed" | ||
- "@enxebre" | ||
creation-date: 2020-09-01 | ||
last-updated: 2020-09-01 | ||
status: provisional | ||
--- | ||
|
||
# Dedicated instances | ||
|
||
## Release Signoff Checklist | ||
|
||
- [ ] Enhancement is `implementable` | ||
- [ ] Design details are appropriately documented from clear requirements | ||
- [ ] Test plan is defined | ||
- [ ] Graduation criteria for dev preview, tech preview, GA | ||
- [ ] User-facing documentation is created in [openshift-docs](https://github.com/openshift/openshift-docs/) | ||
|
||
## Summary | ||
|
||
Make possible for users to create machines which run as dedicated instances. | ||
|
||
## Motivation | ||
|
||
Some organizations need to make sure that their workloads are not hosted on the same physical hardware as others. | ||
|
||
### Goals | ||
|
||
- Provide automation similar to what Machine API supports for spot instances. | ||
|
||
### Non-Goals | ||
|
||
- TODO | ||
|
||
## Proposal | ||
|
||
In order to give users ability to run their workloads on dedicated instances we should do the following things for AWS, GCP and Azure: | ||
|
||
- Add ability to enable dedicated instances using Machine's provider spec. | ||
|
||
- Validate that provider spec doesn't contain spot instances configuration and dedicated instances at the same time when it's not supported by the cloud provider. | ||
|
||
- Make sure that some required changes are supported and implemented on OCP installer side, like proper control plane creation. | ||
|
||
### Implementation Details | ||
|
||
For each of three cloud providers that support dedicated instances the implementation will be different. | ||
|
||
#### AWS | ||
|
||
`Dedicated Instances are Amazon EC2 instances that run in a virtual private cloud (VPC) on hardware that's dedicated to a single customer.`. [AWS Documentation](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html). Each launched instance has a tenancy attribute and it can be configured similar to how we set availability zone. | ||
|
||
``` | ||
placement = &ec2.Placement{ | ||
AvailabilityZone: aws.String(machineProviderConfig.Placement.AvailabilityZone), | ||
Tenancy: aws.String(machineProviderConfig.Placement.Tenancy) | ||
} | ||
``` | ||
|
||
That change will require adding `Tenancy` field to provider spec. | ||
|
||
#### Azure | ||
|
||
In order to make dedicated VMs work on Azure we need to understand the concept of host groups and hosts. | ||
[Azure documentation](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/dedicated-hosts). | ||
|
||
``` | ||
A host group is a resource that represents a collection of dedicated hosts. You create a host group in a region and an availability zone, and add hosts to it. | ||
A host is a resource, mapped to a physical server in an Azure data center. The physical server is allocated when the host is created. A host is created within a host group. A host has a SKU describing which VM sizes can be created. Each host can host multiple VMs, of different sizes, as long as they are from the same size series. | ||
When creating a VM in Azure, you can select which dedicated host to use for your VM. You have full control as to which VMs are placed on your hosts. | ||
``` | ||
|
||
Above means that we are required to have a host group and host created, this should probably be handled on installer side. | ||
|
||
The problem here are standard quotas: for host of type `DSv3-Type1` we can create only 32 VM of type `Standard_D2s_v3`(default type for worker VMs). To request a quota increase, the users are required to create a support request. This part should be well documented | ||
|
||
The required API change is adding host name field `Host` to provider spec. | ||
|
||
#### GCP | ||
|
||
GCP provides `Node Templates`, `Node Groups` for managing dedicated instances. Similar to Azure, these should be created using OCP installer. [GCP documentation](https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes). | ||
|
||
In order to be able to create a VM on a dedicated we should introduce `NodeGroup` API field to provider spec. | ||
|
||
We should document that node groups have certain capacity and amount of VMs is limited, unless the node group autoscaler is enabled. | ||
|
||
### Risks and Mitigations | ||
|
||
#### Autoscaling | ||
|
||
Autoscaling dedicated instances can be a problem because dedicated hosts have quotas and limits on provider side. We should provide good documentation here. | ||
|
||
## Design Details | ||
|
||
### Open Questions | ||
|
||
### Test Plan | ||
|
||
### Graduation Criteria | ||
|
||
#### Examples | ||
|
||
##### Dev Preview -> Tech Preview | ||
|
||
##### Tech Preview -> GA | ||
|
||
##### Removing a deprecated feature | ||
|
||
### Upgrade / Downgrade Strategy | ||
|
||
### Version Skew Strategy | ||
|
||
## Implementation History | ||
|
||
## Drawbacks | ||
|
||
## Alternatives | ||
|
||
## Infrastructure Needed | ||
|