httpd

package module
v0.0.154 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

README

Apache HTTP Server Cloud Native Buildpack

The HTTPD CNB provides the Apache HTTP Server binary distribution. The buildpack installs the HTTPD binary distribution onto the $PATH which makes it available for subsequent buildpacks, and sets up the start command which signals httpd to start.

Integration

The Apache HTTPD CNB provides httpd as a dependency. Downstream buildpacks, like php-web can require the httpd dependency by generating a Build Plan TOML file that looks like the following:

[[requires]]

  # The name of the Apache HTTPD dependency is "httpd". This value is considered
  # part of the public API for the buildpack and will not change without a plan
  # for deprecation.
  name = "httpd"

  # The version of the Apache HTTPD dependency is not required. In the case it
  # is not specified, the buildpack will provide the newest version, which can
  # be seen in the buildpack.toml file.
  # If you wish to request a specific version, the buildpack supports
  # specifying a semver constraint in the form of "2.*", "2.4.*", or even
  # "2.4.43".
  version = "2.4.43"

  # The Apache HTTPD buildpack supports some non-required metadata options.
  [requires.metadata]

    # Setting the launch flag to true will ensure that the Apache HTTPD
    # dependency is available on the $PATH for the running application. If you
    # are writing an application that needs to run Apache HTTPD at runtime, this
    # flag should be set to true.
    launch = true

Usage

To package this buildpack for consumption:

$ ./scripts/package.sh

This builds the buildpack's Go source using GOOS=linux by default. You can supply another value as the first argument to package.sh.

buildpack.yml Configurations

httpd:
  # this allows you to specify a version constaint for the httpd dependency
  # any valid semver constaints (e.g. 2.* and 2.4.*) are also acceptable
  version: "2.4.43"

Documentation

Index

Constants

View Source
const PlanDependencyHTTPD = "httpd"

Variables

This section is empty.

Functions

func Build

func Build(dependencies DependencyService, clock chronos.Clock, logger LogEmitter) packit.BuildFunc

func Detect

func Detect() packit.DetectFunc

Types

type BuildPlanMetadata

type BuildPlanMetadata struct {
	VersionSource string `toml:"version-source,omitempty"`
	Launch        bool   `toml:"launch"`
}

type Buildpack

type Buildpack struct {
	HTTPD BuildpackHTTPD `yaml:"httpd"`
}

func ParseBuildpack

func ParseBuildpack(path string) (Buildpack, error)

type BuildpackHTTPD

type BuildpackHTTPD struct {
	Version string `yaml:"version"`
}

type DependencyService

type DependencyService interface {
	Resolve(path, name, version, stack string) (postal.Dependency, error)
	Install(dependency postal.Dependency, cnbPath, layerPath string) error
}

type LogEmitter

type LogEmitter struct {
	scribe.Logger
}

func NewLogEmitter

func NewLogEmitter(output io.Writer) LogEmitter

func (LogEmitter) Candidates

func (e LogEmitter) Candidates(entries []packit.BuildpackPlanEntry)

func (LogEmitter) Environment

func (e LogEmitter) Environment(environment packit.Environment)

func (LogEmitter) SelectedDependency

func (e LogEmitter) SelectedDependency(entry packit.BuildpackPlanEntry, version string)

func (LogEmitter) Title

func (e LogEmitter) Title(info packit.BuildpackInfo)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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