This change includes a few steps towards AWS backend code-generation: * Add a BoundDependencies property to ast.Stack to remember the *ast.Stack objects bound during Stack binding. * Make a few CloudFormation properties optional (cfOutput Export/Condition). * Rename clouds.ArchMap, clouds.ArchNames, schedulers.ArchMap, and schedulers.ArchNames to clouds.Values, clouds.Names, schedulers.Values, and schedulers.Names, respectively. This reads much nicer to my eyes. * Create a new anonymous ast.Target for deployments if no specific target was specified; this is to support quick-and-easy "one off" deployments, as will be common when doing local development. * Sketch out more of the AWS Cloud implementation. We actually map the Mu Services into CloudFormation Resources; well, kinda sorta, since we don't actually have Service-specific logic in here yet, however all of the structure and scaffolding is now here.
48 lines
1.3 KiB
Go
48 lines
1.3 KiB
Go
// Copyright 2016 Marapongo, Inc. All rights reserved.
|
|
|
|
package schedulers
|
|
|
|
// Arch selects a cloud scheduler to target when compiling.
|
|
type Arch int
|
|
|
|
const (
|
|
NoArch Arch = iota // no scheduler, just use native VMs.
|
|
SwarmArch // Docker Swarm
|
|
KubernetesArch // Kubernetes
|
|
MesosArch // Apache Mesos
|
|
ECSArch // Amazon Elastic Container Service (only valid for AWS)
|
|
GKEArch // Google Container Engine (only valid for GCP)
|
|
ACSArch // Microsoft Azure Container Service (only valid for Azure)
|
|
)
|
|
|
|
const (
|
|
noArch = ""
|
|
swarmArch = "swarm"
|
|
kubernetesArch = "kubernetes"
|
|
mesosArch = "mesos"
|
|
ecsArch = "ecs"
|
|
gkeArch = "gke"
|
|
acsArch = "acs"
|
|
)
|
|
|
|
// Names maps Archs to human-friendly names.
|
|
var Names = map[Arch]string{
|
|
NoArch: noArch,
|
|
SwarmArch: swarmArch,
|
|
KubernetesArch: kubernetesArch,
|
|
MesosArch: mesosArch,
|
|
ECSArch: ecsArch,
|
|
GKEArch: gkeArch,
|
|
ACSArch: acsArch,
|
|
}
|
|
|
|
// Values maps human-friendly names to the Archs for those names.
|
|
var Values = map[string]Arch{
|
|
noArch: NoArch,
|
|
swarmArch: SwarmArch,
|
|
kubernetesArch: KubernetesArch,
|
|
mesosArch: MesosArch,
|
|
ecsArch: ECSArch,
|
|
gkeArch: GKEArch,
|
|
acsArch: ACSArch,
|
|
}
|