briandilley / ebs-deploy

Python based command line tools for managing Amazon Elastic Beanstalk applications.
MIT License
82 stars 29 forks source link

Not updating package.json/dependencies? #24

Closed jakemmarsh closed 9 years ago

jakemmarsh commented 9 years ago

First, this package is great and has vastly simplified my AWS deployments. Thank you!

Now my problem is that one of my npm dependencies (postgres) is breaking the deploy:

Failed at the libpq@1.6.4 install script 'node-gyp rebuild'

To remedy this, I'm attempting to install postgres via EBS by listing it as a yum dependency. However, even after updating the package.json to remove the culprit dependency, the EBS deploy is continuing to install it via npm, as well as other now-removed dependencies. Here's my ebs.config:

aws:
    access_key: '<omitted>'
    secret_key: <omitted>'
    region: 'us-east-1'
    bucket: '<omitted>'
    bucket_path: '<omitted>'

app:
    versions_to_keep: 2
    app_name: '<omitted>'
    description: '<omitted>'

    all_environments:
        solution_stack_name: '64bit Amazon Linux running Node.js'

        option_settings:
            'aws:elasticbeanstalk:application':
                Application Healthcheck URL: '/v1/check'

        # instructions on how to build the application archive
        archive:
            excludes: # files to exclude, a list of regex
                - '^.gitignore$'
                - '^\.git*'
                - '.*\.zip$'
                - 'node_modules\/'
                - '^.env$'
                - '__tests__\/'
                - '__coverage__\/'
            files:
                - deflate.conf:
                    # permissions of the file
                    permissions: 0644
                    # the content node is important here
                    content: |
                        <Location />
                            # Insert filter
                            SetOutputFilter DEFLATE
                            # Don't compress images
                             SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
                            # Make sure proxies don't deliver the wrong content
                            Header append Vary User-Agent env=!dont-vary
                        </Location>

    environments:
        # the staging version of the app
        '<omitted>':
            cname_prefix: '<omitted>'

        # the production version of the app
        '<omitted>':
            cname_prefix: '<omitted>'

Am I missing a step here, or is this a bug of some sort?

gregpardo commented 9 years ago

You probably need some packages like in the example

files:
                - .ebextensions/02-packages.config:
                    permissions: 0777
                    yaml:
                        packages:
                            yum:
                                gcc: ''
                                gcc-c++: ''
                                make: ''
                                openssl-devel: ''
                                libxml2: ''
                                libxml2-devel: ''
jakemmarsh commented 9 years ago

I actually did have a file like that, just forgot to mention it.

Either way, I believe this was a problem with my actual EBS volume. After I terminated it and spun up a new one, my deployment worked just fine :+1: