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

docker method install: no way to set/use custom image/registry source #242

Open
olevole opened this issue Apr 2, 2021 · 1 comment
Open

Comments

@olevole
Copy link

olevole commented Apr 2, 2021

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 7.0.2
  • Ruby: any
  • Distribution: Ubuntu 20.04
  • Module version: v8.0.0

How to reproduce (e.g Puppet code you use)

Use follow config and try to apply ( where my-docker-registry/grafana/grafana - valid docker registry ):

  class { 'grafana':
    install_method  => 'docker',
    version => '7.5.2',
    docker_image => 'my-docker-registry/grafana/grafana',
    #version => 'my-docker-registry/grafana/grafana:7.5.2',
    #image_tag => 'my-docker-registry/grafana/grafana',
    container_params => {
      'image' => "my-docker-registry/grafana/grafana:7.5.2",
      'ports' => '3000:3000',
    }
  }

What are you seeing

Module always tries to download from https://registry-1.docker.io/v2/ + grafana/grafana:$version

Notice: /Stage[main]/Grafana::Install/Docker::Image[grafana/grafana]/Exec[/usr/local/bin/update_docker_image.sh grafana/grafana:7.5.2]/returns: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
Notice: /Stage[main]/Grafana::Install/Docker::Image[grafana/grafana]/Exec[/usr/local/bin/update_docker_image.sh grafana/grafana:7.5.2]/returns: Docker image grafana/grafana:7.5.2 failed to pull!

The module always downloads grafana/grafana image

What behaviour did you expect instead

be able to specify an alternative registry/repository

Output log

Any additional information you'd like to impart

Apparently, the problem is here, install.pp:

case $grafana::install_method {
    'docker': {
      docker::image { 'grafana/grafana':
        image_tag => $grafana::version,
        require   => Class['docker'],
      }
    }
@olevole
Copy link
Author

olevole commented Apr 2, 2021

It seems to 'docker_image' + 'container_params' ignored in service.pp:

      $container = {
        'grafana' => $grafana::container_params,
      }

      $defaults = {
        image => "${grafana::docker_image}:${grafana::version}",
        ports => $grafana::docker_ports,
      }

      create_resources(docker::run, $container, $defaults)

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

No branches or pull requests

1 participant