taperole 2.0.6 → 2.0.7
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 +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +1 -1
- data/lib/taperole/core/ansible_runner.rb +1 -1
- data/lib/taperole/core/installer.rb +3 -3
- data/lib/taperole/version.rb +1 -1
- data/roles/general/tasks/swapfile.yml +7 -1
- data/roles/puma_install/templates/puma.production.rb.j2 +2 -0
- data/roles/puma_install/templates/puma_init.j2 +5 -6
- data/roles/puma_install/templates/puma_monit.j2 +0 -1
- data/roles/redis/templates/redis.j2 +1 -1
- data/spec/commands/installer_spec.rb +7 -7
- data/templates/base/{omnibox.example.yml → provision.example.yml} +0 -0
- data/templates/static_html/{omnibox.example.yml → provision.example.yml} +0 -0
- data/test/rails/Dockerfile +1 -1
- data/vars/defaults.yml +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5beb90566bc6af152ef963be074a7c3649391035
|
4
|
+
data.tar.gz: b2a4c4a5eee178a6fb0731adc65d263955e0420c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 `
|
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
|
|
@@ -18,7 +18,7 @@ module Taperole
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def uninstall_tape
|
21
|
-
rm "#{tapefiles_dir}/
|
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(
|
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(
|
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"
|
data/lib/taperole/version.rb
CHANGED
@@ -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:
|
26
|
+
when: swap_file_is_on.stdout == ""
|
27
|
+
|
@@ -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 &&
|
52
|
-
/bin/su - $USER -c "cd $APP_DIR &&
|
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 &&
|
63
|
-
/bin/su - $USER -c "cd $APP_DIR &&
|
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 &&
|
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
|
@@ -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
|
34
|
-
expect(taperole).to include('
|
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
|
50
|
-
expect(taperole).to include('
|
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/
|
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
|
86
|
-
expect(taperole).to_not include('
|
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
|
File without changes
|
File without changes
|
data/test/rails/Dockerfile
CHANGED
@@ -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/
|
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
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.
|
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-
|
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/
|
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/
|
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
|