Puppet Class: emqx::install

Defined in:
manifests/install.pp

Summary

Manage install of emqx

Overview

Downloads and installs the emqx package

Examples:

include emqx::install

Parameters:

  • package_source (String) (defaults to: $emqx::install_package_source)

    The location to source the package from.

  • version (String) (defaults to: $emqx::install_version)

    The version of emqx. Default: emqx::install_version

  • platform (String) (defaults to: $emqx::install_platform)

    The os platform in order to download the required package.

  • package_extension (String) (defaults to: $emqx::install_package_extension)

    The file extension for the package.



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'manifests/install.pp', line 26

class emqx::install (
  String $package_source    = $emqx::install_package_source,
  String $version           = $emqx::install_version,
  String $platform          = $emqx::install_platform,
  String $package_extension = $emqx::install_package_extension,
) {
  $architecture = 'amd64'
  $package_filename = "emqx-${version}-${platform}-${architecture}.${package_extension}"

  file { "/tmp/${package_filename}":
    ensure => file,
    source => "${package_source}/v${version}/${package_filename}",
  }

  package { 'emqx':
    ensure  => $version,
    source  => "/tmp/${package_filename}",
    require => File["/tmp/${package_filename}"],
  }
}