File tree 5 files changed +32
-19
lines changed
5 files changed +32
-19
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ TPAGE_ARGS = --define kb_top=$(TARGET) \
63
63
64
64
TESTS = $(wildcard t/client-tests/* .t)
65
65
66
- all : build-libs bin compile-typespec service
66
+ all : build-libs bin compile-typespec service build-dancer-config
67
67
68
68
build-libs :
69
69
$(TPAGE ) $(TPAGE_ARGS ) AppConfig.pm.tt > lib/Bio/KBase/AppService/AppConfig.pm
@@ -112,7 +112,7 @@ deploy: deploy-client deploy-service
112
112
deploy-all : deploy-client deploy-service
113
113
deploy-client : compile-typespec build-libs deploy-docs deploy-libs deploy-scripts
114
114
115
- deploy-service : deploy-dir deploy-monit deploy-libs deploy-service-scripts
115
+ deploy-service : deploy-dir deploy-monit deploy-libs deploy-service-scripts deploy-dancer-config
116
116
for script in start_service stop_service postinstall; do \
117
117
$(TPAGE ) $(TPAGE_ARGS ) service/$$ script.tt > $(TARGET ) /services/$(SERVICE ) /$$ script ; \
118
118
chmod +x $(TARGET ) /services/$(SERVICE ) /$$ script ; \
@@ -122,6 +122,12 @@ deploy-service: deploy-dir deploy-monit deploy-libs deploy-service-scripts
122
122
ln -s ../services/$(SERVICE ) /postinstall $(TARGET ) /postinstall/$(SERVICE )
123
123
rsync -arv app_specs $(TARGET ) /services/$(SERVICE ) /.
124
124
125
+ deploy-dancer-config :
126
+ $(TPAGE ) --define deployment_flag=1 $(TPAGE_ARGS ) dancer_config.yml.tt > $(TARGET ) /services/$(SERVICE ) /config.yml
127
+
128
+ build-dancer-config :
129
+ $(TPAGE ) $(TPAGE_ARGS ) dancer_config.yml.tt > lib/Bio/KBase/AppService/config.yml
130
+
125
131
deploy-service-scripts :
126
132
export KB_TOP=$(TARGET ) ; \
127
133
export KB_RUNTIME=$(DEPLOY_RUNTIME ) ; \
Original file line number Diff line number Diff line change
1
+ session: "YAML"
2
+
3
+ template: "template_toolkit"
4
+ engines:
5
+ session:
6
+ YAML:
7
+ [% IF kb_service_log_dir -%]
8
+ session_dir: "[% kb_service_log_dir %]/sessions"
9
+ [% ELSIF deployment_flag -%]
10
+ session_dir: "[% kb_top %]/services/[% kb_service_name %]"
11
+ [% ELSE -%]
12
+ session_dir: "./sessions"
13
+ [% END -%]
Original file line number Diff line number Diff line change @@ -6,21 +6,16 @@ use Data::Dumper;
6
6
use LWP::UserAgent;
7
7
use HTTP::Headers;
8
8
use JSON::XS;
9
+ use File::Spec;
9
10
use Bio::KBase::AppService::Awe;
10
11
11
12
our $impl ;
12
13
our $json = JSON::XS-> new-> pretty;
13
14
14
- set session => ' YAML' ;
15
15
set views => path(dirname(__FILE__ ), ' templates' );
16
16
set layout => ' main' ;
17
- set template => ' template_toolkit' ;
18
- set engines => {
19
- template => {
20
- template_toolkit => {
21
- },
22
- },
23
- };
17
+
18
+ print Dumper(Monitor => config);
24
19
25
20
sub set_impl
26
21
{
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ use LWP::UserAgent;
12
12
use HTTP::Headers;
13
13
use JSON::XS;
14
14
use MIME::Base64;
15
+ use File::Spec;
15
16
use Bio::KBase::AppService::Awe;
16
17
use Bio::P3::Workspace::WorkspaceClientExt;
17
18
use Bio::KBase::AppService::Client;
@@ -23,19 +24,12 @@ our $json = JSON::XS->new->pretty;
23
24
our %token_cache ;
24
25
our $validator = P3TokenValidator-> new();
25
26
26
- set session => ' YAML' ;
27
27
set views => path(dirname(__FILE__ ), ' templates' );
28
- set layout => undef ;
29
- set template => ' template_toolkit' ;
30
- set engines => {
31
- template => {
32
- template_toolkit => {
33
- },
34
- },
35
- };
36
28
set content_type => ' text/plain' ;
37
29
set error_template => undef ;
38
30
31
+ print Dumper(Quick => config);
32
+
39
33
sub set_impl
40
34
{
41
35
my ($i ) = @_ ;
Original file line number Diff line number Diff line change @@ -14,6 +14,11 @@ export KB_DEPLOYMENT_CONFIG="$KB_TOP/deployment.cfg"
14
14
# For phispy
15
15
export R_LIBS=" $KB_TOP /lib"
16
16
17
+ #
18
+ # Dancer apps config dir
19
+ #
20
+ export DANCER_CONFDIR=" $KB_TOP /services/[% kb_service_name %]"
21
+
17
22
[% IF kb_tempdir -%]
18
23
export TMPDIR=[% kb_tempdir %]
19
24
export TEMPDIR=[% kb_tempdir %]
You can’t perform that action at this time.
0 commit comments