Creating a Flask-Diamond Module

A Flask-Diamond Module will enable a Flask-Diamond application to be installed using Puppet-Diamond onto a host in your enterprise.

Puppet-Diamond environment

Enter the Puppet-Diamond virtual environment and import your configuration settings.

workon puppet-diamond
source ~/.puppet-diamond

Scaffold initial files

The first step is to scaffold a new module. The general form of the command is: diamond-module ${APPLICATION_NAME}

The following example demonstrates creating a diamond module for an application called my-diamond-app. diamond-module my-diamond-app

SSH deploy keys

Create application SSH deploy keys.

ssh-keygen -t rsa -f files/ssh/id_rsa
open ${PD_GIT_WEB_URL}/${PD_GIT_GROUP}/${APPLICATION_NAME}/deploy_keys/new
pbcopy < files/ssh/

Add to a host

Add the new module class to a profile, located in ${PD_PATH}/${PD_MASTER}/profiles.

class {"my-diamond-app": ;}

Sync and Apply

Sync to the puppetmaster and apply the changes to the client. ${PUPPET_HOST} ${PUPPET_HOST}