Code Monkey home page Code Monkey logo

Comments (4)

cidrblock avatar cidrblock commented on June 24, 2024 2

Ah!

Try setting the pull policy to never and/or change the default image to a local image. This can be done in the navigator config file

https://ansible.readthedocs.io/projects/navigator/settings/#pull-policy
https://ansible.readthedocs.io/projects/navigator/settings/#execution-environment-image

You can also set the default image to something with a version, in which case it will only pull if the tag is not available (from the docs)

Specify the image pull policy 
always:Always pull the image, 
missing:Pull if not locally available, 
never:Never pull the image, 
tag:if the image tag is 'latest', always pull the image, otherwise pull if not locally available

As a development tool the defaults are pretty aggresive, always trying to get the latest default image. (not something you would do in production)

lmk, brad

from ansible-navigator.

ssbarnea avatar ssbarnea commented on June 24, 2024

@cidrblock What is your take on this? My impression was that as long the user configures a custom "local" registry, this would also work, so no need for an "offline" option.

from ansible-navigator.

cidrblock avatar cidrblock commented on June 24, 2024

The only "online" requirement navigator has is to "pull" a container. If the container is already available locally, the pull policy can be set to "never" which would allow it to work offline.

If you happen to be running a registry locally, all the podman docker conf files are still used and respected. This might be as simple as adding something like this

[[registry]]
location="localhost:5000"
insecure=true

to the registry conf file (untested)

from ansible-navigator.

nodje avatar nodje commented on June 24, 2024

It makes sense, and it should work but navigator keeps using ghcr.io even with a local registry configured in /etc/containers/registries.conf

See for instance:

ansible-navigator 
---------------------------------------------------------------------
Execution environment image and pull policy overview
---------------------------------------------------------------------
Execution environment image name:     ghcr.io/ansible/creator-ee:v0.18.0
Execution environment image tag:      v0.18.0
Execution environment pull arguments: None
Execution environment pull policy:    tag
Execution environment pull needed:    True
---------------------------------------------------------------------
Updating the execution environment
---------------------------------------------------------------------
Running the command: podman pull ghcr.io/ansible/creator-ee:v0.18.0
Trying to pull ghcr.io/ansible/creator-ee:v0.18.0...
Error: initializing source docker://ghcr.io/ansible/creator-ee:v0.18.0: pinging container registry ghcr.io: Get "https://ghcr.io/v2/": dial tcp: lookup ghcr.io on 159.95.1.17:53: no such host

but the config in in /etc/containers/registries.conf IS taken into account and allows container image retrieval.

(venv) [root@s02vl9905536 automation-admin]# podman pull python:3.9-slim
Trying to pull docker.artifactory-dogen.group.echonet/python:3.9-slim...
Getting image source signatures
Copying blob 2fd2c896255c skipped: already exists  
Copying blob bf3336e84c8e skipped: already exists  
Copying blob a803e7c4b030 skipped: already exists  
Copying blob 3614ca5053cf skipped: already exists  
Copying blob 7f93433c11f3 skipped: already exists  
Copying config cdecdc3a84 done  
Writing manifest to image destination
Storing signatures
cdecdc3a84699782600e00fde2c3e5067abdb3e4e1d560557fdc227b0c2b90b5

from ansible-navigator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.