Run all of these in 'foreman-rake console'
Check the event queue:
Katello::Event.count
Check 'bound repositories' known to katello
| yum install -y libvirt | |
| service libvirtd start | |
| puppet module install -i /tmp domcleal/katellovirt | |
| echo "Full NAT Forwarding" | |
| cd /tmp/katellovirt/ | |
| grep -v virbr manifests/libvirt.pp > tempfile | |
| cp tempfile manifests/libvirt.pp |
| 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 |
| #!/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) |
Run all of these in 'foreman-rake console'
Check the event queue:
Katello::Event.count
Check 'bound repositories' known to katello
| #! /bin/bash | |
| git clone https://github.com/iNecas/ownca.git | |
| cd ownca | |
| yes "" | ./generate-ca.sh | |
| yes | ./generate-crt.sh $(hostname) | |
| certdir="$(pwd)/$(hostname)/" | |
| cp cacert.crt $(hostname)/ | |
| cd $(hostname) | |
| katello-certs-check -c "$(hostname).crt" -k "$(hostname).key" -r "$(hostname).crt.req" -b cacert.crt |
| rm -rfv /etc/pki/katello{,.bak} | |
| rm -rfv /etc/pki/katello-certs-tools{,.bak} | |
| rm -rfv /etc/candlepin/certs/amqp{,.bak} | |
| rm -rfv /etc/foreman-proxy/*ssl* | |
| rm -rfv /etc/foreman/old-certs | |
| rm -rfv /etc/foreman/*.pem | |
| rm -rfv /var/lib/puppet/ssl | |
| rm -rfv /root/ssl-build | |
| satellite-installer --scenario satellite -v --certs-regenerate-ca=true --certs-regenerate=true |
| # EG : ALTER USER Postgres WITH PASSWORD '<newpassword>'; | |
| CP_PASS=`grep jpa.config.hibernate.connection.password /etc/candlepin/candlepin.conf | awk -F= '{print $2}'` | |
| F_PASS=`grep password /etc/foreman/database.yml | awk -F: '{print $2}' | sed 's/"//g'` | |
| echo "ALTER USER candlepin WITH PASSWORD '$CP_PASS';" | sudo -u postgres psql | |
| echo "ALTER USER foreman WITH PASSWORD '$F_PASS';" | sudo -u postgres psql |
| function getReadableFileSizeString(fileSizeInBytes) { | |
| var i = -1; | |
| var byteUnits = [' kB', ' MB', ' GB', ' TB', 'PB', 'EB', 'ZB', 'YB']; | |
| do { | |
| fileSizeInBytes = fileSizeInBytes / 1024; | |
| i++; | |
| } while (fileSizeInBytes > 1024); | |
| return Math.max(fileSizeInBytes, 0.1).toFixed(1) + byteUnits[i]; |
| namespace :taskbench do | |
| desc <<~END_DESC | |
| Loads up some tasks | |
| END_DESC | |
| def parallelize(param_lists) | |
| max_number_of_forks ||= ENV['forks'].to_i || 10 | |
| page = 0 | |
| page_size = param_lists.length/max_number_of_forks |
when publishing a content view if you get:
Validation failed: Puppet environment can't be blank
or
ActiveRecord::RecordInvalid: Validation failed: Name has already been taken