AWS Elastic Beanstalk plugin

I’ve installed Drone server and an agent in a multicontainer AWS Elastic Beanstalk environment.

I can login to Drone. I can connect it to my repository. I can configure the repository and add secrets to the repository with the Drone CLI. So it appears that all is well with Drone.

I’ve created a test PHP source bundle for a simple Hello world application for Beanstalk. I can deploy it to Beanstalk manually using the Beanstalk CLI as well as the AWS console. It’s just a single index.html file and it deploys and runs fine.

I create a drone.yml file for the AWS Elastic Beanstalk plugin from the market place and add it to the repo that holds the index.html file. It looks like this:

pipeline:
beanstalk:
image: peloton/drone-elastic-beanstalk
application: BeanDroneHello
description: Deployed with DroneCI
environment_name: BeanHello
env-update: true
region: us-east-2
version_label: v1
auto_create: true
bucket: beandronehello
bucket_key: beandronehello.zip
secrets: [aws_access_key_id, aws_secret_access_key]

When I push to the repo the Drone build runs. I know the AWS keys are pulled from Drone secrets and they work because if I enter them wrong I get an error. I know the build can read the Beanstalk source bundle from the AWS S3 bucket because if I enter a incorrect bucket key the build fails. The AWS keys I’m using are for an IAM roll with Administrative rights so the AWS Access key and secret should have sufficient power to deploy the application. It can stand up the application manually from the console no problem.

The build runs all successful when I view the build in Drone. The plugin DOES create the Beanstalk Application. It shows up in the console. The build DOES seem to deploy the source bundle meaning that if I choose “View application versions” the source bundle is there and intact.

However it does not create the Beanstalk Environment. No instances. No load balancer. No EC2 or ECS resources are ever actually deployed. Drone seems to think the build was successful and the plugin did do something, it create thes Beanstalk Application and delivers the source bundle but it doesn’t actually ever create the Environment.

Thoughts?

It looks like the root cause might be an incorrect attribute name:

-env-update: true
+environment_update: true

You can see a full list of plugin attributes here:
http://plugins.drone.io/peloton/drone-elastic-beanstalk/

OK, first of all…kill me now. :slight_smile:

I picked up that flag from the output in Drone as it logs out the env variable and value. I couldn’t figure out where I would have even seen the parameter in the env-update format and when I ran it corrected I saw it in the log.

So now, the functionality of the plugin is odd. It has the auto_create parameter for the Beanstalk Application but not for the Environment. I don’t know why you would ever need the auto_create flag then, if you need to pre-create the Environment for this plugin to actually do anything then the Application must already exist, auto_create will never be needed.

I’ve talked to Joachim the author and is sounds like it’s been quite some time since he’s used or worked on the plugin. Does this have an owner? I’m new to Drone, if there’s things we’d like to see improve with this plugin, what is the best avenue to inspire that to happen?

I’ve talked to Joachim the author and is sounds like it’s been quite some time since he’s used or worked on the plugin. Does this have an owner?

The plugin is owned by Joachim: GitHub - josmo/drone-elastic-beanstalk: Drone plugin for deploying to AWS Elastic Beanstalk

I’m new to Drone, if there’s things we’d like to see improve with this plugin, what is the best avenue to inspire that to happen?

You have the option to collaborate with the author (Joachim) and send pull requests, or fork and publish a modified version of the plugin to Dockerhub.

Hi @Bazul99

As Brad said I’ll totally take PRs in (I hope I mentioned that in our emails ;)) :slight_smile: I just stoped using beanstalk a while back, so remembering all the piece is a bit out of date for me. :confused:

1 Like