AWS Infrastructure Provider

THis module provides two major items:

  • A set of providers for various AWS services within the mintpress infrastructure framework

  • A set of resources for performing operations directly on the AWS platform, which are generated from the AWS api documentation

The following types are currently implemented as mintpress infrastructure providers:

  • EC2Host - VM host on the EC2 platform

  • EbsStorage - Block Storage on the EBS platform

  • Route53Dns - DnsEntry provider for the Route53 platform

  • KmsVaultEntry - VaultEntry provider based on the KMS platform and credstash

  • EfsNasShare - NasShare provider based on the Efs platform

More are to be implemented as more AWS services are supported as generic infrastructure options.

require 'mintpress-infrastructure-aws'

# Use the AWS platform
MintPress::InfrastructureAws::UsingAwsPlatform.new(all_platform_services: true,
                                                     image: 'ami-074e2d6769f445be5',
                                                     key_name: 'jj-keypair',
                                                     region: 'us-west-1',
                                                     connect_user: 'centos',
                                                     hosted_zone_name: 'limepoint-training.uk.',
                                                     admin_connect_user: 'centos')

# Use route53 in a different region to the "main" platform
MintPress::InfrastructureAws::UsingRoute53DnsEntry.new('platform.region': 'us-west-2',
                                                      'region': 'us-west-2')

# Add our default network interfaces
MintPress::InfrastructureAws::UsingExtraEC2NetworkInterface.new(name: "default", postfix: "", interface_type: "public", subnet: 'subnet-0e5e4f55')
MintPress::InfrastructureAws::UsingExtraEC2NetworkInterface.new(name: "mgt", postfix: "-mgt", interface_type: "management", subnet: 'subnet-0e5e4f55')
MintPress::InfrastructureAws::UsingExtraEC2NetworkInterface.new(name: "extra", postfix: "-extra", interface_type: "extra", subnet: 'subnet-0e5e4f55')

# Add some block storage to the default system
MintPress::InfrastructureAws::UsingExtraEbsBlockStorage.new(name: "data", size_mb: 20000, mount_point: "/data", device: "sdf")

# Make some hosts!
my_host = MintPress::Infrastructure::VMHost.new(name: "jjtest-small.limepoint-training.uk", 
                                                'specs.cpu_count': 2,
                                                'specs.ram_gb': 0.5)

my_host.create

# This one is a little bigger...
my_host = MintPress::Infrastructure::VMHost.new(name: "jjtest-large.limepoint-training.uk", 
                                                'specs.cpu_count': 4,
                                                'specs.ram_gb': 32)

my_host.create

“‘