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.
Files changed (124) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -362
  3. data/bosh-gen.gemspec +2 -1
  4. data/lib/bosh/gen/cli.rb +0 -8
  5. data/lib/bosh/gen/generators/errand_generator/templates/jobs/%job_name%/templates/bin/run.tt +2 -1
  6. data/lib/bosh/gen/generators/job_generator.rb +0 -5
  7. data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_simple/monit.tt +2 -2
  8. data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_simple/spec.tt +24 -0
  9. data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_simple/templates/bin/ctl.tt +1 -1
  10. data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_simple/templates/helpers/ctl_setup.sh +0 -26
  11. data/lib/bosh/gen/generators/new_release_generator.rb +7 -8
  12. data/lib/bosh/gen/generators/new_release_generator/templates/README.md.tt +13 -63
  13. data/lib/bosh/gen/generators/new_release_generator/templates/jobs/{just_install_packages → %project_name%}/monit.tt +0 -0
  14. data/lib/bosh/gen/generators/new_release_generator/templates/jobs/{just_install_packages → %project_name%}/spec.tt +1 -1
  15. data/lib/bosh/gen/generators/new_release_generator/templates/jobs/{just_install_packages → %project_name%}/templates/ignoreme +0 -0
  16. data/lib/bosh/gen/generators/new_release_generator/templates/manifests/%project_name%.yml.tt +38 -0
  17. data/lib/bosh/gen/generators/new_release_generator/templates/manifests/operators/dev.yml.tt +6 -0
  18. data/lib/bosh/gen/version.rb +1 -1
  19. metadata +28 -191
  20. data/.travis.yml +0 -13
  21. data/lib/bosh/cli/commands/share_release.rb +0 -80
  22. data/lib/bosh/gen/generators/bosh_cli_plugin_generator.rb +0 -33
  23. data/lib/bosh/gen/generators/bosh_cli_plugin_generator/templates/lib/bosh/cli/commands/%underscore_plugin_name%.rb.tt +0 -9
  24. data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/monit.tt +0 -13
  25. data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/bin/%job_name%_rack_ctl.tt +0 -59
  26. data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/bin/ctl_db_utils.sh.erb +0 -54
  27. data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/bin/ctl_nginx.sh.erb +0 -17
  28. data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/bin/ctl_redis_utils.sh.erb +0 -18
  29. data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/bin/ctl_setup.sh.erb +0 -48
  30. data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/bin/ctl_start.sh.erb +0 -57
  31. data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/bin/ctl_utils.sh +0 -147
  32. data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/bin/monit_debugger +0 -13
  33. data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/bin/nginx_ctl.tt +0 -40
  34. data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/bin/rails_ctl_setup.sh.erb +0 -39
  35. data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/config/database.yml.erb +0 -17
  36. data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/config/mime.types +0 -73
  37. data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/config/nginx.conf.erb +0 -150
  38. data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/config/nginx_proxy.conf +0 -11
  39. data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_nginx_rack/templates/config/redis.yml.erb +0 -6
  40. data/lib/bosh/gen/generators/job_generator/templates/jobs/%job_name%_simple/templates/data/properties.sh.erb +0 -10
  41. data/lib/bosh/gen/generators/new_release_generator/templates/templates/deployment.yml.tt +0 -31
  42. data/lib/bosh/gen/generators/new_release_generator/templates/templates/infrastructure-aws-ec2.yml.tt +0 -33
  43. data/lib/bosh/gen/generators/new_release_generator/templates/templates/infrastructure-warden.yml.tt +0 -37
  44. data/lib/bosh/gen/generators/new_release_generator/templates/templates/jobs.yml.tt +0 -21
  45. data/lib/bosh/gen/generators/new_release_generator/templates/templates/make_manifest.tt +0 -83
  46. data/lib/bosh/gen/generators/new_release_generator/templates/templates/stub.yml.tt +0 -14
  47. data/lib/bosh/gen/models.rb +0 -9
  48. data/lib/bosh/gen/models/bosh_config.rb +0 -15
  49. data/lib/bosh/gen/models/deployment_manifest.rb +0 -107
  50. data/lib/bosh/gen/models/release_detection.rb +0 -35
  51. data/lib/bosh/gen/utils/file_with_progress_bar.rb +0 -62
  52. data/spec/fixtures/bosh_config/multiple_boshes.yml +0 -34
  53. data/spec/fixtures/deployment_manifests/2_jobs_1_ip_8196_disk.yml +0 -67
  54. data/spec/fixtures/deployment_manifests/2_jobs_1_ip_8196_disk_with_numeric.yml +0 -67
  55. data/spec/fixtures/deployment_manifests/2_jobs_2_ips_no_disk.yml +0 -67
  56. data/spec/fixtures/releases/bosh-sample-release/.gitignore +0 -9
  57. data/spec/fixtures/releases/bosh-sample-release/LICENSE +0 -8094
  58. data/spec/fixtures/releases/bosh-sample-release/NOTICE +0 -12
  59. data/spec/fixtures/releases/bosh-sample-release/README +0 -53
  60. data/spec/fixtures/releases/bosh-sample-release/config/final.yml +0 -9
  61. data/spec/fixtures/releases/bosh-sample-release/jobs/mysql/monit +0 -5
  62. data/spec/fixtures/releases/bosh-sample-release/jobs/mysql/spec +0 -17
  63. data/spec/fixtures/releases/bosh-sample-release/jobs/mysql/templates/my.bootstrap.erb +0 -6
  64. data/spec/fixtures/releases/bosh-sample-release/jobs/mysql/templates/my.cnf.erb +0 -46
  65. data/spec/fixtures/releases/bosh-sample-release/jobs/mysql/templates/my.shutdown.erb +0 -5
  66. data/spec/fixtures/releases/bosh-sample-release/jobs/mysql/templates/mysql_ctl.erb +0 -56
  67. data/spec/fixtures/releases/bosh-sample-release/jobs/nginx/monit +0 -5
  68. data/spec/fixtures/releases/bosh-sample-release/jobs/nginx/spec +0 -10
  69. data/spec/fixtures/releases/bosh-sample-release/jobs/nginx/templates/mime.types +0 -73
  70. data/spec/fixtures/releases/bosh-sample-release/jobs/nginx/templates/nginx.conf.erb +0 -65
  71. data/spec/fixtures/releases/bosh-sample-release/jobs/nginx/templates/nginx_ctl +0 -28
  72. data/spec/fixtures/releases/bosh-sample-release/jobs/wordpress/monit +0 -5
  73. data/spec/fixtures/releases/bosh-sample-release/jobs/wordpress/spec +0 -12
  74. data/spec/fixtures/releases/bosh-sample-release/jobs/wordpress/templates/httpd.conf.erb +0 -422
  75. data/spec/fixtures/releases/bosh-sample-release/jobs/wordpress/templates/php.ini.erb +0 -1918
  76. data/spec/fixtures/releases/bosh-sample-release/jobs/wordpress/templates/wordpress_ctl +0 -39
  77. data/spec/fixtures/releases/bosh-sample-release/jobs/wordpress/templates/wp-config.php.erb +0 -90
  78. data/spec/fixtures/releases/bosh-sample-release/packages/apache2/packaging +0 -15
  79. data/spec/fixtures/releases/bosh-sample-release/packages/apache2/spec +0 -5
  80. data/spec/fixtures/releases/bosh-sample-release/packages/mysql/packaging +0 -14
  81. data/spec/fixtures/releases/bosh-sample-release/packages/mysql/spec +0 -5
  82. data/spec/fixtures/releases/bosh-sample-release/packages/mysqlclient/packaging +0 -12
  83. data/spec/fixtures/releases/bosh-sample-release/packages/mysqlclient/spec +0 -4
  84. data/spec/fixtures/releases/bosh-sample-release/packages/nginx/packaging +0 -23
  85. data/spec/fixtures/releases/bosh-sample-release/packages/nginx/spec +0 -6
  86. data/spec/fixtures/releases/bosh-sample-release/packages/php5/packaging +0 -24
  87. data/spec/fixtures/releases/bosh-sample-release/packages/php5/spec +0 -7
  88. data/spec/fixtures/releases/bosh-sample-release/packages/wordpress/packaging +0 -14
  89. data/spec/fixtures/releases/bosh-sample-release/packages/wordpress/spec +0 -5
  90. data/spec/fixtures/releases/s3test-boshrelease/.gitignore +0 -18
  91. data/spec/fixtures/releases/s3test-boshrelease/README.md +0 -51
  92. data/spec/fixtures/releases/s3test-boshrelease/Rakefile +0 -15
  93. data/spec/fixtures/releases/s3test-boshrelease/config/blobs.yml +0 -1
  94. data/spec/fixtures/releases/s3test-boshrelease/config/final.yml +0 -5
  95. data/spec/fixtures/releases/s3test-boshrelease/jobs/.gitkeep +0 -0
  96. data/spec/fixtures/releases/s3test-boshrelease/jobs/s3test/monit +0 -5
  97. data/spec/fixtures/releases/s3test-boshrelease/jobs/s3test/spec +0 -13
  98. data/spec/fixtures/releases/s3test-boshrelease/jobs/s3test/templates/bin/monit_debugger +0 -13
  99. data/spec/fixtures/releases/s3test-boshrelease/jobs/s3test/templates/bin/s3test_ctl +0 -36
  100. data/spec/fixtures/releases/s3test-boshrelease/jobs/s3test/templates/config/.gitkeep +0 -0
  101. data/spec/fixtures/releases/s3test-boshrelease/jobs/s3test/templates/config/s3test.conf.erb +0 -5
  102. data/spec/fixtures/releases/s3test-boshrelease/jobs/s3test/templates/data/properties.sh.erb +0 -10
  103. data/spec/fixtures/releases/s3test-boshrelease/jobs/s3test/templates/helpers/ctl_setup.sh +0 -81
  104. data/spec/fixtures/releases/s3test-boshrelease/jobs/s3test/templates/helpers/ctl_utils.sh +0 -156
  105. data/spec/fixtures/releases/s3test-boshrelease/packages/.gitkeep +0 -0
  106. data/spec/fixtures/releases/s3test-boshrelease/src/.gitkeep +0 -0
  107. data/spec/fixtures/releases/s3test-boshrelease/templates/deployment.yml +0 -35
  108. data/spec/fixtures/releases/s3test-boshrelease/templates/infrastructure-aws-ec2.yml +0 -40
  109. data/spec/fixtures/releases/s3test-boshrelease/templates/infrastructure-warden.yml +0 -107
  110. data/spec/fixtures/releases/s3test-boshrelease/templates/jobs.yml +0 -34
  111. data/spec/fixtures/releases/s3test-boshrelease/templates/make_manifest +0 -54
  112. data/spec/fixtures/releases/s3test-boshrelease/templates/stub.yml +0 -13
  113. data/spec/fixtures/releases/some_dev_releases/config/dev.yml +0 -3
  114. data/spec/fixtures/releases/some_dev_releases/dev_releases/index.yml +0 -6
  115. data/spec/fixtures/releases/some_dev_releases/dev_releases/myrelease-1.yml +0 -11
  116. data/spec/fixtures/releases/some_dev_releases/dev_releases/myrelease-10.yml +0 -13
  117. data/spec/fixtures/releases/some_dev_releases/dev_releases/myrelease-2.yml +0 -13
  118. data/spec/generators/job_generator_spec.rb +0 -56
  119. data/spec/generators/new_release_generator_spec.rb +0 -93
  120. data/spec/models/bosh_config_spec.rb +0 -11
  121. data/spec/models/deployment_manifest_spec.rb +0 -40
  122. data/spec/models/release_detection_spec.rb +0 -23
  123. data/spec/spec_helper.rb +0 -30
  124. data/spec/support/generator_spec_helper.rb +0 -155
@@ -1,12 +0,0 @@
1
- Bosh Outer SHell
2
- Copyright (c) 2012 VMware, Inc. All Rights Reserved.
3
-
4
- VMware copyrighted code, with the exception of RabbitMQ Server, is licensed to you under the Apache License, Version 2.0 (the "License").
5
-
6
- In addition to the VMware copyrighted code, the Bosh project includes a number of components with separate copyright notices and license terms. Your use of these components is subject to the terms and conditions of the component's license, as noted in the LICENSE file.
7
-
8
- This project enables you to download additional packages under different licenses. You are responsible for ensuring compliance with the licenses of the packages you download using this project.
9
-
10
-
11
-
12
-
@@ -1,53 +0,0 @@
1
- This is a sample release repository for BOSH that deploys a three tier LAMP application: a wordpress blog which consists of a number of apache servers running php & wordpress, fronted by nginx, and using one mysql database for storage.
2
-
3
- The sample is made up of three jobs:
4
- - mysql
5
- - wordpress
6
- which consist of apache + php5 + wordpress
7
- - nginx
8
-
9
- The repository also contains a sample deployment file (wordpress.yml) which you can use to deploy the jobs that makes up the application, after updating the "networks" section.
10
-
11
- There are three main directories in the release:
12
- - src
13
- this is the source code for the packages
14
- - packages
15
- this is instructions on how to compile the source into binaries
16
- - jobs
17
- this is scripts and configuration files required to run the packages
18
-
19
- A package is made up of the following files:
20
- - spec
21
- defines the package name, the source file it uses and optionally other
22
- packages it depends on to compile
23
- - pre_packaging
24
- an optional file that prepares the source for the packaging script
25
- - packing
26
- the script that compiles the source into binaries
27
-
28
- A job is made up of the following files:
29
- - spec
30
- defines the job name, package dependencies and how to convert templates
31
- into files
32
- - monit
33
- the monit file which defines how to start and stop the job
34
- - templates
35
- a directory which contain the scripts and config files for the job
36
-
37
- The wordpress job consist of four packages: apache2, php5, wordpress and mysqlclient.
38
- Normally php is compiled into apache, but here it is kept in its own package so that you can easily upgrade one without the other.
39
-
40
- To deploy the sample application use the following command sequence:
41
-
42
- bosh create release (name it wordpress)
43
- bosh upload release
44
- edit deployment manifest (wordpress.yml)
45
- bosh deployment wordpress.yml
46
- bosh deploy
47
-
48
-
49
- TODO
50
- use HyperDB & MySQL master/slave replication
51
- http://wordpress.org/extend/plugins/hyperdb/installation/
52
- http://dev.mysql.com/doc/refman/5.1/en/replication-howto.html
53
-
@@ -1,9 +0,0 @@
1
- ---
2
- final_name: sample
3
- min_cli_version: "0.17"
4
- blobstore:
5
- provider: atmos
6
- options:
7
- tag: BOSH
8
- url: https://blob.cfblob.com
9
- uid: 0559221ba3f64d73a60dced2912c9e6b/user1
@@ -1,5 +0,0 @@
1
- check process mysql
2
- with pidfile /var/vcap/sys/run/mysql/mysqld.pid
3
- start program "/var/vcap/jobs/mysql/bin/mysql_ctl start"
4
- stop program "/var/vcap/jobs/mysql/bin/mysql_ctl stop"
5
- group vcap
@@ -1,17 +0,0 @@
1
- ---
2
- name: mysql
3
-
4
- templates:
5
- my.cnf.erb: config/my.cnf
6
- my.bootstrap.erb: bin/my.bootstrap
7
- my.shutdown.erb: bin/my.shutdown
8
- mysql_ctl.erb: bin/mysql_ctl
9
-
10
- packages:
11
- - mysqlclient
12
- - mysql
13
-
14
- properties:
15
- mysql.password:
16
- default: mysqlpassword
17
-
@@ -1,6 +0,0 @@
1
- export LD_LIBRARY_PATH=/var/vcap/packages/mysql/lib/mysql
2
- export PATH=/var/vcap/packages/mysql/bin
3
-
4
- password=<%= properties.mysql.password %>
5
-
6
- mysqladmin -u root password "${password}" -S /var/vcap/sys/run/mysql/mysqld.sock
@@ -1,46 +0,0 @@
1
- [client]
2
- port = 3306
3
- socket = /var/vcap/sys/run/mysql/mysqld.sock
4
-
5
- [mysqld_safe]
6
- socket = /var/vcap/sys/run/mysql/mysqld.sock
7
- nice = 0
8
- log-error = /var/vcap/sys/log/mysql/mysqld.err.log
9
-
10
- [mysqld]
11
- collation_server = utf8_unicode_ci
12
- character_set_server = utf8
13
- user = vcap
14
- pid-file = /var/vcap/sys/run/mysql/mysqld.pid
15
- socket = /var/vcap/sys/run/mysql/mysqld.sock
16
- port = 3306
17
- basedir = /usr
18
- datadir = /var/vcap/store/mysql
19
- tmpdir = /tmp
20
- language = /var/vcap/packages/mysql/share/mysql/english
21
- skip-external-locking
22
- fast_index_creation = false
23
-
24
- key_buffer = <%= properties.mysql.production ? '3276M' : '16M' %>
25
- innodb_buffer_pool_size = <%= properties.mysql.production ? '3276M' : '256M' %>
26
- max_allowed_packet = 16M
27
- thread_stack = 256K
28
- thread_cache_size = <%= properties.mysql.production ? 128 : 8 %>
29
- thread_concurrency = <%= properties.mysql.production ? 8 : 2 %>
30
- max_connections = <%= properties.mysql.production ? 512 : 16 %>
31
- table_cache = <%= properties.mysql.production ? 2048 : 256 %>
32
- myisam-recover = BACKUP
33
- query_cache_limit = 1M
34
- query_cache_size = <%= properties.mysql.production ? '128M' : '16M' %>
35
- expire_logs_days = 10
36
- max_binlog_size = 100M
37
-
38
- [mysqldump]
39
- quick
40
- quote-names
41
- max_allowed_packet = 16M
42
-
43
- [mysql]
44
-
45
- [isamchk]
46
- key_buffer = 16M
@@ -1,5 +0,0 @@
1
- export LD_LIBRARY_PATH=/var/vcap/packages/mysql/lib/mysql
2
-
3
- password=<%= properties.mysql.password %>
4
-
5
- /var/vcap/packages/mysql/bin/mysqladmin --user=root --password="${password}" --socket=/var/vcap/sys/run/mysql/mysqld.sock shutdown
@@ -1,56 +0,0 @@
1
- #!/bin/bash
2
-
3
- LOG_DIR=/var/vcap/sys/log/mysql
4
- RUN_DIR=/var/vcap/sys/run/mysql
5
- PIDFILE=$RUN_DIR/mysqld.pid
6
- CONF_DIR=/var/vcap/jobs/mysql/config
7
- MY_LD_FILE=/etc/ld.so.conf.d/mysql.conf
8
-
9
- SERVER=/var/vcap/packages/mysql/libexec/mysql.server
10
- SOCKET=/var/vcap/sys/run/mysql/mysqld.sock
11
-
12
- PATH=/var/vcap/packages/mysql/bin:$PATH
13
- export PATH
14
-
15
- case $1 in
16
-
17
- start)
18
- mkdir -p $LOG_DIR
19
- mkdir -p $RUN_DIR
20
- chown vcap:vcap $RUN_DIR
21
-
22
- # set the system wide LD path for mysql libraries
23
- echo "/var/vcap/packages/mysqlclient/lib/mysql" > $MY_LD_FILE
24
- echo "/var/vcap/packages/mysql/lib/mysql" >> $MY_LD_FILE
25
- /sbin/ldconfig
26
-
27
- $SERVER start /var/vcap/jobs/mysql/config/my.cnf
28
-
29
- <% password = properties.mysql.password %>
30
-
31
- echo "creating database"
32
- <% dbname = properties.wordpress.db.name %>
33
- mysql -u root --password='<%= password %>' -S $SOCKET \
34
- -e "CREATE DATABASE <%= dbname %>;" mysql
35
-
36
- <% dbuser = "'#{properties.wordpress.db.user}'@'%'" %>
37
- <% dbpass = properties.wordpress.db.pass %>
38
-
39
- echo "creating user"
40
- mysql -u root --password='<%= password %>' -S $SOCKET \
41
- -e "CREATE USER <%= dbuser %> IDENTIFIED BY '<%= dbpass %>';" mysql
42
-
43
- echo "granting privileges"
44
- mysql -u root --password='<%= password %>' -S $SOCKET \
45
- -e "GRANT ALL PRIVILEGES ON <%= dbname %>.* TO <%= dbuser %> WITH GRANT OPTION;" mysql
46
- ;;
47
-
48
- stop)
49
- $SERVER stop /var/vcap/jobs/mysql/config/my.cnf
50
- ;;
51
-
52
- *)
53
- echo "Usage: mysql_ctl {start|stop}" ;;
54
- esac
55
-
56
- exit 0
@@ -1,5 +0,0 @@
1
- check process nginx
2
- with pidfile /var/vcap/sys/run/nginx/nginx.pid
3
- start program "/var/vcap/jobs/nginx/bin/nginx_ctl start"
4
- stop program "/var/vcap/jobs/nginx/bin/nginx_ctl stop"
5
- group vcap
@@ -1,10 +0,0 @@
1
- ---
2
- name: nginx
3
-
4
- templates:
5
- nginx_ctl: bin/nginx_ctl
6
- nginx.conf.erb: config/nginx.conf
7
- mime.types: config/mime.types
8
-
9
- packages:
10
- - nginx
@@ -1,73 +0,0 @@
1
- types {
2
- text/html html htm shtml;
3
- text/css css;
4
- text/xml xml;
5
- image/gif gif;
6
- image/jpeg jpeg jpg;
7
- application/x-javascript js;
8
- application/atom+xml atom;
9
- application/rss+xml rss;
10
-
11
- text/mathml mml;
12
- text/plain txt;
13
- text/vnd.sun.j2me.app-descriptor jad;
14
- text/vnd.wap.wml wml;
15
- text/x-component htc;
16
-
17
- image/png png;
18
- image/tiff tif tiff;
19
- image/vnd.wap.wbmp wbmp;
20
- image/x-icon ico;
21
- image/x-jng jng;
22
- image/x-ms-bmp bmp;
23
- image/svg+xml svg;
24
-
25
- application/java-archive jar war ear;
26
- application/mac-binhex40 hqx;
27
- application/msword doc;
28
- application/pdf pdf;
29
- application/postscript ps eps ai;
30
- application/rtf rtf;
31
- application/vnd.ms-excel xls;
32
- application/vnd.ms-powerpoint ppt;
33
- application/vnd.wap.wmlc wmlc;
34
- application/vnd.wap.xhtml+xml xhtml;
35
- application/vnd.google-earth.kml+xml kml;
36
- application/vnd.google-earth.kmz kmz;
37
- application/x-7z-compressed 7z;
38
- application/x-cocoa cco;
39
- application/x-java-archive-diff jardiff;
40
- application/x-java-jnlp-file jnlp;
41
- application/x-makeself run;
42
- application/x-perl pl pm;
43
- application/x-pilot prc pdb;
44
- application/x-rar-compressed rar;
45
- application/x-redhat-package-manager rpm;
46
- application/x-sea sea;
47
- application/x-shockwave-flash swf;
48
- application/x-stuffit sit;
49
- application/x-tcl tcl tk;
50
- application/x-x509-ca-cert der pem crt;
51
- application/x-xpinstall xpi;
52
- application/zip zip;
53
-
54
- application/octet-stream bin exe dll;
55
- application/octet-stream deb;
56
- application/octet-stream dmg;
57
- application/octet-stream eot;
58
- application/octet-stream iso img;
59
- application/octet-stream msi msp msm;
60
-
61
- audio/midi mid midi kar;
62
- audio/mpeg mp3;
63
- audio/x-realaudio ra;
64
-
65
- video/3gpp 3gpp 3gp;
66
- video/mpeg mpeg mpg;
67
- video/quicktime mov;
68
- video/x-flv flv;
69
- video/x-mng mng;
70
- video/x-ms-asf asx asf;
71
- video/x-ms-wmv wmv;
72
- video/x-msvideo avi;
73
- }
@@ -1,65 +0,0 @@
1
- user root root;
2
- worker_processes <%= properties.nginx.workers || 1 %>;
3
-
4
- error_log /var/vcap/sys/log/nginx/nginx.error.log;
5
- pid /var/vcap/sys/run/nginx/nginx.pid;
6
-
7
- events {
8
- worker_connections 8192;
9
- use epoll;
10
- }
11
-
12
- http {
13
- include mime.types;
14
- default_type text/html;
15
- server_tokens off;
16
-
17
- log_format main '$host - [$time_local] '
18
- '"$request" $status $bytes_sent '
19
- '"$http_referer" "$http_user_agent" '
20
- '$remote_addr response_time:$upstream_response_time';
21
-
22
- access_log /var/vcap/sys/log/nginx/nginx.access.log main;
23
-
24
- sendfile on;
25
- tcp_nopush on;
26
- tcp_nodelay on;
27
-
28
- keepalive_timeout 75 20;
29
-
30
- gzip on;
31
- gzip_min_length 1250;
32
- gzip_buffers 16 8k;
33
- gzip_comp_level 2;
34
- gzip_proxied any;
35
- gzip_types text/plain text/css application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
36
- gzip_vary on;
37
- gzip_disable "MSIE [1-6]\.(?!.*SV1)";
38
-
39
- client_max_body_size 256M;
40
-
41
- upstream wordpress {
42
- <% properties.wordpress.servers.each do |server| %>
43
- server <%= server %>:<%= properties.wordpress.port %>;
44
- <% end %>
45
- }
46
-
47
- server {
48
- listen 80;
49
- server_name "<%= properties.wordpress.servername %>";
50
- server_name_in_redirect off;
51
-
52
- location / {
53
- access_log /var/vcap/sys/log/nginx/wordpress.access.log main;
54
- proxy_buffering off;
55
- proxy_set_header Host $host;
56
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
57
- proxy_redirect off;
58
- proxy_connect_timeout 10;
59
- proxy_send_timeout 30;
60
- proxy_read_timeout 30;
61
-
62
- proxy_pass http://wordpress;
63
- }
64
- }
65
- }
@@ -1,28 +0,0 @@
1
- #!/bin/bash
2
-
3
- RUN_DIR=/var/vcap/sys/run/nginx
4
- LOG_DIR=/var/vcap/sys/log/nginx
5
- PIDFILE=$RUN_DIR/nginx.pid
6
-
7
- case $1 in
8
-
9
- start)
10
- mkdir -p $RUN_DIR
11
- mkdir -p $LOG_DIR
12
-
13
- echo $$ > $PIDFILE
14
-
15
- exec /var/vcap/packages/nginx/sbin/nginx -c /var/vcap/jobs/nginx/config/nginx.conf >>$LOG_DIR/nginx.stdout.log 2>>$LOG_DIR/nginx.stderr.log
16
- ;;
17
-
18
- stop)
19
- PID=$(head -1 $PIDFILE)
20
- kill $PID
21
- while [ -e /proc/$PID ]; do sleep 0.1; done
22
- rm -f $PIDFILE
23
- ;;
24
-
25
- *)
26
- echo "Usage: nginx_ctl {start|stop}" ;;
27
- esac
28
- exit 0
@@ -1,5 +0,0 @@
1
- check process wordpress
2
- with pidfile /var/vcap/sys/run/apache2/httpd.pid
3
- start program "/var/vcap/jobs/wordpress/bin/wordpress_ctl start"
4
- stop program "/var/vcap/jobs/wordpress/bin/wordpress_ctl stop"
5
- group vcap
@@ -1,12 +0,0 @@
1
- ---
2
- name: wordpress
3
- templates:
4
- wordpress_ctl: bin/wordpress_ctl
5
- httpd.conf.erb: config/httpd.conf
6
- wp-config.php.erb: config/wp-config.php
7
- php.ini.erb: config/php.ini
8
- packages:
9
- - mysqlclient
10
- - apache2
11
- - php5
12
- - wordpress
@@ -1,422 +0,0 @@
1
- #
2
- # This is the main Apache HTTP server configuration file. It contains the
3
- # configuration directives that give the server its instructions.
4
- # See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
5
- # In particular, see
6
- # <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
7
- # for a discussion of each configuration directive.
8
- #
9
- # Do NOT simply read the instructions in here without understanding
10
- # what they do. They're here only as hints or reminders. If you are unsure
11
- # consult the online docs. You have been warned.
12
- #
13
- # Configuration and logfile names: If the filenames you specify for many
14
- # of the server's control files begin with "/" (or "drive:/" for Win32), the
15
- # server will use that explicit path. If the filenames do *not* begin
16
- # with "/", the value of ServerRoot is prepended -- so "logs/foo_log"
17
- # with ServerRoot set to "/var/bosh/packages/apache" will be interpreted by the
18
- # server as "/var/bosh/packages/apache/logs/foo_log".
19
-
20
- #
21
- # ServerRoot: The top of the directory tree under which the server's
22
- # configuration, error, and log files are kept.
23
- #
24
- # Do not add a slash at the end of the directory path. If you point
25
- # ServerRoot at a non-local disk, be sure to point the LockFile directive
26
- # at a local disk. If you wish to share the same ServerRoot for multiple
27
- # httpd daemons, you will need to change at least LockFile and PidFile.
28
- #
29
- ServerRoot "/var/vcap/packages/apache2"
30
-
31
- PidFile "/var/vcap/sys/run/apache2/httpd.pid"
32
-
33
- #
34
- # Listen: Allows you to bind Apache to specific IP addresses and/or
35
- # ports, instead of the default. See also the <VirtualHost>
36
- # directive.
37
- #
38
- # Change this to Listen on specific IP addresses as shown below to
39
- # prevent Apache from glomming onto all bound IP addresses.
40
- #
41
- #Listen 12.34.56.78:80
42
- Listen <%= properties.wordpress.port %>
43
-
44
- #
45
- # Dynamic Shared Object (DSO) Support
46
- #
47
- # To be able to use the functionality of a module which was built as a DSO you
48
- # have to place corresponding `LoadModule' lines at this location so the
49
- # directives contained in it are actually available _before_ they are used.
50
- # Statically compiled modules (those listed by `httpd -l') do not need
51
- # to be loaded here.
52
- #
53
- # Example:
54
- # LoadModule foo_module modules/mod_foo.so
55
- LoadModule php5_module modules/libphp5.so
56
- #
57
- <FilesMatch \.php$>
58
- SetHandler application/x-httpd-php
59
- </FilesMatch>
60
-
61
- <IfModule !mpm_netware_module>
62
- <IfModule !mpm_winnt_module>
63
- #
64
- # If you wish httpd to run as a different user or group, you must run
65
- # httpd as root initially and it will switch.
66
- #
67
- # User/Group: The name (or #number) of the user/group to run httpd as.
68
- # It is usually good practice to create a dedicated user and group for
69
- # running httpd, as with most system services.
70
- #
71
- User vcap
72
- Group vcap
73
-
74
- </IfModule>
75
- </IfModule>
76
-
77
- # 'Main' server configuration
78
- #
79
- # The directives in this section set up the values used by the 'main'
80
- # server, which responds to any requests that aren't handled by a
81
- # <VirtualHost> definition. These values also provide defaults for
82
- # any <VirtualHost> containers you may define later in the file.
83
- #
84
- # All of these directives may appear inside <VirtualHost> containers,
85
- # in which case these default settings will be overridden for the
86
- # virtual host being defined.
87
- #
88
-
89
- #
90
- # ServerAdmin: Your address, where problems with the server should be
91
- # e-mailed. This address appears on some server-generated pages, such
92
- # as error documents. e.g. admin@your-domain.com
93
- #
94
- ServerAdmin <%= properties.wordpress.admin %>
95
-
96
- #
97
- # ServerName gives the name and port that the server uses to identify itself.
98
- # This can often be determined automatically, but we recommend you specify
99
- # it explicitly to prevent problems during startup.
100
- #
101
- # If your host doesn't have a registered DNS name, enter its IP address here.
102
- #
103
- #ServerName www.example.com:80
104
- ServerName <%= properties.wordpress.servername %>
105
-
106
- #
107
- # DocumentRoot: The directory out of which you will serve your
108
- # documents. By default, all requests are taken from this directory, but
109
- # symbolic links and aliases may be used to point to other locations.
110
- #
111
- DocumentRoot "/var/vcap/packages/wordpress"
112
-
113
- #
114
- # Each directory to which Apache has access can be configured with respect
115
- # to which services and features are allowed and/or disabled in that
116
- # directory (and its subdirectories).
117
- #
118
- # First, we configure the "default" to be a very restrictive set of
119
- # features.
120
- #
121
- <Directory />
122
- Options FollowSymLinks
123
- AllowOverride None
124
- Order deny,allow
125
- Deny from all
126
- </Directory>
127
-
128
- #
129
- # Note that from this point forward you must specifically allow
130
- # particular features to be enabled - so if something's not working as
131
- # you might expect, make sure that you have specifically enabled it
132
- # below.
133
- #
134
-
135
- #
136
- # This should be changed to whatever you set DocumentRoot to.
137
- #
138
- <Directory "/var/vcap/packages/wordpress">
139
- #
140
- # Possible values for the Options directive are "None", "All",
141
- # or any combination of:
142
- # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
143
- #
144
- # Note that "MultiViews" must be named *explicitly* --- "Options All"
145
- # doesn't give it to you.
146
- #
147
- # The Options directive is both complicated and important. Please see
148
- # http://httpd.apache.org/docs/2.2/mod/core.html#options
149
- # for more information.
150
- #
151
- Options Indexes FollowSymLinks
152
-
153
- #
154
- # AllowOverride controls what directives may be placed in .htaccess files.
155
- # It can be "All", "None", or any combination of the keywords:
156
- # Options FileInfo AuthConfig Limit
157
- #
158
- AllowOverride None
159
-
160
- #
161
- # Controls who can get stuff from this server.
162
- #
163
- Order allow,deny
164
- Allow from all
165
-
166
- </Directory>
167
-
168
- #
169
- # DirectoryIndex: sets the file that Apache will serve if a directory
170
- # is requested.
171
- #
172
- <IfModule dir_module>
173
- DirectoryIndex index.html index.php
174
- </IfModule>
175
-
176
- #
177
- # The following lines prevent .htaccess and .htpasswd files from being
178
- # viewed by Web clients.
179
- #
180
- <FilesMatch "^\.ht">
181
- Order allow,deny
182
- Deny from all
183
- Satisfy All
184
- </FilesMatch>
185
-
186
- #
187
- # ErrorLog: The location of the error log file.
188
- # If you do not specify an ErrorLog directive within a <VirtualHost>
189
- # container, error messages relating to that virtual host will be
190
- # logged here. If you *do* define an error logfile for a <VirtualHost>
191
- # container, that host's errors will be logged there and not here.
192
- #
193
- ErrorLog "/var/vcap/sys/log/apache2/error_log"
194
-
195
- #
196
- # LogLevel: Control the number of messages logged to the error_log.
197
- # Possible values include: debug, info, notice, warn, error, crit,
198
- # alert, emerg.
199
- #
200
- LogLevel warn
201
-
202
- <IfModule log_config_module>
203
- #
204
- # The following directives define some format nicknames for use with
205
- # a CustomLog directive (see below).
206
- #
207
- LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
208
- LogFormat "%h %l %u %t \"%r\" %>s %b" common
209
-
210
- <IfModule logio_module>
211
- # You need to enable mod_logio.c to use %I and %O
212
- LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
213
- </IfModule>
214
-
215
- #
216
- # The location and format of the access logfile (Common Logfile Format).
217
- # If you do not define any access logfiles within a <VirtualHost>
218
- # container, they will be logged here. Contrariwise, if you *do*
219
- # define per-<VirtualHost> access logfiles, transactions will be
220
- # logged therein and *not* in this file.
221
- #
222
- CustomLog "/var/vcap/sys/log/apache2/access_log" common
223
-
224
- #
225
- # If you prefer a logfile with access, agent, and referer information
226
- # (Combined Logfile Format) you can use the following directive.
227
- #
228
- #CustomLog "logs/access_log" combined
229
- </IfModule>
230
-
231
- <IfModule alias_module>
232
- #
233
- # Redirect: Allows you to tell clients about documents that used to
234
- # exist in your server's namespace, but do not anymore. The client
235
- # will make a new request for the document at its new location.
236
- # Example:
237
- # Redirect permanent /foo http://www.example.com/bar
238
-
239
- #
240
- # Alias: Maps web paths into filesystem paths and is used to
241
- # access content that does not live under the DocumentRoot.
242
- # Example:
243
- # Alias /webpath /full/filesystem/path
244
- #
245
- # If you include a trailing / on /webpath then the server will
246
- # require it to be present in the URL. You will also likely
247
- # need to provide a <Directory> section to allow access to
248
- # the filesystem path.
249
-
250
- #
251
- # ScriptAlias: This controls which directories contain server scripts.
252
- # ScriptAliases are essentially the same as Aliases, except that
253
- # documents in the target directory are treated as applications and
254
- # run by the server when requested rather than as documents sent to the
255
- # client. The same rules about trailing "/" apply to ScriptAlias
256
- # directives as to Alias.
257
- #
258
- ScriptAlias /cgi-bin/ "/var/bosh/packages/apache/cgi-bin/"
259
-
260
- </IfModule>
261
-
262
- <IfModule cgid_module>
263
- #
264
- # ScriptSock: On threaded servers, designate the path to the UNIX
265
- # socket used to communicate with the CGI daemon of mod_cgid.
266
- #
267
- #Scriptsock logs/cgisock
268
- </IfModule>
269
-
270
- #
271
- # "/var/bosh/packages/apache/cgi-bin" should be changed to whatever your ScriptAliased
272
- # CGI directory exists, if you have that configured.
273
- #
274
- <Directory "/var/bosh/packages/apache/cgi-bin">
275
- AllowOverride None
276
- Options None
277
- Order allow,deny
278
- Allow from all
279
- </Directory>
280
-
281
- #
282
- # DefaultType: the default MIME type the server will use for a document
283
- # if it cannot otherwise determine one, such as from filename extensions.
284
- # If your server contains mostly text or HTML documents, "text/plain" is
285
- # a good value. If most of your content is binary, such as applications
286
- # or images, you may want to use "application/octet-stream" instead to
287
- # keep browsers from trying to display binary files as though they are
288
- # text.
289
- #
290
- DefaultType text/plain
291
-
292
- <IfModule mime_module>
293
- #
294
- # TypesConfig points to the file containing the list of mappings from
295
- # filename extension to MIME-type.
296
- #
297
- TypesConfig conf/mime.types
298
-
299
- #
300
- # AddType allows you to add to or override the MIME configuration
301
- # file specified in TypesConfig for specific file types.
302
- #
303
- #AddType application/x-gzip .tgz
304
- #
305
- # AddEncoding allows you to have certain browsers uncompress
306
- # information on the fly. Note: Not all browsers support this.
307
- #
308
- #AddEncoding x-compress .Z
309
- #AddEncoding x-gzip .gz .tgz
310
- #
311
- # If the AddEncoding directives above are commented-out, then you
312
- # probably should define those extensions to indicate media types:
313
- #
314
- AddType application/x-compress .Z
315
- AddType application/x-gzip .gz .tgz
316
-
317
- #
318
- # AddHandler allows you to map certain file extensions to "handlers":
319
- # actions unrelated to filetype. These can be either built into the server
320
- # or added with the Action directive (see below)
321
- #
322
- # To use CGI scripts outside of ScriptAliased directories:
323
- # (You will also need to add "ExecCGI" to the "Options" directive.)
324
- #
325
- #AddHandler cgi-script .cgi
326
-
327
- # For type maps (negotiated resources):
328
- #AddHandler type-map var
329
-
330
- #
331
- # Filters allow you to process content before it is sent to the client.
332
- #
333
- # To parse .shtml files for server-side includes (SSI):
334
- # (You will also need to add "Includes" to the "Options" directive.)
335
- #
336
- #AddType text/html .shtml
337
- #AddOutputFilter INCLUDES .shtml
338
- </IfModule>
339
-
340
- #
341
- # The mod_mime_magic module allows the server to use various hints from the
342
- # contents of the file itself to determine its type. The MIMEMagicFile
343
- # directive tells the module where the hint definitions are located.
344
- #
345
- #MIMEMagicFile conf/magic
346
-
347
- #
348
- # Customizable error responses come in three flavors:
349
- # 1) plain text 2) local redirects 3) external redirects
350
- #
351
- # Some examples:
352
- #ErrorDocument 500 "The server made a boo boo."
353
- #ErrorDocument 404 /missing.html
354
- #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
355
- #ErrorDocument 402 http://www.example.com/subscription_info.html
356
- #
357
-
358
- #
359
- # MaxRanges: Maximum number of Ranges in a request before
360
- # returning the entire resource, or 0 for unlimited
361
- # Default setting is to accept 200 Ranges
362
- #MaxRanges 0
363
-
364
- #
365
- # EnableMMAP and EnableSendfile: On systems that support it,
366
- # memory-mapping or the sendfile syscall is used to deliver
367
- # files. This usually improves server performance, but must
368
- # be turned off when serving from networked-mounted
369
- # filesystems or if support for these functions is otherwise
370
- # broken on your system.
371
- #
372
- #EnableMMAP off
373
- #EnableSendfile off
374
-
375
- # Supplemental configuration
376
- #
377
- # The configuration files in the conf/extra/ directory can be
378
- # included to add extra features or to modify the default configuration of
379
- # the server, or you may simply copy their contents here and change as
380
- # necessary.
381
-
382
- # Server-pool management (MPM specific)
383
- #Include conf/extra/httpd-mpm.conf
384
-
385
- # Multi-language error messages
386
- #Include conf/extra/httpd-multilang-errordoc.conf
387
-
388
- # Fancy directory listings
389
- #Include conf/extra/httpd-autoindex.conf
390
-
391
- # Language settings
392
- #Include conf/extra/httpd-languages.conf
393
-
394
- # User home directories
395
- #Include conf/extra/httpd-userdir.conf
396
-
397
- # Real-time info on requests and configuration
398
- #Include conf/extra/httpd-info.conf
399
-
400
- # Virtual hosts
401
- #Include conf/extra/httpd-vhosts.conf
402
-
403
- # Local access to the Apache HTTP Server Manual
404
- #Include conf/extra/httpd-manual.conf
405
-
406
- # Distributed authoring and versioning (WebDAV)
407
- #Include conf/extra/httpd-dav.conf
408
-
409
- # Various default settings
410
- #Include conf/extra/httpd-default.conf
411
-
412
- # Secure (SSL/TLS) connections
413
- #Include conf/extra/httpd-ssl.conf
414
- #
415
- # Note: The following must must be present to support
416
- # starting without SSL on platforms with no /dev/random equivalent
417
- # but a statically compiled-in mod_ssl.
418
- #
419
- <IfModule ssl_module>
420
- SSLRandomSeed startup builtin
421
- SSLRandomSeed connect builtin
422
- </IfModule>