Permalink
Cannot retrieve contributors at this time
Switch branches/tags
bash_bash_loader
bash_loader
bash_web_img
bash_web_js
bash_web_scss
bash_web
bash
bug-2246
bug-2248
bug-2250
bug-2253
bug-2255
bug-2257
bug-2259
bug-2261
bug-2263
bug-2270
bug-2274
bug-2294
bug-2308
bug-2309
bug-2350
bug-2388
bug-2390
bug-2397
bug-2399
bug-2404
bug-2406
bug-2413
bug-2418
bug-2429
bug-2437
bug-2440
bug-2443
bug-2445
bug-2470
bug-2473
bug-2512
bug-2533
bug-2562
bug-2590
bug-2592
bug-2594
bug-2602
bug-2613
bug-2635
bug-2695
bug-2713
bug-2746
bug-2750
bug-2796
bug-2805
bug-2807
bug-2826
bug-2896
bug-2899
bug-2902
bug-2903
bug-2907
bug-2918
bug-2934
bug-2940
bug-2951
bug-2974
bug-2979
bug-2989
bug-2991
bug-2994
bug-2996
bug-3004
bug-3011
bug-3014
bug-3016
bug-3018
bug-3021
bug-3023
bug-3027
bug-3028
bug-3045
bug-3051
bug-3052
bug-3085
bug-3090
bug-3099
bug-3100
bug-3105
bug-3137
bug-3150
bug-3154
bug-3159
bug-3167
bug-3172
bug-3177
bug_attribute
bug_import
bug_return
bug_table_observation
build
compile_asset
css_form_svm
csv_sample
csv_sample_1
csvlint
data_upload
database_tables
dataset
directory_src
directory
doc_bash_script
doc_definition
doc_file_permission
doc_flask
doc_git_submodule
doc_git
doc_grunt
doc_installation
doc_jquery_validation
doc_json_schema
doc_jsonschema
doc_linux_packages
doc_mariadb_database
doc_programmatic_interface
doc_redis
doc_scikit_learn
doc_svm_dataset
doc_web_interface
doc
documentation
donate
feature-5
feature-1916
feature-1917
feature-1922
feature-1924
feature-2023
feature-2086
feature-2116
feature-2153
feature-2181
feature-2188
feature-2204
feature-2222
feature-2223
feature-2229
feature-2230
feature-2234
feature-2235
feature-2236
feature-2237
feature-2242
feature-2252
feature-2267
feature-2272
feature-2279
feature-2280
feature-2282
feature-2284
feature-2286
feature-2288
feature-2291
feature-2292
feature-2293
feature-2298
feature-2302
feature-2304
feature-2306
feature-2311
feature-2316
feature-2317
feature-2322
feature-2324
feature-2327
feature-2332
feature-2334
feature-2336
feature-2337
feature-2343
feature-2345
feature-2347
feature-2349
feature-2352
feature-2353
feature-2354
feature-2356
feature-2357
feature-2359
feature-2360
feature-2362
feature-2364
feature-2367
feature-2376
feature-2377
feature-2378
feature-2380
feature-2384
feature-2392
feature-2395
feature-2401
feature-2410
feature-2414
feature-2416
feature-2419
feature-2426
feature-2433
feature-2441
feature-2447
feature-2450
feature-2451
feature-2453
feature-2455
feature-2457
feature-2461
feature-2463
feature-2465
feature-2466
feature-2467
feature-2468
feature-2469
feature-2472
feature-2474
feature-2478
feature-2484
feature-2488
feature-2491
feature-2492
feature-2496
feature-2497
feature-2500
feature-2503
feature-2504
feature-2505
feature-2510
feature-2515
feature-2516
feature-2517
feature-2518
feature-2519
feature-2520
feature-2526
feature-2528
feature-2535
feature-2536
feature-2538
feature-2539
feature-2540
feature-2541
feature-2543
feature-2547
feature-2551
feature-2554
feature-2555
feature-2557
feature-2560
feature-2563
feature-2565
feature-2568
feature-2570
feature-2574
feature-2578
feature-2582
feature-2584
feature-2586
feature-2587
feature-2596
feature-2606
feature-2607
feature-2608
feature-2611
feature-2621
feature-2628
feature-2629
feature-2632
feature-2634
feature-2638
feature-2640
feature-2642
feature-2645
feature-2648
feature-2653
feature-2655
feature-2656
feature-2660
feature-2662
feature-2665
feature-2667
feature-2668
feature-2670
feature-2673
feature-2674
feature-2675
feature-2679
feature-2683
feature-2686
feature-2689
feature-2697
feature-2704
feature-2709
feature-2710
feature-2712
feature-2714
feature-2717
feature-2722
feature-2724
feature-2725
feature-2727
feature-2728
feature-2730
feature-2732
feature-2734
feature-2735
feature-2740
feature-2741
feature-2751
feature-2760
feature-2764
feature-2773
feature-2776
feature-2781
feature-2784
feature-2786
feature-2789
feature-2790
feature-2792
feature-2793
feature-2794
feature-2800
feature-2802
feature-2810
feature-2812
feature-2813
feature-2815
feature-2816
feature-2818
feature-2819
feature-2821
feature-2823
feature-2832
feature-2837
feature-2842
feature-2844
feature-2845
feature-2849
feature-2850
feature-2854
feature-2857
feature-2859
feature-2860
feature-2863
feature-2864
feature-2866
feature-2868
feature-2869
feature-2871
feature-2872
feature-2873
feature-2878
feature-2888
feature-2890
feature-2893
feature-2897
feature-2908
feature-2919
feature-2922
feature-2923
feature-2924
feature-2925
feature-2926
feature-2928
feature-2932
feature-2933
feature-2934
feature-2943
feature-2946
feature-2949
feature-2957
feature-2961
feature-2967
feature-2970
feature-2980
feature-2990
feature-2998
feature-3000
feature-3031
feature-3041
feature-3047
feature-3049
feature-3053
feature-3058
feature-3063
feature-3064
feature-3067
feature-3068
feature-3071
feature-3074
feature-3092
feature-3097
feature-3098
feature-3100
feature-3102
feature-3113
feature-3129
feature-3131
feature-3132
feature-3133
feature-3135
feature-3139
feature-3141
feature-3146
feature-3148
feature-3152
feature-3155
feature-3156
feature-3161
feature-3165
feature-3169
feature-3174
fieldsets
flask_tests
form_add_fields
general_packages
get_errors
gitignore
gitmodules
gpl_v3
html_index
imagemin
img_loading_gif
javascript
js_ajax_data
js_ajax_feature
js_ajax_graphic
js_ajax_json
js_ajax_loader
js_ajax_model
js_ajax_session
js_form_validation
js_form_validator
js_html_delegator
js_html_form_ajax
js_html_form_delegator
js_html_form
js_jquery-1.8.3
js_jquery_validate
js_jquery_211
json_file_upload
json_sample
json_sample_1
jsonlint
license.md
list_error
markdownlint
master
md_license
milestone-0.9
model_predict
move_python_base_data
no_result_session
node_jscs
package
pep
php_connector_python
php_dataset_loader
php_dataset
php_helper
php_index
php_load_dataset
php_load_logic
php_logic_loader
php_retriever_session
php_settings
php_test
php_tests_index
php
plugin_vbguest
pp_compile_asset
pp_configure_system
pp_install_packages
pp_install_sklearn
pp_setup_database
pp_start_webserver
pp_vagrant_mounted
programmatic_interface
puppet_apt
puppet_git
puppet_librarian_puppet
puppet_mariadb
puppet_nodejs
puppet_python
puppet_scikit_learn
puppet_sys
puppet_timezone
puppet_vcsrepo
puppet
puppetfile
py_app
py_setup
py_views
python_app
python_base_data
python_base
python_cache_hset
python_cache_model
python_config
python_convert_upload
python_converter_data
python_converter_json
python_converter_md5
python_data_analyzer
python_data_append
python_data_creator
python_data_new
python_data_retriever
python_data_saver
python_data_upload
python_data_uploader
python_data_validator
python_db_query
python_db_settings
python_gitignore
python_helper
python_init
python_jsonschema_definition
python_jsonschema
python_load_data
python_load_logic
python_logic_loader
python_memcached_interface
python_memcached_settings
python_model_generate
python_model_predict
python_model_use
python_model_xx
python_redis_query
python_restructure_data
python_retrieve_dataset
python_retrieve_entity
python_retrieve_feature
python_save_dataset
python_save_feature_label
python_save_feature
python_save_observation
python_save_size
python_save_xx
python_serialize_model
python_session_base_data
python_session_base
python_session_data_add
python_session_data_append
python_session_data_new
python_session_model_generate
python_session_model_use
python_session_retriever
python_settings
python_setup_db
python_setup_tables_mlearning
python_setup
python_svm_analysis
python_svm_json
python_svm_training
python_uncache_model
python_validate_dataset
python_validate_mime
python_validate_settings
python_validator_dataset
python_validator_mime
python_validator_settings
python_views
r10k
redis_cache
redis_model
redis
remove-2368
remove-2371
remove-2386
remove-2487
remove-2693
remove-2743
remove-2817
remove-2953
remove-2956
remove-2959
remove_files
replace_mimetype
repository
revert-2913-feature-2821
sample_dataset
sass
scss_style
scss_variable
scss_variables
scss
shellcheck
start_webserver
structure
submodule_flask
submodule_grunt
submodule_jquery_validation
submodule_jsonmerge
submodule_jsonschema
submodule_scikit-learn
submodule_scikit_learn
submodule
svm_form
svm_rbf
tbl_feature_count
tbl_feature_value
uglify
uglifyjs
uid
upload_validation
upstart_flask
vagrant_puppet_install
vagrant_triggers
vagrantfile
validate_mimetype
validate_prediction
validate_predictors
variable_prediction_input
variable_svm_indep_variable
webcompilers
xml_sample
xml_sample_1
xml
xmllint
yml_travis
Nothing to show
Fetching contributors…
| include python | |
| include python::flask | |
| include python::requests | |
| ## define $PATH for all execs, and packages | |
| Exec {path => ['/usr/bin/']} | |
| ## create log directory | |
| file {'/vagrant/log/': | |
| ensure => 'directory', | |
| before => File['server-startup-script'], | |
| } | |
| ## detect os family: create startup script, start flask server | |
| case $::osfamily { | |
| 'redhat': { | |
| } | |
| 'debian': { | |
| ## create startup script (heredoc syntax) | |
| # | |
| # @notify, after the upstart script is created, ensure the service is (re)started. This is similar to | |
| # an exec statement, where the 'refreshonly => true' would be implemented on the corresponding | |
| # listening end point. But, the 'service' end point does not require the 'refreshonly' attribute. | |
| file {'server-startup-script': | |
| path => '/etc/init/flask.conf', | |
| ensure => 'present', | |
| content => @(EOT), | |
| #!upstart | |
| description 'start flask server' | |
| ## start job defined in this file after system services, and processes have already loaded | |
| # (to prevent conflict). | |
| # | |
| # @vagrant-mounted, an event that executes after the shared folder is mounted | |
| # @[2345], represents all configuration states with general linux, and networking access | |
| start on vagrant-mounted and runlevel [2345] | |
| ## stop flask server when machine gracefully shuts down | |
| stop on runlevel [!2345] | |
| ## start flask server (via bash shell) | |
| # | |
| # @$$, the process id (pid) of the current script | |
| script | |
| echo $$ > /vagrant/log/flask_server.pid | |
| exec python /vagrant/app.py | |
| end script | |
| ## log start-up date | |
| pre-start script | |
| echo "[`date`] flask server starting" >> /vagrant/log/flask_server.log | |
| end script | |
| ## log shut-down date, remove process id from log | |
| # | |
| # @[`date`], current date script executed | |
| post-stop script | |
| echo "[`date`] flask server stopping" >> /vagrant/log/flask_server.log | |
| rm -f /vagrant/flask_server.pid | |
| end script | |
| | EOT | |
| notify => Service['flask'], | |
| } | |
| ## start webserver | |
| service {'flask': | |
| ensure => 'running', | |
| enable => 'true', | |
| } | |
| } | |
| default: { | |
| } | |
| } |