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
@@ -1,39 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
JOB=wordpress
|
4
|
-
RUN_DIR=/var/vcap/sys/run/apache2
|
5
|
-
LOG_DIR=/var/vcap/sys/log/apache2
|
6
|
-
PIDFILE=$RUN_DIR/httpd.pid
|
7
|
-
CONF_DIR=/var/vcap/jobs/$JOB/config
|
8
|
-
APACHECTL=/var/vcap/packages/apache2/bin/apachectl
|
9
|
-
APSTART=/var/vcap/sys/log/apache2/start.log
|
10
|
-
|
11
|
-
case $1 in
|
12
|
-
|
13
|
-
start)
|
14
|
-
mkdir -p $RUN_DIR
|
15
|
-
mkdir -p $LOG_DIR
|
16
|
-
|
17
|
-
# link libphp into apache
|
18
|
-
if [ ! -f /var/vcap/packages/apache2/modules/libphp5.so ]; then
|
19
|
-
ln -s /var/vcap/packages/php5/modules/libphp5.so \
|
20
|
-
/var/vcap/packages/apache2/modules/libphp5.so
|
21
|
-
fi
|
22
|
-
|
23
|
-
# link wordpress config file into wordpress package
|
24
|
-
if [ ! -f /var/vcap/packages/wordpress/wp-config.php ]; then
|
25
|
-
ln -s /var/vcap/jobs/wordpress/config/wp-config.php \
|
26
|
-
/var/vcap/packages/wordpress/wp-config.php
|
27
|
-
fi
|
28
|
-
|
29
|
-
$APACHECTL -f $CONF_DIR/httpd.conf -k start >> $APSTART 2>&1
|
30
|
-
;;
|
31
|
-
|
32
|
-
stop)
|
33
|
-
$APACHECTL -f $CONF_DIR/httpd.conf -k stop >> $APSTART 2>&1
|
34
|
-
;;
|
35
|
-
|
36
|
-
*)
|
37
|
-
echo "Usage: ${JOB}_ctl {start|stop}" ;;
|
38
|
-
esac
|
39
|
-
exit 0
|
@@ -1,90 +0,0 @@
|
|
1
|
-
<?php
|
2
|
-
/**
|
3
|
-
* The base configurations of the WordPress.
|
4
|
-
*
|
5
|
-
* This file has the following configurations: MySQL settings, Table Prefix,
|
6
|
-
* Secret Keys, WordPress Language, and ABSPATH. You can find more information
|
7
|
-
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
|
8
|
-
* wp-config.php} Codex page. You can get the MySQL settings from your web host.
|
9
|
-
*
|
10
|
-
* This file is used by the wp-config.php creation script during the
|
11
|
-
* installation. You don't have to use the web site, you can just copy this file
|
12
|
-
* to "wp-config.php" and fill in the values.
|
13
|
-
*
|
14
|
-
* @package WordPress
|
15
|
-
*/
|
16
|
-
|
17
|
-
// ** MySQL settings - You can get this info from your web host ** //
|
18
|
-
/** The name of the database for WordPress */
|
19
|
-
define('DB_NAME', '<%= properties.wordpress.db.name %>');
|
20
|
-
|
21
|
-
/** MySQL database username */
|
22
|
-
define('DB_USER', '<%= properties.wordpress.db.user %>');
|
23
|
-
|
24
|
-
/** MySQL database password */
|
25
|
-
define('DB_PASSWORD', '<%= properties.wordpress.db.pass %>');
|
26
|
-
|
27
|
-
/** MySQL hostname */
|
28
|
-
define('DB_HOST', '<%= properties.mysql.address %>');
|
29
|
-
|
30
|
-
/** Database Charset to use in creating database tables. */
|
31
|
-
define('DB_CHARSET', 'utf8');
|
32
|
-
|
33
|
-
/** The Database Collate type. Don't change this if in doubt. */
|
34
|
-
define('DB_COLLATE', '');
|
35
|
-
|
36
|
-
/**#@+
|
37
|
-
* Authentication Unique Keys and Salts.
|
38
|
-
*
|
39
|
-
* Change these to different unique phrases!
|
40
|
-
* You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
|
41
|
-
* You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
|
42
|
-
*
|
43
|
-
* @since 2.6.0
|
44
|
-
*/
|
45
|
-
define('AUTH_KEY', '<%= properties.wordpress.auth_key %>');
|
46
|
-
define('SECURE_AUTH_KEY', '<%= properties.wordpress.secure_auth_key %>');
|
47
|
-
define('LOGGED_IN_KEY', '<%= properties.wordpress.logged_in_key %>');
|
48
|
-
define('NONCE_KEY', '<%= properties.wordpress.nonce_key %>');
|
49
|
-
define('AUTH_SALT', '<%= properties.wordpress.auth_salt %>');
|
50
|
-
define('SECURE_AUTH_SALT', '<%= properties.wordpress.secure_auth_salt %>');
|
51
|
-
define('LOGGED_IN_SALT', '<%= properties.wordpress.logged_in_salt %>');
|
52
|
-
define('NONCE_SALT', '<%= properties.wordpress.nonce_salt %>');
|
53
|
-
|
54
|
-
/**#@-*/
|
55
|
-
|
56
|
-
/**
|
57
|
-
* WordPress Database Table prefix.
|
58
|
-
*
|
59
|
-
* You can have multiple installations in one database if you give each a unique
|
60
|
-
* prefix. Only numbers, letters, and underscores please!
|
61
|
-
*/
|
62
|
-
$table_prefix = 'wp_';
|
63
|
-
|
64
|
-
/**
|
65
|
-
* WordPress Localized Language, defaults to English.
|
66
|
-
*
|
67
|
-
* Change this to localize WordPress. A corresponding MO file for the chosen
|
68
|
-
* language must be installed to wp-content/languages. For example, install
|
69
|
-
* de_DE.mo to wp-content/languages and set WPLANG to 'de_DE' to enable German
|
70
|
-
* language support.
|
71
|
-
*/
|
72
|
-
define('WPLANG', '');
|
73
|
-
|
74
|
-
/**
|
75
|
-
* For developers: WordPress debugging mode.
|
76
|
-
*
|
77
|
-
* Change this to true to enable the display of notices during development.
|
78
|
-
* It is strongly recommended that plugin and theme developers use WP_DEBUG
|
79
|
-
* in their development environments.
|
80
|
-
*/
|
81
|
-
define('WP_DEBUG', false);
|
82
|
-
|
83
|
-
/* That's all, stop editing! Happy blogging. */
|
84
|
-
|
85
|
-
/** Absolute path to the WordPress directory. */
|
86
|
-
if ( !defined('ABSPATH') )
|
87
|
-
define('ABSPATH', dirname(__FILE__) . '/');
|
88
|
-
|
89
|
-
/** Sets up WordPress vars and included files. */
|
90
|
-
require_once(ABSPATH . 'wp-settings.php');
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# abort script on any command that exit with a non zero value
|
2
|
-
set -e
|
3
|
-
|
4
|
-
echo "Extracting apache https..."
|
5
|
-
tar xzf apache2/httpd-2.2.21.tar.gz
|
6
|
-
|
7
|
-
echo "Building apache https..."
|
8
|
-
(
|
9
|
-
cd httpd-2.2.21
|
10
|
-
./configure \
|
11
|
-
--prefix=${BOSH_INSTALL_TARGET} \
|
12
|
-
--enable-so
|
13
|
-
make
|
14
|
-
make install
|
15
|
-
)
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# abort script on any command that exit with a non zero value
|
2
|
-
set -e
|
3
|
-
|
4
|
-
# Percona binary Linux build
|
5
|
-
tar zxvf mysql/server-5.1.54-rel12.5-188-Linux-x86_64.tar.gz
|
6
|
-
(
|
7
|
-
cd server-5.1.54-rel12.5-188-Linux-x86_64
|
8
|
-
for x in bin include lib libexec share; do
|
9
|
-
cp -a ${x} ${BOSH_INSTALL_TARGET}
|
10
|
-
done
|
11
|
-
)
|
12
|
-
|
13
|
-
# a modified mysql.server script
|
14
|
-
cp -v mysql/mysql.server ${BOSH_INSTALL_TARGET}/libexec/mysql.server
|
@@ -1,12 +0,0 @@
|
|
1
|
-
# abort script on any command that exit with a non zero value
|
2
|
-
set -e
|
3
|
-
|
4
|
-
# Percona binary Linux build - minor change
|
5
|
-
# only extract the client side stuff
|
6
|
-
tar zxvf mysql/client-5.1.54-rel12.5-188-Linux-x86_64.tar.gz
|
7
|
-
(
|
8
|
-
cd client-5.1.54-rel12.5-188-Linux-x86_64
|
9
|
-
for x in bin include lib; do
|
10
|
-
cp -a ${x} ${BOSH_INSTALL_TARGET}
|
11
|
-
done
|
12
|
-
)
|
@@ -1,23 +0,0 @@
|
|
1
|
-
# abort script on any command that exit with a non zero value
|
2
|
-
set -e
|
3
|
-
|
4
|
-
echo "Extracting pcre..."
|
5
|
-
tar xzf nginx/pcre-8.21.tar.gz
|
6
|
-
|
7
|
-
echo "Extracting headers-more module..."
|
8
|
-
tar xzf nginx/headers-more-v0.15rc1.tgz
|
9
|
-
|
10
|
-
echo "Extracting nginx..."
|
11
|
-
tar xzf nginx/nginx-1.0.11.tar.gz
|
12
|
-
|
13
|
-
echo "Building nginx..."
|
14
|
-
(
|
15
|
-
cd nginx-1.0.11
|
16
|
-
./configure \
|
17
|
-
--prefix=${BOSH_INSTALL_TARGET} \
|
18
|
-
--with-pcre=../pcre-8.21 \
|
19
|
-
--with-http_ssl_module \
|
20
|
-
--add-module=../headers-more-v0.15rc1
|
21
|
-
make
|
22
|
-
make install
|
23
|
-
)
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# abort script on any command that exit with a non zero value
|
2
|
-
set -e
|
3
|
-
|
4
|
-
echo "Extracting php5..."
|
5
|
-
tar xzf php5/php-5.3.10.tar.gz
|
6
|
-
|
7
|
-
export APACHE2=/var/vcap/packages/apache2
|
8
|
-
|
9
|
-
echo "Building php5..."
|
10
|
-
cd php-5.3.10
|
11
|
-
./configure \
|
12
|
-
--prefix=${BOSH_INSTALL_TARGET} \
|
13
|
-
--with-apxs2=${APACHE2}/bin/apxs \
|
14
|
-
--with-config-file-path=/var/vcap/jobs/wordpress/config/php.ini \
|
15
|
-
--with-mysql=/var/vcap/packages/mysqlclient
|
16
|
-
|
17
|
-
# redirecting stdout to /dev/null as the output becomes too large for nats
|
18
|
-
make > /dev/null
|
19
|
-
make install > /dev/null
|
20
|
-
|
21
|
-
# php installs the shared object in the apache module dir, so we need to
|
22
|
-
# copy it back to the php package dir
|
23
|
-
mkdir -p ${BOSH_INSTALL_TARGET}/modules
|
24
|
-
cp ${APACHE2}/modules/libphp5.so ${BOSH_INSTALL_TARGET}/modules
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# abort script on any command that exit with a non zero value
|
2
|
-
set -e
|
3
|
-
|
4
|
-
echo "Extracting wordpress..."
|
5
|
-
tar xzf wordpress/wordpress-3.3.1.tgz
|
6
|
-
|
7
|
-
cd wordpress
|
8
|
-
cp -a . ${BOSH_INSTALL_TARGET}
|
9
|
-
|
10
|
-
# remove sample as we populate it with a real config from the job
|
11
|
-
rm ${BOSH_INSTALL_TARGET}/wp-config-sample.php
|
12
|
-
|
13
|
-
# clean up tar ball
|
14
|
-
rm ${BOSH_INSTALL_TARGET}/wordpress-3.3.1.tgz
|
@@ -1,51 +0,0 @@
|
|
1
|
-
# BOSH Release for s3test
|
2
|
-
|
3
|
-
## Usage
|
4
|
-
|
5
|
-
To use this bosh release, first upload it to your bosh:
|
6
|
-
|
7
|
-
```
|
8
|
-
bosh target BOSH_HOST
|
9
|
-
git clone https://github.com/cloudfoundry-community/s3test-boshrelease.git
|
10
|
-
cd s3test-boshrelease
|
11
|
-
bosh upload release releases/s3test-1.yml
|
12
|
-
```
|
13
|
-
|
14
|
-
For [bosh-lite](https://github.com/cloudfoundry/bosh-lite), you can quickly create a deployment manifest & deploy a cluster:
|
15
|
-
|
16
|
-
```
|
17
|
-
templates/make_manifest warden
|
18
|
-
bosh -n deploy
|
19
|
-
```
|
20
|
-
|
21
|
-
For AWS EC2, create a single VM:
|
22
|
-
|
23
|
-
```
|
24
|
-
templates/make_manifest aws-ec2
|
25
|
-
bosh -n deploy
|
26
|
-
```
|
27
|
-
|
28
|
-
### Override security groups
|
29
|
-
|
30
|
-
For AWS & Openstack, the default deployment assumes there is a `default` security group. If you wish to use a different security group(s) then you can pass in additional configuration when running `make_manifest` above.
|
31
|
-
|
32
|
-
Create a file `my-networking.yml`:
|
33
|
-
|
34
|
-
``` yaml
|
35
|
-
---
|
36
|
-
networks:
|
37
|
-
- name: s3test1
|
38
|
-
type: dynamic
|
39
|
-
cloud_properties:
|
40
|
-
security_groups:
|
41
|
-
- s3test
|
42
|
-
```
|
43
|
-
|
44
|
-
Where `- s3test` means you wish to use an existing security group called `s3test`.
|
45
|
-
|
46
|
-
You now suffix this file path to the `make_manifest` command:
|
47
|
-
|
48
|
-
```
|
49
|
-
templates/make_manifest openstack-nova my-networking.yml
|
50
|
-
bosh -n deploy
|
51
|
-
```
|
@@ -1,15 +0,0 @@
|
|
1
|
-
desc "Generates a properties file for each job based on properties.X.Y used in templates"
|
2
|
-
task :job_properties do
|
3
|
-
require "fileutils"
|
4
|
-
Dir["jobs/*"].each do |path|
|
5
|
-
puts "Searching job #{File.basename(path)}..."
|
6
|
-
FileUtils.chdir(path) do
|
7
|
-
properties = []
|
8
|
-
Dir["templates/*.erb"].each do |template_path|
|
9
|
-
properties |= File.read(template_path).scan(/\bproperties\.[\w\.]*\b/)
|
10
|
-
puts properties.join("\n")
|
11
|
-
File.open("properties", "w") { |file| file << properties.join("\n") }
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
--- {}
|
File without changes
|
@@ -1,5 +0,0 @@
|
|
1
|
-
check process s3test
|
2
|
-
with pidfile /var/vcap/sys/run/s3test/s3test.pid
|
3
|
-
start program "/var/vcap/jobs/s3test/bin/monit_debugger s3test_ctl '/var/vcap/jobs/s3test/bin/s3test_ctl start'"
|
4
|
-
stop program "/var/vcap/jobs/s3test/bin/monit_debugger s3test_ctl '/var/vcap/jobs/s3test/bin/s3test_ctl stop'"
|
5
|
-
group vcap
|
@@ -1,13 +0,0 @@
|
|
1
|
-
---
|
2
|
-
name: s3test
|
3
|
-
packages: []
|
4
|
-
templates:
|
5
|
-
bin/monit_debugger: bin/monit_debugger
|
6
|
-
bin/s3test_ctl: bin/s3test_ctl
|
7
|
-
config/s3test.conf.erb: config/s3test.conf
|
8
|
-
data/properties.sh.erb: data/properties.sh
|
9
|
-
helpers/ctl_setup.sh: helpers/ctl_setup.sh
|
10
|
-
helpers/ctl_utils.sh: helpers/ctl_utils.sh
|
11
|
-
properties:
|
12
|
-
s3test.leader_address:
|
13
|
-
description: Hostname/IP to the leader/master of the cluster
|
@@ -1,13 +0,0 @@
|
|
1
|
-
#!/bin/sh
|
2
|
-
# USAGE monit_debugger <label> command to run
|
3
|
-
mkdir -p /var/vcap/sys/log/monit
|
4
|
-
{
|
5
|
-
echo "MONIT-DEBUG date"
|
6
|
-
date
|
7
|
-
echo "MONIT-DEBUG env"
|
8
|
-
env
|
9
|
-
echo "MONIT-DEBUG $@"
|
10
|
-
$2 $3 $4 $5 $6 $7
|
11
|
-
R=$?
|
12
|
-
echo "MONIT-DEBUG exit code $R"
|
13
|
-
} >/var/vcap/sys/log/monit/monit_debugger.$1.log 2>&1
|
@@ -1,36 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
set -e # exit immediately if a simple command exits with a non-zero status
|
4
|
-
set -u # report the usage of uninitialized variables
|
5
|
-
|
6
|
-
# Setup env vars and folders for the webapp_ctl script
|
7
|
-
source /var/vcap/jobs/s3test/helpers/ctl_setup.sh 's3test'
|
8
|
-
|
9
|
-
export PORT=${PORT:-5000}
|
10
|
-
export LANG=en_US.UTF-8
|
11
|
-
|
12
|
-
case $1 in
|
13
|
-
|
14
|
-
start)
|
15
|
-
pid_guard $PIDFILE $JOB_NAME
|
16
|
-
|
17
|
-
# TODO: Run some process
|
18
|
-
exec chpst -u vcap:vcap TODO \
|
19
|
-
>>$LOG_DIR/$JOB_NAME.stdout.log \
|
20
|
-
2>>$LOG_DIR/$JOB_NAME.stderr.log
|
21
|
-
|
22
|
-
# store pid in $PIDFILE
|
23
|
-
echo $! > $PIDFILE
|
24
|
-
;;
|
25
|
-
|
26
|
-
stop)
|
27
|
-
kill_and_wait $PIDFILE
|
28
|
-
|
29
|
-
;;
|
30
|
-
*)
|
31
|
-
echo "Usage: s3test_ctl {start|stop}"
|
32
|
-
|
33
|
-
;;
|
34
|
-
|
35
|
-
esac
|
36
|
-
exit 0
|