authserver/README.md
changeset 8 5a0cbbe0922a
parent 1 e25add38aab5
child 82 bf1c38268e25
equal deleted inserted replaced
7:1a3fa80225b2 8:5a0cbbe0922a
    13 - maven
    13 - maven
    14 
    14 
    15 Autre solution : utiliser Homestead : http://laravel.com/docs/5.0/homestead
    15 Autre solution : utiliser Homestead : http://laravel.com/docs/5.0/homestead
    16 
    16 
    17 ## CAS server
    17 ## CAS server
       
    18 If using boot2docker:
       
    19 ```shell
       
    20 boot2docker init
       
    21 boot2docker up
       
    22 ```
       
    23 
    18 ```shell
    24 ```shell
    19 mvn clean package
    25 mvn clean package
    20 docker build -t iri-research/cas-basic .
    26 docker build -t iri-research/cas-basic .
    21 docker run -p 8080:8080 -p 8443:8443 -d iri-research/cas-basic
    27 docker run -p 8080:8080 -p 8443:8443 --addhost homestead.app:192.168.10.10 -d iri-research/cas-basic
    22 ```
    28 ```
       
    29 
       
    30 ## LDT
       
    31 For testing with runserver:
       
    32 ```shell
       
    33 python manage.py runserver 0.0.0.0:8001
       
    34 ```
       
    35 Edit config.py according to config.py.tmpl:
       
    36 
       
    37     CAS_SERVER_URL = "https://192.168.59.103:8443/cas/"
       
    38     CAS_IGNORE_REFERER = True
       
    39     CAS_REDIRECT_UTL = "/ldt/"
       
    40 
       
    41 Note: for CAS_SERVER_URL, the ip address is the IP of the docker container. If using boot2docker it's given to you after "boot2docker up".
       
    42 
       
    43 Add the following line to the /etc/hosts file of the machine running the LDT platform:
       
    44 
       
    45     192.168.10.10 homestead.app
    23 
    46 
    24 ## Client server
    47 ## Client server
    25 ```shell
    48 ```shell
    26 curl -sS https://getcomposer.org/installer | php
    49 curl -sS https://getcomposer.org/installer | php
    27 php composer.phar install
    50 php composer.phar install
    28 cp .env.example .env
    51 cp .env.example .env
    29 #edit .env to match environement
    52 ```
       
    53 
       
    54 edit .env to match environement:
       
    55 * LDT_URL is http://192.168.x.x:8001 (assuming you ran runserver on port 8001), the ip adress is the one of the machine running ldt as seen on your local network. On mac it can be found using the Apple menu > System Preferences > Network
       
    56 * For testing purposes: TEST_PROJECT_ID is the id of a project that was created for user casuser and unpublished. Its json data will be displayed on the Laravel home view to show the results of the CAS proxy authentication process.
       
    57 
       
    58 ```shell
    30 npm install
    59 npm install
    31 ./node_modules/.bin/gulp
    60 ./node_modules/.bin/gulp
    32 php artisan serve
    61 php artisan serve
    33 ```
    62 ```
       
    63 
       
    64 ### If using Homestead
       
    65 Instead of the above commands you just have to edit the .env and boot the vm to start the Laravel app
       
    66 ```
       
    67 vagrant up
       
    68 ```
       
    69 The code is located in /home/vagrant/Code
       
    70 
       
    71 The vm will be accessible on ip 192.168.10.10, you can change it by editing the homestead/conf/homestead.yaml file. NOTE: if you change it then when running the docker container you have the change the add-host option accordingly and the /etc/hosts file of the machine running the LDT platform.
       
    72 
       
    73 ## Using the app
       
    74 
       
    75 The app is accessible on the hostname homestead.app.