Developing an Application by Manual Workflow
To develop your application, create subdirectories in your sandbox for components of your application. Then develop the code. Lastly, autogenerate the application makefile.
To develop an application:
In this procedure, the sandbox directory might be referred
to as $SB for short. That is,
$SB is equivalent to
- Go to the directory in which you keep
your sandboxes.vagrant@jet-vm:~$ cd /home/vagrant
- Create subdirectories in the sandbox.
- Use the
workoncommand to go into your sandbox.vagrant@jet-vm$ workon sandbox-name
workoncommand takes you directly to the
$SB/srcdirectory and sets the sandbox correctly.
Alternatively, you can
srcdirectory of your sandbox.
- Create subdirectories for application code in
$SB/src/bin, based on whether you need Python, library, or bin (executable) files.
- Use the
- Develop the code.
- Write an application JSON file.
For details, see JSON File Format for JET Application Packaging.
- Autogenerate the appropriate makefiles by running the
jet-pkg-gen.pycommand takes two options:
-ioption is followed by the path and filename of the JSON file.
-poption is followed by the path to the
srcdirectory of the sandbox.
For example, if you had a sandbox named demo:vagrant@jet-vm:~/demo/src$ jet-pkg-gen.py -i /home/vagrant/demo/src/demo.json -p /home/vagrant/demo/src
This command assumes that you have added the path to
.bashrcfile. If not, you need to include the path to
jet-pkg-gen.py:vagrant@jet-vm:~/demo/src$ /usr/local/junos-jet/16.1R1.3/junos-jet-sb/src/junos/host-utils/scripts/jet-pkg-gen.py -i /home/vagrant/demo/src/demo.json -p /home/vagrant/demo/src
The autogenerated application makefile will be correct for most cases; if there are any external library dependencies, the makefile must be adjusted accordingly.