You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org

Obsolete:Labs Baremetal Lifecycle

From Wikitech-static
Jump to navigation Jump to search

This is a historical page we want to keep for future reference. See metal in labs.

----------------

Note that our current setup doesn't support very much customization of physical labs nodes. Specifically:

  • All nodes run Jessie
  • All servers must use ttyS1-115200
  • All servers will use a simple, default partitioning scheme
  • Bare-metal servers will NOT observe standard nova security groups; use ferm instead.
  • Puppet config cannot be altered on wikitech/horizon (or even python-novaclient); this requires hiera patches in labs/hosts/ or ldap edits.

Installation

  • When installing server, assign to the labs-vm vlan
  • add a new line to the 'labs_metal' record in hieradata/common.yaml, like this:
promethium: {MAC: '90:b1:1c:2d:6f:0c', IPv4: 10.68.16.2, project: testlabs }
  • add an ldap host record in ldapvi, like this:
# promethium.testlabs.eqiad.wmnet, hosts, wikimedia.org
dn: dc=promethium.testlabs.eqiad.wmnet,ou=hosts,dc=wikimedia,dc=org
objectClass: domainRelatedObject
objectClass: dNSDomain
objectClass: domain
objectClass: puppetClient
objectClass: dcObject
objectClass: top
l: eqiad
puppetVar: instancename=promethium
puppetVar: instanceproject=testlabs
associatedDomain: promethium.testlabs.eqiad.wmnet
associatedDomain: promethium.eqiad.wmnet
dc: promethium.testlabs.eqiad.wmnet
aRecord: 10.64.20.12
  • pxe-boot and install the host from the mgmt console, as for a normal OS install
  • log into host using the new_install key and the ip of the host from iron
sudo ssh -o StrictHostKeyChecking=no -i /root/.ssh/new_install root@<ip>
  • change /etc/puppet/puppet.conf to labs config, like:
[main]
logdir = /var/log/puppet
vardir = /var/lib/puppet
ssldir = /var/lib/puppet/ssl
rundir = /var/run/puppet
factpath = $vardir/lib/facter
[agent]
server = labs-puppetmaster-eqiad.wikimedia.org
configtimeout = 960
usecacheonfailure = false
splay = true
prerun_command = /etc/puppet/etckeeper-commit-pre
postrun_command = /etc/puppet/etckeeper-commit-post
pluginsync = true
report = true
reports = statsd
  • puppet run
# puppet agent --enable
# puppet agent -tv
  • puppet run again, just to be sure.
  • restart nslcd (should not be needed, but may be)
# service nslcd restart