This file contains hidden or 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 "aws_efs_file_system" "efs_file" { | |
creation_token = "task2" | |
tags = { | |
Name = "EfsVolume" | |
} | |
} | |
resource "aws_efs_mount_target" "mount_target" { | |
file_system_id = aws_efs_file_system.efs_file.id | |
subnet_id = aws_instance.webos.subnet_id | |
} |
This file contains hidden or 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
#combined use of remote and local execution | |
resource "null_resource" "nl1" { | |
depends_on = [ aws_volume_attachment.ebs_att,aws_s3_bucket.b,aws_cloudfront_distribution.s3_distribution ] | |
#sending local data to remote instance using scp | |
provisioner "local-exec" { | |
command = "chmod 400 /root/HybridCloud/Terraform/MyKeyPair.pem && scp -o StrictHostKeyChecking=no -r -i /root/HybridCloud/Terraform/MyKeyPair.pem /root/HybridCloud/Terraform/php ec2-user@${aws_instance.webos.public_dns}:/home/ec2-user" | |
} | |
connection { | |
type = "ssh" | |
user = "ec2-user" |
This file contains hidden or 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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: grafana | |
labels: | |
app: grafana | |
spec: | |
ports: | |
- port: 3000 | |
nodePort: 30001 |
This file contains hidden or 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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: prometheus | |
labels: | |
app: prometheus | |
spec: | |
ports: | |
- port: 9090 | |
nodePort: 30000 |
This file contains hidden or 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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: wordpress | |
labels: | |
app: wordpress | |
spec: | |
ports: | |
- port: 80 | |
selector: |
This file contains hidden or 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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: wordpress-mysql | |
labels: | |
app: wordpress | |
spec: | |
ports: | |
- port: 3306 | |
selector: |
This file contains hidden or 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
apiVersion: kustomize.config.k8s.io/v1beta1 | |
kind: Kustomization | |
secretGenerator: | |
- name: mysql-pass | |
literals: | |
- password=YOUR_PASSWORD | |
resources: | |
- mysql-deployment.yaml | |
- wordpress-deployment.yaml |
This file contains hidden or 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
--- | |
apiVersion: v1 | |
kind: PersistentVolume | |
metadata: | |
name: http-volume | |
labels: | |
type: local | |
spec: | |
storageClassName: manual | |
capacity: |
This file contains hidden or 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
#generate private key | |
resource "tls_private_key" "tkey" { | |
algorithm = "RSA" | |
} | |
#assigne public openssh to the aws key pair | |
resource "aws_key_pair" "deployer" { | |
key_name = "deployer-key" | |
public_key = tls_private_key.tkey.public_key_openssh | |
depends_on=[tls_private_key.tkey] | |
} |
This file contains hidden or 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
<html> | |
<head> | |
<title> MY FIRST WEBPAGE </title> | |
</head> | |
<style> | |
body { | |
background-color: #E6E6FA; | |
} | |
</style> | |
<body> |
NewerOlder