diff --git a/INSTALL/INSTALL.ubuntu1704.md b/INSTALL/INSTALL.ubuntu1704.md index 384d2cc..c8f5e69 100644 --- a/INSTALL/INSTALL.ubuntu1704.md +++ b/INSTALL/INSTALL.ubuntu1704.md @@ -1,6 +1,17 @@ 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 ----------- @@ -95,7 +106,7 @@ There are 2 parts: * one only for front office: ng_client; * 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") @@ -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 project and you should be ready to go! It should look something like below: - + ServerName monarc.localhost DocumentRoot /path/to/monarc/public SetEnv APPLICATION_ENV "development" @@ -168,7 +179,7 @@ Create configuration file 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. 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 npm sudo npm install -g grunt-cli - -Only for Linux systems: - sudo ln -s /usr/bin/nodejs /usr/bin/node -Update project --------------- -Play script (mandatory from the root of the project)(pull and migrations): +Update MONARC +------------- + +Play script (mandatory from the root of the project): /bin/bash ./scripts/update-all.sh -This shell script uses others shell scripts. You may need to change the access -rights of those scripts. +This script will retrieve the updates from the last stable release of MONARC. + +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 diff --git a/README.md b/README.md index 86c4aea..97eb3ed 100644 --- a/README.md +++ b/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 ------------ -CASES promotes information security through the use of behavioral, -organizational and technical measures. Depending on its size and its security -needs, organizations must react in the most appropriate manner. + +[CASES](https://www.cases.lu) promotes information security through the use of +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 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. @@ -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 benefit from the advantages that a risk analysis offers, CASES has developed an -optimised risk analysis method: MONARC (Method for an Optimised aNAlysis of -Risks by CASES), allowing precise and repeatable risk management. +optimised risk analysis method: +[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 performed in similar business contexts: the same vulnerabilities @@ -34,13 +42,30 @@ More information: Documentation ------------- -For a general documentation see +For a general user documentation see [here](https://github.com/monarc-project/MonarcAppFO/tree/master/docs). For installation instructions see [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 ------- diff --git a/db-bootstrap/monarc-common.tar.gz b/db-bootstrap/monarc-common.tar.gz index 63e58c2..46df54e 100644 Binary files a/db-bootstrap/monarc-common.tar.gz and b/db-bootstrap/monarc-common.tar.gz differ diff --git a/scripts/update-all.sh b/scripts/update-all.sh index 7c403eb..ae7a2f8 100755 --- a/scripts/update-all.sh +++ b/scripts/update-all.sh @@ -116,6 +116,16 @@ else fi 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 $pathBO migrate_module $phpcommand $pathFO diff --git a/scripts/upgrade-url.sh b/scripts/upgrade-url.sh new file mode 100755 index 0000000..c796a9e --- /dev/null +++ b/scripts/upgrade-url.sh @@ -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