Amazon Web Services Beanstalk deployment using Octopus Deploy

John Ponnampalam's Avatar

John Ponnampalam

26 Sep, 2014 06:47 AM

We are trailing Octopus Deploy as the tool for deployment to AWS Beanstalk. We use TFS Online Build which pushes the nuget package to myget.org. The Octopus server then uses this repository for deploying builds.
I have read the following support issue:
http://help.octopusdeploy.com/discussions/questions/977-aws-elastic-beanstalk
and also this code project article:-
http://www.codeproject.com/Articles/719801/AWS-Deployment-With-Octopus-Deploy.

I am still not clear how it works. My questions are:-
1) Since Beanstalk is auto scaling the exact servers may vary. The AWS Deployment with Octopus article suggests a AWSDeploy command to be executed which will install Tentacle on the servers created by Beanstalk in Listening mode. It appears to me that a deployment power shell script calling AWSDeploy should be run from Octopus Server each time a new/updated package is arrives from TFS daily build. If this is the case why bother with Tentacles? Wouldn't the AWSDeploy command executed on the Octopus Server do all the software updates on the elastic servers it creates and destroys based on auto scaling?

2) Could you give me some details on how the deployment from octopus server to beanstalk works and what steps need to be taken?

Thanking you in advance,

John

  1. 1 Posted by Damian Maclenna... on 30 Sep, 2014 07:24 AM

    Damian Maclennan's Avatar

    Hi John

    Thanks for getting in touch and sorry for the delay in responding, Elastic Beanstalk isn't an area we have lots of experience in so I've been doing some research of my own.

    So to try to answer your questions.

    1. When a machine is provisioned, it will have a tentacle installed with environment and role parameters configured and registered with the Octopus Server. At that time, it will query the Octopus Server for the latest release and initiate a deployment.

    Future releases will be installed by the Octopus Server contacting the tentacle directly, and not using AWSDeploy. If you read part 1 to the Code Project article ( http://www.codeproject.com/Articles/539088/Amazon-AWSDeploy-To-Prov... , which is excellent by the way) the author explains the problems with AWSDeploy, mainly the non-deterministic way it pushes releases as well as the inflexibility in configuring your application.

    Essentially the answer to your question is that in a new release, the Octopus Server is calling a tentacle to do the deployment rather than AWS Deploy.

    Does that make sense ?

    1. The article you linked to does a great job of explaining things as far as I see it. I'm not sure I could do a better job here. Can I ask that you experiment with those steps and let me know if you get stuck on a particular issue ?

    I did experiment with a simpler approach where we used a local tentacle to push the files directly to AWS, but the lack of configuration options makes that a not particularly useful solution.

    Hope that helps somewhat, please do get in touch if it's still unclear.

    Regards

    Damian

  2. 2 Posted by john.p on 30 Sep, 2014 09:02 AM

    john.p's Avatar

    Hi Damian,
    Thanks for the update. Your response has made it clearer. In my beanstalk installation I have configured a minimum of 2 and max of 4 AMI instances.
    So my follow up question is :-
    When a machines is provisioned by AWS I will supply the power shell script which will install Tentacle. Am I right in assuming if Tentacle is configured as a Listening Tentacle and the Octopus Server IP and Thumbprint is set up then on provisioning the Tentacle instance connects to the server for an update and thereafter the Octopus Server will push updates to the Tentacle when a Deploy/Release action is initiated ?

  3. 3 Posted by Damian Maclenna... on 30 Sep, 2014 10:08 AM

    Damian Maclennan's Avatar

    Hi John

    Yep I think you've got it.
    The only thing to be wary of is the cleanup of deprovisioned machines, there is a script in the CodeProject article. It's not an ideal situation and something we want to improve in the future but having a bunch of offline machines will slow down Octopus as all those health check tasks get requeued.

    Regards

    Damian

  4. 4 Posted by john.p on 01 Oct, 2014 01:56 AM

    john.p's Avatar

    Hi Damian,
    Thanks. I am going through a demo scenario to determine if Octopus is the right corporate deployment too for us. Looks good so far.

    John

  5. 5 Posted by Damian Maclenna... on 01 Oct, 2014 02:05 AM

    Damian Maclennan's Avatar

    Hi John

    That's great news.
    Let me know if you have any further questions that we can help with.

    Regards

    Damian

  6. Paul Stovell closed this discussion on 04 Jan, 2017 08:23 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac