forked from pablokbs/peladonerd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
README y prevent_default para volumen
- Loading branch information
Miguel Ignacio Costa
authored and
Miguel Ignacio Costa
committed
Mar 1, 2020
1 parent
6b3f612
commit 7b119d6
Showing
5 changed files
with
49 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# | ||
# Exportamos nuestra key SSH | ||
|
||
resource "digitalocean_ssh_key" "imcosta" { | ||
name = "imcosta" | ||
resource "digitalocean_ssh_key" "key" { | ||
name = "key" | ||
public_key = file("id_rsa.pub") | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
**Algunos cambios realizados:**: | ||
|
||
1. **ClamAV Desactivado:** Si estan deployando en Digital Ocean no va a funcionar porque se come el procesador. Agregué DISABLE_CLAMAV=TRUE como variable de entorno en userdata.yaml. | ||
|
||
Se van a quedar sin el antivirus, pero si usan Linux o tienen sentido común :man_shrugging: | ||
|
||
2. **SPF y DMARC:** Ahora también se generan estos dos registros en su dominio: | ||
|
||
- tudominio.com. TXT "v=spf1 mx ~all" | ||
- tudominio.com. TXT "v=DMARC1; p=none; rua=mailto:[email protected]" | ||
|
||
3. **CNAME para SMTP, POP, IMAP:** Algunos clientes por defecto van a buscar, por ejemplo, smtp.tudominio.com, por eso hice que se generen los siguientes CNAME: | ||
|
||
- smtp.tudominio.com. CNAME mail.tudominio.com. | ||
- pop.tudominio.com. CNAME mail.tudominio.com. | ||
- imap.tudominio.com. CNAME mail.tudominio.com. | ||
|
||
4. **Volumen:** Metí los datos en un volumen, así si por algún motivo se tiene que regenerar el droplet no se pierden los datos. | ||
|
||
Pueden revisar el archivo 03_volume.tf para cambiar el tamaño del volumen generado. Tener en cuesta que el volumen tiene costo (u\$u 0.50 por 5gb). | ||
|
||
Si desean usar el almacenamiento del droplet en vez de un volumen eliminar 03_volume.tf y reemplazar en userdata.yaml /mnt/mail:/data por /root/mail-data:/data | ||
|
||
Agregué un prevent_destroy para evitar que Terraform accidentalmente elimine el volumen. Si por algún motivo molesta (Por ejemplo, generaron el volumen pero luego quieren cambiar el tamaño y no les interesa perder los datos) lo pueden quitar. | ||
|
||
5. **Eliminé la creación del dominio raiz:** Como ya tenia el dominio raiz generado de antes me fallaba porque intentaba regenerarlo. Por este motivo eliminé la creación del dominio raiz. Si no lo tienen generado en el DNS, primero pueden agregarlo manualmente. | ||
|
||
6. **Puse el dominio raiz en una variable:** Cuando apliquen estos scripts les va a preguntar el dominio. Recuerden ingresar el dominio raiz. | ||
|
||
7. **Cambie la interpolación de variables:** En Terraform 0.12 ya no hace falta el "\${variable}". Si es solo eso se puede poner la variable directamente y ahorrarse el warning. Recuerden usar Terraform > 0.12. | ||
|
||
8. **Usé la imágen de Debian 10:** Cuestión de gustos, si desean pueden cambiarlo por Ubuntu. | ||
|
||
**Consejos luego de tener el servidor instalado:**: | ||
|
||
1. **DKIM:** Deben agregar el registro DKIM en su DNS. Lo pueden sacar desde _Virtual Domains > tudominio.com > DKIM key_ | ||
|
||
2. **Usar un SMTP Relay:** En mi caso los e-mails no se mandaban. También hubo casos de gente que manda y a la otra persona le llega a spam. Para esto se puede configurar un relay en _System Setting > Email Processing > Default SMTP Route_. Pueden usar Sendgrid, Mailgun o cualquier otro :+1: | ||
|
||
No olviden validar el dominio asi no le sale "Enviado desde sendgrid.net" o lo que sea al destinatario. En el caso de Sendgrid se hace [desde acá](https://app.sendgrid.com/settings/sender_auth/domain/create). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeBNiMcymqStf/htH+Hwb1HkTM3lrQ+guCt9pC6SZm66nMys3Pun6SqlPoBDyObRNRzYKe57pxga3W2O0UE+puiGoICDK/XhJ2kSchJQLCpl1Cb+57tAez6vO46sLVrG4pdyKpOmYJrsCwt0zw0z4rIKr7Gm43Mr+GBLrDBdFz6UXArsSzazPihb1ySI3OdH01zCgenJC8lIO2V+4kvYzvzXZIng24SlO1Eoz0W/p/AF+HtzseKGoPXMYaxq9Mbu6jtlpFOuzmYsl3xQUP1nbFUqEKsozfMnjLA/1uGTV7AFKS9o6aIQ4Zz4Hg8gBWhTBmwV6W3hzW8k/MPlsIeGhZ kbs@Pablo-Fredrikson | ||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCiw0M5WaAMzd3F/GWgMYSazupY6gpGm/CAWhgCjVIeJdV+u2YWbR1hgqgOJmEu+X2K27g1tKmq5vgTwHr6oywOSjuKx+LQ0+GlkBU7i36BCdX2/CYT2bWBUdltZ5lIX//4Dtx91PZBjbe+WshUHFGNAuL1+FG12EZli/tKffyW/PjTm9zshMwlP39FoXkV/uAHjln0HQ++bbMoiWgkfp5zxtWBJH0E0HwwmPmllF8a4VIY9WXNhdGNLoT+IXfnrA5flkLfy9Td0hXwHWFqOKanyIsTdarUHhEtPRRKep1fqyzCR2U8fj+ok9cViq0nvSC9qxp8YmCn45Pw5jW6txpXX+rSo25yWXpa7A8mcJeHZAyjq5l/NTjfpYG96zRy4B+UAaPdbE7F0pLEzwfo6M+S8tZo7KWP5SFWLzvRF9Yhanfgoc7Z6bNRTfOgM/yQo7mWRVy+tsFBYBspFyAqIp3WH7kEKQQM71SQ7dDV5P/svKivNov5mC8jUqeawrbTuoQfnf1cUf5bSt1aATwI3t6Mcswy8cb+2l5rpzVXiiCaoyNwdwH5yO2xuv+I0QPQ/Nb05r+VOMBH08JO67fT94C2obLkVhf0EP9ZmX+SCk144hRNUf4zlyN8G8nJBBmssAnwGRDM/uDMBiLLMMCo/QcYKSZSFP9jZJ6wqD+kgfNG6w== [email protected] |