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

Install full configs in packages #1682

Merged
merged 1 commit into from
May 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dev-tools/packer/platforms/binary/run.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ fi
mkdir /{{.beat_name}}-${VERSION}-linux-{{.bin_arch}}
cp -a homedirs/{{.beat_name}}/. /{{.beat_name}}-${VERSION}-linux-{{.bin_arch}}/
cp {{.beat_name}}-linux-{{.arch}} /{{.beat_name}}-${VERSION}-linux-{{.bin_arch}}/{{.beat_name}}
cp {{.beat_name}}-binary.yml /{{.beat_name}}-${VERSION}-linux-{{.bin_arch}}/{{.beat_name}}.yml
cp {{.beat_name}}-linux.yml /{{.beat_name}}-${VERSION}-linux-{{.bin_arch}}/{{.beat_name}}.yml
cp {{.beat_name}}-linux.full.yml /{{.beat_name}}-${VERSION}-linux-{{.bin_arch}}/{{.beat_name}}.full.yml
cp {{.beat_name}}.template.json /{{.beat_name}}-${VERSION}-linux-{{.bin_arch}}/
cp {{.beat_name}}.template-es2x.json /{{.beat_name}}-${VERSION}-linux-{{.bin_arch}}/

Expand Down
1 change: 1 addition & 0 deletions dev-tools/packer/platforms/centos/run.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ fpm --force -s dir -t rpm \
beatname-${RUNID}.sh=/usr/bin/{{.beat_name}}.sh \
{{.beat_name}}-linux-{{.arch}}=/usr/share/{{.beat_name}}/bin/{{.beat_name}} \
{{.beat_name}}-linux.yml=/etc/{{.beat_name}}/{{.beat_name}}.yml \
{{.beat_name}}-linux.full.yml=/etc/{{.beat_name}}/{{.beat_name}}.full.yml \
{{.beat_name}}.template.json=/etc/{{.beat_name}}/{{.beat_name}}.template.json \
{{.beat_name}}.template-es2x.json=/etc/{{.beat_name}}/{{.beat_name}}.template-es2x.json \
${RUNID}.service=/lib/systemd/system/{{.beat_name}}.service \
Expand Down
1 change: 1 addition & 0 deletions dev-tools/packer/platforms/darwin/run.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ mkdir /{{.beat_name}}-${VERSION}-darwin-x86
cp -a homedirs/{{.beat_name}}/. /{{.beat_name}}-${VERSION}-darwin-x86/
cp {{.beat_name}}-darwin-amd64 /{{.beat_name}}-${VERSION}-darwin-x86/{{.beat_name}}
cp {{.beat_name}}-darwin.yml /{{.beat_name}}-${VERSION}-darwin-x86/{{.beat_name}}.yml
cp {{.beat_name}}-darwin.full.yml /{{.beat_name}}-${VERSION}-darwin-x86/{{.beat_name}}.full.yml
cp {{.beat_name}}.template.json /{{.beat_name}}-${VERSION}-darwin-x86/
cp {{.beat_name}}.template-es2x.json /{{.beat_name}}-${VERSION}-darwin-x86/

Expand Down
1 change: 1 addition & 0 deletions dev-tools/packer/platforms/debian/run.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ fpm --force -s dir -t deb \
beatname-${RUNID}.sh=/usr/bin/{{.beat_name}}.sh \
{{.beat_name}}-linux-{{.arch}}=/usr/share/{{.beat_name}}/bin/{{.beat_name}} \
{{.beat_name}}-linux.yml=/etc/{{.beat_name}}/{{.beat_name}}.yml \
{{.beat_name}}-linux.full.yml=/etc/{{.beat_name}}/{{.beat_name}}.full.yml \
{{.beat_name}}.template.json=/etc/{{.beat_name}}/{{.beat_name}}.template.json \
{{.beat_name}}.template-es2x.json=/etc/{{.beat_name}}/{{.beat_name}}.template-es2x.json \
${RUNID}.service=/lib/systemd/system/{{.beat_name}}.service \
Expand Down
1 change: 1 addition & 0 deletions dev-tools/packer/platforms/windows/run.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ cp -a homedirs/{{.beat_name}}/. /{{.beat_name}}-${VERSION}-windows/
cp {{.beat_name}}-windows-{{.arch}}.exe /{{.beat_name}}-${VERSION}-windows/{{.beat_name}}.exe
unix2dos {{.beat_name}}-win.yml
cp {{.beat_name}}-win.yml /{{.beat_name}}-${VERSION}-windows/{{.beat_name}}.yml
cp {{.beat_name}}-win.full.yml /{{.beat_name}}-${VERSION}-windows/{{.beat_name}}.full.yml
cp {{.beat_name}}.template.json /{{.beat_name}}-${VERSION}-windows/
cp {{.beat_name}}.template-es2x.json /{{.beat_name}}-${VERSION}-windows/
cp install-service-{{.beat_name}}.ps1 /{{.beat_name}}-${VERSION}-windows/
Expand Down
6 changes: 3 additions & 3 deletions dev-tools/packer/xgo-scripts/before_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ cp $BEATNAME.template-es2x.json $PREFIX/$BEATNAME.template-es2x.json

# linux
cp $BEATNAME.yml $PREFIX/$BEATNAME-linux.yml
Copy link
Contributor

Choose a reason for hiding this comment

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

For linux we do not copy full?


# binary
cp $BEATNAME.yml $PREFIX/$BEATNAME-binary.yml
cp $BEATNAME.full.yml $PREFIX/$BEATNAME-linux.full.yml

# darwin
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we also need the short one for the binary?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, makes sense now. We don't need the binary anymore as we also use linux for the binary one. Ignore my 2 comments.

cp $BEATNAME.yml $PREFIX/$BEATNAME-darwin.yml
cp $BEATNAME.full.yml $PREFIX/$BEATNAME-darwin.full.yml

# win
cp $BEATNAME.yml $PREFIX/$BEATNAME-win.yml
cp $BEATNAME.full.yml $PREFIX/$BEATNAME-win.full.yml

# Contains beat specific adjustments. As it is platform specific knowledge, it should be in packer not the beats itself
PREFIX=$PREFIX make before-build
4 changes: 0 additions & 4 deletions winlogbeat/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ gen:
# This is called by the beats packer before building starts
.PHONY: before-build
before-build:
# Windows
sed -i 's|#\{0,1\}\(to_files:\).*|\1 true|' $(PREFIX)/$(BEATNAME)-win.yml
sed -i 's|#\{0,1\}\(level:\).*|\1 info|' $(PREFIX)/$(BEATNAME)-win.yml
sed -i '/log files/{n;s|#\{0,1\}path:.*|path: C:/ProgramData/winlogbeat/Logs|}' $(PREFIX)/$(BEATNAME)-win.yml