Author: jleroux
Date: Fri Nov 3 09:21:47 2017 New Revision: 1814148 URL: http://svn.apache.org/viewvc?rev=1814148&view=rev Log: Update about Let's Encrypt certificate renewal Modified: ofbiz/tools/demo-backup/README.md ofbiz/tools/wiki-files/README.md.html Modified: ofbiz/tools/demo-backup/README.md URL: http://svn.apache.org/viewvc/ofbiz/tools/demo-backup/README.md?rev=1814148&r1=1814147&r2=1814148&view=diff ============================================================================== --- ofbiz/tools/demo-backup/README.md (original) +++ ofbiz/tools/demo-backup/README.md Fri Nov 3 09:21:47 2017 @@ -14,8 +14,7 @@ We own 3 Apache sub domains * https://demo-stable.ofbiz.apache.org * https://demo-old.ofbiz.apache.org -Trunk and stable use a Let's Encrypt certificate -Because of technical issues we currently use a self-signed certificate for the old version +All demos use a Let's Encrypt certificate. There is currently a bug which prevents Let's Encrypt certificate to renew every 3 months. So we need to do it by hand and you need to have a root access for that. This is how: http://markmail.org/message/7c3rxrqkn4kkm6dm The Puppet configuration is at https://github.com/apache/infrastructure-puppet/blob/deployment/data/nodes/ofbiz-vm2.apache.org.yaml Modified: ofbiz/tools/wiki-files/README.md.html URL: http://svn.apache.org/viewvc/ofbiz/tools/wiki-files/README.md.html?rev=1814148&r1=1814147&r2=1814148&view=diff ============================================================================== --- ofbiz/tools/wiki-files/README.md.html (original) +++ ofbiz/tools/wiki-files/README.md.html Fri Nov 3 09:21:47 2017 @@ -8,379 +8,41 @@ <style type="text/css">code{white-space: pre;}</style> </head> <body> -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> -<h1 id="apache-ofbiz">Apache OFBiz®</h1> -<p>Welcome to <strong>Apache OFBiz®</strong>! A powerful top level Apache software project. OFBiz is an Enterprise Resource Planning (ERP) System written in Java and houses a large set of libraries, entities, services and features to run all aspects of your business.</p> -<p>For more details about OFBiz please visit the OFBiz Documentation page:</p> -<p><a href="http://ofbiz.apache.org/documentation.html">OFBiz documentation</a></p> -<p><a href="http://www.apache.org/licenses/LICENSE-2.0">OFBiz License</a></p> -<blockquote> -<p><em>Note</em>: If you want to use Eclipse, read the "Setup eclipse project for OFBiz" section to set it up.</p> -</blockquote> -<blockquote> -<p><em>Note</em>: If you want to use an external database like MySQL or PostgreSQL, read the "Setup an external database" section to set it up.</p> -</blockquote> -<blockquote> -<p>Note : The directory structure and repositories have changed. For more information read the "Repository and directory structure" section.</p> -</blockquote> -<h2 id="system-requirements">System requirements</h2> -<p>The only requirement to run OFBiz is to have the Java Development Kit (JDK) version 8 installed on your system (not just the JRE, but the full JDK) which you can download from the below link. Make sure of setting the $JAVA_HOME environment variable.</p> -<p><a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">JDK download</a></p> -<h2 id="quick-start">Quick start</h2> -<p>To quickly install and fire-up OFBiz, please follow the below instructions from the command line at the OFBiz top level directory (folder)</p> -<h3 id="prepare-ofbiz">Prepare OFBiz:</h3> -<p><strong>Note</strong>: Depending on your Internet connection speed it might take a long time for this step to complete if you are using OFBiz for the first time as it needs to download all dependencies. So please be patient!</p> -<p>MS Windows: <code>gradlew cleanAll loadAll</code></p> -<p>Unix-like OS: <code>./gradlew cleanAll loadAll</code></p> -<h3 id="start-ofbiz">Start OFBiz:</h3> -<p>MS Windows: <code>gradlew ofbiz</code></p> -<p>Unix-like OS: <code>./gradlew ofbiz</code></p> -<blockquote> -<p><em>Note</em>: Ignore the % progress indicator because this task does not end as long as OFBiz is running.</p> -</blockquote> -<h3 id="visit-ofbiz-through-your-browser">Visit OFBiz through your browser:</h3> -<p><a href="https://localhost:8443/ordermgr">Order Back Office</a></p> -<p><a href="https://localhost:8443/accounting">Accounting Back Office</a></p> -<p><a href="https://localhost:8443/webtools">Administrator interface</a></p> -<p>You can log in with the user <strong>admin</strong> and password <strong>ofbiz</strong>.</p> -<h2 id="security">Security</h2> -<p>If you find a security issue, please report it to: security @ ofbiz.apache.org. Once proper mitigations to the security issues are complete the OFBiz team will disclose this information to the public mailing list.</p> -<p>You can find more information about security in OFBiz at <a href="https://cwiki.apache.org/confluence/display/OFBIZ/Keeping+OFBiz+secure">Keeping OFBiz secure</a></p> -<hr /> -<h2 id="build-system-syntax">Build system syntax</h2> -<p>All build tasks are executed using the <strong>Gradle</strong> build system which is embedded in OFBiz. To execute build tasks go to OFBiz top-level directory (folder) and execute tasks from there.</p> -<h3 id="operating-system-syntax">Operating System Syntax</h3> -<p>The syntax for tasks differ slightly between windows and Unix-like systems</p> -<ul> -<li><p><strong>Windows</strong>: <code>gradlew <tasks-in-here></code></p></li> -<li><p><strong>Unix-like</strong>: <code>./gradlew <tasks-in-here></code></p></li> -</ul> -<p>For the rest of this document, we will use the windows syntax, if you are on a Unix-like system, you need to add the <code>./</code> to gradlew</p> -<h3 id="types-of-tasks-in-gradle">Types of tasks in Gradle</h3> -<p>There are two types of tasks designed for OFBiz in Gradle:</p> -<ul> -<li><p><strong>Standard tasks</strong>: To execute general standard Gradle tasks</p></li> -<li><strong>OFBiz server tasks</strong>: To execute OFBiz startup commands. These tasks start with one of the following words:</li> -<li><strong>ofbiz</strong> : standard server commands</li> -<li><strong>ofbizDebug</strong> : server commands running in remote debug mode</li> -<li><p><strong>ofbizBackground</strong> ; server commands running in a background forked process</p></li> -</ul> -<p>Tips:</p> -<ul> -<li><p>OFBiz <strong>server commands</strong> require <strong>"quoting"</strong> the commands. For example: <code>gradlew "ofbiz --help"</code></p></li> -<li><p>Shortcuts to task names can be used by writing the first letter of every word in a task name. However, you cannot use the shortcut form for OFBiz server tasks. Example: <code>gradlew loadAdminUserLogin -PuserLoginId=myadmin</code> = <code>gradlew lAUL -PuserLoginId=myadmin</code></p></li> -<li><p>Dependent tasks can be skipped with the -x switch. Example: <code>gradlew build -x test</code> does not run the tests within the build.</p></li> -</ul> -<h4 id="example-standard-tasks">Example standard tasks</h4> -<p><code>gradlew build</code></p> -<p><code>gradlew cleanAll loadAll testIntegration</code></p> -<h4 id="example-ofbiz-server-tasks">Example OFBiz server tasks</h4> -<p><code>gradlew "ofbiz --help"</code></p> -<p><code>gradlew "ofbizDebug --test"</code></p> -<p><code>gradlew "ofbizBackground --start --portoffset 10000"</code></p> -<p><code>gradlew "ofbiz --shutdown --portoffset 10000"</code></p> -<p><code>gradlew ofbiz</code> (default is --start)</p> -<h4 id="example-mixed-tasks-standard-and-ofbiz-server">Example mixed tasks (standard and OFBiz server)</h4> -<p><code>gradlew cleanAll loadAll "ofbiz --start --portoffset 10000"</code></p> -<hr /> -<h2 id="quick-reference">Quick reference</h2> -<p>You can use the below common list of tasks as a quick reference for controlling the system. This document uses the windows task syntax, if you are on a Unix-like system, you need to add the <code>./</code> to gradlew i.e. <code>./gradlew</code></p> -<hr /> -<h3 id="help-tasks">Help tasks</h3> -<h4 id="list-ofbiz-server-commands">List OFBiz server commands</h4> -<p>List all available commands to control the OFBiz server</p> -<p><code>gradlew "ofbiz --help"</code></p> -<h4 id="list-build-tasks">List build tasks</h4> -<p>List all available tasks from the build system</p> -<p><code>gradlew tasks</code></p> -<h4 id="list-build-projects">List build projects</h4> -<p>List all available projects in the build system</p> -<p><code>gradlew projects</code></p> -<h4 id="gradle-build-system-help">Gradle build system help</h4> -<p>Show usage and options for the Gradle build system</p> -<p><code>gradlew --help</code></p> -<hr /> -<h3 id="server-command-tasks">Server command tasks</h3> -<h4 id="start-ofbiz-1">Start OFBiz</h4> -<p><code>gradlew "ofbiz --start"</code></p> -<p>start is the default server task so this also works:</p> -<p><code>gradlew ofbiz</code></p> -<h4 id="shutdown-ofbiz">Shutdown OFBiz</h4> -<p><code>gradlew "ofbiz --shutdown"</code></p> -<h4 id="get-ofbiz-status">Get OFBiz status</h4> -<p><code>gradlew "ofbiz --status"</code></p> -<h4 id="force-ofbiz-shutdown">Force OFBiz shutdown</h4> -<p>Terminate all running OFBiz server instances by calling the appropriate operating system kill command. Use this command to force OFBiz termination if the --shutdown command does not work. Usually this is needed when in the middle of data loading or testing in OFBiz.</p> -<p>Warning: Be careful in using this command as force termination might lead to inconsistent state / data</p> -<p><code>gradlew terminateOfbiz</code></p> -<h4 id="start-ofbiz-in-remote-debug-mode">Start OFBiz in remote debug mode</h4> -<p>Starts OFBiz in remote debug mode and waits for debugger or IDEs to connect on port <strong>5005</strong></p> -<p><code>gradlew "ofbizDebug --start"</code></p> -<p>OR</p> -<p><code>gradlew ofbizDebug</code></p> -<h4 id="start-ofbiz-on-a-different-port">Start OFBiz on a different port</h4> -<p>Start OFBiz of the network port offsetted by the range provided in the argument to --portoffset</p> -<p><code>gradlew "ofbiz --start --portoffset 10000"</code></p> -<h4 id="start-ofbiz-in-the-background">Start OFBiz in the background</h4> -<p>Start OFBiz in the background by forking it to a new process and redirecting the output to <strong>runtime/logs/console.log</strong></p> -<p><code>gradlew "ofbizBackground --start"</code></p> -<p>OR</p> -<p><code>gradlew ofbizBackground</code></p> -<p>You can also offset the port, for example:</p> -<p><code>gradlew "ofbizBackground --start --portoffset 10000"</code></p> -<hr /> -<h3 id="data-loading-tasks">Data loading tasks</h3> -<p>OFBiz contains the following data reader types:</p> -<ul> -<li><strong>seed</strong>: OFBiz and External Seed Data - to be maintained along with source and updated whenever a system deployment is updated</li> -<li><strong>seed-initial</strong>: OFBiz and External Seed Data - to be maintained along with source like other seed data, but only loaded initially and not updated when a system is updated except manually reviewing each line</li> -<li><strong>demo</strong>: OFBiz Only Demo Data</li> -<li><strong>ext</strong>: External General Data (custom)</li> -<li><strong>ext-test</strong>: External Test Data (custom)</li> -<li><strong>ext-demo</strong>: External Demo Data (custom)</li> -<li><strong>tenant</strong>: Data to load into the master tenants database "ofbiztenant". This data is required to identify where a tenant's database is located. For more information you can review the relevant <a href="https://cwiki.apache.org/confluence/display/OFBIZ/Multitenancy+support">tenant documentation</a></li> -</ul> -<p>Available options for the --load-data server command are the following:</p> -<ul> -<li><strong>readers=[name]</strong>: only load data from certain readers separated by comma. e.g. seed,seed-initial,ext</li> -<li><strong>file=[path]</strong>: load a single file from location or several files separated by commas. e.g. /my/file/1,/my/file/2</li> -<li><strong>dir=[path]</strong>: load all data files found in directory</li> -<li><strong>component=[name]</strong>: only load data from a specific component. e.g. base</li> -<li><strong>delegator=[name]</strong>: use the defined delegator. Default is "default". If the value passed is <strong>"all-tenants"</strong> then OFBiz will load the data for all defined tenants in the system.</li> -<li><strong>group=[name]</strong>: override the entity group (org.apache.ofbiz). e.g. com.example.something</li> -<li><strong>timeout=[millis]</strong>: timeout in milliseconds</li> -<li><strong>create-pks</strong>: create primary keys</li> -<li><strong>drop-pks</strong>: drop primary keys</li> -<li><strong>create-constraints</strong>: create indexes and foreign keys after loading</li> -<li><strong>drop-constraints</strong>: drop indexes and foreign keys before loading</li> -<li><strong>create-fks</strong>: create dummy (placeholder) foreign keys</li> -<li><strong>maintain-txs</strong>: maintain timestamps in data file</li> -<li><strong>try-inserts</strong>: use mostly inserts</li> -<li><strong>repair-columns</strong>: repair column sizes (default is true w/ drop-constraints)</li> -<li><strong>continue-on-failure</strong>: By default OFBiz will fail and stop if it is unable to load any of the files it is attempting to load. By passing this property OFBiz will ignore failures and continue loading all files</li> -</ul> -<h4 id="load-specific-ofbiz-data">Load specific OFBiz data</h4> -<p>you can choose which data readers to pass in the following syntax:</p> -<p><code>gradlew "ofbiz --load-data readers=<readers-here-comma-separated>"</code></p> -<p>Example:</p> -<p><code>gradlew "ofbiz --load-data readers=seed,seed-initial,ext,ext-demo"</code></p> -<h4 id="load-all-ofbiz-data">Load all OFBiz data</h4> -<p>Loads all data sets; meant for initial loading of generic OFBiz data. Can be applied for development, testing, demonstration, etc. purposes. Be aware that executing this task can result in your data being overwritten in your database of choice. Use with caution in production environments.</p> -<p><code>gradlew loadAll</code></p> -<p>OR</p> -<p><code>gradlew "ofbiz --load-data"</code></p> -<h4 id="load-seed-data">Load seed data</h4> -<p>Load ONLY the seed data (not seed-initial, demo, ext* or anything else); meant for use after an update of the code to reload the seed data as it is generally maintained along with the code and needs to be in sync for operation</p> -<p><code>gradlew "ofbiz --load-data readers=seed"</code></p> -<h4 id="load-ext-data">load ext data</h4> -<p>Load seed, seed-initial and ext data; meant for manual/generic testing, development, or going into production with a derived system based on stock OFBiz where the ext data basically replaces the demo data</p> -<p><code>gradlew "ofbiz --load-data readers=seed,seed-initial,ext"</code></p> -<h4 id="load-ext-test-data">load ext test data</h4> -<p>Load seed, seed-initial, ext and ext-test data; meant for automated testing with a derived system based on stock OFBiz</p> -<p><code>gradlew "ofbiz --load-data readers=seed,seed-initial,ext,ext-test"</code></p> -<h4 id="load-data-from-an-entity-file">load data from an entity file</h4> -<p>Load data from an XML file holding entity data.</p> -<p><code>gradlew "ofbiz --load-data file=foo/bar/FileNameHere.xml"</code></p> -<h4 id="create-a-new-tenant">create a new tenant</h4> -<p>Create a new tenant in your environment, create the delegator, load initial data with admin-user and password (needs multitenant=Y in general.properties). The following project parameters are passed:</p> -<ul> -<li>tenantId: mandatory</li> -<li>tenantName: optional, default is value of tenantId</li> -<li>domainName: optional, default is org.apache.ofbiz</li> -<li>tenantReaders: optional, default value is seed,seed-initial,demo</li> -<li>dbPlatform: optional, D(Derby), M(MySQL), O(Oracle), P(PostgreSQL) (default D)</li> -<li>dbIp: optional, ip address of the database</li> -<li>dbUser: optional, username of the database</li> -<li>dbPassword: optional, password of the database</li> -</ul> -<p><code>gradlew createTenant -PtenantId=mytenant</code></p> -<p><code>gradlew createTenant -PtenantId=mytenant -PtenantName="My Name" -PdomainName=com.example -PtenantReaders=seed,seed-initial,ext -PdbPlatform=M -PdbIp=127.0.0.1 -PdbUser=mydbuser -PdbPassword=mydbpass</code></p> -<p>If run successfully, the system creates a new tenant having:</p> -<ul> -<li>delegator: default#${tenandId} (e.g. default#mytenant)</li> -<li>admin user: ${tenantId}-admin (e.g. mytenant-admin)</li> -<li>admin user password: ofbiz</li> -</ul> -<h4 id="load-data-for-a-specific-tenant">load data for a specific tenant</h4> -<p>Load data for one specific tenant in a multitenant environment. Note that you must set multitenant=Y in general.properties and the following project parameters are passed:</p> +<p>Three instances of OFBiz run on the OFBiz demo VM2 at https://ofbiz-vm2.apache.org.</p> <ul> -<li>tenantId (mandatory)</li> -<li>tenantReaders (optional)</li> -<li>tenantComponent (optional)</li> +<li>trunk: the trunk version</li> +<li>stable: the last stable version (currently 16.11)</li> +<li>old: the previous stable version (currently 13.07)</li> </ul> -<p><code>gradlew loadTenant -PtenantId=mytenant</code></p> -<p><code>gradlew loadTenant -PtenantId=mytenant -PtenantReaders=seed,seed-initial,demo -PtenantComponent=base</code></p> -<hr /> -<h3 id="testing-tasks">Testing tasks</h3> -<h4 id="execute-all-unit-tests">Execute all unit tests</h4> -<p><code>gradlew test</code></p> -<h4 id="execute-all-integration-tests">Execute all integration tests</h4> -<p><code>gradlew testIntegration</code></p> -<p>OR</p> -<p><code>gradlew 'ofbiz --test'</code></p> -<h4 id="execute-integration-tests-with-a-different-log-level">Execute integration tests with a different log level</h4> -<p>It is possible to start integration tests with a log level different from the default one. The log levels allowed are listed below from most verbose to least verbose:</p> +<p>This is the second instance of VM we use hence the 2 in its domain name. The root of https://ofbiz-vm2.apache.org is the so called bigfiles directory which is actually at /home/ofbizDemo/big-files</p> +<p>We own 3 Apache sub domains</p> <ul> -<li>always</li> -<li>verbose</li> -<li>timing</li> -<li>info</li> -<li>important</li> -<li>warning</li> -<li>error</li> -<li>fatal</li> +<li>https://demo-trunk.ofbiz.apache.org</li> +<li>https://demo-stable.ofbiz.apache.org</li> +<li>https://demo-old.ofbiz.apache.org</li> </ul> -<p><code>gradlew "ofbiz --test loglevel=fatal"</code></p> -<h4 id="execute-an-integration-test-case">Execute an integration test case</h4> -<p>run a test case, in this example the component is "entity" and the case name is "entity-tests"</p> -<p><code>gradlew "ofbiz --test component=entity --test suitename=entitytests --test case=entity-query-tests"</code></p> -<h4 id="execute-an-integration-test-case-in-debug-mode-with-verbose-log">Execute an integration test case in debug mode with verbose log</h4> -<p>listens on port <strong>5005</strong></p> -<p><code>gradlew "ofbizDebug --test component=entity --test loglevel=verbose"</code></p> -<h4 id="execute-an-integration-test-suite">Execute an integration test suite</h4> -<p><code>gradlew "ofbiz --test component=entity --test suitename=entitytests"</code></p> -<h4 id="execute-an-integration-test-suite-in-debug-mode">Execute an integration test suite in debug mode</h4> -<p>listens on port <strong>5005</strong></p> -<p><code>gradlew "ofbizDebug --test component=entity --test suitename=entitytests"</code></p> -<hr /> -<h3 id="miscellaneous-tasks">Miscellaneous tasks</h3> -<h4 id="run-all-tests-on-a-clean-system">Run all tests on a clean system</h4> -<p><code>gradlew cleanAll loadAll testIntegration</code></p> -<h4 id="clean-all-generated-artifacts">Clean all generated artifacts</h4> -<p><code>gradlew cleanAll</code></p> -<h4 id="refresh-the-generated-artifacts">Refresh the generated artifacts</h4> -<p><code>gradlew clean build</code></p> -<h4 id="create-an-admin-user-account">Create an admin user account</h4> -<p>Create an admin user with login name MyUserName and default password with value "ofbiz". Upon first login OFBiz will request changing the default password</p> -<p><code>gradlew loadAdminUserLogin -PuserLoginId=MyUserName</code></p> -<h4 id="compile-java-using-xlint-output">Compile Java using Xlint output</h4> -<p>Xlint prints output of all warnings detected by the compiler</p> -<p><code>gradlew -PXlint build</code></p> -<h4 id="run-owasp-tool-to-identify-dependency-vulnerabilities-cves">Run OWASP tool to identify dependency vulnerabilities (CVEs)</h4> -<p>The below command activates a gradle plugin (OWASP) and Identifies and reports known vulnerabilities (CVEs) in OFBiz library dependencies. The task takes time to complete, and once done, a report will be generated in $OFBIZ_HOME/build/reports/dependency-check-report.html</p> -<p><code>gradlew -PenableOwasp dependencyCheckAnalyze</code></p> -<h4 id="setup-eclipse-project-for-ofbiz">Setup eclipse project for OFBiz</h4> -<p>Setting up OFBiz on eclipse is done by simply running the below command and then importing the project to eclipse. This command will generate the necessary <strong>.classpath</strong> and <strong>.project</strong> files for eclipse and it will also make the source code for external libraries available in eclipse (i.e. you can view source through Ctrl + Click)</p> -<p>The first time you run this command it will take a long time to execute because it will download source packages available for project dependencies.</p> -<p><code>gradlew eclipse</code></p> -<hr /> -<h2 id="ofbiz-plugin-system">OFBiz plugin system</h2> -<p>OFBiz provides an extension mechanism through plugins. Plugins are standard OFBiz components that reside in the plugins directory. Plugins can be added manually or fetched from a maven repository. The standard tasks for managing plugins are listed below.</p> -<blockquote> -<p><em>Note</em>: OFBiz plugin versions follow <a href="http://semver.org/">Semantic Versioning 2.0.0</a></p> -</blockquote> -<h3 id="pull-download-and-install-a-plugin-automatically">Pull (download and install) a plugin automatically</h3> -<p>Download a plugin with all its dependencies (plugins) and install them one-by-one starting with the dependencies and ending with the plugin itself.</p> -<p><code>gradlew pullPlugin -PdependencyId="org.apache.ofbiz.plugin:myplugin:0.1.0"</code></p> -<p>If the plugin resides in a custom maven repository (not jcenter or localhost) then you can use specify the repository using below command:</p> -<p><code>gradlew pullPlugin -PrepoUrl="http://www.example.com/custom-maven" -PdependencyId="org.apache.ofbiz.plugin:myplugin:0.1.0"</code></p> -<p>If you need username and password to access the custom repository:</p> -<p><code>gradlew pullPlugin -PrepoUrl="http://www.example.com/custom-maven" -PrepoUser=myuser -PrepoPassword=mypassword -PdependencyId="org.apache.ofbiz.plugin:myplugin:0.1.0"</code></p> -<h3 id="pull-an-official-plugin-from-source-control">Pull an official plugin from source control</h3> -<p>Download an official plugin from source control (currently subversion) and place it in the plugins directory. In addition, this task also executes the "install" task if it is defined for the plugin being downloaded.</p> -<p>This task is mostly useful when working on the trunk branch as it pulls in the latest version of a plugin.</p> -<p><code>gradlew pullPluginSource -PpluginId=ecommerce</code></p> +<p>All demos use a Let's Encrypt certificate. There is currently a bug which prevents Let's Encrypt certificate to renew every 3 months. So we need to do it by hand and you need to have a root access for that. This is how: http://markmail.org/message/7c3rxrqkn4kkm6dm</p> +<p>The Puppet configuration is at https://github.com/apache/infrastructure-puppet/blob/deployment/data/nodes/ofbiz-vm2.apache.org.yaml</p> <blockquote> -<p><em>Note</em>: This plugin will have its own .svn directory placed inside the plugin directory.</p> +<p><em>Note</em>: <strong>Only run the ofbiz demos using the 'ofbizDemo' user, never run as root.</strong></p> </blockquote> -<h3 id="pull-all-official-plugins-from-source-control">Pull all official plugins from source control</h3> -<p>Download all officially supported plugins from source control (currently subversion) and place them inclusive of their ".svn" directory in /plugins. WARNING! This task deletes the /plugins directory and replaces it with the official plugins.</p> -<p><code>gradlew pullAllPluginsSource</code></p> -<p>This task makes it easy to download and develop officially supported plugins. It is mostly used by developers or individuals working on the trunk branch. We do not recommend using this task on releases of OFBiz, instead consider using the "pullPlugin" task to get the correct version of a plugin compatible with your release.</p> -<blockquote> -<p><em>Note</em>: All the plugins will share a .svn directory placed in the plugins directory.</p> -</blockquote> -<h3 id="install-a-plugin">Install a plugin</h3> -<p>If you have a plugin called mycustomplugin and want to install it in OFBiz follow the below instructions:</p> -<ul> -<li>Extract the plugin if it is compressed</li> -<li>Place the extracted directory into /plugins</li> -<li>Run the below command</li> -</ul> -<p><code>gradlew installPlugin -PpluginId=myplugin</code></p> -<p>The above commands executes the task "install" in the plugin's build.gradle file if it exists</p> -<h3 id="uninstall-a-plugin">Uninstall a plugin</h3> -<p>If you have an existing plugin called mycustomplugin and you wish to uninstall run the below command</p> -<p><code>gradlew uninstallPlugin -PpluginId=myplugin</code></p> -<p>The above command executes the task "uninstall" in the plugin's build.gradle file if it exists</p> -<h3 id="remove-a-plugin">Remove a plugin</h3> -<p>Calls <strong>uninstallPlugin</strong> on an existing plugin and then delete it from the file-system</p> -<p><code>gradlew removePlugin -PpluginId=myplugin</code></p> -<h3 id="create-a-new-plugin">Create a new plugin</h3> -<p>Create a new plugin. The following project parameters are passed:</p> -<ul> -<li>pluginId: mandatory</li> -<li>pluginResourceName: optional, default is the Capitalized value of pluginId</li> -<li>webappName: optional, default is the value of pluginId</li> -<li>basePermission: optional, default is the UPPERCASE value of pluginId</li> -</ul> -<p><code>gradlew createPlugin -PpluginId=myplugin</code></p> -<p><code>gradlew createPlugin -PpluginId=myplugin -PpluginResourceName=MyPlugin -PwebappName=mypluginweb -PbasePermission=MYSECURITY</code></p> -<p>The above command creates a new plugin in /plugins/myplugin</p> -<h3 id="push-a-plugin-to-a-repository">Push a plugin to a repository</h3> -<p>This task publishes an OFBiz plugin into a maven package and then uploads it to a maven repository. Currently, pushing is limited to localhost maven repository (work in progress). To push a plugin the following parameters are passed:</p> -<ul> -<li>pluginId: mandatory</li> -<li>groupId: optional, defaults to org.apache.ofbiz.plugin</li> -<li>pluginVersion: optional, defaults to 0.1.0-SNAPSHOT</li> -<li>pluginDescription: optional, defaults to "Publication of OFBiz plugin ${pluginId}"</li> -</ul> -<p><code>gradlew pushPlugin -PpluginId=myplugin</code></p> -<p><code>gradlew pushPlugin -PpluginId=mycompany -PpluginGroup=com.mycompany.ofbiz.plugin -PpluginVersion=1.2.3 -PpluginDescription="Introduce special functionality X"</code></p> -<hr /> -<h2 id="miscellaneous-documentation">Miscellaneous Documentation</h2> -<h3 id="repository-and-directory-structure">Repository and directory structure</h3> -<p>OFBiz is split into two repositories:</p> -<ul> -<li><p><strong>ofbiz-framework</strong>: Contains the core framework and main applications in the system like accounting, party, order, etc</p></li> -<li><p><strong>ofbiz-plugins</strong>: Renamed from "special-purpose" and contains optional components that are officially supported by the community</p></li> -</ul> -<p>Furthermore, the hot-deploy directory is removed as the plugins directory works as a replacement for both "special-purpose" and "hot-deploy".</p> -<p>If you need to load the components in the plugins directory in a specific order place a component-load.xml file in the plugins directory listing the order.</p> -<p>To check out a plugin from source control use the <strong>pullPluginSource</strong> Gradle task. To check out all plugins from source control use the <strong>pullAllPluginsSource</strong>. <strong>Beware</strong> this deletes a previously existing plugins directory.</p> -<h3 id="setup-an-external-database-like-mysql-postgresql-etc">Setup an external database like MySQL, PostgreSQL, etc</h3> -<p>To setup an external database instead of the default embedded Apache Derby, you will need to follow the following instructions:</p> -<ol style="list-style-type: decimal"> -<li>Find the JDBC driver suitable for your database using one of the following options:</li> -</ol> -<ul> -<li><p>Search for the JDBC driver in <a href="https://bintray.com/bintray/jcenter">jcenter</a> and place it in build.gradle dependencies e.g. <code>runtime 'mysql:mysql-connector-java:5.1.36'</code></p> -<p>OR</p></li> -<li><p>Download the JDBC driver jar and place it in $OFBIZ_HOME/lib or the lib sub-directory of any component</p></li> -</ul> -<ol start="2" style="list-style-type: decimal"> -<li>Modify the entityengine.xml file located in $OFBIZ_HOME/framework/entity/config to switch the default database to the one you selected. For more details you can read the relevant section in the <a href="https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Technical+Production+Setup+Guide">technical setup guide</a></li> -</ol> -<h3 id="setup-gradle-tab-completion-on-unix-like-systems">Setup gradle tab-completion on Unix-like systems:</h3> -<p>To get tab completion (auto complete gradle commands by pressing tab) you can download the script from the below link and place it in the appropriate location for your system.</p> -<p><a href="https://edub.me/gradle-completion-bash">Gradle tab completion</a></p> -<p>For example, on debian based systems, you can use the following command:</p> -<p><code>sudo curl -L -s https://edub.me/gradle-completion-bash -o /etc/bash_completion.d/gradle-tab-completion.bash</code></p> -<hr /> -<h2 id="crypto-notice">Crypto notice</h2> -<p>This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See <a href="http://www.wassenaar.org/" class="uri">http://www.wassenaar.org/</a> for more information.</p> -<p>The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1, which includes information security software using or performing cryptographic functions with asymmetric algorithms. The form and manner of this Apache Software Foundation distribution makes it eligible for export under the License Exception ENC Technology Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section 740.13) for both object code and source code.</p> -<p>The following provides more details on the included cryptographic software:</p> -<ul> -<li>Various classes in OFBiz, including DesCrypt, HashCrypt, and BlowFishCrypt use libraries from the Sun Java JDK API including java.security.* and javax.crypto.* (the JCE, Java Cryptography Extensions API)</li> -<li>Other classes such as HttpClient and various related ones use the JSSE (Java Secure Sockets Extension) API</li> -</ul> +<pre><code>To do this sudo to the ofbizDemo user: + +sudo -s -u ofbizDemo -H + +sudo uses OTP (One Time Password), so you not only need to be registered as a sudoer (ask Infra) but also to use a tool like Donkey on Ubuntu (jleroux: I use that) to generate the OTP +Then you can start/stop as required. + +To check if the demos are being run as the ofbizDemo user: + +ps aux | grep ofbizDemo + +The first column on the left tell you the username the demo is +being run as - it should say ofbizDemo (UID) or 9997 (GID) ! + +Type 'exit' to exit the ofbizDemo user and return to your normal user.</code></pre> +<p>Also note that the demos are usually updated and started/stopped automatically using the check-svn-update.sh script in this directory, it is run by an ofbiz cron job every 24 hours at 3 AM. You should therefore only need to start/stop manually if there is a problem.</p> +<p>If you want to restart only a single instance you can respectively use</p> +<p>trunk-manual-nicely.sh stable-manual-nicely.sh old-manual-nicely.sh</p> </body> </html> |
Free forum by Nabble | Edit this page |