Computer Deployment

From Spark Makerspace
Revision as of 04:25, 30 November 2021 by Jjfs85 (talk | contribs)
Jump to navigation Jump to search

How to Deploy a New Machine

  1. First, set the machine to PXE boot by default and turn it on. This allows MAAS to detect the machine.
  2. Navigate to https://maas.spark.spork on the Spark network and login with your administrator credentials.
  3. Rename the machine to whatever you want.
  4. Commission the machine (you may need to manually start the machine if it doesn't have IPMI - workstations don't)
  5. Deploy the machine using one of the following userdata scripts:

#!/bin/bash HOSTNAME=$(hostname) IP=$(hostname -i | awk '{print $1}') echo "$HOSTNAME.spark.spork" > /etc/hostname FQDN="$HOSTNAME.spark.spork" echo "FQDN is: $FQDN" sed -i "1 i\ $IP $FQDN $HOSTNAME" /etc/hosts echo "10.11.12.156 freeipa.spark.spork freeipa" >> /etc/hosts apt-get -y update apt-get install -y nfs-kernel-server nfs-common DEBIAN_FRONTEND=noninteractive apt-get -y install freeipa-client tasksel ipa-client-install --hostname=$(hostname -f) --server=freeipa.spark.spork \ --domain=spark.spork --no-ntp --unattended --principal=enroll --password='thispasswordsucks' \ --realm=SPARK.SPORK --mkhomedir --force-join sed -i '/ticket_lifetime/a renew_lifetime = 28d' /etc/krb5.conf DEBIAN_FRONTEND=noninteractive tasksel install ubuntu-desktop reboot now