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.
The project has three near-term objectives:
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.
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.
Cloudsmith Inc. is behind the project. You can find out more about us on the Cloudsmith website.
Yes, there is a Puppet Geppetto Google Group which can be read online, via email subscription, or via news (NNTP).
Yes, we (try to) hang out on the #geppetto IRC channel at freenode.net.
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.
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.
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.
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.
Yes, you can install just about anything that can be installed into an Eclipse. (Or install Geppetto into an Eclipse IDE).
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.
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.
Updating Geppetto is easy, simply do this:
Help
> Check for Updates
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).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:
Show Pacakge Content
Contents
> MacOS
geppetto.ini
and select Open With
(and select TextEdit).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:
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).
There is help inside Geppetto itself on general usage of the workbench, editors, keyboard shortcuts, projects, using git, svn, cvs, etc..
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.
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.
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.
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.
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.
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
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.