Skip to content

Run a scheduled task on AWS Batch using Ansible, Docker, Lambda, and Cloudwatch Events

Notifications You must be signed in to change notification settings

evfurman/batch-scheduled-task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run a scheduled task on AWS Batch using Ansible and Docker.

Dependencies:

Default Configuration:

  • Concurrency restricted to one at a time by limiting the resources of the ComputeEnvironment. (Job vCpus: 2 // Default Environment MaxvCpus: 2)
  • Ansible Playbook notifies Slack at job start and at job failure/success and sends failure/success notification to Datadog.
  • Job names are random. This can be modified in cfn/batch-scheduled-task.template by assigning a static value to job1Name in line 161.

Prepare

1.) Clone the repo

git clone https://github.com/evfurman/batch-scheduled-task

2.) Edit batch-scheduled-task.yml to add your own tasks

3.) Add Slack token, and Datadog token/app keys to vars in batch-scheduled-task.yml

4.) Add hosts under [cluster_members] in hosts.ini

5.) Build and push docker image to a private repository

6.) Add new image and tag to cfn/batch-scheduled-task.template on line 100

Deploy

cd cfn && ./deploy.sh

About

Run a scheduled task on AWS Batch using Ansible, Docker, Lambda, and Cloudwatch Events

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published