Influx data aws beanstalks configuration


#1

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’


#2

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’

#3

Thank you @noahcrowley

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


#4

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: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/go-procfile.html. Based on that documentation, the full path to the binary and the application port should be all you need.