Provisioning a Windows node
Provisioning deploys and installs your chosen operating system to target nodes.
What triggers provisioning
There are four requirements for Razor to provision a node.
-
The node must boot with iPXE software.
-
The node's network must link to the Razor server through TFTP.
-
A Razor policy must match the node.
-
The node's
installed
flag must be set tofalse
.
When these conditions are met, Razor recognizes the node, applies the first matching policy in the policy table, and provisions the node.
-
Provision for new users enables you to learn about Razor and verify tags before provisioning nodes.
-
Provision for advanced users enables you to seamlessly provision nodes in an existing environment.
Provision a Windows node
This Windows workflow adapts the provisioning for new users workflow. This process enables you to learn about Razor and verify tags before provisioning nodes.
A DHCP/DNS/TFTP service with SELinux configured to enable PXE boot
Puppet Enterprise
The Razor server and client
-
A Windows machine running the same OS that you plan to provision. This machine is used to create a WinPE image.
-
(Optional) An activation key for the OS. A trial license is used if you don't have an activation key.
To follow along with the examples in this workflow, you must also have a new node with at least 8GB of memory. Don’t boot the node before you begin the provisioning process.
In this workflow, you load iPXE software and
register nodes with the microkernel so you can view node details. Then you configure
Razor objects, finishing with creating a policy.
Provisioning is triggered when you reinstall the node in order to remove
the installed
flag.
The examples in this workflow demonstrate provisioning a sample node with Windows. You can modify the settings and scale up your workflow as needed for your environment.
Configure SMB share
Because neither the WinPE environment nor the Windows installer can use an HTTP source for installation, you must use a server message block (SMB) server to store the Razor repositories.
Automatically configure SMB share
Enable the SMB share class parameter on the Razor server to let Razor set up the SMB share automatically.
Manually configure SMB share
If Samba is already installed on your Razor server, you can manually configure it to work with Razor.
-
Navigate to the Samba directory:
cd /etc/samba
-
Edit the
smb.conf
file: -
Restart Samba:
service smb restart
Load iPXE software
Set your machines to PXE boot so that Razor can interact with the node and provision the operating
system. This process uses both the undionly.kpxe
file from the iPXE open source software stack and a Razorbootstrap.ipxe
script.
Register a node with the microkernel
Registering a node lets you learn about the node before Razor provisions it. With registered nodes, you can view facts about the node, add metadata to the node, and see which tags the node matches.
Build a WinPE image
Create a custom Windows Preinstallation Environment (WinPE) WIM image containing Razor scripts.
razor-winpe.wim
image appears in a new razor-winpe
directory inside the current
working directory. Create a repository and add the WinPE image
Because Razor can’t unpack Windows DVD images, you must create a stub repository and manually fill it with content.
(Optional) Create tags
Tags let you group nodes based on their characteristics. You can then apply policies based on tags to install appropriate operating systems on tagged nodes. If you don’t specify tags for a policy, the policy binds to any node.
razor tags <TAG_NAME>
policies
. To see its rule, run razor tags <TAG_NAME> rule
.(Optional) Create a broker
Brokers hand off nodes to configuration management systems like Puppet Enterprise.
puppet-master.example.com
:
razor create-broker --name pe --broker-type puppet-pe
--configuration server=puppet-master.example.com
Create a policy
Policies tell Razor what operating system to install on the provisioned node, where to get the OS software, how to configure it, and how to communicate between the node and Puppet Enterprise.
small
, then hands them off to Puppet Enterprise for management:
razor create-policy --name centos-for-small
--repo centos-6.7 --broker pe --tag small
--hostname 'host${id}.example.com' --root-password secret
razor policies <POLICY_NAME>
. You can view a table
of all policies by running razor
policies
. The order in which policies are listed in the table is
important because Razor applies the first matching policy to a node.Reinstall the node
By default, Razor protects existing nodes from reprovisioning by marking all existing nodes as installed. You must specifically instruct the server to reinstall the node in order to trigger provisioning.
protect_new_nodes
option to false
, which allows Razor to provision a
node as soon as it PXE boots with a matching policy. Be sure you understand how the
protect_new_nodes
option works
before changing it, however. Failure to protect existing nodes can result in data
loss.razor reinstall-node <NODE_NAME>
When you reinstall the
node, Razor clears the installed
flag and the node restarts and boots into
the microkernel. The microkernel reports its facts, and Razor provisions the node by applying the first
applicable policy in the policy table.
When provisioning is
complete, you can log into the node using the root_password
as specified by the node’s metadata,
or by the policy that the node is bound to. You can also see the node and its
details in the console, and manage it there as you would any other
node.
Viewing information about nodes
Use these commands to view details about nodes in your environment.
Command | Result |
---|---|
razor nodes
|
Displays a list of nodes that Razor knows about. |
razor nodes
<NODE_NAME>
|
Displays details about the specified node. |
razor nodes
<NODE_NAME>
log
|
Displays a log that includes the timing and status of installation events, as well as downloads of kickstart files and post-install scripts. |