@@ -15,12 +15,11 @@ You can sign up with my referral link <https://m.do.co/c/0d2d40f6a8a1> and get $
15
15
- [ For Google Cloud Platform] ( #for-google-cloud-platform )
16
16
- [ For Digital Ocean] ( #for-digital-ocean )
17
17
- [ SSH Private and Public keys] ( #ssh-private-and-public-keys )
18
- - [ 3.- Terraform] ( #3--terraform )
18
+ - [ 3.- Full Automation: Terraform and Ansible ] ( #3--full-automation- terraform-and-ansible )
19
19
- [ Google Cloud Platform] ( #google-cloud-platform )
20
20
- [ Digital Ocean] ( #digital-ocean )
21
- - [ 4.- Ansible] ( #4--ansible )
22
- - [ 5.- Access to VPS] ( #5--access-to-vps )
23
- - [ 6.- Destroy the VPS] ( #6--destroy-the-vps )
21
+ - [ 4.- Access to VPS] ( #4--access-to-vps )
22
+ - [ 5.- Destroy the VPS] ( #5--destroy-the-vps )
24
23
- [ :shield : Security] ( #shield-security )
25
24
- [ :coffee : Donations] ( #coffee-donations )
26
25
- [ Contributing] ( #contributing )
@@ -29,7 +28,7 @@ You can sign up with my referral link <https://m.do.co/c/0d2d40f6a8a1> and get $
29
28
30
29
### Requirements
31
30
32
- - Terraform installed (Version used: v0.13.0 )
31
+ - Terraform installed (Version used: v0.13.2 )
33
32
- Ansible installed (Version used: 2.9.12)
34
33
- SSH private and public keys
35
34
- Google Cloud Platform or Digital Ocean account.
67
66
- Inside credentials folder run `ssh-keygen -t rsa -f offensive` in the terminal. Empty passphrase is ok.
68
67
- It creates two files: private and public key.
69
68
70
- #### 3.- Terraform
69
+ #### 3.- Full Automation: Terraform and Ansible
71
70
72
71
##### Google Cloud Platform
73
72
@@ -82,7 +81,7 @@ Terraform has been successfully initialized!
82
81
83
82
# Create the resources
84
83
$ terraform apply -auto-approve
85
- Apply complete! Resources: 3 added, 0 changed, 0 destroyed.
84
+ Apply complete! Resources: 6 added, 0 changed, 0 destroyed.
86
85
Outputs:
87
86
external_ip = x.x.x.x
88
87
```
@@ -92,7 +91,7 @@ external_ip = x.x.x.x
92
91
** Note:** The instance type and the region used are: n1-standard-1 and us-central1. You can change the values on server.tf and main.tf
93
92
94
93
** Demo**
95
- [ ![ asciicast] ( https://asciinema.org/a/352900 .png )] ( https://asciinema.org/a/352900 )
94
+ [ ![ asciicast] ( https://asciinema.org/a/359398 .png )] ( https://asciinema.org/a/359398 )
96
95
97
96
##### Digital Ocean
98
97
@@ -107,7 +106,7 @@ Terraform has been successfully initialized!
107
106
108
107
# Create the resources
109
108
$ terraform apply -auto-approve
110
- Apply complete! Resources: 3 added, 0 changed, 0 destroyed.
109
+ Apply complete! Resources: 6 added, 0 changed, 0 destroyed.
111
110
Outputs:
112
111
external_ip = x.x.x.x
113
112
```
@@ -117,26 +116,9 @@ external_ip = x.x.x.x
117
116
** Note:** The droplet type and the region used are: s-2vcpu-4gb and nyc3. You can change the values on server.tf and variables.tf
118
117
119
118
** Demo**
120
- [ ![ asciicast] ( https://asciinema.org/a/352901 .png )] ( https://asciinema.org/a/352901 )
119
+ [ ![ asciicast] ( https://asciinema.org/a/359408 .png )] ( https://asciinema.org/a/359408 )
121
120
122
- #### 4.- Ansible
123
-
124
- - Enter to ansible folder
125
- - In hosts.yaml change the x.x.x.x by external_ip value copied.
126
- - Run the next command:
127
-
128
- ``` console
129
- $ ansible-playbook playbook.yaml
130
- TASK [Configuration finished] *******************************************************
131
- ok: [x.x.x.x] => {
132
- "msg": "System configured correctly."
133
- }
134
- ```
135
-
136
- ** Demo**
137
- [ ![ asciicast] ( https://asciinema.org/a/352903.png )] ( https://asciinema.org/a/352903 )
138
-
139
- #### 5.- Access to VPS
121
+ #### 4.- Access to VPS
140
122
141
123
- In gcp or digital-ocean folder run the next command. Change x.x.x.x by external_ip value copied.
142
124
148
130
** Demo**
149
131
[ ![ asciicast] ( https://asciinema.org/a/352904.png )] ( https://asciinema.org/a/352904 )
150
132
151
- #### 6 .- Destroy the VPS
133
+ #### 5 .- Destroy the VPS
152
134
153
135
- In gcp or digital-ocean folder run the next command.
154
136
@@ -167,7 +149,7 @@ The service fail2ban has been installed to avoid brute force and block non-autho
167
149
168
150
Thanks for your donations, are always appreciated.
169
151
170
- < a href = " https://www.buymeacoffee.com/aaaguirrep " target = " _blank " >< img src = " https://cdn .buymeacoffee.com/buttons/default-orange.png " alt = " Buy Me A Coffee " style = " height : 23 px !important ; width : 100 px !important ; " ></ a >
152
+ [ ![ Buy me a coffee ] ( https://www.buymeacoffee.com/assets/ img/custom_images/orange_img.png )] ( https://www .buymeacoffee.com/aaaguirrep )
171
153
172
154
### Contributing
173
155
0 commit comments