diff --git a/inventory/group_vars/copr b/inventory/group_vars/copr index a9c83aa697..07bc64a526 100644 --- a/inventory/group_vars/copr +++ b/inventory/group_vars/copr @@ -7,3 +7,4 @@ copr_backend_ips: "172.16.5.5 209.132.184.142" keygen_host: "172.16.5.25" resolvconf: "resolv.conf/cloud" +backend_base_url=https://copr-be.cloud.fedoraproject.org diff --git a/inventory/group_vars/copr-back b/inventory/group_vars/copr-back index 6bfaaa20b9..d824a06433 100644 --- a/inventory/group_vars/copr-back +++ b/inventory/group_vars/copr-back @@ -1,17 +1,19 @@ --- _lighttpd_conf_src: "lighttpd/lighttpd.conf" -_copr_be_conf: "copr-be.conf" copr_nova_auth_url: "https://fed-cloud09.cloud.fedoraproject.org:5000/v2.0" copr_nova_tenant_id: "undefined_tenant_id" -copr_nova_tenant_name: "coprv" -copr_nova_username: "msuchy" +copr_nova_tenant_name: "copr" +copr_nova_username: "copr" copr_builder_image_name: "builder_base_image_2015_04_01" copr_builder_flavor_name: "m1.builder" copr_builder_network_name: "copr-net" + +fedmsg_enabled: "true" + do_sign: "true" spawn_in_advance: "true" -frontend_base_url: "http://copr-fe.cloud.fedoraproject.org" +frontend_base_url: "https://copr-fe.cloud.fedoraproject.org" diff --git a/inventory/group_vars/copr-back-stg b/inventory/group_vars/copr-back-stg index 195bb959b9..cd8e5f5dde 100644 --- a/inventory/group_vars/copr-back-stg +++ b/inventory/group_vars/copr-back-stg @@ -1,17 +1,17 @@ --- _lighttpd_conf_src: "lighttpd/lighttpd_dev.conf" -_copr_be_conf: "copr-be.conf-dev" copr_nova_auth_url: "https://fed-cloud09.cloud.fedoraproject.org:5000/v2.0" copr_nova_tenant_id: "566a072fb1694950998ad191fee3833b" copr_nova_tenant_name: "coprdev" -copr_nova_username: "msuchy" +copr_nova_username: "copr" copr_builder_image_name: "builder_base_image_2015_04_01" copr_builder_flavor_name: "m1.small" # copr_builder_network_name: "coprdev-net" # uncomment after cloud09 redeploy copr_builder_network_name: "copr-net" +fedmsg_enabled: "false" do_sign: "false" diff --git a/inventory/group_vars/copr-stg b/inventory/group_vars/copr-stg index 002e678bcd..45a331a0f3 100644 --- a/inventory/group_vars/copr-stg +++ b/inventory/group_vars/copr-stg @@ -7,3 +7,5 @@ _forward_src: "forward_dev" copr_backend_ips: "172.16.5.24 209.132.184.179" keygen_host: "172.16.1.6" resolvconf: "resolv.conf/cloud" + +backend_base_url=http://copr-be-dev.cloud.fedoraproject.org diff --git a/roles/copr/backend/tasks/main.yml b/roles/copr/backend/tasks/main.yml index 3b4d0d31fa..76feeaa400 100644 --- a/roles/copr/backend/tasks/main.yml +++ b/roles/copr/backend/tasks/main.yml @@ -127,7 +127,7 @@ when: devel - name: copy copr-be.conf - template: src="{{ _copr_be_conf }}" dest=/etc/copr/copr-be.conf owner=root group=copr mode=640 + template: src="copr-be.conf.j2" dest=/etc/copr/copr-be.conf owner=root group=copr mode=640 notify: - restart copr-backend tags: diff --git a/roles/copr/backend/templates/copr-be.conf.j2 b/roles/copr/backend/templates/copr-be.conf.j2 new file mode 100644 index 0000000000..ab8fa7b57d --- /dev/null +++ b/roles/copr/backend/templates/copr-be.conf.j2 @@ -0,0 +1,75 @@ +[backend] + +# URL where are results visible +results_baseurl={{ backend_base_url }}/results + +# Base frontend url +frontend_base_url={{ frontend_base_url }} +# Url for backend communication endpoint (will be eliminated at some point) +frontend_url={{ frontend_base_url }}/backend + +# must have same value as BACKEND_PASSWORD from have frontend in /etc/copr/copr.conf +# default is PASSWORDHERE but you really should change it. really. +frontend_auth={{ copr_backend_password }} + +group0_name=PC +group0_archs=i386,x86_64 + +# path to ansible playbook which spawns builder +# see /usr/share/copr*/playbooks/ for examples +# default is /etc/copr/builder_playbook.yml +group0_spawn_playbook=/home/copr/provision/builderpb_nova.yml +# path to ansible playbook which terminate builder +# default is /etc/copr/terminate_playbook.yml +group0_terminate_playbook=/home/copr/provision/terminatepb.yml +group0_max_workers=4 + + +# directory where jobs are stored +# no defaults +jobsdir=/var/lib/copr/jobs + +# directory where results are stored +# should be accessible from web using 'results_baseurl' URL +# no default +destdir=/var/lib/copr/public_html/results + +# default is 10 +sleeptime=30 + + +# path to log file +# default is /var/log/copr/backend.log +logfile=/var/log/copr/backend.log + +# default is /var/log/copr/workers/ +worker_logdir=/var/log/copr/workers/ + +# exit on worker failure +# default is false +#exit_on_worker=false + +# publish fedmsg notifications from workers if true +# default is false +fedmsg_enabled={{ fedmsg_enabled }} + +# enable package signing, require configured +# signer host and correct /etc/sign.conf +do_sign={{ do_sign }} + +# host or ip of machine with copr-keygen +# usually the same as in /etc/sign.conf +keygen_host={{ keygen_host }} + +# minimum age for builds to be pruned +prune_days=14 + +# Spawn builder in advance, before we get task? +# It save time, but consume resources even when +# nothing is in queue + +spawn_in_advance={{ spawn_in_advance }} + +[builder] +# default is 1800 +timeout=21600 diff --git a/roles/copr/backend/templates/provision/nova_cloud_vars.yml b/roles/copr/backend/templates/provision/nova_cloud_vars.yml index c1bb2dda9e..e6bfc16858 100644 --- a/roles/copr/backend/templates/provision/nova_cloud_vars.yml +++ b/roles/copr/backend/templates/provision/nova_cloud_vars.yml @@ -5,5 +5,5 @@ OS_TENANT_ID: "{{ copr_builders_os_tenant_id }}" OS_TENANT_NAME: "{{ copr_builders_os_tenant_name }}" OS_USERNAME: "{{ copr_builders_os_username }}" -OS_PASSWORD: "{{ copr_nova_password }}" +OS_PASSWORD: "{{ copr_password }}"