File tree Expand file tree Collapse file tree
yoda_external_user_service/tasks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,9 +59,9 @@ RUN useradd yodadeployment && \
5959COPY yoda-external-user-service-vhost.conf /etc/apache2/sites-available/003-yoda-eus-vhost.conf
6060RUN ln -s /etc/apache2/sites-available/003-yoda-eus-vhost.conf /etc/apache2/sites-enabled/003-yoda-eus-vhost.conf
6161RUN virtualenv --python /usr/bin/python3 /var/www/extuser/yoda-external-user-service/venv && \
62- /var/www/extuser/yoda-external-user-service/venv/bin/pip3 install --no-cache-dir pip==25.0 && \
6362 /var/www/extuser/yoda-external-user-service/venv/bin/pip3 install --no-cache-dir virtualenv==20.28.0 && \
6463 /var/www/extuser/yoda-external-user-service/venv/bin/python3 -m virtualenv /var/www/extuser/yoda-external-user-service/venv && \
64+ /var/www/extuser/yoda-external-user-service/venv/bin/pip3 install --no-cache-dir pip==26.2.2 && \
6565 /var/www/extuser/yoda-external-user-service/venv/bin/pip3 install --no-cache-dir /var/www/extuser/yoda-external-user-service
6666
6767# Make copy of data on volumes that can optionally be bind mounted, so the container init script
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ COPY irods_environment.json /var/lib/irods/.irods/irods_environment.json
111111# Install and configure rulesets
112112RUN git clone -b ${YODA_RULESET_BRANCH} ${YODA_RULESET_REPO} /etc/irods/yoda-ruleset
113113# hadolint ignore=DL3004
114- RUN sudo -u irods python3 -m pip --no-cache-dir install --user --break-system-packages pip==25.0 && \
114+ RUN sudo -u irods python3 -m pip --no-cache-dir install --user --break-system-packages pip==26.2.2 && \
115115 sudo -u irods python3 -m pip --no-cache-dir install --user --break-system-packages -r /etc/irods/yoda-ruleset/requirements.txt && \
116116 sudo -u irods python3 -m pip install --user --break-system-packages python-irodsclient==3.3.0 && \
117117 sudo -u irods python3 -m pip install --user --break-system-packages psutil==6.1.0
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ RUN mkdir -p /var/www/yoda/config && \
5353COPY yoda-portal-vhost.conf /etc/apache2/sites-available/001-yoda-portal-vhost.conf
5454RUN ln -s /etc/apache2/sites-available/001-yoda-portal-vhost.conf /etc/apache2/sites-enabled/001-yoda-portal-vhost.conf
5555RUN virtualenv --python /usr/bin/python3 /var/www/yoda/venv && \
56- /var/www/yoda/venv/bin/pip3 install --no-cache-dir pip==25.0 && \
56+ /var/www/yoda/venv/bin/pip3 install --no-cache-dir pip==26.2.2 && \
5757 /var/www/yoda/venv/bin/pip3 install --no-cache-dir -r /var/www/yoda/requirements.txt
5858
5959# Make copy of data on volumes that can optionally be bind mounted, so the container init script
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ RUN mkdir -p /var/www/moai /var/www/moai/metadata && \
5050 chmod 0755 /var/www/moai /var/www/moai/metadata && \
5151 chown -R yodadeployment:yodadeployment /var/www/moai && \
5252 virtualenv --python /usr/bin/python3 /var/www/moai/yoda-moai/venv && \
53- /var/www/moai/yoda-moai/venv/bin/pip3 install --no-cache-dir pip==26.0.1
53+ /var/www/moai/yoda-moai/venv/bin/pip3 install --no-cache-dir pip==26.2.2
5454
5555# # Install PySQLite3 for MOAI
5656ENV C_INCLUDE_PATH /usr/include/python3.12:/usr/include
Original file line number Diff line number Diff line change @@ -49,9 +49,9 @@ COPY --chown=yodadeployment:yodadeployment sram_mock.json /var/www/webmock/sram/
4949COPY yoda-web-mock-vhost.conf /etc/apache2/sites-available/yoda-web-mock-vhost.conf
5050RUN ln -s /etc/apache2/sites-available/yoda-web-mock-vhost.conf /etc/apache2/sites-enabled/yoda-web-mock-vhost.conf
5151RUN virtualenv --python /usr/bin/python3 /var/www/webmock/venv && \
52- /var/www/webmock/venv/bin/pip3 install --no-cache-dir pip==25.0 && \
5352 /var/www/webmock/venv/bin/pip3 install --no-cache-dir virtualenv==20.28.0 && \
5453 /var/www/webmock/venv/bin/python3 -m virtualenv /var/www/webmock/venv && \
54+ /var/www/webmock/venv/bin/pip3 install --no-cache-dir pip==26.2.2 && \
5555 /var/www/webmock/venv/bin/pip3 install --no-cache-dir -e /var/www/webmock/yoda-web-mock
5656
5757# Make copy of data on volumes that can optionally be bind mounted, so the container init script
Original file line number Diff line number Diff line change 1+ ---
2+ # copyright Utrecht University
3+
4+ # pip version to use for Yoda virtual environments, we need to use a hash
5+ # because certificate validation may be compromised in older pip versions.
6+ python3_venv_pip_version : " 26.2.2 --hash=sha256:fd7f4dfa8190e014013b9f08f3e973f4e4c26ffd179a204895533a7254813a70"
7+ python3_venv_pip_requirements : /usr/local/share/yoda/venv-pip-requirements.txt
Original file line number Diff line number Diff line change 99- name : Install Python 3 for Debian family
1010 ansible.builtin.include_tasks : install-debian.yml
1111 when : ansible_facts['os_family'] == 'Debian'
12+
13+
14+ - name : Ensure directory for Yoda Python requirements exists
15+ ansible.builtin.file :
16+ path : " {{ python3_venv_pip_requirements | dirname }}"
17+ state : directory
18+ owner : root
19+ group : root
20+ mode : ' 0755'
21+
22+
23+ - name : Ensure hash-pinned pip requirements for virtual environments are present
24+ ansible.builtin.copy :
25+ content : |
26+ pip=={{ python3_venv_pip_version }}
27+ dest : " {{ python3_venv_pip_requirements }}"
28+ owner : root
29+ group : root
30+ mode : ' 0644'
Original file line number Diff line number Diff line change 207207 creates : " /var/www/extuser/yoda-external-user-service/venv/bin/activate_this.py"
208208
209209
210- - name : Upgrade pip and virtualenv in Yoda EUS virtual environment
210+ - name : Ensure virtualenv is installed in Yoda EUS virtual environment
211211 become_user : ' {{ yoda_deployment_user }}'
212212 become : true
213213 ansible.builtin.pip :
214- name :
215- - pip==25.0
216- - virtualenv==20.28.0
214+ name : virtualenv==20.28.0
217215 executable : /var/www/extuser/yoda-external-user-service/venv/bin/pip3
218216
219217
225223 creates : " /var/www/extuser/yoda-external-user-service/venv/bin/activate_this.py"
226224
227225
226+ # Upgrade pip after seeding, because virtualenv installs its own bundled pip version.
227+ - name : Upgrade pip in Yoda EUS virtual environment
228+ become_user : ' {{ yoda_deployment_user }}'
229+ become : true
230+ ansible.builtin.pip :
231+ requirements : " {{ python3_venv_pip_requirements }}"
232+ extra_args : --require-hashes
233+ executable : /var/www/extuser/yoda-external-user-service/venv/bin/pip3
234+
235+
228236# Change detection in git repositories is unreliable in some Ansible versions, so we always
229237# run this task, just to be sure.
230238- name : Ensure Yoda EUS dependencies are installed
Original file line number Diff line number Diff line change 5555 creates : " {{ yoda_moai_home }}/yoda-moai/venv/bin/activate_this.py"
5656
5757
58- - name : Upgrade pip and virtualenv in Yoda MOAI environment
58+ - name : Upgrade pip in Yoda MOAI environment
5959 become_user : ' {{ yoda_moai_user }}'
6060 become : true
6161 ansible.builtin.pip :
62- name :
63- - pip==26.0.1
64- - virtualenv==20.28.0
62+ requirements : " {{ python3_venv_pip_requirements }}"
63+ extra_args : --require-hashes
64+ executable : /var/www/moai/yoda-moai/venv/bin/pip3
65+
66+
67+ - name : Ensure virtualenv is installed in Yoda MOAI environment
68+ become_user : ' {{ yoda_moai_user }}'
69+ become : true
70+ ansible.builtin.pip :
71+ name : virtualenv==20.28.0
6572 executable : /var/www/moai/yoda-moai/venv/bin/pip3
6673
6774
Original file line number Diff line number Diff line change 8181 become_user : " {{ yoda_deployment_user }}"
8282 become : true
8383 ansible.builtin.pip :
84- name :
85- - pip==25.0
84+ requirements : " {{ python3_venv_pip_requirements }} "
85+ extra_args : --require-hashes
8686 executable : /var/www/yoda/venv/bin/pip3.12
8787
8888
You can’t perform that action at this time.
0 commit comments