Skip to content
Browse files

refactor import_from_data API and bump pointers

 1) refactor import_from_data of service lifecycle
 2) bump pointers of CC, Core, Services

      == bump core

      git shortlog e845c..2fa030

      Chloe Jackson (2):
            Update README to include Bug filing info per Deepika
            Merge "Update README to include Bug filing info per Deepika"

      Eagle Chen (2):
            [dev_setup] Audit mysql long transactions
            [dev_setup] Reset mysql max_connections property

      Figo Feng (5):
            Merge "[dev_setup] Audit mysql long transactions"
            Merge "[dev_setup] Reset mysql max_connections property"
            Merge "remove unnecessary customization for two gateways"
            Merge "remove ip_route in vblob_node.yml"
            Merge "Store default exclusion list in a single place"

      Frank Lu (1):
            [dev_setup] remove ip_route in postgresql_node.yml

      Haipeng Wu (7):
            [dev_setup] Add nginx in front of cc
            [dev_setup] Bug fix: uaa can't start in dev_setup
            Merge "[dev_setup] Add nginx in front of cc"
            [dev_setup] Make dev_setup use stager process
            [dev_setup] fix 504 error running bvt in dev_setup
            [dev_setup] delete .rvmrc in dev_setup
            Merge "[dev_setup] delete .rvmrc in dev_setup"

      Harshawardhan Gadgil (7):
            Merge branch 'master' into sversions
            Devsetup to support multiple versions of mongodb (1.8.5 and 2.0.6)
            Merge master branch to sversions
            Start mongo 2.0 with journalling disabled
            Store default exclusion list in a single place
            Merge branch 'sversions'
            Merge "Merge branch 'sversions'"

      Henry-CF (1):
            remove unnecessary customization for two gateways

      Jeff Li (3):
            Fixed a bug that occurs when installing echo server.
            Fix the bug when dev_setup running in 32-bit boxes
            Merge "Fix the bug when dev_setup running in 32-bit boxes"

      Jennifer Hickey (4):
            Allow user to override RAILS_ENV and RACK_ENV
            Merge "Allow user to override RAILS_ENV and RACK_ENV"
            Remove java submodule
            Merge "Remove java submodule"

      Yang Yang (2):
            remove ip_route in vblob_node.yml
            rename 'vblob 1.0' to 'blob 0.51'; fix mongodb versioning issue

      felixhoo (1):
            Add default plan for dev_setup

      figof (2):
            include rabbit fix to dev_setup
            bump tests

      == bump cloud_controller

      git shortlog eaef6adb1..3c92a6148f
      Frank Lu (1):
            [CC] refactor import_from_data API

      Tang Rui (2):
            [CC] Use new provision response format
            Merge "[CC] Use new provision response format"

      figof (1):
            support service token roration

      == bump services

      git shortlog 45380e9769..deb59792b8
      Frank Lu (1):
            refactor import_from_data API

      Tang Rui (2):
            Delete needless enable instance line in rebalance tool
            Use new provision response format

Change-Id: I359b31c1e37534435cc0f6f873dc3fccc5b24cd4
  • Loading branch information...
