smartmachine 0.8.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +661 -0
- data/README.md +147 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/exe/smartmachine +3 -0
- data/lib/smart_machine/apps/app.rb +165 -181
- data/lib/smart_machine/apps/container.rb +120 -0
- data/lib/smart_machine/apps/manager.rb +182 -0
- data/lib/smart_machine/base.rb +24 -6
- data/lib/smart_machine/buildpackers/buildpacker.rb +95 -0
- data/lib/smart_machine/{engine/buildpacks → buildpackers}/rails/Dockerfile +3 -3
- data/lib/smart_machine/buildpackers/rails.rb +221 -0
- data/lib/smart_machine/commands/app.rb +112 -0
- data/lib/smart_machine/commands/buildpacker.rb +53 -0
- data/lib/smart_machine/commands/credentials.rb +17 -0
- data/lib/smart_machine/commands/docker.rb +23 -0
- data/lib/smart_machine/commands/engine.rb +27 -0
- data/lib/smart_machine/commands/grid.rb +33 -0
- data/lib/smart_machine/commands/grid_commands/elasticsearch.rb +68 -0
- data/lib/smart_machine/commands/grid_commands/minio.rb +65 -0
- data/lib/smart_machine/commands/grid_commands/mysql.rb +71 -0
- data/lib/smart_machine/commands/grid_commands/nginx.rb +53 -0
- data/lib/smart_machine/commands/grid_commands/prereceiver.rb +96 -0
- data/lib/smart_machine/commands/grid_commands/redis.rb +65 -0
- data/lib/smart_machine/commands/grid_commands/scheduler.rb +15 -0
- data/lib/smart_machine/commands/grid_commands/sub_thor.rb +15 -0
- data/lib/smart_machine/commands/machine.rb +24 -0
- data/lib/smart_machine/commands/syncer.rb +23 -0
- data/lib/smart_machine/commands/utilities.rb +37 -0
- data/lib/smart_machine/commands.rb +66 -0
- data/lib/smart_machine/configuration.rb +79 -0
- data/lib/smart_machine/credentials.rb +93 -95
- data/lib/smart_machine/docker.rb +144 -143
- data/lib/smart_machine/engine/Dockerfile +7 -5
- data/lib/smart_machine/engine.rb +104 -79
- data/lib/smart_machine/grids/elasticsearch.rb +70 -89
- data/lib/smart_machine/grids/minio.rb +79 -68
- data/lib/smart_machine/grids/mysql.rb +207 -202
- data/lib/smart_machine/grids/nginx.rb +176 -135
- data/lib/smart_machine/grids/prereceiver/Dockerfile +2 -2
- data/lib/smart_machine/grids/prereceiver/pre-receive +17 -0
- data/lib/smart_machine/grids/prereceiver.rb +169 -169
- data/lib/smart_machine/grids/redis.rb +75 -57
- data/lib/smart_machine/grids/scheduler/Dockerfile +1 -1
- data/lib/smart_machine/logger.rb +26 -26
- data/lib/smart_machine/machine.rb +128 -194
- data/lib/smart_machine/scp.rb +15 -0
- data/lib/smart_machine/ssh.rb +69 -40
- data/lib/smart_machine/syncer.rb +133 -0
- data/lib/smart_machine/templates/dotsmartmachine/Gemfile +7 -0
- data/lib/smart_machine/templates/dotsmartmachine/config/elasticsearch.yml +5 -0
- data/lib/smart_machine/templates/dotsmartmachine/config/environment.rb +0 -9
- data/lib/smart_machine/templates/dotsmartmachine/config/minio.yml +13 -0
- data/lib/smart_machine/templates/dotsmartmachine/config/mysql/schedule.rb +3 -3
- data/lib/smart_machine/templates/dotsmartmachine/config/mysql.yml +13 -0
- data/lib/smart_machine/templates/dotsmartmachine/config/prereceiver.yml +7 -0
- data/lib/smart_machine/templates/dotsmartmachine/config/redis.yml +15 -0
- data/lib/smart_machine/templates/dotsmartmachine/config/users.yml +1 -1
- data/lib/smart_machine/templates/dotsmartmachine/gitignore-template +47 -0
- data/lib/smart_machine/templates/dotsmartmachine/{grids/elasticsearch/data → vendor}/.keep +0 -0
- data/lib/smart_machine/version.rb +30 -6
- data/lib/smart_machine.rb +42 -16
- metadata +97 -47
- data/CHANGELOG.rdoc +0 -0
- data/MIT-LICENSE +0 -21
- data/README.rdoc +0 -87
- data/bin/buildpacker +0 -8
- data/bin/prereceiver +0 -8
- data/bin/scheduler +0 -18
- data/bin/smartmachine +0 -81
- data/bin/smartrunner +0 -33
- data/lib/smart_machine/apps/rails.rb +0 -250
- data/lib/smart_machine/apps.rb +0 -14
- data/lib/smart_machine/boot.rb +0 -32
- data/lib/smart_machine/buildpacker.rb +0 -106
- data/lib/smart_machine/gem_version.rb +0 -17
- data/lib/smart_machine/grids.rb +0 -18
- data/lib/smart_machine/sync.rb +0 -120
- data/lib/smart_machine/templates/dotsmartmachine/grids/elasticsearch/logs/.keep +0 -0
- data/lib/smart_machine/templates/dotsmartmachine/grids/minio/data/.keep +0 -0
- data/lib/smart_machine/templates/dotsmartmachine/grids/mysql/backups/.keep +0 -0
- data/lib/smart_machine/templates/dotsmartmachine/grids/mysql/data/.keep +0 -0
- data/lib/smart_machine/templates/dotsmartmachine/grids/prereceiver/pre-receive +0 -17
- data/lib/smart_machine/templates/dotsmartmachine/grids/redis/data/.keep +0 -0
- data/lib/smart_machine/user.rb +0 -38
@@ -0,0 +1,13 @@
|
|
1
|
+
mysqlone:
|
2
|
+
port: 3306
|
3
|
+
root_password: <%= SmartMachine.credentials.dig(:mysqlone, :root_password) %>
|
4
|
+
username: <%= SmartMachine.credentials.dig(:mysqlone, :username) %>
|
5
|
+
password: <%= SmartMachine.credentials.dig(:mysqlone, :password) %>
|
6
|
+
database_name: <%= SmartMachine.credentials.dig(:mysqlone, :database_name) %>
|
7
|
+
|
8
|
+
# mysqltwo:
|
9
|
+
# port: 3307
|
10
|
+
# root_password: <%= SmartMachine.credentials.dig(:mysqltwo, :root_password) %>
|
11
|
+
# username: <%= SmartMachine.credentials.dig(:mysqltwo, :username) %>
|
12
|
+
# password: <%= SmartMachine.credentials.dig(:mysqltwo, :password) %>
|
13
|
+
# database_name: <%= SmartMachine.credentials.dig(:mysqltwo, :database_name) %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
redisone:
|
2
|
+
port: 6379
|
3
|
+
password: <%= SmartMachine.credentials.dig(:redisone, :password) %>
|
4
|
+
appendonly: "yes"
|
5
|
+
maxmemory: 250MB
|
6
|
+
maxmemory_policy: allkeys-lfu
|
7
|
+
modules: []
|
8
|
+
|
9
|
+
# redistwo:
|
10
|
+
# port: 6380
|
11
|
+
# password: <%= SmartMachine.credentials.dig(:redistwo, :password) %>
|
12
|
+
# appendonly: "yes"
|
13
|
+
# maxmemory: 250MB
|
14
|
+
# maxmemory_policy: allkeys-lfu
|
15
|
+
# modules: []
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
|
2
|
+
#
|
3
|
+
# If you find yourself ignoring temporary files generated by your text editor
|
4
|
+
# or operating system, you probably want to add a global ignore instead:
|
5
|
+
# git config --global core.excludesfile '~/.gitignore_global'
|
6
|
+
|
7
|
+
# Ignore bundler config.
|
8
|
+
/.bundle
|
9
|
+
|
10
|
+
# Ignore all logfiles and tempfiles.
|
11
|
+
/log/*
|
12
|
+
/tmp/*
|
13
|
+
!/log/.keep
|
14
|
+
!/tmp/.keep
|
15
|
+
|
16
|
+
# Ignore master key for decrypting credentials and more.
|
17
|
+
/config/master.key
|
18
|
+
|
19
|
+
# Environment Variables
|
20
|
+
.env
|
21
|
+
|
22
|
+
# Docs
|
23
|
+
/docs/*
|
24
|
+
!/docs/source/
|
25
|
+
|
26
|
+
# ---------- Mac ---------- #
|
27
|
+
|
28
|
+
.DS_Store
|
29
|
+
.AppleDouble
|
30
|
+
.LSOverride
|
31
|
+
|
32
|
+
# Icon must end with two \r
|
33
|
+
Icon
|
34
|
+
|
35
|
+
# Thumbnails
|
36
|
+
._*
|
37
|
+
|
38
|
+
# Files that might appear on external disk
|
39
|
+
.Spotlight-V100
|
40
|
+
.Trashes
|
41
|
+
|
42
|
+
# Directories potentially created on remote AFP share
|
43
|
+
.AppleDB
|
44
|
+
.AppleDesktop
|
45
|
+
Network Trash Folder
|
46
|
+
Temporary Items
|
47
|
+
.apdisk
|
File without changes
|
@@ -1,10 +1,34 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative "gem_version"
|
4
|
-
|
5
3
|
module SmartMachine
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
4
|
+
# Returns the version of the currently loaded SmartMachine as a <tt>Gem::Version</tt>.
|
5
|
+
def self.gem_version
|
6
|
+
Gem::Version.new VERSION::STRING
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.version
|
10
|
+
self.gem_version.to_s
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.ruby_version
|
14
|
+
RUBY_VERSION::STRING
|
15
|
+
end
|
16
|
+
|
17
|
+
module VERSION
|
18
|
+
MAJOR = 1
|
19
|
+
MINOR = 0
|
20
|
+
TINY = 0
|
21
|
+
PRE = nil
|
22
|
+
|
23
|
+
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
|
24
|
+
end
|
25
|
+
|
26
|
+
module RUBY_VERSION
|
27
|
+
MAJOR = 2
|
28
|
+
MINOR = 7
|
29
|
+
TINY = 0
|
30
|
+
PRE = nil
|
31
|
+
|
32
|
+
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
|
33
|
+
end
|
10
34
|
end
|
data/lib/smart_machine.rb
CHANGED
@@ -1,24 +1,50 @@
|
|
1
1
|
require "ostruct"
|
2
2
|
require "yaml"
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
def self.config
|
7
|
-
@@config ||= OpenStruct.new
|
8
|
-
end
|
4
|
+
require 'smart_machine/version'
|
5
|
+
require 'smart_machine/base'
|
9
6
|
|
10
|
-
|
11
|
-
|
12
|
-
end
|
13
|
-
end
|
7
|
+
require 'smart_machine/configuration'
|
8
|
+
require 'smart_machine/credentials'
|
14
9
|
|
15
|
-
require 'smart_machine/
|
10
|
+
require 'smart_machine/scp'
|
11
|
+
require 'smart_machine/ssh'
|
12
|
+
require 'smart_machine/machine'
|
13
|
+
|
14
|
+
require 'smart_machine/docker'
|
15
|
+
require 'smart_machine/engine'
|
16
|
+
require 'smart_machine/syncer'
|
17
|
+
|
18
|
+
require 'smart_machine/apps/app'
|
19
|
+
require 'smart_machine/apps/container'
|
20
|
+
require 'smart_machine/apps/manager'
|
16
21
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
22
|
+
require 'smart_machine/buildpackers/buildpacker'
|
23
|
+
require 'smart_machine/buildpackers/rails'
|
24
|
+
|
25
|
+
require 'smart_machine/grids/elasticsearch'
|
26
|
+
require 'smart_machine/grids/minio'
|
27
|
+
require 'smart_machine/grids/mysql'
|
28
|
+
require 'smart_machine/grids/nginx'
|
29
|
+
require 'smart_machine/grids/prereceiver'
|
30
|
+
require 'smart_machine/grids/redis'
|
31
|
+
# require 'smart_machine/grids/scheduler'
|
32
|
+
# require 'smart_machine/grids/solr'
|
33
|
+
|
34
|
+
module SmartMachine
|
35
|
+
class Error < StandardError; end
|
36
|
+
|
37
|
+
def self.credentials
|
38
|
+
@@credentials ||= OpenStruct.new(SmartMachine::Credentials.new.config)
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.config
|
42
|
+
@@config ||= OpenStruct.new(SmartMachine::Configuration.new.config)
|
43
|
+
end
|
21
44
|
end
|
22
45
|
|
23
|
-
|
24
|
-
|
46
|
+
SmartMachine.config.gem_dir = Gem::Specification.find_by_name("smartmachine").gem_dir
|
47
|
+
# This will only work inside the smartmachine engine.
|
48
|
+
if File.exist?("#{File.expand_path('~')}/machine/config/environment.rb")
|
49
|
+
require "#{File.expand_path('~')}/machine/config/environment"
|
50
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smartmachine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- plainsource
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '6.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '6.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bcrypt
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,6 +58,46 @@ dependencies:
|
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '6.0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: thor
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '1.0'
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: 1.0.1
|
71
|
+
type: :runtime
|
72
|
+
prerelease: false
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - "~>"
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '1.0'
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: 1.0.1
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: bundler
|
83
|
+
requirement: !ruby/object:Gem::Requirement
|
84
|
+
requirements:
|
85
|
+
- - ">="
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: 2.1.4
|
88
|
+
- - "<"
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: 3.0.0
|
91
|
+
type: :runtime
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: 2.1.4
|
98
|
+
- - "<"
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: 3.0.0
|
61
101
|
- !ruby/object:Gem::Dependency
|
62
102
|
name: whenever
|
63
103
|
requirement: !ruby/object:Gem::Requirement
|
@@ -75,39 +115,48 @@ dependencies:
|
|
75
115
|
description: SmartMachine is a full-stack deployment framework for rails optimized
|
76
116
|
for admin programmer happiness and peaceful administration. It encourages natural
|
77
117
|
simplicity by favoring convention over configuration.
|
78
|
-
email:
|
118
|
+
email: plainsource@humanmind.me
|
79
119
|
executables:
|
80
|
-
- buildpacker
|
81
|
-
- prereceiver
|
82
|
-
- scheduler
|
83
120
|
- smartmachine
|
84
|
-
- smartrunner
|
85
121
|
extensions: []
|
86
|
-
extra_rdoc_files:
|
87
|
-
- README.rdoc
|
122
|
+
extra_rdoc_files: []
|
88
123
|
files:
|
89
|
-
-
|
90
|
-
-
|
91
|
-
-
|
92
|
-
- bin/
|
93
|
-
-
|
94
|
-
- bin/scheduler
|
95
|
-
- bin/smartmachine
|
96
|
-
- bin/smartrunner
|
124
|
+
- LICENSE.txt
|
125
|
+
- README.md
|
126
|
+
- bin/console
|
127
|
+
- bin/setup
|
128
|
+
- exe/smartmachine
|
97
129
|
- lib/smart_machine.rb
|
98
|
-
- lib/smart_machine/apps.rb
|
99
130
|
- lib/smart_machine/apps/app.rb
|
100
|
-
- lib/smart_machine/apps/
|
131
|
+
- lib/smart_machine/apps/container.rb
|
132
|
+
- lib/smart_machine/apps/manager.rb
|
101
133
|
- lib/smart_machine/base.rb
|
102
|
-
- lib/smart_machine/
|
103
|
-
- lib/smart_machine/
|
134
|
+
- lib/smart_machine/buildpackers/buildpacker.rb
|
135
|
+
- lib/smart_machine/buildpackers/rails.rb
|
136
|
+
- lib/smart_machine/buildpackers/rails/Dockerfile
|
137
|
+
- lib/smart_machine/commands.rb
|
138
|
+
- lib/smart_machine/commands/app.rb
|
139
|
+
- lib/smart_machine/commands/buildpacker.rb
|
140
|
+
- lib/smart_machine/commands/credentials.rb
|
141
|
+
- lib/smart_machine/commands/docker.rb
|
142
|
+
- lib/smart_machine/commands/engine.rb
|
143
|
+
- lib/smart_machine/commands/grid.rb
|
144
|
+
- lib/smart_machine/commands/grid_commands/elasticsearch.rb
|
145
|
+
- lib/smart_machine/commands/grid_commands/minio.rb
|
146
|
+
- lib/smart_machine/commands/grid_commands/mysql.rb
|
147
|
+
- lib/smart_machine/commands/grid_commands/nginx.rb
|
148
|
+
- lib/smart_machine/commands/grid_commands/prereceiver.rb
|
149
|
+
- lib/smart_machine/commands/grid_commands/redis.rb
|
150
|
+
- lib/smart_machine/commands/grid_commands/scheduler.rb
|
151
|
+
- lib/smart_machine/commands/grid_commands/sub_thor.rb
|
152
|
+
- lib/smart_machine/commands/machine.rb
|
153
|
+
- lib/smart_machine/commands/syncer.rb
|
154
|
+
- lib/smart_machine/commands/utilities.rb
|
155
|
+
- lib/smart_machine/configuration.rb
|
104
156
|
- lib/smart_machine/credentials.rb
|
105
157
|
- lib/smart_machine/docker.rb
|
106
158
|
- lib/smart_machine/engine.rb
|
107
159
|
- lib/smart_machine/engine/Dockerfile
|
108
|
-
- lib/smart_machine/engine/buildpacks/rails/Dockerfile
|
109
|
-
- lib/smart_machine/gem_version.rb
|
110
|
-
- lib/smart_machine/grids.rb
|
111
160
|
- lib/smart_machine/grids/elasticsearch.rb
|
112
161
|
- lib/smart_machine/grids/elasticsearch/.keep
|
113
162
|
- lib/smart_machine/grids/minio.rb
|
@@ -126,6 +175,7 @@ files:
|
|
126
175
|
- lib/smart_machine/grids/prereceiver/fcgiwrap/packages/main/x86_64/fcgiwrap-1.1.1-r4.apk
|
127
176
|
- lib/smart_machine/grids/prereceiver/fcgiwrap/packages/main/x86_64/fcgiwrap-doc-1.1.1-r4.apk
|
128
177
|
- lib/smart_machine/grids/prereceiver/fcgiwrap/packages/main/x86_64/fcgiwrap-openrc-1.1.1-r4.apk
|
178
|
+
- lib/smart_machine/grids/prereceiver/pre-receive
|
129
179
|
- lib/smart_machine/grids/redis.rb
|
130
180
|
- lib/smart_machine/grids/redis/.keep
|
131
181
|
- lib/smart_machine/grids/scheduler.rb
|
@@ -296,52 +346,52 @@ files:
|
|
296
346
|
- lib/smart_machine/grids/solr/sunspot/conf/solrconfig.xml
|
297
347
|
- lib/smart_machine/logger.rb
|
298
348
|
- lib/smart_machine/machine.rb
|
349
|
+
- lib/smart_machine/scp.rb
|
299
350
|
- lib/smart_machine/ssh.rb
|
300
|
-
- lib/smart_machine/
|
351
|
+
- lib/smart_machine/syncer.rb
|
352
|
+
- lib/smart_machine/templates/dotsmartmachine/Gemfile
|
301
353
|
- lib/smart_machine/templates/dotsmartmachine/apps/containers/.keep
|
302
354
|
- lib/smart_machine/templates/dotsmartmachine/apps/repositories/.keep
|
355
|
+
- lib/smart_machine/templates/dotsmartmachine/config/elasticsearch.yml
|
303
356
|
- lib/smart_machine/templates/dotsmartmachine/config/environment.rb
|
357
|
+
- lib/smart_machine/templates/dotsmartmachine/config/minio.yml
|
358
|
+
- lib/smart_machine/templates/dotsmartmachine/config/mysql.yml
|
304
359
|
- lib/smart_machine/templates/dotsmartmachine/config/mysql/schedule.rb
|
360
|
+
- lib/smart_machine/templates/dotsmartmachine/config/prereceiver.yml
|
361
|
+
- lib/smart_machine/templates/dotsmartmachine/config/redis.yml
|
305
362
|
- lib/smart_machine/templates/dotsmartmachine/config/users.yml
|
306
|
-
- lib/smart_machine/templates/dotsmartmachine/
|
307
|
-
- lib/smart_machine/templates/dotsmartmachine/grids/elasticsearch/logs/.keep
|
308
|
-
- lib/smart_machine/templates/dotsmartmachine/grids/minio/data/.keep
|
309
|
-
- lib/smart_machine/templates/dotsmartmachine/grids/mysql/backups/.keep
|
310
|
-
- lib/smart_machine/templates/dotsmartmachine/grids/mysql/data/.keep
|
363
|
+
- lib/smart_machine/templates/dotsmartmachine/gitignore-template
|
311
364
|
- lib/smart_machine/templates/dotsmartmachine/grids/nginx/certificates/.keep
|
312
365
|
- lib/smart_machine/templates/dotsmartmachine/grids/nginx/fastcgi.conf
|
313
366
|
- lib/smart_machine/templates/dotsmartmachine/grids/nginx/htpasswd/.keep
|
314
367
|
- lib/smart_machine/templates/dotsmartmachine/grids/nginx/nginx.tmpl
|
315
|
-
- lib/smart_machine/templates/dotsmartmachine/grids/prereceiver/pre-receive
|
316
|
-
- lib/smart_machine/templates/dotsmartmachine/grids/redis/data/.keep
|
317
368
|
- lib/smart_machine/templates/dotsmartmachine/grids/scheduler/crontabs/.keep
|
318
369
|
- lib/smart_machine/templates/dotsmartmachine/grids/solr/solr/.keep
|
319
370
|
- lib/smart_machine/templates/dotsmartmachine/tmp/.keep
|
320
|
-
- lib/smart_machine/
|
371
|
+
- lib/smart_machine/templates/dotsmartmachine/vendor/.keep
|
321
372
|
- lib/smart_machine/version.rb
|
322
|
-
homepage: https://github.com/
|
373
|
+
homepage: https://github.com/plainsource/smartmachine
|
323
374
|
licenses:
|
324
|
-
-
|
375
|
+
- AGPL-3.0-or-later
|
325
376
|
metadata:
|
326
|
-
|
327
|
-
|
328
|
-
|
377
|
+
homepage_uri: https://github.com/plainsource/smartmachine
|
378
|
+
bug_tracker_uri: https://github.com/plainsource/smartmachine/issues
|
379
|
+
changelog_uri: https://github.com/plainsource/smartmachine/releases/tag/v1.0.0
|
380
|
+
source_code_uri: https://github.com/plainsource/smartmachine/tree/v1.0.0/smartmachine
|
329
381
|
post_install_message:
|
330
|
-
rdoc_options:
|
331
|
-
- "--main"
|
332
|
-
- README.rdoc
|
382
|
+
rdoc_options: []
|
333
383
|
require_paths:
|
334
384
|
- lib
|
335
385
|
required_ruby_version: !ruby/object:Gem::Requirement
|
336
386
|
requirements:
|
337
387
|
- - ">="
|
338
388
|
- !ruby/object:Gem::Version
|
339
|
-
version: 2.
|
389
|
+
version: 2.7.0
|
340
390
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
341
391
|
requirements:
|
342
392
|
- - ">="
|
343
393
|
- !ruby/object:Gem::Version
|
344
|
-
version:
|
394
|
+
version: 1.8.11
|
345
395
|
requirements: []
|
346
396
|
rubygems_version: 3.1.2
|
347
397
|
signing_key:
|
data/CHANGELOG.rdoc
DELETED
File without changes
|
data/MIT-LICENSE
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
MIT License
|
2
|
-
|
3
|
-
Copyright (c) 2019 Timeboard
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|
data/README.rdoc
DELETED
@@ -1,87 +0,0 @@
|
|
1
|
-
= SmartMachine
|
2
|
-
|
3
|
-
Git push should deploy.
|
4
|
-
|
5
|
-
SmartMachine is a full-stack deployment framework for rails optimized for admin programmer happiness and peaceful administration. It encourages natural simplicity by favoring convention over configuration.
|
6
|
-
|
7
|
-
Deploy your Rails apps to your own server with - git push production master
|
8
|
-
|
9
|
-
|
10
|
-
== How it Works
|
11
|
-
|
12
|
-
After you run the below commands, you get.
|
13
|
-
1. Setup of basic best practices of setting up and securing a VPS server.
|
14
|
-
2. Setup and installation of Docker.
|
15
|
-
3. Setup and installation of docker based Mysql, Solr, Nginx, App Prereceiver.
|
16
|
-
4. Deployment of your Rails apps to your own server with - git push production master
|
17
|
-
|
18
|
-
|
19
|
-
== Setup a New Machine - Ubuntu 18.04 LTS
|
20
|
-
|
21
|
-
1. Getting Started with Linode:
|
22
|
-
|
23
|
-
https://www.linode.com/docs/getting-started/
|
24
|
-
|
25
|
-
2. How to Secure Your Server:
|
26
|
-
|
27
|
-
https://www.linode.com/docs/security/securing-your-server/
|
28
|
-
|
29
|
-
|
30
|
-
== Install SmartMachine
|
31
|
-
|
32
|
-
1. Install Ruby:
|
33
|
-
|
34
|
-
$ sudo apt-get install ruby-full
|
35
|
-
|
36
|
-
2. Add gem executables to PATH (remember to check ruby version in the path):
|
37
|
-
|
38
|
-
$ echo 'export PATH="$PATH:$HOME/.gem/ruby/2.5.0/bin"' >> ~/.bashrc && source ~/.bashrc
|
39
|
-
|
40
|
-
3. Install smartmachine for current user:
|
41
|
-
|
42
|
-
$ gem install smartmachine --user-install
|
43
|
-
|
44
|
-
4. Initialize smartmachine:
|
45
|
-
|
46
|
-
$ smartmachine init
|
47
|
-
|
48
|
-
|
49
|
-
== TODO - Setup Machine
|
50
|
-
1. Getting Started and Securing your Server:
|
51
|
-
|
52
|
-
$ smartmachine machine install
|
53
|
-
|
54
|
-
|
55
|
-
== Install Docker
|
56
|
-
|
57
|
-
1. Run docker install command:
|
58
|
-
|
59
|
-
$ smartmachine docker install
|
60
|
-
|
61
|
-
2. Add UFW rules for Docker as specified at the end of installation.
|
62
|
-
|
63
|
-
|
64
|
-
== Starting Grids as per Choice
|
65
|
-
|
66
|
-
1. Start mysql grid:
|
67
|
-
|
68
|
-
$ smartmachine grids mysql up
|
69
|
-
|
70
|
-
2. Start solr grid:
|
71
|
-
|
72
|
-
$ smartmachine grids solr up
|
73
|
-
|
74
|
-
3. Start nginx grid:
|
75
|
-
|
76
|
-
$ smartmachine grids nginx up
|
77
|
-
|
78
|
-
4. Start prereceiver grid:
|
79
|
-
|
80
|
-
$ smartmachine grids prereceiver up
|
81
|
-
|
82
|
-
|
83
|
-
== TODO - Creating New App
|
84
|
-
|
85
|
-
1. Creating a new bare app on the server:
|
86
|
-
|
87
|
-
$ smartmachine apps create <USERNAME> <APPNAME>
|
data/bin/buildpacker
DELETED
data/bin/prereceiver
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'smart_machine'
|
4
|
-
|
5
|
-
if ARGV[0] == 'prereceive'
|
6
|
-
raise "Please provide appname, username, oldrev, newrev and refname" unless ARGV[1] && ARGV[2] && ARGV[3] && ARGV[4] && ARGV[5]
|
7
|
-
SmartMachine::Grids::Prereceiver.prereceive(ARGV[1], ARGV[2], ARGV[3], ARGV[4], ARGV[5])
|
8
|
-
end
|
data/bin/scheduler
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'smart_machine'
|
4
|
-
|
5
|
-
command = ARGV.shift
|
6
|
-
|
7
|
-
scheduler = SmartMachine::Grids::Scheduler.new
|
8
|
-
|
9
|
-
case command
|
10
|
-
when "start"
|
11
|
-
action = ARGV.shift
|
12
|
-
scheduler.mysql("start") if action == "--mysql"
|
13
|
-
|
14
|
-
when "stop"
|
15
|
-
action = ARGV.shift
|
16
|
-
scheduler.mysql("stop") if action == "--mysql"
|
17
|
-
|
18
|
-
end
|
data/bin/smartmachine
DELETED
@@ -1,81 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "smart_machine"
|
4
|
-
|
5
|
-
command = ARGV.shift
|
6
|
-
|
7
|
-
machine = SmartMachine::Machine.new
|
8
|
-
|
9
|
-
case command
|
10
|
-
when "new"
|
11
|
-
machine.create ARGV
|
12
|
-
return
|
13
|
-
|
14
|
-
when "--init-local"
|
15
|
-
machine.init_local ARGV
|
16
|
-
return
|
17
|
-
|
18
|
-
when "--version"
|
19
|
-
puts "SmartMachine #{SmartMachine.version}"
|
20
|
-
return
|
21
|
-
|
22
|
-
when "--help"
|
23
|
-
puts "Help: Specify a valid smartmachine command to execute. Are you in the correct directory to run this command?"
|
24
|
-
return
|
25
|
-
|
26
|
-
when "runner"
|
27
|
-
exec "smartrunner #{ARGV.join(' ')}"
|
28
|
-
return
|
29
|
-
|
30
|
-
end
|
31
|
-
|
32
|
-
if machine.in_local_machine_dir?
|
33
|
-
case command
|
34
|
-
when "credentials:edit"
|
35
|
-
credentials = SmartMachine::Credentials.new
|
36
|
-
credentials.edit
|
37
|
-
|
38
|
-
when "environment:edit"
|
39
|
-
system("#{ENV['EDITOR']} config/environment.rb")
|
40
|
-
|
41
|
-
when "users:edit"
|
42
|
-
system("#{ENV['EDITOR']} config/users.yml")
|
43
|
-
|
44
|
-
when "ssh"
|
45
|
-
machine.ssh
|
46
|
-
|
47
|
-
when "install"
|
48
|
-
machine.installer ARGV.unshift("install")
|
49
|
-
|
50
|
-
when "update"
|
51
|
-
machine.installer ARGV.unshift("update")
|
52
|
-
|
53
|
-
when "uninstall"
|
54
|
-
machine.installer ARGV.unshift("uninstall")
|
55
|
-
|
56
|
-
when "apps"
|
57
|
-
machine.apps ARGV
|
58
|
-
|
59
|
-
when "grids"
|
60
|
-
machine.grids ARGV
|
61
|
-
return
|
62
|
-
|
63
|
-
when "ps"
|
64
|
-
machine.ps ARGV
|
65
|
-
return
|
66
|
-
|
67
|
-
when "logs"
|
68
|
-
machine.logs ARGV
|
69
|
-
return
|
70
|
-
|
71
|
-
when "sync"
|
72
|
-
sync = SmartMachine::Sync.new
|
73
|
-
sync.run
|
74
|
-
|
75
|
-
else
|
76
|
-
exec "smartmachine --help"
|
77
|
-
|
78
|
-
end
|
79
|
-
else
|
80
|
-
exec "smartmachine --help"
|
81
|
-
end
|