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

packaging: debian package installation with post-install #98

Merged
merged 5 commits into from
Jul 23, 2020

Conversation

v1v
Copy link
Member

@v1v v1v commented Jul 22, 2020

What

  • Configure the debian package installation with the post-install.sh script.
  • Agent installed in the path /opt/elastic/apm-agent-php
  • Use the official php-fpm docker image.
  • Installation test script uses the installer rather than the hardcoded configuration.
  • Support for different php versions by command line.
  • Support packaging and smoke test installation in the CI for all the three PHP versions. (7.2, 7.3 and 7.4)

Test

$ PHP_VERSION=7.2 make -f .ci/Makefile build install
$ PHP_VERSION=7.2 make -C packaging deb deb-install
{:timestamp=>"2020-07-22T15:02:10.336693+0000", :message=>"Debian packaging tools generally labels all files in /etc as config files, as mandated by policy, so fpm defaults to this behavior for deb packages. You can disable this default behavior with --deb-no-default-config-files flag", :level=>:warn}
{:timestamp=>"2020-07-22T15:02:10.613323+0000", :message=>"Created package", :path=>"build/packages/apm-agent-php_0.1-preview_all.deb"}
Creating sha512sum ...
...
+ dpkg -i build/packages/apm-agent-php_0.1-preview_all.deb
Selecting previously unselected package apm-agent-php.
(Reading database ... 12741 files and directories currently installed.)
Preparing to unpack .../apm-agent-php_0.1-preview_all.deb ...
Unpacking apm-agent-php (0.1-preview) ...
Setting up apm-agent-php (0.1-preview) ...
Installing Elastic PHP agent
  Extension configuration has just been added for the Elastic PHP agent.
; THIS IS AN AUTO-GENERATED FILE by the Elastic PHP agent post-install.sh script
extension=/opt/elastic/apm-agent-php/extensions/elastic_apm.so
elastic_apm.bootstrap_php_part_file=/opt/elastic/apm-agent-php/src/bootstrap_php_part.php
; END OF AUTO-GENERATED
+ php -m
+ grep elastic
elastic_apm
+ composer install
...
Time: 5.27 seconds, Memory: 10.00 MB

OK (3 tests, 65 assertions)

@apmmachine
Copy link
Contributor

apmmachine commented Jul 22, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #98 updated]

  • Start Time: 2020-07-22T15:28:52.117+0000

  • Duration: 6 min 58 sec

Test stats 🧪

Test Results
Failed 0
Passed 78
Skipped 0
Total 78

@v1v v1v marked this pull request as ready for review July 22, 2020 15:30
@v1v v1v self-assigned this Jul 22, 2020
@v1v v1v added automation ci enhancement New feature or request labels Jul 22, 2020
@v1v v1v requested review from SergeyKleyman and a team July 22, 2020 15:31
@v1v v1v merged commit 31e980e into elastic:master Jul 23, 2020
v1v added a commit to v1v/apm-agent-php that referenced this pull request Jul 23, 2020
…pport-packaging

* upstream/master:
  packaging: debian package installation with post-install (elastic#98)
v1v added a commit to v1v/apm-agent-php that referenced this pull request Jul 23, 2020
* upstream/master:
  packaging: debian package installation with post-install (elastic#98)
  DOCS: create DEVELOPMENT.md docs (elastic#95)
  [CI] add build badge status (elastic#87)
  Docs: add help make goal and enhance the docs (elastic#93)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation ci enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants