betadots / container-puppet-catalog-graph-viewer

Puppet Catalog Graph Viewer
GNU General Public License v3.0
0 stars 0 forks source link

info: inspirational links from slack #4

Open rwaffen opened 5 months ago

rwaffen commented 5 months ago

@Sharpie wrote in the slack:

https://observablehq.com/@d3/gallery is also a good source of inspiration.

In particular, this looks like it could be a good solution for the "multiple inheritance" problem that the contain() function can create: https://observablehq.com/@nitaku/tangled-tree-visualization-ii

The TensorBoard graph is also worth looking into, as it has to deal with the high complexity of machine learning models --- which is a problem that pops up with large puppet catalogs: http://idl.cs.washington.edu/files/2018-TensorFlowGraph-VAST.pdf

The PE Node Graph was built from scratch by one of the engineering teams and did not use the above prototype, but it did build on top of this open source library: https://github.com/dagrejs/dagre-d3

tuxmea commented 4 months ago

Screenshots from PE 2016:

Screenshot 2024-06-20 at 15 16 32 Screenshot 2024-06-20 at 15 16 49 Screenshot 2024-06-20 at 15 16 58 Screenshot 2024-06-20 at 15 17 10
bastelfreak commented 4 months ago
stage { 'pre': }
stage { 'post': }
stage { 'postpost': }

Stage['pre'] -> Stage['main'] -> Stage['post'] -> Stage['postpost']

class foo {
  file { '/tmp/numbers':
    ensure => 'file',
  }
}
class { 'foo':
  stage => 'pre',
}

class htop {
  package { 'htop':
    ensure => 'installed',
  }
}
class { 'htop':
  stage  => 'pre',
}

class openssh {
  package { 'openssh':
    ensure => 'installed',
  }
}
class { 'openssh':
  stage  => 'main',
}

class rangee {
  $fpath = '/tmp/numbers'
  range(0, 4000).each |$element| {
    $require = if ($element % 2) == 0 {
      [File[$fpath],Package['openssh']]
    } else {
      [File[$fpath],Package['htop']]
    }
    file_line { "${element}-${fpath}":
      path    => $fpath,
      line    => "${element}\n",
      require => $require,
    }
  }
}

class { 'rangee':
  stage => 'post',
}

class bash {
  package { 'bash':
    ensure => 'installed',
  }
}
class { 'bash':
  stage  => 'postpost',
}
bastelfreak commented 4 months ago
package { 'openssh':
  ensure => 'installed',
}
package { 'htop':
  ensure => 'installed',
}

file { '/tmp/numbers':
  ensure => 'file',
}

$fpath = '/tmp/numbers'
range(0, 4000).each |$element| {
  $require = if ($element % 2) == 0 {
    [File[$fpath],Package['openssh']]
  } else {
    [File[$fpath],Package['htop']]
  }
  file_line { "${element}-${fpath}":
    path    => $fpath,
    line    => "${element}\n",
    require => $require,
  }
}
bastelfreak commented 4 months ago
package { 'openssh':
  ensure => 'installed',
}
package { 'htop':
  ensure => 'installed',
}

file { '/tmp/numbers':
  ensure => 'file',
}

$fpath = '/tmp/numbers'
range(0, 4000).each |$element| {
  file_line { "${element}-${fpath}":
    path    => $fpath,
    line    => "${element}\n",
  }
}
bastelfreak commented 4 months ago

plain PE without custom code

bastelfreak commented 4 months ago

cycle:

package { 'openssh':
  require => Package['htop'],
}
package { 'htop':
  require => Package['openssh'],
}

@oneiros I added a few catalogs + dot files, I hope that helps