Commit 055a3454 authored by Julie gauthier's avatar Julie gauthier
Browse files

DOC: Simplification of the readme. Installed a vm for development.

parent 42f06d39
......@@ -19,9 +19,16 @@ TODO: this should be correctly explained and tested (which by now may not be the
## Usage
### For the first time
### For the first time : set a dev environnement
Grab this repository, get into it, grab Puppet modules needed and then run Vagrant:
* Create a new project that is your local working development repository, for example:
```
cd project
git clone https://github.com/adullact/demarches-simplifiees.fr.git
```
* Grab the vagrant-demarches-simplifiees repository, get into it, grab Puppet modules needed:
```
git clone git@gitlab.adullact.net:demarches-simplifiees/vagrant-demarches-simplifiees.git
......@@ -29,47 +36,28 @@ cd vagrant-demarches-simplifiees
./BUILD.sh
```
#### How to set a dev environnement
If you want a development environment, before the build:
* Edit the `Vagrantfile` config.vm.synced_folder parameter:
The first parameter is the path to the local project that you working on.
The second parameter is the path where it will be shared on the VM. `/app` as exemple.
* Edit the `Vagrantfile` config.vm.synced_folder parameter to match with your local working directory:
The first parameter is the relative path to the local project that you working on. For example here it's `../demarches-simplifiees.fr`
The second parameter is the path where it will be shared on the VM. `/shared_dev` as example.
```
config.vm.synced_folder "../your_local_project_DS", "/app"
config.vm.synced_folder "../demarches-simplifiees.fr", "/shared_dev"
```
config.vm.synced_folder "../DS_Github_Adullact/", "/app"
* Edit file 'manifests/default.pp'
Comment `$source_code_of_ds` and uncomment `$local_source_code_of_ds` (enter the correct value if you change the previous shared folder). If not the value is `/app`
Be sure that the variable `$local_source_code_of_ds` is the right one. If you haven't changed it, it's '/shared_dev/'.
```
#$source_code_of_ds = 'https://github.com/betagouv/demarches-simplifiees.fr.git'
$local_source_code_of_ds = '/path_to_your_shared_folder_on_vm'
$local_source_code_of_ds = '/shared_dev/'
```
Then make sure the part CODE cloning repos is commented and DEV part is uncommented:
Then run the vagrant file from the project directory:
```
# CODE #############################################################################
# cloning repos of demarches-simplifiees to environnement of production.
# Comment this part if you want a dev environnement.
#vcsrepo { "$_ds_project_directory":
# ensure => present,
# provider => git,
# source => $source_code_of_ds,
# user => $_system_username,
# require => User[$_system_username],
#}
# DEV environnement. Create a soft link on /app directory which is a share folder on your local project.
# Comment this part if you want to clone a repository
file { $_ds_project_directory:
ensure => link,
target => "$local_source_code_of_ds",
}
vagrant up
```
Then follow instructions of `For the first time` or `To rebuild a vm` part.
Once the build is done, follow the instructions in [this document](Prerequisite_unautomated.md) to complete the installation.
### To rebuild a vm
......@@ -79,4 +67,4 @@ If you already have the all environment just run vagrant from the project direct
vagrant destroy -f && vagrant up
```
Once the build is done, follow the instructions in [this document](Prerequisite_unautomated.md) to complete the installation.
\ No newline at end of file
And follow the instructions in [this document](Prerequisite_unautomated.md).
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment