Portal:Data Services/Admin/Wiki Replica DNS

From Wikitech
Jump to navigation Jump to search

The Wiki Replica servers use service names managed by the Cloud VPS Designate API to expose databases to Cloud Services users. The /usr/local/sbin/wmcs-wikireplica-dns script is used to create and update these service names. These operations are performed from the currently active cloudcontrol server (typically cloudcontrol1007.wikimedia.org).

Changing the backend server for a shard

The /etc/wikireplica_dns.yaml config file tells wmcs-wikireplica-dns which IPs to map to which service names. This file is managed by Puppet using the source file found at modules/openstack/files/util/wikireplica_dns.yaml. Management is done at the granularity of a shard.

To change the backend server for one or more shards, edit the yaml config file and then run:

$ ssh cloudcontrol1007.wikimedia.org
$ source <(sudo cat ~root/novaenv.sh)
$ wmcs-wikireplica-dns

Calling the script with no arguments will simply refresh/create all the records from the config file.

Adding a new wikidb alias

Aliases for each wikidb in each zone are made based on the wikidb mappings found in the s[1-8].dblist files managed in operations/mediawiki-config.git. The current values are read from https://noc.wikimedia.org/conf/ at runtime.

When a new wikidb is added or moved between shards, update the related <wikidb>.{analytics,web}.db.svc.eqiad.wmflabs CNAME records. Limiting the run to a single shard will be significantly faster unless the shard is s3 which has most of the aliases.

$ ssh cloudcontrol1007.wikimedia.org
$ source <(sudo cat ~root/novaenv.sh)
$ wmcs-wikireplica-dns --aliases [--shard <sN>]

See also