puppet-nomad icon indicating copy to clipboard operation
puppet-nomad copied to clipboard

CNI plugins for Consul connect

Open akshatgit opened this issue 5 years ago • 4 comments

Just wanted to know if this is in pipeline. We want to use Consul connect and for this, there is a requirement for CNI plugins installation on Nomad. Ref: https://www.nomadproject.io/docs/integrations/consul-connect

Thanks Akshat

akshatgit avatar Oct 23 '20 09:10 akshatgit

I don't think the CNI plugin should be included in this module. We use a role/profile module to manage the nomad module and then install the cni plugins separatley

  class { '::nomad':
    version     => $version,
    config_hash => deep_merge($config_hash,$config)
  }

  file { '/opt/cni':
    ensure => directory,
    owner => 'nomad',
    group => 'nomad',
  } ->
  file { '/opt/cni/bin':
    ensure => directory,
    owner => 'nomad',
    group => 'nomad',
  } ->
  archive { 'cni-plugins':
    path => '/tmp/cni-plugins.tgz',
    source => 'https://github.com/containernetworking/plugins/releases/download/v0.8.5/cni-plugins-linux-amd64-v0.8.5.tgz',
    extract => true,
    extract_path => '/opt/cni/bin/',
    cleanup => true,
    creates => '/opt/cni/bin/flannel'
  }

spuder avatar Nov 02 '20 20:11 spuder

Hi @spuder, thanks for sharing this. This looks like a good workaround. But I still think we should include it in the module. Systems where we require cni plugins, we can just include it. If you think this is not required, please close this issue.

Thanks, Akshat

akshatgit avatar Nov 11 '20 12:11 akshatgit

personally i have it install from a profile as well, however i do feel there might be a place for it in this module however. But in a separate class and or behind a feature switch

attachmentgenie avatar Jan 01 '21 12:01 attachmentgenie

@attachmentgenie , @akshatgit @spuder , please have a look onto this one: https://github.com/GEANT/nomad_cni

maxadamo avatar Mar 11 '23 11:03 maxadamo