bosh-gen 0.24.0 → 0.90.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -362
- data/bosh-gen.gemspec +2 -1
- data/lib/bosh/gen/cli.rb +0 -8
- data/lib/bosh/gen/generators/errand_generator/templates/jobs/%job_name%/templates/bin/run.tt +2 -1
- data/lib/bosh/gen/generators/job_generator.rb +0 -5
- data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_simple/monit.tt +2 -2
- data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_simple/spec.tt +24 -0
- data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_simple/templates/bin/ctl.tt +1 -1
- data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_simple/templates/helpers/ctl_setup.sh +0 -26
- data/lib/bosh/gen/generators/new_release_generator.rb +7 -8
- data/lib/bosh/gen/generators/new_release_generator/templates/README.md.tt +13 -63
- data/lib/bosh/gen/generators/new_release_generator/templates/jobs/{just_install_packages → %project_name%}/monit.tt +0 -0
- data/lib/bosh/gen/generators/new_release_generator/templates/jobs/{just_install_packages → %project_name%}/spec.tt +1 -1
- data/lib/bosh/gen/generators/new_release_generator/templates/jobs/{just_install_packages → %project_name%}/templates/ignoreme +0 -0
- data/lib/bosh/gen/generators/new_release_generator/templates/manifests/%project_name%.yml.tt +38 -0
- data/lib/bosh/gen/generators/new_release_generator/templates/manifests/operators/dev.yml.tt +6 -0
- data/lib/bosh/gen/version.rb +1 -1
- metadata +28 -191
- data/.travis.yml +0 -13
- data/lib/bosh/cli/commands/share_release.rb +0 -80
- data/lib/bosh/gen/generators/bosh_cli_plugin_generator.rb +0 -33
- data/lib/bosh/gen/generators/bosh_cli_plugin_generator/templates/lib/bosh/cli/commands/%underscore_plugin_name%.rb.tt +0 -9
- data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/monit.tt +0 -13
- data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/bin/%job_name%_rack_ctl.tt +0 -59
- data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/bin/ctl_db_utils.sh.erb +0 -54
- data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/bin/ctl_nginx.sh.erb +0 -17
- data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/bin/ctl_redis_utils.sh.erb +0 -18
- data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/bin/ctl_setup.sh.erb +0 -48
- data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/bin/ctl_start.sh.erb +0 -57
- data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/bin/ctl_utils.sh +0 -147
- data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/bin/monit_debugger +0 -13
- data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/bin/nginx_ctl.tt +0 -40
- data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/bin/rails_ctl_setup.sh.erb +0 -39
- data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/config/database.yml.erb +0 -17
- data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/config/mime.types +0 -73
- data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/config/nginx.conf.erb +0 -150
- data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/config/nginx_proxy.conf +0 -11
- data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/config/redis.yml.erb +0 -6
- data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_simple/templates/data/properties.sh.erb +0 -10
- data/lib/bosh/gen/generators/new_release_generator/templates/templates/deployment.yml.tt +0 -31
- data/lib/bosh/gen/generators/new_release_generator/templates/templates/infrastructure-aws-ec2.yml.tt +0 -33
- data/lib/bosh/gen/generators/new_release_generator/templates/templates/infrastructure-warden.yml.tt +0 -37
- data/lib/bosh/gen/generators/new_release_generator/templates/templates/jobs.yml.tt +0 -21
- data/lib/bosh/gen/generators/new_release_generator/templates/templates/make_manifest.tt +0 -83
- data/lib/bosh/gen/generators/new_release_generator/templates/templates/stub.yml.tt +0 -14
- data/lib/bosh/gen/models.rb +0 -9
- data/lib/bosh/gen/models/bosh_config.rb +0 -15
- data/lib/bosh/gen/models/deployment_manifest.rb +0 -107
- data/lib/bosh/gen/models/release_detection.rb +0 -35
- data/lib/bosh/gen/utils/file_with_progress_bar.rb +0 -62
- data/spec/fixtures/bosh_config/multiple_boshes.yml +0 -34
- data/spec/fixtures/deployment_manifests/2_jobs_1_ip_8196_disk.yml +0 -67
- data/spec/fixtures/deployment_manifests/2_jobs_1_ip_8196_disk_with_numeric.yml +0 -67
- data/spec/fixtures/deployment_manifests/2_jobs_2_ips_no_disk.yml +0 -67
- data/spec/fixtures/releases/bosh-sample-release/.gitignore +0 -9
- data/spec/fixtures/releases/bosh-sample-release/LICENSE +0 -8094
- data/spec/fixtures/releases/bosh-sample-release/NOTICE +0 -12
- data/spec/fixtures/releases/bosh-sample-release/README +0 -53
- data/spec/fixtures/releases/bosh-sample-release/config/final.yml +0 -9
- data/spec/fixtures/releases/bosh-sample-release/jobs/mysql/monit +0 -5
- data/spec/fixtures/releases/bosh-sample-release/jobs/mysql/spec +0 -17
- data/spec/fixtures/releases/bosh-sample-release/jobs/mysql/templates/my.bootstrap.erb +0 -6
- data/spec/fixtures/releases/bosh-sample-release/jobs/mysql/templates/my.cnf.erb +0 -46
- data/spec/fixtures/releases/bosh-sample-release/jobs/mysql/templates/my.shutdown.erb +0 -5
- data/spec/fixtures/releases/bosh-sample-release/jobs/mysql/templates/mysql_ctl.erb +0 -56
- data/spec/fixtures/releases/bosh-sample-release/jobs/nginx/monit +0 -5
- data/spec/fixtures/releases/bosh-sample-release/jobs/nginx/spec +0 -10
- data/spec/fixtures/releases/bosh-sample-release/jobs/nginx/templates/mime.types +0 -73
- data/spec/fixtures/releases/bosh-sample-release/jobs/nginx/templates/nginx.conf.erb +0 -65
- data/spec/fixtures/releases/bosh-sample-release/jobs/nginx/templates/nginx_ctl +0 -28
- data/spec/fixtures/releases/bosh-sample-release/jobs/wordpress/monit +0 -5
- data/spec/fixtures/releases/bosh-sample-release/jobs/wordpress/spec +0 -12
- data/spec/fixtures/releases/bosh-sample-release/jobs/wordpress/templates/httpd.conf.erb +0 -422
- data/spec/fixtures/releases/bosh-sample-release/jobs/wordpress/templates/php.ini.erb +0 -1918
- data/spec/fixtures/releases/bosh-sample-release/jobs/wordpress/templates/wordpress_ctl +0 -39
- data/spec/fixtures/releases/bosh-sample-release/jobs/wordpress/templates/wp-config.php.erb +0 -90
- data/spec/fixtures/releases/bosh-sample-release/packages/apache2/packaging +0 -15
- data/spec/fixtures/releases/bosh-sample-release/packages/apache2/spec +0 -5
- data/spec/fixtures/releases/bosh-sample-release/packages/mysql/packaging +0 -14
- data/spec/fixtures/releases/bosh-sample-release/packages/mysql/spec +0 -5
- data/spec/fixtures/releases/bosh-sample-release/packages/mysqlclient/packaging +0 -12
- data/spec/fixtures/releases/bosh-sample-release/packages/mysqlclient/spec +0 -4
- data/spec/fixtures/releases/bosh-sample-release/packages/nginx/packaging +0 -23
- data/spec/fixtures/releases/bosh-sample-release/packages/nginx/spec +0 -6
- data/spec/fixtures/releases/bosh-sample-release/packages/php5/packaging +0 -24
- data/spec/fixtures/releases/bosh-sample-release/packages/php5/spec +0 -7
- data/spec/fixtures/releases/bosh-sample-release/packages/wordpress/packaging +0 -14
- data/spec/fixtures/releases/bosh-sample-release/packages/wordpress/spec +0 -5
- data/spec/fixtures/releases/s3test-boshrelease/.gitignore +0 -18
- data/spec/fixtures/releases/s3test-boshrelease/README.md +0 -51
- data/spec/fixtures/releases/s3test-boshrelease/Rakefile +0 -15
- data/spec/fixtures/releases/s3test-boshrelease/config/blobs.yml +0 -1
- data/spec/fixtures/releases/s3test-boshrelease/config/final.yml +0 -5
- data/spec/fixtures/releases/s3test-boshrelease/jobs/.gitkeep +0 -0
- data/spec/fixtures/releases/s3test-boshrelease/jobs/s3test/monit +0 -5
- data/spec/fixtures/releases/s3test-boshrelease/jobs/s3test/spec +0 -13
- data/spec/fixtures/releases/s3test-boshrelease/jobs/s3test/templates/bin/monit_debugger +0 -13
- data/spec/fixtures/releases/s3test-boshrelease/jobs/s3test/templates/bin/s3test_ctl +0 -36
- data/spec/fixtures/releases/s3test-boshrelease/jobs/s3test/templates/config/.gitkeep +0 -0
- data/spec/fixtures/releases/s3test-boshrelease/jobs/s3test/templates/config/s3test.conf.erb +0 -5
- data/spec/fixtures/releases/s3test-boshrelease/jobs/s3test/templates/data/properties.sh.erb +0 -10
- data/spec/fixtures/releases/s3test-boshrelease/jobs/s3test/templates/helpers/ctl_setup.sh +0 -81
- data/spec/fixtures/releases/s3test-boshrelease/jobs/s3test/templates/helpers/ctl_utils.sh +0 -156
- data/spec/fixtures/releases/s3test-boshrelease/packages/.gitkeep +0 -0
- data/spec/fixtures/releases/s3test-boshrelease/src/.gitkeep +0 -0
- data/spec/fixtures/releases/s3test-boshrelease/templates/deployment.yml +0 -35
- data/spec/fixtures/releases/s3test-boshrelease/templates/infrastructure-aws-ec2.yml +0 -40
- data/spec/fixtures/releases/s3test-boshrelease/templates/infrastructure-warden.yml +0 -107
- data/spec/fixtures/releases/s3test-boshrelease/templates/jobs.yml +0 -34
- data/spec/fixtures/releases/s3test-boshrelease/templates/make_manifest +0 -54
- data/spec/fixtures/releases/s3test-boshrelease/templates/stub.yml +0 -13
- data/spec/fixtures/releases/some_dev_releases/config/dev.yml +0 -3
- data/spec/fixtures/releases/some_dev_releases/dev_releases/index.yml +0 -6
- data/spec/fixtures/releases/some_dev_releases/dev_releases/myrelease-1.yml +0 -11
- data/spec/fixtures/releases/some_dev_releases/dev_releases/myrelease-10.yml +0 -13
- data/spec/fixtures/releases/some_dev_releases/dev_releases/myrelease-2.yml +0 -13
- data/spec/generators/job_generator_spec.rb +0 -56
- data/spec/generators/new_release_generator_spec.rb +0 -93
- data/spec/models/bosh_config_spec.rb +0 -11
- data/spec/models/deployment_manifest_spec.rb +0 -40
- data/spec/models/release_detection_spec.rb +0 -23
- data/spec/spec_helper.rb +0 -30
- data/spec/support/generator_spec_helper.rb +0 -155
File without changes
|
@@ -1,5 +0,0 @@
|
|
1
|
-
# Example of how to do one thing when job is master/leader, and another thing if its follower/slave
|
2
|
-
# See templates/infrastructure-warden.yml & templates/jobs.yml for where this value originates
|
3
|
-
<% if_p("s3test.leader_address") do |leader_address| %>
|
4
|
-
leader: <%= leader_address %>
|
5
|
-
<% end %>
|
@@ -1,10 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
|
3
|
-
# job template binding variables
|
4
|
-
|
5
|
-
# job name & index of this VM within cluster
|
6
|
-
# e.g. JOB_NAME=redis, JOB_INDEX=0
|
7
|
-
export NAME='<%= name %>'
|
8
|
-
export JOB_INDEX=<%= index %>
|
9
|
-
# full job name, like redis/0 or webapp/3
|
10
|
-
export JOB_FULL="$NAME/$JOB_INDEX"
|
@@ -1,81 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
|
3
|
-
# Setup env vars and folders for the ctl script
|
4
|
-
# This helps keep the ctl script as readable
|
5
|
-
# as possible
|
6
|
-
|
7
|
-
# Usage options:
|
8
|
-
# source /var/vcap/jobs/foobar/helpers/ctl_setup.sh JOB_NAME OUTPUT_LABEL
|
9
|
-
# source /var/vcap/jobs/foobar/helpers/ctl_setup.sh foobar
|
10
|
-
# source /var/vcap/jobs/foobar/helpers/ctl_setup.sh foobar foobar
|
11
|
-
# source /var/vcap/jobs/foobar/helpers/ctl_setup.sh foobar nginx
|
12
|
-
|
13
|
-
set -e # exit immediately if a simple command exits with a non-zero status
|
14
|
-
set -u # report the usage of uninitialized variables
|
15
|
-
|
16
|
-
JOB_NAME=$1
|
17
|
-
output_label=${1:-JOB_NAME}
|
18
|
-
|
19
|
-
export JOB_DIR=/var/vcap/jobs/$JOB_NAME
|
20
|
-
chmod 755 $JOB_DIR # to access file via symlink
|
21
|
-
|
22
|
-
# Load some bosh deployment properties into env vars
|
23
|
-
# Try to put all ERb into data/properties.sh.erb
|
24
|
-
# incl $NAME, $JOB_INDEX, $WEBAPP_DIR
|
25
|
-
source $JOB_DIR/data/properties.sh
|
26
|
-
|
27
|
-
source $JOB_DIR/helpers/ctl_utils.sh
|
28
|
-
redirect_output ${output_label}
|
29
|
-
|
30
|
-
export HOME=${HOME:-/home/vcap}
|
31
|
-
|
32
|
-
# Add all packages' /bin & /sbin into $PATH
|
33
|
-
for package_bin_dir in $(ls -d /var/vcap/packages/*/*bin)
|
34
|
-
do
|
35
|
-
export PATH=${package_bin_dir}:$PATH
|
36
|
-
done
|
37
|
-
|
38
|
-
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:-''} # default to empty
|
39
|
-
for package_bin_dir in $(ls -d /var/vcap/packages/*/lib)
|
40
|
-
do
|
41
|
-
export LD_LIBRARY_PATH=${package_bin_dir}:$LD_LIBRARY_PATH
|
42
|
-
done
|
43
|
-
|
44
|
-
# Setup log, run and tmp folders
|
45
|
-
|
46
|
-
export RUN_DIR=/var/vcap/sys/run/$JOB_NAME
|
47
|
-
export LOG_DIR=/var/vcap/sys/log/$JOB_NAME
|
48
|
-
export TMP_DIR=/var/vcap/sys/tmp/$JOB_NAME
|
49
|
-
export STORE_DIR=/var/vcap/store/$JOB_NAME
|
50
|
-
for dir in $RUN_DIR $LOG_DIR $TMP_DIR $STORE_DIR
|
51
|
-
do
|
52
|
-
mkdir -p ${dir}
|
53
|
-
chown vcap:vcap ${dir}
|
54
|
-
chmod 775 ${dir}
|
55
|
-
done
|
56
|
-
export TMPDIR=$TMP_DIR
|
57
|
-
|
58
|
-
export C_INCLUDE_PATH=/var/vcap/packages/mysqlclient/include/mysql:/var/vcap/packages/sqlite/include:/var/vcap/packages/libpq/include
|
59
|
-
export LIBRARY_PATH=/var/vcap/packages/mysqlclient/lib/mysql:/var/vcap/packages/sqlite/lib:/var/vcap/packages/libpq/lib
|
60
|
-
|
61
|
-
# consistent place for vendoring python libraries within package
|
62
|
-
if [[ -d ${WEBAPP_DIR:-/xxxx} ]]
|
63
|
-
then
|
64
|
-
export PYTHONPATH=$WEBAPP_DIR/vendor/lib/python
|
65
|
-
fi
|
66
|
-
|
67
|
-
if [[ -d /var/vcap/packages/java7 ]]
|
68
|
-
then
|
69
|
-
export JAVA_HOME="/var/vcap/packages/java7"
|
70
|
-
fi
|
71
|
-
|
72
|
-
# setup CLASSPATH for all jars/ folders within packages
|
73
|
-
export CLASSPATH=${CLASSPATH:-''} # default to empty
|
74
|
-
for java_jar in $(ls -d /var/vcap/packages/*/*/*.jar)
|
75
|
-
do
|
76
|
-
export CLASSPATH=${java_jar}:$CLASSPATH
|
77
|
-
done
|
78
|
-
|
79
|
-
PIDFILE=$RUN_DIR/$JOB_NAME.pid
|
80
|
-
|
81
|
-
echo '$PATH' $PATH
|
@@ -1,156 +0,0 @@
|
|
1
|
-
# Helper functions used by ctl scripts
|
2
|
-
|
3
|
-
# links a job file (probably a config file) into a package
|
4
|
-
# Example usage:
|
5
|
-
# link_job_file_to_package config/redis.yml [config/redis.yml]
|
6
|
-
# link_job_file_to_package config/wp-config.php wp-config.php
|
7
|
-
link_job_file_to_package() {
|
8
|
-
source_job_file=$1
|
9
|
-
target_package_file=${2:-$source_job_file}
|
10
|
-
full_package_file=$WEBAPP_DIR/${target_package_file}
|
11
|
-
|
12
|
-
link_job_file ${source_job_file} ${full_package_file}
|
13
|
-
}
|
14
|
-
|
15
|
-
# links a job file (probably a config file) somewhere
|
16
|
-
# Example usage:
|
17
|
-
# link_job_file config/bashrc /home/vcap/.bashrc
|
18
|
-
link_job_file() {
|
19
|
-
source_job_file=$1
|
20
|
-
target_file=$2
|
21
|
-
full_job_file=$JOB_DIR/${source_job_file}
|
22
|
-
|
23
|
-
echo link_job_file ${full_job_file} ${target_file}
|
24
|
-
if [[ ! -f ${full_job_file} ]]
|
25
|
-
then
|
26
|
-
echo "file to link ${full_job_file} does not exist"
|
27
|
-
else
|
28
|
-
# Create/recreate the symlink to current job file
|
29
|
-
# If another process is using the file, it won't be
|
30
|
-
# deleted, so don't attempt to create the symlink
|
31
|
-
mkdir -p $(dirname ${target_file})
|
32
|
-
ln -nfs ${full_job_file} ${target_file}
|
33
|
-
fi
|
34
|
-
}
|
35
|
-
|
36
|
-
# If loaded within monit ctl scripts then pipe output
|
37
|
-
# If loaded from 'source ../utils.sh' then normal STDOUT
|
38
|
-
redirect_output() {
|
39
|
-
SCRIPT=$1
|
40
|
-
mkdir -p /var/vcap/sys/log/monit
|
41
|
-
exec 1>> /var/vcap/sys/log/monit/$SCRIPT.log
|
42
|
-
exec 2>> /var/vcap/sys/log/monit/$SCRIPT.err.log
|
43
|
-
}
|
44
|
-
|
45
|
-
pid_guard() {
|
46
|
-
pidfile=$1
|
47
|
-
name=$2
|
48
|
-
|
49
|
-
if [ -f "$pidfile" ]; then
|
50
|
-
pid=$(head -1 "$pidfile")
|
51
|
-
|
52
|
-
if [ -n "$pid" ] && [ -e /proc/$pid ]; then
|
53
|
-
echo "$name is already running, please stop it first"
|
54
|
-
exit 1
|
55
|
-
fi
|
56
|
-
|
57
|
-
echo "Removing stale pidfile..."
|
58
|
-
rm $pidfile
|
59
|
-
fi
|
60
|
-
}
|
61
|
-
|
62
|
-
wait_pid() {
|
63
|
-
pid=$1
|
64
|
-
try_kill=$2
|
65
|
-
timeout=${3:-0}
|
66
|
-
force=${4:-0}
|
67
|
-
countdown=$(( $timeout * 10 ))
|
68
|
-
|
69
|
-
echo wait_pid $pid $try_kill $timeout $force $countdown
|
70
|
-
if [ -e /proc/$pid ]; then
|
71
|
-
if [ "$try_kill" = "1" ]; then
|
72
|
-
echo "Killing $pidfile: $pid "
|
73
|
-
kill $pid
|
74
|
-
fi
|
75
|
-
while [ -e /proc/$pid ]; do
|
76
|
-
sleep 0.1
|
77
|
-
[ "$countdown" != '0' -a $(( $countdown % 10 )) = '0' ] && echo -n .
|
78
|
-
if [ $timeout -gt 0 ]; then
|
79
|
-
if [ $countdown -eq 0 ]; then
|
80
|
-
if [ "$force" = "1" ]; then
|
81
|
-
echo -ne "\nKill timed out, using kill -9 on $pid... "
|
82
|
-
kill -9 $pid
|
83
|
-
sleep 0.5
|
84
|
-
fi
|
85
|
-
break
|
86
|
-
else
|
87
|
-
countdown=$(( $countdown - 1 ))
|
88
|
-
fi
|
89
|
-
fi
|
90
|
-
done
|
91
|
-
if [ -e /proc/$pid ]; then
|
92
|
-
echo "Timed Out"
|
93
|
-
else
|
94
|
-
echo "Stopped"
|
95
|
-
fi
|
96
|
-
else
|
97
|
-
echo "Process $pid is not running"
|
98
|
-
echo "Attempting to kill pid anyway..."
|
99
|
-
kill $pid
|
100
|
-
fi
|
101
|
-
}
|
102
|
-
|
103
|
-
wait_pidfile() {
|
104
|
-
pidfile=$1
|
105
|
-
try_kill=$2
|
106
|
-
timeout=${3:-0}
|
107
|
-
force=${4:-0}
|
108
|
-
countdown=$(( $timeout * 10 ))
|
109
|
-
|
110
|
-
if [ -f "$pidfile" ]; then
|
111
|
-
pid=$(head -1 "$pidfile")
|
112
|
-
if [ -z "$pid" ]; then
|
113
|
-
echo "Unable to get pid from $pidfile"
|
114
|
-
exit 1
|
115
|
-
fi
|
116
|
-
|
117
|
-
wait_pid $pid $try_kill $timeout $force
|
118
|
-
|
119
|
-
rm -f $pidfile
|
120
|
-
else
|
121
|
-
echo "Pidfile $pidfile doesn't exist"
|
122
|
-
fi
|
123
|
-
}
|
124
|
-
|
125
|
-
kill_and_wait() {
|
126
|
-
pidfile=$1
|
127
|
-
# Monit default timeout for start/stop is 30s
|
128
|
-
# Append 'with timeout {n} seconds' to monit start/stop program configs
|
129
|
-
timeout=${2:-25}
|
130
|
-
force=${3:-1}
|
131
|
-
if [[ -f ${pidfile} ]]
|
132
|
-
then
|
133
|
-
wait_pidfile $pidfile 1 $timeout $force
|
134
|
-
else
|
135
|
-
# TODO assume $1 is something to grep from 'ps ax'
|
136
|
-
pid="$(ps auwwx | grep "$1" | awk '{print $2}')"
|
137
|
-
wait_pid $pid 1 $timeout $force
|
138
|
-
fi
|
139
|
-
}
|
140
|
-
|
141
|
-
check_nfs_mount() {
|
142
|
-
opts=$1
|
143
|
-
exports=$2
|
144
|
-
mount_point=$3
|
145
|
-
|
146
|
-
if grep -qs $mount_point /proc/mounts; then
|
147
|
-
echo "Found NFS mount $mount_point"
|
148
|
-
else
|
149
|
-
echo "Mounting NFS..."
|
150
|
-
mount $opts $exports $mount_point
|
151
|
-
if [ $? != 0 ]; then
|
152
|
-
echo "Cannot mount NFS from $exports to $mount_point, exiting..."
|
153
|
-
exit 1
|
154
|
-
fi
|
155
|
-
fi
|
156
|
-
}
|
File without changes
|
File without changes
|
@@ -1,35 +0,0 @@
|
|
1
|
-
meta:
|
2
|
-
environment: (( merge ))
|
3
|
-
stemcell: (( merge ))
|
4
|
-
|
5
|
-
name: (( meta.environment ))
|
6
|
-
|
7
|
-
director_uuid: (( merge ))
|
8
|
-
|
9
|
-
releases: (( merge ))
|
10
|
-
|
11
|
-
networks: (( merge ))
|
12
|
-
|
13
|
-
jobs: (( merge ))
|
14
|
-
|
15
|
-
properties: (( merge ))
|
16
|
-
|
17
|
-
compilation:
|
18
|
-
workers: 6
|
19
|
-
network: s3test1
|
20
|
-
reuse_compilation_vms: true
|
21
|
-
cloud_properties: (( merge ))
|
22
|
-
|
23
|
-
update:
|
24
|
-
canaries: 1
|
25
|
-
max_in_flight: 1
|
26
|
-
canary_watch_time: 30000-60000
|
27
|
-
update_watch_time: 5000-60000
|
28
|
-
serial: false
|
29
|
-
|
30
|
-
resource_pools:
|
31
|
-
- name: small_z1
|
32
|
-
network: s3test1
|
33
|
-
size: (( auto ))
|
34
|
-
stemcell: (( meta.stemcell ))
|
35
|
-
cloud_properties: (( merge ))
|
@@ -1,40 +0,0 @@
|
|
1
|
-
meta:
|
2
|
-
environment: (( merge ))
|
3
|
-
dns_root: (( merge ))
|
4
|
-
security_groups: (( merge ))
|
5
|
-
network_name: (( merge ))
|
6
|
-
|
7
|
-
stemcell:
|
8
|
-
name: bosh-aws-xen-hvm-ubuntu-trusty-go_agent
|
9
|
-
version: latest
|
10
|
-
|
11
|
-
jobs:
|
12
|
-
- name: s3test_leader_z1
|
13
|
-
instances: 1
|
14
|
-
networks:
|
15
|
-
- name: (( meta.network_name ))
|
16
|
-
- name: s3test_z1
|
17
|
-
instances: 2
|
18
|
-
networks:
|
19
|
-
- name: (( meta.network_name ))
|
20
|
-
properties:
|
21
|
-
s3test:
|
22
|
-
leader_address: (( "0.s3test-leader-z1.s3test1." meta.environment "." meta.dns_root ))
|
23
|
-
|
24
|
-
compilation:
|
25
|
-
cloud_properties:
|
26
|
-
instance_type: m3.medium
|
27
|
-
|
28
|
-
resource_pools:
|
29
|
-
- name: small_z1
|
30
|
-
cloud_properties:
|
31
|
-
instance_type: m3.medium
|
32
|
-
|
33
|
-
networks:
|
34
|
-
- name: floating
|
35
|
-
type: vip
|
36
|
-
cloud_properties: {}
|
37
|
-
- name: (( meta.network_name ))
|
38
|
-
type: dynamic
|
39
|
-
cloud_properties:
|
40
|
-
security_groups: (( meta.security_groups ))
|
@@ -1,107 +0,0 @@
|
|
1
|
-
meta:
|
2
|
-
environment: s3test-warden
|
3
|
-
network_name: (( merge ))
|
4
|
-
|
5
|
-
stemcell:
|
6
|
-
name: bosh-warden-boshlite-ubuntu-trusty-go_agent
|
7
|
-
version: latest
|
8
|
-
|
9
|
-
update:
|
10
|
-
canaries: 1
|
11
|
-
max_in_flight: 50
|
12
|
-
canary_watch_time: 1000-30000
|
13
|
-
update_watch_time: 1000-30000
|
14
|
-
|
15
|
-
jobs:
|
16
|
-
- name: s3test_leader_z1
|
17
|
-
instances: 1
|
18
|
-
networks:
|
19
|
-
- name: (( meta.network_name ))
|
20
|
-
static_ips: (( static_ips(0) ))
|
21
|
-
- name: s3test_z1
|
22
|
-
instances: 2
|
23
|
-
networks:
|
24
|
-
- name: (( meta.network_name ))
|
25
|
-
static_ips: ~
|
26
|
-
properties:
|
27
|
-
s3test:
|
28
|
-
leader_address: (( jobs.s3test_leader_z1.networks.s3test1.static_ips.[0] ))
|
29
|
-
|
30
|
-
compilation:
|
31
|
-
cloud_properties:
|
32
|
-
name: random
|
33
|
-
|
34
|
-
resource_pools:
|
35
|
-
- name: small_z1
|
36
|
-
cloud_properties:
|
37
|
-
name: random
|
38
|
-
|
39
|
-
networks:
|
40
|
-
- name: (( meta.network_name ))
|
41
|
-
# Assumes up to 5 VMs, including 1 static and 4 dynamic.
|
42
|
-
# Plus 5 (double the size) unused IPs, due to BOSH bug/quirk.
|
43
|
-
subnets:
|
44
|
-
- cloud_properties:
|
45
|
-
name: random
|
46
|
-
range: 10.244.2.0/30
|
47
|
-
reserved:
|
48
|
-
- 10.244.2.1
|
49
|
-
static:
|
50
|
-
- 10.244.2.2
|
51
|
-
|
52
|
-
- cloud_properties:
|
53
|
-
name: random
|
54
|
-
range: 10.244.2.4/30
|
55
|
-
reserved:
|
56
|
-
- 10.244.2.5
|
57
|
-
static: []
|
58
|
-
- cloud_properties:
|
59
|
-
name: random
|
60
|
-
range: 10.244.2.8/30
|
61
|
-
reserved:
|
62
|
-
- 10.244.2.9
|
63
|
-
static: []
|
64
|
-
- cloud_properties:
|
65
|
-
name: random
|
66
|
-
range: 10.244.2.12/30
|
67
|
-
reserved:
|
68
|
-
- 10.244.2.13
|
69
|
-
static: []
|
70
|
-
- cloud_properties:
|
71
|
-
name: random
|
72
|
-
range: 10.244.2.16/30
|
73
|
-
reserved:
|
74
|
-
- 10.244.2.17
|
75
|
-
static: []
|
76
|
-
|
77
|
-
# Bonus double-sized network required due to BOSH oddity
|
78
|
-
- cloud_properties:
|
79
|
-
name: random
|
80
|
-
range: 10.244.2.20/30
|
81
|
-
reserved:
|
82
|
-
- 10.244.2.21
|
83
|
-
static: []
|
84
|
-
- cloud_properties:
|
85
|
-
name: random
|
86
|
-
range: 10.244.2.24/30
|
87
|
-
reserved:
|
88
|
-
- 10.244.2.25
|
89
|
-
static: []
|
90
|
-
- cloud_properties:
|
91
|
-
name: random
|
92
|
-
range: 10.244.2.28/30
|
93
|
-
reserved:
|
94
|
-
- 10.244.2.29
|
95
|
-
static: []
|
96
|
-
- cloud_properties:
|
97
|
-
name: random
|
98
|
-
range: 10.244.2.32/30
|
99
|
-
reserved:
|
100
|
-
- 10.244.2.33
|
101
|
-
static: []
|
102
|
-
- cloud_properties:
|
103
|
-
name: random
|
104
|
-
range: 10.244.2.36/30
|
105
|
-
reserved:
|
106
|
-
- 10.244.2.37
|
107
|
-
static: []
|