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) Ensure(packageRef string, transform command.Transformer, checkBinary string, ...) (command.Command, error)
- func (m *GenericPackageManager) EnsureUninstalled(packageRef string, transform command.Transformer, checkBinary string, ...) (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) Ensure(packageRef string, transform command.Transformer, checkBinary string, ...) (command.Command, error)
- func (m *ZypperPackageManager) EnsureUninstalled(packageRef string, transform command.Transformer, checkBinary string, ...) (command.Command, error)
Constants ¶
View Source
const ( AMD64Arch = Architecture("x86_64") ARM64Arch = Architecture("arm64") )
Variables ¶
View Source
var ( UbuntuDefault = Ubuntu2204E2E Ubuntu2404 = NewDescriptor(Ubuntu, "24-04") Ubuntu2204 = NewDescriptor(Ubuntu, "22-04") Ubuntu2004 = NewDescriptor(Ubuntu, "20-04") Ubuntu2204E2E = NewDescriptor(Ubuntu, "22-04-e2e") Ubuntu2404E2E = NewDescriptor(Ubuntu, "24-04-e2e") UbuntuKindDefault = Ubuntu2404KindE2E Ubuntu2404KindE2E = NewDescriptor(Ubuntu, "24-04-e2e-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
View Source
var ( MacOSDefault = MacOSSonoma MacOSSonoma = NewDescriptor(MacosOS, "sonoma") )
Implements commonly used descriptors for easier usage See platforms.go for the AMIs used for each OS
View Source
var ( WindowsServerDefault = WindowsServer2025E2E WindowsServer2025 = NewDescriptor(WindowsServer, "2025") WindowsServer2022 = NewDescriptor(WindowsServer, "2022") WindowsServer2019 = NewDescriptor(WindowsServer, "2019") WindowsServer2016 = NewDescriptor(WindowsServer, "2016") WindowsServer2025E2E = NewDescriptor(WindowsServer, "2025-e2e") WindowsServer2022E2E = NewDescriptor(WindowsServer, "2022-e2e") WindowsServer2019E2E = NewDescriptor(WindowsServer, "2019-e2e") WindowsServer2016E2E = NewDescriptor(WindowsServer, "2016-e2e") 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
View Source
var APTDisableUnattendedUpgradesScriptContent string
View Source
var LinuxDescriptorsDefault = map[Flavor]Descriptor{ Ubuntu: UbuntuDefault, AmazonLinux: AmazonLinuxDefault, AmazonLinuxECS: AmazonLinuxECSDefault, Debian: DebianDefault, RedHat: RedHatDefault, Suse: SuseDefault, CentOS: CentOSDefault, AlmaLinux: AlmaLinuxDefault, }
View Source
var MacOSDescriptorsDefault = map[Flavor]Descriptor{ MacosOS: MacOSDefault, }
View Source
var SSHAllowSFTPRootScriptContent string
View Source
var WindowsDescriptorsDefault = map[Flavor]Descriptor{ WindowsServer: WindowsServerDefault, WindowsClient: WindowsClientDefault, }
View Source
var WindowsServerVersionsForE2E = []Descriptor{ WindowsServer2016E2E, WindowsServer2019E2E, WindowsServer2022E2E, WindowsServer2025E2E, }
WindowsServerVersionsForE2E is the set of Windows Server versions used for e2e random selection (CI coverage across 2016–2025).
View Source
var WindowsSetupSSHScriptContent string
View Source
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) Ensure ¶
func (m *GenericPackageManager) Ensure(packageRef string, transform command.Transformer, 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)
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 {
// Ensure ensures that a package is installed
// checkBinary is a binary that should be checked before running the install command, if it is not empty it will first run the `command -v checkBinary` command and if it fails it will run the installCmd,
// if it succeeds we consider the package is already installed
Ensure(packageRef string, transform command.Transformer, checkBinary 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) Ensure ¶
func (m *ZypperPackageManager) Ensure(packageRef string, transform command.Transformer, 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)
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
Click to show internal directories.
Click to hide internal directories.