Terraform 12 - Deploy ELK stack, Configure Nginx reverse proxy & Route 53 on AWS

  Рет қаралды 1,475

zz TALK

zz TALK

Күн бұрын

Key points:
1. Deploy ELK stack via Terraform
2. Configure DNS for Kibana on Route53 and automate it via Terraform
3. Configure Nginx reverse proxy
Notes:
Nginx configuration example:
server {
listen 80;
server_name elk.zztalks.xyz;
location / {
proxy_pass localhost:5601;
}
}
Steps to install Nginx, configure the reverse proxy and enable the configuration:
sudo apt-get install nginx -y
sleep 10
sudo mv /tmp/zztalks.xyz /etc/nginx/sites-available/zztalks.xyz
sudo ln -s /etc/nginx/sites-available/zztalks.xyz /etc/nginx/sites-enabled/
sudo service nginx restart
Timestamp:
0:00​ - Intro
08:13 - Terraform for deploying ELK stack
16:46 - Terraform for Route 53
24:28 - Terraform apply & verification
32:28 - Nginx reverse proxy configuration
Key configuration:
cat installELK.sh
#!/bin/bash
sudo apt update && sudo apt-get upgrade -y
sudo apt-get install default-jre -y
sudo java -version
install elasticsearch
wget -qO - artifacts.elastic.co/GPG-KEY-... | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb artifacts.elastic.co/packages... stable main" | sudo tee /etc/apt/sources.list.d/elastic-7.x.list
sudo apt-get update
sudo apt-get install elasticsearch -y
sleep 10
sudo service elasticsearch start
sudo curl localhost:9200
instll logstash
sudo apt-get install logstash
sleep 10
install kibana
sudo apt-get install kibana
sleep 10
sudo mv /tmp/kibana.yml /etc/kibana/kibana.yml
sudo service kibana start
install metricbeat
sudo apt-get install metricbeat
sleep 10
sudo service metricbeat start
start logstash
sudo mv /tmp/apache.conf /etc/logstash/conf.d/apache.conf
sleep 15
sudo service logstash start
install nginx
sudo apt-get install nginx -y
sleep 10
sudo mv /tmp/zztalks.xyz /etc/nginx/sites-available/zztalks.xyz
sudo ln -s /etc/nginx/sites-available/zztalks.xyz /etc/nginx/sites-enabled/
sudo service nginx restart
===============================================================================
cat route53.tf
Manage a Route53 hosted zone
resource "aws_route53_zone" "zztalk" {
name = "zztalks.xyz"
}
Provide a Route53 record resource
resource "aws_route53_record" "elk" {
zone_id = aws_route53_zone.zztalk.zone_id
name = "elk.zztalks.xyz"
type = "A"
ttl = "300"
records = [aws_eip.ip.public_ip]
}
output "name_server" {
value = aws_route53_zone.zztalk.name_servers
}
#terraform #zzTalk #nginx #route53 #DNS #automation #aws #reverseproxy #infrastructureascode

Пікірлер: 6
@kapilch
@kapilch 2 жыл бұрын
great video
@omaramine8710
@omaramine8710 2 жыл бұрын
Did you have the repo for US?
@zztalk
@zztalk 2 жыл бұрын
I added the key configuration in the description. I highly recommended to write the code with me, which I think it’s the best way to learn. Feel free to comment if you run into any issue.
@prabhu9814
@prabhu9814 2 жыл бұрын
Plzz continue your videos.
@wonderfuljack123
@wonderfuljack123 2 жыл бұрын
How do you redirect HTTPS to HTTP on NGINX?
@zztalk
@zztalk 2 жыл бұрын
stackoverflow.com/questions/3893839/how-do-i-redirect-https-to-http-on-nginx
THEY WANTED TO TAKE ALL HIS GOODIES 🍫🥤🍟😂
00:17
OKUNJATA
Рет қаралды 15 МЛН
WHO DO I LOVE MOST?
00:22
dednahype
Рет қаралды 80 МЛН
БОЛЬШОЙ ПЕТУШОК #shorts
00:21
Паша Осадчий
Рет қаралды 8 МЛН
MEU IRMÃO FICOU FAMOSO
00:52
Matheus Kriwat
Рет қаралды 44 МЛН
Configure NGINX as a Reverse Proxy
16:43
NGINX
Рет қаралды 204 М.
The NGINX Crash Course
50:53
Laith Academy
Рет қаралды 476 М.
Terraform 08 - Packer + Terraform
41:21
zz TALK
Рет қаралды 436
Deploy Elastic Stack via ECK on Kubernetes
1:02:20
zz TALK
Рет қаралды 3,5 М.
Agile & Scrum Don't Work | Allen Holub In The Engineering Room Ep. 9
1:12:35
Continuous Delivery
Рет қаралды 109 М.
Hisense Official Flagship Store Hisense is the champion What is going on?
0:11
Special Effects Funny 44
Рет қаралды 2,6 МЛН
КРУТОЙ ТЕЛЕФОН
0:16
KINO KAIF
Рет қаралды 922 М.