Skip to content

Commit

Permalink
Uploading post_migration_enable_and_switchover_to_pulp3.sh
Browse files Browse the repository at this point in the history
This file is a wrapper script that includes several steps that a user may need to perform after content has been prepared for Pulp 3 to complete the migration, enabling services, configuration of the Satellite, restarting services...etc.

Note: When Pulp3 is officially delivered as part of the Satellite product, these steps will be included within the normal installation procedures.
  • Loading branch information
bbuckingham authored May 21, 2021
1 parent 700dcd3 commit cbb2d09
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions post_migration_enable_and_switchover_to_pulp3.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

set -e

echo
echo "Starting Pulp 3 services..."
systemctl start pulpcore-resource-manager pulpcore-api pulpcore-content pulpcore-worker@1 pulpcore-worker@2 pulpcore-worker@3 pulpcore-worker@4

echo
echo "Enabling Pulp 3 services..."
systemctl enable pulpcore-resource-manager pulpcore-api pulpcore-content pulpcore-worker@1 pulpcore-worker@2 pulpcore-worker@3 pulpcore-worker@4

echo
echo "Perform switchover of content from Pulp 2 to Pulp 3..."
foreman-rake katello:pulp3_content_switchover

echo
echo "Updating Satellite configuration..."
sed -i -e 's/pulpcore::service_ensure: false/pulpcore::service_ensure: true/g' -e 's/pulpcore::service_enable: false/pulpcore::service_enable: true/g' /usr/share/foreman-installer/config/foreman.hiera/scenario/satellite.yaml || echo "Already set"

echo
echo "Running installer for Pulp 3..."
satellite-installer --foreman-proxy-content-proxy-pulp-isos-to-pulpcore=true --katello-use-pulp-2-for-file=false --katello-use-pulp-2-for-docker=false --katello-use-pulp-2-for-yum=false --foreman-proxy-content-proxy-pulp-yum-to-pulpcore=true

echo
echo "Restart Satellite services..."
satellite-maintain service restart

echo
echo "All steps completed!"

0 comments on commit cbb2d09

Please sign in to comment.