Sign inSign up

avhost/mesos-airflow-autoscaler-aws

By avhost

•Updated 6 months ago

This AWS autoscaler will start EC2 instances if Airflow does not get matched offers from mesos.

Image
Integration & delivery
Machine learning & AI
Data science
0

6.8K

avhost/mesos-airflow-autoscaler-aws repository overview

⁠AWS Autoscaler for Apache Airflow Mesos Provider

Issues Chat GoDoc Docker Pulls

This AWS autoscaler will start EC2 instances if Airflow does not get matched offers from mesos.

⁠Funding

⁠Issues

To open an issue, please use this place: https://github.com/m3scluster/mesos-airflow-autoscaler-aws/issues⁠

⁠Requirements

  • Airflow min 2.1.x
  • Apache Mesos min 1.6.x
  • Airflow Mesos Provider min 2.0
  • AWS

⁠Configuration

ENVDefaultDescription
AIRFLOW_MESOS_SCHEDULER127.0.0.1:11000IP Address and port of the Apache Airflow Mesos provider
LOGLEVELdebugLoglevel (info, warn, debug)
WAIT_TIME2mThe time in minutes the autoscaler have to wait until it will create a mesos instance in AWS
WAIT_TIME_OVERWRITE_INSTANCE15mIf the DAG is still after 15m in the queue, the autoscaler will ignore the custom instance type to start a new ec2 instance.
REDIS_SERVER127.0.0.1:6480Redis server and port
REDIS_PASSWORDRedis DB password
REDIS_DB2Redis DB Number
REDIS_PREFIXasgPrefix for every Redis key
API_USERNAMEuserUsername to authenticate against the Apache Airflow Mesos provider
API_PASSWORDpasswordPassword to authenticate against the Apache Airflow Mesos provider
AWS_SECRETAWS Secret
AWS_REGIONeu-central-1AWS Region
AWS_WAIT_TIME10mThe time the autoscaler have to wait until it check if the EC2 intance can be terminated.
AWS_LAUNCH_TEMPLATE_IDThe AWS Launche Template ID
AWS_INSTANCE_FALLBACKt3a.2xlargeFallback instance type will be used if there are no more ec2 resources in AWS.
AWS_INSTANCE_DEFAULT_ARCHITECTUREx86_64Default architecture of ec2 instance.
AWS_INSTANCE_ALLOW"t3.,r5.,c5."Only these instances are allowed.
AWS_INSTANCE_MAX_AGE6hMax age on an instance. That should prevent instances to run endless.
MESOS_AGENT_SSLfalseEnable SSL for the communication to the Mesos agent
MESOS_AGENT_USERNAMEUsername of the Mesos Agent
MESOS_AGENT_PASSWORDPassword of the Mesos Agent
MESOS_AGENT_PORT5051Port of the Mesos Agent
MESOS_AGENT_TIMEOUT10mMesos agent timeout
SSLfalseEnable SSL for the communication to the Airflow Scheduler API
DAG_TTL6hSet the TTL for DAG'keys in Redis.

⁠Airflow Executor Config

These autoscaler support the following executor config parameters:

  executor_config={
    "mem_limit": 2048,
    "instance_type": "t2.xlarge"
 }
  • With the help if the mem_limit parameter, the autoscaler will determin which AWS instance is the right one.
  • instance_type will overwrite the mem_limit and just crate a instance of that type.

⁠Documentation

AWS - https://docs.aws.amazon.com/code-samples/latest/catalog/go-ec2-create_instance.go.html⁠

Tag summary

Content type

Image

Digest

sha256:b4df056bd…

Size

75.7 MB

Last updated

6 months ago

docker pull avhost/mesos-airflow-autoscaler-aws