Managing packages

You can use orcharhino to install, upgrade, and remove packages and to enable or disable repositories on hosts.

Packages actions use remote execution. For more information about running remote execution jobs, see Configuring and setting up remote jobs in Managing Hosts.

Viewing installed packages

Use the following procedure to view the installed packages of a host.

Procedure
  1. In the orcharhino management UI, navigate to Hosts > All Hosts and select the name of the host.

  2. On the Content tab, Packages displays a list of installed packages.

  3. To see details of a package, select that package.

    • The Details tab displays details of the selected package.

    • The Files tab lists the files contained in the package.

    • The Dependencies tab lists the dependencies of the package.

    • The Repositories tab lists the repositories that contain the selected package.

  4. You can filter these by Library or Default organization.

Viewing upgradable packages

You can use orcharhino to view upgradable packages. To use the CLI instead of the orcharhino management UI, see the CLI procedure.

Procedure
  1. In the orcharhino management UI, navigate to Hosts > All Hosts.

  2. Select your host.

  3. On the Content tab, select the Packages tab.

  4. Select Upgradable from the Status list.

    By default, orcharhino shows all installed packages.

CLI procedure
  1. Optional: Get the ID of your host:

    $ hammer host list --fields Id,Name
  2. Get a list of upgradable packages of your host:

    $ hammer host package list --status upgradable --host-id My_Host_ID
Additional resources
  • For more information about Hammer CLI, run hammer host package list --help on your orcharhino.

  • For more information about content management, see Managing Content.

Next steps
  • You can use remote execution to upgrade packages on your host. For more information, see Executing a remote job in Managing Hosts.

  • You can use Hammer CLI to upgrade packages on your host:

    $ hammer job-invocation create --feature katello_package_update --search-query "id = My_Host_ID" --inputs "package=My_Package_Name"

    For more information, see Using Hammer CLI.

Enabling and disabling repositories on hosts

Use this procedure to enable and disable repositories on hosts.

Procedure
  1. In the orcharhino management UI, navigate to Hosts > All Hosts,

  2. Select a host.

  3. On the Content tab, click the Repository sets tab.

  4. Click the vertical ellipsis to choose Override to disabled or Override to enabled to disable or enable repositories on hosts.

Installing packages on a host

Use this procedure to review and install packages on a host using the orcharhino management UI. The list of packages available for installation depends on the content view environments assigned to the host.

Procedure
  1. In the orcharhino management UI, navigate to Hosts > All Hosts.

  2. Select a host.

  3. On the Content tab, click the Packages tab.

  4. On the vertical ellipsis icon next to the upgrade button, click Install packages.

  5. In the Install packages window, select the package or packages that you want to install on the host.

  6. Click Install. The orcharhino management UI shows a notification for the remote execution job.

API procedure
  1. Supply the API request body in the JSON format:

    Example API request body:

{
  "job_invocation" : { (1)
    "concurrency_control" : {
      "concurrency_level" : 100 (2)
    },
    "feature" : "katello_package_{PackageAction}", (3)
    "inputs" : {
      "package" : "nano vim" (4)
    },
    "scheduling" : { (5)
      "start_at" : "2023-09-21T19:00:00+00:00",
      "start_before" : "2023-09-23T00:00:00+00:00"
    },
    "search_query" : "*", (6)
    "ssh" : { (7)
      "effective_user" : "My_Username",
      "effective_user_password" : "My_Password"
    },
    "targeting_type" : "dynamic_query" (8)
  }
}
1 The "job_invocation" object, which contains the API request.
2 Optional: Limit the number of hosts on which the job is run concurrently.
3 The "feature" field with value "katello_package_install".
4 The "inputs/package" object that specifies the packages to install. Separate multiple packages with a whitespace.
5 Optional: Time boundaries for when to start to install packages.
  • You can specify one or both boundaries in the ISO 8601 format.

  • The action is canceled if it is not possible to install the packages by this time.

  • If you omit time, it defaults to 00:00:00.

  • If you omit time zone, it defaults to UTC.

6 The search query that matches the hosts on which you want to install the packages.
7 Optional: Credentials of an SSH user, if you want to install packages as that user.
8 Optional: If you supplied the "scheduling" object, you can make the search query be evaluated when the job runs by specifying the "targeting_type/dynamic_query" field.
  • This is useful if you expect the query to produce a different result at the time of running the job.

  • If you omit this field, it defaults to "static_query".

  1. Send a POST request with the created body to the /api/job_invocations endpoint of your orcharhino Server and see a formatted response:

    Example API request:

    $ curl https://orcharhino.example.com/api/job_invocations \
    -H "content-type: application/json" \
    -X POST \
    -d @Path_To_My_API_Request_Body \
    -u My_Username:My_Password \
    | python3 -m json.tool
Verification
  • In the orcharhino management UI, navigate to Monitor > Jobs and see the report of the scheduled or completed remote execution job to install the packages on the selected hosts.

Applying errata to hosts

You can use orcharhino apply errata to hosts.

Procedure
  1. In the orcharhino management UI, navigate to Hosts > All Hosts.

  2. Select a host.

  3. On the Content tab, select the Errata tab.

  4. Select errata and click Apply.

You can use orcharhino and errata to patch your hosts.

Errata are information about updated packages containing security fixes, bug fixes, and enhancements.

Upgrading packages on a host

You can upgrade packages on a host in bulk in the orcharhino management UI.

Procedure
  1. In the orcharhino management UI, navigate to Hosts > All Hosts.

  2. Select a host.

  3. On the Content tab, click the Packages tab.

  4. Select Upgradable from the Status list.

  5. In the Upgradable to column, select the package version that you want to upgrade to.

  6. Select the packages you want to upgrade.

  7. Click Upgrade. The orcharhino management UI shows a notification for the remote execution job.

API procedure
  1. Supply the API request body in the JSON format:

    Example API request body:

{
  "job_invocation" : { (1)
    "concurrency_control" : {
      "concurrency_level" : 100 (2)
    },
    "feature" : "katello_package_{PackageAction}", (3)
    "inputs" : {
      "package" : "nano vim" (4)
    },
    "scheduling" : { (5)
      "start_at" : "2023-09-21T19:00:00+00:00",
      "start_before" : "2023-09-23T00:00:00+00:00"
    },
    "search_query" : "*", (6)
    "ssh" : { (7)
      "effective_user" : "My_Username",
      "effective_user_password" : "My_Password"
    },
    "targeting_type" : "dynamic_query" (8)
  }
}
1 The "job_invocation" object, which contains the API request.
2 Optional: Limit the number of hosts on which the job is run concurrently.
3 The "feature" field with value "katello_package_update".
4 The "inputs/package" object that specifies the packages to update. Separate multiple packages with a whitespace.
5 Optional: Time boundaries for when to start to update packages.
  • You can specify one or both boundaries in the ISO 8601 format.

  • The action is canceled if it is not possible to update the packages by this time.

  • If you omit time, it defaults to 00:00:00.

  • If you omit time zone, it defaults to UTC.

6 The search query that matches the hosts on which you want to update the packages.
7 Optional: Credentials of an SSH user, if you want to update packages as that user.
8 Optional: If you supplied the "scheduling" object, you can make the search query be evaluated when the job runs by specifying the "targeting_type/dynamic_query" field.
  • This is useful if you expect the query to produce a different result at the time of running the job.

  • If you omit this field, it defaults to "static_query".

  1. Send a POST request with the created body to the /api/job_invocations endpoint of your orcharhino Server and see a formatted response:

    Example API request:

    $ curl https://orcharhino.example.com/api/job_invocations \
    -H "content-type: application/json" \
    -X POST \
    -d @Path_To_My_API_Request_Body \
    -u My_Username:My_Password \
    | python3 -m json.tool
Verification
  • In the orcharhino management UI, navigate to Monitor > Jobs and see the report of the scheduled or completed remote execution job to update the packages on the selected hosts.

Removing packages from a host

You can remove packages from a host in the orcharhino management UI.

Procedure
  1. In the orcharhino management UI, navigate to Hosts > All Hosts.

  2. Select a host.

  3. On the Content tab, click the Packages tab.

  4. Click the vertical ellipsis for the package you want to remove.

  5. Select Remove. The orcharhino management UI shows a notification for the remote execution job.

API procedure
  1. Supply the API request body in the JSON format:

    Example API request body:

{
  "job_invocation" : { (1)
    "concurrency_control" : {
      "concurrency_level" : 100 (2)
    },
    "feature" : "katello_package_{PackageAction}", (3)
    "inputs" : {
      "package" : "nano vim" (4)
    },
    "scheduling" : { (5)
      "start_at" : "2023-09-21T19:00:00+00:00",
      "start_before" : "2023-09-23T00:00:00+00:00"
    },
    "search_query" : "*", (6)
    "ssh" : { (7)
      "effective_user" : "My_Username",
      "effective_user_password" : "My_Password"
    },
    "targeting_type" : "dynamic_query" (8)
  }
}
1 The "job_invocation" object, which contains the API request.
2 Optional: Limit the number of hosts on which the job is run concurrently.
3 The "feature" field with value "katello_package_remove".
4 The "inputs/package" object that specifies the packages to remove. Separate multiple packages with a whitespace.
5 Optional: Time boundaries for when to start to remove packages.
  • You can specify one or both boundaries in the ISO 8601 format.

  • The action is canceled if it is not possible to remove the packages by this time.

  • If you omit time, it defaults to 00:00:00.

  • If you omit time zone, it defaults to UTC.

6 The search query that matches the hosts on which you want to remove the packages.
7 Optional: Credentials of an SSH user, if you want to remove packages as that user.
8 Optional: If you supplied the "scheduling" object, you can make the search query be evaluated when the job runs by specifying the "targeting_type/dynamic_query" field.
  • This is useful if you expect the query to produce a different result at the time of running the job.

  • If you omit this field, it defaults to "static_query".

  1. Send a POST request with the created body to the /api/job_invocations endpoint of your orcharhino Server and see a formatted response:

    Example API request:

    $ curl https://orcharhino.example.com/api/job_invocations \
    -H "content-type: application/json" \
    -X POST \
    -d @Path_To_My_API_Request_Body \
    -u My_Username:My_Password \
    | python3 -m json.tool
Verification
  • In the orcharhino management UI, navigate to Monitor > Jobs and see the report of the scheduled or completed remote execution job to remove the packages on the selected hosts.

The text and illustrations on this page are licensed by ATIX AG under a Creative Commons Attribution Share Alike 4.0 International ("CC BY-SA 4.0") license. This page also contains text from the official Foreman documentation which uses the same license ("CC BY-SA 4.0").