Deploying Connector on the Endpoint Itself Overview
Prepare The Script
There are 2 ways to download the connector to an endpoint:
1. Download the connector from the internet using the scripts below:
- For CentOS, RHEL, Ubuntu, OracleLinux, SUSE, AmazonLinux (Chef-DeployJetPatchConnectorFromInternetOnLinux.sh)
- First, download the connector to your mounted disk.
- Check that all your machines can access the mounted disk.
- For CentOS, RHEL, Ubuntu, OracleLinux, SUSE, AmazonLinux (Chef-DeployJetPatchConnectorFromLocalOnLinux.sh)
Important: In both ways, you need to Configure CoreServerURL Parameter with your JetPatch Server address.
Create the Cookbook
1. From your workstation, move to your
2. Create the cookbook. In this instance, the cookbook is titled
chef generate cookbook jetpatch_connector
3. Move to your cookbook’s recipes newly-created directory:
4. Open the
default.rb file and add the following code:
cookbook_file "/tmp/Chef-DeployJetPatchConnectorFromInternetOnLinux.sh" do
execute "install JetPatch Connector" do
command "sh /tmp/Chef-DeployJetPatchConnectorFromInternetOnLinux.sh"
5. Upload the script you have prepared (In this example we will be using Chef-DeployJetPatchConnectorFromInternetOnLinux.sh) to the directory
/files/default doesn't exist in the directory jetpatch_connector create it.
mkdir -p ~/chef-repo/cookbooks/jetpatch_connector/files/default/
6. Once uploaded, change the permission of the script:
chmod +x Chef-DeployJetPatchConnectorFromInternetOnLinux.sh
7. Test the recipe and add the jetpatch_connector cookbook to the Chef server:
knife cookbook upload jetpatch_connector
8. Verify that the recipe has been added to the Chef server:
knife cookbook list
You should see a similar output:
Uploading jetpatch_connector [0.1.0]
Uploaded 1 cookbook
Run The Script On Remote Machines
1. Ensure that your workstation’s
/etc/hosts file contains its own IP address, the Chef server’s IP address and fully qualified domain name, and the IP address and hostname for any nodes you will interact with from the workstation.
2. Add the recipe to your chosen node’s run list, replacing
nodename with your node’s name:
knife node run_list add nodename "recipe[jetpatch_connector]"
3. From your workstation, apply the configurations defined in the cookbook by running the chef-client on your node.
Important: The example requires a user account with sudo privileges. Readers who use a limited user account will need to prefix commands with sudo when issuing commands to the Chef client node and replace
-x root with
-x username where
username is your limited user account.
nodename with the name of your node:
knife ssh 'name:nodename' 'sudo chef-client' -x root
Your output should display a successful Chef run. If not, review your code for any errors, usually defined in the output of the