Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Get root access.
    sudo -i
  2. Install Git.
    apt-get install git
  3. Obtain the Puppet Master installation script. This will create a folder named puppetinstall.
    git clone https://github.com/thilinapiy/puppetinstall
     
  4. Navigate to the  puppetinstall folder using the following command:
    cd puppetinstall
  5. Install Puppet Master (v3) as follows:
    1. Execute the following command. When you execute this command, your system hostname will get modified.
      ./puppetinstall -m -d <PUPPETMASTER-DOMAIN> -s <PUPPET-MASTER-IP>

      For example:
      ./puppetinstall -m -d test.org 
      If requested, press enter. If you have successfully installed Puppet Master, the following message will appear: 
      Installation completed successfully"
    2. Anchor
      hostname
      hostname
      Execute the hostname command. This will show that your system hostname has been modified.

      For example:
       puppet.test.org
    3. Verify your Puppet Master (v3) installation by running the following command in the puppetinstall folder:
      ps -ef | grep puppet
      The output will be as follows:

      Code Block
      puppet 5324 1 0 14:59 ? 00:00:00 /usr/bin/ruby /usr/bin/puppet master --masterport=8140
      root 5332 1071 0 15:05 pts/0 00:00:00 grep --color=auto puppet
  6. Obtain the Apache Stratos Puppet scripts as follows:
    1. Navigate to the home folder (or a folder of your choice).
      cd
    2. Obtain the Apache Stratos Puppet scripts.
      git clone https://github.com/apache/incubator-stratos.git  
    3. Navigate to the <incubator-stratos>/tools/puppet3/ directory.
      cd incubator-stratos/tools/puppet3/
    4. Check the list of files.
      ls
       
      The output should be as follows:
      auth.conf  autosign.conf  fileserver.conf   manifests   modules  puppet.conf
  7. Copy the Stratos Puppet scripts to the Puppet Master configurations directory as follows:
    1. Navigate to the puppet folder.
      cd /etc/puppet/ 
    2. Check the list of files in the puppet folder:
      ls
      The output will be as follows:
      auth.conf  autosign.conf  fileserver.conf  manifests  modules  puppet.conf  templates
       
    3. Copy the content from the /root/incubator-stratos/tools/puppet3/manifests/ directory to the /etc/puppet/manifests/ directory.
      For example:
      cp -R /root/incubator-stratos/tools/puppet3/manifests/* manifests/
    4. Copy the content from the /root/incubator-stratos/tools/puppet3/modules/ directory to the /etc/puppet/modules/ directory.
      For example:

      cp -R /root/incubator-stratos/tools/puppet3/modules/* modules/ 
    5. Check the list of files in the /etc/puppet/manifests/ directory.
      ls
       manifests/
      The output should be as follows:
      nodes.pp  site.pp 
    6. Check the list of files in the /etc/puppet/modules/ directory.
      ls
       modules/
      The output should be as follows:
      agent  autoscaler  cc  cep  java  lb  manager  messagebroker  mysql  
      nodejs  php  ruby  tomcat  wordpress
  8. Change the variables in the nodes.pp file accordingly.  
      vi /etc/puppet/manifests/nodes.pp

    Code Block
      #following directory is used to store binary packages
      $local_package_dir	= '/mnt/packs'
      # Stratos message broker IP and port
      $mb_ip            	= '10.4.128.12'
      $mb_port          	= '5672'
      # Stratos CEP IP and port
      $cep_ip           	= '10.4.128.10'
      $cep_port         	= '7611'
      # Stratos Cartridge Agent’s trust store password
      $truststore_password	= 'wso2carbon'
  9. Enter the domain names that the master should automatically sign.
    1. Navigate to the /etc/puppet/ directory.
      cd /etc/puppet/ 
    2. Add the domain names in the autosign.conf file and save the file.
    3. You can view the contents of the autosign.conf file as follows:
      cat autosign.conf 
      Based on the example the output will be as follows:
      *.test.org 
  10.  Download a Java distribution and define the Java distribution in the /etc/puppet/manifests/ directory.

    1. Create the files folder in the /etc/puppet/modules/java/ directory.
      mkdir /etc/puppet/modules/java/files

    2. Download the Java distribution to the /etc/puppet/modules/java/files/ directory.

    3. Define the Java distribution name and the unzipped folder name in the nodes.pp file, which is in the /etc/puppet/manifests/ directory, and save the file.

      Code Block
      $java_distribution	= 'jdk-7u7-linux-x64.tar.gz'
      $java_name        	= 'jdk1.7.0_07'
  11. Copy the Cartridge Agent distribution (apache-stratos-cartridge-agent-4.0.0-SNAPSHOT-bin.zip), which is in the <source-home>/products/cartridge-agent/modules/distribution/target/ directory, to the /etc/puppet/modules/agent/files/ directory. Check the list of files in the /etc/puppet/modules/agent/files/ directory.

  12. Copy the Apache Stratos Load Balancer distribution (apache-stratos-load-balancer-4.0.0-SNAPSHOT.zip), which is in the <source-home>/products/load-balancer/modules/distribution/target/ directory, to the /etc/puppet/modules/lb/files/ directory. Check the list of files in the /etc/puppet/modules/lb/files/ directory.