meroku 0.1.28 → 0.1.29
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/meroku/cli/server.rb +4 -0
- data/lib/meroku/util.rb +9 -0
- data/lib/meroku/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d764a870071558fda93284c67109ccafecde4b9f
|
4
|
+
data.tar.gz: 5f089e9a1b05d74a30278b2e9ef1a7d7e52b56be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c394547a01d935944fa778b72dbec5ae6207e00767ccf6d43bac0fa4552e2d36a59f70097affed04f3bef8ef9ebda51d061374f3fede5551fbcba063123ac9da
|
7
|
+
data.tar.gz: afa779b70087d5015ae70b95769a3979e2391b3d5c450b7ac154a8e418aec7352010d3c628deee32770baa9557ae4f149b7d18b10fa35569f5d0d50a6f4317e0
|
data/lib/meroku/cli/server.rb
CHANGED
@@ -43,6 +43,7 @@ module Meroku
|
|
43
43
|
ssh3("34.239.241.218","sudo rm -f /tmp/home_dirs.tgz || true; sudo tar --exclude='/home/bitnami' -zcvf /tmp/home_dirs.gz /home/*")
|
44
44
|
ssh("34.239.241.218","#{aws_exports} aws s3 cp /tmp/home_dirs.gz s3://meroku-database-backups/")
|
45
45
|
ssh("34.239.241.218","#{aws_exports} aws s3 cp s3://meroku-database-backups/home_dirs.gz s3://meroku-database-backups/#{timestamp}.home_dirs.gz")
|
46
|
+
|
46
47
|
# CLEANUP
|
47
48
|
ssh("34.239.241.218","sudo rm -f /tmp/*.mysql.gz /tmp/*.postgres.gz /tmp/home_dirs.gz")
|
48
49
|
end
|
@@ -132,9 +133,12 @@ module Meroku
|
|
132
133
|
ssh3(ip,"#{aws_exports} cd /; sudo tar xzvf /tmp/home_dirs.gz")
|
133
134
|
ssh3(ip,"sudo rm -f /tmp/home_dirs.gz")
|
134
135
|
|
136
|
+
ssh3(ip,"cd meroku/rails_app; RAILS_ENV=production rake rvm:rebuild")
|
137
|
+
|
135
138
|
ssh3(ip,"cd meroku/rails_app; SECRET_KEY_BASE=fixme rake assets:precompile")
|
136
139
|
ssh3(ip,"cd meroku/rails_app; RAILS_SERVE_STATIC_FILES=1 SECRET_KEY_BASE=fixme rails s -e production -d -b 0.0.0.0 && sleep 5")
|
137
140
|
|
141
|
+
|
138
142
|
# start customer rails apps here wipwip
|
139
143
|
|
140
144
|
ssh3(ip,"sudo /opt/bitnami/ctlscript.sh stop apache")
|
data/lib/meroku/util.rb
CHANGED
@@ -122,6 +122,15 @@ module Meroku
|
|
122
122
|
`sudo -i -u u#{self.id} /bin/bash -c 'curl -sSL https://get.rvm.io | bash'`
|
123
123
|
end
|
124
124
|
|
125
|
+
|
126
|
+
def install_rvm_for_users
|
127
|
+
puts "DB8 #{Meroku::User.all.size} users to install rvm to..."
|
128
|
+
Meroku::User.all.each do |user|
|
129
|
+
puts "DB8 Installing rvm for Adding #{user.id} #{user.email}"
|
130
|
+
ssh3(ip, "sudo -i -u u#{user.id} /bin/bash -c 'curl -sSL https://get.rvm.io | bash'")
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
125
134
|
def public_key_exists?
|
126
135
|
File.exist?(Dir.home + "/.ssh/id_rsa.pub")
|
127
136
|
end
|
data/lib/meroku/version.rb
CHANGED