# foreman-rake console
> User.current = User.first
> repo = Katello::Repository.find(3)
# or repo = Katello::Repository.find_by_pulp_id("Default_Organization_product_repo_label")
> ForemanTasks.async_task(Actions::Pulp::Repository::DistributorPublish, :pulp_id => repo.pulp_id, :distributor_type_id => Runcible::Models::YumDistributor.type_id)
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; |
Let's say you're having a bad day and while trying to upgrade your AWX instance you instead unrecoverably brick it, and then you realize that you made a point of storing a very important SSH key in AWX and nowhere else. Why? REASONS.
- The secret key from your AWX config file.
- A dump of your postgres database in plaintext.
- If you're lucky yours is still functional and you can just query it.
- Gumption.
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
### Create file called machine-config-daemon-force in /run ### | |
ssh [email protected] sudo touch /run/machine-config-daemon-force | |
### Edit node annotations ### | |
oc edit node <node-name> | |
### Check Annotations, change like below sample ### | |
machineconfiguration.openshift.io/currentConfig: rendered-worker-ab4a1e7216bf3da2a5203f09c871b456 | |
machineconfiguration.openshift.io/desiredConfig: rendered-worker-ab4a1e7216bf3da2a5203f09c871b456 | |
machineconfiguration.openshift.io/reason: "" |
There are a few env variables you need to set first. Also assuming you have oc
installed and you are logged in as a cluster admin. This has been tested on OCP v4.5.36 and StackRox v3.0.58.0.
export [email protected]
export YOUR_STACKROX_PASSWORD=whateverYourPasswordIs
export STACKROX_PASSWORD=Pa22word # used to log into your deployed stackrox instance. user is `admin` and password is this