Skip to content

Commit

Permalink
add docs for iVIS
Browse files Browse the repository at this point in the history
  • Loading branch information
RuslanPopenko committed Aug 9, 2016
1 parent ddfc524 commit 4848bb6
Show file tree
Hide file tree
Showing 8 changed files with 245 additions and 6 deletions.
90 changes: 90 additions & 0 deletions docs/files/import.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
--
-- Dumping data for table `dbo_person`
--

LOCK TABLES `dbo_person` WRITE;
INSERT INTO `dbo_person` VALUES (1, 'ADMIN', 'ADMIN', 'ADMIN-ID');
UNLOCK TABLES;

--
-- Dumping data for table `dbo_user`
--

LOCK TABLES `dbo_user` WRITE;
INSERT INTO `dbo_user` VALUES (1,'admin',1,'$2a$04$Iu27qEkQCvr3K8RS3GmAEeRNe91h6PnZ5OAQqRexJ/gLwzbu7emX2',NULL,1);
UNLOCK TABLES;

--
-- Dumping data for table `dbo_role`
--

LOCK TABLES `dbo_role` WRITE;
INSERT INTO `dbo_role` VALUES (1, 'ROLE_ADMIN'),(2, 'ROLE_USER'),(3, 'ROLE_DEVELOPER'),(4, 'ROLE_GUARDIAN'),(5, 'ROLE_STUDENT'),(6, 'ROLE_ANONYMOUS');
UNLOCK TABLES;

--
-- Dumping data for table `dbo_oauth_client_details`
--

LOCK TABLES `dbo_oauth_client_details` WRITE;
INSERT INTO `dbo_oauth_client_details` () VALUES ('ff11397c-3e3b-4398-80a9-feba203f1928',60000,'secret','admin',600000,1);
UNLOCK TABLES;

--
-- Dumping data for table `dbo_oauth_client_grant_types`
--

LOCK TABLES `dbo_oauth_client_grant_types` WRITE;
INSERT INTO `dbo_oauth_client_grant_types` VALUES ('ff11397c-3e3b-4398-80a9-feba203f1928','authorization_code'),('ff11397c-3e3b-4398-80a9-feba203f1928','implicit'),('ff11397c-3e3b-4398-80a9-feba203f1928','refresh_token'),('ff11397c-3e3b-4398-80a9-feba203f1928','client_credentials'),('ff11397c-3e3b-4398-80a9-feba203f1928','password');
UNLOCK TABLES;

--
-- Dumping data for table `dbo_oauth_client_redirect_uris`
--

LOCK TABLES `dbo_oauth_client_redirect_uris` WRITE;
INSERT INTO `dbo_oauth_client_redirect_uris` VALUES ('ff11397c-3e3b-4398-80a9-feba203f1928','http://ivis.dev.imcode.com');
UNLOCK TABLES;

--
-- Dumping data for table `dbo_oauth_client_resources`
--

LOCK TABLES `dbo_oauth_client_resources` WRITE;
INSERT INTO `dbo_oauth_client_resources` VALUES ('ff11397c-3e3b-4398-80a9-feba203f1928','ivis');
UNLOCK TABLES;

--
-- Dumping data for table `dbo_oauth_client_role`
--

LOCK TABLES `dbo_oauth_client_role` WRITE;;
INSERT INTO `dbo_oauth_client_role` VALUES (1,'ROLE_ADMIN'),(2,'ROLE_USER');
UNLOCK TABLES;

--
-- Dumping data for table `dbo_oauth_client_roles_cross`
--

LOCK TABLES `dbo_oauth_client_roles_cross` WRITE;
INSERT INTO `dbo_oauth_client_roles_cross` VALUES ('ff11397c-3e3b-4398-80a9-feba203f1928',1),('ff11397c-3e3b-4398-80a9-feba203f1928',2);
UNLOCK TABLES;

--
-- Dumping data for table `dbo_oauth_client_scope`
--

LOCK TABLES `dbo_oauth_client_scope` WRITE;
INSERT INTO `dbo_oauth_client_scope` VALUES ('ff11397c-3e3b-4398-80a9-feba203f1928','read'),('ff11397c-3e3b-4398-80a9-feba203f1928','write'),('ff11397c-3e3b-4398-80a9-feba203f1928','execute');
UNLOCK TABLES;

--
-- Dumping data for table `dbo_user_roles_cross`
--

LOCK TABLES `dbo_user_roles_cross` WRITE;

INSERT INTO `dbo_user_roles_cross` VALUES (1,1),(1,2),(1,3),(1,4),(1,5);

UNLOCK TABLES;

2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ Contents
basic_concepts/index
quick_start/index
api/index
how_to_use/index
use_cases/index

.. include:: /common/contribute.txt
3 changes: 2 additions & 1 deletion docs/quick_start/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
.. toctree::
:titlesonly:

installation
walkthrough_install_ivis_server
walkthrough_create_ivis_server_client_application
63 changes: 61 additions & 2 deletions docs/quick_start/installation.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,63 @@
Installation
============
Software installation
=====================

Process will be describe in Ubuntu Terminal (Ctrl+Alt+T), and all following code you need input there.

Install Git
~~~~~~~~~~~

.. code-block:: bash
sudo apt-get install git-all
Clone project from GitHub repository
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code-block:: bash
cd /home/username/directory #Directory in what you want to clone project
git clone https://github.com/imCodePartnerAB/iVIS.git
Install Java
~~~~~~~~~~~~

Project uses Java 1.8, so we recommend you to install Oracle JDK 1.8

.. code-block:: bash
sudo add-apt-repository ppa:webupd8team/java #Add repository to your list
sudo apt-get update
sudo apt-get install oracle-java8-installer
Then follow instruction in a console.

Install MySQL server and client
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code-block:: bash
sudo apt install mysql-server mysql-client
sudo apt-get install libmysql-java #jdbc connectors
Enter configuration properties such as password.

Install Maven
~~~~~~~~~~~~~

.. code-block:: bash
sudo apt-get install maven
Download Tomcat server
~~~~~~~~~~~~~~~~~~~~~~

Current stable version is `8.54 <http://apache.ip-connect.vn.ua/tomcat/tomcat-8/v8.5.4/bin/apache-tomcat-8.5.4.tar.gz/>`_





Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Walkthrough: Create iVIS Server Client Application
==================================================

86 changes: 86 additions & 0 deletions docs/quick_start/walkthrough_install_ivis_server.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
Walkthrough: Install iVIS Server
================================
*For install iVIS server you need*:

* `Git <https://git-scm.com//>`_
* `iVIS project <https://github.com/imCodePartnerAB/iVIS/>`_
* `Java <https://www.oracle.com/java/>`_
* `MySQL database <http://www.mysql.com/>`_
* `Maven <https://maven.apache.org/>`_
* `Tomcat server <https://tomcat.apache.org//>`_

For details instruction of install this components visit page:

.. toctree::
:titlesonly:

installation

Project structure
-----------------

iVIS maven project from GitHub consist of 4 modules:
#. *ivis-core* - entities and service interfaces for them
#. *ivis-sdk* - sdk for easier work with API
#. *ivis-server* - iVIS server, where is implemented all logic of site
#. *ivis-client* - an example of iVIS client based on imCMS

Git configuration
-----------------

First of all you need switch to branch of latest changes.

Current branch is NewApplicationFormArchitect

In Terminal(Ctrl+ALt+T) input following commands

.. code-block:: bash
cd /home/../iVIS #path to iVIS project directory
git checkout NewApplicationFormArchitect
Database configuration
----------------------

In Terminal(Ctrl+ALt+T) input following commands for create database

.. code-block:: bash
mysql -u {username} -p{password} #{username} - database username, {password} - database password
CREATE DATABASE {databaseName}; #{databaseName} - database name
Edit file **server.properties** from *ivis-server/src/main/webapp/WEB-INF* following

* User [#]_
* Password [#]_
* JdbcUrl [#]_
* Hibernate.hbm2ddl [#]_
* Hibernate.dialect [#]_
* Server.name [#]_

.. [#] **username** of database (default *root*)
.. [#] **password** of database
.. [#] consist of **jdbc:{provider}://{hostname}:{port}/{databaseName}?{encoding}**
for mysql {provider} = *mysql*, {hostname} = *localhost*, {port} = 3306, {encoding} = *utf-8*
.. [#] set *create*
.. [#] for mysql is *org.hibernate.dialect.MySQL5InnoDBDialect*
.. [#] **host** of server (default *http://localhost:8080*)
Put file :download:`import.sql <../files/import.sql>` into *ivis-server/src/main/resources*

Run application
---------------

In Terminal(Ctrl+ALt+T) input following commands

cd /home/../iVIS #path to iVIS project directory

mvn clean install -DskipTests






4 changes: 2 additions & 2 deletions docs/how_to_use/index.rst → docs/use_cases/index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
How to use
==========
Use cases
=========

.. toctree::
:titlesonly:
Expand Down
File renamed without changes.

0 comments on commit 4848bb6

Please sign in to comment.