-
Notifications
You must be signed in to change notification settings - Fork 27
Virtual Machine Setup
jateeter edited this page Feb 28, 2013
·
35 revisions
The OpenESPI Development Virtual Machine is a Linux Ubuntu desktop environment that may be used to jumpstart your OpenESPI development efforts. Further background on the VM may be found HERE.
The following instructions should be followed to configure the ECLIPSE development IDE, the GIT respository management, and to clone the initial development code to your VM environment.
- Download VM
- NOTE: The Virtual Machine is downloaded as a compressed file. On Windows 7, we have noticed that WinZip is required to de-compress the VM folder!
- Run VM (instructions on the download page) on your local machne:
- When asked if VM was "copied" or "moved", select "copied"
- login as user1 (the default but will say "Authorized User" in menu) with password: password
- Simple Path to the Code: If you wish to simply download the current OpenESPI javaSpring codebase, you may:
- start the Spring Tool Suite by double clicking on the STS shortcut icon on the Ubuntu desktop
- Select the default workspace
- Click on Open Desktop
- within the project browser window, right click
- select Import/Team/Team Project Set
- Browse to find the ~/Desktop/projectSet.psf file
- Click on Finish
- The OpenESPI javaSpring code base will be imported into the STS
- Upon Completion, select a Project/Clean from the STS menu bar
- Upon Completion, select the DataCustodian package, right click, and select Run As/Run On Server
- Select the default vFabric server, click Next
- Add the ThirdParty package, and select Finish
- You will be presented with the current management page for the DataCustodian
- The path to code development: Do develop the code base, you must first make your own repository on Github by Forking the EnergyOS/OpenESPI respository, you must then edit the ~/Desktop/projectSet.psf file to request your forked respository and follow the directions of the "Simple Path to Code" above. Additionally you may:
- setup github keys
- If you have already configured your keys:
- from a local VM terminal:
- copy your keys to the /home/user1/.ssh
- sudo chmod 600 id_rsa (assumes private key is id_rsa) to set permissions on private key
- ssh –T git@github.com (to test keys and verify you connect to git securely)
- If you have not made keys, Follow procedure defined at Github (start at step Next: Set Up SSH Keys)
- Note: You might want to save these keys for use on other computers/platforms if desired
- Make a fork of the https://github.com/energyos/OpenESPI repository on GitHub.com
- Use firefox and go to: https://github.com/
- login to GitHub using your github.com credentials {gitUserName : pw}
- navigate to the https://github.com/energyos/OpenESPI repository
- On GitHub, fork the master branch of the OpenESPI repository
- Now Configure your local git repository: from a local VM Terminal, do git commands to configure the git workspace
- git config --global user.name "Firstname Lastname"
- git config --global user.email "your_email@youremail.com"
- git config --global github.user {gitUserName}
- git remote add upstream https://github.com/energyos/OpenESPI.git
- cd ~
- cd workspace
- Finally, we must configure Eclipse by importing the projects from the Git repository:
- Using your favorite Editor (vi and emacs are in the VM),create or edit the file projectSet.psf. Note that {gitUserName} is case sensitive!
- Start and configure Eclipse
- Run eclipse from VM shortcut in home/desktop folder (choose Workspace /home/user1/workspace)
- Import the OpenESPI java projectSet you created above:
- File/Import
- select Team -> Team Project Set
- select Next
- select Browse and select projectSet.psf
- select Finish
- Eclipse will now access Github and clone the repository to your local workspace
- Allow time for workspace files to download and for indexes to be built -- watch bottom right status of Eclipse window
- You will find, during the import of the project set, that ** compile errors** will be found. Following the completion of the Import, you should do a Project/Clean. This will rebuild the projects in the correct order and context!
<?xml version="1.0" encoding="UTF-8"?>
<psf version="2.0">
<provider id="org.eclipse.egit.core.GitProvider">
<project reference="1.0,https://github.com/{gitUserName}/OpenESPI.git,master,javaspring/DataCustodian"/>
<project reference="1.0,https://github.com/{gitUserName}/OpenESPI.git,master,javaspring/ThirdParty"/>
</provider>
</psf>
You are now ready to go. Use the normal Eclipse commands on the relevant projects to begin your OpenESPI development experience. You will find further instruction about using the Eclipse IDE to build and run the OpenESPI JavaSpringsource implementation.