Influx data aws beanstalks configuration

Can any one explain below line of code that will help me out in aws beanstalks application deployment.

container_commands:
00download:
command: ‘wget https://dl.influxdata.com/influxdb/releases/influxdb-1.7.1_linux_amd64.tar.gz -O /tmp/influxdata.tar.gz’
01expand:
command: ‘tar -xzvf /tmp/influxdata.tar.gz -C /etc’
02copyconf:
command: ‘cp -f .ebextensions/influxdb.conf /etc/influxdb-1.7.1_linux_amd64’

It’s not entirely clear what you’re asking. Where did you get this code? What are you trying to understand?

This part seems to allow you to “execute commands that affect your application source code” (from the Elastic Beanstalk Docs):

container_commands:

This is the first command, which downloads the InfluxDB package from out website and saves it to the /tmp directory:

00download:
command: ‘wget https://dl.influxdata.com/influxdb/releases/influxdb-1.7.1_linux_amd64.tar.gz -O /tmp/influxdata.tar.gz’

This extracts the contents of the downloaded packaged into /etc (I am not sure why you would do this):

01expand:
command: ‘tar -xzvf /tmp/influxdata.tar.gz -C /etc’

This copies a configuration file from a hidden directory into the directory created when extracting the package:

02copyconf:
command: ‘cp -f .ebextensions/influxdb.conf /etc/influxdb-1.7.1_linux_amd64’

Thank you @noahcrowley

i am looking for “procfile” commands to start my beanstalk application on aws.

The InfluxDB database is written in Go and the daemon is distributed as a binary, influxd. You are downloading the “Linux Binaries” tarball, which will include the daemon as well as some additional utilities for interacting with InfluxDB, however only the daemon is necessary for running the database. influxd uses port 8086 for its HTTP interface.

From the commands you shared earlier, it looks like you are extracting the application to /etc (which is unusual and not recommended). If that is the case, you can start InfluxDB using the full path to the binary, /etc/influxdb-1.7.1_linux_amd64/influxd

It’s been a while since I’ve worked with Beanstalk, so I’m referring to the documentation on Procfiles for Go applications: Configuring the application process with a Procfile - AWS Elastic Beanstalk. Based on that documentation, the full path to the binary and the application port should be all you need.

Thank you @noahcrowley

could you please tell me, what will be the “–web.listen-address” for influxData.

I am not certain where you are getting –web.listen-address from. It is not part of the Elastic Beanstalk procfile and it is not an InfluxDB parameter. I believe it is a Prometheus command line flag.

Are you trying to change the port or address that InfluxDB listens on? That can be done in the configuration file, in the [http] section, by changing the “bind-address” value.

[http]
  # Determines whether HTTP endpoint is enabled.
  # enabled = true

  # Determines whether the Flux query endpoint is enabled.
  # flux-enabled = false

  # The bind address used by the HTTP service.
  # bind-address = ":8086"

By default, InfluxDB listens to all IP addresses on both IPv6 and IPv4 (:: and 0.0.0.0), on port 8086.