geppetto by Puppet Labs

an integrated toolset for developing Puppet modules and manifests

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

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.

Who is behind Geppetto, do you have a website?

20 Feb 2014

Puppet Labs, Inc. is behind the project. You can find out more about us on the Puppet Labs website.

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 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 of the latest Eclipse release train (currently Luna) http://download.eclipse.org/releases/luna/
  • Expand the “Programming Languages” category
  • Select feature “Dynamic Languages Toolkit - Ruby Development Tools”
  • 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.

Note:

The installation of DLTK for Ruby into the Geppetto standalone product will likely cause a “theme” conflict since the install implies the install of the Eclipse Platform feature which in turn brings in a theme that conflicts with the one provided with Geppetto.

The conflict will only be visible as trace output in the application log and can be safely ignored.

Can I use Geppetto in my Eclipse?

14 Aug 2014

If you want to install Geppetto into your Eclipse IDE, you can do so by giving the Eclipse update manager this repository URL: http://geppetto-updates.puppetlabs.com/4.x. 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 4.3 (Kepler) or later is required.

How do I make Java >= 1.7 the default on MacOS/X

22 Sep 2014

Geppetto versions >= 4.3 requires Java >= 1.7 to run. It is possible that you have this installed on a MacOS/X based machine but Geppetto still reports that the Java version in use is Java 1.6. This is because the installation doesn’t change the default setting that appoints older installations of the Apple JVM. The default java version is reported with the command:

$ java -version

If it reports 1.6.x then Geppetto will not run unless you take action. You can either tell Geppetto to explicitly use a Java other than the default (see _/Geppetto.app/Contents/Info.plist_ for more info), or you can change the default.

Start a command shell and navigate to:

$ cd /System/Library/Frameworks/JavaVM.framework/Versions

Here you’ll find a symbolic link named CurrentJDK. It probably points to /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents Use the following command:

$ /usr/libexec/java_home

to find the home of the new JDK. It will be something like: /Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home. Now change the link (notice that the last segment /Home should NOT be included):

$ sudo rm CurrentJDK
$ sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/ CurrentJDK

That’s all. Verify that the new version is reported by:

$ java -version

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).

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 .com_puppetlabs_geppetto_pptp_target
  • Create a new file called something like “myvariables.pptp”
  • Enter the text below

    </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.

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.

Geppetto reports that Java 1.6 is used but Java >= 1.7 is installed

22 Sep 2014

Multiple Java versions may be installed on a machine but Geppetto will use the one that is configured as default. You can determine which one that is by issuing the command:

$ java -version

If you’re on a Mac, then How do I make Java >= 1.7 the default on MacOS/X. might provide more help.

My Mac says - To open “Geppetto” you need to install the legacy Java SE 6 runtime.

18 Jan 2015

This is incorrect. Geppetto will not run using Java SE 6 and installing it will not help. The dialog is probably caused by Oracle’s missing definitions of the JVM capabilities in which case this elaborate answer on Stack Overflow might be helpful.