-# BMF / BMAS
-
-## bin/manage_records.rb
-
-Das script setzt anhand von yaml dateien cnames auf vorhandene a records
-
-yaml format:
-
- ---
- ein_a_record:
- - ein_cname
- - zwei_cnames
-
- zweiter_a_records:
- - drei_cnames
-
-Die bisherig config liegt hier im projekt in etc/dns/\*.yaml
-
-Ausführung:
-
- # einmalig zum installieren der abhängkieten
- bundle install --path vendor/gems
-
- # bei jeder änderung der yaml files dann auszuführen
- bundle exec ruby bin/manage_records.rb etc/dns/test_bmas.yaml
+++ /dev/null
-#!/usr/bin/env ruby
-
-require 'yaml'
-require 'resolv'
-require 'net/ssh'
-require 'pp'
-
-################################################################################
-
-action = 'add-record'
-data = YAML.load_file(ARGV[0])
-debug = true
-pdns_cmds = []
-record_type = "CNAME"
-ssh_output = []
-ttl = "3600"
-user = 'robert.waffen'
-zone = "pixelpark.net"
-@dnsmaster = "dnsmaster.pp-dns.com"
-
-################################################################################
-
-def check_rr_set(rrset)
- Resolv::DNS.open({:nameserver=>[@dnsmaster]}) do |r|
- r.getaddresses(rrset)
- end
-end
-
-data.map do |key, value|
- puts "canme target: #{key}" if debug
-
- value.each do |cname|
- puts "cname is #{cname}.#{zone}" if debug
- test_record = check_rr_set "#{cname}.#{zone}"
- pp test_record if debug
-
- if test_record.empty?
- pdns_cmds << "pdnsutil #{action} #{zone} #{cname} #{record_type} #{ttl} #{key}.#{zone}."
- end
- end
-end
-
-unless pdns_cmds.empty?
- pdns_cmds << "pdnsutil increase-serial #{zone}"
- pdns_cmds << "pdns_control notify #{zone}"
-end
-
-puts pdns_cmds if debug
-
-Net::SSH.start(@dnsmaster, user) do |ssh|
- pdns_cmds.each do |command|
- ssh_output << ssh.exec!("sudo #{command}")
- end
-end
-
-puts ssh_output
+++ /dev/null
----
-dev-bmas10:
- - dev-standardlsg-preview-bmas10
- - dev-standardlsg-editor-bmas10
- - dev-standardlsg-www-bmas10
- - dev-bmas-preview-bmas10
- - dev-bmas-editor-bmas10
- - dev-bmas-www-bmas10
- - dev-repository-preview-bmas10
- - dev-editor-preview-bmas10
- - dev-service-preview-bmas10
- - dev-solr-preview-bmas10
- - dev-delivery-preview-bmas10
- - dev-workflow-preview-bmas10
- - dev-newsletter-preview-bmas10
- - dev-repository-master-bmas10
- - dev-service-master-bmas10
- - dev-solr-master-bmas10
- - dev-delivery1-master-bmas10
- - dev-delivery2-master-bmas10
- - dev-repository-replication-bmas10
- - dev-solr-replication-bmas10
- - dev-delivery1-replication-bmas10
- - dev-delivery2-replication-bmas10
- - dev-adminportal-database-bmas10
- - dev-site-database-bmas10
- - dev-preview-database-bmas10
- - dev-master-database-bmas10
- - dev-replication-database-bmas10
- - dev-maildistributor-database-bmas10
- - dev-workflow-database-bmas10
- - dev-adminportal-service-bmas10
- - dev-serviceportal-service-bmas10
- - dev-maildistributor-service-bmas10
- - dev-cas-preview-service-bmas10
- - dev-cas-live-service-bmas10
- - dev-ldap-preview-service-bmas10
- - dev-ldap-live-service-bmas10
- - dev-mail-extern-bmas10
- - dev-esf-preview-bmas10
- - dev-esf-editor-bmas10
- - dev-esf-www-bmas10
- - dev-inqa-preview-bmas10
- - dev-inqa-editor-bmas10
- - dev-inqa-www-bmas10
- - dev-bmas2020-preview-bmas10
- - dev-bmas2020-editor-bmas10
- - dev-bmas2020-www-bmas10
+++ /dev/null
----
-dev-bmf10:
- - dev-standardlsg-preview-bmf10
- - dev-standardlsg-editor-bmf10
- - dev-standardlsg-www-bmf10
- - dev-bmf-preview-bmf10
- - dev-bmf-editor-bmf10
- - dev-bmf-www-bmf10
- - dev-amthb-preview-bmf10
- - dev-amthb-editor-bmf10
- - dev-amthb-www-bmf10
- - dev-lsth-preview-bmf10
- - dev-lsth-www-bmf10
- - dev-esth-preview-bmf10
- - dev-esth-www-bmf10
- - dev-ksth-preview-bmf10
- - dev-ksth-www-bmf10
- - dev-gewsth-preview-bmf10
- - dev-gewsth-www-bmf10
- - dev-repository-preview-bmf10
- - dev-editor-preview-bmf10
- - dev-service-preview-bmf10
- - dev-solr-preview-bmf10
- - dev-delivery-preview-bmf10
- - dev-workflow-preview-bmf10
- - dev-newsletter-preview-bmf10
- - dev-repository-master-bmf10
- - dev-service-master-bmf10
- - dev-solr-master-bmf10
- - dev-delivery1-master-bmf10
- - dev-delivery2-master-bmf10
- - dev-repository-replication-bmf10
- - dev-solr-replication-bmf10
- - dev-delivery1-replication-bmf10
- - dev-delivery2-replication-bmf10
- - dev-adminportal-database-bmf10
- - dev-site-database-bmf10
- - dev-preview-database-bmf10
- - dev-master-database-bmf10
- - dev-replication-database-bmf10
- - dev-maildistributor-database-bmf10
- - dev-workflow-database-bmf10
- - dev-adminportal-service-bmf10
- - dev-serviceportal-service-bmf10
- - dev-maildistributor-service-bmf10
- - dev-cas-preview-service-bmf10
- - dev-cas-live-service-bmf10
- - dev-ldap-preview-service-bmf10
- - dev-ldap-live-service-bmf10
- - dev-mail-extern-bmf10
- - dev-usth-preview-bmf10
- - dev-usth-www-bmf10
- - dev-ao-preview-bmf10
- - dev-ao-www-bmf10
+++ /dev/null
----
-www:
- - robert
- - waffen
+++ /dev/null
----
-master01-bmas10-de:
- - master-database-bmas10
- - repository-master-bmas10
- - service-master-bmas10
- - site-database-bmas10
- - solr-master-bmas10
-
-red-bmas10-de:
- - adminportal-database-bmas10
- - adminportal-service-bmas10
- - amthb-editor-bmas10
- - amthb-preview-bmas10
- - bmas-editor-bmas10
- - bmas-preview-bmas10
- - cas-live-service-bmas10
- - cas-preview-service-bmas10
- - delivery-preview-bmas10
- - editor-preview-bmas10
- - maildistributor-database-bmas10
- - maildistributor-service-bmas10
- - newsletter-preview-bmas10
- - preview-database-bmas10
- - repository-preview-bmas10
- - service-preview-bmas10
- - serviceportal-service-bmas10
- - solr-preview-bmas10
- - workflow-database-bmas10
- - workflow-preview-bmas10
- - ldap-preview-service-bmas10
- - ldap-live-service-bmas10
- - esf-preview-bmas10
- - esf-editor-bmas10
- - inqa-preview-bmas10
- - inqa-editor-bmas10
- - bmas2020-preview-bmas10
- - bmas2020-editor-bmas10
-
-slave01-bmas10-de:
- - replication-database-bmas10
- - repository-replication-bmas10
-
-www01-bmas10-de:
- - bmas-www01-bmas10
- - delivery1-master-bmas10
- - esf-www01-bmas10
- - inqa-www01-bmas10
- - bmas2020-www01-bmas10
-
-www02-bmas10-de:
- - bmas-www02-bmas10
- - delivery2-master-bmas10
- - esf-www02-bmas10
- - inqa-www02-bmas10
- - bmas2020-www02-bmas10
-
-www03-bmas10-de:
- - bmas-www03-bmas10
- - delivery1-replication-bmas10
- - esf-www03-bmas10
- - inqa-www03-bmas10
- - bmas2020-www03-bmas10
-
-www04-bmas10-de:
- - bmas-www04-bmas10
- - delivery2-replication-bmas10
- - esf-www04-bmas10
- - inqa-www04-bmas10
- - bmas2020-www04-bmas10
-
-bmas-www-bmas10:
- # - inqa-www-bmas10
- - bmas2020-www-bmas10
+++ /dev/null
----
-master01-bmf10-de:
- - master-database-bmf10
- - repository-master-bmf10
- - service-master-bmf10
- - site-database-bmf10
- - solr-master-bmf10
-
-red-bmf10-de:
- - adminportal-database-bmf10
- - adminportal-service-bmf10
- - amthb-editor-bmf10
- - amthb-preview-bmf10
- - ao-preview-bmf10
- - bmf-editor-bmf10
- - bmf-preview-bmf10
- - cas-live-service-bmf10
- - cas-preview-service-bmf10
- - delivery-preview-bmf10
- - editor-preview-bmf10
- - esth-preview-bmf10
- - gewsth-preview-bmf10
- - ksth-preview-bmf10
- - lsth-preview-bmf10
- - maildistributor-database-bmf10
- - maildistributor-service-bmf10
- - newsletter-preview-bmf10
- - preview-database-bmf10
- - repository-preview-bmf10
- - service-preview-bmf10
- - serviceportal-service-bmf10
- - solr-preview-bmf10
- - usth-preview-bmf10
- - workflow-database-bmf10
- - workflow-preview-bmf10
-
-slave01-bmf10-de:
- - replication-database-bmf10
- - repository-replication-bmf10
-
-www01-bmf10-de:
- - amthb-www01-bmf10
- - ao-www01-bmf10
- - bmf-www01-bmf10
- - delivery1-master-bmf10
- - esth-www01-bmf10
- - gewsth-www01-bmf10
- - ksth-www01-bmf10
- - lsth-www01-bmf10
- - usth-www01-bmf10
-
-www02-bmf10-de:
- - amthb-www02-bmf10
- - ao-www02-bmf10
- - bmf-www02-bmf10
- - delivery2-master-bmf10
- - esth-www02-bmf10
- - gewsth-www02-bmf10
- - ksth-www02-bmf10
- - lsth-www02-bmf10
- - usth-www02-bmf10
-
-www03-bmf10-de:
- - amthb-www03-bmf10
- - ao-www03-bmf10
- - bmf-www03-bmf10
- - delivery1-replication-bmf10
- - esth-www03-bmf10
- - gewsth-www03-bmf10
- - ksth-www03-bmf10
- - lsth-www03-bmf10
- - usth-www03-bmf10
-
-www04-bmf10-de:
- - amthb-www04-bmf10
- - ao-www04-bmf10
- - bmf-www04-bmf10
- - delivery2-replication-bmf10
- - esth-www04-bmf10
- - gewsth-www04-bmf10
- - ksth-www04-bmf10
- - lsth-www04-bmf10
- - usth-www04-bmf10
-
-bmf-www-bmf10:
- - amthb-www-bmf10
- - ao-www-bmf10
- - esth-www-bmf10
- - gewsth-www-bmf10
- - ksth-www-bmf10
- - lsth-www-bmf10
- - usth-www-bmf10
+++ /dev/null
----
-test-master01-bmas10-de:
- - test-master-database-bmas10
- - test-site-database-bmas10
- - test-repository-master-bmas10
- - test-service-master-bmas10
- - test-solr-master-bmas10
-
-test-red-bmas10-de:
- - test-preview-database-bmas10
- - test-adminportal-database-bmas10
- - test-maildistributor-database-bmas10
- - test-workflow-database-bmas10
- - test-adminportal-service-bmas10
- - test-cas-preview-service-bmas10
- - test-cas-live-service-bmas10
- - test-service-preview-bmas10
- - test-solr-preview-bmas10
- - test-maildistributor-service-bmas10
- - test-editor-preview-bmas10
- - test-workflow-preview-bmas10
- - test-repository-preview-bmas10
- - test-delivery-preview-bmas10
- - test-newsletter-preview-bmas10
- - test-serviceportal-service-bmas10
- - test-bmas-preview-bmas10
- - test-bmas-editor-bmas10
- - test-ldap-preview-service-bmas10
- - test-ldap-live-service-bmas10
- - test-esf-preview-bmas10
- - test-esf-editor-bmas10
- - test-inqa-preview-bmas10
- - test-inqa-editor-bmas10
- - test-bmas2020-preview-bmas10
- - test-bmas2020-editor-bmas10
-
-test-slave01-bmas10-de:
- - test-replication-database-bmas10
- - test-repository-replication-bmas10
-
-test-www01-bmas10-de:
- - test-delivery1-master-bmas10
- - test-bmas-www01-bmas10
- - test-bmas-www01-bmas10
- - test-esf-www01-bmas10
- - test-inqa-www01-bmas10
- - test-bmas2020-www01-bmas10
-
-test-www02-bmas10-de:
- - test-delivery1-replication-bmas10
- - test-bmas-www02-bmas10
- - test-bmas-www02-bmas10
- - test-esf-www02-bmas10
- - test-inqa-www02-bmas10
- - test-bmas2020-www02-bmas10
-
-test-bmas-www-bmas10:
- - test-inqa-www-bmas10
- - test-bmas2020-www-bmas10
+++ /dev/null
----
-test-master01-bmf10-de:
- - test-master-database-bmf10
- - test-site-database-bmf10
- - test-repository-master-bmf10
- - test-service-master-bmf10
- - test-solr-master-bmf10
-
-test-red-bmf10-de:
- - test-preview-database-bmf10
- - test-adminportal-database-bmf10
- - test-maildistributor-database-bmf10
- - test-workflow-database-bmf10
- - test-adminportal-service-bmf10
- - test-cas-preview-service-bmf10
- - test-cas-live-service-bmf10
- - test-service-preview-bmf10
- - test-solr-preview-bmf10
- - test-maildistributor-service-bmf10
- - test-editor-preview-bmf10
- - test-workflow-preview-bmf10
- - test-repository-preview-bmf10
- - test-delivery-preview-bmf10
- - test-newsletter-preview-bmf10
- - test-serviceportal-service-bmf10
- - test-bmf-preview-bmf10
- - test-bmf-editor-bmf10
- - test-ldap-preview-service-bmf10
- - test-ldap-live-service-bmf10
-
-# customer
- - test-bmf-preview-bmf10
- - test-lsth-preview-bmf10
- - test-amthb-preview-bmf10
- - test-esth-preview-bmf10
- - test-ksth-preview-bmf10
- - test-gewsth-preview-bmf10
- - test-usth-preview-bmf10
- - test-ao-preview-bmf10
- - test-bmf-editor-bmf10
- - test-amthb-editor-bmf10
-
-test-slave01-bmf10-de:
- - test-replication-database-bmf10
- - test-repository-replication-bmf10
-
-test-www01-bmf10-de:
- - test-delivery1-master-bmf10
- - test-bmf-www01-bmf10
- - test-bmf-www01-bmf10
- - test-amthb-www01-bmf10
- - test-lsth-www01-bmf10
- - test-esth-www01-bmf10
- - test-ksth-www01-bmf10
- - test-gewsth-www01-bmf10
- - test-usth-www01-bmf10
- - test-ao-www01-bmf10
-
-test-www02-bmf10-de:
- - test-delivery1-replication-bmf10
- - test-bmf-www02-bmf10
- - test-bmf-www02-bmf10
- - test-amthb-www02-bmf10
- - test-lsth-www02-bmf10
- - test-esth-www02-bmf10
- - test-ksth-www02-bmf10
- - test-gewsth-www02-bmf10
- - test-usth-www02-bmf10
- - test-ao-www02-bmf10
-
-test-bmf-www-bmf10:
- - test-amthb-www-bmf10
- - test-ao-www-bmf10
- - test-esth-www-bmf10
- - test-gewsth-www-bmf10
- - test-ksth-www-bmf10
- - test-lsth-www-bmf10
- - test-usth-www-bmf10