Build a new server
From Wikitech
(Difference between revisions)
m (linux-host-entries.ttyS1-115200) |
Bhartshorne (Talk | contribs) (→PXE boot and the initial OS) |
||
| Line 17: | Line 17: | ||
== PXE boot and the initial OS == | == PXE boot and the initial OS == | ||
| − | * set up netboot to partition the disk | + | * if it's a cluster host, set up netboot to partition the disk |
** log into the install server (presently brewster), edit /srv/autoinstall/netboot.cfg | ** log into the install server (presently brewster), edit /srv/autoinstall/netboot.cfg | ||
| − | ** it's a bash case statement. | + | ** it's a bash case statement. Make sure your hostname is matched by a regex in there. |
| − | ** | + | * if it's a misc host, you'll have to partition by hand (it will prompt you) |
| + | ** lvm over raid 1 is a decent config if you don't have anything more specific you need. | ||
* ssh to root@$servername.mgmt.$loc.wmnet, force a restart and pxe boot | * ssh to root@$servername.mgmt.$loc.wmnet, force a restart and pxe boot | ||
** get the password from someone in ops if you don't have it | ** get the password from someone in ops if you don't have it | ||
| Line 28: | Line 29: | ||
*** when connecting from OSX via the Terminal, <code>escape-shift-2</code> sends F12 | *** when connecting from OSX via the Terminal, <code>escape-shift-2</code> sends F12 | ||
** you can leave this running to watch it complete | ** you can leave this running to watch it complete | ||
| − | *** | + | *** This is where you'll be prompted for partition info |
** when you're done, <code>ctrl-\</code> will disconnect you from the console | ** when you're done, <code>ctrl-\</code> will disconnect you from the console | ||
Revision as of 21:12, 1 September 2011
Details on all the steps necessary to take a new (or old repurposed) piece of hardware and turn it into a happy functional server
Contents |
Before you begin
- find the machine's MAC address (racadm getsysinfo)
- decide on private / public IP address, and if it will need to exist in some special range
- decide how the disks should be arranged (raid, partitioning, etc.)
Initial hardware setup
- Get the hardware racked and cabled (RobH)
- Get an IP and name (RobH)
- follow DNS How-To section to add the name/ip to DNS
- set up $name.mgmt.$loc.wmnet as well to access the management interface
- set up $assettag.mgmt.$loc.wmnet in addition to the server name mgmt dns.
- Set up DHCP with the MAC address / name info
- log into brewster and edit
/etc/dhcp3/*(any new server linux-host-entries.ttyS1-115200), run/etc/init.d/dhcpd3-server restart
- log into brewster and edit
- Get the switch set up to pass traffic to the host (Mark)
PXE boot and the initial OS
- if it's a cluster host, set up netboot to partition the disk
- log into the install server (presently brewster), edit /srv/autoinstall/netboot.cfg
- it's a bash case statement. Make sure your hostname is matched by a regex in there.
- if it's a misc host, you'll have to partition by hand (it will prompt you)
- lvm over raid 1 is a decent config if you don't have anything more specific you need.
- ssh to root@$servername.mgmt.$loc.wmnet, force a restart and pxe boot
- get the password from someone in ops if you don't have it
- powercycle the host:
racadm serveraction powercycle - connect to the cosole:
console com2 - during boot, force netboot:
F12- when connecting from OSX via the Terminal,
escape-shift-2sends F12
- when connecting from OSX via the Terminal,
- you can leave this running to watch it complete
- This is where you'll be prompted for partition info
- when you're done,
ctrl-\will disconnect you from the console
Get puppet running
Warning: if you are rebuilding a pre-existing server (rather than a brand new name), on sockpuppet, run puppetca --clean $fqdn to clear out the old certificate before beginning this process.
- get a shell on both $server and the puppet master (sockpuppet)
- Only one key has access to new installs.
- from sockpuppet,
ssh -i ~/.ssh/new_install root@$servername.wikimedia.orgto log into $server
- on $server, run
puppetd --testIt will fail. - on sockpuppet, run
puppetca -s $server-fqdn - on $server, run
puppetd --testIt should now succeed.
Set up puppet
- add $server to site.pp, either by hostname or within a regex if it's part of a class (eg srv\d\d*)
- do whatever puppet goodies you want to get the server to do what you want it to.
Related pages
- DNS
- An older version of the preseeding docs: Automated installation
- More detail around working with the console: Remote_management