Mrono / step-elastic-beanstalk-deploy

11 stars 16 forks source link

The configuration file, "config", cannot be found. #2

Closed tal-moshayov closed 8 months ago

tal-moshayov commented 10 years ago

setting up this step yields the following error:

Checking if eb exists and can connect.
Encountered error while reading from file .elasticbeanstalk/config.
The configuration file, "config", cannot be found. Use the "init" command to create it.

failed: EB is not working or is not set up correctly.

However, there most certainly is a file called ".elasticbeanstalk/config" Any tips how to recover here?

Mrono commented 10 years ago

Hmm, I'm not sure what would be happening with it, can you post your setup (removing sensitive info)? I'll try and run through a setup to make sure nothing has changed

tal-moshayov commented 10 years ago

thx Mike! here's the conf file:

[global] ApplicationVersionName=Sample Application AwsCredentialFile=/Users/tal/.elasticbeanstalk/aws_credential_file EnvironmentTier=WebServer::Standard::1.0 EnvironmentType=SingleInstance InstanceProfileName=aws-elasticbeanstalk-ec2-role OptionSettingFile=/Users/tal/dev/silo/.elasticbeanstalk/optionsettings.staging-env RdsDeletionPolicy=Snapshot RdsEnabled=No RdsSourceSnapshotName= ServiceEndpoint=https://elasticbeanstalk.us-east-1.amazonaws.com SolutionStack=64bit Amazon Linux 2014.03 v1.0.9 running Ruby 2.1 (Passenger Standalone)

ApplicationName=Staging DevToolsEndpoint=git.elasticbeanstalk.us-east-1.amazonaws.com EnvironmentName=staging-env Region=us-east-1 [branches] elastic-beanstalk=silo-staging

[branch:elastic-beanstalk] ApplicationVersionName=Sample Application EnvironmentName=silo-staging EnvironmentTier=WebServer::Standard::1.0 EnvironmentType=LoadBalanced InstanceProfileName=aws-elasticbeanstalk-ec2-role OptionSettingFile=/Users/tal/dev/silo/.elasticbeanstalk/optionsettings.silo-staging RdsDeletionPolicy=Snapshot RdsEnabled=No RdsSourceSnapshotName=

Mrono commented 10 years ago

I'll try and duplicate this tonight, anything special about your wercker config?

christophbeger commented 9 years ago

Hi @Mrono. I got the same problem. My eb config looks different, though.

branch-defaults:
  master:
    environment: teemee-production
global:
  application_name: Teemee
  default_ec2_keyname: teemee
  default_platform: Node.js
  default_region: eu-central-1
  profile: eb-cli
  sc: git

Running eb status from terminal find application and env and status is green. Am I missing something?

here my wrecker.yml

box: wercker/nodejs
# Build definition
build:
  # The steps that will be executed on build
  steps:
    # A step that executes `npm install` command
    - npm-install
deploy:
    steps:
        - mrono/elastic-beanstalk-deploy:
            key: $AWS_KEY
            secret: $AWS_SECRET
            app_name: Teemee
            env_name: $AWS_ENV
            region: eu-central-1a

Parameters are properly set via wercker.

Mrono commented 9 years ago

Interesting, I've been unable to duplicate the issue with any of my wercker deployments. @christophbeger do you have one wercker deployment or multiple? Also, if you set 'debug' to true then it will dump the contents of the config file out to the deployment log. Can you turn that on and post the full contents of the EB deployment step (obfuscating sensitive data of course)?

christophbeger commented 9 years ago

Thanks for the quick response! This is my only wercker deployment. Here is the log:

cd $WERCKER_SOURCE_DIR
$ export WERCKER_STEP_ROOT="/wercker/steps/mrono/elastic-beanstalk-deploy/1.0.0"
$ export WERCKER_STEP_ID="9be7994d-0981-406c-957d-b42aabdb9665"
$ export WERCKER_STEP_NAME="elastic-beanstalk-deploy"
$ export WERCKER_REPORT_NUMBERS_FILE="$WERCKER_REPORT_DIR/$WERCKER_STEP_ID/numbers.ini"
$ export WERCKER_REPORT_MESSAGE_FILE="$WERCKER_REPORT_DIR/$WERCKER_STEP_ID/message.txt"
$ export WERCKER_REPORT_ARTIFACTS_DIR="$WERCKER_REPORT_DIR/$WERCKER_STEP_ID/artifacts"
$ mkdir -p $WERCKER_REPORT_ARTIFACTS_DIR
$ export WERCKER_STEP_TEMP="/tmp/$WERCKER_STEP_ID"
$ source '/wercker/wercker-build-essentials/init.sh'
$ mkdir -p $WERCKER_STEP_TEMP
$ export WERCKER_ELASTIC_BEANSTALK_DEPLOY_KEY="$AWS_KEY"
$ export WERCKER_ELASTIC_BEANSTALK_DEPLOY_SECRET="$AWS_SECRET"
$ export WERCKER_ELASTIC_BEANSTALK_DEPLOY_APP_NAME="Teemee"
$ export WERCKER_ELASTIC_BEANSTALK_DEPLOY_ENV_NAME="$AWS_ENV"
$ export WERCKER_ELASTIC_BEANSTALK_DEPLOY_REGION="eu-central-1a"
$ export WERCKER_ELASTIC_BEANSTALK_DEPLOY_DEBUG="true"
$ source "$WERCKER_STEP_ROOT/run.sh"
Debug mode turned on, this can dump potentially dangerous information to log files.
Change back to the source dir.
Setting up credentials.
Dumping Credential file.
AWSAccessKeyId=******
AWSSecretKey=******
Setting up config file.
Dumping config file.
[global]
ApplicationName=Teemee
DevToolsEndpoint=git.elasticbeanstalk.eu-central-1a.amazonaws.com
Region=eu-central-1a
ServiceEndpoint=https://elasticbeanstalk.eu-central-1a.amazonaws.com
AwsCredentialFile=/home/ubuntu/.elasticbeanstalk/aws_credential_file
EnvironmentName=teemee-production
[branches]
master=teemee-production
[branch:master]
ApplicationVersionName=master
EnvironmentName=teemee-production
InstanceProfileName=aws-elasticbeanstalk-ec2-role
Checking if eb exists and can connect.
Encountered error while reading from file .elasticbeanstalk/config.
The configuration file, "config", cannot be found. Use the "init" command to create it.

failed: EB is not working or is not set up correctly.

Are DevToolsEndpoint and ServiceEndpoint set correctly?

Mrono commented 9 years ago

Your comment on the end points got me in the right direction. Your region is incorrect, I believe it should be eu-west-1. The best way to find out for sure is to get it set up locally using eb init then get the region from the config file.

Mrono commented 9 years ago

@tal-moshayov if this still applies to you can you do the same, set the debug flag and paste the output of it?

christophbeger commented 9 years ago

@Mrono thanks for your help! It helped me finding a solution. My region was indeed set wrongly, BUT the region eu-west-1 is Ireland. I wanted to have it in Frankfurt which is eu-central-1. No matter what I did eu-central-1 would not work. I get the same config error. Then I moved the entire app to Ireland and it worked smoothly. I do not know what's wrong with Frankfurt though. Did u maybe set some statics in the step checking the regions? Anyway, thanks for you help!

Mrono commented 9 years ago

@christophbeger I don't have any sort of filtering on it, it's purely the elastic beanstalk CLI. Whatever is available in the CLI is available here.

BenSower commented 8 years ago

Heyho, I also seem to have the same problem, eu-central-1 is not working. Is there any information we could provide to help you debug this problem?