You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

This page describes how to create a Linux base image. These instructions should work regardless of the provisioning engine being used. If you are using these instructions to create an xCAT bare metal image, ignore the sections with titles beginning with VMware Only:. This document assumes familiarity with xCAT and VMware.

Terminology

  • Management node: Linux server with the following components installed:
  • Compute node: Refers to the target blade or virtual machine on which Windows is installed.
  • Provisioning engine: Software which is able to interact with the compute node making it possible to install an OS on it
    • VCL can utilize several different provisioning engines including xCAT, VMware Server, VMware ESX, and VMware ESXi.  xCAT is a cluster management tool used to install images on bare metal blades.\
    • The provisioning engine may be a hypervisor if the compute nodes are virtual machines (VMware)
    • The provisioning engine may interact with the BladeCenter's management module if the compute nodes are IBM blades (xCAT)
    • The provisioning engine may utilize IMPI if the compute nodes support it (xCAT)

Requirements

You will need the following:

  • Compute node has already been added to the VCL database
  • Compute node installed with Linux distro, distro's currently supported are
    • CentOS,Redhat AS,Fedora core, Ubuntu
  • Two network adapters enabled on compute node OS, i.e. eth0, eth1
  • Ability to login as root via ssh identity key on the private network from management node.
    • This requires a private public ssh keys, the private key is to be listed in the management node's vcl profile identity keys section. The public key will need to copied into the /root/.ssh/authorized_keys file on the target compute node.

Setting up the OS so VCL can manage it

The main dependency for linux OS's is that the vcl management node has to able to login as root over ssh using an ssh identity key on the private network, which is normally eth0. This means there are two distinct ssh services, one for the private network and one for the external public network.

  • Private ssh service uses /etc/ssh/sshd_config
    • Started by default sshd startup file /etc/init.d/sshd
    • Purpose is to listen only on the private IP address and allows root access from the management node only using an ssh identity key
  • Public ssh service uses /etc/ssh/external_sshd_config
    • Started by custom ext_sshd startup file /etc/init.d/ext_sshd
    • Purpose is to listen only of the public IP address and only allow userid of requesting user to gain ssh access.
    • Gets created and modified during startup of use using /etc/rc.local.

Configuring /etc/rc.local for loading on different nodes with different IP addresses.

The script /etc/rc.local is used to determine the correct IP addresses and update sshd_config and external_sshd_config files.

  • Copy the following to /etc/rc.local
cp /etc/ssh/sshd_config /etc/ssh/sshd_config.ORIG
perl -pi -e 's/^X11Forwarding .*$/X11Forwarding yes/' /etc/ssh/sshd_config
perl -pi -e 's/^KeyRegenerationInterval .*$/KeyRegenerationInterval 0/' /etc/ssh/sshd_config
perl -pi -e 's/(.*MaxStartups.*)/#\1/' /etc/ssh/sshd_config
	
cp /etc/ssh/sshd_config /etc/ssh/external_sshd_config
perl -pi -e 's/.*PidFile .*$/PidFile \/var\/run\/ext_sshd.pid/' /etc/ssh/external_sshd_config

IP0=\$(ifconfig eth0 | grep 'inet addr' | awk '{print \$2}' | awk -F: '{print \$2}')
IP1=\$(ifconfig eth1 | grep 'inet addr' | awk '{print \$2}' | awk -F: '{print \$2}')
perl -pi -e 's/^AllowUsers .*\n//' /etc/ssh/sshd_config
perl -pi -e 's/^AllowUsers .*\n//' /etc/ssh/external_sshd_config
perl -pi -e 's/^ListenAddress .*\n//' /etc/ssh/sshd_config
perl -pi -e 's/^ListenAddress .*\n//' /etc/ssh/external_sshd_config
echo \"AllowUsers root\" >> /etc/ssh/sshd_config
echo \"ListenAddress \$IP0\" >> /etc/ssh/sshd_config
echo \"ListenAddress \$IP1\" >> /etc/ssh/external_sshd_config
/etc/rc.d/init.d/sshd stop
sleep 2
/etc/rc.d/init.d/sshd start

  • No labels