Working with DSmanager

From ISPWiki

Jump to: navigation, search

Contents

Installing the operating system

  1. Delete all temporary files that might have been created for the latest server reset or recovery.
  2. Create a record in dhcpd.conf
  3. Add a dsXXXX link to the pxe loader (where XXXX is a server id) in the TFTP root
  4. The kernel file form an operating system template or network template will be used for network load (initrd will be taken from the same directory as kernel). It is used for the Linux loader. FreeBSD takes its kernel via NFS (from the network template).
  5. A 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 needs to be located in the same network with 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 a network template (FreeBSD or Linux) will be added to the /etc/exports file.
  9. Reboot the server.

Use a script /etc/rc.local from the network template to continue.

Server configuration

The followings are the newly created server configuration. The file with server settings is supposed to be used as a shell script. The following variables will be set up:

  • IMAGE - operating system template name (the directory that contains this name in the DStemplate directory).
  • NAME - hostname.
  • IP - server 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 the installation is complete, so Dsmanager will delete a record in dhcpd.conf. Otherwise, the server will be resetted after reboot).
  • NETMASK - network mask.
  • GATEWAY - gateway address.
  • SUBNET - network address where the server IP-address is located (an optional field; however it is not convenient to use a script).
  • BROADCAST - address for broadcast requests (an optional field; it is used to customize some Linux distributions).
  • LOCALTIME - time zone (the file name in the /usr/share/zoneinfo directory).
  • DISK=default - how to divide the disk into logical partitions. Normally, default is a large default partition. If this parameter is missing, it means that the sizes and the name of partitions were specified manually. See the two parameters below.
  • DISK_SIZE - size of all the disks space separated (* - use the remaining free space).
  • DISK_LABEL - mounting points space separated (swap - swap partition).
  • You may also create a var/dsconf/XXXX file (where XXXX is the server id). Its content will be added into the configuration file.

Server recovery

  1. Delete all the contemporary files that might have been 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 a directory where the files should be pasted to (this directory will be used as root when booting via NFS).
    2. path to a directory where the files should be copied from (the directory, where Clone.sh is located).
    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. The kernel and initrd files (if any) from the network template will be used for the system load. It is used for the Linux loader. FreeBSD takes its kernel 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 to (the first parameter), will be added to the /etc/exports file.
  7. Restart the server.

Updating templates

The network templates operate 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: file name and MD5 checksum (one per line). If this file already exists, the template files will be verified prior to its usage.

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

Was this helpful? Yes | No
Personal tools