Documentation
¶
Index ¶
- Constants
- Variables
- type Architecture
- type Descriptor
- type Family
- type Flavor
- type GenericPackageManager
- func (m *GenericPackageManager) AssertInstalled(checkBinary string, opts ...PackageManagerOption) (command.Command, error)
- func (m *GenericPackageManager) EnsureUninstalled(packageRef string, transform command.Transformer, checkBinary string, ...) (command.Command, error)
- func (m *GenericPackageManager) InstallLocalPackage(packagePath string, opts ...PackageManagerOption) (command.Command, error)
- func (m *GenericPackageManager) RuntimeInstallDocker(opts ...PackageManagerOption) (command.Command, error)
- type OS
- type PackageManager
- type PackageManagerOption
- type PackageManagerParams
- type ServiceManager
- type ZypperPackageManager
- func (m *ZypperPackageManager) AssertInstalled(checkBinary string, opts ...PackageManagerOption) (command.Command, error)
- func (m *ZypperPackageManager) EnsureUninstalled(packageRef string, transform command.Transformer, checkBinary string, ...) (command.Command, error)
- func (m *ZypperPackageManager) InstallLocalPackage(packagePath string, opts ...PackageManagerOption) (command.Command, error)
- func (m *ZypperPackageManager) RuntimeInstallDocker(opts ...PackageManagerOption) (command.Command, error)
Constants ¶
const ( AMD64Arch = Architecture("x86_64") ARM64Arch = Architecture("arm64") )
const ComposeVersion = "v2.27.0"
ComposeVersion is the docker-compose version pre-baked in AWS e2e AMIs and runtime-installed elsewhere.
Variables ¶
var ( UbuntuDefault = Ubuntu2204 Ubuntu2404 = NewDescriptor(Ubuntu, "24-04") Ubuntu2204 = NewDescriptor(Ubuntu, "22-04") Ubuntu2004 = NewDescriptor(Ubuntu, "20-04") UbuntuKindDefault = Ubuntu2404Kind Ubuntu2404Kind = NewDescriptor(Ubuntu, "24-04-kind") DebianDefault = Debian12 Debian11 = NewDescriptor(Debian, "11") Debian12 = NewDescriptor(Debian, "12") AmazonLinuxDefault = AmazonLinux2023 AmazonLinux2023 = NewDescriptor(AmazonLinux, "2023") AmazonLinux2 = NewDescriptor(AmazonLinux, "2") AmazonLinuxECSDefault = AmazonLinuxECS2 AmazonLinuxECS2023 = NewDescriptor(AmazonLinuxECS, "2023") AmazonLinuxECS2 = NewDescriptor(AmazonLinuxECS, "2") RedHatDefault = RedHat9 RedHat8 = NewDescriptor(RedHat, "8") RedHat9 = NewDescriptor(RedHat, "9") RedHat9SELinuxNPM = NewDescriptor(RedHat, "9-selinux-npm") RedHat10 = NewDescriptor(RedHat, "10") SuseDefault = Suse15 Suse15 = NewDescriptor(Suse, "15-4") CentOSDefault = CentOS7 CentOS7 = NewDescriptor(CentOS, "79") AlmaLinuxDefault = AlmaLinux9 // AlmaLinux 9. Pinned to a single Datadog-built AMI (published from // ami-builder's alma-linux 9-e2e image) in platforms.json, rather than // resolved by live search against AlmaLinux's own publisher account. AlmaLinux9 = NewDescriptor(AlmaLinux, "9") )
Implements commonly used descriptors for easier usage See platforms.go for the AMIs used for each OS
var ( MacOSDefault = MacOSSonoma MacOSSonoma = NewDescriptor(MacosOS, "sonoma") )
Implements commonly used descriptors for easier usage See platforms.go for the AMIs used for each OS
var ( WindowsServerDefault = WindowsServer2025 WindowsServer2025 = NewDescriptor(WindowsServer, "2025") WindowsServer2022 = NewDescriptor(WindowsServer, "2022") WindowsServer2019 = NewDescriptor(WindowsServer, "2019") WindowsServer2016 = NewDescriptor(WindowsServer, "2016") WindowsClientDefault = WindowsClient1124H2 WindowsClient11 = WindowsClient1124H2 WindowsClient1124H2 = NewDescriptor(WindowsClient, "windows-11:win11-24h2-pro") WindowsClient1122H2 = NewDescriptor(WindowsClient, "windows-11:win11-22h2-pro") WindowsClient10 = WindowsClient1022H2 WindowsClient1022H2 = NewDescriptor(WindowsClient, "windows-10:win10-22h2-pro") WindowsClient1021H2 = NewDescriptor(WindowsClient, "windows-10:win10-21h2-pro") WindowsClient1019H1 = NewDescriptor(WindowsClient, "Windows-10:19h1-pro-gensecond") )
Implements commonly used descriptors for easier usage See platforms.go for the AMIs used for each OS
var APTDisableUnattendedUpgradesScriptContent string
var LinuxDescriptorsDefault = map[Flavor]Descriptor{ Ubuntu: UbuntuDefault, AmazonLinux: AmazonLinuxDefault, AmazonLinuxECS: AmazonLinuxECSDefault, Debian: DebianDefault, RedHat: RedHatDefault, Suse: SuseDefault, CentOS: CentOSDefault, AlmaLinux: AlmaLinuxDefault, }
var MacOSDescriptorsDefault = map[Flavor]Descriptor{ MacosOS: MacOSDefault, }
var SSHAllowSFTPRootScriptContent string
var TrackSSHActivityScriptContent string
var WindowsDescriptorsDefault = map[Flavor]Descriptor{ WindowsServer: WindowsServerDefault, WindowsClient: WindowsClientDefault, }
var WindowsRegisterTrackSSHActivityScriptContent string
var WindowsServerVersionsForE2E = []Descriptor{ WindowsServer2016, WindowsServer2019, WindowsServer2022, WindowsServer2025, }
WindowsServerVersionsForE2E is the set of Windows Server versions used for e2e random selection (CI coverage across 2016–2025).
var WindowsSetupSSHScriptContent string
var WindowsTrackSSHActivityScriptContent string
var ZypperDisableUnattendedUpgradesScriptContent string
Functions ¶
This section is empty.
Types ¶
type Architecture ¶
type Architecture string
func ArchitectureFromString ¶
func ArchitectureFromString(archStr string) Architecture
type Descriptor ¶
type Descriptor struct {
Flavor Flavor
Version string
Architecture Architecture
// contains filtered or unexported fields
}
Descriptor provides definition of an OS
func DescriptorFromString ¶
func DescriptorFromString(descStr string, defaultDescriptor Descriptor) Descriptor
String format is <flavor>:<version>(:<arch>)
func NewDescriptor ¶
func NewDescriptor(f Flavor, version string) Descriptor
func NewDescriptorWithArch ¶
func NewDescriptorWithArch(f Flavor, version string, arch Architecture) Descriptor
func (Descriptor) Family ¶
func (d Descriptor) Family() Family
func (Descriptor) String ¶
func (d Descriptor) String() string
func (Descriptor) WithArch ¶
func (d Descriptor) WithArch(a Architecture) Descriptor
type Flavor ¶
type Flavor int
const ( Unknown Flavor = iota // Linux Ubuntu Flavor = (100 + iota) AmazonLinux AmazonLinuxECS Debian RedHat Suse Fedora CentOS RockyLinux // Windows WindowsServer Flavor = (500 + iota) WindowsClient // MacOS MacosOS Flavor = (1000 + iota) // AlmaLinux is in the Red Hat family. It is given an explicit value, outside the // iota run above, so that adding it does not shift the iota-derived Windows and // MacOS values, which are persisted as integers in Pulumi state. AlmaLinux Flavor = 110 )
func FlavorFromString ¶
type GenericPackageManager ¶
type GenericPackageManager struct {
// contains filtered or unexported fields
}
func (*GenericPackageManager) AssertInstalled ¶ added in v0.85.0
func (m *GenericPackageManager) AssertInstalled(checkBinary string, opts ...PackageManagerOption) (command.Command, error)
func (*GenericPackageManager) EnsureUninstalled ¶
func (m *GenericPackageManager) EnsureUninstalled(packageRef string, transform command.Transformer, checkBinary string, opts ...PackageManagerOption) (command.Command, error)
func (*GenericPackageManager) InstallLocalPackage ¶ added in v0.86.0
func (m *GenericPackageManager) InstallLocalPackage(packagePath string, opts ...PackageManagerOption) (command.Command, error)
func (*GenericPackageManager) RuntimeInstallDocker ¶ added in v0.86.0
func (m *GenericPackageManager) RuntimeInstallDocker(opts ...PackageManagerOption) (command.Command, error)
type OS ¶
type OS interface {
Descriptor() Descriptor
Runner() command.Runner
FileManager() *command.FileManager
PackageManager() PackageManager
ServiceManger() ServiceManager
}
OS is the high-level interface for an OS INSIDE Pulumi code
type PackageManager ¶
type PackageManager interface {
// RuntimeInstallDocker installs Docker and docker-compose at provisioning time, for clouds without pre-baked images (GCP, Azure, local VMs).
// It fails on AWS, where Docker comes from the pre-baked -e2e AMIs.
RuntimeInstallDocker(opts ...PackageManagerOption) (command.Command, error)
// InstallLocalPackage installs a package file already present on the host, allowing unsigned packages.
InstallLocalPackage(packagePath string, opts ...PackageManagerOption) (command.Command, error)
EnsureUninstalled(packageRef string, transform command.Transformer, checkBinary string, opts ...PackageManagerOption) (command.Command, error)
AssertInstalled(checkBinary string, opts ...PackageManagerOption) (command.Command, error)
}
Interfaces used by OS components
type PackageManagerOption ¶
type PackageManagerOption = func(*PackageManagerParams) error
func AllowUnsignedPackages ¶
func AllowUnsignedPackages(allow bool) PackageManagerOption
func WithPulumiResourceOptions ¶
func WithPulumiResourceOptions(opts ...pulumi.ResourceOption) PackageManagerOption
type PackageManagerParams ¶
type PackageManagerParams struct {
AllowUnsignedPackages bool
PulumiResourceOptions []pulumi.ResourceOption
}
type ServiceManager ¶
type ServiceManager interface {
// EnsureStarted starts or restarts (may be stop+start depending on implementation) the service if already running
EnsureRestarted(serviceName string, transform command.Transformer, opts ...pulumi.ResourceOption) (command.Command, error)
}
type ZypperPackageManager ¶
type ZypperPackageManager struct {
// contains filtered or unexported fields
}
func (*ZypperPackageManager) AssertInstalled ¶ added in v0.85.0
func (m *ZypperPackageManager) AssertInstalled(checkBinary string, opts ...PackageManagerOption) (command.Command, error)
func (*ZypperPackageManager) EnsureUninstalled ¶
func (m *ZypperPackageManager) EnsureUninstalled(packageRef string, transform command.Transformer, checkBinary string, opts ...PackageManagerOption) (command.Command, error)
func (*ZypperPackageManager) InstallLocalPackage ¶ added in v0.86.0
func (m *ZypperPackageManager) InstallLocalPackage(packagePath string, opts ...PackageManagerOption) (command.Command, error)
func (*ZypperPackageManager) RuntimeInstallDocker ¶ added in v0.86.0
func (m *ZypperPackageManager) RuntimeInstallDocker(opts ...PackageManagerOption) (command.Command, error)
Source Files
¶
- const.go
- descriptor.go
- generic_packagemanager.go
- linux.go
- linux_descriptors.go
- linux_disable_upgrades.go
- linux_packagemanagers.go
- linux_servicemanagers.go
- linux_zypper_packagemanager.go
- macos.go
- macos_descriptors.go
- macos_packagemanagers.go
- macos_servicemanagers.go
- os.go
- windows.go
- windows_descriptors.go
- windows_packagemanagers.go
- windows_servicemanagers.go
- windows_setup_ssh.go