This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "select id from katello_repositories where url is not null" | sudo -u postgres psql -t -d foreman | | xargs -n1 -I arg1 -P 3 hammer repository synchronize --validate-contents yes --id arg1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Please update router settings on Satellite and each Capsule as follows: | |
In /etc/qpid-dispatch/qdrouterd.conf : | |
router { | |
mode: interior | |
router-id: sat.example.redhat.com | |
helloInterval: 10 | |
helloMaxAge: 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# grab uuids of queues, delete queues | |
for uuid in $(qpid-stat --ssl-certificate=/etc/pki/katello/qpid_client_striped.crt -b "amqps://localhost:5671" -q | grep pulp.agent | cut -c14- | awk '{ print $1 }'); do | |
echo "Deleting pulp.agent.$uuid" | |
qpid-config --ssl-certificate=/etc/pki/katello/qpid_client_striped.crt -b amqps://localhost:5671 del queue pulp.agent.$uuid --force | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Show output of commands | |
set -x | |
ORGID=9 | |
for i in {1..10}; | |
do | |
hammer repository create --name demo-$i --organization-id 9 --product demo --url https://mmccune.fedorapeople.org/repos/demo/repo-$i --content-type yum; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) run katello-backup on the original capsule - this backs up the client puppet certificates and answers file with no hostname info | |
2) generate capsule certs on main katello server with hostname of the machine that will be the new capsule | |
3) install capsule on blank VM/machine | |
4) copy backup onto capsule and run katello-restore | |
5) Sync capsule to make sure all content and functionality is restored | |
6) shut down original capsule , change hostname to original capsule hostname | |
6) run katello-change-hostname --scenario foreman-proxy-content hostname.example.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
def collect_files(files) | |
lines = [] | |
files.collect do |file| | |
if File.lstat(file).symlink? && File.directory?(file) | |
sub_files = collect_files(Dir.glob("#{file}/**/*")) | |
lines.concat(sub_files) | |
next | |
elsif File.directory?(file) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x | |
katello-service stop | |
systemctl start mongod | |
rm -rf /var/lib/pulp/content/units/* | |
rm -rf /var/lib/pulp/published/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "" | |
echo "DELETING All task data" | |
echo "" | |
TABLE_COUNTS="select count(*) as foreman_tasks_tasks from foreman_tasks_tasks; | |
select count(*) as dynflow_execution_plans from dynflow_execution_plans; | |
select count(*) as dynflow_actions from dynflow_actions; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat <<EOF > /usr/share/foreman/config/initializers/foreman_tasks_workers_bump.rb | |
workers_count = 10 | |
Rails.logger.info("Bumping the number of dynflow worksers to #{workers_count}") | |
ForemanTasks.dynflow.config.pool_size = workers_count | |
EOF | |
service foreman-tasks restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x | |
#Stop Katello/Satellite services | |
katello-service stop | |
CERT=/etc/pki/katello/certs/katello-apache.crt | |
KEY=/etc/pki/katello/private/katello-apache.key |