katello 3.0.2 → 3.1.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/javascripts/katello/sync_management/sync_management.js +14 -5
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +4 -4
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +2 -0
- data/app/controllers/katello/api/v2/api_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_uploads_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_view_puppet_modules_controller.rb +2 -12
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +4 -4
- data/app/controllers/katello/api/v2/content_views_controller.rb +2 -4
- data/app/controllers/katello/api/v2/environments_controller.rb +0 -16
- data/app/controllers/katello/api/v2/host_contents_controller.rb +9 -0
- data/app/controllers/katello/api/v2/host_errata_controller.rb +1 -1
- data/app/controllers/katello/api/v2/host_packages_controller.rb +1 -1
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +25 -6
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +3 -2
- data/app/controllers/katello/api/v2/repositories_controller.rb +6 -3
- data/app/controllers/katello/api/v2/sync_plans_controller.rb +2 -1
- data/app/controllers/katello/api/v2/systems_controller.rb +1 -13
- data/app/controllers/katello/application_controller.rb +15 -18
- data/app/controllers/katello/concerns/api/v2/hosts_controller_extensions.rb +11 -7
- data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +1 -1
- data/app/controllers/katello/concerns/authorization/api/v2/content_views_controller.rb +1 -1
- data/app/controllers/katello/concerns/organizations_controller_extensions.rb +1 -1
- data/app/controllers/katello/concerns/smart_proxies_controller_extensions.rb +2 -2
- data/app/helpers/katello/application_helper.rb +1 -1
- data/app/helpers/katello/concerns/settings_helper_extensions.rb +3 -2
- data/app/helpers/katello/hosts_and_hostgroups_helper.rb +1 -1
- data/app/helpers/katello/katello_form_builder.rb +1 -1
- data/app/helpers/katello/katello_url_helper.rb +2 -2
- data/app/lib/actions/candlepin/candlepin_listening_service.rb +3 -3
- data/app/lib/actions/candlepin/consumer/remove_subscription.rb +6 -0
- data/app/lib/actions/candlepin/import_pool_handler.rb +2 -1
- data/app/lib/actions/katello/capsule_content/create_repos.rb +1 -1
- data/app/lib/actions/katello/capsule_content/sync.rb +4 -5
- data/app/lib/actions/katello/content_view/errata_mail.rb +1 -1
- data/app/lib/actions/katello/content_view/presenters/incremental_updates_presenter.rb +1 -1
- data/app/lib/actions/katello/content_view/promote.rb +8 -3
- data/app/lib/actions/katello/content_view/publish.rb +8 -3
- data/app/lib/actions/katello/content_view/remove.rb +2 -2
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +1 -1
- data/app/lib/actions/katello/host/erratum/applicable_errata_install.rb +1 -1
- data/app/lib/actions/katello/host/generate_applicability.rb +1 -1
- data/app/lib/actions/katello/host/hypervisors_update.rb +23 -5
- data/app/lib/actions/katello/host/register.rb +2 -11
- data/app/lib/actions/katello/host/remove_subscriptions.rb +1 -1
- data/app/lib/actions/katello/host/update.rb +1 -1
- data/app/lib/actions/katello/host/update_content_view.rb +5 -1
- data/app/lib/actions/katello/repository/errata_mail.rb +1 -1
- data/app/lib/actions/katello/repository/export.rb +1 -1
- data/app/lib/actions/katello/repository/sync.rb +2 -0
- data/app/lib/actions/pulp/abstract_async_task.rb +1 -1
- data/app/lib/actions/pulp/abstract_async_task_group.rb +76 -0
- data/app/lib/actions/pulp/consumer/create.rb +1 -1
- data/app/lib/actions/pulp/repos/update.rb +2 -1
- data/app/lib/actions/pulp/repository/associate_importer.rb +4 -0
- data/app/lib/actions/pulp/repository/import_upload.rb +0 -4
- data/app/lib/actions/pulp/repository/refresh.rb +7 -18
- data/app/lib/actions/pulp/repository/regenerate_applicability.rb +2 -2
- data/app/lib/actions/pulp/repository/sync.rb +1 -1
- data/app/lib/actions/pulp/repository/update_importer.rb +4 -0
- data/app/lib/katello/api/v2/error_handling.rb +1 -1
- data/app/lib/katello/bulk_actions.rb +7 -8
- data/app/lib/katello/capsule_content.rb +11 -11
- data/app/lib/katello/errors.rb +2 -0
- data/app/lib/katello/glue/queue.rb +1 -1
- data/app/lib/katello/resources/candlepin.rb +3 -3
- data/app/lib/katello/resources/cdn.rb +1 -1
- data/app/lib/katello/util/cdn_var_substitutor.rb +1 -1
- data/app/lib/katello/util/package.rb +1 -1
- data/app/lib/katello/util/package_filter.rb +4 -4
- data/app/lib/katello/util/search.rb +3 -3
- data/app/lib/katello/validators/content_view_puppet_module_validator.rb +20 -14
- data/app/models/katello/activation_key.rb +4 -4
- data/app/models/katello/concerns/content_facet_host_extensions.rb +2 -2
- data/app/models/katello/concerns/host_managed_extensions.rb +6 -2
- data/app/models/katello/concerns/operatingsystem_extensions.rb +2 -2
- data/app/models/katello/concerns/organization_extensions.rb +5 -1
- data/app/models/katello/concerns/smart_proxy_extensions.rb +2 -13
- data/app/models/katello/concerns/subscription_facet_host_extensions.rb +27 -2
- data/app/models/katello/content_view.rb +5 -5
- data/app/models/katello/content_view_erratum_filter_rule.rb +3 -3
- data/app/models/katello/content_view_filter.rb +3 -3
- data/app/models/katello/content_view_history.rb +4 -4
- data/app/models/katello/content_view_repository.rb +1 -1
- data/app/models/katello/erratum.rb +14 -10
- data/app/models/katello/glue.rb +0 -2
- data/app/models/katello/glue/candlepin/consumer.rb +4 -4
- data/app/models/katello/glue/candlepin/content.rb +2 -2
- data/app/models/katello/glue/candlepin/pool.rb +6 -0
- data/app/models/katello/glue/candlepin/product.rb +1 -1
- data/app/models/katello/glue/provider.rb +1 -1
- data/app/models/katello/glue/pulp/consumer.rb +3 -3
- data/app/models/katello/glue/pulp/repo.rb +26 -31
- data/app/models/katello/glue/pulp/repos.rb +1 -1
- data/app/models/katello/host/content_facet.rb +6 -1
- data/app/models/katello/host/subscription_facet.rb +1 -8
- data/app/models/katello/host_collection.rb +1 -82
- data/app/models/katello/hypervisor.rb +1 -1
- data/app/models/katello/kt_environment.rb +3 -2
- data/app/models/katello/package_group.rb +2 -2
- data/app/models/katello/ping.rb +4 -4
- data/app/models/katello/provider.rb +8 -1
- data/app/models/katello/pulp_sync_status.rb +7 -7
- data/app/models/katello/pulp_task_status.rb +1 -1
- data/app/models/katello/repository.rb +6 -6
- data/app/models/katello/rhsm_fact_parser.rb +0 -9
- data/app/models/katello/sync_plan.rb +14 -21
- data/app/models/katello/system.rb +6 -12
- data/app/models/katello/task_status.rb +3 -24
- data/app/models/setting/{katello.rb → content.rb} +10 -2
- data/app/overrides/add_about_page.rb +3 -3
- data/app/overrides/add_organization_attributes.rb +2 -2
- data/app/overrides/add_subscription_status.rb +1 -1
- data/app/services/katello/candlepin/consumer.rb +8 -8
- data/app/services/katello/pulp/consumer.rb +1 -1
- data/app/services/katello/pulp/consumer_group.rb +3 -3
- data/app/services/katello/pulp/docker_manifest.rb +1 -1
- data/app/services/katello/pulp/erratum.rb +1 -1
- data/app/services/katello/pulp/ostree_branch.rb +1 -1
- data/app/services/katello/pulp/package_group.rb +1 -1
- data/app/services/katello/pulp/puppet_module.rb +1 -1
- data/app/services/katello/pulp/rpm.rb +3 -3
- data/app/services/katello/puppet_class_importer_extensions.rb +1 -1
- data/app/views/dashboard/_subscription_status_widget.html.erb +1 -1
- data/app/views/foreman/smart_proxies/_content_sync.html.erb +1 -1
- data/app/views/foreman/unattended/finish-katello.erb +2 -2
- data/app/views/foreman/unattended/kickstart-katello.erb +2 -2
- data/app/views/foreman/unattended/userdata-katello.erb +2 -0
- data/app/views/katello/api/v2/common/_syncable.json.rabl +1 -1
- data/app/views/katello/api/v2/errata/show.json.rabl +2 -2
- data/app/views/katello/api/v2/{systems/releases.json.rabl → host_subscriptions/available_release_versions.json.rabl} +0 -0
- data/app/views/katello/api/v2/products/base.json.rabl +0 -19
- data/app/views/katello/api/v2/products/show.json.rabl +21 -2
- data/app/views/katello/api/v2/subscription_facet/base_with_root.json.rabl +2 -1
- data/app/views/katello/api/v2/subscriptions/show.json.rabl +19 -17
- data/config/katello.yml +242 -0
- data/config/routes/api/v2.rb +7 -6
- data/config/routes/overrides.rb +10 -5
- data/db/migrate/20140117160939_refactor_content_views.rb +4 -4
- data/db/migrate/20140318174203_drop_cdn_import_success_column.rb +1 -1
- data/db/migrate/20140404122011_drop_repositories_enabled_column.rb +1 -1
- data/db/migrate/20140610083129_add_pulp_proxy_to_host.rb +1 -1
- data/db/migrate/20140930170628_add_errata.rb +1 -1
- data/db/migrate/20141222151001_add_host_content_view_environment.rb +1 -1
- data/db/migrate/20150602153756_remove_user_notices.rb +1 -1
- data/db/migrate/20150602153757_remove_notices.rb +2 -2
- data/db/migrate/20150930183738_migrate_content_hosts.rb +1 -1
- data/db/migrate/20160203195736_remove_docker_image_schema.rb +3 -1
- data/db/migrate/20160505181337_rename_katello_settings.rb +9 -0
- data/db/migrate/20160520175340_add_host_applicable_package.rb +8 -0
- data/db/migrate/20160605160933_remove_jobs.rb +25 -0
- data/db/migrate/20160605162929_remove_system_smart_proxy.rb +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-associations.controller.js +14 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-associations-content-hosts.html +8 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-action-packages.controller.js +16 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/bulk-actions-packages.html +27 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js +17 -19
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +1 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages.controller.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages.html +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details-info.controller.js +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-provisioning-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-subscriptions.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts-table-collapsed.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts-table-full.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-details.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-versions.controller.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/details/gpg-key-details.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/details/views/gpg-key-details.html +6 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/gpg-keys.controller.js +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/gpg-keys.module.js +7 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/new/new-gpg-key.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/new/views/gpg-key-new.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/views/gpg-keys.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-subscription.factory.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/katello-features.run.js +5 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/check-current-organization.run.js +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-associations-content-hosts.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-associations-content-hosts.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/manifest-import.controller.js +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/new/views/new-sync-plan-form.html +1 -0
- data/engines/bastion_katello/lib/bastion_katello/version.rb +1 -1
- data/lib/katello.rb +0 -1
- data/lib/katello/engine.rb +12 -8
- data/lib/katello/permissions/content_host_permissions.rb +1 -1
- data/lib/katello/tasks/clean_backend_objects.rake +5 -6
- data/lib/katello/tasks/delete_orphaned_content.rake +1 -1
- data/lib/katello/tasks/jenkins.rake +1 -3
- data/lib/katello/tasks/jshint.rake +28 -29
- data/lib/katello/tasks/jsroutes.rake +2 -2
- data/lib/katello/tasks/regenerate_repo_metadata.rake +3 -5
- data/lib/katello/tasks/reindex.rake +17 -16
- data/lib/katello/tasks/rubocop.rake +1 -3
- data/lib/katello/tasks/setup.rake +3 -4
- data/lib/katello/tasks/test.rake +8 -23
- data/lib/katello/tasks/upgrades/2.4/import_distributions.rake +1 -2
- data/lib/katello/tasks/upgrades/2.4/import_package_groups.rake +1 -2
- data/lib/katello/tasks/upgrades/2.4/import_puppet_modules.rake +1 -2
- data/lib/katello/tasks/upgrades/2.4/import_rpms.rake +1 -1
- data/lib/katello/tasks/upgrades/2.4/import_subscriptions.rake +1 -2
- data/lib/katello/tasks/upgrades/3.0/add_export_distributor.rake +1 -1
- data/lib/katello/tasks/upgrades/3.0/update_subscription_facet_backend_data.rake +1 -1
- data/lib/katello/tasks/yard.rake +2 -2
- data/lib/katello/version.rb +1 -1
- metadata +14 -15
- data/app/models/katello/job.rb +0 -197
- data/app/models/katello/job_task.rb +0 -10
- data/app/views/katello/api/v2/systems_bulk_actions/applicable_errata.json.rabl +0 -7
- data/app/views/katello/api/v2/systems_bulk_actions/available_incremental_updates.json.rabl +0 -21
- data/app/views/katello/api/v2/systems_bulk_actions/erratum.json.rabl +0 -7
- data/app/views/katello/api/v2/systems_bulk_actions/job.json.rabl +0 -1
- data/db/migrate/20160619223332_fix_viewer_role.rb +0 -41
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
<% organizations = Organization.current.present? ? [Organization.current] : User.current.allowed_organizations %>
|
6
6
|
<% subscriptions = Katello::Subscription.in_organization(organizations).includes(:pools) %>
|
7
|
-
<% total_active_subscriptions =
|
7
|
+
<% total_active_subscriptions = organizations.map {|org| org.active_pools_count}.reduce(:+) %>
|
8
8
|
<% total_expiring_subscriptions = subscriptions.select(&:expiring_soon?).count %>
|
9
9
|
<% total_recently_expired_subscriptions = subscriptions.select(&:recently_expired?).count %>
|
10
10
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
{{ syncStatusText(syncState, syncStatus) }}
|
7
7
|
<div ng-show="syncState.is(syncState.SYNCING, syncState.SYNC_TRIGGERED, syncState.CANCEL_TRIGGERED, syncState.FAILURE)">
|
8
|
-
{{syncTask.progressbar.value || 0}}%
|
8
|
+
{{ syncTask.progressbar.value || 0 | number: 0 }}%
|
9
9
|
<a href="<%= @task_search_url %>" target="_self">
|
10
10
|
<div ng-class="{ active: isTaskInProgress(syncTask) }" class="progress progress-striped">
|
11
11
|
<span progressbar
|
@@ -42,6 +42,8 @@ echo "updating system time"
|
|
42
42
|
# update all the base packages from the updates repository
|
43
43
|
yum -t -y -e 0 update
|
44
44
|
|
45
|
+
<%= snippet('remote_execution_ssh_keys') %>
|
46
|
+
|
45
47
|
<% if salt_enabled %>
|
46
48
|
yum -t -y -e 0 install salt-minion
|
47
49
|
cat > /etc/salt/minion << EOF
|
@@ -60,8 +62,6 @@ cat > /etc/puppet/puppet.conf << EOF
|
|
60
62
|
<%= snippet 'puppet.conf' %>
|
61
63
|
EOF
|
62
64
|
|
63
|
-
<%= snippet('remote_execution_ssh_keys') %>
|
64
|
-
|
65
65
|
# Setup puppet to run on system reboot
|
66
66
|
/sbin/chkconfig --level 345 puppet on
|
67
67
|
|
@@ -111,6 +111,8 @@ echo "updating system time"
|
|
111
111
|
# update all the base packages from the updates repository
|
112
112
|
yum -t -y -e 0 update
|
113
113
|
|
114
|
+
<%= snippet('remote_execution_ssh_keys') %>
|
115
|
+
|
114
116
|
<% if salt_enabled %>
|
115
117
|
yum -t -y -e 0 install salt-minion
|
116
118
|
cat > /etc/salt/minion << EOF
|
@@ -131,8 +133,6 @@ cat > /etc/puppet/puppet.conf << EOF
|
|
131
133
|
<%= snippet 'puppet.conf' %>
|
132
134
|
EOF
|
133
135
|
|
134
|
-
<%= snippet('remote_execution_ssh_keys') %>
|
135
|
-
|
136
136
|
# Setup puppet to run on system reboot
|
137
137
|
/sbin/chkconfig --level 345 puppet on
|
138
138
|
|
@@ -34,10 +34,12 @@ ssh_authorized_keys:
|
|
34
34
|
<% if @host.params['sshkey'].present? -%>
|
35
35
|
- <%= @host.params['sshkey'] %>
|
36
36
|
<% end -%>
|
37
|
+
<% if @host.params['remote_execution_ssh_keys'].present? -%>
|
37
38
|
<% @host.params['remote_execution_ssh_keys'].each do |key| -%>
|
38
39
|
- <%= key %>
|
39
40
|
<% end -%>
|
40
41
|
<% end -%>
|
42
|
+
<% end -%>
|
41
43
|
write_files:
|
42
44
|
- path: /tmp/foreman-userdata.sh
|
43
45
|
permissions: '0755'
|
@@ -12,8 +12,8 @@ end
|
|
12
12
|
|
13
13
|
attributes :errata_type => :type
|
14
14
|
|
15
|
-
node(:hosts_available_count) { |m| m.hosts_available.count }
|
16
|
-
node(:hosts_applicable_count) { |m| m.hosts_applicable.count }
|
15
|
+
node(:hosts_available_count) { |m| m.hosts_available(params[:organization_id]).count }
|
16
|
+
node(:hosts_applicable_count) { |m| m.hosts_applicable(params[:organization_id]).count }
|
17
17
|
|
18
18
|
node :packages do |e|
|
19
19
|
e.packages.pluck(:nvrea)
|
File without changes
|
@@ -9,28 +9,9 @@ attributes :provider_id
|
|
9
9
|
attributes :sync_plan_id
|
10
10
|
attributes :sync_summary
|
11
11
|
attributes :gpg_key_id
|
12
|
-
attributes :redhat? => :redhat
|
13
12
|
|
14
13
|
attributes :available_content => :available_content, :if => params[:include_available_content]
|
15
14
|
|
16
|
-
node :sync_status do |product|
|
17
|
-
{
|
18
|
-
:id => product.sync_status[:id],
|
19
|
-
:product_id => product.sync_status[:product_id],
|
20
|
-
:progress => product.sync_status[:progress],
|
21
|
-
:sync_id => product.sync_status[:sync_id],
|
22
|
-
:state => product.sync_status[:state],
|
23
|
-
:raw_state => product.sync_status[:raw_state],
|
24
|
-
:start_time => product.sync_status[:start_time],
|
25
|
-
:finish_time => product.sync_status[:finish_time],
|
26
|
-
:duration => product.sync_status[:duration],
|
27
|
-
:display_size => product.sync_status[:display_size],
|
28
|
-
:size => product.sync_status[:size],
|
29
|
-
:is_running => product.sync_status[:is_running],
|
30
|
-
:error_details => product.sync_status[:error_details]
|
31
|
-
}
|
32
|
-
end
|
33
|
-
|
34
15
|
child :sync_plan do
|
35
16
|
attributes :name, :description, :sync_date, :interval, :next_sync
|
36
17
|
end
|
@@ -3,12 +3,12 @@ object @resource
|
|
3
3
|
|
4
4
|
extends "katello/api/v2/products/base"
|
5
5
|
|
6
|
-
extends 'katello/api/v2/common/org_reference'
|
7
|
-
|
8
6
|
attributes :productContent => :product_content
|
9
7
|
|
10
8
|
attributes :available_content => :available_content
|
11
9
|
|
10
|
+
attributes :redhat? => :redhat
|
11
|
+
|
12
12
|
child :library_repositories => :repositories do |_repo|
|
13
13
|
attributes :name, :id
|
14
14
|
end
|
@@ -21,6 +21,25 @@ child :provider do
|
|
21
21
|
attribute :name
|
22
22
|
end
|
23
23
|
|
24
|
+
node :sync_status do |product|
|
25
|
+
local_sync_status = product.sync_status
|
26
|
+
{
|
27
|
+
:id => local_sync_status[:id],
|
28
|
+
:product_id => local_sync_status[:product_id],
|
29
|
+
:progress => local_sync_status[:progress],
|
30
|
+
:sync_id => local_sync_status[:sync_id],
|
31
|
+
:state => local_sync_status[:state],
|
32
|
+
:raw_state => local_sync_status[:raw_state],
|
33
|
+
:start_time => local_sync_status[:start_time],
|
34
|
+
:finish_time => local_sync_status[:finish_time],
|
35
|
+
:duration => local_sync_status[:duration],
|
36
|
+
:display_size => local_sync_status[:display_size],
|
37
|
+
:size => local_sync_status[:size],
|
38
|
+
:is_running => local_sync_status[:is_running],
|
39
|
+
:error_details => local_sync_status[:error_details]
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
24
43
|
node :permissions do |product|
|
25
44
|
{
|
26
45
|
:view_products => product.readable?,
|
@@ -6,4 +6,5 @@ node :content_host_id do |host|
|
|
6
6
|
host.content_host.try(:id)
|
7
7
|
end
|
8
8
|
|
9
|
-
attributes :subscription_status, :subscription_status_label, :
|
9
|
+
attributes :subscription_status, :subscription_status_label, :subscription_global_status,
|
10
|
+
:if => @object.get_status(Katello::SubscriptionStatus).relevant?
|
@@ -13,34 +13,36 @@ node :provided_products, :if => lambda { |sub| sub && !sub.products.blank? } do
|
|
13
13
|
end
|
14
14
|
|
15
15
|
node :systems do |subscription|
|
16
|
-
subscription.
|
17
|
-
facts =
|
16
|
+
subscription.hosts.map do |host|
|
17
|
+
facts = host.facts
|
18
18
|
{
|
19
|
-
uuid:
|
20
|
-
host_id:
|
21
|
-
name:
|
22
|
-
environment: { id:
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
19
|
+
uuid: host.subscription_facet.try(:uuid),
|
20
|
+
host_id: host.id,
|
21
|
+
name: host.name,
|
22
|
+
environment: { id: host.content_facet.try(:lifecycle_environment).try(:id),
|
23
|
+
name: host.content_facet.try(:lifecycle_environment).try(:name) },
|
24
|
+
content_view: { id: host.content_facet.try(:content_view).try(:id),
|
25
|
+
name: host.content_facet.try(:content_view).try(:name) },
|
26
|
+
created: host.subscription_facet.try(:registered_at),
|
27
|
+
checkin_time: host.subscription_facet.try(:last_checkin),
|
28
|
+
entitlement_status: host.subscription_status,
|
29
|
+
service_level: host.subscription_facet.try(:service_level),
|
30
|
+
autoheal: host.subscription_facet.try(:autoheal),
|
29
31
|
facts: {
|
30
32
|
dmi: {
|
31
33
|
memory: {
|
32
|
-
size: facts['dmi
|
34
|
+
size: facts['dmi::memory::size']
|
33
35
|
}
|
34
36
|
},
|
35
37
|
memory: {
|
36
|
-
memtotal: facts['memory
|
38
|
+
memtotal: facts['memory::memtotal']
|
37
39
|
},
|
38
40
|
cpu: {
|
39
|
-
'cpu_socket(s)' => facts['cpu
|
40
|
-
'core(s)_per_socket' => facts['cpu
|
41
|
+
'cpu_socket(s)' => facts['cpu::cpu_socket(s)'],
|
42
|
+
'core(s)_per_socket' => facts['cpu::core(s)_per_socket']
|
41
43
|
},
|
42
44
|
virt: {
|
43
|
-
is_guest: facts['virt
|
45
|
+
is_guest: facts['virt::is_guest']
|
44
46
|
}
|
45
47
|
}
|
46
48
|
}
|
data/config/katello.yml
ADDED
@@ -0,0 +1,242 @@
|
|
1
|
+
# This file contains default values for Katello configuration.
|
2
|
+
#
|
3
|
+
# DO NOT EDIT THIS FILE
|
4
|
+
#
|
5
|
+
# Add `/etc/katello/katello.yml` (or `config/katello.yml` in development) to override default values,
|
6
|
+
# file is required even if it's blank.
|
7
|
+
|
8
|
+
# Katello configuration
|
9
|
+
#
|
10
|
+
# :vim:sw=2:ts=2:et:
|
11
|
+
|
12
|
+
# Common configuration
|
13
|
+
#
|
14
|
+
# The following configuration values are the same for production, test
|
15
|
+
# and development environments. Values can be overridden bellow.
|
16
|
+
#
|
17
|
+
common:
|
18
|
+
ssl_client_key: '/etc/pki/katello/private/abed.usersys.redhat.com-pulp-client.key'
|
19
|
+
ssl_client_cert: '/etc/pki/katello/certs/abed.usersys.redhat.com-pulp-client.crt'
|
20
|
+
use_cp: # set to true/false if you want to override default
|
21
|
+
use_pulp: # set to true/false if you want to override default
|
22
|
+
use_elasticsearch: # set to true/false if you want to override default
|
23
|
+
|
24
|
+
rest_client_timeout: 30
|
25
|
+
gpg_strict_validation: false
|
26
|
+
|
27
|
+
# Puppet publishing location
|
28
|
+
puppet_repo_root: '/etc/puppet/environments/'
|
29
|
+
|
30
|
+
elastic_index: katello
|
31
|
+
elastic_url: http://localhost:9200
|
32
|
+
|
33
|
+
post_sync_url: "http://localhost:3000/katello/api/v2/repositories/sync_complete?token=katello"
|
34
|
+
|
35
|
+
simple_search_tokens: [":", " and\\b", " or\\b", " not\\b"]
|
36
|
+
|
37
|
+
redhat_repository_url: https://cdn.redhat.com
|
38
|
+
redhat_docker_registry_url: https://registry.access.redhat.com
|
39
|
+
|
40
|
+
qpid:
|
41
|
+
url: amqp:ssl:troy.usersys.redhat.com:5671
|
42
|
+
subscriptions_queue_address: katello_event_queue
|
43
|
+
|
44
|
+
consumer_cert_rpm: 'katello-ca-consumer-latest.noarch.rpm'
|
45
|
+
|
46
|
+
#setup how often you want
|
47
|
+
#your notifications to be checked
|
48
|
+
#for you to receive the right notifications
|
49
|
+
#default value = 45 seconds
|
50
|
+
#
|
51
|
+
notification:
|
52
|
+
polling_seconds: 120
|
53
|
+
|
54
|
+
# Setup your candlepin environment here
|
55
|
+
candlepin:
|
56
|
+
# refers to the url of the candlepin
|
57
|
+
# example https://localhost:8443/candlepin
|
58
|
+
url: https://localhost:8443/candlepin
|
59
|
+
|
60
|
+
# Specify your oauth key and secret used to authenticate between Katello and Candlepin
|
61
|
+
oauth_key: katello
|
62
|
+
oauth_secret: katello
|
63
|
+
|
64
|
+
# refers to the candlepin-ca.crt location that is needed
|
65
|
+
# to connect to candlepin over https.This is not necessary
|
66
|
+
# if the candlepin server is running on the same machine as katello
|
67
|
+
# but required if the server is on a different machine.
|
68
|
+
# In the different machine case the katello host needs to have a
|
69
|
+
# copy of /etc/candlepin/certs/candlepin-ca.crt copied from
|
70
|
+
# the candlepin host and the location of the copied file needs to be
|
71
|
+
# specified here..
|
72
|
+
ca_cert_file:
|
73
|
+
|
74
|
+
# Setup your pulp environment here
|
75
|
+
pulp:
|
76
|
+
# refers to the url of the pulp
|
77
|
+
# example https://localhost/pulp/api
|
78
|
+
url: https://localhost/pulp/api/v2/
|
79
|
+
|
80
|
+
# Specify your oauth key and secret used to authenticate between Katello and Pulp
|
81
|
+
oauth_key: katello
|
82
|
+
oauth_secret: katello
|
83
|
+
|
84
|
+
sync_threads: 4
|
85
|
+
bulk_load_size: 100
|
86
|
+
# refers to the apache certificate
|
87
|
+
# (typically /etc/pki/tls/certs/localhost.crt) location that is needed
|
88
|
+
# to connect to pulp over https.
|
89
|
+
ca_cert_file:
|
90
|
+
default_login: admin
|
91
|
+
sync_KBlimit:
|
92
|
+
upload_chunk_size: 1048575 # upload size in bytes to pulp. see SSLRenegBufferSize in apache
|
93
|
+
skip_checksum_validation: false
|
94
|
+
|
95
|
+
# Setup proxy to use when accessing CDN.
|
96
|
+
# Katello calls CDN to retrieve list of repositories for a product
|
97
|
+
# Uncomment in case you want this calls to go through your proxy
|
98
|
+
cdn_proxy:
|
99
|
+
# host: localhost
|
100
|
+
# port: 3128
|
101
|
+
# user: login
|
102
|
+
# password: password
|
103
|
+
|
104
|
+
# when adding a new logger don't forget to add it in here even if it's disabled by default
|
105
|
+
# otherwise log trace feature won't work for such logger
|
106
|
+
logging:
|
107
|
+
# enable logging output inline in rails console
|
108
|
+
console_inline: true
|
109
|
+
# colorize log including level token based on severity
|
110
|
+
colorize: false
|
111
|
+
# adds an extra line after each log message with information from which file:line and method
|
112
|
+
# was this message logged
|
113
|
+
log_trace: false
|
114
|
+
#do not log certain paths (example /notices/get_new)
|
115
|
+
ignored_paths: []
|
116
|
+
# configuration of all loggers used in app
|
117
|
+
loggers:
|
118
|
+
# this logger is parent of all other loggers, by default this is the only one having appender
|
119
|
+
# which is used by all other loggers
|
120
|
+
root:
|
121
|
+
# only messages with severity >= this level from all loggers will be logged
|
122
|
+
level: warn
|
123
|
+
# file or syslog, for file variant you can specify other options below like filename,
|
124
|
+
# pattern or rolling options
|
125
|
+
type: file
|
126
|
+
# 'daily', 'weekly', 'monthly' or number as seconds
|
127
|
+
age: 'weekly'
|
128
|
+
# how many old log files to keep (156 = 52 * 3 = 3 years for weekly age)
|
129
|
+
keep: 156
|
130
|
+
# logger line pattern, you can use following macros
|
131
|
+
# [%c] name of the logger that generate the log event
|
132
|
+
# [%d] datestamp
|
133
|
+
# [%m] the user supplied log message
|
134
|
+
# [%p] PID of the current process
|
135
|
+
# [%r] the time in milliseconds since the program started
|
136
|
+
# [%T] the name of the thread Thread.current[:name]
|
137
|
+
# [%t] object_id of the thread
|
138
|
+
# [%F] filename where the logging request was issued
|
139
|
+
# [%L] line number where the logging request was issued
|
140
|
+
# [%M] method name where the logging request was issued
|
141
|
+
# [%X{string}] variable set using ::Logging.mdc['string'] =
|
142
|
+
pattern: "[%5l %d %c %X{uuid} #%p] %m\n"
|
143
|
+
# log filename for this environment, it will be placed into #{Rails.root}/log directory
|
144
|
+
filename: "production.log"
|
145
|
+
# you log files will be stored here
|
146
|
+
# note when you log outside of standard rails path you won't see log output in WEBrick
|
147
|
+
# STDOUT (usually not wanted in development), to use Rails default path, don't set path
|
148
|
+
# path: /var/log/katello
|
149
|
+
|
150
|
+
# you can configure each logger individually, you can turn it off completely by using key
|
151
|
+
# 'enabled' or you can adjust it's logging 'level'. If you specify level higher than root
|
152
|
+
# logger has, messages below this level are ignored. If you specify lower level than root
|
153
|
+
# they are still ignored but you can add appender in Katello::Logging just for this logger
|
154
|
+
# and see these logs outside of main log.
|
155
|
+
sql:
|
156
|
+
enabled: false
|
157
|
+
app:
|
158
|
+
enabled: true
|
159
|
+
glue:
|
160
|
+
enabled: true
|
161
|
+
pulp_rest:
|
162
|
+
enabled: true
|
163
|
+
cp_rest:
|
164
|
+
enabled: true
|
165
|
+
cp_proxy:
|
166
|
+
enabled: true
|
167
|
+
foreman_rest:
|
168
|
+
enabled: true
|
169
|
+
action:
|
170
|
+
enabled: true
|
171
|
+
# tire is a special case, all logs coming from it are debug level however they count depends
|
172
|
+
# on root level configuration, e.g. root debug level will print most info from tire
|
173
|
+
# unfortunately there is currently no better way
|
174
|
+
tire_rest:
|
175
|
+
enabled: false
|
176
|
+
yard:
|
177
|
+
enabled: false
|
178
|
+
#
|
179
|
+
# Production environment configuration
|
180
|
+
#
|
181
|
+
# The following configuration values override ones from the common section
|
182
|
+
#
|
183
|
+
production:
|
184
|
+
logging:
|
185
|
+
loggers:
|
186
|
+
sql:
|
187
|
+
level: fatal
|
188
|
+
|
189
|
+
#
|
190
|
+
# Development environment configuration
|
191
|
+
#
|
192
|
+
# The following configuration values override ones from the common section
|
193
|
+
#
|
194
|
+
development:
|
195
|
+
logging:
|
196
|
+
ignored_paths: ['/notices/get_new', '/assets/', '/api/tasks/bulk_search']
|
197
|
+
colorize: true
|
198
|
+
loggers:
|
199
|
+
root:
|
200
|
+
level: debug
|
201
|
+
type: file
|
202
|
+
age: 'monthly'
|
203
|
+
keep: 1
|
204
|
+
pattern: "[%5l %d %c] %m\n"
|
205
|
+
filename: "development.log"
|
206
|
+
yard:
|
207
|
+
level: info
|
208
|
+
|
209
|
+
# To enable external logs tailing add optional 'tail_command:' option to a logger configuration,
|
210
|
+
# standard output of the command is logged. Useful with `tail` command. E.g.
|
211
|
+
#
|
212
|
+
# tail-pulp:
|
213
|
+
# enabled: true
|
214
|
+
# tail_command: ssh root@a_host -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no tail -f /var/log/pulp/pulp.log
|
215
|
+
# tail-cp:
|
216
|
+
# enabled: true
|
217
|
+
# tail_command: ssh root@a_host -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no tail -f /var/log/tomcat6/catalina.out
|
218
|
+
# tail-kt-client:
|
219
|
+
# enabled: true
|
220
|
+
# tail_command: tail -f ~/.katello/client.log
|
221
|
+
# tail-foreman:
|
222
|
+
# enabled: true
|
223
|
+
# tail_command: tail -f ~/Workspace/redhat/foreman/log/development.log
|
224
|
+
|
225
|
+
|
226
|
+
#
|
227
|
+
# Test environment configuration
|
228
|
+
#
|
229
|
+
# The following configuration values override ones from the common section
|
230
|
+
#
|
231
|
+
test:
|
232
|
+
elastic_index: katello_test
|
233
|
+
logging:
|
234
|
+
colorize: false
|
235
|
+
loggers:
|
236
|
+
root:
|
237
|
+
level: debug
|
238
|
+
type: file
|
239
|
+
age: 'monthly'
|
240
|
+
keep: 1
|
241
|
+
pattern: "[%5l %d %c] %m\n"
|
242
|
+
filename: "test.log"
|