httpd

package module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 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.

A usage example can be found in the samples repository under the httpd directory.

The HTTPD buildpack is compatible with the following builder(s):

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 -v <version>

Configurations

Specifying the HTTP Server version through buildpack.yml configuration will be deprecated in Apache HTTP Server Buildpack v1.0.0.

To migrate from using buildpack.yml please set the following environment variables at build time either directly (ex. pack build my-app --env BP_ENVIRONMENT_VARIABLE=some-value) or through a project.toml file

BP_HTTPD_VERSION

The BP_HTTPD_VERSION variable allows you to specify the version of Apache HTTP Server that is installed.

BP_HTTPD_VERSION=2.4.43

This will replace the following structure in buildpack.yml:

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

Stack support

The HTTPD buildpack requires that you use the Paketo Full builder to build applications. The buildpack does not run on the Base builder because it requires libexpat1 that's not present on the Base stack.

Documentation

Index

Constants

View Source
const PlanDependencyHTTPD = "httpd"

Variables

This section is empty.

Functions

func Build

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

func Detect

func Detect(parser Parser) packit.DetectFunc

Types

type BuildPlanMetadata

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

type DependencyService

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

type EntryResolver added in v0.0.169

type EntryResolver interface {
	Resolve(string, []packit.BuildpackPlanEntry, []interface{}) (packit.BuildpackPlanEntry, []packit.BuildpackPlanEntry)
	MergeLayerTypes(string, []packit.BuildpackPlanEntry) (launch, build bool)
}

type LogEmitter

type LogEmitter struct {
	scribe.Emitter
}

func NewLogEmitter

func NewLogEmitter(output io.Writer) LogEmitter

func (LogEmitter) Environment

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

func (LogEmitter) Title

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

type Parser added in v0.0.167

type Parser interface {
	ParseVersion(path string) (version, versionSource string, err error)
}

type VersionParser added in v0.0.167

type VersionParser struct{}

func NewVersionParser added in v0.0.167

func NewVersionParser() VersionParser

func (VersionParser) ParseVersion added in v0.0.167

func (v VersionParser) ParseVersion(path string) (string, string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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