Anda di halaman 1dari 50

_____________________________________________________________________________________

Junos Space SDK


Installation Guide

Release

1.0.1
______________________________________________________________________________________________________

Issue 1 Published: Feb 24, 2011

Copyright 2010, Juniper Networks, Inc.

Junos Space SDK Installation Guide

Juniper Networks, Inc. 1194 North Mathilda Avenue Sunnyvale, California 94089 USA 408-745-2000 www.juniper.net This product includes memory allocation software developed by Mark Moraes, copyright 1988, 1989, 1993, University of Toronto. This product includes FreeBSD software developed by the University of California, Berkeley, and its contributors. All of the documentation and software included in the 4.4BSD and 4.4BSD-Lite Releases is copyrighted by the Regents of the University of California. Copyright 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994. The Regents of the University of California. All rights reserved. Juniper Networks, Junos, Steel-Belted Radius, NetScreen, and ScreenOS are registered trademarks of Juniper Networks, Inc. in the United States and other countries. The Juniper Networks Logo, the Junos logo, and JunosE are trademarks of Juniper Networks, Inc. All other trademarks, service marks, registered trademarks, or registered service marks are the property of their respective owners. Juniper Networks assumes no responsibility for any inaccuracies in this document. Juniper Networks reserves the right to change, modify, transfer, or otherwise revise this publication without notice. Products made or sold by Juniper Networks or components thereof might be covered by one or more of the following patents that are owned by or licensed to Juniper Networks: U.S. Patent Nos. 5,473,599, 5,905,725, 5,909,440, 6,192,051, 6,333,650, 6,359,479, 6,406,312, 6,429,706, 6,459,579, 6,493,347, 6,538,518, 6,538,899, 6,552,918, 6,567,902, 6,578,186, and 6,590,785.

Junos Space SDK Installation Guide Release 1.0.1 Copyright 2011, Juniper Networks, Inc. All rights reserved. Printed in USA. Revision History Feb 24, 2011Release 1.o.1 The information in this document is current as of the date listed in the revision history. YEAR 2000 NOTICE Juniper Networks hardware and software products are Year 2000 compliant. The Junos OS has no know time-related limitations through the 2038. However, the NTP application is known to have some difficulty in the year 2036.

END USER LICENSE AGREEMENT READ THIS END USER LICENSE AGREEMENT (AGREEMENT) BEFORE DOWNLOADING, INSTALLING, OR USING THE SOFTWARE. BY DOWNLOADING, INSTALLING, OR USING THE SOFTWARE OR OTHERWISE EXPRESSING YOUR AGREEMENT TO THE TERMS CONTAINED HEREIN, YOU (AS CUSTOMER OR IF YOU ARE NOT THE CUSTOMER, AS A REPRESENTATIVE/ AGENT AUTHORIZED TO BIND THE CUSTOMER) CONSENT TO BE BOUND BY THIS AGREEMENT. IF YOU DO NOT OR CANNOT AGREE TO THE TERMS CONTAINED HEREIN, THEN (A) DO NOT DOWNLOAD, INSTALL, OR USE THE SOFTWARE, AND (B) YOU MAY CONTACT JUNIPER NETWORKS REGARDING LICENSE TERMS. 1. The Parties. The parties to this Agreement are (i) Juniper Networks, Inc. (if the Customers principal office is located in the Americas) or Juniper Networks (Cayman) Limited (if the Customers principal office is located outside the Americas) (such applicable entity being referred to herein as Juniper), and (ii) the person or organization that originally purchased from Juniper or an authorized Juniper reseller the applicable license(s) for use of the Software (Customer) (collectively, the Parties). 2. The Software. In this Agreement, Software means the program modules and features of the Juniper or Juniper-supplied software, for which Customer has paid the applicable license or support fees to Juniper or an authorized Juniper reseller, or which was embedded by Juniper in equipment which Customer purchased from Juniper or an authorized Juniper reseller. Software also includes updates, upgrades and new releases of such software. Embedded Software means Software which Juniper has embedded in or loaded onto the Juniper equipment and any updates, upgrades, additions or replacements which are subsequently embedded in or loaded onto the equipment. 3. License Grant. Subject to payment of the applicable fees and the limitations and restrictions set forth herein, Juniper grants to Customer a non-exclusive and non-transferable license, without right to sublicense, to use the Software, in executable form only, subject to the following use restrictions: a. Customer shall use Embedded Software solely as embedded in, and for execution on, Juniper equipment originally purchased by Customer from Juniper or an authorized Juniper reseller. b. Customer shall use the Software on a single hardware chassis having a single processing unit, or as many chassis or processing units for which Customer has paid the applicable license fees; provided, however, with respect to the Steel-Belted Radius or Odyssey Access Client software only, Customer shall use such Software on a single computer containing a single physical random access memory space and containing any number of processors. Use of the Steel-Belted Radius or IMS AAA software on multiple computers or virtual machines (e.g., Solaris zones) requires multiple licenses, regardless of whether such computers or virtualizations are physically contained on a single chassis. c. Product purchase documents, paper or electronic user documentation, and/or the particular licenses purchased by Customer may specify limits to Customers use of the Software. Such limits may restrict use to a maximum number of seats, registered endpoints, concurrent users, sessions, calls, connections, subscribers, clusters, nodes, realms, devices, links, ports or transactions, or require the purchase of separate licenses to use particular features, functionalities, services, applications, operations, or capabilities, or provide throughput, performance, configuration, bandwidth, interface, processing, temporal, or geographical limits. In addition, such limits may restrict the use of the Software to managing certain kinds of networks or require the Software to be used only in conjunction with other specific Software. Customers use of the Software shall be subject to all such limitations and purchase of all applicable licenses. d. For any trial copy of the Software, Customers right to use the Software expires 30 days after download, installation or use of the Software. Customer may operate the Software after the 30-day trial period only if Customer pays for a license to do so. Customer may not extend or create an additional trial period by re-installing the Software after the 30-day trial period. e. The Global Enterprise Edition of the Steel-Belted Radius software may be used by Customer only to manage access to Customers enterprise network. Specifically, service provider customers are expressly prohibited from using the Global Enterprise Edition of the Steel-Belted Radius software to support any commercial network access services. The foregoing license is not transferable or assignable by Customer. No license is granted herein to any user who did not originally purchase the applicable license(s) for the Software from Juniper or an authorized Juniper reseller. 4. Use Prohibitions. Notwithstanding the foregoing, the license provided herein does not permit the Customer to, and Customer agrees not to and shall not: (a) modify, unbundle, reverse engineer, or create derivative works based on the Software; (b) make unauthorized copies of the Software (except as necessary for backup purposes); (c) rent, sell, transfer, or grant any rights in and to any copy of the Software, in any form, to any third party; (d) remove any proprietary notices, labels, or marks on or in any copy of the Software or any product in which the Software is embedded; (e) distribute any copy of the Software to any third party, including as may be embedded in Juniper equipment sold in the secondhand market; (f) use any locked or key-restricted feature, function, service, application, operation, or capability without first purchasing the applicable license(s) and obtaining a valid key from Juniper, even if such feature, function, service, application, operation, or capability is enabled without a key; (g) distribute any key for the Software provided by Juniper to any third party; (h) use the Software in any manner that extends or is broader than the uses purchased by Customer from Juniper or an authorized Juniper reseller; (i) use Embedded Software on non-Juniper equipment; (j) use Embedded Software (or make it available for use) on Juniper equipment that the Customer did not originally purchase from Juniper or an authorized Juniper reseller; (k) disclose the results of testing or benchmarking of the Software to any third party without the prior written consent of Juniper; or (l) use the Software in any manner other than as expressly provided herein. 5. Audit. Customer shall maintain accurate records as necessary to verify compliance with this Agreement. Upon request by Juniper, Customer shall furnish such records to Juniper and certify its compliance with this Agreement.

Junos Space SDK Installation Guide

6. Confidentiality. The Parties agree that aspects of the Software and associated documentation are the confidential property of Juniper. As such, Customer shall exercise all reasonable commercial efforts to maintain the Software and associated documentation in confidence, which at a minimum includes restricting access to the Software to Customer employees and contractors having a need to use the Software for Customers internal business purposes. 7. Ownership. Juniper and Junipers licensors, respectively, retain ownership of all right, title, and interest (including copyright) in and to the Software, associated documentation, and all copies of the Software. Nothing in this Agreement constitutes a transfer or conveyance of any right, title, or interest in the Software or associated documentation, or a sale of the Software, associated documentation, or copies of the Software. 8. Warranty, Limitation of Liability, Disclaimer of Warranty. The warranty applicable to the Software shall be as set forth in the warranty statement that accompanies the Software (the Warranty Statement). Nothing in this Agreement shall give rise to any obligation to support the Software. Support services may be purchased separately. Any such support shall be governed by a separate, written support services agreement. TO THE MAXIMUM EXTENT PERMITTED BY LAW, JUNIPER SHALL NOT BE LIABLE FOR ANY LOST PROFITS, LOSS OF DATA, OR COSTS OR PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, THE SOFTWARE, OR ANY JUNIPER OR JUNIPER-SUPPLIED SOFTWARE. IN NO EVENT SHALL JUNIPER BE LIABLE FOR DAMAGES ARISING FROM UNAUTHORIZED OR IMPROPER USE OF ANY JUNIPER OR JUNIPER-SUPPLIED SOFTWARE. EXCEPT AS EXPRESSLY PROVIDED IN THE WARRANTY STATEMENT TO THE EXTENT PERMITTED BY LAW, JUNIPER DISCLAIMS ANY AND ALL WARRANTIES IN AND TO THE SOFTWARE (WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE), INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT DOES JUNIPER WARRANT THAT THE SOFTWARE, OR ANY EQUIPMENT OR NETWORK RUNNING THE SOFTWARE, WILL OPERATE WITHOUT ERROR OR INTERRUPTION, OR WILL BE FREE OF VULNERABILITY TO INTRUSION OR ATTACK. In no event shall Junipers or its suppliers or licensors liability to Customer, whether in contract, tort (including negligence), breach of warranty, or otherwise, exceed the price paid by Customer for the Software that gave rise to the claim, or if the Software is embedded in another Juniper product, the price paid by Customer for such other product. Customer acknowledges and agrees that Juniper has set its prices and entered into this Agreement in reliance upon the disclaimers of warranty and the limitations of liability set forth herein, that the same reflect an allocation of risk between the Parties (including the risk that a contract remedy may fail of its essential purpose and cause consequential loss), and that the same form an essential basis of the bargain between the Parties. 9. Termination. Any breach of this Agreement or failure by Customer to pay any applicable fees due shall result in automatic termination of the license granted herein. Upon such termination, Customer shall destroy or return to Juniper all copies of the Software and related documentation in Customers possession or control. 10. Taxes. All license fees payable under this agreement are exclusive of tax. Customer shall be responsible for paying Taxes arising from the purchase of the license, or importation or use of the Software. If applicable, valid exemption documentation for each taxing jurisdiction shall be provided to Juniper prior to invoicing, and Customer shall promptly notify Juniper if their exemption is revoked or modified. All payments made by Customer shall be net of any applicable withholding tax. Customer will provide reasonable assistance to Juniper in connection with such withholding taxes by promptly: providing Juniper with valid tax receipts and other required documentation showing Customers payment of any withholding taxes; completing appropriate applications that would reduce the amount of withholding tax to be paid; and notifying and assisting Juniper in any audit or tax proceeding related to transactions hereunder. Customer shall comply with all applicable tax laws and regulations, and Customer will promptly pay or reimburse Juniper for all costs and damages related to any liability incurred by Juniper as a result of Customers noncompliance or delay with its responsibilities herein. Customers obligations under this Section shall survive termination or expiration of this Agreement. 11. Export. Customer agrees to comply with all applicable export laws and restrictions and regulations of any United States and any applicable foreign agency or authority, and not to export or re-export the Software or any direct product thereof in violation of any such restrictions, laws or regulations, or without all necessary approvals. Customer shall be liable for any such violations. The version of the Software supplied to Customer may contain encryption or other capabilities restricting Customers ability to export the Software without an export license. 12. Commercial Computer Software. The Software is commercial computer software and is provided with restricted rights. Use, duplication, or disclosure by the United States government is subject to restrictions set forth in this Agreement and as provided in DFARS 227.7201 through 227.7202-4, FAR 12.212, FAR 27.405(b)(2), FAR 52.227-19, or FAR 52.227-14(ALT III) as applicable. 13. Interface Information. To the extent required by applicable law, and at Customer's written request, Juniper shall provide Customer with the interface information needed to achieve interoperability between the Software and another independently created program, on payment of applicable fee, if any. Customer shall observe strict obligations of confidentiality with respect to such information and shall use such information in compliance with any applicable terms and conditions upon which Juniper makes such information available. 14. Third Party Software. Any licensor of Juniper whose software is embedded in the Software and any supplier of Juniper whose products or technology are embedded in (or services are accessed by) the Software shall be a third party beneficiary with respect to this Agreement, and such licensor or vendor shall have the right to enforce this Agreement in its own name as if it were Juniper. In addition, certain third party software may be provided with the Software and is subject to the accompanying license(s), if any, of its respective owner(s). To the extent portions of the Software are distributed under and subject to open source licenses obligating Juniper to make the source code for such portions publicly available (such as the GNU General Public License (GPL) or the GNU Library General Public License (LGPL)), Juniper will make such source code portions (including Juniper modifications, as appropriate) available upon request for a period of up to three years from the date of distribution. Such request can be made in

writing to Juniper Networks, Inc., 1194 N. Mathilda Ave., Sunnyvale, CA 94089, ATTN: General Counsel. You may obtain a copy of the GPL at http://www.gnu.org/licenses/gpl.html, and a copy of the LGPL at http://www.gnu.org/licenses/lgpl.html. 15. Miscellaneous. This Agreement shall be governed by the laws of the State of California without reference to its conflicts of laws principles. The provisions of the U.N. Convention for the International Sale of Goods shall not apply to this Agreement. For any disputes arising under this Agreement, the Parties hereby consent to the personal and exclusive jurisdiction of, and venue in, the state and federal courts within Santa Clara County, California. This Agreement constitutes the entire and sole agreement between Juniper and the Customer with respect to the Software, and supersedes all prior and contemporaneous agreements relating to the Software, whether oral or written (including any inconsistent terms contained in a purchase order), except that the terms of a separate written agreement executed by an authorized Juniper representative and Customer shall govern to the extent such terms are inconsistent or conflict with terms contained herein. No modification to this Agreement nor any waiver of any rights hereunder shall be effective unless expressly assented to in writing by the party to be charged. If any portion of this Agreement is held invalid, the Parties agree that such invalidity shall not affect the validity of the remainder of this Agreement. This Agreement and associated documentation has been written in the English language, and the Parties agree that the English version will govern. (For Canada: Les parties aux prsents confirment leur volont que cette convention de mme que tous les documents y compris tout avis qui s'y rattach, soient redigs en langue anglaise. (Translation: The parties confirm that this Agreement and all related documentation is and will be in the English language)).

Junos Space SDK Installation Guide

Table of Contents
Chapter 1 About the Junos Space SDK .......................................................................................................... 8 How to Get Help .................................................................................................................................. 8 Recommended Readings ..................................................................................................................... 8 Oracle VirtualBox ................................................................................................................................ 8 JBoss ................................................................................................................................................... 8 Eclipse ................................................................................................................................................. 8 HornetQ REST APIs ............................................................................................................................. 9 Introduction to the Junos Space SDK Documentation ......................................................................... 9 System Requirements ......................................................................................................................... 9 Hardware ............................................................................................................................................ 9 Platform OS ........................................................................................................................................ 9 User Privileges Required for Installing the SDK ...................................................................................10 Verifying and Enabling Virtualization Extensions in the Host CPU ................................................. 11 Installing Prerequisite Third-Party Software ................................................................................ 12 Download and Install the Java EE 6 SDK .............................................................................................12 Download and Install Eclipse, Helios edition .......................................................................................12 Download and Install Oracle VirtualBox .............................................................................................. 13 Download Oracle VirtualBox .............................................................................................................. 13 Install Oracle VirtualBox ..................................................................................................................... 13 Installing the SDK ...................................................................................................................... 17 Installing the SDK ............................................................................................................................... 17 Configuring the JSVA ................................................................................................................. 28 Configuring the Amount of RAM Allocated for the VM ...................................................................... 28 Starting Eclipse .......................................................................................................................... 30 Verifying the Installation ............................................................................................................ 32 Configuring and Starting Devices in the Device Simulator ............................................................ 33 Start the VM ....................................................................................................................................... 33 Configuring Device Instances.............................................................................................................. 33 Creating devices and assigning their IP addresses ............................................................................... 33 Starting the Simulator Devices ...........................................................................................................36 Discovering Device Simulator Devices ......................................................................................... 37 Enabling SIC to Discover Real Devices ............................................................................................... 44 Troubleshooting ........................................................................................................................ 46 VirtualBox Error: VERR_NOT_SUPPORTED ...................................................................................... 46 Solution: ............................................................................................................................................ 46 Cant manage real devices in Space UI ................................................................................................ 47 Solution: ............................................................................................................................................. 47 Error while porting applications from 1.0 ............................................................................................ 47 Solution: ............................................................................................................................................. 47 Optional Device Simulator Configurations ................................................................................... 49 Changing the Number of Allowed Concurrent Simulator Sessions ..................................................... 49 JSVA Ports and Addressing ......................................................................................................... 50 How to ssh to the JSVA ...................................................................................................................... 50

CHAPTER 1

About the Junos Space SDK


How to Get Help
For help installing or using the SDK, contact Juniper at js-sdk-support@juniper.net

Recommended Readings
Oracle VirtualBox
The Junos Space SDK uses Oracle VirtualBox (VBox) software and a virtual machine (VM) called the Junos Space Virtual Appliance (JSVA) that has a Junos Space installation installed. The VBox software can be installed on the platform used for development or on a different platform, and it can connect to virtual devices provided by the Device Simulator also installed in the JSVA, or to real devices. How you configure VBox will differ based on the above cases. This manual documents the case where the VBox software and JSVA are installed on the development workstation where the SDK IDE plugin is installed. For information about configuring VBox for a non-default installation, see the VirtualBox documentation, available online at: http://www.virtualbox.org/wiki/Documentation.

JBoss
Junos Space is implemented on the JBoss J2EE Application Server. The SDK Eclipse IDE plugin provides options for building and deploying Space applications built with the SDK to the JBoss server in the Junos Space Virtual Appliance (JSVA) and you may never need to interact with JBoss beyond this level. If you do, see the documentation for the JBoss Application Server (JBoss AS) available at: http://www.jboss.org/jbossas/docs.

Eclipse
The SDK uses the Helios (v3.6) Eclipse distribution and custom SDK plugins that are delivered by the SDK installer. You may use an existing Eclipse Helios installation or download and install the Eclipse IDE for Java EE Developers, Helios version, before running the SDK installer. Note that Eclipse Galileo (v3.5) may also be used. Eclipse has a robust set of online documentation accessed from its help menu, which includes help for this SDK. For additional Eclipse documentation, you can start at http://help.eclipse.org/helios/index.jsp.

Copyright 2010, Juniper Networks, Inc.

HornetQ REST APIs


Some Junos Space REST APIs employ HornetQ REST APIs for notification queues. Documentation for the HornetQ REST APIs is available at http://docs.jboss.org/resteasy/hornetq-rest/1.0-beta1/userguide/html_single/index.html.

Introduction to the Junos Space SDK Documentation


The Junos Space SDK includes documentation in PDF form and online documentation viewed from the Eclipse help menu. Along with this Installation Guide, the other documents in the documentation set are: Release Notes describing the features in the current release, as well as known issues and any last minute information that didnt make it into the documentation. Junos Space SDK online documentation available through the Eclipse help menu. The following SDK documents are delivered in the Eclipse help: Junos Space REST API Reference providing documentation for the REST APIs in the SDK Junos Space Application Developers Guide providing information about the SDK and how to use it. The GoogleMashupApp reference application included in the SDK is documented in this guide. Device Simulator Users Guide providing instructions for using the command line interface to the Device Simulator included in the JSVA.

System Requirements
Development machines where the Junos Space SDK will be installed must meet the requirements specified in this section.

Hardware
Memory: 4GB (minimum) Disk: 60 GB (minimum) CPU: VT-x or AMD-V virtualization extension

Platform OS
Windows 7 (recommended) or Windows XP Professional

Junos Space SDK Installation Guide

User Privileges Required for Installing the SDK


The Windows user installing the VirtualBox software used by the SDK must have administrative privileges on the system where VirtualBox is being installed.

Verifying and Enabling Virtualization Extensions in the Host CPU


To run the Junos Space Virtual Appliance (JSVA), the CPU in the host PC must support the VT-x or AMD-V virtualization extensions, and these extensions must be enabled in the host BIOS. The 64-bit version of the JSVA provided with the SDK will not run without a supported virtualization extension enabled in the CPU. The VirtualBox main screen will indicate whether virtualization extensions are enabled, as shown below. You will see this screen every time you start VirtualBox after the first start.

Refer to your system vendors documentation for enabling virtualization extensions in the host BIOS. Most PCs and laptops do not have virtualization extensions enabled by default.

Junos Space SDK Installation Guide

CHAPTER 2

Installing Prerequisite Third-Party Software


The Junos Space SDK uses several third-party development packages that must be installed before the SDK package is installed. These prerequisite packages are: Java EE 6 SDK (latest update) Eclipse Helios release Oracle VirtualBox

This section provides brief instructions for installing each.

Download and Install the Java EE 6 SDK


To install the latest Java EE 6 SDK: 1. Download the most recent update of the Java EE 6 SDK from http://www.oracle.com/technetwork/java/javaee/downloads/index. html. Install the Java EE 6 SDK. It contains JDK 6 (JDK 1.6) See the instructions on the Java download site for instructions. You dont have to set the JAVA_HOME environment variable as is typically required when installing the SDK. The Junos Space SDK installer will set it for you. If the Java EE 6 installer prompts for an HTTP port, do not use port 8080. This port is used by the Junos Space SDK. See Appendix B for a list of ports used by the Junos Space SDK.

2.

Note

Download and Install Eclipse, Helios edition


Note If you already have the Java EE Developers package of Eclipse Helios (Eclipse version 3.6) installed, you may skip this procedure.

To download Eclipse, perform the following steps: 1. 2. Browse to http://www.eclipse.org/downloads/packages/release/helios/sr1/. Download the Eclipse IDE for Java EE Developers version and save it to a target folder on your local system.

To install Eclipse, follow these steps: 1. 2. Navigate to the folder containing the Eclipse zip file you downloaded. Extract the zip contents to a target directory of your choosing.

Download and Install Oracle VirtualBox


Oracle VirtualBox is the virtual machine manager software that runs the Linuxbased JSVA and Juniper device simulator. There are two parts to installing VirtualBox: Download and install the VirtualBox software Configure JSVA networking

The procedure for downloading and installing VirtualBox is provided here. The JSVA is installed by the SDK installer, as described in CHAPTER 3. Subsequent chapters describe how to configure JSVA networking.

Download Oracle VirtualBox


1. 2. Browse to http://www.virtualbox.org/wiki/Download_Old_Builds_3_2. Download and save VirtualBox for Windows. This will download a file named VirtualBox-<version>-Win.exe.

Install Oracle VirtualBox


1. Execute the VirtualBox installation program, VirtualBox-<version>-Win.exe. The VirtualBox Setup screen appears.

Junos Space SDK Installation Guide

2.

Click Next. At the License Agreement screen, accept the License Terms and click Next, or click Cancel to end the installation. The Custom Setup screen appears:

3.

Click Next to accept the defaults. The following warning screen appears.

4.

Verify that loss of your network connection will not cause problems, and then click Yes. The Ready to Install screen appears:

5.

Click Install. If Software Installation, Hardware Installation or similar warning screens appear during installation, click Continue Anyway.

Junos Space SDK Installation Guide

6.

When installation completes, the following screen appears. Click Finish.

CHAPTER 3

Installing the SDK


To install the SDK distribution files, perform the steps provided in this chapter. The installer allows you to selectively install the SDK IDE plugin, the JSVA, or both SDK components at the same time. This enables a variety of different development environments to be used, such as operating the JSVA and SDK IDE plugin on different systems, or installing the SDK IDE plugin into a virtual machine operating on the same host system as the JSVA. In these situations, you will run the installer twice, once for each component. The following installation procedure assumes both SDK components are being installed at the same time. If you choose to install only one of the components, the sequence of screens you see will differ from the sequence described below.

Installing the SDK


1. Navigate to the location of the installation file junos-spaceSDK_1.0.1_Setup.exe and double click on it to launch the installer. If a Security Warning screen appears, click Run. Files are extracted by the installer, with progress status screens displayed, and then the Junos Space SDK installer Introduction screen appears. Click Next.

2. 3.

Junos Space SDK Installation Guide

4.

The End User License screen appears. You have to read the entire license agreement, and then only it will allow you to select the "I accept the terms of the License Agreement" option. Accept the license. Click Next.

5.

Accept the license and click Next. The Upgrade Junos Space SDK screen appears. This screen appears if older version of JUNOS is installed on the system.

6.

I f the same version of Installer is already installed; it displays a popup message to confirm the upgrading. Click Yes, to confirm the upgrading.

7.

The Organization screen appears. Specify the organization name. Click Next.

Junos Space SDK Installation Guide

8.

The Custom Setup screen appears, Select an installation type from the options below. Click Next. Junos Space SDK Plugin + Junos Space Platform: The SDK IDE (Eclipse) plugin and the JSVA are installed. Junos Space SDK Plugin for Eclipse: The SDK IDE (Eclipse) plugin is installed. Junos Space Platform: The JSVA is installed.

9.

The Java Location screen appears, If the JAVA_HOME environment variable is already defined, its value will be displayed in the JAVA_HOME field. If it is not, enter the directory where the JDK is installed or click Choose to navigate to the directory and select it.

10. Click Next. Specify the location of the Eclipse installation to use with the SDK. Click Choose to browse to the directory and select it. Click Restore Default to restore the initial value displayed in the field. If the installer cannot find Eclipse, it will not allow you to proceed to the next screen.

Junos Space SDK Installation Guide

11. Click Next. The Junos Space Platform screen appears

12. Specify the directory where Oracle VirtualBox was installed. Click Next. Click Choose to browse to the directory and select it. Click Restore Default to restore the initial value displayed in the field. If the installer cannot find VirtualBox, it will not allow you to proceed to the next screen.

13.

Select the appropriate configuration and click Next.

14. The Platform IP screen appears. Enter the IP address for the JSVA. This is the IP address that will be used by the SDK IDE to communicate with the JSVA. The default value is 127.0.0.1, which should be used when the JSVA and IDE plug-in are installed on the same system. (The JSVA uses NAT and port forwarding, so the 127.0.0.1 address is used when the JSVA is installed on the same system as the IDE plugin.) If you are installing (or have installed) the JSVA on a different system, enter the real IP address of the JSVA. Click Next.

Junos Space SDK Installation Guide

15. The Summary screen appears. You can correct the information by clicking Previous to navigate to the appropriate screen and correcting it. When all information is correct. Click Install.

16. Select the parts of the SDK to launch when you exit the installer. Click Next.

17. The final screen appears. Click Done. The installation is now complete.

18. After completion, the Installer will create Junos Space SDK Folder on Desktop that contains the release notes, adds Junos Space Sdk Eclipse. Also adds Junos Space Platform Menu options to Start Menu > All Programs > Juniper Networks > Junos Space SDK. 19. If you selected to start the Eclipse, IDE in the Start SDK screen, the Eclipse will start.

Junos Space SDK Installation Guide

20. If you selected to open the Junos Space SDK documentation folder option, Installer will open the Junos Space SDK Folder. If you elected to start the JSVA in the Start SDK screen, the JSVA VirtualBox console will appear and after it fully boots a login prompt will appear in the console window: Note The JSVA window captures keyboard/mouse input when you click in it. The default key for releasing the keyboard and mouse to the host OS is <Right-Ctrl>.

21. When the login prompt appears, you may log into the JSVA with the username admin and password abc123.

22. To access the JSVA OS command shell, select option 7> (Debug) run shell and enter the password abc123 when prompted. The OS shell prompt will appear, as shown below. See the Junos Space Application Developers Guide in the Junos Space Eclipse help for information about the options in the Junos Space Settings menu. Note In case, you wish to change the password of admin user in JSVA you need to update the new password in IDE configuration also (IDE uses this credential to connect to JSVA for Device Simulator, Application build/deploy and Package application for distribution operations). To apply the new password of JSVA in IDE edit eclipse/plugins/JunosSpaceSdkPlugin_1.0.1/JSpaceSDKPlugin.pro perties file and Change PASSWORD=abc123 with PASSWORD=<New Password of admin user>

Junos Space SDK Installation Guide

CHAPTER 4

Configuring the JSVA


The system on which the VirtualBox virtualization software is run is called the host system. The operating system inside the VM is called the client. The host and client communicate through the agency of a virtual adaptor created on the host. This adapt0r can be set to operate in several modes. The mode used for the JSVA is NAT mode. Port forwarding is implemented in VirtualBox to forward certain ports to the JSVA. When addressing the JSVA from applications homed on the host where the JSVA is installed, the localhost IP address and an application-specific port number are used. For example, to browse to the Space UI from the platform running the JSVA, use http://127.0.0.1:8080/mainui. To browse to the Space UI from a remote workstation, use the IP address of the host on which VirtualBox and the JSVA are installed. For example, http://192.168.1.25:8080/mainui. Port forwarding by VirtualBox will forward browser traffic to Junos Space. Note that HTTPS can also be used to browse to the Space UI. For HTTPS, specify port 8443 in the URL. For example, https://127.0.0.1:8443/mainui or https://192.168.1.25:8443/mainui. See Appendix B for a list of forwarded ports, and for instructions for connecting to the JSVA using ssh. Note that alternative networking configuration for the JSVA are possible but are not supported.

Configuring the Amount of RAM Allocated for the VM


The recommended amount of host system RAM to allocate to the JSVA VM is one half of the host system RAM. The amount allocated by default is 2 GB. To increase or decrease this amount, follow these steps: 1. 2. 3. If the JSVA VM is powered on, shutdown the JSVA OS and power down the VM. Select the JSVA VM from the image list in the left-hand panel of the VirtualBox main screen and click the Settings icon. In the Settings screen, select System from the list of options in the left-hand panel. The System configuration fields appear in the right-hand panel.

4.

With the Motherboard page selected (as shown below) adjust the amount of memory in the Base Memory field.

CHAPTER 5

Starting Eclipse
1. Launch Eclipse using either the executable eclipse\eclipse.exe located in the directory where the .zip was extracted, or your own Eclipse installation if you configured it for use with the SDK. You must start Eclipse from the command line with the clean option the first time after installing the SDK plugins. If you instruct the installer to start Eclipse automatically upon completion, it starts Eclipse with the clean option. 2. When queried for a workspace, enter a workspace where you want to create your project:

Copyright 2010, Juniper Networks, Inc.

30

3.

When Eclipse comes up again you will see the SPACE button on the Eclipse toolbar:

CHAPTER 6

Verifying the Installation


Verify the installation by browsing to the Space UI. Note that the server takes 610 minutes to start. Attempts to browse to it before it has completely initialized will timeout or fail. Note: 1. Some of the Space UI screens require the Adobe Flash Player browser plugin. The plugin is available for download at http://adobe.com. To verify the installation, open a browser on the Windows host and browse to the URL http://127.0.0.1:8080/mainui/. The following Log In page should appear in your browser:

2.

Login with this username/password: super/juniper123

Copyright 2010, Juniper Networks, Inc.

32

Configuring and Starting Devices in the Device Simulator


The Device Simulator is installed in the JSVA. This section provides required procedures for configuring device instances and procedures for stopping and starting the simulator. Instructions for optional configuration procedures are provided in Appendix A.

Start the VM
Before the Device Simulator devices can be configured, the JSVA must be running and networking between the developer workstation and the JSVA must be properly established. Once this precondition is satisfied, the procedures in this chapter may be performed.

Configuring Device Instances


Note When you reboot the JSVA you will need to re-start all of the simulator devices as described below. Also, devices previously discovered in Space will not come up. You will need to delete them in the Space UI and then re-discover them.

Creating devices and assigning their IP addresses


1. 2. Start Eclipse. Select File > Junos Space > Device Simulator from the Eclipse menu bar.

Junos Space SDK Installation Guide

3.

Click Configure. The Device Simulator Config window appears.

4.

Select from the 3rd Octet pull-down menu a value for the third octet of the IP addresses that will be assigned to the devices. Device IP addresses will have the first two octets shown preceding the pull-down menu. An example of the window is shown below: The value of the first two octets used in the virtual device IP addresses is defined in the SDK plug-in properties file: \eclipse\plugins\JunosSpaceSdkPlugin_<version>\ JSpaceSDKPlugin.properties.

Note:

Junos Space SDK Installation Guide

5.

Click Finish. The devices you specified will be created and the initial Device Simulator window will reappear listing the new devices with a Device Status of DOWN, as show below.

Starting the Simulator Devices


After configuring devices, you must start them before they can be brought under Junos Space management and used in Junos Space SDK applications. To start and stop simulator device instances, perform these steps: 1. At the Device Simulator Status screen, click Start Instances. The Device Status shown for the instances should change from DOWN to UP.

CHAPTER 7

Discovering Device Simulator Devices


