Freeze Break Request (Retroactive): Adding new staging database host for testing in qa

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I completely forgot that we were in Alpha freeze earlier today and made
some changes without requesting a freeze break. The changes shouldn't
impact production in any meaningful way but I can back all the changes
out if need be.

In summary, I did the following:
 - created new dns entries for db-qa-stg01.qa
 - added a new db-qa-stg01.qa host to inventory
 - changed the postgres_server role to support dnf for f22+
 - added the new db-qa-stg01.qa host to the postgres-server playbook

I've attached a diff to this email for review.

Tim

diff --git a/inventory/host_vars/db-qa-stg01.qa.fedoraproject.org b/inventory/host_vars/db-qa-stg01.qa.fedoraproject.org
new file mode 100644
index 0000000..3b82df2
--- /dev/null
+++ b/inventory/host_vars/db-qa-stg01.qa.fedoraproject.org
@@ -0,0 +1,75 @@
+---
+############################################################
+# general
+############################################################
+
+datacenter: phx2
+fas_client_groups: sysadmin-qa,sysadmin-noc,sysadmin-veteran
+
+
+############################################################
+# networking
+############################################################
+
+nm: 255.255.255.0
+gw: 10.5.124.254
+dns: 10.5.126.21
+eth0_ip: 10.5.124.145
+eth0_nm: 255.255.255.128
+
+
+############################################################
+# install
+############################################################
+
+ks_url: http://10.5.126.23/repo/rhel/ks/kvm-fedora-24
+ks_repo: http://10.5.126.23/pub/fedora/linux/releases/24/Server/x86_64/os/
+volgroup: /dev/vg_guests
+sudoers: "{{ private }}/files/sudo/qavirt-sudoers"
+vmhost: virthost-comm04.qa.fedoraproject.org
+
+
+############################################################
+# virtual machine
+############################################################
+
+# These are normally group variables, but in this case db servers are often different
+lvm_size: 300000
+mem_size: 8192
+num_cpus: 2
+tcp_ports: [ 5432, 443 ]
+
+
+############################################################
+# database details
+############################################################
+
+# This is a generic list, monitored by collectd
+databases:
+- postgres
+- resultsdb
+
+# This is a more strict list, to be made publicly available
+dbs_to_backup:
+- postgres
+#- buildmaster
+#- buildmaster_dev
+#- buildmaster_stg
+#- execdb
+#- execdb_stg
+#- execdb_dev
+## these names are also stored as host vars 'openqa_dbname',
+## make sure to keep in sync
+#- openqa
+#- openqa-stg
+#- resultsdb
+#- resultsdb_stg
+#- resultsdb_dev
+
+
+# kernel SHMMAX value
+kernel_shmmax: 68719476736
+
+host_backup_targets: ['/backups']
+shared_buffers: "2GB"
+effective_cache_size: "6GB"
diff --git a/inventory/inventory b/inventory/inventory
index f520a28..25430a3 100644
--- a/inventory/inventory
+++ b/inventory/inventory
@@ -273,6 +273,7 @@ db-s390-koji01.qa.fedoraproject.org
 db-arm-koji01.qa.fedoraproject.org
 db-ppc-koji01.ppc.fedoraproject.org
 db-qa01.qa.fedoraproject.org
+db-qastg01.qa.fedoraproject.org
 
 [dbserver-stg]
 db-fas01.stg.phx2.fedoraproject.org
@@ -681,6 +682,7 @@ kojipkgs01.phx2.fedoraproject.org
 ns03.phx2.fedoraproject.org
 ns04.phx2.fedoraproject.org
 db-qa01.qa.fedoraproject.org
+db-qa-stg01.qa.fedoraproject.org
 proxy01.phx2.fedoraproject.org
 proxy10.phx2.fedoraproject.org
 openqa-stg01.qa.fedoraproject.org
