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
BEAKER_SETFILE=centos8-64 BEAKER_HYPERVISOR=vagrant_libvirt BEAKER_PROVISION=yes BEAKER_DESTROY=no bundle exec rspec spec/acceptance/my_test_spec.rb | |
#BEAKER_DESTROY=no leaves the VM running | |
#BEAKER_PROVISION=no allows for VM reuse |
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
https://gcr.io | |
google-containers/busybox |
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
cd /home/vagrant/foreman && source .env && BIND=0.0.0.0 bundle exec puma -w 3 -p $PORT --preload |
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
source ~/foreman/.env | |
BIND=0.0.0.0 bundle exec puma -w 1 -t 1 -p $PORT --preload |
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
Dev env tips | |
- Start rails in one terminal: bundle exec foreman start rails | |
- Start webpack in another terminal: bundle exec foreman start webpack | |
- Debug a file: | |
1) Edit ~/foreman/.env to ensure puma is running with a single CPU | |
2) Restart your server | |
3) Insert `binding.pry` where you need to debug |
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
libvirtd | |
virtnetworkd |
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
#!/usr/bin/ruby | |
require 'webrick' | |
require 'webrick/httpproxy' | |
proxy = WEBrick::HTTPProxyServer.new Port: 8777 | |
trap 'INT' do proxy.shutdown end | |
trap 'TERM' do proxy.shutdown end | |
proxy.start |
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
1) Have a PR against katello.git and foreman-packaging.git ready, both are ack'ed. Merge the katello one (it will build new source, but won't build a nightly rpm at that point, as deps are broken) | |
2) Merge the packaging pr | |
3) Open a new packaging PR updating the deps of rubygem-katello to match what was commited to katello.git (we have scripts for that) | |
-> Once the new katello source is built on jenkins, and the pulp bindings rpms are also built this third pr will become buildable/green, you merge that, everyone happy | |
To update rubygem-katello automatically: | |
gem2rpm -t gem2rpm/foreman_plugin.spec.erb katello-4.5.0.pre.master.gem | ./update-requirements specfile - packages/katello/rubygem-katello/rubygem-katello.spec | |
gem2rpm is in fedora, the spec.erb is in packaging.git and so is update-requirements |
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
mode=all ktest test/models/content_view_package_group_filter_test.rb -ntest_content_unit_pulp_ids_returns_pulp_href | |
mode=all ktest test/lib/tasks/pulpcore/repository_vcr_test.rb -ntest_correct_repositories_fixes_deleted_library_repo |
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
# Precursor: a user tries deleting a repository, but the task fails because there are related CVV repositories | |
# Load the repository that needs to be deleted: | |
# repository = ::Katello::Repository.find(< library repo id >) | |
library_instances_inverse = repository.library_instances_inverse | |
# Double check that the `library_instances_inverse` repositories are all CV repos that should be deleted | |
affected_cvv_ids = library_instances_inverse.pluck(:content_view_version_id).uniq | |
# Double check that the content view versions are indeed the ones that should lose the target repository | |
ForemanTasks.sync_task(::Actions::BulkAction, ::Actions::Katello::Repository::Destroy, library_instances_inverse) |
NewerOlder