1 parent 09829c6 commit 67e1a1ad6b8b5139492b7b2dbdb2c4de2cd38af8 Frank Lu committed Jul 6, 2012
View
32 jobs/cloud_controller/templates/cloud_controller.yml.erb
@@ -208,9 +208,37 @@ service_broker:
token: <%= properties.service_broker.token %>
<% end %>
-<% if properties.cc.service_extension && properties.cc.service_extension.service_lifecycle%>
+<%
+if properties.cc.service_extension && properties.cc.service_extension.service_lifecycle
+ max_upload_size = properties.cc.service_extension.service_lifecycle.max_upload_size || 1
+ if properties.service_lifecycle
+ if properties.service_lifecycle.serialization_max_download_size
+ max_download_size = properties.service_lifecycle.serialization_max_download_size
+ if max_upload_size.to_i > max_download_size.to_i
+ max_upload_size = max_download_size.to_i
+ end
+ end
+ sds = properties.service_lifecycle.serialization_data_server
+ end
+ if properties.serialization_data_server
+ sds_port = properties.serialization_data_server.port
+ upload_token = properties.serialization_data_server.upload_token
+ upload_timeout = properties.serialization_data_server.upload_timeout
+ end
+ sds_port ||= 8080
+%>
service_lifecycle:
- max_upload_size: <%= properties.cc.service_extension.service_lifecycle.max_upload_size || 1 %>
+ max_upload_size: <%= max_upload_size %>
+ upload_token: <%= upload_token %>
+ <% if upload_timeout %>
+ upload_timeout: <%=upload_timeout%>
+ <% end %>
+ <% if sds %>
+ serialization_data_server:
+ <% sds.each do |server| %>
+ - <%=server%>:<%=sds_port%>
+ <% end %>
+ <% end %>
<% end %>
runtimes:
View
2 jobs/cloud_controller/templates/nginx.conf.erb
@@ -61,7 +61,7 @@ http {
root /var/vcap/shared;
}
- location ~ /apps/.*/application {
+ location ~ (/apps/.*/application|/services/v\d+/configurations/.*/serialized/data) {
# Pass altered request body to this location
upload_pass @cc_uploads;
upload_pass_args on;
View
1 jobs/mongodb_gateway/templates/mongodb_gateway.yml.erb
@@ -80,7 +80,6 @@ resque:
port: <%= lifecycle.resque.port %>
password: <%= lifecycle.resque.password %>
expire: <%= lifecycle.resque.expire %>
-upload_temp_dir: <%= lifecycle.tmp_dir || "/tmp" %>
download_url_template: "http://<%= lifecycle.download_url %>/serialized/%{service}/%{name}/snapshots/%{snapshot_id}?token=%{token}"
<% end %>
View
18 jobs/mongodb_gateway/templates/mongodb_gateway_ctl
@@ -8,16 +8,6 @@ PIDFILE=$RUN_DIR/mongodb_gateway.pid
JOB_DIR=/var/vcap/jobs/mongodb_gateway
-<%
-lifecycle = properties.service_lifecycle
-%>
-
-<% if lifecycle and lifecycle.nfs_server %>
-SNAPSHOT_DIR=<%= lifecycle.mount_point || "/var/vcap/services_snapshot" %>
-MT_OPTS="-t nfs"
-MT_EXPORT=<%= lifecycle.nfs_server.address %>:<%= lifecycle.nfs_server.export_dir %>
-<% end %>
-
source /var/vcap/packages/common/utils.sh
case $1 in
@@ -34,11 +24,6 @@ case $1 in
/var/vcap/packages/syslog_aggregator/setup_syslog_forwarder.sh $JOB_DIR/config
<% end %>
- <% if lifecycle and lifecycle.nfs_server %>
- mkdir -p $SNAPSHOT_DIR
- check_mount "$MT_OPTS" "$MT_EXPORT" "$SNAPSHOT_DIR"
- <% end %>
-
exec /var/vcap/packages/mongodb_gateway/services/mongodb/bin/mongodb_gateway \
-c $JOB_DIR/config/mongodb_gateway.yml \
>>$LOG_DIR/mongodb_gateway.stdout.log \
@@ -48,9 +33,6 @@ case $1 in
stop)
kill_and_wait $PIDFILE
- <% if lifecycle && lifecycle.nfs_server %>
- umount $SNAPSHOT_DIR
- <% end %>
;;
View
3 jobs/mongodb_node/templates/mongodb_worker.yml.erb
@@ -34,6 +34,9 @@ index: <%= spec.index %>
node_id: <%= "#{service}_node#{'_' + plan if plan != 'free'}_#{spec.index.to_i + 1}" %>
download_url_template: "http://<%= lifecycle.download_url %>/serialized/%{service}/%{name}/snapshots/%{snapshot_id}?token=%{token}"
snapshot_quota: <%= plan_enabled && plan_conf.lifecycle && plan_conf.lifecycle.snapshot && plan_conf.lifecycle.snapshot.quota || 0 %>
+# optional download tuning
+serialization:
+ max_download_size_mb: <%= properties.service_lifecycle.serialization_max_download_size || 10 %>
default_version: <%= "'#{default_version}'"%>
mongodump_path:
<% for version in supported_versions %>
View
1 jobs/mysql_gateway/templates/mysql_gateway.yml.erb
@@ -70,7 +70,6 @@ resque:
port: <%= lifecycle.resque.port %>
password: <%= lifecycle.resque.password %>
expire: <%= lifecycle.resque.expire %>
-upload_temp_dir: <%= lifecycle.tmp_dir || "/tmp" %>
download_url_template: "http://<%= lifecycle.download_url %>/serialized/%{service}/%{name}/snapshots/%{snapshot_id}?token=%{token}"
<% end %>
View
19 jobs/mysql_gateway/templates/mysql_gateway_ctl
@@ -8,16 +8,6 @@ JOB_DIR=/var/vcap/jobs/mysql_gateway
PIDFILE=$RUN_DIR/mysql_gateway.pid
-<%
-lifecycle = properties.service_lifecycle
-%>
-
-<% if lifecycle and lifecycle.nfs_server %>
-SNAPSHOT_DIR=<%= lifecycle.mount_point || "/var/vcap/services_snapshot" %>
-MT_OPTS="-t nfs"
-MT_EXPORT=<%= lifecycle.nfs_server.address %>:<%= lifecycle.nfs_server.export_dir %>
-<% end %>
-
source /var/vcap/packages/common/utils.sh
case $1 in
@@ -34,11 +24,6 @@ case $1 in
/var/vcap/packages/syslog_aggregator/setup_syslog_forwarder.sh $JOB_DIR/config
<% end %>
- <% if lifecycle and lifecycle.nfs_server %>
- mkdir -p $SNAPSHOT_DIR
- check_mount "$MT_OPTS" "$MT_EXPORT" "$SNAPSHOT_DIR"
- <% end %>
-
exec /var/vcap/packages/mysql_gateway/services/mysql/bin/mysql_gateway \
-c $JOB_DIR/config/mysql_gateway.yml \
>>$LOG_DIR/mysql_gateway.stdout.log \
@@ -49,10 +34,6 @@ case $1 in
stop)
kill_and_wait $PIDFILE
- <% if lifecycle and lifecycle.nfs_server %>
- umount $SNAPSHOT_DIR
- <% end %>
-
;;
*)
View
2 jobs/mysql_node/templates/mysql_worker.yml.erb
@@ -28,6 +28,8 @@ index: <%= spec.index %>
node_id: <%= "#{service}_node#{'_' + plan if plan != 'free'}_#{spec.index.to_i + 1}" %>
download_url_template: "http://<%= lifecycle.download_url %>/serialized/%{service}/%{name}/snapshots/%{snapshot_id}?token=%{token}"
snapshot_quota: <%= plan_enabled && plan_conf.lifecycle && plan_conf.lifecycle.snapshot && plan_conf.lifecycle.snapshot.quota || 0 %>
+serialization:
+ max_download_size_mb: <%= properties.service_lifecycle.serialization_max_download_size || 10 %>
# addtional options
mysql:
host: localhost
View
1 jobs/postgresql_gateway/templates/postgresql_gateway.yml.erb
@@ -71,7 +71,6 @@ resque:
port: <%= lifecycle.resque.port %>
password: <%= lifecycle.resque.password %>
expire: <%= lifecycle.resque.expire %>
-upload_temp_dir: <%= lifecycle.tmp_dir || "/tmp" %>
download_url_template: "http://<%= lifecycle.download_url %>/serialized/%{service}/%{name}/snapshots/%{snapshot_id}?token=%{token}"
<% end %>
View
20 jobs/postgresql_gateway/templates/postgresql_gateway_ctl
@@ -8,16 +8,6 @@ JOB_DIR=/var/vcap/jobs/postgresql_gateway
PIDFILE=$RUN_DIR/postgresql_gateway.pid
-<%
-lifecycle = properties.service_lifecycle
-%>
-
-<% if lifecycle and lifecycle.nfs_server %>
-SNAPSHOT_DIR=<%= lifecycle.mount_point || "/var/vcap/services_snapshot" %>
-MT_OPTS="-t nfs"
-MT_EXPORT=<%= lifecycle.nfs_server.address %>:<%= lifecycle.nfs_server.export_dir %>
-<% end %>
-
source /var/vcap/packages/common/utils.sh
case $1 in
@@ -45,12 +35,6 @@ case $1 in
/var/vcap/packages/syslog_aggregator/setup_syslog_forwarder.sh $JOB_DIR/config
<% end %>
- <% if lifecycle and lifecycle.nfs_server %>
- mkdir -p $SNAPSHOT_DIR
- check_mount "$MT_OPTS" "$MT_EXPORT" "$SNAPSHOT_DIR"
- <% end %>
-
-
exec /var/vcap/packages/postgresql_gateway/services/postgresql/bin/postgresql_gateway \
-c $JOB_DIR/config/postgresql_gateway.yml \
>>$LOG_DIR/postgresql_gateway.stdout.log \
@@ -61,10 +45,6 @@ case $1 in
stop)
kill_and_wait $PIDFILE
- <% if lifecycle and lifecycle.nfs_server %>
- umount $SNAPSHOT_DIR
- <% end %>
-
;;
*)
View
3 jobs/postgresql_node/templates/postgresql_worker.yml.erb
@@ -28,6 +28,9 @@ index: <%= spec.index %>
node_id: <%= "#{service}_node#{'_' + plan if plan != 'free'}_#{spec.index.to_i + 1}" %>
download_url_template: "http://<%= lifecycle.download_url %>/serialized/%{service}/%{name}/snapshots/%{snapshot_id}?token=%{token}"
snapshot_quota: <%= plan_enabled && plan_conf.lifecycle && plan_conf.lifecycle.snapshot && plan_conf.lifecycle.snapshot.quota || 0 %>
+# optional download tuning
+serialization:
+ max_download_size_mb: <%= properties.service_lifecycle.serialization_max_download_size || 10 %>
# addtional options
postgresql:
host: 127.0.0.1
View
1 jobs/redis_gateway/templates/redis_gateway.yml.erb
@@ -68,7 +68,6 @@ resque:
port: <%= lifecycle.resque.port %>
password: <%= lifecycle.resque.password %>
expire: <%= lifecycle.resque.expire %>
-upload_temp_dir: <%= lifecycle.tmp_dir || "/tmp" %>
download_url_template: "http://<%= lifecycle.download_url %>/serialized/%{service}/%{name}/snapshots/%{snapshot_id}?token=%{token}"
<% end %>
View
18 jobs/redis_gateway/templates/redis_gateway_ctl
@@ -8,16 +8,6 @@ JOB_DIR=/var/vcap/jobs/redis_gateway
PIDFILE=$RUN_DIR/redis_gateway.pid
-<%
-lifecycle = properties.service_lifecycle
-%>
-
-<% if lifecycle and lifecycle.nfs_server %>
-SNAPSHOT_DIR=<%= lifecycle.mount_point || "/var/vcap/services_snapshot" %>
-MT_OPTS="-t nfs"
-MT_EXPORT=<%= lifecycle.nfs_server.address %>:<%= lifecycle.nfs_server.export_dir %>
-<% end %>
-
source /var/vcap/packages/common/utils.sh
case $1 in
@@ -34,11 +24,6 @@ case $1 in
/var/vcap/packages/syslog_aggregator/setup_syslog_forwarder.sh $JOB_DIR/config
<% end %>
- <% if lifecycle and lifecycle.nfs_server %>
- mkdir -p $SNAPSHOT_DIR
- check_mount "$MT_OPTS" "$MT_EXPORT" "$SNAPSHOT_DIR"
- <% end %>
-
exec /var/vcap/packages/redis_gateway/services/redis/bin/redis_gateway \
-c $JOB_DIR/config/redis_gateway.yml \
>>$LOG_DIR/redis_gateway.stdout.log \
@@ -48,9 +33,6 @@ case $1 in
stop)
kill_and_wait $PIDFILE
- <% if lifecycle && lifecycle.nfs_server %>
- umount $SNAPSHOT_DIR
- <% end %>
;;
View
3 jobs/redis_node/templates/redis_worker.yml.erb
@@ -29,6 +29,9 @@ index: <%= spec.index %>
node_id: <%= "#{service}_node#{'_' + plan if plan != 'free'}_#{spec.index.to_i + 1}" %>
download_url_template: "http://<%= lifecycle.download_url %>/serialized/%{service}/%{name}/snapshots/%{snapshot_id}?token=%{token}"
snapshot_quota: <%= plan_enabled && plan_conf.lifecycle && plan_conf.lifecycle.snapshot && plan_conf.lifecycle.snapshot.quota || 0 %>
+# optional download tuning
+serialization:
+ max_download_size_mb: <%= properties.service_lifecycle.serialization_max_download_size || 10 %>
# addtional options
command_rename_prefix: <%= properties.redis_node.command_rename_prefix || "magic-protect-command-prefix" %>
gzip_bin: /bin/gzip
View
8 jobs/serialization_data_server/monit
@@ -3,3 +3,11 @@ check process serialization_data_server
start program "/var/vcap/jobs/serialization_data_server/bin/serialization_data_server_ctl start"
stop program "/var/vcap/jobs/serialization_data_server/bin/serialization_data_server_ctl stop"
group vcap
+
+<% if properties.serialization_data_server.use_nginx %>
+check process nginx
+ with pidfile /var/vcap/sys/run/nginx/nginx.pid
+ start program "/var/vcap/jobs/serialization_data_server/bin/nginx_ctl start"
+ stop program "/var/vcap/jobs/serialization_data_server/bin/nginx_ctl stop"
+ group vcap
+<% end %>
View
4 jobs/serialization_data_server/spec
@@ -5,9 +5,13 @@ templates:
serialization_data_server_ctl: bin/serialization_data_server_ctl
serialization_data_server.yml.erb: config/serialization_data_server.yml
syslog_forwarder.conf.erb: config/syslog_forwarder.conf
+ mime.types: config/mime.types
+ nginx_ctl: bin/nginx_ctl
+ nginx.conf.erb: config/nginx.conf
packages:
- common
- serialization_data_server
- ruby
- syslog_aggregator
+ - nginx
View
73 jobs/serialization_data_server/templates/mime.types
@@ -0,0 +1,73 @@
+types {
+ text/html html htm shtml;
+ text/css css;
+ text/xml xml;
+ image/gif gif;
+ image/jpeg jpeg jpg;
+ application/x-javascript js;
+ application/atom+xml atom;
+ application/rss+xml rss;
+
+ text/mathml mml;
+ text/plain txt;
+ text/vnd.sun.j2me.app-descriptor jad;
+ text/vnd.wap.wml wml;
+ text/x-component htc;
+
+ image/png png;
+ image/tiff tif tiff;
+ image/vnd.wap.wbmp wbmp;
+ image/x-icon ico;
+ image/x-jng jng;
+ image/x-ms-bmp bmp;
+ image/svg+xml svg;
+
+ application/java-archive jar war ear;
+ application/mac-binhex40 hqx;
+ application/msword doc;
+ application/pdf pdf;
+ application/postscript ps eps ai;
+ application/rtf rtf;
+ application/vnd.ms-excel xls;
+ application/vnd.ms-powerpoint ppt;
+ application/vnd.wap.wmlc wmlc;
+ application/vnd.wap.xhtml+xml xhtml;
+ application/vnd.google-earth.kml+xml kml;
+ application/vnd.google-earth.kmz kmz;
+ application/x-7z-compressed 7z;
+ application/x-cocoa cco;
+ application/x-java-archive-diff jardiff;
+ application/x-java-jnlp-file jnlp;
+ application/x-makeself run;
+ application/x-perl pl pm;
+ application/x-pilot prc pdb;
+ application/x-rar-compressed rar;
+ application/x-redhat-package-manager rpm;
+ application/x-sea sea;
+ application/x-shockwave-flash swf;
+ application/x-stuffit sit;
+ application/x-tcl tcl tk;
+ application/x-x509-ca-cert der pem crt;
+ application/x-xpinstall xpi;
+ application/zip zip;
+
+ application/octet-stream bin exe dll;
+ application/octet-stream deb;
+ application/octet-stream dmg;
+ application/octet-stream eot;
+ application/octet-stream iso img;
+ application/octet-stream msi msp msm;
+
+ audio/midi mid midi kar;
+ audio/mpeg mp3;
+ audio/x-realaudio ra;
+
+ video/3gpp 3gpp 3gp;
+ video/mpeg mpeg mpg;
+ video/quicktime mov;
+ video/x-flv flv;
+ video/x-mng mng;
+ video/x-ms-asf asx asf;
+ video/x-ms-wmv wmv;
+ video/x-msvideo avi;
+}
View
101 jobs/serialization_data_server/templates/nginx.conf.erb
@@ -0,0 +1,101 @@
+#deployment sds nginx.conf
+user vcap vcap;
+worker_processes 1;
+
+error_log /var/vcap/sys/log/nginx/nginx.error.log;
+pid /var/vcap/sys/run/nginx/nginx.pid;
+
+events {
+ worker_connections 8192;
+ use epoll;
+}
+
+http {
+ include mime.types;
+ default_type text/html;
+ server_tokens off;
+
+ log_format main '$host - [$time_local] '
+ '"$request" $status $bytes_sent '
+ '"$http_referer" "$http_user_agent" '
+ '$remote_addr response_time:$upstream_response_time';
+
+ access_log /var/vcap/sys/log/nginx/nginx.access.log main;
+
+ sendfile on; #enable use of sendfile()
+ tcp_nopush on;
+ tcp_nodelay on; #disable nagel's algorithm
+
+ keepalive_timeout 75 20; #inherited from router
+
+ gzip on;
+ gzip_min_length 1250;
+ gzip_buffers 16 8k;
+ gzip_comp_level 2;
+ gzip_proxied any;
+ gzip_types text/plain text/css application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
+ gzip_vary on;
+ gzip_disable "MSIE [1-6]\.(?!.*SV1)";
+
+ client_max_body_size 256M; #already enforced upstream/but doesn't hurt.
+
+<%
+ sds = properties.serialization_data_server
+ if sds && sds.use_nginx
+ sds_port = sds.port || 8080
+%>
+ upstream serialization_data_server {
+ server 127.0.0.1:20000;
+ }
+
+ server {
+ listen *:<%=sds_port%>;
+ server_name _;
+
+ #proxy and log all SDS traffic
+ location / {
+ access_log /var/vcap/sys/log/nginx/nginx.access.log main;
+ proxy_pass http://serialization_data_server;
+ }
+
+<%
+ lifecycle = properties.service_lifecycle
+ if lifecycle and lifecycle.resque
+ snapshot_dir = lifecycle.mount_point || "/var/vcap/services_snapshot"
+%>
+ location /protected {
+ internal;
+ alias <%= snapshot_dir%>;
+ }
+<% end %>
+
+ location ~ /serialized/.*/.*/serialized/data {
+ upload_pass @sds_uploads;
+ upload_pass_args on;
+
+ # Store files to this directory
+ upload_store /var/vcap/data/serialization_data_server/tmp/uploads;
+
+ # No limit for output body forwarded to SDS
+ upload_max_output_body_len 0;
+
+ # Allow uploaded files to be read only by user
+ # upload_store_access user:r;
+
+ # Set specified fields in request body
+ upload_set_form_field "${upload_field_name}_name" $upload_file_name;
+ upload_set_form_field "${upload_field_name}_path" $upload_tmp_path;
+
+ upload_pass_form_field "^_method$";
+
+ #on any error, delete uploaded files.
+ upload_cleanup 400-505;
+ }
+
+ location @sds_uploads {
+ proxy_pass http://serialization_data_server;
+ }
+
+ }
+ <% end %>
+}
View
41 jobs/serialization_data_server/templates/nginx_ctl
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+RUN_DIR=/var/vcap/sys/run/nginx
+LOG_DIR=/var/vcap/sys/log/nginx
+UPLOADS_DIR=/var/vcap/data/serialization_data_server/tmp/uploads
+PIDFILE=$RUN_DIR/nginx.pid
+
+source /var/vcap/packages/common/utils.sh
+
+case $1 in
+
+ start)
+ pid_guard $PIDFILE "Nginx"
+
+ mkdir -p $RUN_DIR
+ mkdir -p $LOG_DIR
+
+ echo $$ > $PIDFILE
+
+ if [ ! -d "$UPLOADS_DIR" ]; then
+ mkdir -p $UPLOADS_DIR
+ chown -R vcap:vcap $UPLOADS_DIR
+ fi
+
+ exec /var/vcap/packages/nginx/sbin/nginx \
+ -c /var/vcap/jobs/serialization_data_server/config/nginx.conf \
+ >>$LOG_DIR/nginx.stdout.log \
+ 2>>$LOG_DIR/nginx.stderr.log
+ ;;
+
+ stop)
+ kill_and_wait $PIDFILE
+
+ ;;
+
+ *)
+ echo "Usage: nginx_ctl {start|stop}"
+
+ ;;
+
+esac
View
28 jobs/serialization_data_server/templates/serialization_data_server.yml.erb
@@ -1,17 +1,41 @@
---
<%
lifecycle = properties.service_lifecycle
+sds = properties.serialization_data_server
+sds_port = sds.port || 8080
if lifecycle and lifecycle.resque
snapshot_dir = lifecycle.mount_point || "/var/vcap/services_snapshot"
%>
serialization_base_dir: <%= snapshot_dir %>
pid: /var/vcap/sys/run/serialization_data_server/serialization_data_server.pid
<% nats = "nats://#{properties.nats.user}:#{properties.nats.password}@#{properties.nats.address}:#{properties.nats.port}" %>
mbus: <%= nats %>
-<% if properties.serialization_data_server and properties.serialization_data_server.ip_route %>
-ip_route: <%= properties.serialization_data_server.ip_route %>
+<% if sds and sds.ip_route %>
+ip_route: <%= sds.ip_route %>
<% end %>
+cloud_controller_uri: <%= properties.cc.srv_api_uri %>
external_uri: <%= lifecycle.download_url %>
+<% if sds and sds.upload_token %>
+upload_token: <%=sds.upload_token %>
+<% end %>
+<% if sds and sds.upload_file_expire_time %>
+expire_time: <%= sds.upload_file_expire_time %>
+<% end %>
+<% if sds and sds.purge_expired_interval %>
+purge_expired_interval: <%= sds.purge_expired_interval %>
+<% end %>
+<% if sds and sds.purge_num %>
+purge_num: <%= sds.purge_num %>
+<% end %>
+<% if sds and sds.use_nginx %>
+port: 20000
+nginx:
+ nginx_path: /protected
+ nginx_port: <%=sds_port%>
+<% else %>
+port: <%=sds_port%>
+<% end %>
+
logging:
level: debug
file: /var/vcap/sys/log/serialization_data_server/serialization_data_server.log
View
5 jobs/serialization_data_server/templates/serialization_data_server_ctl
@@ -17,7 +17,7 @@ JOB_DIR=/var/vcap/jobs/serialization_data_server
SNAPSHOT_DIR=<%= lifecycle.mount_point || "/var/vcap/services_snapshot" %>
MT_OPTS="-t nfs"
MT_EXPORT=<%= nfs_server.address %>:<%= nfs_server.export_dir %>
-SERIAL_TMP_DIR=<%= lifecycle.tmp_dir || "/var/vcap/services_snapshot/tmp_dir" %>
+SDS_TMP_UPLOAD_DIR=/var/vcap/data/serialization_data_server/tmp/uploads
source /var/vcap/packages/common/utils.sh
@@ -37,7 +37,8 @@ case $1 in
mkdir -p $SNAPSHOT_DIR
check_mount "$MT_OPTS" "$MT_EXPORT" "$SNAPSHOT_DIR"
- mkdir -p $SERIAL_TMP_DIR
+ mkdir -p $SDS_TMP_UPLOAD_DIR
+ chown vcap:vcap $SDS_TMP_UPLOAD_DIR
exec /var/vcap/packages/serialization_data_server/services/serialization_data_server/bin/serialization_data_server \
-c /var/vcap/jobs/serialization_data_server/config/serialization_data_server.yml \
2 src/cloud_controller
@@ -1 +1 @@
-Subproject commit eaef6adb1bc9fc64bf609ac1db9b9f839a40507c
+Subproject commit 3c92a6148fd9289d34ced481fa87ae2652894e0c
2 src/core
@@ -1 +1 @@
-Subproject commit e845c4a1ec83da217d2e20f5b6ad16bf471664dd
+Subproject commit 2fa030a46b9c7772f4107d96fd8d4376fdda6745
2 src/services
@@ -1 +1 @@
-Subproject commit 45380e97690c7e31a4fbb8f9cf08c0012c6ad9da
+Subproject commit deb59792b80a1eafd0db8f5f88b95e6c7779492a

0 comments on commit 67e1a1a

Please sign in to comment.
Something went wrong with that request. Please try again.