diff --git a/examples/xovnoc/rack.mu b/examples/xovnoc/rack.mu index fd83fe275..a70ac1cba 100644 --- a/examples/xovnoc/rack.mu +++ b/examples/xovnoc/rack.mu @@ -7,87 +7,24 @@ service Rack { // TODO: we probably need a ToString()-like thing for services (e.g., ARN/ID for most AWS ones). resources { - security := new rackSecurity {} - network := new rackNetwork { - existingVpc: existingVpc - private: private - privateApi: privateApi - subnetCIDRs: subnetCIDRs - subnetPrivateCIDRs: subnetPrivateCIDRs - vpccidr: vpccidr - } + security := new rackSecurity { this.properties } + network := new rackNetwork { this.properties } logging := new rackLogging { + this.properties role: security.logSubscriptionFilterRole } - storage := new rackStorage {} - services := new rackServices {} + storage := new rackStorage { this.properties } + services := new rackServices { this.properties} volumes := new rackVolumes { + this.properties vpc: network.vpc - vpccidr: vpccidr subnets: private ? network.privateSubnets : subnets } } - properties { - // Amazon Machine Image: - // http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_container_instance.html - ami: string = "" - // How much cpu should be reserved by the api web process. - apiCpu: string = "128" - // How much memory should be reserved by the api web process - apiMemory: string = "128" - // Autoscale rack instances - autoscale: bool = false - // How much cpu should be reserved by the builder - buildCpu: string = "0" - // Override the default build image - buildImage: string = "" - // How much memory should be reserved by the builder - buildMemory: string = "1024" - // Anonymous identifier - clientId: string = "dev@xovnoc.com" - // Default container disk size in GB - containerDisk: number = 10 + properties: rackSecurity & rackNetwork & rackLogging & rackStorage & rackServices & rackVolumes { // Development mode development: bool = false - // Encrypt secrets with KMS - encryption: bool = true - // Existing VPC ID (if blank a VPC will be created) - existingVpc: string = "" - // Create applications that are only accessible inside the VPC - internal: bool = false - // A single line of shell script to run as CloudInit command early during instance boot. - instanceBootCommand: string = "" - // A single line of shell script to run as CloudInit command late during instance boot. - instanceRunCommand: strign = "" - // The number of instances in the runtime cluster - instanceCount: number<3:> = 3 - // The type of the instances in the runtime cluster - instanceType: string = "t2.small" - // The number of instances to update in a batch - instanceUpdateBatchSize: number<1:> = 1 - // SSH key name for access to cluster instances - key: string = "" - // (REQUIRED) API HTTP password - secret password: string<1, 50> - // Create non publicly routable resources - private: bool: false - // Put Rack API Load Balancer in private network - privateApi: bool: false - // Public Subnet CIDR Blocks - subnetCIDRs: string[] = [ "10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24" ] - // Private Subnet CIDR Blocks - subnetPrivateCIDRs: string = [ "10.0.4.0/24", "10.0.5.0/24", "10.0.6.0/24" ] - // Default swap volume size in GB - swapSize: number = 5 - // (REQUIRED) Xovnoc release version - version: string<1:> - // Default disk size in GB - volumeSize: number = 50 - // VPC CIDR Block - vpccidr: string = "10.0.0.0/16" - // Dedicated Hardware - tenancy: "default" | "dedicated" = "default" } } diff --git a/examples/xovnoc/rack_instances.mu b/examples/xovnoc/rack_instances.mu index e7f7e6fc1..cfc191efa 100644 --- a/examples/xovnoc/rack_instances.mu +++ b/examples/xovnoc/rack_instances.mu @@ -116,5 +116,33 @@ service rackInstances { role: instancesLifecycleRole } } + + properties { + // Amazon Machine Image: + // http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_container_instance.html + ami: string = "" + // Default container disk size in GB + containerDisk: number = 10 + // Existing VPC ID (if blank a VPC will be created) + existingVpc: string = "" + // A single line of shell script to run as CloudInit command early during instance boot. + instanceBootCommand: string = "" + // A single line of shell script to run as CloudInit command late during instance boot. + instanceRunCommand: strign = "" + // The number of instances in the runtime cluster + instanceCount: number<3:> = 3 + // The type of the instances in the runtime cluster + instanceType: string = "t2.small" + // The number of instances to update in a batch + instanceUpdateBatchSize: number<1:> = 1 + // Create non publicly routable resources + private: bool: false + // Default swap volume size in GB + swapSize: number = 5 + // Default disk size in GB + volumeSize: number = 50 + // Dedicated Hardware + tenancy: "default" | "dedicated" = "default" + } } diff --git a/examples/xovnoc/rack_network.mu b/examples/xovnoc/rack_network.mu index a1796afb9..d303bf5b1 100644 --- a/examples/xovnoc/rack_network.mu +++ b/examples/xovnoc/rack_network.mu @@ -180,12 +180,18 @@ service rackNetwork { } properties { - existingVpc: string - private: boolean - privateApi: boolean - subnetCIDRs: string[] - subnetPrivateCIDRs: string[] - vpccidr: string + // Existing VPC ID (if blank a VPC will be created) + existingVpc: string = "" + // Create non publicly routable resources + private: bool: false + // Put Rack API Load Balancer in private network + privateApi: bool: false + // Public Subnet CIDR Blocks + subnetCIDRs: string[] = [ "10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24" ] + // Private Subnet CIDR Blocks + subnetPrivateCIDRs: string = [ "10.0.4.0/24", "10.0.5.0/24", "10.0.6.0/24" ] + // VPC CIDR Block + vpccidr: string = "10.0.0.0/16" } } diff --git a/examples/xovnoc/rack_services.mu b/examples/xovnoc/rack_services.mu index 44083b5ab..ced62b880 100644 --- a/examples/xovnoc/rack_services.mu +++ b/examples/xovnoc/rack_services.mu @@ -201,5 +201,32 @@ service rackServices { taskDefinition: rackMonitorTasks } } + + properties { + // How much cpu should be reserved by the api web process. + apiCpu: string = "128" + // How much memory should be reserved by the api web process + apiMemory: string = "128" + // Autoscale rack instances + autoscale: bool = false + // How much cpu should be reserved by the builder + buildCpu: string = "0" + // Override the default build image + buildImage: string = "" + // How much memory should be reserved by the builder + buildMemory: string = "1024" + // Anonymous identifier + clientId: string = "dev@xovnoc.com" + // Create applications that are only accessible inside the VPC + internal: bool = false + // (REQUIRED) API HTTP password + secret password: string<1, 50> + // Create non publicly routable resources + private: bool: false + // (REQUIRED) Xovnoc release version + version: string<1:> + // VPC CIDR Block + vpccidr: string = "10.0.0.0/16" + } } diff --git a/examples/xovnoc/rack_volumes.mu b/examples/xovnoc/rack_volumes.mu index 0b4170eb8..c0d6cc1c1 100644 --- a/examples/xovnoc/rack_volumes.mu +++ b/examples/xovnoc/rack_volumes.mu @@ -32,8 +32,9 @@ service rackVolumes { properties { vpc: ec2.VPC - vpccidr: string subnets: ec2.Subnet[] + // VPC CIDR Block + vpccidr: string = "10.0.0.0/16" } }