alphonse 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eca6476d4582e41a9876f51298289244287cf23c
4
- data.tar.gz: f190e28637afb81af3a5e26e0e08b4c3ec8b0a60
3
+ metadata.gz: 0e62eb740aaa3582c44b98cb88081880d2b62d09
4
+ data.tar.gz: 30ca2e601d5c3cfcc8d70570558cd8608c89c6a2
5
5
  SHA512:
6
- metadata.gz: 683cb5795d84008e488f0a87e9503657422f7436c350ca370847137cc1b145cadd0e95d9cdf83fa9de03d698c4cccadf268ef95c23cef99539e45c26d126d330
7
- data.tar.gz: 69fdfb30730d9ebdc52dc6d4a7d6111d43fa906fd3337a122dc89f45120de74a026de9cf31f54fedd14c3374f938966b86cd23ae0e139c00b5a0d94fa7aebae7
6
+ metadata.gz: 9ea7cf8ed79c288d48442bc4e60f3175fb0b770959912c4ce1349dfc6a1e4aa9fe199fe6f9d893bd40e6b389aea7af88bc488f299de3d31434156083b1a47ad9
7
+ data.tar.gz: e406f25c7c356fbd597df5a4530b0f5962b0c95cede53c816032b905a27cef93973f2b3f89c0eeb28a9c7253d34a793e3ceac42338ffcfee5a4554cd9f047bb9
data/README.md CHANGED
@@ -1,20 +1,70 @@
1
1
  # Alphonse
2
2
 
3
- Deployment gem
3
+ Deploy like the fonz with this simple deployment gem.
4
4
 
5
5
  ## Installation
6
6
 
7
+ 1. Either `gem install alphonse` or add it to your Gemfile `gem "alphonse", "~> 0.0.4"`.
8
+ 2. Navigate to the directory in which you wish to use alphonse.
9
+ 3. Run `alphonse init` - this will generate the default Fonzfile.
10
+ 4. Edit the Fonzfile to suit your app and deployment operations required.
7
11
 
8
12
  ## Usage
9
13
 
10
- TODO: Write usage instructions here
14
+ Once you have finished optmising the Fonzfile with the specific operations configurations, run the operations using `alphonse [OPERATION] [OPTIONS]`:
11
15
 
16
+ `alphonse setup`
17
+ `alphonse deploy -e staging` (the environment will be used when running rake tasks)
18
+ `alphonse update --verbose` (verbose will return the output of each command irrelevant of success or failure)
19
+
20
+ ### Task
21
+
22
+ A Task is a set of simple commands that are to be run in sequence. For example, the preset :clone_repository action consists of the following commands used to clone a git repository:
23
+
24
+ `"git checkout master -q", "git pull origin master -q", "git gc --aggressive"`
25
+
26
+ ### Operation
27
+
28
+ An Operation is in turn a collection of Tasks which are run in sequence. For example, the present :deploy operation consists of the following Tasks which could be considered necessary for a Rails app deployment
29
+
30
+ ```ruby :install_gems, :setup_database, :restart_app```
31
+
32
+ ### Example Fonzfile
33
+
34
+ ```ruby
35
+ # Settings
36
+ user 'remote_user'
37
+ app_name 'application_name'
38
+ hosts 'stage.example.com'
39
+ path "/fullpath/to/folder"
40
+ git_repo 'git@gitaddress:application_name.git'
41
+ branch 'master'
42
+ ruby_bin_path '/path/to/ruby/'
43
+ start_command 'start_app command'
44
+ restart_command 'restart_app command' # E.g. 'touch tmp/restart.txt'
45
+
46
+ operation :setup, 'Setup server' do
47
+ tasks :setup_directory
48
+ end
49
+
50
+ operation :deploy, 'Deploy repository' do
51
+ tasks :clone_repository, :install_gems, :setup_database, :start_app
52
+ end
53
+
54
+ operation :update, 'Update the repository on the server' do
55
+ tasks :update_repository, :install_gems, :update_database, :restart_app
56
+ end
57
+
58
+ operation :restart, 'Restart application' do
59
+ tasks :restart_app
60
+ end
61
+ ```
12
62
 
13
63
  ## Note
14
64
 
15
65
  Chances are you will experience issues with PATH variables and rubygems etc. So here's a quick solution:
16
66
 
17
- Log in to your deployment server, as a root user, add the following line to /etc/ssh/sshd_config:
67
+ Log in to your server, as a root user, add the following line to /etc/ssh/sshd_config:
18
68
 
19
69
  PermitUserEnvironment yes
20
70
 
@@ -6,13 +6,14 @@ path "/fullpath/to/folder"
6
6
  git_repo 'git@gitaddress:repository.git'
7
7
  branch 'master'
8
8
  ruby_bin_path '/path/to/ruby/'
9
+ restart_command 'touch tmp/restart.txt'
9
10
 
10
11
  operation :setup, 'Setup server' do
11
12
  tasks :setup_directory
12
13
  end
13
14
 
14
15
  operation :deploy, 'Deploy repository' do
15
- tasks :clone_repository, :install_gems, :setup_database, :restart_app
16
+ tasks :clone_repository, :install_gems, :setup_database, :start_app
16
17
  end
17
18
 
18
19
  operation :update, 'Update the repository on the server' do
@@ -31,4 +32,5 @@ end
31
32
  # install_gems
32
33
  # setup_database
33
34
  # update_database
35
+ # start_app
34
36
  # restart_app
@@ -2,7 +2,7 @@ module Alphonse
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- TINY = 4
5
+ TINY = 5
6
6
  PRE = nil
7
7
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alphonse
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Jones