supportmatrix

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OL_RHEL = SupportedHost{
		ID:                 olRHELID,
		Description:        "rhel machine supporting initialize / build openshift local",
		Type:               RHEL,
		InstaceTypes:       []string{"c5.metal", "c5d.metal", "c5n.metal"},
		ProductDescription: "Red Hat Enterprise Linux",
		Spot:               true,
		AMI: AMI{

			RegexPattern: "RHEL-%s*-x86_64-*",
			DefaultUser:  "ec2-user",
		},
	}

	OL_Windows = SupportedHost{
		ID:                 olWindowsID,
		Description:        "windows machine supporting nested virtualization (start openshift local)",
		Type:               Windows,
		InstaceTypes:       []string{"c5.metal", "c5d.metal", "c5n.metal"},
		ProductDescription: "Windows",
		Spot:               true,
	}

	G_MAC_M1 = SupportedHost{
		ID:           gMacOSM1ID,
		Description:  "mac machine with m1 chip arm64 arch",
		Type:         MacM1,
		InstaceTypes: []string{"mac2.metal"},
		Spot:         false,
		AMI: AMI{
			RegexName:   "amzn-ec2-macos-12*",
			DefaultUser: "ec2-user",
			Owner:       "628277914472",
			Filters: map[string]string{
				"architecture": "arm64_mac"},
		},
	}

	S_BASTION = SupportedHost{
		ID:           sBastionID,
		Description:  "bastion host to access hosts on private subnets",
		InstaceTypes: []string{"t2.small"},
		Spot:         false,
		AMI: AMI{
			RegexName:   "amzn-ami-hvm-*-x86_64-ebs",
			DefaultUser: "ec2-user",
		},
	}

	// https://github.com/ptcodes/proxy-server-with-terraform/blob/master/main.tf
	S_PROXY = SupportedHost{
		ID:           sProxyID,
		Description:  "proxy host to control network http access from hosts",
		InstaceTypes: []string{"t2.small"},
		Spot:         false,
		AMI: AMI{
			RegexName:   "amzn-ami-hvm-*-x86_64-ebs",
			DefaultUser: "ec2-user",
		},
	}
)

Functions

This section is empty.

Types

type AMI

type AMI struct {
	RegexName string
	// In case wanna compose the regex pattern
	RegexPattern string
	Filters      map[string]string
	DefaultUser  string
	Owner        string
}

type SupportedHost

type SupportedHost struct {
	ID          string
	Description string
	// Filter for machine
	ProductDescription string
	InstaceTypes       []string
	// true if spot instances are supported
	Spot bool
	// AMI Pattern
	AMI AMI
	// RHEL, Windows, MacM1
	Type SupportedType
}

func GetHost

func GetHost(id string) (*SupportedHost, error)

type SupportedType

type SupportedType int
const (
	RHEL SupportedType = iota
	Windows
	MacM1
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL