このコンテンツは選択した言語では利用できません。
Chapter 20. Managing packages in Satellite
You can use Satellite to install, upgrade, and remove packages and to enable or disable repositories on hosts. Package actions use remote execution so you can manage software on hosts from a central place.
20.1. Enabling and disabling repositories on hosts リンクのコピーリンクがクリップボードにコピーされました!
You can enable or disable repositories on a host from the Satellite web UI to control which package sources the host can use. This affects which packages are available for installation or upgrade on the host.
Procedure
- In the Satellite web UI, navigate to Hosts > All Hosts,
- Select a host.
- On the Content tab, click the Repository sets tab.
- Click the vertical ellipsis to choose Override to disabled or Override to enabled to disable or enable repositories on hosts.
20.2. Installing packages on a host リンクのコピーリンクがクリップボードにコピーされました!
You can review and install packages on a host from the Satellite web UI so that the host has the software it needs. Available packages depend on the content view environments assigned to the host.
Prerequisites
- The host is assigned to a content view and lifecycle environment.
Procedure
- In the Satellite web UI, navigate to Hosts > All Hosts.
- Select a host.
- On the Content tab, click the Packages tab.
- On the vertical ellipsis icon next to the upgrade button, click Install packages.
- In the Install packages window, select the package or packages that you want to install on the host.
- Click Install. The Satellite web UI shows a notification for the remote execution job.
20.3. Upgrading packages on a host リンクのコピーリンクがクリップボードにコピーされました!
You can upgrade packages on a host in bulk from the Satellite web UI.
Procedure
- In the Satellite web UI, navigate to Hosts > All Hosts.
- Select a host.
- On the Content tab, click the Packages tab.
- Select Upgradable from the Status list.
- In the Upgradable to column, select the package version that you want to upgrade to.
- Select the packages you want to upgrade.
- Click Upgrade. The Satellite web UI shows a notification for the remote execution job.
20.4. Removing packages from a host リンクのコピーリンクがクリップボードにコピーされました!
You can remove packages from a host from the Satellite web UI to uninstall software or resolve dependency conflicts.
Procedure
- In the Satellite web UI, navigate to Hosts > All Hosts.
- Select a host.
- On the Content tab, click the Packages tab.
- Click the vertical ellipsis for the package you want to remove.
- Select Remove. The Satellite web UI shows a notification for the remote execution job.
20.5. Managing packages on a host by using API リンクのコピーリンクがクリップボードにコピーされました!
You can install, upgrade, or remove packages on a host by using the Satellite API for automation, scripts, or integration with other tools.
The example below uses the katello_package_install action to install a package. You can also use package actions katello_package_upgrade to upgrade or katello_package_remove to remove packages.
Procedure
Specify the API request body in the JSON format. For example:
{ "job_invocation" : { "concurrency_control" : { "concurrency_level" : 100 }, "feature" : "katello_package_install", "inputs" : { "package" : "nano vim" }, "scheduling" : { "start_at" : "2023-09-21T19:00:00+00:00", "start_before" : "2023-09-23T00:00:00+00:00" }, "search_query" : "*", "ssh" : { "effective_user" : "My_Username", "effective_user_password" : "My_Password" }, "targeting_type" : "dynamic_query" } }The example uses the following notable values:
- "job_invocation"
- Specifies the object which contains the API request.
- "concurrency_level"
- Optional. Limits the number of hosts on which the job is run concurrently.
- "feature"
-
Specifies the action to be performed. Use
"katello_package_install"to install a package,"katello_package_upgrade"to upgrade a package, or"katello_package_remove"to remove a package. - "package"
- Specifies the packages on which the action is performed. Separate multiple packages with a whitespace.
- "scheduling"
Optional. Specifies time boundaries for when to start the package action.
- You can specify one or both boundaries in the ISO 8601 format.
- The action is canceled if it is not possible to perform the package action by this time.
- If you omit time, it defaults to 00:00:00.
- If you omit time zone, it defaults to UTC.
- "search_query"
- Specifies the search query that selects the hosts on which you want to perform the package action.
- "ssh"
- Optional. Specifies the credentials of an SSH user, if you want to perform the package action as that user.
- "dynamic_query"
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 the job run.
-
If you omit this field, it defaults to
"static_query".
Send a
POSTrequest with the created body to the/api/job_invocationsendpoint of your Satellite Server and see a formatted response. For example:$ curl https://satellite.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 Satellite web UI, navigate to Monitor > Jobs and see the report of the scheduled or completed remote execution job to perform the package action on the selected hosts.