Now that you have configured and started the Device Simulators, you are ready to discover them from Space. Discovery refers to a process by which devices on the network are discovered and brought under Space management. Once the simulated devices are under management, they can be configured in Space, either using the Space UI or using the REST APIs. 1. Log into Space using super/juniper123 as the credentials. (The Space login screen should still be open from Verifying the Installation on page 32. Select the Devices (Jump to Devices) icon:

2.

Copyright 2010, Juniper Networks, Inc.

37

Junos Space SDK Installation Guide

3.

Click the Discover Devices yellow light bulb icon in the ribbon:

4.

Click the Discover Targets bulls-eye icon in the ribbon. The Discover Targets screen appears:

5.

Click at the bottom of the Discover Targets screen. The Add Device Target dialog box appears.

Junos Space SDK Installation Guide

6.

In the Add Device Target dialog box, select the IP Range radio button, and in IP range textbox enter the range you configured for the simulators in the Configuring Device Instances procedure on page 33.

7. 8. 9.

Click Add to add the range. Click Next (located on the bottom of the screen) to display the Specify Probes screen. Verify that Use Ping is selected and Use SNMP is cleared.

10. Click Next again. The Specify Credentials screen appears. 11. In the Specify Credentials screen, click Login Credential dialog box. to display the Add Device

Junos Space SDK Installation Guide

12. In Username, enter root. For the Password enter and confirm netscreen. These credentials will be used by Space to log into the device simulators:

13. Click the blue Add button in the Add Device Login Credential dialog box.

14. Click the blue Discover button on the Specify Credentials screen and watch the device simulators being discovered and managed in Space. After a few minutes you should see all of the devices in the blue Managed bar on the Discovery Status screen:

Junos Space SDK Installation Guide

Enabling SIC to Discover Real Devices


If Space is configured to use the Reverse-SSH feature for Space device management (the default configuration), then you will not be able to manage real devices unless you change them from using Reverse-SSH to SIC (Server Initiated Connection). Simulated devices can be discovered in either SIC or nonSIC mode, where real devices can only be discovered in SIC mode if NAT (default) networking is used. SIC is enabled as follows: 1. In the Space UI, select Administration | Manage Applications from the icon ribbon.

2.

In The Manage Applications screen, select the Network Application Platform box and in the Action Drawer select Modify Application Settings.

3.

In The Modify Application Settings popup box that appears, select the Junos Space initiates connection to device checkbox.

4.

Click Modify.

CHAPTER 8

Troubleshooting
This chapter contains advice for troubleshooting problems that may occur when you install the SDK. VirtualBox Error: VERR_NOT_SUPPORTED The following screen may appear when you try to start the JSVA:

This error indicates the JSVA VM image cannot be started. This error can occur when the VM image is corrupted, which can be caused by exiting VirtualBox during a reboot of the JSVA OS.

Solution:
To resolve this problem: 1. 2. Exit VirtualBox. Locate the VM image and configuration files. Their default location is c:\Documents and Settings\<account name>\.VirtualBox, where <account name> is the account used when the SDK was installed. Note that the Show hidden files and folders folder option must be enabled in order to see this folder in Windows Explorer. Delete all of the files and folders in c:\Documents and Settings\<account name>\.VirtualBox. Use the SDK Installer to re-install the JSVA only

3.

4.

Copyright 2010, Juniper Networks, Inc.

46

Cant manage real devices in Space UI


If Space is configured to use the Reverse-SSH feature for Space device management (the default configuration), then you may not be able to manage your devices unless you change them from using Reverse-SSH to SIC (Server Initiated Connection).

Solution:
See the Enabling SIC to Discover Real Devices procedure on page 44 for the solution.

Error while porting applications from 1.0


If you are using 1.0 .1 plug-in and buidling/deploying old 1.0 application, you will get the following error:

Solution:
To resolve this problem: 1. Open the EAR Project's ".package" file.

Junos Space SDK Installation Guide

2.

Change the value of "todir" attribute from "C:/Temp/ " to "./bin/" as shown below:

3.

Restart Eclipse.

APPENDIX A

Optional Device Simulator Configurations


This appendix provides instructions for performing optional configuration procedures on the Device Simulator in the VM. These procedures are performed at the VM OS command line. See the procedure on page 26 starting at step 20 for instructions on opening a command shell in the JSVA.

Changing the Number of Allowed Concurrent Simulator Sessions


The default number of allowed concurrent simulator sessions is 10. You can increase this number if you want. 1. 3. 4. 5. Open /etc/ssh/sshd_config in an editor. Locate the MaxStartups parameter, update the number, and uncomment the parameter. Save the changes to sshd_config and close the file. Restart sshd. Type: service sshd restart

Copyright 2010, Juniper Networks, Inc.

49

APPENDIX B

JSVA Ports and Addressing


Certain ports are reserved for use by the JSVA and should not be used for any other application on the host where the JSVA is installed. These ports on the host, and the ports in the JSVA to which they are redirected, are: 8080-> 8080 Apache HTTP redirect 8787-> 8787 Jboss debug redirect 8022-> 22 ssh redirect 8443-> 8443 HTTPS redirect. 8888 -> 8888 Chainsaw logging redirect.

How to ssh to the JSVA


VirtualBox is configured to use NAT networking for the JSVA. This requires port forwarding to be used to reach the JSVA from the host. To ssh into the JSVA from the host system, specify port 8022 on the ssh command line. In addition, to reach the JSVA from the host where it is installed, use the localhost IP address, 127.0.0.1. For example: ssh -p 8022 admin@127.0.0.1 To ssh into the JSVA from a remote workstation, use the IP address of the JSVA host and port 8022. For example: ssh -p 8022 admin@<IP Address>

Note

To transfer files from/to the JSVA, you can use any Third party tool like WinScp. You need to provide the scp/ssh port 8022 and the following credentials: IP Address of the JSVA Scp / Ssh Port No: 8022 Username: admin Password: abc123

Copyright 2010, Juniper Networks, Inc.

50

Anda mungkin juga menyukai