Giter VIP home page Giter VIP logo

puppet-installation-script's Introduction

#Try puppetinstall

It is on Puppet v3 and support Debian and CentOS operating systems.

[Deprecated] puppet-installation-script

Puppet installation script is a simple automation tool to install puppet master and puppet client with minimal effort. User only need to know the required environment details to setup the puppet environment. All other configurations will be generated by this script.

Things to know before running the script

  • User need to have ‘root’ or ‘sudo’ access to the system.

  • There are two ways to execute the script;

    1. Run the script in interactive mode.

      Script will ask several questions that user need to answer. According to the answers script will install and configure the puppet master or the puppet client.

    2. Pass information as command line arguments to the script.

      User can specify all relevant parameters with relevant values and run the script. Those parameters will describe in following steps.

  • User should know following details

    1. Install puppet master or puppet agent that the user need to install and configure. (--master or --agent)

    2. Domain name that will associate with the environment. (--domain your.domain.com)

      eg: apps.wso2.com

    3. IP address of the instance the puppet master will be installed in. (--master-ip 10.0.0.1)

      eg: 10.10.10.10

    4. Host name convention of other instances. By default puppet master will have ‘puppetmaster’ as the host name. (--hostname node001)

      eg. node001, node002 …

      ** Note : Do not give any fully qualified domain names (FQDN) as hostname like node0023.apps.wso2.com.

    • Operating system on the instance. (--os ubuntu)

      ** Note : Currently this supports only for Ubuntu and Debian systems only.

Get the puppet installation script

  • Get a clone of the setup scripts from github.

     git clone https://github.com/thilinapiy/puppet-installation-script 

Installing puppet master

  1. Copy the ‘puppet-installation-script’ to the desired instance.

  2. Get the IP address of the instance. Make sure it is a static IP.

  3. Change the current directory in to ‘puppet-installation-script’.

  4. Run the script;

    In interactive mode:

     sudo python puppet_install.py  

    And set option as ‘1’.

    Or pass values as arguments;

     sudo python puppet_install.py --master \
                                     --domain apps.wso2.com \  
                                     --master-ip 10.1.1.1 \  
                                     --os ubuntu 

Installing puppet agent

  1. First install the puppet master. If that is almost done get the IP address of it.

  2. Fix a instance hostname naming convention like node001, node002, … .

  3. Copy the ‘puppet-installation-script’ to the desired instance.

  4. Change the current directory in to ‘puppet-installation-script’.

  5. Run the script;

    In interactive mode:

     sudo python puppet_install.py  

    And set option as ‘2’.

    Or pass values as arguments:

     sudo python puppet_install.py --agent \
                                     --domain apps.wso2.com \
                                     --master-ip 10.1.1.1 \
                                     --hostname node001 \
                                     --os ubuntu  

To verify (Optional)

  1. Make ‘manifests’ directory in ‘/mnt/puppet/your.domain.com/’ location.

     mkdir   /mnt/puppet/apps.wso2.com/manifests 
  2. Create a ‘site.pp’ file in that location.

     touch   /mnt/puppet/apps.wso2.com/manifests/site.pp  
  3. Add following script on that site.pp with respective hostname that you gave to the relevant node that you are going to test.

     node 'node001.apps.wso2.com' {
    
             file { '/mytestfile.t':
                     owner   => 'root',
                     group   => 'root',
                     content => "This will be on the file.\n",
                     ensure  => present,
             }
     } 
  4. On the puppet agent node (node001) run

     puppetd -vt  
  5. Check the file in ‘/mytestfile.t’.

     cat /mytestfile.t  

puppet-installation-script's People

Contributors

thilinapiy avatar

Watchers

James Cloos avatar Sunil Sankar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.