Home > developer > content development > Content Development Introduction
Use this section to set up your environment for Uniphy pack (circuits)/cookbook development on a Mac OS X or a Linux system and to create a new component (cookbook) with its accompanying pack.
For both API and Circuit development you need access to a running Uniphy deployment. To build your own deployment, start with the Installation section.
For Circuit development, follow the instructions below.
Installation of Uniphy is described in the administration section.
The easiest way to start is to copy an existing cookbook and pack (for example, Tomcat) and develop on that. To do it from scratch, follow the procedure described below:
$ cd circuit-uniphy-1
$ bundle exec knife cookbook create mycomp
** Creating cookbook mycomp
** Creating README for cookbook: mycomp
** Creating CHANGELOG for cookbook: mycomp
** Creating metadata for cookbook: mycomp
$ vi components/cookbooks/mycomp/metadata.rb
add
, delete
, update
, replace
, repair
lifecycle actions)./packs
directory.To create a pack, follow these steps:
$ cd circuit-uniphy-1/packs
$ cp tomcat.rb mypack.rb
$ vi mypack.rb
As in the case of chef recipes, a Uniphy pack is also defined using a custom Ruby DSL with syntax like variable, resource, relation, etc. Because the Pack DSL is a Ruby DSL, anything that can be done using Ruby can also be done in a Pack, including if and case statements, using the include? Ruby method, etc. For detailed information on how to develop a pack, see Add a Platform.
To create a circuit, refer to:
This section is useful if you are using a shared dev instance in your organization .
Before you start the testing, make sure you have access to your Uniphy dev instance and have added your SSH keys to the Inductor.
# Sync the metadata and packs.
# This is only required if there are any changes in the metadata or pack:
# Pack sync commands.
cd circuit-uniphy-1/
export CMSAPI=http://<your Uniphy instance>:8080/
bundle exec knife model sync mycomp
bundle exec knife pack sync packs/mypack --reload
curl http://<your Uniphy instance>:8080/transistor/rest/cache/md/clear
cd circuit-uniphy-1
scp -r components/cookbooks/mycomp ooadmin@<your Uniphy instance inductor>:/opt/uniphy/circuit-uniphy-1/current/components/cookbooks/
scp packs/mypack.rb ooadmin@<your Uniphy instance inductor>:/opt/uniphy/circuit-uniphy-1/current/packs/
https://<your Uniphy instance inductor>/
.
Do not store any of your source code in uniphy/inductor dev env. This env is upgraded every Wednesday as part of the regular Uniphy release cycle.