Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Elastic Beanstalk + Git Submodules

I'm using Amazon's Elastic Beanstalk to deploy my app via Git, and I've got submodules within my Git. Of course, when I look at the directories where the data for the submodules should be, nothing is there because the submodules have not been initialized.

Apparently Elastic Beanstalk doesn't support submodules. Is this correct? If so, how can I convince Git to let me have the features of a submodule but still upload all the code of the submodule when I push the main repo?

like image 606
iLoch Avatar asked Aug 14 '13 07:08

iLoch


People also ask

When should you not use Elastic Beanstalk?

Elastic Beanstalk isn't great if you need a lot of environment variables. The simple reason is that Elastic Beanstalk has a hard limit of 4KB to store all key-value pairs. The environment had accumulated 74 environment variables — a few of them had exceedingly verbose names.

Can CodeDeploy deploy to Elastic Beanstalk?

Just like the CodeDeploy example, all it takes to deploy to Elastic Beanstalk using Codeship are a few parameters: the Elastic Beanstalk application name. the Elastic Beanstalk environment name. the S3 bucket to upload the artifact to.

How do I deploy apps to Elastic Beanstalk?

You can also deploy a previously uploaded version of your application to any of its environments from the application versions page. Open the Elastic Beanstalk console , and in the Regions list, select your AWS Region. In the navigation pane, choose Applications, and then choose your application's name from the list.


1 Answers

Elastic Beanstalk does support sub-modules if you just make sure that Git is installed on the AMI you use by Customizing and Configuring AWS Elastic Beanstalk Environments. You can do that by providing a config in your git repo:

  • Create a configuration file with the extension .config (e.g., myapp.config) and place it in an .ebextensions top-level directory of your git repo

  • In that file, specify the dependencies:

   packages: 
      <name of package manager>:
         <package name>: <version>

for example:

   packages:
      yum:
         git: []
  • make sure you match the name of package manager to the AMI you're using, so for example yum for Amazon Linux, apt for Ubuntu.

  • you'll probably have to adapt your build script to initialize the sub-modules as EB won't do that for you

  • commit, push and deploy and go

like image 111
godspeedelbow Avatar answered Sep 28 '22 11:09

godspeedelbow