Closed johnbradley closed 5 years ago
Changes based on meeting with @dleehr
VMCommand
renamed to JobRuntimeOpenstack
K8sCommandSet
renamed to JobRuntimeK8s
K8sStepCommand
renamed to JobRuntimeStepK8s
JobRuntimeStepK8s
will use JobFlavor
to specify cpu/memoryCloudSettings
renamed to CloudSettingsOpenStack
High Level Changes
Model changes
VMFlavor
toJobFlavor
and addsmemory
field to represent cpu/memory for either VM or Containercluster_type
field toLandoConnection
to denote what version of lando(k8s or VM) is servicing that connectionVMSettings
toVMCommand
and removes name field.K8sStepCommand
which contains image name, command, cpu, memory to be used in a k8s stepK8sCommandSet
which contains the set ofK8sStepCommand
to be used for a job.JobSettings
model that takes the place of VMSettings. This has a name field, a LandoConnection and either aVMCommand
or aK8sCommandSet
. This also does validation based on the LandoConnection cluster type(vm/k8s).VMStrategy
toJobStrategy
vm_*
model fields their newjob_*
counterparts.See data/models.py
Remaining "vm" model changes
JobStrategy
still has avolume_mounts
field that is not used by k8s jobs. We could move to this to VMCommand.CloudSettings
is really VM specific. Perhaps we should rename this to VMCloudSettings or OpenStackCloudSettings.Job
still has some fields that are vm specific:vm_instance_name
,vm_volume_name
, andvm_volume_mounts
.vm_instance_name
,vm_volume_name
are written to when a job is started and may change if a job is restarted.vm_volume_mounts
is just a copy of the values from JobQuestionnaire/JobStrategy.API Changes
Adds changes to maintain the existing
v1
API. This is currently used by lando and bespin-ui. Updatesv2
API to have all functionality ofv1
API and new field name changes. (Mostly "job" instead of vm"). Lando will start using thev2
api.Thoughts
I think this PR is way too big. Changing field/model names ripples through the API so the changes are far reaching.