Home > developer > content development > Add a New Component
To add a new Component Class to a model so it can be used by Platforms, follow these steps:
In this example, we use Jboss as an example of a new component.
cd packer; util/new_component.rb Jboss
his generates the dirs and files with common values. See the sample output in the first Note below.
cd cookbooks/Jboss
cd recipes
depends_on, deployed_to, escorted_by,managed_via, realized_as, requires, and watched_by.cd ../<relationship> and edit metadata.rb adding Jboss accordingly.public/images/cms/Jboss.pngnew_component.rb Jboss output:
##
## Creating new component: /Users/mike/oo/packer/cookbooks/Jboss
##
DIR: /Users/mike/oo/packer/cookbooks/Jboss
updating metadata.rb
updating README.md
DIR: /Users/mike/oo/packer/cookbooks/Jboss/recipes
updating add.rb
updating delete.rb
updating repair.rb
updating restart.rb
updating start.rb
updating status.rb
updating stop.rb
updating update.rb
done.
Jboss Attributes from open source cookbook:
* Jboss_home - location for Jboss
* version - version to download
* dl_url - download url ...we can derive from the version tho, omitting
* Jboss_user - default Jboss user

metadata.rb - 4 parts:
name/descgroupingattrsactions (additional to add, update, delete)
2011 - 2020 © Walmart Inc. All Rights Reserved.