Documentation ¶
Index ¶
Constants ¶
const ServiceID = "deployment"
ServiceID represents a deployment service id.
Variables ¶
This section is empty.
Functions ¶
func MatchVersion ¶
MatchVersion checks expected and actual version returns true if matches.
Types ¶
type Addition ¶
type Addition struct { SuperUser bool Commands []string `description:"os command"` Transfers []*storage.Transfer `description:"asset transfer"` }
Addition represents deployment additions.
func (*Addition) AsRunRequest ¶
func (a *Addition) AsRunRequest(target *url.Resource) *exec.RunRequest
AsRunRequest creates a exec run request.
type Dependency ¶
Dependency represents deployment dependency
type Deployment ¶
type Deployment struct { Pre *Addition `description:"initialization deployment instruction"` Transfer *storage.Transfer `required:"true" description:"software deployment instruction"` //actual copy instruction Run *exec.ExtractRequest `description:"post deployment commands, i.e. tar xvzf"` //post deployment command like tar xvzf VersionCheck *exec.ExtractRequest `description:"version extraction command"` //command to check version Post *Addition `description:"post deployment instruction"` }
Deployment represents deployment instruction
func (*Deployment) Validate ¶
func (d *Deployment) Validate() error
Validate checks if request if valid
type LoadMetaRequest ¶
type LoadMetaRequest struct {
Source *url.Resource `required:"true" description:"deployment meta location"`
}
LoadMetaRequest represents Meta register request.
type LoadMetaResponse ¶
type LoadMetaResponse struct {
Meta *Meta
}
LoadMetaResponse represents deployment response
type Meta ¶
type Meta struct { Name string //app name Versioning string `required:"true" description:"versioning template for dynamic discovery i.e. Major.Minor.Release"` //versioning system, i.e. Major.Minor.Release Targets []*TargetMeta `required:"true" description:"deployment instruction for various version and operating systems"` }
Meta represents description of deployment instructions for various operating system
func (*Meta) Match ¶
func (m *Meta) Match(operatingSystem *model.OperatingSystem, requestedVersion string) *TargetMeta
Match provides build instruction for matching os and version
type Request ¶
type Request struct { Target *url.Resource `required:"true" description:"target host"` //target host MetaURL string `description:"optional URL for meta deployment file, if left empty the meta URL is construct as meta/deployment/**AppName**"` //deployment URL for meta deployment instruction AppName string `required:"true" description:"application name, as defined in meta deployment file"` //app name Version string `description:"min required version, it can be 1, or 1.2 or specific version 1.2.1"` //requested version Force bool `description:"force deployment even if app has been already installed"` //flag force deployment, by default if requested version matches the one from command version check. deployment is skipped. }
ServiceRequest represent a deploy request
type TargetMeta ¶
type TargetMeta struct { Version string //version of the software MinReleaseVersion map[string]string `required:"true" description:"min release version, key is major.minor, value is release or update version"` //min release version, key is major.minor, value is release or update version OsTarget *model.OsTarget `description:"operating system match"` //if specified matches current os Deployment *Deployment `required:"true" description:"actual deployment instructions"` //actual deployment instruction Dependencies []*Dependency `description:"app dependencies like sdk"` //app dependencies like sdk }
TargetMeta represents specific instruction for given os deployment.