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
resource "mailgun_domain" "example_mailing_domain" { | |
name = "m.example.com" | |
spam_action = "disabled" | |
smtp_password = "strong_password" | |
} | |
resource "cloudflare_record" "mail-receiving-dns-entry" { | |
count = 2 | |
domain = "${cloudflare_zone.my_domain_entry.zone}" | |
type = "${lookup(mailgun_domain.example_mailing_domain.receiving_records[count.index], "record_type")}" |
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
resource "cloudflare_zone" "my_domain_entry" { | |
zone = "example.com" | |
} | |
resource "cloudflare_zone_settings_override" "my_domain_entry_config" { | |
name = "${cloudflare_zone.my_domain_entry.zone}" | |
settings { | |
tls_1_3 = "on" | |
} | |
} |
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
resource "digitalocean_droplet" "my_droplet" { | |
name = "my_droplet_name" | |
image = "debian-9-x64" | |
region = "ams3" | |
size = "s-1vcpu-1gb" | |
private_networking = true | |
monitoring = false | |
backups = false | |
resize_disk = true | |
} |
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
provider "digitalocean" { | |
token = "DO_TOKEN_GOES_HERE" | |
} | |
provider "mailgun" { | |
api_key = "MAILGUN_API_KEY_GOES_HERE" | |
} | |
provider "cloudflare" { | |
email = "CLOUDFLARE_ACCOUNT_EMAIL" |
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
docker run \ | |
-d \ | |
-p 3000:3000 \ | |
--name=grafana \ | |
-e "GF_SERVER_ROOT_URL=http://grafana.server.name" \ | |
-e "GF_SECURITY_ADMIN_PASSWORD=secret" \ | |
grafana/grafana |
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
# A scrape configuration containing exactly one endpoint to scrape: | |
# Here it's Prometheus itself. | |
scrape_configs: | |
# The job name is added as a label `job=<job_name>` to any time series scraped from this config. | |
# metrics_path defaults to '/metrics' | |
# scheme defaults to 'http'. | |
- job_name: 'default_job' | |
static_configs: | |
- targets: | |
- localhost:9100 # node_exporter |
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
docker run \ | |
--volume=/:/rootfs:ro \ | |
--volume=/var/run:/var/run:ro \ | |
--volume=/sys:/sys:ro \ | |
--volume=/var/lib/docker/:/var/lib/docker:ro \ | |
--volume=/dev/disk/:/dev/disk:ro \ | |
--publish=8080:8080 \ | |
--detach=true \ | |
--name=cadvisor \ | |
google/cadvisor:latest |
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
docker run -p 9090:9090 -v /prometheus-data \ | |
prom/prometheus --config.file=/prometheus-data/prometheus.yml |
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
#!/bin/bash | |
meta_data() { | |
cat <<END | |
<?xml version="1.0"?> | |
<!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd"> | |
<resource-agent name="foobar" version="0.1"> | |
<version>0.1</version> | |
<longdesc lang="en"> | |
floatip ocf resource agent for claiming a specified Floating IP via the DigitalOcean API</longdesc> |