Working with DSmanager

From ISPWiki

Jump to: navigation, search

Contents

Installing the operating system

  1. Delete all temporary files that were created for the latest server reset or recovery.
  2. Create the record in dhcpd.conf
  3. In the TFTP root create a dsXXXX link to the pxe loader (where XXXX is a server id)
  4. If you run Linux, the kernel file form the operating system template or network template will be used for network load (initrd will be taken from the same directory as kernel).If you run FreeBSD, the kernel will be taken from the network template via NFS.
  5. An XX.XX.XX.XX.conf file (where XX.XX.XX.XX is the server's IP-address) with the newly created server configuration will be created in the DSconfig directory
  6. The etc/authorized_keys file (if any) will be copied to DSconfig/XX.XX.XX.XX.keys
  7. The server MAC address will bind to its IP-address (thus, the IP-address must belong to the same network that the server running DSmanager).
  8. The lines that allow full access from the server IP-address to the DSconfig, DStemplate directories and the directory with the network template (FreeBSD or Linux) will be added to the /etc/exports file.
  9. Reboot the server.

Run the script /etc/rc.local in the network template to proceed.

Server configuration

The file contains configuration settings. It is supposed to be used as a shell script. The following variables will be set up:

  • IMAGE - name of the operating system's template (the directory that contains this name in the DStemplate directory).
  • NAME - hostname.
  • IP - server's IP-address (an optional field, the IP-address is required for you to know which config to use).
  • PASSWORD - administrator password (MD5 encoding).
  • ID - DSmanager session ID (the server will use it to inform that the installation is complete, so DSmanager will delete the record in dhcpd.conf. Otherwise, the server will be reset after reboot).
  • NETMASK - network mask.
  • GATEWAY - gateway address.
  • SUBNET - network address where the server IP-address is located (an optional field).
  • BROADCAST - address for broadcast requests (it is used to customize some Linux distributions; an optional field).
  • LOCALTIME - time zone (the file name in the /usr/share/zoneinfo directory).
  • DISK=default - disk partitions. Normally, default is a large default partition. If this parameter is not specified, the sizes and the name of partitions were specified manually. See the two parameters below.
  • DISK_SIZE - size of all disks space separated (* - use the remaining space).
  • DISK_LABEL - mounting points space separated (swap - swap partition).
  • You may create the var/dsconf/XXXX file (where XXXX is the server id). Its content will be added into the configuration file.

Recovering server

  1. Delete all temporary files that were created for the latest server reset or recovery.
  2. Create a record in dhcpd.conf
  3. Run the Clone.sh script from the root directory of the network template. It has the following parameters:
    1. path to the directory where the files should be placed (this directory will be used as root when booting via NFS).
    2. path to the directory from which the files should be copied (the directory with Clone.sh).
    3. administrator password (MD5 encoding)
    4. path to the /usr/local/ispmgr/etc/authorized_keys file, if the keys are required. If no, it is not present.
  4. Create a dsXXXX link (where XXXX is the server id) to the pxe loader in the TFTP root.
  5. If you run Linux, the kernel and initrd files (if any) from the network template will be used for the system load. If you run FreeBSD, the kernel will be taken via NFS according to the /boot/loader.conf settings.
  6. The lines that allow full access from the server IP-address to the directories, where Clone.sh has copied the data (the first parameter), will be added to the /etc/exports file.
  7. Restart the server.

Updating templates

The network templates can be used in the same way as the VDSmanager-FreeBSD templates. Use sbin/dtmpctl to update or create them.

Operating system templates are a set of files (disk image - tgz archive). It is updated by one tar-archive. This archive may contain the control.md5 file with the following information space separated: a file name and MD5 checksum (one per line).

In both cases the directory should contain the VERSION file with the number template version specified.

Was this helpful? Yes | No
Personal tools