aws_one_click_staging 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/config/aws_one_click_staging.yml +8 -0
- data/lib/aws_one_click_staging/aws_warrior.rb +5 -4
- data/lib/aws_one_click_staging/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: 9f71fa64a4b604a12dc314c4642ff3afb2d010fe
|
4
|
+
data.tar.gz: bd848bdb29d799c1f1a2cb30d53b315115431789
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10b293e91ca0ea581c680e246503cfbdeebdde0cb8e456255cced315f7142806123854867af5371a1643778ffd94b1e75caa6567d2fed6df124bdde2b0f31b04
|
7
|
+
data.tar.gz: 9b7f6ff8f14df55133404d8ff9c9c61e3136f5f7f6034d25087067d197c8e799de3cd366206d2a418acb504d49e346b05d724a719d2c15325a9a8ada06a7e1db
|
data/README.md
CHANGED
@@ -23,6 +23,10 @@ aws_master_username: ""
|
|
23
23
|
aws_master_user_password: ""
|
24
24
|
aws_production_bucket: "" # this bucket is read from
|
25
25
|
aws_staging_bucket: "" # this bucket is DELETED and written to!
|
26
|
+
|
27
|
+
db_instance_id_production: "actioncenter" # this db_instance is read from
|
28
|
+
db_instance_id_staging: "actioncenter-staging" # this db_instance is DELETED and written to!
|
29
|
+
db_snapshot_id: "actioncenter-snapshot-for-staging" # this db snapshot id is OVERWRITTEN
|
26
30
|
```
|
27
31
|
|
28
32
|
|
@@ -1,9 +1,17 @@
|
|
1
1
|
# edit these values to match that of your production machine
|
2
2
|
# which will be cloned from
|
3
|
+
|
4
|
+
# The aws user you set here should only have read access to the production
|
5
|
+
# S3 bucket and Db instance to keep your production data safe and happy
|
3
6
|
aws_access_key_id: ""
|
4
7
|
aws_secret_access_key: ""
|
8
|
+
|
5
9
|
aws_region: 'us-west-1'
|
6
10
|
aws_master_username: ""
|
7
11
|
aws_master_user_password: ""
|
8
12
|
aws_production_bucket: "" # this bucket is read from
|
9
13
|
aws_staging_bucket: "" # this bucket is DELETED and written to!
|
14
|
+
|
15
|
+
db_instance_id_production: "actioncenter" # this db_instance is read from
|
16
|
+
db_instance_id_staging: "actioncenter-staging" # this db_instance is DELETED and written to!
|
17
|
+
db_snapshot_id: "actioncenter-snapshot-for-staging" # this db snapshot id is OVERWRITTEN
|
@@ -17,9 +17,7 @@ module AwsOneClickStaging
|
|
17
17
|
def clone_rds
|
18
18
|
setup_aws_credentials
|
19
19
|
|
20
|
-
|
21
|
-
@db_instance_id_staging = "actioncenter-staging-test"
|
22
|
-
@db_snapshot_id = "actioncenter-snapshot-for-staging"
|
20
|
+
|
23
21
|
|
24
22
|
@c = Aws::RDS::Client.new
|
25
23
|
|
@@ -49,7 +47,6 @@ module AwsOneClickStaging
|
|
49
47
|
private
|
50
48
|
|
51
49
|
def setup_aws_credentials
|
52
|
-
@config[""]
|
53
50
|
aws_region = @config["aws_region"]
|
54
51
|
@access_key_id = @config["aws_access_key_id"]
|
55
52
|
@secret_access_key = @config["aws_secret_access_key"]
|
@@ -58,6 +55,10 @@ module AwsOneClickStaging
|
|
58
55
|
@aws_production_bucket = @config["aws_production_bucket"]
|
59
56
|
@aws_staging_bucket = @config["aws_staging_bucket"]
|
60
57
|
|
58
|
+
@db_instance_id_production = @config["db_instance_id_production"]
|
59
|
+
@db_instance_id_staging = @config["db_instance_id_staging"]
|
60
|
+
@db_snapshot_id = @config["db_snapshot_id"]
|
61
|
+
|
61
62
|
Aws.config.update({ region: aws_region,
|
62
63
|
credentials: Aws::Credentials.new(@access_key_id, @secret_access_key) })
|
63
64
|
end
|