dev/provisioning/modules/sysconfig/manifests/handle.pp
author ymh <ymh.work@gmail.com>
Fri, 22 Apr 2016 11:20:17 +0200
changeset 153 338bcc78d431
parent 150 cb4c47eda2db
permissions -rw-r--r--
add HandleClient implementation + configuration + tests
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
146
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
class sysconfig::handle (
150
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
     2
    $hdl_host           = hiera('sysconfig::params::hdl_host', $sysconfig::params::hdl_host),
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
     3
    $hdl_user           = hiera('sysconfig::params::hdl_user', $sysconfig::params::hdl_user),
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
     4
    $hdl_srv_port       = hiera('sysconfig::params::hdl_srv_port', $sysconfig::params::hdl_srv_port),
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
     5
    $hdl_web_port       = hiera('sysconfig::params::hdl_web_port', $sysconfig::params::hdl_web_port),
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
     6
    $hdl_key_pswd       = hiera('sysconfig::params::hdl_key_pswd', $sysconfig::params::hdl_key_pswd),
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
     7
    $hdl_prefix         = hiera('sysconfig::params::hdl_prefix', $sysconfig::params::hdl_prefix),
153
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
     8
    $hdl_test_prefix    = hiera('sysconfig::params::hdl_test_prefix', $sysconfig::params::hdl_test_prefix),
150
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
     9
    $hdl_prefix_admin   = hiera('sysconfig::params::hdl_prefix_admin', $sysconfig::params::hdl_prefix_admin),
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
    10
    $hdl_db_name        = hiera('sysconfig::params::hdl_db_name', $sysconfig::params::hdl_db_name),
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
    11
    $db_user            = hiera('sysconfig::params::db_user', $sysconfig::params::db_user),
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
    12
    $db_pw              = hiera('sysconfig::params::db_pw', $sysconfig::params::db_pw),
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
    13
    $db_host            = hiera('sysconfig::params::db_host', $sysconfig::params::db_host)
146
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
) inherits sysconfig::params {
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
    # iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 1080
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
    notify {'handle': name => "\$hdl_host : ${hdl_host}, \$hdl_srv_port : ${hdl_srv_port}, \$hdl_web_port : ${hdl_web_port}", withpath => true }
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
    $handle_dirs = [
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
        "/opt/handle",
150
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
    22
        "/opt/handle/sbin"
146
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
    ]
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
    group { "$hdl_user":
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
        ensure => present,
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
    }->
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
    user { "handle user":
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
        name => $hdl_user,
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
        ensure => present,
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
        gid => $hdl_user,
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
        system => true,
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
        home => '/var/lib/handle',
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
        managehome => false,
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
        shell => '/sbin/nologin'
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
    }->
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
    file { "/var/lib/handle":
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
        ensure => directory,
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
        owner => "$hdl_user",
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
        group => "$hdl_user"
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
    }->
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
    file { $handle_dirs:
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
        ensure => directory,
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
    }->
150
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
    45
    file { "/tmp/handle":
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
    46
        ensure => directory,
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
    47
        owner => "$hdl_user",
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
    48
        group => "$hdl_user"
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
    49
    }->
146
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    50
    archive { 'handle-8.1':
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
        ensure => present,
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    52
        url => "http://www.handle.net/hnr-source/hsj-8.1.0.tar.gz",
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    53
        checksum => false,
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    54
        follow_redirects => true,
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    55
        strip_components => 1,
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    56
        target => "/opt/handle",
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    57
        src_target => '/tmp',
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    58
        timeout => 500,
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    59
    }->
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    60
    file { "/opt/handle/sbin/start_handle":
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    61
        owner => "$hdl_user",
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    62
        group => "$hdl_user",
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    63
        mode => "0750",
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    64
        source => "puppet:///modules/sysconfig/handle/start_handle",
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    65
    }->
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    66
    file { '/opt/handle/lib/mysql-connector-java-5.1.38-bin.jar':
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    67
        ensure => file,
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    68
        source => "puppet:///modules/sysconfig/handle/mysql-connector-java-5.1.38-bin.jar",
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    69
        mode => "0644"
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    70
    }->
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    71
    file { "/tmp/handle/handle_init_script.exp":
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    72
        ensure => file,
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    73
        content => template("sysconfig/handle/handle_script.exp.erb"),
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    74
        owner => "$hdl_user",
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    75
        group => "$hdl_user",
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    76
        mode => "0750"
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    77
    }->
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    78
    exec { "init-handle":
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    79
        command => "/tmp/handle/handle_init_script.exp",
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    80
        cwd => "/opt/handle/bin",
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    81
        provider => 'shell',
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    82
        creates => "/var/lib/handle/sitebndl.zip",
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    83
        user => $hdl_user,
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    84
        notify => Exec['rm-tmp-handle'],
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    85
        require => [Package['java-install'], Package['expect']]
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    86
    }->
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    87
    file { "/var/lib/handle/config.dct":
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    88
        ensure => file,
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    89
        owner => "$hdl_user",
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    90
        group => "$hdl_user",
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    91
        content => template("sysconfig/handle/handle_config.dct.erb"),
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
    92
        replace => true
150
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
    93
    }
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
    94
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
    95
    # create handle admin handle keys
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
    96
    file { "/tmp/handle/handle_script_corpus_admin_keys.exp":
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
    97
        ensure => file,
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
    98
        source => "puppet:///modules/sysconfig/handle/handle_script_corpus_admin_keys.exp",
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
    99
        owner => "$hdl_user",
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   100
        group => "$hdl_user",
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   101
        mode => "0750"
146
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   102
    }->
150
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   103
    exec { "init-handle-corpus-admin-keys":
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   104
        command => "/tmp/handle/handle_script_corpus_admin_keys.exp",
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   105
        cwd => "/opt/handle/bin",
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   106
        provider => 'shell',
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   107
        creates => "/var/lib/handle/corpusadmpriv.bin",
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   108
        user => $hdl_user,
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   109
        notify => Exec['rm-tmp-handle-corpus-admin-key'],
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   110
        require => [Archive["handle-8.1"], Package['java-install'], Package['expect']]
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   111
    }
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   112
153
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   113
    exec { "convert-handle-corpus-admin-keys-priv":
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   114
        command => "/opt/handle/bin/hdl-convert-key /var/lib/handle/corpusadmpriv.bin -o /var/lib/handle/corpusadmpriv.pem",
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   115
        cwd => "/opt/handle/bin",
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   116
        creates => "/var/lib/handle/corpusadmpriv.pem",
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   117
        user => $hdl_user,
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   118
        require => [Archive["handle-8.1"], Package['java-install'], Exec['init-handle-corpus-admin-keys']]
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   119
    }
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   120
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   121
    exec { "convert-handle-corpus-admin-keys-pub":
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   122
        command => "/opt/handle/bin/hdl-convert-key /var/lib/handle/corpusadmpub.bin -o /var/lib/handle/corpusadmpub.pem",
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   123
        cwd => "/opt/handle/bin",
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   124
        creates => "/var/lib/handle/corpusadmpub.pem",
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   125
        user => $hdl_user,
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   126
        require => [Archive["handle-8.1"], Package['java-install'], Exec['init-handle-corpus-admin-keys']]
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   127
    }
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   128
    
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   129
    # create handle admin handle dsa keys
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   130
    file { "/tmp/handle/handle_script_corpus_admin_dsa_keys.exp":
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   131
        ensure => file,
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   132
        source => "puppet:///modules/sysconfig/handle/handle_script_corpus_admin_dsa_keys.exp",
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   133
        owner => "$hdl_user",
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   134
        group => "$hdl_user",
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   135
        mode => "0750"
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   136
    }->
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   137
    exec { "init-handle-corpus-admin-dsa-keys":
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   138
        command => "/tmp/handle/handle_script_corpus_admin_dsa_keys.exp",
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   139
        cwd => "/opt/handle/bin",
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   140
        provider => 'shell',
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   141
        creates => "/var/lib/handle/corpusadmdsapriv.bin",
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   142
        user => $hdl_user,
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   143
        notify => Exec['rm-tmp-handle-corpus-admin-dsa-key'],
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   144
        require => [Archive["handle-8.1"], Package['java-install'], Package['expect']]
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   145
    }
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   146
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   147
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   148
    exec { "convert-handle-corpus-admin-dsa-keys-pub":
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   149
        command => "/opt/handle/bin/hdl-convert-key /var/lib/handle/corpusadmdsapub.bin -o /var/lib/handle/corpusadmdsapub.pem",
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   150
        cwd => "/opt/handle/bin",
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   151
        creates => "/var/lib/handle/corpusadmdsapub.pem",
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   152
        user => $hdl_user,
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   153
        require => [Archive["handle-8.1"], Package['java-install'], Exec['init-handle-corpus-admin-dsa-keys']]
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   154
    }
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   155
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   156
    exec { "convert-handle-corpus-admin-dsa-keys-priv":
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   157
        command => "/opt/handle/bin/hdl-convert-key /var/lib/handle/corpusadmdsapriv.bin -o /var/lib/handle/corpusadmdsapriv.pem",
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   158
        cwd => "/opt/handle/bin",
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   159
        creates => "/var/lib/handle/corpusadmdsapriv.pem",
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   160
        user => $hdl_user,
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   161
        require => [Archive["handle-8.1"], Package['java-install'], Exec['init-handle-corpus-admin-dsa-keys']]
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   162
    }  
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   163
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   164
    
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   165
    exec { "convert-handle-corpus-admin-cert":
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   166
        command => "/usr/bin/openssl req -pubkey -x509 -new -sha256 -subj \"/CN=300:${hdl_prefix}\\/${hdl_prefix_admin}\" -key /var/lib/handle/corpusadmpriv.pem | /usr/bin/openssl x509 -inform PEM -out /var/lib/handle/corpusadmcrt.pem",
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   167
        creates => "/var/lib/handle/corpusadmcrt.pem",
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   168
        user => $hdl_user,
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   169
        require => Exec["convert-handle-corpus-admin-keys-priv"]
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   170
    }->
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   171
    exec { "concat-handle-corpus-admin-pkey-cert":
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   172
    	 command => "/usr/bin/cat /var/lib/handle/corpusadmpriv.pem /var/lib/handle/corpusadmcrt.pem > /var/lib/handle/corpusadmpkeycrt.pem",
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   173
	 creates => "/var/lib/handle/corpusadmpkeycrt.pem",
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   174
	 user => $hdl_user
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   175
    }
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   176
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   177
    exec { "convert-handle-corpus-admin-test-cert":
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   178
        command => "/usr/bin/openssl req -pubkey -x509 -new -sha256 -subj \"/CN=300:${hdl_test_prefix}\\/${hdl_prefix_admin}\" -key /var/lib/handle/corpusadmpriv.pem | /usr/bin/openssl x509 -inform PEM -out /var/lib/handle/corpusadmcrttest.pem",
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   179
        creates => "/var/lib/handle/corpusadmcrttest.pem",
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   180
        user => $hdl_user,
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   181
        require => Exec["convert-handle-corpus-admin-keys-priv"]
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   182
    }
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   183
150
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   184
    file { '/tmp/handle/handle_data.sql.sh':
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   185
        ensure => file,
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   186
        content => template("sysconfig/handle/handle_data.sql.sh.erb"),
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   187
        owner => "$hdl_user",
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   188
        group => "$hdl_user",
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   189
        mode => "0750"
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   190
    }
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   191
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   192
    exec { "init_handle_db_data":
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   193
        command => "/tmp/handle/handle_data.sql.sh",
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   194
        creates => "/tmp/handle/handle_data.sql",
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   195
        user => $hdl_user,
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   196
        require => [File['/tmp/handle/handle_data.sql.sh'], Exec['init-handle-corpus-admin-keys']]
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   197
    }
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   198
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   199
    file { '/tmp/handle/handle_db.sql':
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   200
        ensure => file,
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   201
        source => "puppet:///modules/sysconfig/handle/handle_db.sql",
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   202
        owner => "$hdl_user",
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   203
        group => "$hdl_user",
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   204
        mode => "0750"
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   205
    }
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   206
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   207
    mysql::db { "handle_db":
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   208
        dbname => $hdl_db_name,
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   209
        user => $db_user,
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   210
        password => $db_pw,
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   211
        host => $db_host,
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   212
        sql => ['/tmp/handle/handle_db.sql', '/tmp/handle/handle_data.sql'],
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   213
        charset => 'utf8',
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   214
        collate => 'utf8_general_ci',
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   215
        notify => [Exec['rm-tmp-handle-db'], Exec['rm-tmp-handle-data']],
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   216
        require => [Service["mariadb"], File['/tmp/handle/handle_db.sql'], Exec['init_handle_db_data']],
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   217
    }
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   218
146
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   219
    exec { "handle-first-start":
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   220
        command => "/usr/bin/echo \"${HANDLE_KEY_PSWD}\" | /opt/handle/bin/hdl-server /var/lib/handle &",
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   221
        provider => 'shell',
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   222
        creates => "/var/lib/handle/.handle_initialized",
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   223
        user => $hdl_user,
150
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   224
        require => [File['/etc/sysconfig/handle'], File['/var/lib/handle/config.dct'], Mysql::Db['handle_db']]
146
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   225
    }->
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   226
    exec { "handle-first-stop":
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   227
        command => "/usr/bin/sleep 10 && rm -f /var/lib/handle/delete_this_to_stop_server && touch /var/lib/handle/.handle_initialized",
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   228
        provider => 'shell',
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   229
        creates => "/var/lib/handle/.handle_initialized",
150
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   230
        user => $hdl_user
146
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   231
    }->
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   232
    file_line { "handle-detached-prefix":
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   233
        path => "/var/lib/handle/config.dct",
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   234
        match => "\s*\"300:0.NA/$hdl_prefix\"",
150
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   235
        line => "      \"300:$hdl_prefix/$hdl_prefix_admin\"",
146
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   236
        multiple => true,
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   237
    }
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   238
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   239
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   240
    file { "/etc/sysconfig/handle":
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   241
        ensure => file,
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   242
        owner => "root",
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   243
        group => "$hdl_user",
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   244
        content => template("sysconfig/handle/handle_sysconfig.erb"),
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   245
        replace => true,
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   246
        mode => "0640"
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   247
    }->
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   248
    file { "/etc/systemd/system/handle.service":
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   249
        ensure => file,
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   250
        owner => "root",
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   251
        group => "root",
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   252
        source => "puppet:///modules/sysconfig/handle/handle.service",
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   253
        require => File['/opt/handle/sbin/start_handle'],
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   254
        notify => Exec['systemctl-daemon-reload']
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   255
    }
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   256
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   257
    exec { "handle-enable-on-boot":
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   258
        command => "/usr/bin/systemctl enable handle",
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   259
        subscribe => [ Exec['systemctl-daemon-reload'], File['/etc/systemd/system/handle.service'] ],
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   260
        unless => "/usr/bin/systemctl is-enabled handle.service"
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   261
    }
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   262
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   263
    exec { "rm-tmp-handle":
150
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   264
        command => "/usr/bin/rm -f /tmp/handle/handle_init_script.exp",
146
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   265
        refreshonly => true
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   266
    }
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   267
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   268
    exec { "rm-tmp-handle-db":
150
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   269
        command => "/usr/bin/rm -f /tmp/handle/handle_db.sql",
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   270
        refreshonly => true
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   271
    }
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   272
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   273
    exec { "rm-tmp-handle-data":
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   274
        command => "/usr/bin/rm -f /tmp/handle/handle_data.sql.sh /tmp/handle/handle_data.sql",
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   275
        refreshonly => true
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   276
    }
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   277
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   278
    exec { "rm-tmp-handle-corpus-admin-key":
cb4c47eda2db finish handle support in dev VM
ymh <ymh.work@gmail.com>
parents: 146
diff changeset
   279
        command => "/usr/bin/rm -f /tmp/handle/handle_script_corpus_admin_keys.exp",
146
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   280
        refreshonly => true
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   281
    }
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   282
153
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   283
    exec { "rm-tmp-handle-corpus-admin-dsa-key":
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   284
        command => "/usr/bin/rm -f /tmp/handle/handle_script_corpus_admin_dsa_keys.exp",
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   285
        refreshonly => true
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   286
    }
338bcc78d431 add HandleClient implementation + configuration + tests
ymh <ymh.work@gmail.com>
parents: 150
diff changeset
   287
    
146
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   288
    exec { "open-handle-web-port":
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   289
        command => "firewall-cmd --permanent --add-port=8000/tcp",
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   290
        path => [ '/bin', '/usr/bin', '/usr/local/bin' ]
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   291
    }->
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   292
    exec { "open-handle-srv-port":
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   293
        command => "firewall-cmd --permanent --add-port=2641/tcp",
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   294
        path => [ '/bin', '/usr/bin', '/usr/local/bin' ]
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   295
    }->
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   296
    exec { "open-handle-port-reload":
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   297
        command => "firewall-cmd --reload",
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   298
        path => [ '/bin', '/usr/bin', '/usr/local/bin' ]
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   299
    }
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   300
dc4d1cdc47e0 first implementation of handle install. Need refinement
ymh <ymh.work@gmail.com>
parents:
diff changeset
   301
}