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

Add runtime instructions #680

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add runtime instructions #680

wants to merge 1 commit into from

Conversation

grisu48
Copy link
Contributor

@grisu48 grisu48 commented Dec 2, 2024

Adds instructions for installing dependencies and optional environment variables that might help users.

README.rst Outdated
Comment on lines 63 to 65
# export OS_VERSION=15.6 # Target SLES version
# export CONTAINER_RUNTIME=podman # Defaults to podman
# export TARGET=ibs-cr # ibs-cr = ToTest, ibs = Released, obs = Tumbleweed
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# export OS_VERSION=15.6 # Target SLES version
# export CONTAINER_RUNTIME=podman # Defaults to podman
# export TARGET=ibs-cr # ibs-cr = ToTest, ibs = Released, obs = Tumbleweed
$ export OS_VERSION=15.6 # Target SLES version
$ export CONTAINER_RUNTIME=podman # Defaults to podman
$ export TARGET=ibs-cr # ibs-cr = ToTest, ibs = SUSE:SLE-15-SP*:Update:BCI, obs = devel:BCI:*

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the correction. I now also added factory-totest

README.rst Show resolved Hide resolved
README.rst Outdated Show resolved Hide resolved
README.rst Outdated Show resolved Hide resolved
Comment on lines +44 to +54
$ pip3 --quiet install --upgrade pip
$ pip3 --quiet install tox --ignore-installed six
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a --user flag here?

Suggested change
$ pip3 --quiet install --upgrade pip
$ pip3 --quiet install tox --ignore-installed six
$ pip3 --quiet install --user --upgrade pip
$ pip3 --quiet install --user tox --ignore-installed six

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should advertise installation of packages, or if that is unwanted for some reason, advertise the use of venvs instead of pip install globally (or as user which is also not possible on tumbleweed)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do like to advertise the use of venvs more than using the --user flag, so I added instructions to use a virtualenv.

By using the --user flag we need to explain that this will only work outside of virtualenvs and it's also not what we are using in our test flow in openQA, so I think that's not what we should document.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually I'd prefer if we wouldn't use the pip method in openQA either from a supply chain security perspective..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make this a meeting point on Tuesday, that requires more more engineering work especially on older versions (12-SP5) but if we want to do this, it should be possible.

For now I suggest we decouple this initiative from this PR, because that's not easy to solve and not worth waiting for IMHO.

.. code-block:: shell-session

$ sudo zypper -n in podman buildah docker git-core python3 python3-pip
$ pip3 --quiet install --upgrade pip
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not simply install python3-pip (or python311-pip) instead? seems simpler than this process imho.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But python3-pip is installed just in the line before. This is there to update pip, which we do, but I'm not sure if that's really needed.

Copy link
Member

@dirkmueller dirkmueller Dec 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not needed. but you should be installing python311 instead which is 3.11 rather than 3.6.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also needs to work on older versions, so this is the most generic version that will work at least on Leap and Tumbleweed.

If we advance to specifying python311 it will not work on Leap and require us to update the documentation every time there is a Leap release or Tumbleweed updates the major python version in use.

For the sake of making the document age better, I would stay with the generic version.

README.rst Outdated

# export OS_VERSION=15.6 # Target SLES version
# export CONTAINER_RUNTIME=podman # Defaults to podman
# export TARGET=ibs-cr # ibs-cr = ToTest, ibs = SUSE:SLE-15-SP*:Update:BCI, obs = devel:BCI:*, factory-totest = Factory
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is great, but we should have a section for each environment variable explaining what it means? happy to help with this myself.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a separate block now, please check again if that matches what you meant.

Adds instructions for installing dependencies and optional environment
variables that might help users.

.. code-block:: shell-session

$ sudo zypper -n in podman buildah docker git-core python3 python3-pip
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so is this supposed to be run inside the venv or outside? if it's inside the venv, you don't need to install python3-pip anymore, it is provided by the venv.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True only if running in a venv. I phrased the previous block as optional so in cases where people run this outside a venv (for whatever reasons) it would still be needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants