-
Notifications
You must be signed in to change notification settings - Fork 6
OMS Build Notes
-
The Java version should be java 8. Check java version of your machine.
$ java -version
-
The Mysql version should be 5.7.x, Check mysql version of your machine.
$ mysql -version
-
You should know how to navigate to file directories on your machine via the terminal window.
-
Open a Terminal window.
-
Go to ~/sandbox (or create the directory).
-
Clone moqui-framework.
$ git clone -b master https://github.com/hotwax/moqui-framework.git
-
Go to moqui-framework directory, add the runtime component.
$ cd moqui-framework
$ git clone -b master https://github.com/hotwax/moqui-runtime.git runtime
-
Go to moqui-framework/runtime/component, and clone the below required components.
$ git clone -b master https://github.com/hotwax/mantle.git
$ git clone -b master https://github.com/hotwax/oms.git
Need to add gradle dependencies in the build.gradle file for database connectivity, you can add this in the custom component’s build.gradle.
Note: For MySQL, the JDBC dependency is already added in the oms component’s build.gradle file as below:
runtime 'mysql:mysql-connector-java:5.1.47'
Create a database using the following command:
CREATE DATABASE moqui CHARACTER SET utf8
Update the runtime/conf/MoquiDevConf.xml and add the mysql database name, user and password detail
<default-property name="entity_ds_host" value="127.0.0.1"/>
<default-property name="entity_ds_database" value="moqui"/>
<default-property name="entity_ds_user" value="moqui"/>
<default-property name="entity_ds_password" value="moqui"/>
- Update the runtime/conf/MoquiProductionConf.xml and add the mysql database name, user and password detail.
- For production its recommended to use 3 databases
- transactional
- analytical
- configuration
<default-property name="entity_ds_database" value="moqui"/>
<default-property name="entity_ds_user" value="moqui"/>
<default-property name="entity_ds_password" value="moqui"/>
-
Download elasticsearch 7.4.2 or higher version
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.4.2.tar.gz
Unzip tar
tar -xzvf elasticsearch-7.4.2.tar.gz .
OR
Access the following url on browser
Linux:
https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.4.2-linux-x86_64.tar.gz
Mac:
https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.4.2-darwin-x86_64.tar.gz
Unzip tar
tar -xzvf elasticsearch-7.4.2-linux-x86_64.tar.gz
-
Go to elasticsearch-7.4.2
cd elasticsearch-7.4.2
-
Start ElasticSearch
./bin/elasticsearch
-
Stop ElasticSearch
ctrl + c
It's recommended to use XA Transactions aware databases, mysql supports the xa-transactions for InnoDB storage engine.
Go to moqui framework directory
cd ~/sandbox/moqui-framework
development environment
$ ./gradlew load -Ptypes=seed,seed-initial,install,ext-seed,ext,ext-order-demo,demo,ext-seed-initial
production environment
$ ./gradlew loadProduction -Ptypes=seed,seed-initial,install,ext-seed,ext,ext-prod,ext-seed-initial
After successful data load , run Moqui.
Development:
$ ./gradlew run
Production:
-
Generate war file using following command.
$ ./gradlew addRuntime
-
You will get the war file at following location.
~/sandbox/moqui-framework/moqui-plus-runtime.war
-
Deploy war file in any application container.
-
Backend Application (Development)
URL : http://localhost:8080/apps
Username : john.doe
Password : moqui
Stop OMS (Development)
`ctrl + c`
-
Update OMS components.
- Navigate to ~/sandbox/moqui-framework and update the code to the current version.
- Goto runtime and update the code to the current version.
- Goto runtime/component and update all the component to current version.
-
To start application use command
- Clean application
. /gradlew clean
- Build application
. /gradlew build
- Run application
./gradlew run
- Clean application