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
# foreman-rake db:migrate --trace | |
** Invoke db:migrate (first_time) | |
** Invoke environment (first_time) | |
** Execute environment | |
TABLE dynflow_schema_info | |
rake aborted! | |
Sequel::Migrator::Error: More than 1 row in migrator table | |
/opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:590:in `schema_dataset' | |
/opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:444:in `initialize' |
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
reload() { | |
source ${BASH_SOURCE[0]} | |
} | |
alias r=reload | |
get-image-field() { | |
local imageId=$1 | |
local field=$2 | |
: ${imageId:? reuired} |
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 | |
readonly DB_FILE="$(pwd)/images.db" | |
readonly IMG_DIR="$(pwd)/images" | |
save-images() { | |
echo "Create ${DB_FILE}" | |
echo "$(docker images|grep -v 'IMAGE ID'|awk '{printf("%s %s %s\n", $1, $2, $3)}'|column -t)" > "${DB_FILE}" | |
echo "Read ${DB_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
## Assuming that, this is a fresh satellite 6.10 with a subscription manifest imported ( having a valid RHEL sub ) and no repos are enabled at present | |
## Also assuming that the organization name is RedHat or else replace "--organization RedHat" with "--organization-id 1" | |
## Setup the repo and CV in satellite | |
hammer repository-set enable --name "Red Hat Satellite Tools 6.9 (for RHEL 7 Server) (RPMs)" --product "Red Hat Enterprise Linux Server" --basearch x86_64 --releasever 7Server --organization RedHat | |
hammer repository-set enable --name "Red Hat Ansible Engine 2.9 RPMs for Red Hat Enterprise Linux 7 Server" --product "Red Hat Ansible Engine" --basearch x86_64 --organization RedHat |
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 | |
# | |
## Assuming that, this is a fresh satellite 6.10 or 6.11 with a subscription manifest imported ( having a valid RHEL sub ) and no repos are enabled at present | |
## Also assuming that the organization name is RedHat or else replace "--organization RedHat" with "--organization-id 1" | |
## Refresh manifest once | |
hammer subscription refresh-manifest --organization RedHat | |
## Setup the repo and CV in satellite |
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 | |
# | |
## Assuming satellite 6.9 is installed with organization name RedHat and a manifest with valid rhel sub has been imported. | |
## No repositories are enabled at this stage. | |
## Setup the basic environment | |
hammer subscription refresh-manifest --organization RedHat | |
hammer repository-set disable --name "Red Hat Enterprise Linux 7 Server (RPMs)" --product "Red Hat Enterprise Linux Server" --basearch x86_64 --releasever 7Server --organization RedHat |
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 | |
# | |
## Assuming satellite 6.10 is installed with organization name RedHat and a manifest with valid rhel sub has been imported. | |
## No repositories are enabled at this stage. | |
find /root/ssl-build -name "*.rpm" | egrep -v "katello-" > /tmp/rpms_to_corrupt | |
for i in `cat /tmp/rpms_to_corrupt`; do if [ -f $i ]; then sed -i '1d' $i; else echo "$i does not exists"; fi; done | |
rm -f /tmp/rpms_to_corrupt |
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
- Enable debug. | |
1. Take a backup | |
# cp -pvar /etc/foreman/settings.yaml /etc/foreman/settings.yaml_orig | |
2. Look for this section on satellite, | |
~~ | |
# grep ^:logging /etc/foreman/settings.yaml -A10 | |
:logging: | |
:level: info |
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 | |
# | |
## Assuming satellite 6.10 or 6.11 is installed with organization name RedHat. | |
## Also the "strace" package should be installed on the satellite server OS | |
for i in KATELLO_AGENT_STAT QPID_STAT; do unset $i; done | |
KATELLO_AGENT_STAT=$(awk '/enable_katello_agent:/{print $NF}' /etc/foreman-installer/scenarios.d/satellite-answers.yaml) | |
if [[ $KATELLO_AGENT_STAT = "false" ]] |
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 | |
# Create directory /etc/pki/product/. | |
mkdir -p /etc/pki/product/ | |
# Remove existing 69.pem files | |
[ -f /etc/pki/product-default/69.pem ] && rm -f /etc/pki/product-default/69.pem | |
[ -f /etc/pki/product/69.pem ] && rm -f /etc/pki/product-default/69.pem | |
sleep 3 |
OlderNewer