geppetto by cloudsmith

an integrated toolset for developing puppet modules and manifests
Please visit The Geppetto Site at Puppet Labs instead

Geppetto FAQ

About

What is Geppetto?

04 Jun 2011

Geppetto is an integrated set of tools aimed to simplify the process of developing and consuming Puppet modules and manifests.

The project’s foundation is a model of the Puppet DSL, along with parsers, validators, and formatters that translate between module and manifest models and their editable representation.

Geppetto generates and validates modules and manifests directly from editors, as well as streamline module publication/consumption to/from the Puppet Forge (http://forge.puppetlabs.com/).

Editors provide syntax highlighting, content assistance, error tracing/debugging and similar capabilities, as appropriate.

The project has three near-term objectives: (1) flatten the learning curve associated with using the Puppet DSL to create manifests, (2) support Puppet best practices for working with manifests in the form of modules, and (3) encourage sharing of modules within the community using the Puppet Forge. A longer-term objective will be to make it easier for a wider range of tools to interoperate with Puppet by using Geppetto’s modeling foundation as a means of interchange; potential synergies with the new p(0) project (http://github.com/lak/pzero) will be explored for this purpose.

What are the objectives of the Geppetto project?

05 Jun 2011

The project has three near-term objectives:

  1. flatten the learning curve associated with using the Puppet DSL to create manifests,
  2. support Puppet best practices for working with manifests in the form of modules, and
  3. encourage sharing of modules within the community using the Puppet Forge.

A longer-term objective will be to make it easier for a wider range of tools to interoperate with Puppet by using Geppetto’s modeling foundation as a means of interchange; potential synergies with the new p(0) project (http://github.com/lak/pzero) will be explored for this purpose.

Do you accept contributions to the project?

06 Jun 2011

Yes, see Contributing to Geppetto for information on how to set up a development environment and how to contribute to the project.

We also welcome logged issues and requests for enhancements.

Contact

Who is behind Geppetto, do you have a website?

01 Jun 2011

Cloudsmith Inc. is behind the project. You can find out more about us on the Cloudsmith website.

Do you have a mailing list?

02 Jun 2011

Yes, there is a Puppet Geppetto Google Group which can be read online, via email subscription, or via news (NNTP).

Are you available on IRC?

06 Jun 2011

Yes, we (try to) hang out on the #geppetto IRC channel at freenode.net.

Do you have a newsgroup (NNTP)?

06 Jun 2011

Yes, the Puppet Geppetto Google Group is bidirectionally mirrored to a Puppet News Group (via gmane). You can post to the group via your news reader if you have subscribed to the Google group.

I responded to the newsgroup, but the message has not shown up. What is wrong?

06 Jun 2011

Gmane will send an authentication email to the email account you used when posting. You have to respond to that email. After about 10 minutes, the post will appear. If you posted several messages before you were authenticated, gmane may have thrown those messages away. For more info visit gmane.org. You must also be a subscriber of the Google group with the same email as you are using to post in your news reader.

Installation

How do I install Geppetto?

01 Jun 2011

You can download geppetto as ready to run zip files from Geppetto Downloads. Geppetto is available in 32 and 64 bit versions for Linux, OSx, and Windows.

Can I use Geppetto in my Eclipse?

02 Jun 2011

If you want to install Geppetto into your Eclipse IDE, you can do so by giving the Eclipse update manager this repository URL: http://download.cloudsmith.com/geppetto/updates. Please note that this URL is for use by a download manager - it is not meaningful to visit this URL with a browser.

Note that Eclipse 3.6 (Helios) or later is required.

Can I install additional things into Geppetto?

03 Jun 2011

Yes, you can install just about anything that can be installed into an Eclipse. (Or install Geppetto into an Eclipse IDE).

Can Geppetto run in Netbeans, or some other IDE?

06 Jun 2011

No. Geppetto makes use of many Eclipse features, most notably Xtext, EMF, EGit, and the editing framework, and porting Geppetto to some other IDE platform would require a significant amount of work.

Is Eclipse Required?

06 Jun 2011

Geppetto is based on Eclipse, but you do not need a full Eclipse to use Geppetto. The ‘ready to run’ packages provided on Geppetto Downloads contain a suitable set of plugins when working with puppet development, and is much smaller than the standard Eclipse distribution.

When you download one of the Geppetto packages, you do not need to install anything else.

How can I update Geppetto?

28 Jun 2011

Updating Geppetto is easy, simply do this:

  • Select Help > Check for Updates
  • When a list of things to update is shown, select the Uncategorized feature from the Geppetto update site (most likely the only thing displayed, and yes we know we need to fix the name of this category).
  • Click through the license
  • When prompted to restart, do so

Update stops with 'out of PermGenSpace' error. How can I fix this?

29 Jun 2011

According to eclipse issue 92250 this is caused by certain java runtimes using too much of the perm-gen memory space.

The workaround is to simply increase the amount of available perm-gen space.

To do this, find the file called geppetto.ini and add the following line after the line containing the text -vmargs:

-XX:MaxPermSize=128m

On OSX you find the geppetto.ini file inside the Geppetto.app. Using the command line it is trivial to find the file inside the app directory, but if you want to do this from within finder, you need to do the following:

  • Right click on the Geppetto app icon
  • Select Show Pacakge Content
  • Navigate to Contents > MacOS
  • Right click on geppetto.ini and select Open With (and select TextEdit).

How can I install DLTK for Ruby?

04 Nov 2011

If you want to add support for editing ruby files in Geppetto, you can install the Eclipse DLTK/Ruby into Geppetto. There is however no support for erb files

To install:

  • Select Help > Install new Software
  • Add the URL http://download.eclipse.org/technology/dltk/updates/
  • Select, the apropriate DLTK version (currently 2.0), and select Ruby
  • Click throught the wizard and accept the license
  • You are warned about unsigned content, accept that
  • When prompted to restart, do so
  • Create a Ruby project (helps you configure a ruby runtime)
  • Ruby files can now be edited with syntax coloring etc.

Demos, Tutorial, and Help

Demo of Geppetto Features by James Turnbull

14 Apr 2011

This demonstration by James Turnbull at Puppetlabs provides a good overview of Geppetto's main functionality. (This recording was made with a release < 1.0.0 of Geppetto).

How can I get help using Geppetto?

06 Jun 2011

There is help inside Geppetto itself on general usage of the workbench, editors, keyboard shortcuts, projects, using git, svn, cvs, etc..

How do I...?

How do I use Geppetto with Git?

06 Jun 2006

Geppetto comes with EGit/JGit, which provides integrated access to git repositories. You can pretty much do everything you can do with git on the command line. One thing to remember after having imported a project from a git repository is to turn on the Puppet Nature for the project, as this is required for Geppetto to know how to handle the manifest files and metadata in the project. If you check-in the .project file into your repository, the next time you or anyone else checks out the project, the nature will be remembered.

For more help on using EGit, see the embedded help in Geppetto.

How do I use Geppetto with SVN?

06 Jun 2006

Geppetto comes with built in SVN support. One thing to remember after having imported a project from a SVN repository is to turn on the Puppet Nature for the project, as this is required for Geppetto to know how to handle the manifest files and metadata in the project. If you check-in the .project file into your repository, the next time you or anyone else checks out the project, the nature will be remembered.

For more help on using SVN, see the embedded help in Geppetto.

How do I use the search path and environment preferences?

14 Sep 2011

Since Geppetto 2.0 it is posible to speecify a search path, and environment name in preferences. These preferences can be set globally, but also per project (overriding the default).

The search path adds an extra level of visibility constraints, and prioritizes which element to choose should there be several with the same name.

By deault, the path is:

 lib/*:environments/$environment/*:manifests/*:modules/*

Implicitly, the puppet environment selected under Preferences > Puppet > Puppet target version (i.e. the types, functions, and variables provided in a puppet distribution) is always searched before the search path is consulted. The search path consists of : separated entries, where each entry is a path to a directory relative to a project root. If the path ends with /* content in all subdirectories will become visible. If it does not end with /* only the direct contents of the given directory is made visible.

Note that Geppetto’s search path is not the same as the puppet modulepath, as it needs to speciy the directories where the content actually is (.pp and .rb files). In contrast, the puppet module path points to directories where modules can be found.

The variable $environment can be used in the path. It will expand to the value of the environment preference. (You can naturally spell out the name if you want to). The intention is that a default path can be used for all/most projects, and only the environment preference needs to be set per project.

If you set the search path to a single * you will get the same behaviour as in Geppetto 1.0.2 - i.e. everything is visible and there is no defined search order.

Also note that the search path is applied relative to each project. You can not use the search path to point to other projects, or to files that are not in projects. (You can not use tricks like ../../ to navigate above the project). If you need external content in your workspace, you can use Linked Folders.

How do I make global variables known to Geppetto?

01 Nov 2011

Starting with Geppetto 2.1, variables are validated and warnings will be issued for variables that Geppetto can not find. The reccomendation is to use global references, i.e. use $::operatingsystem instead of $operatingsystem. If you for some reason do not want to make these changes (or can’t), you may want to teach Geppetto about the existence of such variables.

What you need is to create a file with ‘.pptp’ extension and place it in Geppetto’s special project for “target platform”. You can do this in Geppetto by:

  • Use the Open View > Navigator

  • Open the project .org_cloudsmith_geppetto_pptp_target

  • Create a new file called something like “myvariables.pptp”

  • Enter the text below

     <pptp:PuppetDistribution xmi:version="2.0"
       xmlns:xmi="http://www.omg.org/XMI"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:pptp="http://www.cloudsmith.org/geppetto/1.0.0/PPTP"
       description="Adds Global vars"
       version=""
       label="puppet ">
        <contents xsi:type="pptp:TPVariable"
          name="myvar1"
          documentation="This is variable 1"/>
        <contents xsi:type="pptp:TPVariable"
          name="myvar2"
          documentation="This is variable 2"/>
     </pptp:PuppetDistributiom>

Add as many variables as you need.

If you have variables in a custom name-space, you can add that too by wrapping the variables in a “NameSpace” entry like so:

 <contents xsi:type="pptp:NameSpace" name="myNameSpace" reserved="true">
     <contents xsi:type="pptp:TPVariable"
      name="myName"
      documentation="myNameSpace::myName is a..."/>
 </contents>

After having added the file, you may need to perform a “Build Clean” to make it take effect in files where errors/warnings have already been reported.

Troubleshooting

I get an error for "unknown xxx", but when I validate it is OK. What is wrong?

06 Jun 2011

This happens when there are issues with the order in which things are built. It is possible that when the build was executed for the file in question, the information about the ‘unknown’ was not yet available. The most common cause of this problem is that there are circular dependencies between modules. Check if there are any such errors reported and fix those first.

I get "Unknown resource for a simple file resource". What is wrong?

06 Jun 2011

In the example below, the ‘file’ is flagged with an error marker. Surely Geppetto should understand what ‘file’ is!

file { 'foo': }

This can happen when the project that contains the manifest in question does not have the Puppet Nature set. You can set this nature via the project’s context menu. The wizards, which create Puppet projects from with an empty module or from an existing module in the Forge, automatically set the Puppet Nature on creation, but if you create a General project or import a project from from Git (or another repository), Geppetto does not assume that the Puppet code in the project should be linked.

Also see Issue #85

What does "Expected to comply with String rule" mean?

06 Jun 2011

This means that a single quoted string does not consist of a valid sequence of characters. If you believe Geppetto is in error, please open an issue as it should not really be possible to construct an illegal string with the editor. In case of a single quoted string, this error is shown when there is an unescaped single quote inside of the string as in these examples:

'Chunga's revenge'
'Chunga\\'s revenge'

The error message is not very helpful, and has been changed to: “Contains illegal character(s). Probably an unescaped single quote.” in version 1.0.1.