Jump to content

deployment server

From Wikitech
deployment server
Location: codfw
Cluster: Miscellaneous codfw
Node name: deploy2002.codfw.wmnet (fingerprint)
Usage:
Miscellaneous
Status
Overall: Active
Icinga?: host status services status
Hardware
Software

The Deployment server is from where we deploy software using Scap and Scap3.

For MySQL queries or maintenance scripts, use the maintenance server instead.

Service

As of September 2024 the deployment servers are:

  • deploy1003, passive/spare
  • deploy2002, currently active primary

For fingerprints, see Help:SSH Fingerprints.

Connecting

Connect to deployment server over ssh by proxying through a bastion (e.g. bast1003.wikimedia.org). As with other hosts, ensure you have ProxyJump configured in .ssh/config (see Production shell access). Then connect as follows:

user@laptop:~$ ssh deployment.eqiad.wmnet

Note Note: The service alias deployment.eqiad.wmnet always points to the currently active deployment, even when Codfw is primary. To access a host directly, use a fully-qualified hostname like deploy0000.example.wmnet.

Runbooks

Create a deployment server in Cloud VPS

  • create a new cloud VPS instance of size m1.small (or m1.medium if you will be deploying many scap3 projects)
  • in Horizon apply the puppet 'role::deployment_server' on the instance
  • Create and attach an extra storage volume on /srv to hold the software you are going to deploy
  • in the operations/puppet repo in ./hieradata/labs/yourproject/common.yaml or in Horizon add Hiera key/value pairs:
has_lvs: false
has_tls: false
mcrouter::has_ssl: false
mcrouter::port: 11213
mcrouter::shards:
  wancache:
    eqiad:
      shard01:
        host: deployment-memc04
        port: 11211
      shard02:
        host: deployment-memc05
        port: 11211
      shard03:
        host: deployment-memc08
        port: 11211
profile::kubernetes::deployment_server::git_group: wikidev
profile::kubernetes::deployment_server::git_owner: trebuchet
profile::mediawiki::apc_shm_size: 128M
profile::mediawiki::deployment::server::rsync_host: deploy1001.devtools.eqiad1.wikimedia.cloud
profile::mediawiki::php::enable_fpm: true
profile::mediawiki::php::php_version: '7.2'
profile::rsyslog::kafka_shipper::kafka_brokers: []
profile::services_proxy::ensure: absent
profile::services_proxy::services:
  dummy:
    hostname: dummy.example.net
    localport: 9999
    port: 9999
    scheme: https
    timeout: 600
redis::shards:
  sessions:
    eqiad:
      shard01:
        host: 172.16.5.76
        port: 6379
      shard02:
        host: 172.16.5.17
        port: 6379
      shard03:
        host: 172.16.5.12
        port: 6379
      shard04:
        host: 172.16.5.2
        port: 6379
scap::dsh::groups:
  librenms:
    hosts:
    - deployment-netbox.deployment-prep.eqiad1.wikimedia.cloud
  mediawiki-api-canaries:
    hosts: []
  mediawiki-appserver-canaries:
    hosts:
    - deployment-mediawiki-07.deployment-prep.eqiad1.wikimedia.cloud
  mediawiki-installation:
    hosts:
    - deployment-jobrunner03.deployment-prep.eqiad1.wikimedia.cloud
    - deployment-mediawiki-09.deployment-prep.eqiad1.wikimedia.cloud
    - deployment-mediawiki-07.deployment-prep.eqiad1.wikimedia.cloud
    - deployment-snapshot01.deployment-prep.eqiad1.wikimedia.cloud
    - deployment-deploy01.deployment-prep.eqiad1.wikimedia.cloud
    - deployment-deploy02.deployment-prep.eqiad1.wikimedia.cloud
    - deployment-mwmaint01.deployment-prep.eqiad1.wikimedia.cloud
    - deployment-mediawiki-parsoid10.deployment-prep.eqiad1.wikimedia.cloud
  restbase-betacluster:
    hosts:
    - deployment-restbase01.deployment-prep.eqiad1.wikimedia.cloud
    - deployment-restbase02.deployment-prep.eqiad1.wikimedia.cloud
  webperf:
    hosts:
    - deployment-webperf11.deployment-prep.eqiad1.wikimedia.cloud
scap::sources:
  gerrit/gerrit:
    repository: operations/software/gerrit
  gervert/deploy:
    repository: operations/software/gerrit/tools/gervert/deploy
  phabricator/deployment:
    repository: phabricator/deployment
  • adjust the deployment::server::rsync_host value to a host in your project
  • adjust scap::sources to contain the scap3 projects you will be deploying
  • run puppet (a couple times)
  • run sudo -u trebuchet /usr/bin/scap deploy --init inside each of the repos under /srv/deployment/, so for example in /srv/deployment/gerrit/gerrit and so on but NOT in /srv/deployment/ directly.
  • run git init in /srv/deployment
  • run puppet again

History

See also