Skip to content

Instantly share code, notes, and snippets.

@jjeffers
Last active April 16, 2021 11:46
Show Gist options
  • Save jjeffers/78104b42782c9be8986dd5ea49e6d1b4 to your computer and use it in GitHub Desktop.
Save jjeffers/78104b42782c9be8986dd5ea49e6d1b4 to your computer and use it in GitHub Desktop.
proxy devel pulpcore smart proxy container gateway setup for testing plugin

On the proxy:

  • yum group install "Development Tools"

  • yum install rh-ruby27-ruby-devel

  • scl enable tfm bash

  • yum install sqlite-dev

  • gem install sqlite

  • gem build smart_proxy_container_gateway.gemspec

  • gem install smart_proxy_container_gateway-x.x.x.gem

  • edit /etc/foreman-proxy/settings.d/container_gateway.yml:

  :pulp_endpoint: 'https://centos7-katello-devel-stable.example.com'
  :pulp_client_ssl_cert: '/etc/pki/katello/certs/pulp-client.crt'
  :pulp_client_ssl_key: '/etc/pki/katello/private/pulp-client.key'
  • confirm file /usr/share/foreman-proxy/bundler.d/container_gateway.rb has
gem "smart_proxy_container_gateway"
  • sudo su -

    • scl enable tfm bash
    • install /home/vagrant/projects/smart_proxy_container_gateway/smart_proxy_container_gateway-GEMVERSION.gem
  • (on katello server) cp /etc/pki/katello/certs/pulp-client.crt to proxy

  • (on katello server) cp /etc/pki/katello/private/pulp-client.key to proxy

  • (on proxy) sudo chmod 0644 /etc/pki/katello/private/pulp-client.key

  • (on proxy) sudo chown root:foreman-proxy /etc/pki/katello/private/pulp-client.key

  • sudo systemctl restart foreman-proxy

  • curl https://hostname:9090/features, check for plugin

@ianballou
Copy link

For future reference, don't forget to add a proper container_gateway.rb file to /usr/share/foreman-proxy/bundler.d/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment