Change the default Razor port

The default ports for Razor are port 8150 for HTTP communication between the server and nodes, and port 8151 for HTTPS, used for accessing the public API. You can optionally change the default ports if they’re occupied by another service, out of range, or blocked by a firewall.

In the console, select the Classification, then click the node group that contains the pe_razor module.

On the Configuration tab, under pe_razor in the Parameters box, select whether you want to change server_http_port or server_https_port.

In the Value field, enter the port number to use, click Add parameter, and then commit changes.

Parameters for the pe_razor class

Parameters for the pe_razor class enable customization of your Razor installation. You can review configuration settings that are currently being used by Razor with the razor config command.

The pe_razor class has these parameters:

Parameter

Default

Description

api_config_blacklist

[‘facts.blacklist’, ‘database_url’]

Properties that Razor hides from query results. You can add additional properties to protect sensitive data.

auth_config

/etc/puppetlabs/razor-server/shiro.ini

Path to the authentication configuration file.

auth_enabled

false

true to enable authentication for requests to /api endpoints, or false.

broker_path

/etc/puppetlabs/razor-server/brokers:brokers

Colon-separated list of directories containing broker types.

checkin_interval

15

Interval, in seconds, at which the microkernel checks in with the Razor server.

Facts that Razor ignores. Each entry may be a string or a regexp enclosed in /../ where any fact that matches the regexp is dropped.

facts_match_on

[]

Array of values used to match nodes from within the microkernel to nodes in the Razor database. By default, this parameter excludes /^macaddress.&#42;/ (regex), serialnumber, and uuid, which are already used.

hook_execution_path

/opt/puppetlabs/puppet/bin

Colon-separated list of paths that Razor searches in order when running hooks, prior to using the default execution path.

hook_path

/etc/puppetlabs/razor-server/hooks:hooks

Colon-separated list of directories containing hook types.

match_nodes_on

[‘mac’]

Array of values used to match nodes when a node PXE boots. Values can include mac, serial, asset, oruuid.

microkernel_debug_level

quiet

Sets the logging level for the microkernel. Valid values are quiet or debug.

microkernel_extension_zip

/etc/puppetlabs/razor-server/mk-extension.zip

Zip file that specifies custom facts or other code that is unpacked by the microkernel prior to checkin.

microkernel_kernel_args

"

Additional command-line arguments that are supplied to the microkernel during boot.

microkernel_url

https://pm.puppetlabs.com/puppet-enterprise-razor-microkernel-$

Location of the Razor microkernel used to install Razor offline.

pe_tarball_base_url

https://pm.puppetlabs.com/puppet-enterprise

Location of the Puppet Enterprise tarball used to install Razor offline.

protect_new_nodes

false

true to make new machines ineligible for provisioning, or false.

repo_store_root

/opt/puppetlabs/server/data/razor-server/repo

Directory where repository contents are downloaded and served.

secure_api

true

true to require HTTPS/SSL communication with /api endpoints.

server_http_port

8150

Port that nodes use to communicate with the server over HTTP. Only URLs starting with /svc need to be available on this port.

server_https_port

8151

Port that the client uses to communicate with the server’s public API over HTTPS. Only URLs starting with /api need to be available on this port.

task_path

/etc/puppetlabs/razor-server/tasks:tasks

Colon-separated list of directories containing tasks.

Verify the Razor server

Use a test command to verify that the Razor server is correctly installed. The output JSON file test.out contains a list of available Razor commands.

Test the Razor configuration:

wget https://$<RAZOR_HOSTNAME>:$<HTTPS_PORT>/api -O test.out

Install the Razor client

The Razor client is installed as a Ruby gem, razor-client. The process for installing the client differs by platform.

Install the Razor client on *nix systems

Make interacting with the Razor server from *nix systems easier by installing the Razor client.

Install the client: gem install razor-client

Tip: If you're installing the Razor client on your master, you must specify the location of the gem:
/opt/puppetlabs/puppet/bin/gem install razor-client

Point the Razor client to the server: razor -u https://$<RAZOR_HOSTNAME>:$<HTTPS_PORT>/api

An error displays if the client isn’t installed or can’t connect to the server.

(Optional) If you receive a warning message about JSON, you can optionally disable it: gem install json_pure

Install the
Razor client on
Windows systems

Make interacting with the
Razor server from
Windows systems easier by installing the
Razor client.