Install on AWS Elastic Beanstalk

To install Tideways on an AWS Elastic Beanstalk application you need to adding two Elastic Beanstalk configuration files to your web applications source code. If you don’t have a folder called .ebextensions yet create it and add the following two files.

First .ebextensions/10_tideways_repo.config to configure the location of the Tideways packages from our YUM repository:

files:
  "/etc/yum.repos.d/tideways.repo":
    mode: "000644"
    content: |
      [tideways]
      name = Tideways
      baseurl = https://packages.tideways.com/yum-packages-main

commands:
  01_tideways_repo_gpg:
    command: "rpm --import https://packages.tideways.com/key.gpg
    ignoreErrors: true
  02_tideways_repo_makecache:
    command: "yum makecache --disablerepo=* --enablerepo=tideways"
    ignoreErrors: true

Then .ebextensions/20_tideways_install.config which installs the packages and configures the PHP extension. Don’t forget that you need to put the API key of your Tideways project into the tideways.api_key instead of the placeholder.

packages:
    yum:
       tideways-php: []
       tideways-daemon: []

files:
  "/etc/php.d/40-tideways.ini" :
    mode: "000755"
    owner: root
    group: root
    content: |
      extension=tideways.so
      tideways.api_key=API KEY HERE

Now create a new source package or use the EB-CLI to deploy the new version via Git and your application should start using Tideways after the next deployment.

Info: Two files are necessary, because Elastic Beanstalk processes the packages keyword before files`and `commands, so that it would try to install the packages before adding the repository source if you merge them together into one file.

Still need help? Email [email protected]