taperole 2.0.6 → 2.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f5b3693d4c2374e8670a819d8928300364b5b620
4
- data.tar.gz: f6480a756202450260f116c6567e1014e9188ca7
3
+ metadata.gz: 5beb90566bc6af152ef963be074a7c3649391035
4
+ data.tar.gz: b2a4c4a5eee178a6fb0731adc65d263955e0420c
5
5
  SHA512:
6
- metadata.gz: 67c48721bcb96906abdb8eb15acab63309571aaa25259e7d444a7312cf881a90ffd5b4d64e210838ffb0b0eee94b12bc4a6c9be7c4a77086d0a053e121a40ed8
7
- data.tar.gz: fd02631e6fc92ba0d24e9dec2937cd26c54415dba834270b679a570f8e095761441a9ff9a672817aad41129baf4d397daa3b00eb801312533f5cdd6947b597a4
6
+ metadata.gz: b627d9e2ec359f728ca296a856f491b5877499f99cbe328f41dbf0826e4e612c5584537313fa9068acf16613e4072378ce4ff904f91de8c194e3b4734793ede3
7
+ data.tar.gz: 553e1d708b09dcec6187a73a1f54392f23078486b4518a9a194ac6de857cd4ad653da59755ea567a8070485bb30da6c63a2602469abb133b41365c47af1ab20a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ### 2.0.7
2
+ * Cleanup to the puma configs installed on a server
3
+ * omnibox.yml is now provision.yml
4
+ * Fixes bugs for redis where pidfile was in wrong location
5
+ * Increase default swapfile saize
6
+
7
+ ### 2.0.6
8
+ * Disable public key pinning so you don't brick your site
9
+
1
10
  ### 2.0.5
2
11
  * Fixes letsencrypt bugs
3
12
  * Uses letsencrypt hooks when renewing cert
data/README.md CHANGED
@@ -75,7 +75,7 @@ backup_hosts:
75
75
  ### Custom roles
76
76
  You can add app specific ansible roles to `<app_root>/roles`.
77
77
 
78
- You must then specify the roles you want to use in `omnibox.yml` or `deploy.yml`
78
+ You must then specify the roles you want to use in `provision.yml` or `deploy.yml`
79
79
 
