Merge branch 'master' of https://github.com/monarc-project/MonarcAppFO
commit
b8fce0c825
|
@ -1,6 +1,17 @@
|
||||||
Installation on Ubuntu 17.04
|
Installation on Ubuntu 17.04
|
||||||
============================
|
============================
|
||||||
|
|
||||||
|
The master branch should always be working and it is recommended to install the
|
||||||
|
project using this one.
|
||||||
|
|
||||||
|
If you have already installed MONARC and want to upgrade to a later version, you
|
||||||
|
can use the provided script:
|
||||||
|
|
||||||
|
$ scripts/update-all.sh
|
||||||
|
$ sudo systemctl restart apache2
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
PHP & MySQL
|
PHP & MySQL
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
|
@ -95,7 +106,7 @@ There are 2 parts:
|
||||||
* one only for front office: ng_client;
|
* one only for front office: ng_client;
|
||||||
* one common for front office and back office: ng_anr.
|
* one common for front office and back office: ng_anr.
|
||||||
|
|
||||||
It is developed with Angular framework version 1
|
It is developed with Angular framework version 1.
|
||||||
|
|
||||||
![Arbo](pictures/arbo3.png "Arbo")
|
![Arbo](pictures/arbo3.png "Arbo")
|
||||||
|
|
||||||
|
@ -120,7 +131,7 @@ Note: The built-in CLI server is **for development only**.
|
||||||
To setup Apache, setup a virtual host to point to the public/ directory of the
|
To setup Apache, setup a virtual host to point to the public/ directory of the
|
||||||
project and you should be ready to go! It should look something like below:
|
project and you should be ready to go! It should look something like below:
|
||||||
|
|
||||||
<VirtualHost *:80>
|
<VirtualHost 127.0.0.1:80>
|
||||||
ServerName monarc.localhost
|
ServerName monarc.localhost
|
||||||
DocumentRoot /path/to/monarc/public
|
DocumentRoot /path/to/monarc/public
|
||||||
SetEnv APPLICATION_ENV "development"
|
SetEnv APPLICATION_ENV "development"
|
||||||
|
@ -168,7 +179,7 @@ Create configuration file
|
||||||
|
|
||||||
sudo cp ./config/autoload/local.php.dist ./config/autoload/local.php
|
sudo cp ./config/autoload/local.php.dist ./config/autoload/local.php
|
||||||
|
|
||||||
Update connection information to local.php and global.php
|
Update connection information to *local.php* and *global.php*.
|
||||||
|
|
||||||
Configuration files are stored in cache.
|
Configuration files are stored in cache.
|
||||||
If your changes have not been considered, empty cache by deleting file in
|
If your changes have not been considered, empty cache by deleting file in
|
||||||
|
@ -180,20 +191,38 @@ Install Grunt
|
||||||
sudo apt-get install nodejs
|
sudo apt-get install nodejs
|
||||||
sudo apt-get install npm
|
sudo apt-get install npm
|
||||||
sudo npm install -g grunt-cli
|
sudo npm install -g grunt-cli
|
||||||
|
|
||||||
Only for Linux systems:
|
|
||||||
|
|
||||||
sudo ln -s /usr/bin/nodejs /usr/bin/node
|
sudo ln -s /usr/bin/nodejs /usr/bin/node
|
||||||
|
|
||||||
|
|
||||||
Update project
|
Update MONARC
|
||||||
--------------
|
-------------
|
||||||
Play script (mandatory from the root of the project)(pull and migrations):
|
|
||||||
|
Play script (mandatory from the root of the project):
|
||||||
|
|
||||||
/bin/bash ./scripts/update-all.sh
|
/bin/bash ./scripts/update-all.sh
|
||||||
|
|
||||||
This shell script uses others shell scripts. You may need to change the access
|
This script will retrieve the updates from the last stable release of MONARC.
|
||||||
rights of those scripts.
|
|
||||||
|
It uses others shell scripts. You may need to change the access rights of those
|
||||||
|
scripts.
|
||||||
|
|
||||||
|
Before updating MONARC it is advised to configure database backup. For that you
|
||||||
|
just need to create a file _data/backup/credentialsmysql.cnf_:
|
||||||
|
|
||||||
|
[client]
|
||||||
|
host = localhost
|
||||||
|
user = sql-monarc-user
|
||||||
|
password = your-password
|
||||||
|
socket = /var/run/mysqld/mysqld.sock
|
||||||
|
[mysql_upgrade]
|
||||||
|
host = localhost
|
||||||
|
user = sql-monarc-user
|
||||||
|
password = your-password
|
||||||
|
socket = /var/run/mysqld/mysqld.sock
|
||||||
|
basedir = /usr
|
||||||
|
|
||||||
|
If this file is not present, a warning message will be displayed during the
|
||||||
|
upgrade.
|
||||||
|
|
||||||
|
|
||||||
Create Initial User and Client
|
Create Initial User and Client
|
||||||
|
|
41
README.md
41
README.md
|
@ -1,11 +1,17 @@
|
||||||
Skeleton MONARC Project
|
MONARC - Method for an Optimised aNAlysis of Risks by CASES
|
||||||
=======================
|
===========================================================
|
||||||
|
|
||||||
|
![Latest Release](https://img.shields.io/github/release/monarc-project/MonarcAppFO.svg?style=flat-square)
|
||||||
|
![License](https://img.shields.io/github/license/monarc-project/MonarcAppFO.svg?style=flat-square)
|
||||||
|
![Contributors](https://img.shields.io/github/contributors/monarc-project/MonarcAppFO.svg?style=flat-square)
|
||||||
|
![Stars](https://img.shields.io/github/stars/monarc-project/MonarcAppFO.svg?style=flat-square)
|
||||||
|
|
||||||
Introduction
|
Introduction
|
||||||
------------
|
------------
|
||||||
CASES promotes information security through the use of behavioral,
|
|
||||||
organizational and technical measures. Depending on its size and its security
|
[CASES](https://www.cases.lu) promotes information security through the use of
|
||||||
needs, organizations must react in the most appropriate manner.
|
behavioral, organizational and technical measures. Depending on its size and its
|
||||||
|
security needs, organizations must react in the most appropriate manner.
|
||||||
Adopting good practices, taking the necessary measures and adjusting them
|
Adopting good practices, taking the necessary measures and adjusting them
|
||||||
proportionally: all this is part of the process to ensure information security.
|
proportionally: all this is part of the process to ensure information security.
|
||||||
Most of all, it depends on performing a risk analysis on a regular basis.
|
Most of all, it depends on performing a risk analysis on a regular basis.
|
||||||
|
@ -16,8 +22,10 @@ expertise is a barrier for many companies, especially SMEs.
|
||||||
|
|
||||||
To remedy this situation and allow all organizations, both large and small, to
|
To remedy this situation and allow all organizations, both large and small, to
|
||||||
benefit from the advantages that a risk analysis offers, CASES has developed an
|
benefit from the advantages that a risk analysis offers, CASES has developed an
|
||||||
optimised risk analysis method: MONARC (Method for an Optimised aNAlysis of
|
optimised risk analysis method:
|
||||||
Risks by CASES), allowing precise and repeatable risk management.
|
[MONARC](https://github.com/monarc-project/MonarcAppFO)
|
||||||
|
(Method for an Optimised aNAlysis of Risks by CASES), allowing precise and
|
||||||
|
repeatable risk management.
|
||||||
|
|
||||||
The advantage of MONARC lies in the capitalization of risk analyses already
|
The advantage of MONARC lies in the capitalization of risk analyses already
|
||||||
performed in similar business contexts: the same vulnerabilities
|
performed in similar business contexts: the same vulnerabilities
|
||||||
|
@ -34,13 +42,30 @@ More information:
|
||||||
Documentation
|
Documentation
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
For a general documentation see
|
For a general user documentation see
|
||||||
[here](https://github.com/monarc-project/MonarcAppFO/tree/master/docs).
|
[here](https://github.com/monarc-project/MonarcAppFO/tree/master/docs).
|
||||||
|
|
||||||
For installation instructions see
|
For installation instructions see
|
||||||
[INSTALL](https://github.com/monarc-project/MonarcAppFO/tree/master/INSTALL).
|
[INSTALL](https://github.com/monarc-project/MonarcAppFO/tree/master/INSTALL).
|
||||||
|
|
||||||
|
|
||||||
|
Contributing
|
||||||
|
------------
|
||||||
|
|
||||||
|
If you are interested to contribute to the MONARC project, review our
|
||||||
|
[community page](https://monarc-project.github.io/pages/community/).
|
||||||
|
There are many ways to contribute and participate to the project.
|
||||||
|
|
||||||
|
Feel free to fork the code, play with it, make some patches and send us the pull
|
||||||
|
requests via the [issues](https://github.com/monarc-project/MonarcAppFO/issues).
|
||||||
|
|
||||||
|
There is one main branch: what we consider as stable with frequent updates as
|
||||||
|
hot-fixes.
|
||||||
|
|
||||||
|
Features are developed in separated branches and then regularly merged into the
|
||||||
|
master stable branch.
|
||||||
|
|
||||||
|
|
||||||
License
|
License
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -116,6 +116,16 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $bypass -eq 0 ]]; then
|
if [[ $bypass -eq 0 ]]; then
|
||||||
|
if [ -e data/backup/credentialsmysql.cnf ]; then
|
||||||
|
backupdir=data/backup/$(date +"%Y%m%d_%H%M%S")
|
||||||
|
mkdir $backupdir
|
||||||
|
echo -e "\e[32mDumping database to $backupdir...\e[0m"
|
||||||
|
mysqldump --defaults-file=data/dbcredentials/credentialsmysql.cnf --databases monarc_common > $backupdir/dump-common.sql
|
||||||
|
mysqldump --defaults-file=data/dbcredentials/credentialsmysql.cnf --databases monarc_cli > $backupdir/dump-cli.sql
|
||||||
|
else
|
||||||
|
echo -e "\e[93mDatabase backup not configured. Skipping.\e[0m"
|
||||||
|
fi
|
||||||
|
|
||||||
migrate_module $phpcommand $pathCore
|
migrate_module $phpcommand $pathCore
|
||||||
migrate_module $phpcommand $pathBO
|
migrate_module $phpcommand $pathBO
|
||||||
migrate_module $phpcommand $pathFO
|
migrate_module $phpcommand $pathFO
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
oldurl_if_exists() {
|
||||||
|
if [ -d $1 ]; then
|
||||||
|
pushd $1 >/dev/null
|
||||||
|
sed -i -e 's/CASES-LU/monarc-project/g' ./.git/config $2
|
||||||
|
git config core.fileMode false
|
||||||
|
popd >/dev/nul
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
oldurl_if_exists . $1
|
||||||
|
oldurl_if_exists module/MonarcCore $1
|
||||||
|
oldurl_if_exists module/MonarcBO $1
|
||||||
|
oldurl_if_exists module/MonarcFO $1
|
||||||
|
oldurl_if_exists node_modules/ng_backoffice $1
|
||||||
|
oldurl_if_exists node_modules/ng_client $1
|
||||||
|
oldurl_if_exists node_modules/ng_anr $1
|
Loading…
Reference in New Issue