eGov ERP DevOps
eGov SmartCity Suite Setup
Prerequisites
Install maven v3.2.x
Install PostgreSQL v9.6
Install Elastic Search v2.4.x
Install Jboss Wildfly v10.x
Install Git 2.8.3
Install JDK 8 update 112 or higher
Database Setup
Create a database and user in postgres
Create a schema called
generic
Execute
ALTER ROLE <your_login_role> SET search_path TO generic,public;
Elastic Search Setup
Elastic seach server properties needs to be configured in elasticsearch.yml
under <ELASTICSEARCH_INSTALL_DIR>/config
## Your local elasticsearch clustername, DO NOT use default clustername
cluster.name: elasticsearch-<username>
## This is the default port
transport.tcp.port: 9300
NB: <username>
user name of the loggedin system, enter the below command in terminal to find the username.
$ id -un
Building Source
Clone the eGov repository (development is done on the
develop
branch.
$ mkdir egovgithub
$ cd egovgithub
$ git clone https://github.com/egovernments/egov-smartcity-suite.git
$ git checkout develop
2. Change directory to <CLONED_REPO_DIR>/egov/egov-config/src/main/resources/config/
and create a file called egov-erp-<username>.properties
and enter the following values based on your environment config.
If required, you can override any default settings available in /egov/egov-egi/src/main/resources/config/application-config.properties
by overriding the value in egov-erp-<username>.properties
.
3. Change directory back to <CLONED_REPO_DIR>/egov
4. Run the following commands, this will cleans, compiles, tests, migrates database and generates ear artifact along with jars and wars appropriately
Redis Server Setup
By default eGov suit uses embedded redis server (work only in Linux & OSx), to make eGov suit works in Windows OS or if you want to run redis server as standalone then follow the installation steps below.
Installing redis server on Linux
2. Installing redis server on Windows :- There is no official installable available for Windows OS. To install redis on Windows OS, follow the instruction given in https://chocolatey.org/packages/redis-64
3. Once installed, set the below property in egov-erp-override.properties
or egov-erp-<username>.properties
.
to control the redis server host and port use the following property values (only required if installed with non default).
Deploying Application
Configuring JBoss Wildfly
Download and unzip the customized JBoss Wildfly Server from here. This server contains some additional jars that are required for the ERP.
In case properties needs to be overridden, edit the below file (This is only required if
egov-erp-<username>.properties
is not present)
3. Update settings in standalone.xml
under <JBOSS_HOME>/standalone/configuration
Check Datasource setting is in sync with your database details.
Check HTTP port configuration is correct in
4. Change directory back to <CLONED_REPO_DIR>/egov/dev-utils/deployment/
and run the below command
Alternatively this can be done manually by following the below steps.
Copy the generated exploded ear
<CLONED_REPO_DIR>/egov/egov-ear/target/egov-ear-<VERSION>.ear
in to your JBoss deployment folder<JBOSS_HOME>/standalone/deployments
Create or touch a file named
egov-ear-<VERSION>.ear.dodeploy
to make sure JBoss picks it up for auto deployment
5. Start the wildfly server by executing the below command
In Mac OSx, it may also required to specify
Djboss.modules.system.pkgs=org.jboss.byteman
b 0.0.0.0
only required if application accessed using IP address or domain name.
Monitor the logs and in case of successful deployment, just hit
http://localhost:<YOUR_HTTP_PORT>/egi
in your favorite browser.Login using username as
egovernments
and passworddemo
Accessing the application using IP address and domain name
This section is to be referred only if you want the application to run using any ip address or domain name.
1. To access the application using IP address:
Have an entry in eg_city table in database with an IP address of the machine where application server is running (for ex: domainurl="172.16.2.164") to access application using IP address.
Access the application using an url http://172.16.2.164:8080/egi/ where 172.16.2.164 is the IP and 8080 is the port of the machine where application server is running.
2. To access the application using domain name:
Have an entry in eg_city table in database with domain name (for ex: domainurl= "www.egoverpphoenix.org") to access application using domain name.
Add the entry in hosts file of your system with details as 172.16.2.164 www.egoverpphoenix.org (This needs to be done both in server machine as well as the machines in which the application needs to be accessed since this is not a public domain).
Access the application using an url http://www.egoverpphoenix.org:8080/egi/ where www.egoverpphoenix.org is the domain name and 8080 is the port of the machine where application server is running.
Always start the wildfly server with the below command to access the application using IP address or domain name.
Note: This system is supported
OS:-
Linux (Recommended)
Mac
Windows (If Redis server standalone installed).
Browser:-
Chrome (Recommended)
Firefox
Internet Explorer
DevOps as a Culture