Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Guide That Contains This Content
[+] Expand All
[-] Collapse All

    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:

    Note: In this procedure, the sandbox directory might be referred to as $SB for short. That is, $SB is equivalent to /home/vagrant/sandbox-name.

    1. Go to the directory in which you keep your sandboxes.
      vagrant@jet-vm:~$ cd /home/vagrant
    2. Create subdirectories in the sandbox.
      1. Use the workon command to go into your sandbox.
        vagrant@jet-vm$ workon sandbox-name

        The workon command takes you directly to the $SB/src directory and sets the sandbox correctly.

        Alternatively, you can cd to the src directory of your sandbox.

      2. Create subdirectories for application code in $SB/src/python or $SB/src/lib or $SB/src/bin, based on whether you need Python, library, or bin (executable) files.
    3. Develop the code.
    4. Write an application JSON file.

      For details, see JSON File Format for JET Application Packaging.

    5. Autogenerate the appropriate makefiles by running the command.

      The command takes two options:

      • The -i option is followed by the path and filename of the JSON file.
      • The -p option is followed by the path to the src directory of the sandbox.

      For example, if you had a sandbox named demo:

      vagrant@jet-vm:~/demo/src$ -i /home/vagrant/demo/src/demo.json -p /home/vagrant/demo/src

      This command assumes that you have added the path to to your .bashrc file. If not, you need to include the path to

      vagrant@jet-vm:~/demo/src$ /usr/local/junos-jet/16.1R1.3/junos-jet-sb/src/junos/host-utils/scripts/ -i /home/vagrant/demo/src/demo.json -p /home/vagrant/demo/src

      Note: The autogenerated application makefile will be correct for most cases; if there are any external library dependencies, the makefile must be adjusted accordingly.

    Modified: 2016-06-08