environment: encapsulate the environment images are deployed to

This represents how our systems should integrate into their environment, typically using
some sort of agent, or commonly cloud-init.

In the future we could imagine this representing network configuration or any other kind
of configuration necessary to reach the environment as well.

For now EC2 and Azure is supported, and stub environments are
added to show the idea, but these are not implemented/used
yet.
This commit is contained in:
Tom Gundersen 2022-07-06 12:28:52 +01:00
parent 7a534d4d1e
commit 452cb2dae9
10 changed files with 89 additions and 15 deletions

View file

@ -0,0 +1,25 @@
package environment
import "github.com/osbuild/osbuild-composer/internal/rpmmd"
type Environment interface {
GetPackages() []string
GetRepos() []rpmmd.RepoConfig
GetServices() []string
}
type BaseEnvironment struct {
Repos []rpmmd.RepoConfig
}
func (p BaseEnvironment) GetPackages() []string {
return []string{}
}
func (p BaseEnvironment) GetRepos() []rpmmd.RepoConfig {
return p.Repos
}
func (p BaseEnvironment) GetServices() []string {
return []string{}
}