Pulp 3 Integration » History » Version 59
Ian Ballou, 06/30/2020 03:47 PM
1 | 1 | Justin Sherrill | h1. Pulp 3 Integration |
---|---|---|---|
2 | |||
3 | This page is meant to capture links to various resources around pulp3 integration |
||
4 | |||
5 | * Initial Integration Document: https://docs.google.com/document/d/1eFM4H9BteA_nTDbUkRJgEiqSttXfAtB9-51a_OuwVJw/edit?usp=sharing |
||
6 | * Initial Community Post: https://community.theforeman.org/t/pulp-3-migration/10474 |
||
7 | * Youtube Videos: https://www.youtube.com/playlist?list=PL59WSIBtIpv7tbjnsEAWNcdiOKAmjjgqE |
||
8 | * Tasks List: https://docs.google.com/spreadsheets/d/1PFx-VAEXlivlqDYR9INMW26AUWtuMS_XtEnwhFVP5Rc/edit?usp=sharing |
||
9 | 17 | John Mitsch | * Main Tracker: https://projects.theforeman.org/issues/26987 |
10 | 2 | Justin Sherrill | |
11 | 41 | Justin Sherrill | h2. Katello Dev box with pulp3: |
12 | 40 | Samir Jha | |
13 | * vagrant up katello-dev-box |
||
14 | 1 | Justin Sherrill | * vagrant ssh katello-dev-box |
15 | |||
16 | 42 | Justin Sherrill | h2. Adding the yum plugin: |
17 | 40 | Samir Jha | <pre> |
18 | 53 | James Jeffers | sudo yum install -y gcc make cmake bzip2-devel expat-devel file-devel glib2-devel libcurl-devel libmodulemd2-devel ninja-build libxml2-devel python36-devel python36-gobject rpm-devel openssl-devel sqlite-devel xz-devel zchunk-devel zlib-devel swig3 |
19 | 40 | Samir Jha | sudo pip3 install scikit-build nose |
20 | 1 | Justin Sherrill | sudo pip3 install pulp-rpm==3.0.0 |
21 | 50 | Samir Jha | cd /usr/lib/python3.6/site-packages/pulpcore |
22 | 40 | Samir Jha | sudo -u pulp PULP_SETTINGS='/etc/pulp/settings.py' DJANGO_SETTINGS_MODULE='pulpcore.app.settings' python3-django-admin migrate --no-input |
23 | sudo systemctl restart pulpcore-resource-manager pulpcore-content pulpcore-api pulpcore-worker@1 pulpcore-worker@2 |
||
24 | </pre> |
||
25 | |||
26 | 57 | Samir Jha | h2. Adding the certguard plugin: |
27 | <pre> |
||
28 | sudo pip3 install pulp_certguard |
||
29 | sudo pip3 install python-dateutil |
||
30 | sudo pip3 install rhsm |
||
31 | sudo systemctl restart pulpcore* |
||
32 | </pre> |
||
33 | |||
34 | 40 | Samir Jha | * Refresh the smart proxy |
35 | # login to katello/foreman |
||
36 | # navigate to infrastructure > smart proxies |
||
37 | # click 'refresh' in the list of actions beside your smart proxy |
||
38 | |||
39 | 58 | Ian Ballou | * Enable Katello Applicability |
40 | # Add the following to ~/foreman/config/settings.plugins.d/katello.yaml: |
||
41 | |||
42 | <pre>:katello_applicability: true</pre> |
||
43 | |||
44 | 45 | Samir Jha | You should now see file, docker and yum as supported content type under pulpcore in the *Services tab* |
45 | 40 | Samir Jha | |
46 | 44 | Samir Jha | h2. Katello Dev box with pulp3 on master: |
47 | 1 | Justin Sherrill | |
48 | 44 | Samir Jha | On a devel box provisioned with steps above, run : |
49 | |||
50 | <pre> |
||
51 | 1 | Justin Sherrill | sudo pip3 install scikit-build nose |
52 | sudo yum install -y gcc make cmake bzip2-devel expat-devel file-devel glib2-devel libcurl-devel libmodulemd2-devel ninja-build libxml2-devel python36-devel python36-gobject rpm-devel openssl-devel sqlite-devel xz-devel zchunk-devel zlib-devel swig3 |
||
53 | 55 | Justin Sherrill | |
54 | sudo pip3 install "git+https://github.com/pulp/pulpcore.git" \ |
||
55 | "git+https://github.com/pulp/pulp_file.git" \ |
||
56 | "git+https://github.com/pulp/pulp_rpm.git" \ |
||
57 | "git+https://github.com/pulp/pulp_container.git" \ |
||
58 | "git+https://github.com/pulp/pulp-2to3-migration.git" |
||
59 | |||
60 | 56 | Justin Sherrill | cd /tmp |
61 | 55 | Justin Sherrill | sudo -u pulp PULP_SETTINGS='/etc/pulp/settings.py' /usr/local/bin/pulpcore-manager migrate |
62 | |||
63 | |||
64 | 44 | Samir Jha | cd ~/foreman |
65 | bundle exec rails katello:reset |
||
66 | </pre> |
||
67 | 40 | Samir Jha | |
68 | 48 | Samir Jha | |
69 | Add the following to your /etc/pulp/settings.py |
||
70 | |||
71 | <pre> |
||
72 | AUTHENTICATION_BACKENDS = ['pulpcore.app.authentication.PulpNoCreateRemoteUserBackend'] |
||
73 | |||
74 | REST_FRAMEWORK__DEFAULT_AUTHENTICATION_CLASSES = ( |
||
75 | 'rest_framework.authentication.SessionAuthentication', |
||
76 | 'pulpcore.app.authentication.PulpRemoteUserAuthentication' |
||
77 | ) |
||
78 | |||
79 | </pre> |
||
80 | |||
81 | |||
82 | 49 | Justin Sherrill | h2. Updating to a New Pulp Version in master & nightly: |
83 | |||
84 | 1. Install new version locally ontop of existing version with a pip3 install command |
||
85 | 2. Identify any installer changes, open installer PRs |
||
86 | 3. Identify katello updates: |
||
87 | * Updating pulp client gem bindings in katello.gemspec |
||
88 | * re-record vcr cassettes |
||
89 | * Identify any katello code changes needed to fix test cases |
||
90 | * open katello PR with changes |
||
91 | |||
92 | 4. Update client binding rpms at foreman-packaging |
||
93 | 5. Request rpm builds email satellite6-build@redhat.com or open a pr ourselves: https://github.com/evgeni/pulpcore-packaging#build |
||
94 | |||
95 | |||
96 | |||
97 | |||
98 | |||
99 | 48 | Samir Jha | |
100 | |||
101 | 41 | Justin Sherrill | h2. Old (ansible-based) way to deploy pulp3: |
102 | 2 | Justin Sherrill | |
103 | 15 | Justin Sherrill | * Install a katello dev environment with forklift |
104 | 32 | Ian Ballou | * Install the following packages in your dev box: |
105 | 34 | Ian Ballou | <pre>sudo yum -y install https://people.redhat.com/iballou/libcomps-0.1.12-1.git.0.937a666.el7.x86_64.rpm</pre> |
106 | <pre>sudo yum -y install https://people.redhat.com/iballou/python3-libcomps-0.1.12-1.git.0.937a666.el7.x86_64.rpm</pre> |
||
107 | 15 | Justin Sherrill | * checkout this forklift pr if its not merged: https://github.com/theforeman/forklift/pull/980 |
108 | * setup ansible-pulp: |
||
109 | <pre> |
||
110 | cd forklift |
||
111 | git clone https://github.com/pulp/ansible-pulp.git |
||
112 | 1 | Justin Sherrill | cd ansible-pulp |
113 | 15 | Justin Sherrill | ansible-galaxy install -r requirements.yml -p ./roles |
114 | 29 | Justin Sherrill | ansible-galaxy install pulp.pulp_rpm_prerequisites -p ./roles |
115 | 15 | Justin Sherrill | </pre> |
116 | 24 | Samir Jha | |
117 | |||
118 | 15 | Justin Sherrill | * within forkflift run: |
119 | <pre> |
||
120 | ansible-playbook ./playbooks/katello_pulp3.yml -l centos7-katello-devel |
||
121 | </pre> |
||
122 | 1 | Justin Sherrill | |
123 | 15 | Justin Sherrill | * Refresh the smart proxy: |
124 | |||
125 | 1. login to katello/foreman |
||
126 | 2. navigate to infrastructure > smart proxies |
||
127 | 3. click 'refresh' in the list of actions beside your smart proxy |
||
128 | You're now rockin' Pulp3 |
||
129 | 18 | Partha Aji | |
130 | |||
131 | 22 | Samir Jha | * *Known Issue:* Can't seem to use pulp3 on the box since pulp-api.service fails to start. |
132 | <pre> |
||
133 | sudo chmod -R 777 /etc/pki/pulp/ |
||
134 | 30 | John Mitsch | sudo systemctl restart pulpcore-api.service |
135 | 22 | Samir Jha | </pre> |
136 | 18 | Partha Aji | |
137 | 33 | Chris Roberts | * Reset the Katello Pulp 3 Dev Environment |
138 | From within the Foreman directory: |
||
139 | <pre>bundle exec rake katello:reset</pre> |
||
140 | |||
141 | 23 | Samir Jha | h2. Smart Proxy Setup: |
142 | |||
143 | * Install a smart proxy to point to your pulp3_dev box |
||
144 | * ssh into the smart proxy |
||
145 | * sudo mkdir /etc/httpd/conf.d/05-foreman-ssl.d |
||
146 | * sudo vi /etc/httpd/conf/httpd.conf |
||
147 | * Add IncludeOptional "/etc/httpd/conf.d/05-foreman-ssl.d/*.conf to the end of the file and save |
||
148 | * In forklift > Run ansible-playbook ./playbooks/katello_pulp3.yml -l centos7-proxy-devel |
||
149 | |||
150 | 59 | Ian Ballou | h2. Example for querying the Pulp 3 API in a development environment: |
151 | <pre> |
||
152 | curl https://`hostname`/pulp/api/v3/status/ --cert /etc/pki/katello/certs/pulp-client.crt --key /etc/pki/katello/private/pulp-client.key |
||
153 | </pre> |
||
154 | |||
155 | 25 | Justin Sherrill | h3. Other Resources |
156 | |||
157 | * pulp3 gap analysis wiki https://projects.theforeman.org/projects/katello/wiki/PulpV3GapAnalysis |
||
158 | * pulp3 gap analysis etherpad https://etherpad.net/p/pulp3_container |
||
159 | * pulp3 docker roadmap https://pulp.plan.io/projects/pulp/wiki/Pulp_Docker_Roadmap |