Discussion:
Base python requirements
Jason Kenny
2018-11-08 22:09:43 UTC
Permalink
I am looking at cleaning up the logic to "setup" what is needed to run
autest against traffic server.

The current logic "works" well but when it does not. It tries to install
python 3.5 if it is not installed. microserver needs to have python 3.5 or
better to work currently. I would like to move to require that the user has
to install a python 3.5 or better on the system to run the tests with the
python pipenv package installed. I would then replace the current script
with a pipfile ( used by pipenv). The autest.sh shell script will become as
simple as:

pipenv run autest <args for autest>

pipenv will create a virtual environment if it is not created and run
autest as needed. The pipefile will have the exact requirements we need to
run the tests. it also has a nice simple command such as :

pipenv shell that will create a shell with everything to run
autest correctly. A simple exit will go back to a clean shell. There are a
number of other commands. The main goal is that this makes it easier to set
up and run Autest and the extra tools such as uServer or traffic-replay for
people that don't know python as well as I do

Is there any concerns with having requirements that the user has to install
a python3.5 or better on their system as well as pipenv? I know all the
base system have a python 3.5 package today. So I don't believe this should
be a problem. This change should also make it easier for groups that are
using 3.6 or 3.7 on their systems to set everything up when they don't have
a python 3.5 to install.

Jason
Pushkar Pradhan
2018-11-08 23:23:37 UTC
Permalink
So we would have to explicitly install python 3.5 right?
Would it also work if it were python 3.6 or higher?
If it's strictly python 3.5 I find it a little restrictive.

Many of the tests launch a python script using Command = 'python
tcp_client.py' syntax.
That would continue to pull the correct python executable right?
Post by Jason Kenny
I am looking at cleaning up the logic to "setup" what is needed to run
autest against traffic server.
The current logic "works" well but when it does not. It tries to install
python 3.5 if it is not installed. microserver needs to have python 3.5 or
better to work currently. I would like to move to require that the user has
to install a python 3.5 or better on the system to run the tests with the
python pipenv package installed. I would then replace the current script
with a pipfile ( used by pipenv). The autest.sh shell script will become as
pipenv run autest <args for autest>
pipenv will create a virtual environment if it is not created and run
autest as needed. The pipefile will have the exact requirements we need to
pipenv shell that will create a shell with everything to run
autest correctly. A simple exit will go back to a clean shell. There are a
number of other commands. The main goal is that this makes it easier to set
up and run Autest and the extra tools such as uServer or traffic-replay for
people that don't know python as well as I do
Is there any concerns with having requirements that the user has to install
a python3.5 or better on their system as well as pipenv? I know all the
base system have a python 3.5 package today. So I don't believe this should
be a problem. This change should also make it easier for groups that are
using 3.6 or 3.7 on their systems to set everything up when they don't have
a python 3.5 to install.
Jason
--
pushkar
Jason Kenny
2018-11-09 14:33:10 UTC
Permalink
Post by Pushkar Pradhan
So we would have to explicitly install python 3.5 right?
Would it also work if it were python 3.6 or higher?
If it's strictly python 3.5 I find it a little restrictive.
You would have to install python 3.5 or better. This does mean python 3.6
or 3.7 will be ok. There is a need for at least python 3.5 because of
uServer depends ( This is why Python 3.4 does not work). The current
autest.sh script currently bootstraps a python 3.5 virtual environment.
This will break at some point on some newer distros.
Post by Pushkar Pradhan
Post by Pushkar Pradhan
Many of the tests launch a python script using Command = 'python
tcp_client.py' syntax.

It should in most cases. However, there is a better way for users to say
this in python to allow the python to be the same guarantee that this
python is the same one we are running. I will see about getting a patch out
with the better way.

Jason
Post by Pushkar Pradhan
So we would have to explicitly install python 3.5 right?
Would it also work if it were python 3.6 or higher?
If it's strictly python 3.5 I find it a little restrictive.
Many of the tests launch a python script using Command = 'python
tcp_client.py' syntax.
That would continue to pull the correct python executable right?
Post by Pushkar Pradhan
I am looking at cleaning up the logic to "setup" what is needed to run
autest against traffic server.
The current logic "works" well but when it does not. It tries to install
python 3.5 if it is not installed. microserver needs to have python 3.5
or
Post by Pushkar Pradhan
better to work currently. I would like to move to require that the user
has
Post by Pushkar Pradhan
to install a python 3.5 or better on the system to run the tests with the
python pipenv package installed. I would then replace the current script
with a pipfile ( used by pipenv). The autest.sh shell script will become
as
Post by Pushkar Pradhan
pipenv run autest <args for autest>
pipenv will create a virtual environment if it is not created and run
autest as needed. The pipefile will have the exact requirements we need
to
Post by Pushkar Pradhan
pipenv shell that will create a shell with everything to run
autest correctly. A simple exit will go back to a clean shell. There are
a
Post by Pushkar Pradhan
number of other commands. The main goal is that this makes it easier to
set
Post by Pushkar Pradhan
up and run Autest and the extra tools such as uServer or traffic-replay
for
Post by Pushkar Pradhan
people that don't know python as well as I do
Is there any concerns with having requirements that the user has to
install
Post by Pushkar Pradhan
a python3.5 or better on their system as well as pipenv? I know all the
base system have a python 3.5 package today. So I don't believe this
should
Post by Pushkar Pradhan
be a problem. This change should also make it easier for groups that are
using 3.6 or 3.7 on their systems to set everything up when they don't
have
Post by Pushkar Pradhan
a python 3.5 to install.
Jason
--
pushkar
Loading...