Skip to content

SDC wrapper in order to deploy artifacts following puppet manifests

License

Notifications You must be signed in to change notification settings

jframos/fiware-puppetwrapper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fiware-puppetwrapper

SDC wrapper in order to deploy artifacts following puppet recipes.

Requisites:

  • MongoDB
  • Puppet Master

Wrapper Building instructions

It is a a maven application:

  • Compile, launch test and build all modules

      $ mvn assembly:assembly
    
  • copy target/distribution/puppwrapper-dist to a desired location

  • run ./jetty.sh start on puppetwrapper-dist/bin

  • Jetty will run by default on port 8082

change mongo configuration

add to /etc/mongod.conf -> smallfiles=true

Configuration instructions

file puppetwrapper.properties contains all necessary parameters.

    #puppet path
    defaultManifestsPath=/etc/puppet/manifests/
    modulesCodeDownloadPath=/etc/puppet/modules/
    #mongo connection
    mongo.host=127.0.0.1
    mongo.port=27017

To allow puppetwrapper to execute add to /etc/sudoers:

    tomcat ALL=(ALL) NOPASSWD: /usr/bin/puppet

in this section

    ## Allows people in group wheel to run all commands
    # %wheel        ALL=(ALL)       ALL
    ## Same thing without a password
    # %wheel        ALL=(ALL)       NOPASSWD: ALL

    comment out the following line 

    #Defaults    requiretty

Wrapper API

POST /v2/node/{nodeName}/install
    json payload:
    {"group":"value","softwareName":"value","version":"value"} 
POST /v2/node/{nodeName}/uninstall
    json payload:
    {"group":"value","softwareName":"value","version":"value"} 
GET /v2/node/{nodeName}/generate
    will generate the following files in /etc/puppet/manifests
    add an import line to site.pp
    generate the corresponding .pp file as group/nodeName.pp 
POST /module/{moduleName}/download
    payload : json as: {"url":”value”, ”repoSource”:”value”}
    Value on repoSource can be: git /svn
    will download the source code from the given url under {moduleName} directory. 
DELETE /v2/node/{nodeName}
    will delete the node: nodeName 
DELETE /v2/module/{modulename}
    will delete the module: moduleName 

About

SDC wrapper in order to deploy artifacts following puppet manifests

Resources

License

Stars

Watchers

Forks

Packages

No packages published