machines 0.5.4 → 0.5.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. data/.yardopts +7 -1
  2. data/CHANGELOG.md +16 -4
  3. data/INSTALL.md +3 -0
  4. data/LICENSE +1 -2
  5. data/README.md +47 -28
  6. data/Rakefile +0 -8
  7. data/TODO.md +66 -59
  8. data/bin/machines +1 -2
  9. data/lib/machines.rb +16 -1
  10. data/lib/machines/app_settings.rb +1 -1
  11. data/lib/machines/cloud_machine.rb +1 -1
  12. data/lib/machines/command.rb +0 -2
  13. data/lib/machines/commandline.rb +23 -29
  14. data/lib/machines/commands/checks.rb +67 -0
  15. data/lib/machines/commands/configuration.rb +50 -0
  16. data/lib/machines/commands/database.rb +18 -0
  17. data/lib/machines/commands/file_operations.rb +105 -0
  18. data/lib/machines/commands/installation.rb +184 -0
  19. data/lib/machines/commands/questions.rb +16 -0
  20. data/lib/machines/commands/services.rb +26 -0
  21. data/lib/machines/core.rb +55 -25
  22. data/lib/machines/logger.rb +0 -2
  23. data/lib/machines/named_buffer.rb +7 -6
  24. data/lib/machines/version.rb +1 -1
  25. data/lib/packages/awstats.rb +2 -2
  26. data/lib/packages/docky.rb +0 -1
  27. data/lib/packages/dwm.rb +5 -0
  28. data/lib/packages/nginx_logrotate.rb +2 -2
  29. data/lib/packages/timezone.rb +2 -4
  30. data/lib/template/Machinesfile +2 -1
  31. data/lib/template/config.yml +3 -0
  32. data/spec/lib/machines/app_settings_spec.rb +13 -12
  33. data/spec/lib/machines/cloud_machine_spec.rb +9 -8
  34. data/spec/lib/machines/commandline_spec.rb +69 -90
  35. data/spec/lib/machines/{checks_spec.rb → commands/checks_spec.rb} +1 -1
  36. data/spec/lib/machines/{configuration_spec.rb → commands/configuration_spec.rb} +2 -3
  37. data/spec/lib/machines/{database_spec.rb → commands/database_spec.rb} +4 -10
  38. data/spec/lib/machines/{file_operations_spec.rb → commands/file_operations_spec.rb} +3 -7
  39. data/spec/lib/machines/{installation_spec.rb → commands/installation_spec.rb} +10 -4
  40. data/spec/lib/machines/{questions_spec.rb → commands/questions_spec.rb} +1 -3
  41. data/spec/lib/machines/{services_spec.rb → commands/services_spec.rb} +1 -4
  42. data/spec/lib/machines/core_spec.rb +81 -65
  43. data/spec/lib/packages/abiword_spec.rb +1 -5
  44. data/spec/lib/packages/amazon_mp3_spec.rb +0 -4
  45. data/spec/lib/packages/awstats_spec.rb +3 -4
  46. data/spec/lib/packages/base_spec.rb +0 -1
  47. data/spec/lib/packages/chrome_spec.rb +0 -4
  48. data/spec/lib/packages/cruisecontrol_spec.rb +1 -2
  49. data/spec/lib/packages/dependencies_spec.rb +1 -2
  50. data/spec/lib/packages/docky_spec.rb +0 -4
  51. data/spec/lib/packages/dotfiles_spec.rb +5 -4
  52. data/spec/lib/packages/dwm_spec.rb +23 -0
  53. data/spec/lib/packages/file_roller_spec.rb +1 -5
  54. data/spec/lib/packages/firefox_spec.rb +0 -4
  55. data/spec/lib/packages/gedit_spec.rb +1 -5
  56. data/spec/lib/packages/git_spec.rb +0 -4
  57. data/spec/lib/packages/gmate_spec.rb +1 -5
  58. data/spec/lib/packages/gnome_spec.rb +0 -4
  59. data/spec/lib/packages/gnumeric_spec.rb +1 -5
  60. data/spec/lib/packages/hosts_spec.rb +0 -1
  61. data/spec/lib/packages/load_machines_spec.rb +16 -15
  62. data/spec/lib/packages/monit_spec.rb +0 -1
  63. data/spec/lib/packages/mysql_spec.rb +1 -3
  64. data/spec/lib/packages/nginx_logrotate_spec.rb +17 -18
  65. data/spec/lib/packages/nginx_spec.rb +0 -1
  66. data/spec/lib/packages/openbox_spec.rb +0 -4
  67. data/spec/lib/packages/passenger_nginx_spec.rb +0 -1
  68. data/spec/lib/packages/passenger_spec.rb +0 -1
  69. data/spec/lib/packages/postfix_spec.rb +1 -5
  70. data/spec/lib/packages/questions_spec.rb +3 -4
  71. data/spec/lib/packages/rbenv_spec.rb +1 -4
  72. data/spec/lib/packages/rvm_spec.rb +1 -4
  73. data/spec/lib/packages/save_machines_spec.rb +0 -1
  74. data/spec/lib/packages/slim_spec.rb +1 -2
  75. data/spec/lib/packages/sqlserver_spec.rb +0 -4
  76. data/spec/lib/packages/timezone_spec.rb +2 -3
  77. data/spec/lib/packages/unison_spec.rb +1 -2
  78. data/spec/lib/packages/virtualbox_guest_spec.rb +0 -4
  79. data/spec/lib/packages/virtualbox_spec.rb +1 -2
  80. data/spec/lib/packages/webapps_spec.rb +1 -3
  81. data/spec/spec_helper.rb +59 -61
  82. data/spec/support/minitest.rb +4 -62
  83. metadata +27 -28
  84. data/lib/machines/base.rb +0 -13
  85. data/lib/machines/checks.rb +0 -63
  86. data/lib/machines/configuration.rb +0 -49
  87. data/lib/machines/database.rb +0 -17
  88. data/lib/machines/file_operations.rb +0 -104
  89. data/lib/machines/installation.rb +0 -171
  90. data/lib/machines/machinesfile.rb +0 -25
  91. data/lib/machines/questions.rb +0 -15
  92. data/lib/machines/services.rb +0 -24
  93. data/spec/lib/machines/machinesfile_spec.rb +0 -34
data/.yardopts CHANGED
@@ -1,2 +1,8 @@
1
1
  --markup-provider=redcarpet
2
- --markup=markdown
2
+ --markup=markdown
3
+ -
4
+ CHANGELOG.md
5
+ EXAMPLES.md
6
+ INSTALL.md
7
+ TODO.md
8
+ LICENSE
@@ -1,22 +1,34 @@
1
- == 0.5.4
1
+ ## 0.5.6
2
+
3
+ * Gem updates - spec_helper updated to handle features removed from minitest
4
+ * Fixed bug introducted in API cleanup where commands were not included in Core
5
+
6
+ ## 0.5.5
7
+
8
+ * Cleaned up API - moved all commands into Commands module and turned non-commands into classes
9
+ * Switched to dwm and slim for default template window manager/login manager
10
+ * Added make clean install to `install` command
11
+ * BUG: fixed incorrect link command in timezone package
12
+
13
+ ## 0.5.4
2
14
 
3
15
  * Added support extracting for bz2 archives
4
16
  * `install` can now download an archive and extract to /usr/local/lib and create a link in /usr/local/bin
5
17
 
6
18
 
7
- == 0.5.3
19
+ ## 0.5.3
8
20
 
9
21
  * Implement `list` command to list available machines from machines.yml
10
22
  * Display syntax when `build` called with no machine
11
23
  * Support running multiple tasks - e.g. `machines build machine passenger passenger_nginx nginx webapps`
12
24
  * modify git_clone to pull if the repo already exists
13
25
 
14
- == 0.5.2
26
+ ## 0.5.2
15
27
 
16
28
  * Bug fixes
17
29
 
18
30
 
19
- == 0.5.1
31
+ ## 0.5.1
20
32
 
21
33
  * Added opensource flag to allow alternatives to be installed (e.g. Chrome/Chromium)
22
34
  * Added config.yml option to autostart VBoxClient for WMs that don't use XDG autostart
data/INSTALL.md CHANGED
@@ -1,3 +1,5 @@
1
+ **If installing to VirtualBox on a Windows host read on.**
2
+
1
3
  Install freeSSHd
2
4
  ----------------------------------------
3
5
 
@@ -9,6 +11,7 @@ Install freeSSHd
9
11
  ** User can use: Shell
10
12
  * Copy the public rsa key from your Ubuntu VM and save it in `C:\Program Files (x86)\freeSSHd\vbuser` with no extension
11
13
 
14
+
12
15
  Install VM
13
16
  ----------------------------------------
14
17
 
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  (The MIT License)
2
2
 
3
- Copyright (c) 2009, 2010, 2011, 2012 Phil Thompson
3
+ Copyright (c) 2009, 2010, 2011, 2012, 2013 Phil Thompson
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
@@ -20,4 +20,3 @@ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
20
  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
21
  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
22
  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
-
data/README.md CHANGED
@@ -5,7 +5,7 @@ Machines
5
5
 
6
6
  Setup Ubuntu development and server **Machines** locally or in the cloud for developing and hosting Ruby, Rails and related environments.
7
7
 
8
- Run commands like:
8
+ Write commands in Ruby like:
9
9
 
10
10
  sudo install %w(build-essential zlib1g-dev libpcre3-dev)
11
11
  sudo write "127.0.1.1\t#{$conf.hostname}", :to => '/etc/hosts'
@@ -13,34 +13,38 @@ Run commands like:
13
13
  run download $conf.nginx.url
14
14
  run create_from 'nginx/nginx.conf.erb', :to => File.join($conf.nginx.path, 'conf', 'nginx.conf')
15
15
 
16
- Upgrade passenger:
16
+ Example to upgrade passenger:
17
17
 
18
18
  machines build phil_workstation passenger_nginx
19
19
 
20
+ [RubyDoc.info documentation](http://rdoc.info/github/PhilT/machines/)
20
21
 
21
22
  Status
22
23
  -----------------------------------------------------------
23
24
 
24
- September 2012
25
+ **March 2013**
25
26
 
26
- * Released 0.5.2 gem
27
+ * Released 0.5.4 gem
27
28
  * Working development and server builds.
28
- * Cloud deployments to complete.
29
+ * Cloud deployments, cleaner API and some tidy up in development.
30
+
29
31
 
30
32
  Features
31
33
  -----------------------------------------------------------
32
34
 
33
35
  * An opinionated Ubuntu configuration script with sensible defaults
34
36
  * Easily override the defaults with configuration options and custom ruby
35
- * Supports several cloud services [Not complete]
36
37
  * Default template supports Nginx, Passenger, Ruby, Rails, MySQL, Git, Monit, Logrotate
37
38
  * Preconfigured Ruby & Rails light development environment (Openbox or Subtle)
38
39
  * Bring up new instances fully configured in less than 15 minutes
40
+ * The best form of documentation for your architecture
41
+
39
42
 
40
43
  What it's Not
41
44
  -----------------------------------------------------------
42
45
 
43
- * It does not replace the base installation (Yet). A minimal Ubuntu must be installed prior to running the *Machines* install
46
+ * It does not replace the base installation (Yet). A minimal Ubuntu must be installed prior to running the *Machines* install (instructions provided below)
47
+ * It's not a full blown configuration management tool such as Puppet or Chef although it can be used to run packages on the local machine to install new versions
44
48
 
45
49
 
46
50
  Motivation
@@ -52,10 +56,11 @@ Configuration management is a complex topic. I wanted to reduce some of the vari
52
56
  Overview
53
57
  -----------------------------------------------------------
54
58
 
55
- The top level script is the `Machinesfile`. This contains the packages to include. Packages contain the commands to run. Default packages are provided by Machines. Default packages can be overridden and new ones created.
59
+ The top level script is the `Machinesfile`. This contains a list of packages to run. Packages contain one or more tasks and the tasks contain the commands to run. Default packages are provided by Machines. Default packages can be overridden and new ones created.
56
60
 
57
61
  Commands are added to a queue with `sudo` or `run`. [lib/packages](https://github.com/PhilT/machines/tree/master/lib/packages) contains the packages you can add in the `Machinesfile` in Machines. Once the build starts the commands are run and shown with the current progress.
58
62
 
63
+
59
64
  Installation and Configuration
60
65
  -----------------------------------------------------------
61
66
 
@@ -63,26 +68,23 @@ Installation and Configuration
63
68
 
64
69
  gem install machines
65
70
 
66
- ### Generate an example build script
71
+ ### Generate an example project
67
72
 
68
73
  machines new example
69
74
 
70
- Creates the `example` folder and copies in an example template.
71
-
72
75
  ### Configure your deployment
73
76
 
74
77
  Take a look at the generated project. It contains several folders with templates and
75
78
  configuration settings for various programs, your `Machinesfile` and the various `.yml` files.
76
79
 
77
- `machines.yml` is your machine architecture. Here you'll add all the computers in your environment.
80
+ * `machines.yml` is your architecture. Here you'll add all the computers in your setup.
81
+ * `webapps.yml` contains the web applications you develop and maintain.
82
+ * `config.yml` contains settings for various packages. Versions, Cloud setup, paths, etc.
83
+ * `users/` contains user specific preferences, dotfiles, etc
78
84
 
79
- `webapps.yml` lists the web applications you develop and maintain.
85
+ So here is the recommended approach to configuring your environment:
80
86
 
81
- `config.yml` contains settings for various packages. Version numbers, Cloud configuration, paths, etc.
82
-
83
- `users/` contains user specific preferences, dotfiles, etc
84
-
85
- * Create your architecture in `machines.yml`
87
+ * Create your architecture in `machines.yml` (see notes in file)
86
88
  * Add you webapps in `webapps.yml`
87
89
  * Edit the build script (`Machinesfile`)
88
90
  * Add your websites certificates and amazon private key (if required)
@@ -109,13 +111,11 @@ configuration settings for various programs, your `Machinesfile` and the various
109
111
  machines dryrun <machine>
110
112
  cat log/output.log
111
113
 
112
-
113
114
  ### Check the machine
114
115
 
115
116
  ssh-keygen -R <host ip> # remove host from known_hosts file (handy when testing)
116
117
  $ ssh <IP ADDRESS> # Make sure you can connect to the machine
117
118
 
118
-
119
119
  ### Build the machine
120
120
 
121
121
  $ machines build <machine>
@@ -131,7 +131,11 @@ Console output:
131
131
 
132
132
  While running open another terminal to view detailed output:
133
133
 
134
- tail -f output.log
134
+ tail -f log/output.log
135
+
136
+ or debug:
137
+
138
+ tail -f log/debug.log
135
139
 
136
140
 
137
141
  Commandline Options
@@ -169,6 +173,19 @@ Some of the settings set and used by Machines are:
169
173
 
170
174
  Take a look at `template/*.yml` for more.
171
175
 
176
+ Commands
177
+ -----------------------------------------------------------
178
+
179
+ Commands you can use with `run` or `sudo` are in the following modules (links to rdoc):
180
+
181
+ * [Configuration](http://rdoc.info/github/PhilT/machines/Machines/Commands/Configuration)
182
+ * [Database](http://rdoc.info/github/PhilT/machines/Machines/Commands/Database)
183
+ * [FileOperations](http://rdoc.info/github/PhilT/machines/Machines/Commands/FileOperations)
184
+ * [Installation](http://rdoc.info/github/PhilT/machines/Machines/Commands/Installation)
185
+ * [Services](http://rdoc.info/github/PhilT/machines/Machines/Commands/Services)
186
+
187
+ When creating your own commands the [Checks](http://rdoc.info/github/PhilT/machines/Machines/Commands/Checks) module should be useful.
188
+
172
189
 
173
190
  Setting up a test VM
174
191
  -----------------------------------------------------------
@@ -204,11 +221,12 @@ Make sure you've downloaded one of the ISOs from the list in *Prepare the target
204
221
  What's happening under the hood
205
222
  -----------------------------------------------------------
206
223
 
207
- * An ssh connection is established to send all commands and uploads (similar to Capistrano)
208
- * Ssh uses the specified user and then sudo is added to commands that require it
209
- * When sudo is needed for file uploads. The file is uploaded to /tmp then sudo cp'd to the destination
224
+ * An SSH connection is established to send all commands and uploads (similar to Capistrano) to the target machine
225
+ * SSH uses the specified user and then sudo is added to commands that require it
226
+ * When sudo is needed for file uploads. The file is uploaded to `/tmp` then `sudo cp`'d to the destination
210
227
  * When `package` is called in the `Machinesfile` that file is loaded either from the projects packages folder
211
228
  or from the Machines packages if not found in the project
229
+ * It is executed within the context of the Core class. This class defines basic commands such as `task`, `run`, `sudo` and includes all the Commands modules so they are available to the running package
212
230
 
213
231
 
214
232
  Limitations
@@ -218,8 +236,9 @@ Limitations
218
236
  * Servers use www (by default) for nginx/apache, passenger and deployments
219
237
  * The system has been designed to allow a certain flexibility in the configuration although some things
220
238
  may not yet be totally configurable it should be possible to add or modify the relevant package
221
- * We are currently focused on Ruby 1.9.2 (Moving to 1.9.3 soon), Rails 3 and Passenger 3
239
+ * We are currently focused on Ruby 1.9.3 (Moving to 2.0 soon), Rails 3 and Passenger 3
222
240
  * Some commands may not properly escape quotes when used with sudo (e.g. append and replace). This may be addressed in a future release
241
+ * Tasks not configured to run for a particular setup will not be available to run explicitly from the commandline
223
242
 
224
243
 
225
244
  Development, Patches, Pull Requests
@@ -229,8 +248,8 @@ Development, Patches, Pull Requests
229
248
  * Test drive your feature addition or bug fix
230
249
  * Commit, do not mess with Rakefile, version, or history
231
250
  * Send me a pull request. Please use topic branches
232
- * Feel free to add/enhance packages and submit pull requests
233
- * Package tests are a bit of a pain but do catch a lot of potential issues
251
+ * Feel free to add, enhance or update packages and submit pull requests
252
+ * Package tests are a bit of a pain but do catch a lot of potential issues so please add these
234
253
 
235
254
 
236
255
  References
@@ -276,5 +295,5 @@ Thanks to all the people that published the hundreds of articles, blog posts and
276
295
  Copyright
277
296
  -----------------------------------------------------------
278
297
 
279
- Copyright (c) 2010, 2011, 2012 Phil Thompson. See LICENSE for details.
298
+ Copyright (c) 2010, 2011, 2012, 2013 Phil Thompson. See LICENSE for details.
280
299
 
data/Rakefile CHANGED
@@ -1,7 +1,6 @@
1
1
  require 'bundler'
2
2
  require 'yard'
3
3
  require 'highline/import'
4
- require 'rake'
5
4
  require 'rake/testtask'
6
5
 
7
6
  task :default => [:coverage, :yard, :install]
@@ -41,13 +40,6 @@ task :install do
41
40
  end
42
41
  end
43
42
 
44
- desc 'Run machines'
45
- task :run do
46
- $LOAD_PATH << 'lib'
47
- require 'machines'
48
- Machines::Base.new.start(ARGV[1])
49
- end
50
-
51
43
  desc 'Git tags and sends the gem to rubygems'
52
44
  task :release do
53
45
  gemspec_path = Dir['*.gemspec'].first
data/TODO.md CHANGED
@@ -1,23 +1,36 @@
1
1
  TODO next
2
2
  ----------------------------------------
3
3
 
4
- Handle unknown tasks and display a proper error message (at the moment we get an obscure undefined method on NilClass)
5
- Support missing environment (e.g. source repo machine)
6
- `machines dryrun/build` with no machine name should list the machines available
7
- DRY up per user config by creating a "common" user config that all users pull default config from
8
- DRY up further by having default templates in the same way that packages default to built-in ones
4
+ * Move dotfiles into separate repo (managed by user)
5
+ * stubs :required_options should be tested
6
+ * replace subtle window manager with dwm
7
+ * reorg packages into folders by category
8
+
9
+ EC2 support
10
+ -----------
11
+
12
+ * Encrypt keys/passwords etc
13
+
14
+
15
+ * Handle unknown tasks and display a proper error message (at the moment we get an obscure undefined method on NilClass)
16
+ * Support missing environment (e.g. source repo machine)
17
+ * `machines dryrun/build` with no machine name should list the machines available
18
+ * DRY up per user config by creating a "common" user config that all users pull default config from
19
+ * DRY up further by having default templates in the same way that packages default to built-in ones
9
20
  (In other words remove as much as possible from evmachines)
10
- Complement this by providing a command to view packages and templates
11
- Move dotfiles to a repo so they can be managed across projects
12
- Handle apt-get error 110 and retry
13
- Move packages into a separate gem
14
- Move template into a separate gem
21
+ * Complement this by providing a command to view packages and templates
22
+ * Move dotfiles to a repo so they can be managed across projects
23
+ * Handle apt-get error 110 and retry
24
+ * Move packages into a separate gem
25
+ * Move template into a separate gem
26
+ * Remove questions API (once passwords are encrypted we just ask for encryption password, similar to `pw`)
15
27
 
16
28
 
17
29
  Cloud
18
30
  ----------------------------------------
19
- Use EC2 IP address for connecting to database servers
20
- Create elastic IP address for web servers
31
+
32
+ * Use EC2 IP address for connecting to database servers
33
+ * Create elastic IP address for web servers
21
34
 
22
35
  * Assign private/public keys
23
36
  * Create security groups - check they exist and modify or create as required
@@ -37,58 +50,52 @@ EC2 - Look at assigning and freeing elastic IP addresses
37
50
  Package and Task Tasks
38
51
  ----------------------------------------
39
52
 
40
- Any methods other than `append` that cannot be repeatedly run?
41
- Display additional install notes for a particular package (at the end of installation) - e.g. printer setup requires Windows share to be setup
42
- CODE/DOC: Describe difference between package and task or merge packages with tasks if possible
43
- BUG: Report error if task is nested
44
- ?? Define packages as a group of tasks?
53
+ * Any methods other than `append` that cannot be repeatedly run?
54
+ * Display additional install notes for a particular package (at the end of installation) - e.g. printer setup requires Windows share to be setup
55
+ * CODE/DOC: Describe difference between package and task or merge packages with tasks if possible
56
+ * BUG: Report error if task is nested
57
+ * Define packages as a group of tasks?
45
58
 
46
59
 
47
60
  Misc Tasks
48
61
  ----------------------------------------
49
62
 
50
- Remove percentage from progress once command has completed
51
- DOC: How webapps environment specific settings override default settings and how to set your own
52
- DOC: All config files
53
- DOC: Why we use ~/.profile (with links)
54
- On initial SSH connection to machine, test we have an Internet connection. Fail if not.
55
- Add the check that was run to `CHECK_FAILED/CHECK_PASSED`
56
- Output progress to log/<machine_name>_progress.log
57
- Rename output log to log/<machine_name>_output.log
58
- DOC: machines desc <package> - Should display a detailed description of the package
59
- machines list - Display a list of machines to build (or maybe machines build/dryrun with no machinename)
60
- ?? base package may not be needed on DB installs
61
- ?? Default path for Nginx install is /usr/local - Is it installed correctly for non-default paths?
62
- ?? I have a new webapp - How can I add it to a server that has already been installed?
63
- BUG: Uploads throw exception if local file is missing - Get upload to check file existence when adding to queue
64
- BUG: CTRL+C doesn't quite exit cleanly
65
- Check $conf.db_server is picked up and used to write database.yml on qa/staging/production
66
-
67
- Allow $conf.webapps[app].path to be overridden from webapps.yml
68
- ?? Does webapps.yml structure get preserved? (e.g. when modifying keys and resaving)
69
- Fix guard notifications
70
-
71
- Enable YAML to refer to other settings in the same file
72
- development machines should clone repos
73
-
74
- Should be able to run Passenger install easily for new versions
75
- Can more files be ERB templates? Standardise. Need examples (can't remember what they were)
76
- webapps has gaps in testing (e.g. ssl)
77
- escape $$ in passwords
78
- turn off debug output by default
79
- DOC: webapps.yml loaded into $conf
80
- MySQL root pass is not set properly
81
- Recommended practice for overwritting project with new template. Use Git
82
- Set cron to sensible times /etc/crontab [DEV]
83
- Need a way to see optional tasks that are not run as part of full build
84
-
85
- Would `set :variable_name, value` be better than `$conf.variable = value`?
86
- Need a better DSL to handle $conf and also paths File.join is so verbose
63
+ * Remove percentage from progress once command has completed
64
+ * DOC: How webapps environment specific settings override default settings and how to set your own
65
+ * DOC: All config files
66
+ * DOC: Why we use ~/.profile (with links)
67
+ * On initial SSH connection to machine, test we have an Internet connection. Fail if not.
68
+ * Add the check that was run to `CHECK_FAILED/CHECK_PASSED`
69
+ * Output progress to log/<machine_name>_progress.log
70
+ * Rename output log to log/<machine_name>_output.log
71
+ * DOC: machines desc <package> - Should display a detailed description of the package
72
+ * machines list - Display a list of machines to build (or maybe machines build/dryrun with no machinename)
73
+ * ?? base package may not be needed on DB installs
74
+ * ?? Default path for Nginx install is /usr/local - Is it installed correctly for non-default paths?
75
+ * ?? I have a new webapp - How can I add it to a server that has already been installed?
76
+ * BUG: Uploads throw exception if local file is missing - Get upload to check file existence when adding to queue
77
+ * BUG: CTRL+C doesn't quite exit cleanly
78
+ * Check $conf.db_server is picked up and used to write database.yml on qa/staging/production
79
+
80
+ * Allow $conf.webapps[app].path to be overridden from webapps.yml
81
+ * ?? Does webapps.yml structure get preserved? (e.g. when modifying keys and resaving)
82
+
83
+ * Can more files be ERB templates? Standardise. Need examples (can't remember what they were)
84
+ * webapps has gaps in testing (e.g. ssl)
85
+ * BUG: escape $$ in passwords
86
+ * turn off debug output by default
87
+ * DOC: webapps.yml loaded into $conf
88
+ * MySQL root pass is not set properly
89
+ * Recommended practice for overwritting project with new template. Use Git
90
+ * Set cron to sensible times /etc/crontab [DEV]
91
+ * Need a way to see optional tasks that are not run as part of full build
92
+
93
+ * Would `set :variable_name, value` be better than `$conf.variable = value`?
94
+ * Need a better DSL to handle $conf and also paths File.join is so verbose
87
95
  For exmaple, instead of:
88
- File.join($conf.appsroot, 'subfolder')
96
+ File.join($conf.appsroot, 'subfolder')
89
97
  How about:
90
- path :appsroot, 'subfolder'
91
- rvm ruby@gemset --rvmrc to generate passenger compatible .rvmrc
92
- setup memcached
93
- passenger_nginx was installed with rvmsudo. Need to test it still works with just sudo
98
+ path :appsroot, 'subfolder'
99
+ * rvm ruby@gemset --rvmrc to generate passenger compatible .rvmrc
100
+ * passenger_nginx was installed with rvmsudo. Need to test it still works with just sudo
94
101
 
@@ -2,5 +2,4 @@
2
2
 
3
3
  require 'machines'
4
4
 
5
- Machines::Base.new.execute(ARGV)
6
-
5
+ Machines::Commandline.execute(ARGV)
@@ -1,6 +1,7 @@
1
1
  # Machines allows simple configuration of development, staging and production computers or images for ec2
2
2
  require 'active_support'
3
3
  require 'app_conf'
4
+ require 'date'
4
5
  require 'erb'
5
6
  require 'fileutils'
6
7
  require 'highline/import'
@@ -15,5 +16,19 @@ require 'yaml'
15
16
  $conf = AppConf.new
16
17
  $conf.application_dir = File.dirname(__FILE__)
17
18
 
18
- require 'machines/base'
19
+ files = Dir[File.join($conf.application_dir, 'machines/commands/*.rb')]
20
+ files.sort.each do |file|
21
+ require file
22
+ end
23
+
24
+ require 'machines/logger'
25
+ require 'machines/named_buffer'
26
+ require 'machines/app_settings'
27
+ require 'machines/command'
28
+ require 'machines/log_command'
29
+ require 'machines/upload'
30
+ require 'machines/core'
31
+ require 'machines/commandline'
32
+ require 'machines/cloud_machine'
33
+ require 'machines/help'
19
34