Deployment options using Amazon Lightsail? [closed]
Asked Answered
K

4

10

We're looking to host a number of small projects on Amazon Lightsail. For larger projects we use Codepipeline to manage deployments from github.

Is there a similar option available to push deployments from github to a lightsail instance for deployments. I've had a look around and pipeline does not seem to work.

Is it possible to use AWS CodePipeline with Lightsail?

Are there any good deployment options for lightsail or should we look at something more basic such as

https://github.com/markomarkovic/simple-php-git-deploy

Many thanks for the advice!

Kathiekathleen answered 19/4, 2018 at 2:26 Comment(0)
W
6

This documentation page by Mike Coleman takes us on Using AWS CodeDeploy and AWS CodePipeline to Deploy Applications to Amazon Lightsail. It’s basically a guide of the process of setting up a deployment pipeline and what you're looking for.

After ensuring you have specific prerequesites in place (AWS account, GitHub account, git installed locally and AWS CLI installed and configured locally) you'll then go through the following 10 steps

  1. Create a service role.
  2. Create an S3 bucket.
  3. Create an IAM policy.
  4. Create an IAM user.
  5. Create a Lightsail instance and install the CodeDeploy agent.
  6. Verify the CodeDeploy agent.
  7. Setup the application in CodeDeploy.
  8. Fork the GitHub Repo.
  9. Setup CodePipeline.
  10. Test and Update the Application.

If that comes in handy, I've written a blog post on that and gone through a couple of Q&As along the way that aren't addressed in the documentation.

Watford answered 30/9, 2020 at 15:47 Comment(0)
R
4

I recently had the same challenge and got it working.

It is possible to use CodePipeline for fetching the source code and building the application with CodeBuild. The deployment of the application can be done with CodeDeploy.

For CodeDeploy, it is necessary to register the Lightsail Instance as an on-premise instance. On the instance itself the CodeDeploy agent needs to be installed and configured.

I have written a post about how to set this up on my blog.

Reamonn answered 16/5, 2019 at 11:37 Comment(1)
Hi Jens, I tried to follow your instructions in the blog, but failed to reproduce the result. It is as if the codedeploy-agent couldn't communicate well enough with CodeDeploy, although being a registered on-prem instance.Dissolvent
E
2

Old question, but maybe someone stumbles upon this and finds this useful - although might not be applicable if you need the pipeline to be inside AWS; but the solution that worked for me was

DeployHQ

It is quite easy to set up with using Github webhooks and deploy to Lightsail. There are couple of similar options out there, but DeployHQ was a winner for me for the clean dashboard and it fitted nicely to all the requitements (commands during build, webhooks, connects to multiple servers, free for low number of deployments per day).

Erigena answered 7/7, 2020 at 9:41 Comment(1)
Please do tell how you got lightsail setup on DeployHQ such as which server options did you choose and how did you get around some of the lightsail server restrictions. I'm trying DeployHQ from your recommendation, but having a tough time getting my lightsail instance setup.Argue
P
0

You should be able to install the code pipeline agent and use it as a target just like you would use an on premise server.

Psittacine answered 5/12, 2018 at 21:4 Comment(1)
ok thank you I will look at that, did you mean the code deploy agent? I did not have to much luck finding a code pipeline agent.Kathiekathleen

© 2022 - 2024 — McMap. All rights reserved.