Modified: incubator/unomi/website/team-list.html URL: http://svn.apache.org/viewvc/incubator/unomi/website/team-list.html?rev=1783425&r1=1783424&r2=1783425&view=diff ============================================================================== --- incubator/unomi/website/team-list.html (original) +++ incubator/unomi/website/team-list.html Fri Feb 17 16:47:56 2017 @@ -1,14 +1,14 @@ - Project Team | Apache Unomi :: Root Project + Project Team | Apache Unomi @@ -71,11 +71,26 @@ Documentation @@ -106,6 +121,9 @@
  • Mailing lists
  • Team
  • Maturity model report card
  • +
  • The Apache Software Foundation
  • +
  • Sponsorship
  • +
  • Thanks
  • @@ -122,9 +140,7 @@
    @@ -339,19 +355,44 @@ Home
  • - Building and deploying + Version 1.1 (current) + +
  • +
  • + Master (snapshot) +
  • REST API documentation @@ -387,6 +428,15 @@
  • Maturity model report card
  • +
  • + The Apache Software Foundation +
  • +
  • + Sponsorship +
  • +
  • + Thanks +
  • @@ -399,6 +449,9 @@ Apache Unomi :: Persistence :: SPI (Service Provider Interface)
  • + Apache Unomi :: Main Lifecycle Watcher +
  • +
  • Apache Unomi :: Persistence :: ElasticSearch
  • @@ -502,7 +555,7 @@

    Back to top

    - +

    Reflow Maven skin by Andrius Velykis.

    Added: incubator/unomi/website/versions/1.1/building-and-deploying.html URL: http://svn.apache.org/viewvc/incubator/unomi/website/versions/1.1/building-and-deploying.html?rev=1783425&view=auto ============================================================================== --- incubator/unomi/website/versions/1.1/building-and-deploying.html (added) +++ incubator/unomi/website/versions/1.1/building-and-deploying.html Fri Feb 17 16:47:56 2017 @@ -0,0 +1,525 @@ + + + + + + + + Building | Apache Unomi + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + +
    +
    + +
    +
    +
    +
    + + +

    Simply type at the root of the project:

    +
    +
    mvn clean install -P generate-package
    +
    +
    +

    The Maven build process will generate both a standalone package you can use directly to start the context server (see “Deploying the generated package”) or a KAR file that you can then deploy using a manual deployment process into an already installed Apache Karaf server (see “Deploying into an existing Karaf server”)

    +

    If you want to build and run the integration tests, you should instead use :

    +
    +
    mvn -P integration-tests clean install
    +
    +
    +
    +

    Deploying the generated package

    +

    The “package” sub-project generates a pre-configured Apache Karaf installation that is the simplest way to get started. Simply uncompress the package/target/unomi-VERSION.tar.gz (for Linux or Mac OS X) or package/target/unomi-VERSION.zip (for Windows) archive into the directory of your choice.

    +

    You can then start the server simply by using the command on UNIX/Linux/MacOS X :

    +
    +
    ./bin/karaf start
    +
    +
    +

    or on Windows shell :

    +
    +
    bin\karaf.bat start
    +
    +
    +
    +
    +

    Deploying into an existing Karaf server

    +

    This is only needed if you didn’t use the generated package. Also, this is the preferred way to install a development environment if you intend to re-deploy the context server KAR iteratively.

    +

    Additional requirements: - Apache Karaf 3.0.2+, http://karaf.apache.org - Local copy of the Elasticsearch ZIP package, available here : http://www.elasticsearch.org

    +
      +
    1. Before deploying, make sure that you have Apache Karaf properly installed. You will also have to increase the default maximum memory size and perm gen size by adjusting the following environment values in the bin/setenv(.bat) files (at the end of the file):

      +
      +
         MY_DIRNAME=`dirname $0`
      +   MY_KARAF_HOME=`cd "$MY_DIRNAME/.."; pwd`
      +   export KARAF_OPTS="-Djava.library.path=$MY_KARAF_HOME/lib/sigar"
      +   export JAVA_MAX_MEM=3G
      +   export JAVA_MAX_PERM_MEM=384M
      +
      +
    2. +
    3. You will also need to have the Hyperic Sigar native libraries in your Karaf installation, so in order to this go to the Elasticsearch website (http://www.elasticsearch.org) and download the ZIP package. Decompress it somewhere on your disk and copy all the files from the lib/sigar directory into Karaf’s lib/sigar directory (must be created first) EXCEPT THE SIGAR.JAR file.

    4. +
    5. Install the WAR support, CXF into Karaf by doing the following in the Karaf command line:

      +
      +
         feature:install -v war
      +   feature:repo-add cxf 2.7.11
      +   feature:install -v cxf/2.7.11
      +
      +
    6. +
    7. Create a new $MY_KARAF_HOME/etc/org.apache.cxf.osgi.cfg file and put the following property inside :

      +
      +
         org.apache.cxf.servlet.context=/cxs
      +
      +
    8. +
    9. Copy the following KAR to the Karaf deploy directory, as in this example line:

      +
      +
        cp kar/target/unomi-kar-1.0.0-SNAPSHOT.kar ~/java/deployments/unomi/apache-karaf-3.0.1/deploy/
      +
      +
    10. +
    11. If all went smoothly, you should be able to access the context script here : http://localhost:8181/cxs/cluster . You should be able to login with karaf / karaf and see basic server information. If not something went wrong during the install.

    12. +
    +
    +
    +

    JDK Selection on Mac OS X

    +

    You might need to select the JDK to run the tests in the itests subproject. In order to do so you can list the installed JDKs with the following command :

    +
    +
    /usr/libexec/java_home -V
    +
    +
    +

    which will output something like this :

    +
    +
    Matching Java Virtual Machines (7):
    +    1.7.0_51, x86_64:   "Java SE 7"   /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home
    +    1.7.0_45, x86_64:   "Java SE 7"   /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home
    +    1.7.0_25, x86_64:   "Java SE 7"   /Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home
    +    1.6.0_65-b14-462, x86_64:   "Java SE 6"   /Library/Java/JavaVirtualMachines/1.6.0_65-b14-462.jdk/Contents/Home
    +    1.6.0_65-b14-462, i386: "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0_65-b14-462.jdk/Contents/Home
    +    1.6.0_65-b14-462, x86_64:   "Java SE 6"   /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
    +    1.6.0_65-b14-462, i386: "Java SE 6" /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
    +
    +
    +

    You can then select the one you want using :

    +
    +
    export JAVA_HOME=`/usr/libexec/java_home -v 1.7.0_51`
    +
    +
    +

    and then check that it was correctly referenced using:

    +
    +
    java -version
    +
    +
    +

    which should give you a result such as this:

    +
    +
    java version "1.7.0_51"
    +Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
    +Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
    +
    +
    +
    +
    +

    Running the integration tests

    +

    The integration tests are not executed by default to make build time minimal, but it is recommended to run the integration tests at least once before using the server to make sure that everything is ok in the build. Another way to use these tests is to run them from a continuous integration server such as Jenkins, Apache Gump, Atlassian Bamboo or others.

    +

    Note : the integration tests require a JDK 7 or more recent !

    +

    To run the tests simply activate the following profile :

    +
    +
    mvn -P integration-tests clean install
    +
    +
    +
    +
    +

    Running the performance tests

    +

    Performance tests are based on Gatling. You need to have a running context server or cluster of servers before executing the tests.

    +

    Test parameteres are editable in the performance-tests/src/test/scala/unomi/Parameters.scala file. baseUrls should contains the URLs of all your cluster nodes

    +

    Run the test by using the gatling.conf file in performance-tests/src/test/resources :

    +
    +
        export GATLING_CONF=<path>/performance-tests/src/test/resources
    +    gatling.sh
    +
    +
    +

    Reports are generated in performance-tests/target/results.

    +
    +
    +

    Testing with an example page

    +

    A default test page is provided at the following URL:

    +
    +
       http://localhost:8181/index.html
    +
    +
    +

    This test page will trigger the loading of the /context.js script, which will try to retrieving the user context or create a new one if it doesn’t exist yet. It also contains an experimental integration with Facebook Login, but it doesn’t yet save the context back to the context server.

    +
    +
    +

    Integrating onto a page

    +

    Simply reference the context script in your HTML as in the following example:

    +
    +
    <script type="text/javascript">
    +    (function(){ var u=(("https:" == document.location.protocol) ? "https://localhost:8181/" : "http://localhost:8181/");
    +    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript'; g.defer=true; g.async=true; g.src=u+'context.js';
    +    s.parentNode.insertBefore(g,s); })();
    +</script>
    +
    +
    +
    +
    +
    + +
    +
    + +
    + + + + +
    +
    +
    +

    Back to top

    + +

    Reflow Maven skin by Andrius Velykis.

    +
    +
    +
    + + + + + + + + + + + + + + \ No newline at end of file Added: incubator/unomi/website/versions/1.1/clustering.html URL: http://svn.apache.org/viewvc/incubator/unomi/website/versions/1.1/clustering.html?rev=1783425&view=auto ============================================================================== --- incubator/unomi/website/versions/1.1/clustering.html (added) +++ incubator/unomi/website/versions/1.1/clustering.html Fri Feb 17 16:47:56 2017 @@ -0,0 +1,455 @@ + + + + + + + + Cluster setup | Apache Unomi + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    + +
    +
    + +
    +
    +
    +
    + + +

    Context server relies on Elasticsearch to discover and configure its cluster. You just need to install multiple context servers on the same network, and enable the discovery protocol in $MY_KARAF_HOME/etc/org.apache.unomi.persistence.elasticsearch.cfg file :

    +
    +
    discovery.zen.ping.multicast.enabled=true
    +
    +
    +

    All nodes on the same network, sharing the same cluster name will be part of the same cluster.

    +
    +
    + +

    It is recommended to have one node dedicated to the context server, where the other nodes take care of the Elasticsearch persistence. The node dedicated to the context server will have node.data set to false.

    +
    +

    2 nodes configuration

    +

    One node dedicated to context server, 1 node for elasticsearch storage.

    +

    Node A :

    +
    +
    node.data=true
    +numberOfReplicas=0
    +monthlyIndex.numberOfReplicas=0
    +
    +
    +

    Node B :

    +
    +
    node.data=false
    +numberOfReplicas=0
    +monthlyIndex.numberOfReplicas=0
    +
    +
    +
    +
    +

    3 nodes configuration

    +

    One node dedicated to context server, 2 nodes for elasticsearch storage with fault-tolerance

    +

    Node A :

    +
    +
    node.data=false
    +numberOfReplicas=1
    +monthlyIndex.numberOfReplicas=1
    +
    +
    +

    Node B :

    +
    +
    node.data=true
    +numberOfReplicas=1
    +monthlyIndex.numberOfReplicas=1
    +
    +
    +

    Node C :

    +
    +
    node.data=true
    +numberOfReplicas=1
    +monthlyIndex.numberOfReplicas=1
    +
    +
    +
    +
    +
    +

    Specific configuration

    +

    If multicast is not allowed on your network, you’ll need to switch to unicast protocol and manually configure the server IPs. This can be done by disabling the elasticsearch automatic discovery in $MY_KARAF_HOME/etc/org.apache.unomi.persistence.elasticsearch.cfg :

    +
    +
    discovery.zen.ping.multicast.enabled=false
    +
    +
    +

    And then set the property discovery.zen.ping.unicast.hosts in $MY_KARAF_HOME/etc/elasticsearch.yml files :

    +
    +
    discovery.zen.ping.unicast.hosts: [‘192.168.0.1:9300', ‘192.168.0.2:9300']
    +
    +
    +

    More information and configuration options can be found at : https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery.html

    +
    +
    +
    +
    + +
    +
    + +
    + + + + +
    +
    +
    +

    Back to top

    + +

    Reflow Maven skin by Andrius Velykis.

    +
    +
    +
    + + + + + + + + + + + + + + \ No newline at end of file