mirror of
https://github.com/ZwareBear/awx.git
synced 2026-05-16 05:18:37 -05:00
70bf78e29f
* This also adds fields to the instance view for tracking cpu and memory usage as well as information on what the capacity ranges are * Also adds a flag for enabling/disabling instances which removes them from all queues and has them stop processing new work * The capacity is now based almost exclusively on some value relative to forks * capacity_adjustment allows you to commit an instance to a certain amount of forks, cpu focused or memory focused * Each job run adds a single fork overhead (that's the reasoning behind the +1)
63 lines
2.1 KiB
Python
63 lines
2.1 KiB
Python
# -*- coding: utf-8 -*-
|
|
from __future__ import unicode_literals
|
|
|
|
from django.db import migrations, models
|
|
from decimal import Decimal
|
|
import awx.main.fields
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('main', '0019_v330_custom_virtualenv'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AddField(
|
|
model_name='instancegroup',
|
|
name='policy_instance_list',
|
|
field=awx.main.fields.JSONField(default=[], help_text='List of exact-match Instances that will always be automatically assigned to this group',
|
|
blank=True),
|
|
),
|
|
migrations.AddField(
|
|
model_name='instancegroup',
|
|
name='policy_instance_minimum',
|
|
field=models.IntegerField(default=0, help_text='Static minimum number of Instances to automatically assign to this group'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='instancegroup',
|
|
name='policy_instance_percentage',
|
|
field=models.IntegerField(default=0, help_text='Percentage of Instances to automatically assign to this group'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='instance',
|
|
name='capacity_adjustment',
|
|
field=models.DecimalField(decimal_places=2, default=Decimal('1.0'), max_digits=3),
|
|
),
|
|
migrations.AddField(
|
|
model_name='instance',
|
|
name='cpu',
|
|
field=models.IntegerField(default=0, editable=False)
|
|
),
|
|
migrations.AddField(
|
|
model_name='instance',
|
|
name='memory',
|
|
field=models.BigIntegerField(default=0, editable=False)
|
|
),
|
|
migrations.AddField(
|
|
model_name='instance',
|
|
name='cpu_capacity',
|
|
field=models.IntegerField(default=0, editable=False)
|
|
),
|
|
migrations.AddField(
|
|
model_name='instance',
|
|
name='mem_capacity',
|
|
field=models.IntegerField(default=0, editable=False)
|
|
),
|
|
migrations.AddField(
|
|
model_name='instance',
|
|
name='enabled',
|
|
field=models.BooleanField(default=True)
|
|
)
|
|
]
|