Files
gitea-pages/admin-guide/deployment/sample.rst

2.5 KiB

Sample deployment of a new server

In this section we describe the deployment of a new server from scratch. All the operations will be performed using bob, the command-line client for interacting with sysdb.

The informations we need are:

  • the server name: logging-ra.psi.ch
  • the server MAC address: 23:3d:ef:33:11:22
  • static or dynamic IP: static
  • the OS installer: rhel79server
  • the server role: role::logging_server
  • the server environment in puppet: prod
  • the sysdb environment: daas
  • optional the group inside the sysdb environment (default if not specified): logging

Setting up bob

The bob tool is already set up on lxsup00.psi.ch. You might connect with ssh and use it from there.

Altenatively you many have on your workstation a local copy of bob. This can be done by installing the RPM from the pli-misc repository - https://repos.psi.ch/rhel7/latest/pli-misc/

You might need to set a PSI_BOB_USER environment variable (export PSI_BOB_USER=<you-name-it>) or use the option --user if your local user is different from the one on sysdb.

Sysdb configuration

We then create a deployment environment:

bob env add daas talamo_i daas-admins 'DaaS Cluster'

We add the node to the environment, specifing netboot as the boot action :

bob node add logging-ra.psi.ch daas netboot

We setup its MAC address: :

bob node add-mac logging-ra.psi.ch 23:3d:ef:33:11:22

Next decide how the IP address is configured (dhcp or static): :

bob node set-attr syslog-ra.psi.ch network=static

And which installer is used: :

bob node set-attr syslog-ra.psi.ch ipxe_installer=rhel79server

And we finally setup the puppet role and puppet environment: :

bob node set-attr syslog-ra.psi.ch puppet_role=role::log_server
bob node set-attr syslog-ra.psi.ch puppet_env=prod
bob node set-attr syslog-ra.psi.ch puppet_group=logging

Example

Full example: :

bob node add lx-test-02.psi.ch pli netboot
bob node add-mac lx-test-02 00:50:56:9d:19:76
bob node set-attr lx-test-02.psi.ch ipxe_installer=rhel87install
bob node set-attr lx-test-02.psi.ch puppet_env=prod
bob node set-attr lx-test-02.psi.ch puppet_group=default
bob node set-attr lx-test-02.psi.ch puppet_role=role::server
bob node netboot lx-test-02.psi.ch
bob node list -v lx-test-02

Ensure that a potential previous puppet certificate for this server is deleted on the puppet server: https://puppet.psi.ch