copr: dynamically specify builder volume size
See https://github.com/fedora-copr/copr/issues/3268
This commit is contained in:
parent
ffcc5d8195
commit
612e4276f4
7 changed files with 20 additions and 4 deletions
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
tags_to_mock_snippet:
|
||||
# requested in https://github.com/fedora-copr/copr/issues/3268
|
||||
- tagset:
|
||||
- on_demand_powerful
|
||||
snippet: config_opts['plugin_conf']['tmpfs_opts']['max_fs_size'] = '280g'
|
|
@ -16,6 +16,9 @@ config_opts["root"] = "copr-custom-" + config_opts["root"]
|
|||
# /bin/mock calls (when tmpfs_enable is on).
|
||||
config_opts['plugin_conf']['tmpfs_opts']['keep_mounted'] = True
|
||||
|
||||
# Custom mock snippets configured in copr-crpmbuild config file - can be empty
|
||||
{{ mock_snippet }}
|
||||
|
||||
{%- for key, value in macros.items() %}
|
||||
config_opts['macros']['{{ key }}'] = '{{ value }}'
|
||||
{%- endfor %}
|
||||
|
|
|
@ -4,6 +4,9 @@ config_opts.setdefault('plugin_conf', {})
|
|||
config_opts['plugin_conf'].setdefault('tmpfs_opts', {})
|
||||
config_opts['plugin_conf']['tmpfs_opts']['keep_mounted'] = True
|
||||
|
||||
# Custom mock snippets configured in copr-crpmbuild config file - can be empty
|
||||
{{ mock_snippet }}
|
||||
|
||||
{% if buildroot_pkgs %}
|
||||
config_opts['chroot_additional_packages'] = '{{ buildroot_pkgs| join(" ") }}'
|
||||
{% endif %}
|
||||
|
|
|
@ -329,6 +329,8 @@
|
|||
loop:
|
||||
- mock-custom-build.cfg.j2
|
||||
- mock.cfg.j2
|
||||
# this one is not hotfix though...
|
||||
- copr-rpmbuild.yml
|
||||
|
||||
- name: Check that we have successfully finished the subscription
|
||||
async_status:
|
||||
|
|
|
@ -24,7 +24,6 @@ cmd=(
|
|||
--tag CoprPurpose=builder
|
||||
--tag CoprInstance={% if devel %}devel{% else %}production{% endif %}
|
||||
--tag arch={{ item }}
|
||||
--additional-volume-size 160
|
||||
--playbook /var/lib/resallocserver/provision/builderpb-aws.yml
|
||||
)
|
||||
|
||||
|
|
|
@ -17,9 +17,11 @@ case $RESALLOC_NAME in
|
|||
case $RESALLOC_NAME in
|
||||
*_hp_*)
|
||||
instance_type=bz2-16x64
|
||||
additional_volume_size=320
|
||||
;;
|
||||
*)
|
||||
instance_type=mz2-2x16
|
||||
additional_volume_size=160
|
||||
;;
|
||||
esac
|
||||
image_uuid="{{ copr_builder_images.ibm_cloud.s390x.us_east }}"
|
||||
|
@ -43,6 +45,7 @@ if [ "$1" == "create" ]; then
|
|||
--ssh-key-id "$ssh_key_id"
|
||||
--instance-type "$instance_type"
|
||||
--subnets-ids $subnets_ids
|
||||
--additional-volume-size "$additional_volume_size"
|
||||
--
|
||||
)
|
||||
fi
|
||||
|
|
|
@ -58,11 +58,11 @@ aws_{{ arch }}_{{ on_demand + '_' if on_demand is not none else '' }}{% if spot
|
|||
{% endif %}
|
||||
|
||||
{% if spot and on_demand == 'powerful' %}
|
||||
cmd_new: copr-resalloc-aws-new-{{ arch }} --instance-type {{ itype }} --root-volume-size 18
|
||||
cmd_new: copr-resalloc-aws-new-{{ arch }} --instance-type {{ itype }} --additional-volume-size 320 --root-volume-size 18
|
||||
{% elif spot %}
|
||||
cmd_new: copr-resalloc-aws-new-{{ arch }} --instance-type {{ itype }} --spot-price 0.156
|
||||
cmd_new: copr-resalloc-aws-new-{{ arch }} --instance-type {{ itype }} --additional-volume-size 160 --spot-price 0.156
|
||||
{% else %}
|
||||
cmd_new: copr-resalloc-aws-new-{{ arch }} --instance-type {{ itype }}
|
||||
cmd_new: copr-resalloc-aws-new-{{ arch }} --instance-type {{ itype }} --additional-volume-size 160
|
||||
{% endif %}
|
||||
cmd_delete: "/var/lib/resallocserver/resalloc_provision/vm-delete"
|
||||
cmd_livecheck: "resalloc-check-vm-ip"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue