Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate building and packaging of Functionbeat by provider #12636

Closed

Conversation

kvch
Copy link
Contributor

@kvch kvch commented Jun 21, 2019

From now on Functionbeat is separated into binaries based on cloud providers. This lead to the following naming changes:

  • binary name: functionbeat-{provider}
  • configuration name: functionbeat-{provider}.yml
  • reference configuration name: functionbeat-{provider}.yml
  • package names: functionbeat-{provider}-{version}-{platform}.{extension}
  • index-pattern: functionbeat-{provider}-{version}-*
  • ILM name: functionbeat-{provider}-{version}
  • ILM rollover alias: functionbeat-{provider}-{version}

Packages are restructured to support building separately. Everything under x-pack/functionbeat/function is shared among all providers. On the same level, aws and local are the available provider packages.

Generated files, including fields.yml, configurations and fields.go, reside under the provider those belong to.

Binaries, configuration, etc. can be generated from the root of Functionbeat using mage as before. Running mage build|update|package|crossbuild runs and produces outputs under the providers folder. To set which provider you want to build for pass PROVIDERS env variable a comma-separated list of providers.

TODO

  • fix E2E tests
  • build/distributions?
  • more testing

@kvch kvch force-pushed the feature-functionbeat-separate-by-provider branch 2 times, most recently from aa42066 to 3728841 Compare June 25, 2019 16:23
dev-tools/mage/fields.go Outdated Show resolved Hide resolved
dev-tools/mage/asset.go Outdated Show resolved Hide resolved
dev-tools/mage/fields.go Outdated Show resolved Hide resolved
dev-tools/mage/asset.go Outdated Show resolved Hide resolved
@kvch kvch force-pushed the feature-functionbeat-separate-by-provider branch 2 times, most recently from 7184f8c to 9c884ba Compare June 27, 2019 13:30
@kvch
Copy link
Contributor Author

kvch commented Jun 27, 2019

jenkins test this

@kvch kvch force-pushed the feature-functionbeat-separate-by-provider branch 2 times, most recently from 0769cf5 to 9c1dcb2 Compare June 27, 2019 13:57
@kvch kvch marked this pull request as ready for review June 27, 2019 14:57
@kvch kvch requested a review from a team as a code owner June 27, 2019 14:57
@kvch kvch requested review from andrewkroh and urso June 27, 2019 14:58
dev-tools/mage/fields.go Outdated Show resolved Hide resolved
dev-tools/packaging/package_test.go Outdated Show resolved Hide resolved
x-pack/functionbeat/Makefile Show resolved Hide resolved
"time"

"github.com/magefile/mage/mg"
"github.com/magefile/mage/sh"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice if you could utilize as many of these common targets as possible:

	// mage:import
	_ "github.com/elastic/beats/dev-tools/mage/target/common"
	// mage:import
	//_ "github.com/elastic/beats/dev-tools/mage/target/build" # You can use this one because of the custom Build() target.
	// mage:import
	_ "github.com/elastic/beats/dev-tools/mage/target/pkg"
	// mage:import
	_ "github.com/elastic/beats/dev-tools/mage/target/dashboards"
	// mage:import
	_ "github.com/elastic/beats/dev-tools/mage/target/test"
	// mage:import
	"github.com/elastic/beats/dev-tools/mage/target/unittest"
	// mage:import
	"github.com/elastic/beats/dev-tools/mage/target/integtest"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can I use target/build? I am not sure I understand your comment.

x-pack/functionbeat/magefile.go Outdated Show resolved Hide resolved
x-pack/functionbeat/magefile.go Outdated Show resolved Hide resolved
x-pack/functionbeat/magefile.go Outdated Show resolved Hide resolved
x-pack/functionbeat/magefile.go Outdated Show resolved Hide resolved
x-pack/functionbeat/magefile.go Outdated Show resolved Hide resolved
@kvch kvch requested a review from a team as a code owner July 2, 2019 14:10
dev-tools/mage/gotest.go Outdated Show resolved Hide resolved
dev-tools/mage/gotest.go Show resolved Hide resolved
dev-tools/mage/gotest.go Outdated Show resolved Hide resolved
dev-tools/mage/gotest.go Show resolved Hide resolved
@kvch kvch force-pushed the feature-functionbeat-separate-by-provider branch from 1a3096f to e422eea Compare July 4, 2019 13:07
x-pack/functionbeat/scripts/mage/update.go Show resolved Hide resolved
x-pack/functionbeat/scripts/mage/update.go Show resolved Hide resolved
x-pack/functionbeat/scripts/mage/providers.go Show resolved Hide resolved
x-pack/functionbeat/magefile.go Outdated Show resolved Hide resolved
x-pack/functionbeat/magefile.go Outdated Show resolved Hide resolved
@kvch kvch closed this Jul 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants