subspace 2.5.10 → 3.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/CHANGELOG.md +12 -5
  4. data/README.md +57 -24
  5. data/UPGRADING.md +10 -0
  6. data/ansible/roles/common/defaults/main.yml +0 -1
  7. data/ansible/roles/common/files/sudoers-service +1 -1
  8. data/ansible/roles/common/tasks/main.yml +18 -7
  9. data/ansible/roles/common/tasks/no_swap.yml +26 -0
  10. data/ansible/roles/common/templates/motd +1 -1
  11. data/ansible/roles/common/templates/motd2 +1 -1
  12. data/ansible/roles/delayed_job/tasks/main.yml +1 -1
  13. data/ansible/roles/memcache/defaults/main.yml +2 -0
  14. data/ansible/roles/memcache/tasks/main.yml +16 -1
  15. data/ansible/roles/newrelic-infra/tasks/main.yml +3 -3
  16. data/ansible/roles/nginx/tasks/main.yml +12 -3
  17. data/ansible/roles/puma/tasks/main.yml +32 -20
  18. data/ansible/roles/puma/templates/puma-systemd.service +36 -0
  19. data/ansible/roles/puma/templates/puma-systemd.socket +14 -0
  20. data/ansible/roles/puma/templates/puma.rb +4 -2
  21. data/ansible/roles/rails/defaults/main.yml +0 -7
  22. data/ansible/roles/redis/tasks/main.yml +7 -0
  23. data/ansible/roles/resque/tasks/main.yml +11 -12
  24. data/ansible/roles/resque/templates/resque-systemd.service +10 -3
  25. data/ansible/roles/ruby-common/README.md +1 -1
  26. data/ansible/roles/ruby-common/tasks/main.yml +2 -17
  27. data/ansible/roles/sidekiq/defaults/main.yml +1 -1
  28. data/ansible/roles/sidekiq/tasks/main.yml +11 -15
  29. data/ansible/roles/sidekiq/templates/sidekiq-monit-rc +1 -1
  30. data/ansible/roles/sidekiq/templates/sidekiq-systemd.service +62 -0
  31. data/ansible/roles/tailscale/defaults/main.yml +2 -0
  32. data/ansible/roles/tailscale/tasks/main.yml +22 -0
  33. data/exe/subspace +1 -2
  34. data/lib/subspace/cli.rb +50 -14
  35. data/lib/subspace/commands/ansible.rb +11 -2
  36. data/lib/subspace/commands/base.rb +20 -5
  37. data/lib/subspace/commands/bootstrap.rb +16 -21
  38. data/lib/subspace/commands/configure.rb +2 -2
  39. data/lib/subspace/commands/exec.rb +20 -0
  40. data/lib/subspace/commands/init.rb +94 -45
  41. data/lib/subspace/commands/inventory.rb +45 -0
  42. data/lib/subspace/commands/maintain.rb +1 -1
  43. data/lib/subspace/commands/provision.rb +1 -3
  44. data/lib/subspace/commands/{vars.rb → secrets.rb} +6 -5
  45. data/lib/subspace/commands/ssh.rb +10 -8
  46. data/lib/subspace/commands/terraform.rb +83 -0
  47. data/lib/subspace/inventory.rb +144 -0
  48. data/lib/subspace/version.rb +1 -1
  49. data/subspace.gemspec +8 -2
  50. data/template/{provision → subspace}/.gitignore +3 -0
  51. data/template/{provision → subspace}/ansible.cfg.erb +2 -2
  52. data/template/subspace/group_vars/all.erb +28 -0
  53. data/template/subspace/group_vars/template.erb +26 -0
  54. data/template/subspace/inventory.yml.erb +11 -0
  55. data/template/{provision → subspace}/playbook.yml.erb +2 -5
  56. data/template/subspace/templates/authorized_keys.erb +1 -0
  57. data/template/subspace/terraform/.gitignore +2 -0
  58. data/template/subspace/terraform/template/main-oxenwagen.tf.erb +116 -0
  59. data/template/subspace/terraform/template/main-workhorse.tf.erb +41 -0
  60. data/template/subspace/terraformrc.erb +9 -0
  61. data/terraform/modules/s3_backend/README +2 -0
  62. data/terraform/modules/s3_backend/dynamodb.tf +1 -0
  63. data/terraform/modules/s3_backend/iam_user.tf +38 -0
  64. data/terraform/modules/s3_backend/main.tf +39 -0
  65. data/terraform/modules/s3_backend/state_bucket.tf +14 -0
  66. metadata +42 -53
  67. data/ansible/roles/monit/files/monit-http.conf +0 -3
  68. data/ansible/roles/monit/files/sudoers-monit +0 -1
  69. data/ansible/roles/monit/handlers/main.yml +0 -14
  70. data/ansible/roles/monit/tasks/main.yml +0 -34
  71. data/ansible/roles/mtpereira.passenger/.bumpversion.cfg +0 -7
  72. data/ansible/roles/mtpereira.passenger/.gitignore +0 -2
  73. data/ansible/roles/mtpereira.passenger/LICENSE +0 -20
  74. data/ansible/roles/mtpereira.passenger/README.md +0 -31
  75. data/ansible/roles/mtpereira.passenger/defaults/main.yml +0 -5
  76. data/ansible/roles/mtpereira.passenger/handlers/main.yml +0 -8
  77. data/ansible/roles/mtpereira.passenger/meta/.galaxy_install_info +0 -1
  78. data/ansible/roles/mtpereira.passenger/meta/main.yml +0 -21
  79. data/ansible/roles/mtpereira.passenger/tasks/apt.yml +0 -13
  80. data/ansible/roles/mtpereira.passenger/tasks/main.yml +0 -8
  81. data/ansible/roles/mtpereira.passenger/tasks/pkg.yml +0 -35
  82. data/ansible/roles/mtpereira.passenger/tasks/service.yml +0 -8
  83. data/ansible/roles/passenger/files/sudoers-passenger +0 -1
  84. data/ansible/roles/passenger/meta/main.yml +0 -6
  85. data/ansible/roles/passenger/tasks/main.yml +0 -5
  86. data/ansible/roles/postgis/defaults/main.yml +0 -2
  87. data/ansible/roles/puma/defaults/main.yml +0 -5
  88. data/ansible/roles/puma/meta/main.yml +0 -5
  89. data/ansible/roles/sidekiq/meta/main.yml +0 -5
  90. data/template/provision/group_vars/all.erb +0 -17
  91. data/template/provision/group_vars/template.erb +0 -11
  92. data/template/provision/host_vars/template.erb +0 -4
  93. /data/template/{provision → subspace}/hosts.erb +0 -0
  94. /data/template/{provision/vars → subspace/secrets}/template.erb +0 -0
  95. /data/template/{provision → subspace}/templates/application.yml.template +0 -0
