Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Perl postinstall script #7841

Merged
merged 19 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .github/workflows/postinstall.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ on:

env:
PYTHON3_VERSION: '3.6'
PYTHON2_VERSION: '2.7'

jobs:
postinstall-tests:
Expand All @@ -48,11 +47,6 @@ jobs:
if: ${{ steps.checkout.outcome == 'success' }}
with:
python-version: '${{ env.PYTHON3_VERSION }}'
- name: Install Python ${{ env.PYTHON2_VERSION }}
uses: actions/setup-python@v4
if: ${{ steps.checkout.outcome == 'success' }}
with:
python-version: '${{ env.PYTHON2_VERSION }}'
- name: Run Postinstall Tests
if: ${{ steps.checkout.outcome == 'success' }}
run: traffic_ops/install/bin/postinstall.test.sh
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
### Fixed
- [#7846](https://github.com/apache/trafficcontrol/pull/7846) *Traffic Portal* Increase State character limit

### Removed
- [#7832](https://github.com/apache/trafficcontrol/pull/7832) *t3c* Removed Perl dependency
- [#7841](https://github.com/apache/trafficcontrol/pull/7841) *Postinstall* Removed Perl implementation and Python 2.x support

## [8.0.0] - 2023-09-20
### Added
- [#7672](https://github.com/apache/trafficcontrol/pull/7672) *Traffic Control Health Client*: Added peer monitor flag while using `strategies.yaml`.
Expand Down
13 changes: 8 additions & 5 deletions docs/source/admin/traffic_ops.rst
Original file line number Diff line number Diff line change
Expand Up @@ -208,17 +208,20 @@ Guide
| Password for the admin user | The password for the administrative Traffic Ops user. |
+----------------------------------------------------+------------------------------------------------------------------------------------------------+

.. deprecated:: ATCv6
The postinstall script is now written in Python. If you run into issues with the postinstall script, you are encouraged to file an issue at https://github.com/apache/trafficcontrol/issues/new/choose. The original Perl postinstall script is deprecated and will be removed in a future ATC release. To use the deprecated version anyway, run ``/opt/traffic_ops/install/bin/_postinstall.pl`` directly instead of ``/opt/traffic_ops/install/bin/postinstall``.

The postinstall script can also be run non-interactively using :atc-file:`traffic_ops/install/bin/input.json`. To use it, first change the values to match your environment, then pass it to the ``postinstall`` script:
.. code-block:: console
:caption: Postinstall in Automatic (-a) mode

/opt/traffic_ops/install/bin/postinstall -a --cfile /opt/traffic_ops/install/bin/input.json

.. deprecated:: ATCv6
Once the Perl script is removed, the values in ``input.json`` for the ``"hidden"`` properties will be changed from ``"1"`` and ``"0"`` to ``true`` and ``false``.
.. versionchanged:: ATCv8
The values in ``input.json`` for the ``"hidden"`` properties have been changed from ``"1"`` and ``"0"`` to ``true`` and ``false``.

.. versionchanged:: ATCv8
Python 2.x is no longer supported by the ``postinstall`` script.

.. versionremoved:: ATCv8
In earlier versions of ATC, it was possible to run ``postinstall`` using Perl - no longer.

.. _to-upgrading:

Expand Down
3 changes: 2 additions & 1 deletion infrastructure/cdn-in-a-box/traffic_ops/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ RUN set -o nounset -o errexit -o xtrace && \
perl-libwww-perl \
perl-TermReadKey \
perl-Test-CPAN-Meta \
perl-WWW-Curl; \
perl-WWW-Curl \
python3; \
dnf clean all

FROM trafficops-dependencies AS trafficops
Expand Down
2 changes: 1 addition & 1 deletion traffic_ops/build/traffic_ops.spec
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Requires: openssl-devel, perl, perl-core, perl-DBD-Pg, perl-DBI, perl-Di
Requires: libidn-devel, libcurl-devel, libcap
Requires: postgresql13 >= 13.2
Requires: perl-JSON, perl-libwww-perl, perl-Test-CPAN-Meta, perl-WWW-Curl, perl-TermReadKey, perl-Crypt-ScryptKDF
Requires: python(abi)
Requires: python3
Requires(pre): /usr/sbin/useradd, /usr/bin/getent
Requires(postun): /usr/sbin/userdel

Expand Down
Loading
Loading