Skip to content

Commit

Permalink
updates to readmes, split client, service install
Browse files Browse the repository at this point in the history
  • Loading branch information
Laird Dornin committed Jan 11, 2015
1 parent 7652dce commit 5fb5ddd
Show file tree
Hide file tree
Showing 6 changed files with 240 additions and 216 deletions.
131 changes: 98 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,132 @@

# Getting started with the project migrate SDK:

You can obtain the Migrate binary SDK on the migrate github wiki page:
You can download the Project Migrate binary SDK on the migrate github wiki page:

```
https://github.com/wileyenterpriseandroid/migrate/wiki
```

Specifically on the migrate releases page:

```
https://github.com/wileyenterpriseandroid/migrate-sdk/releases/
```

The best way to get started working with the SDK is to explore the MigrateContacts
example from the book samples repository:
If you have not already downloaded and unpacked the latest SDK, please do so now.

git clone https://github.com/wileyenterpriseandroid/Examples.git
Installation:
----------

Follow the instructions for using the example contained in MigrateContacts/README, which
contains detailed information about configuring the SDK and importing the MigrateContacts
example into Eclipse.
The projectmigrate SDK has two major pieces:

For comprehensive background and explanation, we recommend that you buy a copy of
Enterprise Android (@Amazon.com: search for "Enterprise Android"):
- Client:

http://www.amazon.com/Enterprise-Android-Programming-Database-Applications-ebook/dp/B00FX89KXM/ref=sr_1_1?ie=UTF8&qid=1403662172&sr=8-1&keywords=enterprise+android
A client in the form of an apk that contains the migrate content provider and
sync adapter. Install the client using the included install script:

----------
```
$SDK_DIR/install_client.sh
```

If you have any questions about the migrate SDK or the Enterprise Android Examples,
please post them here:
Or execute the following command lines:

http://p2p.wrox.com/book-enterprise-android-programming-android-database-applications-enterprise-751/
```
adb install -r ./migrate-browser.apk
adb install -r ./migrate-client.apk
```


- Service:

The migrate backend service supports generic migrate synchronization persistence.
Its recommended to simply use the projectmigrate beta service at the following URL:

```
http://project-migrate-beta.appspot.com/
```

This url is the default when configuring a migrate client account in Android. You
dont need to do anything other than install the migrate-client.apk to use this
instance of the migrate backend.

Alternatively, you can also install the migrate server locally using the install script:

```
$SDK_DIR/install_server.sh
```

Or by copying installing apache tomcat and then copying migrate.war to:

```
$CATALINA_HOME/webapps
```

and the then restarting tomcat.

## Getting the code

If you, OPTIONALLY, choose to work with the migrate sdk and service code checkout the repos:
Configuration:
----------

migrate-sdk
migrate
migrate-client
EnterpriseAndroidExamples
After you have installed the SDK, configure a client account one on your device
or emulator using:

Note: We dont recommend that you try to work with the code until you
have had some success working with the binary version of the SDK.
```
Settings -> Accounts/Add Account(+) -> ProjectMigrate SyncAdapter
```

As listed on the following page:
https://github.com/wileyenterpriseandroid
Fill out the sign-in screen using the appropriate migrate url, as following:

The best way to download this code, along with the examples that support it,
is by using the Repo tool. Get it like this:
```
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
http://project-migrate-beta.appspot.com/
```

Once repo is installed, download this source with the following commands:
For a local tomcat installation use:

```
repo init -u https://github.com/wileyenterpriseandroid/manifests.git
repo sync
http://10.0.2.2:8080/migrate/
```

You can download the source without using repo, with the following two commands:
Schema configuration:
----------

Any migrate based applications that you write will need to make use of a schema.
You can either create the schema using the web front end of the migrate service,
or you can generate it from a class. Please see, samples, MigrateContacts/README
for instructions on generating a migrate schema and making it available for sync
with the migrate backend service.

Samples:
----------

After you have installed and configured the projectmigrate components, the easiest
way to get started working with the SDK is to explore the SDK samples listed below:

samples/MigrateContacts

----------

Enterprise Android

For comprehensive background and explanation of projectmigrate, we recommend that you buy a copy of
Enterprise Android (@Amazon.com: search for "Enterprise Android"):

```
http://www.amazon.com/Enterprise-Android-Programming-Database-Applications-ebook/dp/B00FX89KXM/ref=sr_1_1?ie=UTF8&qid=1403662172&sr=8-1&keywords=enterprise+android
```
git clone https://github.com/wileyenterpriseandroid/migrate-sdk.git
git clone https://github.com/wileyenterpriseandroid/Examples.git ea-examples

The book Enterprise Android also has examples that explore projectmigrate, you can download
these examples from the following location:

```
git clone https://github.com/wileyenterpriseandroid/Examples.git
```

----------

If you have any questions about the Migrate SDK or the Enterprise Android Examples,
please post them here:

```
http://p2p.wrox.com/book-enterprise-android-programming-android-database-applications-enterprise-751/
```
42 changes: 42 additions & 0 deletions README_MIGRATE_LOCAL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Optionally run the migrate service using Tomcat:
-----

This file explains how to run and configure an instance of migrate on
your local machine, if you dont want to use the migrate instance at:

http://project-migrate-beta.appspot.com/

-----

Follow the instructions below only if you want to setup your own
local migrate instance (advanced and optional):

Make sure that you have a mysql instance running with root
credentials as:

User: root
Pass: mysql

Copy the migrate.war binary to the Tomcat webapps directory:

cp $MIGRATE_SDK/migrate.war $CATALINA_HOME/webapps
$CATALINA_HOME/bin/shutdown.sh
$CATALINA_HOME/bin/startup.sh

Verify that the service is running by loading the following URL in a browser:
http://localhost:8080/

This location should display information about Migrate.

Debugging Tomcat
------

To debug problems with Tomcat, view the contents of the file:

$CATALINA_HOME/logs/catalina.out

or the log file named with the current date. Aside from simply running the
'cat' command in a shell, you can also have the contents printed live to a
console in a shell using the tail command as follows:

tail $CATALINA_HOME/logs/catalina.out
9 changes: 6 additions & 3 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,10 @@
<target name="prepare.deps" depends="build.migrate.service,build.migrate.client,build.migrate.browser">
<copy file="${basedir}/README.md" todir="${build.dist.artifact.dir}"/>

<copy file="${basedir}/tools/install.sh" todir="${build.dist.artifact.dir}"/>
<chmod file="${build.dist.artifact.dir}/install.sh" perm="755"/>
<copy file="${basedir}/tools/install_client.sh" todir="${build.dist.artifact.dir}"/>
<copy file="${basedir}/tools/install_service.sh" todir="${build.dist.artifact.dir}"/>
<chmod file="${build.dist.artifact.dir}/install_client.sh" perm="755"/>
<chmod file="${build.dist.artifact.dir}/install_service.sh" perm="755"/>

<copy file="${basedir}/migrate.xml" todir="${build.dist.artifact.dir}"/>
<copy file="${basedir}/migrate.properties" todir="${build.dist.artifact.dir}"/>
Expand Down Expand Up @@ -166,7 +168,8 @@
<target name="dist.deps.clean" depends="deps.clean" />

<target name="dist.deps.local.install" depends="deps.clean,dist.deps">
<exec executable="${build.dist.artifact.dir}/install.sh"/>
<exec executable="${build.dist.artifact.dir}/install_client.sh"/>
<exec executable="${build.dist.artifact.dir}/install_service.sh"/>
</target>

</project>
Loading

0 comments on commit 5fb5ddd

Please sign in to comment.