@@ -3,19 +3,16 @@
3
3
  become: yes
4
4
 
5
5
  vars_files:
6
- - ./vars/<%= @env %>.yml
6
+ - ./secrets/<%= @env %>.yml
7
7
 
8
8
  roles:
9
9
  - common
10
- - yarn
11
10
  - nodejs
11
+ - yarn
12
12
  - ruby-common
13
13
  - rails
14
14
  - puma
15
15
  - letsencrypt
16
16
  - nginx
17
17
  - postgresql
18
- - monit
19
18
  - logrotate
20
- - collectd
21
- - delayed_job
@@ -0,0 +1 @@
1
+ <%= `cat $HOME/.ssh/id_rsa.pub` %>
@@ -0,0 +1,2 @@
1
+ credentials.auto.tfvars
2
+ .subspace-tf-modules
@@ -0,0 +1,116 @@
1
+ terraform {
2
+ # Default backend is just local.
3
+
4
+ # Uncomment to use s3
5
+ # backend "s3" {
6
+ # bucket = "subspace-backend-<%= project_name %>"
7
+ # key = "subspace.<%= @env %>.tfstate"
8
+ # region = "us-west-2"
9
+ # }
10
+
11
+ # Uncomment to use Terraform Cloud
12
+ # cloud {
13
+ # organization = "<%= project_name %>"
14
+ #
15
+ # workspaces {
16
+ # name = "<%= @env %>"
17
+ # }
18
+ # }
19
+
20
+ }
21
+
22
+ provider aws {
23
+ region = "us-west-2"
24
+ profile = "subspace-<%= project_name %>"
25
+ default_tags {
26
+ tags = {
27
+ Environment = "<%= @env %>"
28
+ Project = "<%= project_name %>"
29
+ }
30
+ }
31
+ }
32
+
33
+ variable database_password { type = string }
34
+
35
+ module oxenwagen {
36
+ source = "github.com/tenforwardconsulting/terraform-subspace-oxenwagen?ref=v2.1.0"
37
+ project_name = "<%= project_name %>"
38
+ project_environment = "<%= @env %>"
39
+ aws_region = ## "us-west-2"
40
+ lb_health_check_path = "/"
41
+ subspace_public_key = file("../../subspace.pem.pub")
42
+
43
+ # Ubuntu Server 20.04 LTS (HVM), SSD Volume Type
44
+ instance_ami = "<%= @latest_ami %>"
45
+ web_instance_type = "t3.small"
46
+ web_instance_count = 2
47
+ worker_instance_type = "t3.medium"
48
+ worker_instance_count = 1
49
+ worker_volume_size = 100
50
+ ssh_cidr_blocks = [] # Put office/local/vpn IP addresses here
51
+
52
+ database_engine = "postgres"
53
+ database_engine_version = ## "14.1"
54
+ database_instance_class = "db.t3.medium"
55
+ database_name = "<%= "#{project_name}_#{@env}" %>"
56
+ database_username = "<%= project_name %>"
57
+ database_password = var.database_password
58
+ database_allocated_storage = 100
59
+ database_max_allocated_storage = 1000
60
+ database_iops = 1000
61
+
62
+ # lb_domain_name = "www.<%= project_name %>.com"
63
+ # lb_alternate_names = []
64
+ }
65
+
66
+ output "oxenwagen" {
67
+ value = module.oxenwagen
68
+ }
69
+
70
+ resource "aws_s3_bucket" "bucket" {
71
+ bucket = "<%= "#{project_name}-#{@env}-assets" %>"
72
+ acl = "private"
73
+ }
74
+
75
+ resource "aws_s3_bucket_public_access_block" "block_public_acls" {
76
+ bucket = aws_s3_bucket.bucket.id
77
+
78
+ block_public_acls = true
79
+ block_public_policy = true
80
+ ignore_public_acls = true
81
+ restrict_public_buckets = true
82
+ }
83
+
84
+ resource "aws_iam_user" "s3_user" {
85
+ name = "<%= "#{project_name}-#{@env}-assets" %>-subspace-s3-user"
86
+ }
87
+
88
+ resource "aws_iam_user_policy" "s3-upload" {
89
+ name = "test"
90
+ user = aws_iam_user.s3_user.name
91
+
92
+ policy = <<EOF
93
+ {
94
+ "Version": "2012-10-17",
95
+ "Statement": [
96
+ {
97
+ "Action": [
98
+ "s3:PutObject",
99
+ "s3:PutObjectAcl",
100
+ "s3:GetObject",
101
+ "s3:GetObjectVersion",
102
+ "s3:GetBucketAcl",
103
+ "s3:DeleteObject",
104
+ "s3:DeleteObjectVersion"
105
+ ],
106
+ "Effect": "Allow",
107
+ "Resource": [
108
+ "arn:aws:s3:::<%= "#{project_name}-#{@env}-assets" %>",
109
+ "arn:aws:s3:::<%= "#{project_name}-#{@env}-assets" %>/*"
110
+ ]
111
+ }
112
+ ]
113
+ }
114
+ EOF
115
+ }
116
+
@@ -0,0 +1,41 @@
1
+ terraform {
2
+ # Default backend is just local.
3
+
4
+ # Uncomment to use s3
5
+ # backend "s3" {
6
+ # bucket = "subspace-backend-<%= project_name %>"
7
+ # key = "subspace.<%= @env %>.tfstate"
8
+ # region = "us-west-2"
9
+ # }
10
+
11
+ # Uncomment to use Terraform Cloud
12
+ # cloud {
13
+ # organization = "<%= project_name %>"
14
+ #
15
+ # workspaces {
16
+ # name = "<%= @env %>"
17
+ # }
18
+ # }
19
+
20
+ }
21
+
22
+ module workhorse {
23
+ source = "github.com/tenforwardconsulting/terraform-subspace-workhorse?ref=v1.0.0"
24
+ project_name = "<%= project_name %>"
25
+ project_environment = "<%= @env %>"
26
+ aws_region = "us-west-2"
27
+ subspace_public_key = file("../../subspace.pem.pub")
28
+ # zone_id = "ZOJ6811VRVYBT" # 10fw.net
29
+ # subdomain = "<%= project_name.gsub("_", "-") %>"
30
+
31
+ # Ubuntu Server 20.04 LTS (HVM), SSD Volume Type
32
+ instance_ami = "ami-0f81e6e71078b75b6"
33
+ instance_user = "ubuntu"
34
+ instance_type = "t3.medium"
35
+ instance_hostname = "${var.project_environment}-app1"
36
+ instance_volume_size = 20
37
+ }
38
+
39
+ output "workhorse" {
40
+ value = module.workhorse
41
+ }
@@ -0,0 +1,9 @@
1
+ provider_installation {
2
+ filesystem_mirror {
3
+ path = "<%= File.join(gem_path, 'terraform', 'modules') %>"
4
+ include = ["subspace/*/*"]
5
+ }
6
+ direct {
7
+ exclude = ["subspace/*/*"]
8
+ }
9
+ }
@@ -0,0 +1,2 @@
1
+ This terraform configuration is used solely to provision the tfstate backend.
2
+ It makes an s3 bucket and a user and you should not need to really mess with this after the project is bootstrapped.
@@ -0,0 +1 @@
1
+ # Maybe later
@@ -0,0 +1,38 @@
1
+ resource "aws_iam_user" "ss" {
2
+ name = "subspace"
3
+ path = "/"
4
+
5
+ tags = {
6
+ Name = "Subspace IAM user"
7
+ Environment = "Global"
8
+ }
9
+ }
10
+
11
+ resource "aws_iam_access_key" "ss" {
12
+ user = aws_iam_user.ss.name
13
+
14
+ pgp_key = data.local_file.pgp_key.content_base64
15
+ }
16
+
17
+ resource "aws_iam_user_policy" "ss_s3" {
18
+ name = "ss_s3_user_policy"
19
+ user = aws_iam_user.ss.name
20
+
21
+ policy = <<EOF
22
+ {
23
+ "Version": "2012-10-17",
24
+ "Statement": [
25
+ {
26
+ "Effect": "Allow",
27
+ "Action": "s3:ListBucket",
28
+ "Resource": "arn:aws:s3:::${local.state_bucket_name}"
29
+ },
30
+ {
31
+ "Effect": "Allow",
32
+ "Action": ["s3:GetObject", "s3:PutObject"],
33
+ "Resource": "arn:aws:s3:::${local.state_bucket_name}/*"
34
+ }
35
+ ]
36
+ }
37
+ EOF
38
+ }
@@ -0,0 +1,39 @@
1
+ terraform {
2
+ required_providers {
3
+ aws = {
4
+ source = "hashicorp/aws"
5
+ version = "~> 3.0"
6
+ }
7
+ }
8
+ }
9
+
10
+ # Variables
11
+ variable aws_region {
12
+ type = string
13
+ }
14
+
15
+ variable project_name {
16
+ type = string
17
+ }
18
+
19
+ locals {
20
+ state_bucket_name = "subspace-backend-${var.project_name}"
21
+ }
22
+
23
+ provider "aws" {
24
+ region = var.aws_region
25
+ }
26
+
27
+ data "local_file" "pgp_key" {
28
+ filename = "../public-key-binary.gpg"
29
+ }
30
+
31
+ # Outputs
32
+
33
+ output "subspace_aws_access_key_id" {
34
+ value = aws_iam_access_key.ss.id
35
+ }
36
+
37
+ output "subspace_aws_encrypted_secret_access_key" {
38
+ value = aws_iam_access_key.ss.encrypted_secret
39
+ }
@@ -0,0 +1,14 @@
1
+ # S3 Bucket for storing state
2
+ resource "aws_s3_bucket" "state_bucket" {
3
+ bucket = local.state_bucket_name
4
+ acl = "private"
5
+
6
+ versioning {
7
+ enabled = true
8
+ }
9
+
10
+ tags = {
11
+ Name = "Subspace Terraform State"
12
+ Environment = "Global"
13
+ }
14
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: subspace
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.10
4
+ version: 3.0.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Samson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-01-02 00:00:00.000000000 Z
11
+ date: 2022-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -80,20 +80,6 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '1.0'
83
- - !ruby/object:Gem::Dependency
84
- name: ed25519
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '1.0'
90
- type: :runtime
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '1.0'
97
83
  description: WIP -- don't use this :)
98
84
  email:
99
85
  - brian@tenforwardconsulting.com
@@ -114,6 +100,7 @@ files:
114
100
  - README.md
115
101
  - Rakefile
116
102
  - TODO
103
+ - UPGRADING.md
117
104
  - ansible/playbooks/local_template.yml
118
105
  - ansible/playbooks/maintenance_mode.yml
119
106
  - ansible/roles/alienvault/tasks/main.yml
@@ -143,6 +130,7 @@ files:
143
130
  - ansible/roles/common/files/sudoers-service
144
131
  - ansible/roles/common/handlers/main.yml
145
132
  - ansible/roles/common/tasks/main.yml
133
+ - ansible/roles/common/tasks/no_swap.yml
146
134
  - ansible/roles/common/tasks/swap.yml
147
135
  - ansible/roles/common/templates/motd
148
136
  - ansible/roles/common/templates/motd2
@@ -165,23 +153,8 @@ files:
165
153
  - ansible/roles/logrotate/meta/main.yml
166
154
  - ansible/roles/logrotate/tasks/main.yml
167
155
  - ansible/roles/logrotate/templates/logrotate.d.j2
156
+ - ansible/roles/memcache/defaults/main.yml
168
157
  - ansible/roles/memcache/tasks/main.yml
169
- - ansible/roles/monit/files/monit-http.conf
170
- - ansible/roles/monit/files/sudoers-monit
171
- - ansible/roles/monit/handlers/main.yml
172
- - ansible/roles/monit/tasks/main.yml
173
- - ansible/roles/mtpereira.passenger/.bumpversion.cfg
174
- - ansible/roles/mtpereira.passenger/.gitignore
175
- - ansible/roles/mtpereira.passenger/LICENSE
176
- - ansible/roles/mtpereira.passenger/README.md
177
- - ansible/roles/mtpereira.passenger/defaults/main.yml
178
- - ansible/roles/mtpereira.passenger/handlers/main.yml
179
- - ansible/roles/mtpereira.passenger/meta/.galaxy_install_info
180
- - ansible/roles/mtpereira.passenger/meta/main.yml
181
- - ansible/roles/mtpereira.passenger/tasks/apt.yml
182
- - ansible/roles/mtpereira.passenger/tasks/main.yml
183
- - ansible/roles/mtpereira.passenger/tasks/pkg.yml
184
- - ansible/roles/mtpereira.passenger/tasks/service.yml
185
158
  - ansible/roles/mysql/meta/main.yml
186
159
  - ansible/roles/mysql/tasks/main.yml
187
160
  - ansible/roles/mysql/templates/mysql_database.yml
@@ -209,14 +182,10 @@ files:
209
182
  - ansible/roles/nodejs/tasks/main.yml
210
183
  - ansible/roles/papertrail/tasks/main.yml
211
184
  - ansible/roles/papertrail/templates/log_files.yml
212
- - ansible/roles/passenger/files/sudoers-passenger
213
- - ansible/roles/passenger/meta/main.yml
214
- - ansible/roles/passenger/tasks/main.yml
215
185
  - ansible/roles/postgis/.gitignore
216
186
  - ansible/roles/postgis/CHANGELOG.md
217
187
  - ansible/roles/postgis/LICENSE
218
188
  - ansible/roles/postgis/README.md
219
- - ansible/roles/postgis/defaults/main.yml
220
189
  - ansible/roles/postgis/meta/main.yml
221
190
  - ansible/roles/postgis/tasks/main.yml
222
191
  - ansible/roles/postgresql-client/tasks/main.yml
@@ -227,11 +196,11 @@ files:
227
196
  - ansible/roles/postgresql/tasks/backups.yml
228
197
  - ansible/roles/postgresql/tasks/main.yml
229
198
  - ansible/roles/postgresql/templates/backup.sh
230
- - ansible/roles/puma/defaults/main.yml
231
- - ansible/roles/puma/meta/main.yml
232
199
  - ansible/roles/puma/tasks/main.yml
233
200
  - ansible/roles/puma/templates/etc-puma.conf
234
201
  - ansible/roles/puma/templates/puma-monit-rc
202
+ - ansible/roles/puma/templates/puma-systemd.service
203
+ - ansible/roles/puma/templates/puma-systemd.socket
235
204
  - ansible/roles/puma/templates/puma.rb
236
205
  - ansible/roles/rails/defaults/main.yml
237
206
  - ansible/roles/rails/tasks/main.yml
@@ -252,9 +221,11 @@ files:
252
221
  - ansible/roles/ruby-common/vars/main.yml
253
222
  - ansible/roles/sidekiq/README.md
254
223
  - ansible/roles/sidekiq/defaults/main.yml
255
- - ansible/roles/sidekiq/meta/main.yml
256
224
  - ansible/roles/sidekiq/tasks/main.yml
257
225
  - ansible/roles/sidekiq/templates/sidekiq-monit-rc
226
+ - ansible/roles/sidekiq/templates/sidekiq-systemd.service
227
+ - ansible/roles/tailscale/defaults/main.yml
228
+ - ansible/roles/tailscale/tasks/main.yml
258
229
  - ansible/roles/yarn/tasks/main.yml
259
230
  - ansible/roles/zenoamaro.postgresql/.gitignore
260
231
  - ansible/roles/zenoamaro.postgresql/.travis.yml
@@ -287,32 +258,50 @@ files:
287
258
  - lib/subspace/commands/base.rb
288
259
  - lib/subspace/commands/bootstrap.rb
289
260
  - lib/subspace/commands/configure.rb
261
+ - lib/subspace/commands/exec.rb
290
262
  - lib/subspace/commands/init.rb
263
+ - lib/subspace/commands/inventory.rb
291
264
  - lib/subspace/commands/maintain.rb
292
265
  - lib/subspace/commands/maintenance_mode.rb
293
266
  - lib/subspace/commands/override.rb
294
267
  - lib/subspace/commands/provision.rb
268
+ - lib/subspace/commands/secrets.rb
295
269
  - lib/subspace/commands/ssh.rb
296
- - lib/subspace/commands/vars.rb
270
+ - lib/subspace/commands/terraform.rb
297
271
  - lib/subspace/configuration.rb
272
+ - lib/subspace/inventory.rb
298
273
  - lib/subspace/version.rb
299
274
  - subspace.gemspec
300
275
  - template/provision.rb.erb
301
- - template/provision/.gitignore
302
- - template/provision/ansible.cfg.erb
303
- - template/provision/group_vars/all.erb
304
- - template/provision/group_vars/template.erb
305
- - template/provision/host_vars/template.erb
306
- - template/provision/hosts.erb
307
- - template/provision/playbook.yml.erb
308
- - template/provision/templates/application.yml.template
309
- - template/provision/vars/template.erb
276
+ - template/subspace/.gitignore
277
+ - template/subspace/ansible.cfg.erb
278
+ - template/subspace/group_vars/all.erb
279
+ - template/subspace/group_vars/template.erb
280
+ - template/subspace/hosts.erb
281
+ - template/subspace/inventory.yml.erb
282
+ - template/subspace/playbook.yml.erb
283
+ - template/subspace/secrets/template.erb
284
+ - template/subspace/templates/application.yml.template
285
+ - template/subspace/templates/authorized_keys.erb
286
+ - template/subspace/terraform/.gitignore
287
+ - template/subspace/terraform/template/main-oxenwagen.tf.erb
288
+ - template/subspace/terraform/template/main-workhorse.tf.erb
289
+ - template/subspace/terraformrc.erb
290
+ - terraform/modules/s3_backend/README
291
+ - terraform/modules/s3_backend/dynamodb.tf
292
+ - terraform/modules/s3_backend/iam_user.tf
293
+ - terraform/modules/s3_backend/main.tf
294
+ - terraform/modules/s3_backend/state_bucket.tf
310
295
  homepage: https://github.com/tenforwardconsulting/subspace
311
296
  licenses:
312
297
  - MIT
313
298
  metadata:
314
299
  allowed_push_host: https://rubygems.org
315
- post_install_message:
300
+ post_install_message: |
301
+ *** Subspace 3 has many breaking changes
302
+ Primarily, the entire configuration directory structure has moved from config/provision to config/subspace.
303
+ You will need to migrate your old configuration to the new location, or downgrade to Subspace 2 if this was not intentional.
304
+ Please review the Upgrade guide: https://github.com/tenforwardconsulting/subspace/UPGRADING.md
316
305
  rdoc_options: []
317
306
  require_paths:
318
307
  - lib
@@ -323,11 +312,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
323
312
  version: '0'
324
313
  required_rubygems_version: !ruby/object:Gem::Requirement
325
314
  requirements:
326
- - - ">="
315
+ - - ">"
327
316
  - !ruby/object:Gem::Version
328
- version: '0'
317
+ version: 1.3.1
329
318
  requirements: []
330
- rubygems_version: 3.3.4
319
+ rubygems_version: 3.3.18
331
320
  signing_key:
332
321
  specification_version: 4
333
322
  summary: Ansible-based server provisioning for rails projects
@@ -1,3 +0,0 @@
1
- set httpd port 2812 and
2
- use address localhost # Only accept connection from localhost.
3
- allow localhost # Allow localhost to connect to the server.
@@ -1 +0,0 @@
1
- deploy ALL=(root) NOPASSWD: /usr/bin/monit
@@ -1,14 +0,0 @@
1
- ---
2
- - name: reload_monit
3
- shell: monit reload
4
- become: true
5
-
6
- - name: restart_monit
7
- service:
8
- name: monit
9
- state: restarted
10
- become: true
11
-
12
- - name: validate_monit
13
- shell: monit validate
14
- become: true
@@ -1,34 +0,0 @@
1
- ---
2
- - name: Configure monit to install instead of pin
3
- dpkg_selections:
4
- name: monit
5
- selection: install
6
- become: true
7
- tags:
8
- - monit
9
-
10
- - name: install monit
11
- apt:
12
- name: monit
13
- state: present
14
- become: true
15
- tags:
16
- - monit
17
-
18
- - name: Copy sudoers file so that deploy can use monit without entering password.
19
- copy:
20
- src: sudoers-monit
21
- dest: /etc/sudoers.d/monit
22
- become: true
23
- tags:
24
- - monit
25
-
26
- - name: Copy monit config to enable http from localhost
27
- copy:
28
- src: monit-http.conf
29
- dest: /etc/monit/conf.d/monit-http.conf
30
- become: true
31
- notify:
32
- - restart_monit
33
- tags:
34
- - monit
@@ -1,7 +0,0 @@
1
- [bumpversion]
2
- current_version = 1.0.2
3
- commit = True
4
- tag = True
5
- tag_name = {new_version}
6
- message = "Bump version: {current_version} -> {new_version} [skip ci]"
7
-
@@ -1,2 +0,0 @@
1
- *.vagrant/
2
- *vagrant_ansible_inventory*
@@ -1,20 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2014 Manuel Tiago Pereira
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of
6
- this software and associated documentation files (the "Software"), to deal in
7
- the Software without restriction, including without limitation the rights to
8
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
- the Software, and to permit persons to whom the Software is furnished to do so,
10
- 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, FITNESS
17
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,31 +0,0 @@
1
- Passenger
2
- ========
3
-
4
- Installs or updates Pushion Passenger.
5
-
6
- It will install apache, nginx or standalone modes, depending on **passenger_webserver** variable value (defaults to standalone).
7
-
8
- In the `tests` folder, there are a set of tests for this role, that will provision a VM using Vagrant and setup a simple hello world app. To use them, `cd` into the `tests/{passenger_webserver}/` and execute `vagrant up`. At the moment, only `apache` tests are done.
9
-
10
- Requirements
11
- ------------
12
-
13
- Assumes that the host is ansible-ready (check **mtpereira.common** role).
14
-
15
- Role Variables
16
- --------------
17
-
18
- * `passenger_webserver`: Specifies the webserver to be used by passenger. Possible values: `apache`, `nginx` and `standalone`. Defaults to `standalone`.
19
- * `passenger_pkgs_state`: Specifies if this role will garantee that the packages are installed or installed and updated. Possible values: `installed` and `latest`. Defaults to `installed`.
20
-
21
- License
22
- -------
23
-
24
- MIT
25
-
26
- Author Information
27
- ------------------
28
-
29
- [GitHub project page](https://github.com/mtpereira/ansible-passenger)
30
-
31
- [Manuel Tiago Pereira](http://mtpereira.github.io)
@@ -1,5 +0,0 @@
1
- ---
2
- passenger_webserver: "standalone"
3
- passenger_pkgs_state: "present"
4
- passenger_pkgs_fix_shebang: no
5
- become: true
@@ -1,8 +0,0 @@
1
- ---
2
- - name: apache restart
3
- service: name=apache2 state=restarted
4
- become: yes
5
-
6
- - name: nginx restart
7
- service: name=nginx state=restarted
8
- become: yes
@@ -1 +0,0 @@
1
- {install_date: 'Mon Jan 2 18:15:18 2017', version: 1.0.2}
@@ -1,21 +0,0 @@
1
- ---
2
- galaxy_info:
3
- author: Manuel Tiago Pereira
4
- description: Installs Phusion Passenger.
5
- license: MIT
6
- min_ansible_version: 1.4
7
- platforms:
8
- - name: Debian
9
- versions:
10
- - wheezy
11
- - jessie
12
- - name: Ubuntu
13
- versions:
14
- - lucid
15
- - precise
16
- - saucy
17
- - trusty
18
- categories:
19
- - web
20
- dependencies: []
21
-
@@ -1,13 +0,0 @@
1
- ---
2
- - name: apt - add key for passenger repos
3
- apt_key: url=http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x561F9B9CAC40B2F7 id=AC40B2F7 state=present
4
-
5
- - name: apt - add support for https
6
- apt: pkg={{ item }} state={{ passenger_pkgs_state }} update_cache=yes cache_valid_time=3600
7
- with_items:
8
- - apt-transport-https
9
- - ca-certificates
10
-
11
- - name: apt - add passenger repo
12
- apt_repository: repo='deb https://oss-binaries.phusionpassenger.com/apt/passenger {{ ansible_lsb.codename }} main' state=present update_cache=yes
13
-