dignoe / whenever-elasticbeanstalk

Allows you to run cron jobs easily on one or all AWS Elastic Beanstalk instances.
MIT License
48 stars 35 forks source link

Feature/aws 2.3 #26

Closed jufemaiz closed 5 years ago

jufemaiz commented 8 years ago

Right, so, long time no speak. With Tour de France happening and awaiting the arrival of my first child I've had some time to review this.

There has been major changes to the AWS SDK Gem that I've now adopted for this one.

Major Changes

I've got this working on a staging environment but would like to get some feedback, particularly from @dignoe and @cyborgmaster due to their work.

dignoe commented 8 years ago

I haven't used this gem in years (I've moved to using OpsWorks), so I don't feel that I can add much to this conversation. Please let me know if you need anything though (like github or rubygem permissions), and I'd be happy to help.

CyborgMaster commented 8 years ago

@jufemaiz, I really like the approach you've taken here. Seems like the refactoring is going in a good direction. I can't say wether it works correctly because the only real way to test it is to run in inside elastic beanstalk in a real instance, but assume it works, I'm all for it.

binodmainali commented 8 years ago

I can actually test this out, as I am have one spare Beanstalk instance running for testing. I have commented on an issue. @jufemaiz may be we can get in touch and figure out something

jufemaiz commented 8 years ago

@binodmainali1 note the requirements to work with git based gems.

dignoe commented 8 years ago

@jufemaiz It looks like you have access on Rubygems to update the packaged gem.

jufemaiz commented 8 years ago

@dignoe yep, just wasn't really wanting to push something there without a bit of a review.

For those wanting to test, have a read of https://gist.github.com/jufemaiz/eba1ee62c3709d2db90cc16eb2c5c10b

jufemaiz commented 8 years ago

Right I think I'm at a stage to make this a v2.0.0-beta0 release.

Any objections?

Drakula2k commented 8 years ago

Hi!

I just tested it with 64bit Amazon Linux 2016.03 v2.1.3 running Ruby 2.3 (Puma) and webapp user's cron gives error (CRON) ERROR chdir failed (/home/webapp): No such file or directory on run (on /var/log/cron log).

I investigated it a bit and seems that cron needs user's home directory for internal needs, so I think the easiest workaround is to create it and give access to webapp user.

Also something weird happened to logs, there is a symlinks loop:

# ll /var/app/containerfiles/logs/production.log
lrwxrwxrwx 1 webapp webapp 35 Aug 11 13:32 /var/app/containerfiles/logs/production.log -> /var/app/current/log/production.log

#ll /var/app/current/log/development.log
lrwxrwxrwx 1 webapp webapp 36 Aug 11 13:32 /var/app/current/log/development.log -> /var/app/current/log/development.log

Seems related to config from Rails + GIT gist.

jwilsjustin commented 6 years ago

@jufemaiz Still thinking about a v2.0.0-beta0 release on rubygems.org?

jufemaiz commented 5 years ago

Closing this out.

Happy to consider re-opening if people are interested.

I'll write up a better approach to this using Docker and ECS / Fargate if people show interest.