reorg the stg builders, adjust koji db sync for BDR
This commit is contained in:
parent
b668cdafa5
commit
bdaaa1c889
4 changed files with 116 additions and 4 deletions
|
@ -39,8 +39,14 @@ buildvm-02.stg.phx2.fedoraproject.org
|
|||
buildvm-03.stg.phx2.fedoraproject.org
|
||||
buildvm-04.stg.phx2.fedoraproject.org
|
||||
buildvm-05.stg.phx2.fedoraproject.org
|
||||
|
||||
[buildvm-ppc64-stg]
|
||||
buildvm-ppc64-01.stg.ppc.fedoraproject.org
|
||||
|
||||
[buildvm-ppc64le-stg]
|
||||
buildvm-ppc64le-01.stg.ppc.fedoraproject.org
|
||||
|
||||
[buildvm-aarch64-stg]
|
||||
buildvm-aarch64-01.stg.arm.fedoraproject.org
|
||||
# buildvm-armv7-01.stg.arm.fedoraproject.org
|
||||
|
||||
|
@ -368,3 +374,6 @@ buildvm-s390
|
|||
[builders-stg:children]
|
||||
buildarm-stg
|
||||
buildvm-stg
|
||||
buildvm-ppc64-stg
|
||||
buildvm-ppc64le-stg
|
||||
buildvm-aarch64-stg
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
# NOTE: make sure there is room/space for this builder on the buildvmhost
|
||||
# NOTE: most of these vars_path come from group_vars/buildvm or from hostvars
|
||||
|
||||
- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=buildvm:buildvm-stg:buildvm-aarch64:buildvm-ppc64:buildvm-ppc64le:buildppcle:buildppc:buildvm-s390"
|
||||
- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=buildvm:buildvm-stg:buildvm-aarch64:buildvm-ppc64:buildvm-ppc64le:buildppcle:buildppc:buildvm-s390:buildvm-ppc64-stg:buildvm-ppc64le-stg:buildvm-aarch64-stg"
|
||||
|
||||
- name: make koji builder(s)
|
||||
hosts: buildvm:buildvm-stg:buildvm-aarch64:buildvm-ppc64:buildvm-ppc64le:buildppcle:buildppc:buildvm-s390
|
||||
hosts: buildvm:buildvm-stg:buildvm-aarch64:buildvm-ppc64:buildvm-ppc64le:buildppcle:buildppc:buildvm-s390:buildvm-ppc64-stg:buildvm-ppc64le-stg:buildvm-aarch64-stg
|
||||
user: root
|
||||
gather_facts: True
|
||||
|
||||
|
|
|
@ -48,8 +48,72 @@
|
|||
group=postgres
|
||||
- command: unxz /var/tmp/koji.dump.xz
|
||||
creates=/var/tmp/koji.dump
|
||||
- command: dropdb koji
|
||||
- command: createdb -O koji koji
|
||||
- command: sed -i "s/CREATE DATABASE koji.*/SET bdr.permit_ddl_locking = true;/" /var/tmp/koji.dump
|
||||
- command: sed -i "s/connect bodhi2/connect koji\nSET bdr.permit_ddl_locking = true;/" /var/tmp/koji.dump
|
||||
- shell: >
|
||||
psql koji <<< "
|
||||
BEGIN;
|
||||
SET LOCAL bdr.permit_ddl_locking = on;
|
||||
DROP TABLE archive_components CASCADE;
|
||||
DROP TABLE archive_rpm_components CASCADE;
|
||||
DROP TABLE archiveinfo CASCADE;
|
||||
DROP TABLE archivetypes CASCADE;
|
||||
DROP TABLE btype CASCADE;
|
||||
DROP TABLE build CASCADE;
|
||||
DROP TABLE build_notifications CASCADE;
|
||||
DROP TABLE build_target CASCADE;
|
||||
DROP TABLE build_target_config CASCADE;
|
||||
DROP TABLE build_types CASCADE;
|
||||
DROP TABLE buildroot CASCADE;
|
||||
DROP TABLE buildroot_archives CASCADE;
|
||||
DROP TABLE buildroot_listing CASCADE;
|
||||
DROP TABLE buildroot_tools_info CASCADE;
|
||||
DROP TABLE cg_users CASCADE;
|
||||
DROP TABLE channels CASCADE;
|
||||
DROP TABLE content_generator CASCADE;
|
||||
DROP TABLE event_labels CASCADE;
|
||||
DROP TABLE events CASCADE;
|
||||
DROP TABLE external_repo CASCADE;
|
||||
DROP TABLE external_repo_config CASCADE;
|
||||
DROP TABLE group_config CASCADE;
|
||||
DROP TABLE group_package_listing CASCADE;
|
||||
DROP TABLE group_req_listing CASCADE;
|
||||
DROP TABLE groups CASCADE;
|
||||
DROP TABLE host CASCADE;
|
||||
DROP TABLE host_channels CASCADE;
|
||||
DROP TABLE image_archive_listing CASCADE;
|
||||
DROP TABLE image_archives CASCADE;
|
||||
DROP TABLE image_builds CASCADE;
|
||||
DROP TABLE image_listing CASCADE;
|
||||
DROP TABLE imageinfo CASCADE;
|
||||
DROP TABLE imageinfo_listing CASCADE;
|
||||
DROP TABLE log_messages CASCADE;
|
||||
DROP TABLE maven_archives CASCADE;
|
||||
DROP TABLE maven_builds CASCADE;
|
||||
DROP TABLE package CASCADE;
|
||||
DROP TABLE permissions CASCADE;
|
||||
DROP TABLE repo CASCADE;
|
||||
DROP TABLE rpminfo CASCADE;
|
||||
DROP TABLE rpmsigs CASCADE;
|
||||
DROP TABLE sessions CASCADE;
|
||||
DROP TABLE standard_buildroot CASCADE;
|
||||
DROP TABLE tag CASCADE;
|
||||
DROP TABLE tag_config CASCADE;
|
||||
DROP TABLE tag_external_repos CASCADE;
|
||||
DROP TABLE tag_extra CASCADE;
|
||||
DROP TABLE tag_inheritance CASCADE;
|
||||
DROP TABLE tag_listing CASCADE;
|
||||
DROP TABLE tag_packages CASCADE;
|
||||
DROP TABLE tag_updates CASCADE;
|
||||
DROP TABLE task CASCADE;
|
||||
DROP TABLE user_groups CASCADE;
|
||||
DROP TABLE user_perms CASCADE;
|
||||
DROP TABLE users CASCADE;
|
||||
DROP TABLE volume CASCADE;
|
||||
DROP TABLE win_archives CASCADE;
|
||||
DROP TABLE win_builds CASCADE;
|
||||
COMMIT;
|
||||
"
|
||||
- name: Import the prod db. This will take quite a while. Go get a snack!
|
||||
shell: cat /var/tmp/koji.dump | psql koji
|
||||
- name: repoint all the prod rpm entries at the secondary volume (and other stuff)
|
||||
|
|
|
@ -101,6 +101,45 @@ insert into host_channels (host_id, channel_id) values (
|
|||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
-- The aarch64 builders are aarch64 and do not have createrepo
|
||||
|
||||
{% for host in groups['buildvm-aarch64-stg'] %}
|
||||
select now() as time, 'adding staging host {{ host }}' as msg;
|
||||
insert into users (name, usertype, status) values ('{{ host }}', 1, 0);
|
||||
insert into host (user_id, name, arches) values (
|
||||
(select id from users where name='{{host}}'), '{{host}}', 'aarch64');
|
||||
{% for channel in [ 'default', 'appliance', 'vm', 'secure-boot', 'compose', 'eclipse', 'images', 'image'] %}
|
||||
insert into host_channels (host_id, channel_id) values (
|
||||
(select id from host where name='{{host}}'), (select id from channels where name='{{channel}}'));
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
-- The ppc64 builders are ppc64 and do not have createrepo
|
||||
|
||||
{% for host in groups['buildvm-ppc64-stg'] %}
|
||||
select now() as time, 'adding staging host {{ host }}' as msg;
|
||||
insert into users (name, usertype, status) values ('{{ host }}', 1, 0);
|
||||
insert into host (user_id, name, arches) values (
|
||||
(select id from users where name='{{host}}'), '{{host}}', 'ppc64');
|
||||
{% for channel in [ 'default', 'appliance', 'vm', 'secure-boot', 'compose', 'eclipse', 'images', 'image'] %}
|
||||
insert into host_channels (host_id, channel_id) values (
|
||||
(select id from host where name='{{host}}'), (select id from channels where name='{{channel}}'));
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
-- The ppc64le builders are ppc64le and do not have createrepo
|
||||
|
||||
{% for host in groups['buildvm-ppc64le-stg'] %}
|
||||
select now() as time, 'adding staging host {{ host }}' as msg;
|
||||
insert into users (name, usertype, status) values ('{{ host }}', 1, 0);
|
||||
insert into host (user_id, name, arches) values (
|
||||
(select id from users where name='{{host}}'), '{{host}}', 'ppc64le');
|
||||
{% for channel in [ 'default', 'appliance', 'vm', 'secure-boot', 'compose', 'eclipse', 'images', 'image'] %}
|
||||
insert into host_channels (host_id, channel_id) values (
|
||||
(select id from host where name='{{host}}'), (select id from channels where name='{{channel}}'));
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
-- Add some people to be admins, only in staging. Feel free to grow this list..
|
||||
|
||||
{% for username in ['modularity', 'mizdebsk', 'ralph', 'psabata', 'puiterwijk', 'jkaluza', 'fivaldi', 'mprahl'] %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue