chrisp
chrisp

Reputation: 2249

How do I know what .ebextensions config file to create?

I think I'm on the right path. I can use .ebextensions to change some of the conf files for the instance I'm running. Since I'm using Elastic Beanstalk, and that a lot of the software is shrinkwrapped (which I'm fine with), I should be using .ebextensions as a means of modifying the environment.

I want to employ some form of mod_rewrite config, but I know nothing of this Amazon Linux. I don't even know what the web server is. I've been through the console for the past few hours and see no trace of the things I want to override.

Apparently I can setup a shell to take a look around, but modifying things that way will cause things to be overridden since Beanstalk is handling config. I'm not entirely sure on that last point.

Should I just ssh and play in userland like a typical unix host?

Upvotes: 3

Views: 4934

Answers (1)

kukido
kukido

Reputation: 10601

You can definitely ssh to the instance, and see around. But remember, that your changes are not persistent. You should look at .ebextensions config files as the way to re-run your commands on the host, plus more.

It might take some time to see where ElasticBeanstalk stores configuration files and all other interesting things.

To get you started, your app files are located at: /opt/python/current/app and if you are using Python, it is located in virtual environment at: /opt/python/run/venv/bin/python27

Customizing the Software on EC2 Instances Running Linux guide contains detailed information on what you can do:

  • Packages - install packages
  • Sources - retrieve archives
  • Files - operations with files
  • Users - anything with users
  • Groups - anything with groups
  • Commands - execute instance commands
  • Container_commands - execute commands after the container is extracted
  • Services - launch services
  • Option_settings - configure container settings

See if that satisfies your requirements, if not, come back to StackOverflow and ask more questions.

Upvotes: 9

Related Questions