Versions Compared

Key

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

...

The users can follow the steps given below to install Stratos2 in Amazon EC2 using this Puppet based deployment methodology.


Setting up Puppet master (with nginx and mongrel)

  • Install Puppet master packages ( puppetmaster 2.7 , mongrel, nginx)

    Code Block
    apt-get install puppetmaster mongrel nginx


  • The following commands are used to stop puppetmaster and nginx

    Code Block
    /etc/init.d/puppetmaster stop
    /etc/init.d/nginx stop


  • Apply the following ch anges  to the respective configuration files.

    /etc/default/puppetmaster  

    Code Block
    DAEMON_OPTS="--ssl_client_header=HTTP_X_SSL_SUBJECT"
    SERVERTYPE=mongrel
    PUPPETMASTERS=5
    PORT=18140


    /etc/pupet/puppet.conf

    Code Block
    [main]
    logdir=/var/log/puppet
    vardir=/var/lib/puppet
    ssldir=/var/lib/puppet/ssl
    rundir=/var/run/puppet
    factpath=$vardir/lib/facter
    templatedir=/etc/puppet/templates/
    modulepath=/etc/puppet/modules/
    report=false
    
    [stratos2]
    modulepath=/mnt/puppet/stratos2/modules/
    templatedir=/mnt/puppet/stratos2/templates/
    manifest=/mnt/puppet/stratos2/manifests/site.pp
    manifestdir=/mnt/puppet/stratos2/manifests/
    report=false
    
    [master]
    node_name = facter


    /etc/puppet/autosign.conf

    Code Block
    *.wso2.com


    /etc/puppet/auth.conf

    Code Block
    path ~ ^/catalog/([^/]+)$
    method find
    allow $1
    allow star.s2.wso2.com    
    
    path ~ ^/node/([^/]+)$
    method find
    allow $1
    
    path /certificate_revocation_list/ca
    method find
    allow *
    
    path /report
    method save
    allow *
    
    path /file
    allow *
    
    path /file_metadata
    auth any
    method find
    allow *
    
    path /certificate/ca
    auth no
    method find
    allow *
    
    path /certificate/
    auth no
    method find
    allow *
    
    path /certificate_request
    auth no
    method find, save
    allow *
    
    path /
    environment stratos2
    allow *
    
    path /
    auth any


    /etc/puppet/fileserver.conf

    Code Block
    [files]
      path /etc/puppet/
      allow *
    
    [plugins]
      allow *
    
    [stratos2]
     path /mnt/puppet/stratos2/
     allow *

     

...

Anchor
PuppetAgent
PuppetAgent

Excerpt

Setting up Puppet agent

  1. Install packages.

    Code Block
    $apt-get install puppet

     

  2. Generate the keys in the server (Puppet master)

    Code Block
    $puppet cert --generate star.s2.wso2.com

    Copy the generated key in /var/lib/puppet/ssl/private_keys/star.s2.wso2.com.pem to clients (Puppet agent) /var/lib/puppet/ssl/private_keys/  

    Copy the generated key in /var/lib/puppet/ssl/ca/signed/star.s2.wso2.com.pem to clients /var/lib/puppet/ssl/certs/

       
  3. Change the /etc/puppet/puppet.conf as follows:

    Code Block
    [main]
    logdir=/var/log/puppet
    vardir=/var/lib/puppet
    ssldir=/var/lib/puppet/ssl
    rundir=/var/run/puppet
    factpath=$vardir/lib/facter
    templatedir=$confdir/templates
    server=s2demo.s2.wso2.com
    waitforcert=60
    report=false
    
    [master]
    environment=stratos2
    modulepath=/etc/puppet/$environment/modules
    templatedir=/etc/puppet/$environment/templates
    manifest=/etc/puppet/$environment/manifests/site.pp
    manifestdir=/etc/puppet/$environment/manifests/
    
    [agent]
    environment=stratos2
    certname = star.s2.wso2.com
    node_name = facter
    node_name_fact = fqdn

   

Setting up Stratos2

  1. Create a folder path for Stratos2 Puppet manifests.

    Code Block
    $ mkdir -p /mnt/puppet/stratos2

     

  2. Extract the Puppet master files (manifests,modules,templates) to  /mnt/puppet/stratos2
  3. Change the hosts template file in /mnt/puppet/stratos2/templates/hosts.erb

     

Public Stratos 2.0 Setup on Amazon EC2

We provide a pre-configured EC2 image that is publicly accessible through the EC2. Please see the Quick Start Guide for more information on how to use the pre-configured image to run Stratos 2.0.

...