This article records the process of batch installation and deployment of Linux and Windows systems using Cobbler. It is mainly divided into three parts: installation and configuration of Cobbler server, automatic installation and deployment of CentOS and Ubuntu for Linux distribution, and automatic installation and deployment of Windows 7 system. This section describes the installation and configuration of the Cobbler server. Part 2: Batch deployment of Linux and Windows using Cobbler: CentOS/Ubuntu Batch Installation Installing Windows oss in Batches (3)
Operating systems are deployed in batches
Cobbler server is associated
Operating system:
CentOS Linux release 7.4, Debian/Ubuntu is not recommended, because Cobbler is developed by RedHat company, RedHat will keep Cobbler updated in RedHat/CentOS, so that it is compatible and easy to use. The Debian/Ubuntu series is lagging behind in terms of adaptation. Cobbler is available on CentOS 7 with yum 2.8.2 and Ubuntu 16.04 with apt 2.4.1. Cobbler is available on CentOS 7 with yum 2.8.2 and Ubuntu 16.04 with apt 2.4.1. Cobbler is available on CentOS 7 with yum 2.8.2 and Ubuntu 16.04 with apt 2.4.1. The deb installation packages for 2.4.x and 2.6.x are now available on Cobbler’s website. In addition, the 2.4.x version will download some data from the specified domain name during the deployment process. However, the domain name has been discarded by Cobbler, so the DNS domain name cannot be resolved, causing problems in the installation and deployment.
CentOS distribution
For the CentOS distribution, I tested CentOS 6.6×64 and CentOS 7.4×64, both of which were fine, but not the 32-bit version.
Ubuntu release
For Ubuntu distributions, I tested Ubuntu 16.04, which was fine, but Ubuntu 14.10 was not. The import process was aborted due to the failure of Cobbler’s signature verification for each distribution. An error is reported if the version is not supported. You can run the following command to view the information:
cobbler signature report --name=ubuntuCopy the code
The results are as follows:
As you can see from the screenshots, there is no distribution Ubuntu 14.10 (Utopic Unicorn) signature, so this version is not supported, presumably it is a short-term support version, so it is not supported.
Windows release
For Windows distributions, only the Windows 7 X64 SP1 flagship edition (CN_Windows_7_ultimate_WITH_SP1_x64_DVd_u_677408.iso) was tested, Automatic installation for Windows requires the associated AutounAttend.xml automatic reply file.
Next, the detailed configuration instructions begin.
Cobbler server environment deployment
Cobbler architecture diagram:
Cobbler components:
- Distro: Represents an operating system that holds information about the kernel and initRD, as well as other data such as the kernel.
- Repository: Holds the image information of a YUM or Rsync repository.
- Profiles: Distro contains a distro, a kickstart file and possibly a repository, as well as more kernel parameters and other data.
- System: Represents a specific customer machine to be customized, including a configuration file or an image, IP and MAC addresses, power management (address, credentials, type), and more specialized data information.
- Image: Replaces a distribution object that contains files that do not belong to this class (eg: cannot be used as a kernel and initrd object).
Distributions and profiles are required for each of the above components. Distro represents the specific system to be imported and installed, the profile represents the configuration of the corresponding system, and the system can be customized for a specific machine installation, which is equivalent to a database record and can be omitted.
Cobbler workflow:
The Server side
Step 1: enable the Cobbler service step 2: check Cobbler errors run the Cobbler check command step 3: synchronize configurations run the Cobbler sync command Step 4: copy startup files to the TFTP directory Step 5: Enable the DHCP service Step 6 provides address assignment, step 7 assigns IP addresses to DHCP services, step 8 transfers startup files from TFTP, and step 9 sends ISO images and Kickstart files to the Server
Step 1: The Client starts in PXE mode step 2: the Client obtains the IP address Step 3: the Client obtains the startup file through the TFTP server Step 4: Enter the Cobbler installation selection interface Step 5: the Client confirms the loading information Step 6: Prepare the installation system according to the configuration information Step 7: Load the Kickstart file in step 8 and transfer the rest of the system installation file in step 9 to install the system
CentOS 7.4 x86_64 minimal new clean system one, root permission. Ensure that the firewall is disabled when using the Cobbler service.
- Install the Cobbler
yum update -y
yum install epel-release -y
yum update -y
yum install cobbler dhcp -yCopy the code
Since cobbler is not in the default repository, the epEL-Release software needs to be installed to configure the repository source in an additional way. Cobbler assigns IP addresses to the client machines to be installed during the PXE installation, so DHCP services need to be installed as well. After installing cobbler properly, you can view and configure cobbler-related commands as follows:
After the default installation, the cobbler service is not started. If you use the command, an error will be reported. You need to turn off the firewall and start cobbler. As follows:
# ==> selinux =disabled disable service firewalld stop If iptables exists, disable systemctl disable firewalld again
systemctl start cobblerd
systemctl enable cobblerdCopy the code
- Cobbler check
After the service is started, the corresponding check is performed. As follows:
cobbler checkCopy the code
After the command is executed, an error is reported as follows:
Error message indicating that the HTTP service is not running, HTTP needs to be started, and it should be set to enable auto-start service. As follows:
systemctl start httpd
systemctl enable httpdCopy the code
Check again, as follows:
Solve the above errors in order:
Problem 1, 2: Modify the configuration file /etc/cobbler/settings
X # Change this parameter to the IP address of the host where the cobbler server resides. Next_server: 192.168.1.x # Change this parameter to the IP address of the host where the cobbler server residesCopy the code
Question 3:
Enabling the TFTP Service
?
1 2 3 | vi /etc/xinetd .d /tftp # ==> disable = no systemctl start tftp systemctl enable tftp |
Question 4:
Execute the following command to download the network boot file to fix it
cobbler get-loadersCopy the code
Question 5:
Enable the rsync service
systemctl start rsyncd
systemctl enable rsyncdCopy the code
Question 6:
Install debmirror
yum install debmirror -yCopy the code
Question 7:
Install pykickstart
yum install pykickstart -yCopy the code
Question 8:
Modify the configuration file /etc/cobbler/settings
default_password_crypted: "$1$root$j0bp.KLPyr.u9kgQ428D10"Copy the code
The above encrypted password was generated using the following command:
Openssl passwd-1-salt "test" "123456" #"test" can be any character string, "123456" is the passwordCopy the code
Question 9:
Install the fence – agents
yum install fence-agents -yCopy the code
After fixing the problem, restart the cobbler service and check again as follows:
service cobblerd restart
cobbler checkCopy the code
You will receive the following report:
Follow the prompts to solve the problem as follows:
Check again. If the following output is displayed, cobber Server is installed properly:
If the preceding operations are not successful, restart the system and check again. Note that the firewall is off and some essential services are guaranteed to start.
- Cobbler configuration
After cobber Server is installed and check is successful, configure Cobbler for subsequent use.
To modify the /etc/cobbler/settings file, note the following configurations:
Manage_dhcp: 1 # Enable DHCP management pxe_just_once: 1 # Install only onceCopy the code
Modify the configuration file/etc/cobbler/DHCP template, need to focus on configuration is as follows:
Option routers 192.168.1. X; Server 192.168.1.x; server 192.168.1.x; Change this parameter to the IP address of the machine where cobbler server residesCopy the code
After cobber configuration changes, all configuration needs to be generated and synchronized again (especially DHCP configuration files) as follows:
service cobblerd restart
cobbler sync
service cobblerd restartCopy the code
Since DHCP management is enabled, you need to run DHCP and set it to start automatically after startup, as follows:
systemctl start dhcpd
systemctl enable dhcpdCopy the code
The Cobber server is installed and configured. (If not, check the firewall and corresponding service status.)