Commit 0dd503bf authored by chiaming2000's avatar chiaming2000
Browse files

initial open source commit

parents
Loading
Loading
Loading
Loading

.classpath

0 → 100644
+14 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
		<attributes>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
		<attributes>
			<attribute name="maven.pomderived" value="true"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="output" path="target/classes"/>
</classpath>

.gitignore

0 → 100644
+23 −0
Original line number Diff line number Diff line
# OS X
.DS_Store

# IntelliJ
/.idea
*.iml

# eclipse
.settings/*

# python
*.egg-info

# build products
src/main/python/kinetic/kinetic_pb2.py
/*/doc
/*/target

/tmp
database.db
*.pid
*.swp
*.log

.project

0 → 100644
+35 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
	<name>Kinetic</name>
	<comment></comment>
	<projects>
	</projects>
	<buildSpec>
		<buildCommand>
			<name>org.python.pydev.PyDevBuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>org.eclipse.jdt.core.javabuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>org.eclipse.m2e.core.maven2Builder</name>
			<arguments>
			</arguments>
		</buildCommand>
	</buildSpec>
	<natures>
		<nature>org.eclipse.jdt.core.javanature</nature>
		<nature>org.eclipse.m2e.core.maven2Nature</nature>
		<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
		<nature>org.python.pydev.pythonNature</nature>
	</natures>
</projectDescription>

README.md

0 → 100644
+103 −0
Original line number Diff line number Diff line
Suggested Development Environments
==================================
* Latest version of Git for your OS: [http://git-scm.com/downloads](http://git-scm.com/downloads)

* JDK 1.7: [http://www.oracle.com/technetwork/java/javase/downloads/index.html](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
  (Please note that JDK 1.8 is not officially supported yet due to Javadoc incompatibility issues.)

* Eclise IDE For Java Developers. Version 4.2 (Juno) or later: [http://www.eclipse.org/downloads/](http://www.eclipse.org/downloads/)

* Maven 3.0.3 or later: [http://maven.apache.org/download.cgi](http://maven.apache.org/download.cgi)

* PyDev - Python IDE for Eclipse: [http://pydev.org/download.html](http://pydev.org/download.html)

* For Windows 7 system, install the system patch package for jni:
  32 bit: [http://www.microsoft.com/en-us/download/details.aspx?id=5555](http://www.microsoft.com/en-us/download/details.aspx?id=5555)
  64 bit: [http://www.microsoft.com/en-us/download/details.aspx?id=14632](http://www.microsoft.com/en-us/download/details.aspx?id=14632 )


Getting Started With Development
================================
1. Clone the code: `git clone git@github.com:Seagate/LC2.git`
1. Run the integration tests against the Java Simulator: `mvn test -DargLine="-Xmx500M"`
1. Run the integration tests but exclude specific files: `mvn test -Dmaven.test.excludes="**/File.java,**/OtherFile.java"
1. Run the integration tests against the skinny waist implementation at a particular path: `mvn test -DRUN_AGAINST_EXTERNAL=true -DKINETIC_PATH=/path/to/kinetic_home`
1. Run the integration tests against the skinny waist implementation at a particular host: `mvn test -DRUN_AGAINST_EXTERNAL=true -DKINETIC_HOST=1.2.3.4`
1. Run the integration tests against the skinny waist implementation at a particular host using SSH to reset state before runs: `mvn test -DRUN_AGAINST_EXTERNAL=true -DKINETIC_HOST=1.2.3.4 -DFAST_CLEAN_UP=true`

Getting Started With Simulator
================================
1. Run "mvn clean package" in "Kinetic-Folder"
2. Start with java CLI: 
       java -jar in "Kinetic-Folder"/kinetic-simulator/target/kinetic-simulator-0.5.0.1-SNAPSHOT-jar-with-dependencies.jar
   
   or Start with script (If configuration tcp_port, tls_port and Kinetic_home, use script -help):
       Windows: 
            cd "Kinetic-Folder"\bin
            startSimulator.bat
            
       Linux & Mac:
            cd "Kinetic-Folder"/bin
            sh startSimulator.sh

Admin command line Usage
==============================
1, make sure "Kinetic-Folder"/kinetic-simulator/target/kinetic-simulator-0.5.0.1-SNAPSHOT-jar-with-dependencies.jar 
             "Kinetic-Folder"/kinetic-client/target/kinetic-client-0.5.0.1-SNAPSHOT-jar-with-dependencies.jar
   exist

2, start simulator
   Windows:  cd "Kinetic-Folder"/bin
             kineticsimulator.bat
             
   Linux:    cd "Kinetic-Folder"/bin
             ./kineticsimulator.sh
   
3, run admin cli
   Windows:  cd "Kinetic-Folder"/bin
             kineticadmin -help
   
   Linux:    cd "Kinetic-Folder"/bin
             ./kineticadmin.sh -help

Erasing all data in the Simulator
=================================

* The simulator should be running, default port for TCP is 8123, SSL/TLS port is 8443
* You'll need to have recently built .jar (i.e. run `mvn package`)

1. ./bin/kineticadmin.sh -setup -erase true

Simulator and Java API usage examples
=================================

Examples are located at the following directory.

"Kinetic-Folder"/kinetic-test/src/test/java/com/seagate/kinetic/example


Kinetic Javadoc location
=================================
1. Run "mvn clean package" in "Kinetic-Folder".

1. Run "mvn clean package" in "Kinetic-Folder"/kinetic-client, "Kinetic-Folder"/kinetic-simulator and "Kinetic-Folder"/kinetic-test.

2. Javadoc will be generated for modules in directory of "Kinetic-Folder"/kinetic-client/doc, "Kinetic-Folder"/kinetic-simulator/doc and "Kinetic-Folder"/kinetic-test/doc.


Run smoke test against simulator or kinetic drive
==================================
Make sure one instance of simulator or kinetic drive is running.

1.  Run "mvn clean package" in "Kinetic-Folder" or "Kinetic-Folder"/kinetic-test, verify 
   "Kinetic-Folder"/kinetic-test/target/kinetic-test-0.5.0.1-SNAPSHOT-jar-with-dependencies.jar 
   "Kinetic-Folder"/kinetic-test/target/smoke-tests.jar
   exist.

2. cd "Kinetic-Folder"/bin

3. sh runSmokeTests.sh [-host host_ip] [-port port] [-home kinetic_home]
   or
   python runSmokeTests.py [-host host_ip] [-port port] [-home kinetic_home]
            
            

bin/kineticAdmin.bat

0 → 100644
+14 −0
Original line number Diff line number Diff line
@echo off

SET BASE_DIR=%~dp0..
SET CLASSPATH=.

for %%j in ("%BASE_DIR%\kinetic-client\target\*.jar") do (call :append_classpath "%%j")
goto :run

:append_classpath
set CLASSPATH=%CLASSPATH%;%1
goto :eof

:run
java -cp %CLASSPATH% com.seagate.kinetic.admin.cli.KineticAdminCLI %*