diff --git a/playbooks/groups/postgresql-server.yml b/playbooks/groups/postgresql-server.yml
index 6cb74fe..49ed976 100644
--- a/playbooks/groups/postgresql-server.yml
+++ b/playbooks/groups/postgresql-server.yml
@@ -2,12 +2,12 @@
 # NOTE: should be used with --limit most of the time
 # NOTE: most of these vars_path come from group_vars/backup_server or from hostvars
 
-- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=db-datanommer02.phx2.fedoraproject.org:db-qa01.qa.fedoraproject.org:db-koji01.phx2.fedoraproject.org:db-fas01.stg.phx2.fedoraproject.org:db-fas01.phx2.fedoraproject.org:db01.phx2.fedoraproject.org:db01.stg.phx2.fedoraproject.org:db-s390-koji01.qa.fedoraproject.org:db-arm-koji01.qa.fedoraproject.org:db-ppc-koji01.ppc.fedoraproject.org"
+- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=db-datanommer02.phx2.fedoraproject.org:db-qa01.qa.fedoraproject.org:db-koji01.phx2.fedoraproject.org:db-fas01.stg.phx2.fedoraproject.org:db-fas01.phx2.fedoraproject.org:db01.phx2.fedoraproject.org:db01.stg.phx2.fedoraproject.org:db-s390-koji01.qa.fedoraproject.org:db-arm-koji01.qa.fedoraproject.org:db-ppc-koji01.ppc.fedoraproject.org:db-qa-stg01.qa.fedoraproject.org"
 
 # Once the instance exists, configure it.
 
 - name: configure postgresql server system
-  hosts: db-datanommer02.phx2.fedoraproject.org:db-qa01.qa.fedoraproject.org:db-koji01.phx2.fedoraproject.org:db-fas01.stg.phx2.fedoraproject.org:db-fas01.phx2.fedoraproject.org:db01.phx2.fedoraproject.org:db01.stg.phx2.fedoraproject.org:db-s390-koji01.qa.fedoraproject.org:db-arm-koji01.qa.fedoraproject.org:db-ppc-koji01.ppc.fedoraproject.org
+  hosts: db-datanommer02.phx2.fedoraproject.org:db-qa01.qa.fedoraproject.org:db-koji01.phx2.fedoraproject.org:db-fas01.stg.phx2.fedoraproject.org:db-fas01.phx2.fedoraproject.org:db01.phx2.fedoraproject.org:db01.stg.phx2.fedoraproject.org:db-s390-koji01.qa.fedoraproject.org:db-arm-koji01.qa.fedoraproject.org:db-ppc-koji01.ppc.fedoraproject.org:db-qa-stg01.qa.fedoraproject.org
   user: root
   gather_facts: True
 
diff --git a/roles/postgresql_server/tasks/main.yml b/roles/postgresql_server/tasks/main.yml
index 41b8fc0..c24b18a 100644
--- a/roles/postgresql_server/tasks/main.yml
+++ b/roles/postgresql_server/tasks/main.yml
@@ -2,13 +2,26 @@
 #
 # Setup postgresql server.
 #
-- name: install postgresql server packages
+- name: install postgresql server packages (yum)
   yum: name={{ item }}  state=present
   with_items:
   - postgresql-server
   - postgresql-contrib
   - postgresql-plpython
   - python-psycopg2
+  when: ansible_distribution_major_version|int < 22
+  tags:
+  - packages
+  - postgresql
+
+- name: install postgresql server packages (dnf)
+  dnf: name={{ item }}  state=present
+  with_items:
+  - postgresql-server
+  - postgresql-contrib
+  - postgresql-plpython
+  - python-psycopg2
+  when: ansible_distribution_major_version|int > 21 and ansible_cmdline.ostree is not defined
   tags:
   - packages
   - postgresql

Attachment: pgpx5A4Yi2pxf.pgp
Description: OpenPGP digital signature

_______________________________________________
infrastructure mailing list
infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
https://lists.fedoraproject.org/admin/lists/infrastructure@xxxxxxxxxxxxxxxxxxxxxxx

[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux