Skip to content

Instantly share code, notes, and snippets.

@Tokynet
Last active April 21, 2017 18:31

Revisions

  1. Tokynet revised this gist Apr 21, 2017. 1 changed file with 8 additions and 1 deletion.
    9 changes: 8 additions & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -119,4 +119,11 @@ Debug: Augeas[/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/serv


    # $_context_path_changes = "set ${path}/Engine/Host/Context/#attribute/path '${context_path}'" <==Original line
    $_context_path_changes = "set ${path}/Engine/Host/Context[#attribute/docBase="../confluence"]/#attribute/path '${context_path}'"
    $_context_path_changes = "set ${path}/Engine/Host/Context[#attribute/docBase="../confluence"]/#attribute/path '${context_path}'"


    Puppet run output:
    Info: Loading facts
    Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Syntax error at '.' at /etc/puppetlabs/code/environments/production/modules/confluence/manifests/config.pp:53:84 on node awslxconfed01.itmi.inova.org
    Warning: Not using cache on failed catalog
    Error: Could not retrieve catalog; skipping run
  2. Tokynet revised this gist Apr 21, 2017. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -113,4 +113,10 @@ Debug: Augeas[/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/serv
    URIEncoding="UTF-8" keystorePass="<MY_CERTIFICATE_PASSWORD>"/>
    -->
    </Service>
    </Server>
    </Server>




    # $_context_path_changes = "set ${path}/Engine/Host/Context/#attribute/path '${context_path}'" <==Original line
    $_context_path_changes = "set ${path}/Engine/Host/Context[#attribute/docBase="../confluence"]/#attribute/path '${context_path}'"
  3. Tokynet revised this gist Apr 21, 2017. 1 changed file with 12 additions and 0 deletions.
    12 changes: 12 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -51,10 +51,22 @@ class { 'mysql_java_connector':


    ########output of the run#########
    Debug: Augeas[/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/server.xml](provider=augeas): Opening augeas with root /, lens path , flags 64
    Debug: Augeas[/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/server.xml](provider=augeas): Augeas version 1.4.0 is installed
    Debug: Augeas[/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/server.xml](provider=augeas): Will attempt to save and only run if files changed
    Debug: Augeas[/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/server.xml](provider=augeas): sending command 'set' with params ["/files/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/server.xml/Server/Service[#attribute/name='Tomcat-Standalone']/Connector/#attribute/maxThreads", "150"]
    Debug: Augeas[/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/server.xml](provider=augeas): sending command 'set' with params ["/files/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/server.xml/Server/Service[#attribute/name='Tomcat-Standalone']/Connector/#attribute/acceptCount", "100"]
    Debug: Augeas[/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/server.xml](provider=augeas): sending command 'set' with params ["/files/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/server.xml/Server/Service[#attribute/name='Tomcat-Standalone']/Connector/#attribute/scheme", "https"]
    Debug: Augeas[/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/server.xml](provider=augeas): sending command 'set' with params ["/files/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/server.xml/Server/Service[#attribute/name='Tomcat-Standalone']/Connector/#attribute/proxyName", "itmi.inova.org"]
    Debug: Augeas[/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/server.xml](provider=augeas): sending command 'set' with params ["/files/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/server.xml/Server/Service[#attribute/name='Tomcat-Standalone']/Connector/#attribute/proxyPort", "443"]
    Debug: Augeas[/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/server.xml](provider=augeas): sending command 'set' with params ["/files/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/server.xml/Server/Service[#attribute/name='Tomcat-Standalone']/Connector/#attribute/keystorePass", "changeit"]
    Debug: Augeas[/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/server.xml](provider=augeas): sending command 'set' with params ["/files/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/server.xml/Server/Service[#attribute/name='Tomcat-Standalone']/Connector/#attribute/port", "8090"]
    Debug: Augeas[/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/server.xml](provider=augeas): sending command 'set' with params ["/files/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/server.xml/Server/Service[#attribute/name='Tomcat-Standalone']/Engine/Host/Context/#attribute/path", "confluence"]
    Debug: Augeas[/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/server.xml](provider=augeas): Skipping because no files were changed
    Debug: Augeas[/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/server.xml](provider=augeas): Closed the augeas connection


    ^^EOF^^

    #########server.xml###########
    <Server port="8000" shutdown="SHUTDOWN" debug="0">
  4. Tokynet revised this gist Apr 21, 2017. 1 changed file with 59 additions and 2 deletions.
    61 changes: 59 additions & 2 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -30,10 +30,18 @@ class { 'confluence':
    File['/data/apps'],
    File['/data/attachments'],
    ],
    tomcat_proxy => {
    scheme => 'https',
    proxyName => 'itmi.inova.org',
    proxyPort => '443',
    },
    tomcat_extras => {
    keystorePass => 'changeit',
    },
    }

    class { 'mysql_java_connector':
    links => ["/data/apps/confluence-install/atlassian-confluence-${confluencever}/confluence/WEB-INF/lib"],
    #links => ["/data/apps/confluence-install/atlassian-confluence-${confluencever}/confluence/WEB-INF/lib"],
    version => '5.1.41',
    require => Class['confluence'],
    }
    @@ -44,4 +52,53 @@ class { 'mysql_java_connector':

    ########output of the run#########
    Debug: Augeas[/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/server.xml](provider=augeas): sending command 'set' with params ["/files/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/server.xml/Server/Service[#attribute/name='Tomcat-Standalone']/Engine/Host/Context/#attribute/path", "confluence"]
    Debug: Augeas[/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/server.xml](provider=augeas): Skipping because no files were changed
    Debug: Augeas[/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/server.xml](provider=augeas): Skipping because no files were changed



    #########server.xml###########
    <Server port="8000" shutdown="SHUTDOWN" debug="0">
    <Service name="Tomcat-Standalone">
    <Connector port="8090" connectionTimeout="20000" redirectPort="8443"
    maxThreads="150" minSpareThreads="10"
    enableLookups="false" acceptCount="100" debug="0" URIEncoding="UTF-8"
    protocol="org.apache.coyote.http11.Http11NioProtocol" scheme="https" proxyName="itmi.inova.org" proxyPort="443" keystorePass="changeit" />

    <Engine name="Standalone" defaultHost="localhost" debug="0">

    <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="false" startStopThreads="4">
    <Context path="" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true">
    <!-- Logger is deprecated in Tomcat 5.5. Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties -->
    <Manager pathname="" />
    <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60" />
    </Context>

    <Context path="${confluence.context.path}/synchrony-proxy" docBase="../synchrony-proxy" debug="0" reloadable="false" useHttpOnly="true">
    <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60" />
    </Context>
    </Host>

    </Engine>

    <!--
    To run Confluence via HTTPS:
    * Uncomment the Connector below
    * Execute:
    %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
    $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix)
    with a password value of "changeit" for both the certificate and the keystore itself.
    * Restart and visit https://localhost:8443/

    For more info, see https://confluence.atlassian.com/display/DOC/Running+Confluence+Over+SSL+or+HTTPS
    -->
    <!--
    <Connector port="8443" maxHttpHeaderSize="8192"
    maxThreads="150" minSpareThreads="25"
    protocol="org.apache.coyote.http11.Http11NioProtocol"
    enableLookups="false" disableUploadTimeout="true"
    acceptCount="100" scheme="https" secure="true"
    clientAuth="false" sslProtocols="TLSv1,TLSv1.1,TLSv1.2" sslEnabledProtocols="TLSv1,TLSv1.1,TLSv1.2" SSLEnabled="true"
    URIEncoding="UTF-8" keystorePass="<MY_CERTIFICATE_PASSWORD>"/>
    -->
    </Service>
    </Server>
  5. Tokynet revised this gist Apr 21, 2017. 1 changed file with 2 additions and 12 deletions.
    14 changes: 2 additions & 12 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -43,15 +43,5 @@ class { 'mysql_java_connector':


    ########output of the run#########
    +
    +###########################
    +# Configuration Directory #
    +###########################
    +
    +# specify your directory below (don't forget to remove the '#' in front)
    +
    +# confluence.home=c:/confluence/data
    +confluence.home=
    +

    Everything else is applied correctly.
    Debug: Augeas[/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/server.xml](provider=augeas): sending command 'set' with params ["/files/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/server.xml/Server/Service[#attribute/name='Tomcat-Standalone']/Engine/Host/Context/#attribute/path", "confluence"]
    Debug: Augeas[/data/apps/confluence-install/atlassian-confluence-6.1.0/conf/server.xml](provider=augeas): Skipping because no files were changed
  6. Tokynet revised this gist Apr 20, 2017. 1 changed file with 17 additions and 1 deletion.
    18 changes: 17 additions & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -38,4 +38,20 @@ class { 'mysql_java_connector':
    require => Class['confluence'],
    }

    }
    }



    ########output of the run#########
    +
    +###########################
    +# Configuration Directory #
    +###########################
    +
    +# specify your directory below (don't forget to remove the '#' in front)
    +
    +# confluence.home=c:/confluence/data
    +confluence.home=
    +

    Everything else is applied correctly.
  7. Tokynet created this gist Apr 20, 2017.
    41 changes: 41 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,41 @@
    #This profile manages the installation of the confluence application.
    class profiles::confluence_dev(
    $javahome = $::java_default_home,
    $confluencever = '6.1.0'
    ) {

    #Create parent directories
    file { '/data':
    ensure => directory,
    }

    #Create parent directories
    file { '/data/apps':
    ensure => directory,
    }

    #Create attachments directory
    file { '/data/attachments':
    ensure => directory,
    }


    class { 'confluence':
    version => $confluencever,
    installdir => '/data/apps/confluence-install',
    homedir => '/data/apps/confluence-home',
    javahome => $javahome,
    context_path => '/confluence',
    require => [
    File['/data/apps'],
    File['/data/attachments'],
    ],
    }

    class { 'mysql_java_connector':
    links => ["/data/apps/confluence-install/atlassian-confluence-${confluencever}/confluence/WEB-INF/lib"],
    version => '5.1.41',
    require => Class['confluence'],
    }

    }