80
80
  [Read the Ansible docs on playbook roles here](http://docs.ansible.com/playbooks_roles.html)
81
81
 
@@ -28,7 +28,7 @@ module Taperole
28
28
  end
29
29
 
30
30
  def ansible(args: '', options: {})
31
- exec_ansible("#{tapefiles_dir}/omnibox.yml", args, options)
31
+ exec_ansible("#{tapefiles_dir}/provision.yml", args, options)
32
32
  end
33
33
 
34
34
  def ansible_deploy(args: '', options: {})
@@ -18,7 +18,7 @@ module Taperole
18
18
  end
19
19
 
20
20
  def uninstall_tape
21
- rm "#{tapefiles_dir}/omnibox.yml"
21
+ rm "#{tapefiles_dir}/provision.yml"
22
22
  rm "#{tapefiles_dir}/deploy.yml"
23
23
  rm "#{tapefiles_dir}/tape_vars.yml"
24
24
  rm "#{tapefiles_dir}/rake.yml"
@@ -45,7 +45,7 @@ module Taperole
45
45
  end
46
46
 
47
47
  def copy_static_app_examples
48
- %w(omnibox deploy tape_vars).each do |base_filename|
48
+ %w(provision deploy tape_vars).each do |base_filename|
49
49
  copy_example(
50
50
  "templates/static_html/#{base_filename}.example.yml",
51
51
  "#{tapefiles_dir}/#{base_filename}.yml"
@@ -54,7 +54,7 @@ module Taperole
54
54
  end
55
55
 
56
56
  def copy_basic_examples
57
- %w(omnibox deploy tape_vars rake).each do |base_filename|
57
+ %w(provision deploy tape_vars rake).each do |base_filename|
58
58
  copy_example(
59
59
  "templates/base/#{base_filename}.example.yml",
60
60
  "#{tapefiles_dir}/#{base_filename}.yml"
@@ -1,3 +1,3 @@
1
1
  module Taperole
2
- VERSION = '2.0.6'.freeze
2
+ VERSION = '2.0.7'.freeze
3
3
  end
@@ -16,6 +16,12 @@
16
16
  - name: Put the swap entry into fstab
17
17
  mount: name=none src={{ swap_file.path }} fstype=swap opts=sw passno=0 dump=0 state=present
18
18
 
19
+ - name: Check swapon swapfile
20
+ shell: swapon | grep "{{ swap_file.path }}"
21
+ ignore_errors: True
22
+ register: swap_file_is_on
23
+
19
24
  - name: Swapon swapfile
20
25
  command: swapon {{ swap_file.path }}
21
- when: ansible_swaptotal_mb < 1
26
+ when: swap_file_is_on.stdout == ""
27
+
@@ -4,6 +4,8 @@ workers {{puma_workers}}
4
4
  # Min and Max threads per worker
5
5
  threads 1, 6
6
6
 
7
+ daemonize
8
+
7
9
  # Default to production
8
10
  rails_env = "{{be_app_env}}"
9
11
  environment rails_env
@@ -16,7 +16,6 @@
16
16
  # This monit wrapper script will be called by monit as root
17
17
  # Edit these variables to your liking
18
18
 
19
- RAILS_ENV={{ be_app_env }}
20
19
  USER={{ deployer_user.name }}
21
20
  APP_DIR={{ be_app_path }}
22
21
  PUMA_CONFIG_FILE=$APP_DIR/config/puma.production.rb
@@ -48,8 +47,8 @@ case "$1" in
48
47
  rm -f $PUMA_SOCKET
49
48
 
50
49
  if [ -e $PUMA_CONFIG_FILE ] ; then
51
- echo "cd $APP_DIR && RAILS_ENV=$RAILS_ENV bundle exec puma -C $PUMA_CONFIG_FILE --daemon"
52
- /bin/su - $USER -c "cd $APP_DIR && RAILS_ENV=$RAILS_ENV bundle exec puma -C $PUMA_CONFIG_FILE --daemon"
50
+ echo "cd $APP_DIR && bundle exec puma -C $PUMA_CONFIG_FILE --daemon"
51
+ /bin/su - $USER -c "cd $APP_DIR && bundle exec puma -C $PUMA_CONFIG_FILE --daemon"
53
52
  else
54
53
  echo "ERROR: No config file found in $PUMA_CONFIG_FILE"
55
54
  fi
@@ -59,8 +58,8 @@ case "$1" in
59
58
 
60
59
  stop)
61
60
  echo "Stopping puma..."
62
- echo "cd $APP_DIR && RAILS_ENV=$RAILS_ENV bundle exec pumactl stop"
63
- /bin/su - $USER -c "cd $APP_DIR && RAILS_ENV=$RAILS_ENV bundle exec pumactl --config-file $PUMA_CONFIG_FILE stop"
61
+ echo "cd $APP_DIR && bundle exec pumactl stop"
62
+ /bin/su - $USER -c "cd $APP_DIR && bundle exec pumactl --config-file $PUMA_CONFIG_FILE stop"
64
63
  rm -f $PUMA_PID_FILE
65
64
  rm -f $PUMA_SOCKET
66
65
 
@@ -70,7 +69,7 @@ case "$1" in
70
69
  restart)
71
70
  if puma_is_running ; then
72
71
  echo "Hot-restarting puma..."
73
- /bin/su - $USER -c "cd $APP_DIR && RAILS_ENV=$RAILS_ENV bundle exec pumactl --config-file $PUMA_CONFIG_FILE restart"
72
+ /bin/su - $USER -c "cd $APP_DIR && bundle exec pumactl --config-file $PUMA_CONFIG_FILE restart"
74
73
 
75
74
  echo "Doublechecking the process restart..."
76
75
  sleep 15
@@ -3,4 +3,3 @@ check process puma
3
3
  start program = "/etc/init.d/puma start"
4
4
  stop program = "/etc/init.d/puma stop"
5
5
  restart program = "/etc/init.d/puma restart"
6
- group myapp
@@ -1,5 +1,5 @@
1
1
  check process redis-server
2
- with pidfile "/var/run/redis/redis.pid"
2
+ with pidfile "/var/run/redis/redis-server.pid"
3
3
  start program = "/etc/init.d/redis-server start"
4
4
  stop program = "/etc/init.d/redis-server stop"
5
5
  if 2 restarts within 3 cycles then timeout
@@ -30,8 +30,8 @@ describe Taperole::Commands::Installer do
30
30
  expect(taperole).to include('deploy.yml')
31
31
  end
32
32
 
33
- it 'creates omnibox.yml' do
34
- expect(taperole).to include('omnibox.yml')
33
+ it 'creates provision.yml' do
34
+ expect(taperole).to include('provision.yml')
35
35
  end
36
36
 
37
37
  it 'creates tape_vars.yml' do
@@ -46,8 +46,8 @@ describe Taperole::Commands::Installer do
46
46
  expect(taperole).to include('deploy.yml')
47
47
  end
48
48
 
49
- it 'creates omnibox.yml' do
50
- expect(taperole).to include('omnibox.yml')
49
+ it 'creates provision.yml' do
50
+ expect(taperole).to include('provision.yml')
51
51
  end
52
52
 
53
53
  it 'creates tape_vars.yml' do
@@ -71,7 +71,7 @@ describe Taperole::Commands::Installer do
71
71
  describe '#uninstall' do
72
72
  let(:setup) do
73
73
  Dir.mkdir("#{Dir.pwd}/taperole")
74
- FileUtils.touch("#{Dir.pwd}/taperole/omnibox.yml")
74
+ FileUtils.touch("#{Dir.pwd}/taperole/provision.yml")
75
75
  FileUtils.touch("#{Dir.pwd}/taperole/deploy.yml")
76
76
  FileUtils.touch("#{Dir.pwd}/taperole/tape_vars.yml")
77
77
  FileUtils.touch("#{Dir.pwd}/taperole/rake.yml")
@@ -82,8 +82,8 @@ describe Taperole::Commands::Installer do
82
82
  end
83
83
  let(:command) { :uninstall }
84
84
 
85
- it 'removes omnibox.yml' do
86
- expect(taperole).to_not include('omnibox.yml')
85
+ it 'removes provision.yml' do
86
+ expect(taperole).to_not include('provision.yml')
87
87
  end
88
88
 
89
89
  it 'removes deploy.yml' do
@@ -20,7 +20,7 @@ ADD ./test/rails/tape_vars.yml taperole/tape_vars.yml
20
20
 
21
21
  # FIXME
22
22
  # Disable ufw bc docker gets mad about iptables
23
- RUN sed -i '/ufw/d' taperole/omnibox.yml
23
+ RUN sed -i '/ufw/d' taperole/provision.yml
24
24
 
25
25
  # Run Tape
26
26
  RUN echo '[omnibox]' > taperole/hosts
data/vars/defaults.yml CHANGED
@@ -22,7 +22,7 @@ puma_sockfile: "{{ be_app_path }}/tmp/puma_{{ app_name }}.sock"
22
22
 
23
23
  swap_file:
24
24
  path: /swp
25
- size_kb: "{{ 1024 * 1024 }}"
25
+ size_kb: "{{ 3 * 1024 * 1024 }}"
26
26
 
27
27
  # echo 'password' | md5
28
28
  database_password: 286755fad04869ca523320acce0dc6a4
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taperole
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.6
4
+ version: 2.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jack Forrest
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-07-07 00:00:00.000000000 Z
13
+ date: 2017-08-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: slack-notifier
@@ -200,11 +200,11 @@ files:
200
200
  - taperole.gemspec
201
201
  - templates/base/deploy.example.yml
202
202
  - templates/base/hosts.example
203
- - templates/base/omnibox.example.yml
203
+ - templates/base/provision.example.yml
204
204
  - templates/base/rake.example.yml
205
205
  - templates/base/tape_vars.example.yml
206
206
  - templates/static_html/deploy.example.yml
207
- - templates/static_html/omnibox.example.yml
207
+ - templates/static_html/provision.example.yml
208
208
  - templates/static_html/tape_vars.example.yml
209
209
  - test/base_docker_box/Dockerfile
210
210
  - test/rails/Dockerfile