Skip to content

Instantly share code, notes, and snippets.

1. # create new .py file with code found below
2. # install ollama
3. # install model you want “ollama run mistral”
4. conda create -n autogen python=3.11
5. conda activate autogen
6. which python
7. python -m pip install pyautogen
7. ollama run mistral
8. ollama run codellama
9. # open new terminal
# satellite-installer --full-help
Usage:
satellite-installer [OPTIONS]
Options:
= Generic:
--[no-]lock-package-versions Let installer lock versions of the installed packages to prevent
unexpected breakages during system updates. The choice is remembered
and used in next installer runs. (default: nil)

1) On your MongoDB server:

Substitute in the name of the package you are looking for in the name param, in this example we use satellite-clone

# mongo pulp_database
> db.units_rpm.find( {name: "satellite-clone"}, { id: 1})
{ "_id" : "33e8dfe8-87d3-43a9-849e-c65092f22f68" }
{ "_id" : "3e7b87e6-b67d-4655-87c6-2754e3dcfb21" }
{ "_id" : "203df79d-d71f-4d83-aa5b-be384de708e9" }
namespace :katello do
desc "Export the stored x509 certificates from Pulp's configuration"
task :export_repo_certs => ["environment"] do
User.current = User.anonymous_api_admin
org_name = ENV['ORG_NAME']
org = Organization.find_by name: org_name
path = Dir.mktmpdir("pulp-certs")
Katello::Repository.yum_type.in_default_view.in_organization(org).each do |repo|
filename = File.join(path, "#{repo.product.label}-#{repo.label}")
namespace :katello do
task :update_repo_certs => %w(environment) do
User.current = User.anonymous_admin
begin
ssl_cert = File.read(File.open(ENV['SSL_CERT_PATH']))
ssl_key = File.read(File.open(ENV['SSL_KEY_PATH']))
rescue
raise("SSL_CERT_PATH or SSL_KEY_PATH could not be read")
end
@mccun934
mccun934 / scaling.md
Created October 30, 2020 14:36 — forked from adamruzicka/scaling.md
Dynflow workers scaling

Intro

Out of the box, foreman ships with orchestrator and a single worker If you have Katello, you will get an additional worker for processing of the host queue

root@modest-gator:~# ls -l /etc/foreman/dynflow/
total 1
-rw-r--r--. 1 root foreman 51 May 14 07:35 orchestrator.yml
-rw-r--r--. 1 root foreman 59 May 14 07:35 worker.yml
#!/bin/bash
echo "Importing Subscription Pools from Candlepin."
echo '
namespace :katello do
task :import_subscriptions => ["environment"] do
User.current = User.anonymous_api_admin
puts _("Importing Subscriptions")
Katello::Subscription.import_all
#!/bin/bash
# Works with Satellite 6.5 and later
# https://access.redhat.com/solutions/2273561
rm -f /etc/candlepin/certs/keystore
rm -f /etc/candlepin/certs/truststore
rm -f /etc/tomcat/truststore
rm -f /etc/candlepin/certs/amqp/*
rm -rf /etc/pki/katello/nssdb/*
@mccun934
mccun934 / deleted_puppet_envs65-later.md
Last active February 1, 2023 19:35 — forked from jlsherrill/deleted_puppet_envs.md
recover from deleted puppet environments from 6.5 or later

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
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