Ansible has included F5 as extra network module, which can help to provide LBaaS by use of Infrastructure as Code method. Like normal Ansible modules, Ansible F5 module is installed the /usr/lib/python2.7/site-packages/ansible/modules/extras/network directory. [dzhang@localhost network]$ pwd /usr/lib/python2.7/site-packages/ansible/modules/extras/network [dzhang@localhost network]$ ls -al total 512 drwxr-xr-x. 9 root root 4096 Jan 30 03:17 . drwxr-xr-x. 20 root root …
Category: Network Automation
Use Terraform to Set Up AWS Auto-Scaling Group with ELB
AWS auto-scaling group helps you ensure that you have the correct number of Amazon EC2 instances available to handle the load for your application. By use of auto-scaling policy, Auto Scaling group can launch or terminate instances as demand on your application increases or decreases. Today, I will show you how to use Terraform template …
Continue reading Use Terraform to Set Up AWS Auto-Scaling Group with ELB
AWS S3 Bucket for ELB Access Log with Terraform
To storage your AWS ELB access log to ASW S3. We use Terraform template below the below: Create a new S3 bucket called "elb-log.davidwzhang.com" Define a bucket policy which grant Elastic Load Balancing access to the newly created S3 bucket "elb-log.davidwzhang.com". As you know, each AWS region has its own account ID for Elastic Load Balancing. …
Continue reading AWS S3 Bucket for ELB Access Log with Terraform
AWS ELB with Terraform
Today, I will show you how to build a AWS ELB with Terraform. My Terraform template includes: Create 2 EC2 instance as the backe-end member servers. We will run basic web service (HTTP on TCP 80) on these 2 EC2 instances; Create a AWS Elastic LB who is listening on TCP 80 and perform health …
Create AWS VPC with Terraform
Today, I will show you how to use Terraform to create a customized VPC in AWS. Using this Terraform template, I will create a VPC: Name: terraform-vpc IP block for this VPC: 10.0.0.0/16 Public Subnet: 10.0.1.0/24. (Note: VM instance in this subnet will have Internet access) Private Subnet: 10.0.100.0/24 To verify the newly created VPC …
Create real-world like ASW security groups using Terraform
[dzhang@localhost terraform]$ cat instance.tf provider "aws" { access_key = "my_access_key" secret_key = "my_secret_key" region = "ap-southeast-2" } resource "aws_security_group" "app_server" { name = "app_server" description = "app server security group" vpc_id = "vpc-d808xxxx" ingress { from_port = 22 to_port = 22 protocol = "tcp" cidr_blocks = ["6x.24x.5x.16x/32"] } tags { Name = "APP" } } …
Continue reading Create real-world like ASW security groups using Terraform
Create a AWS security group using Terraform
Create my Terraform file [dzhang@localhost terraform]$ cat instance.tf provider "aws" { access_key = "my_access_key" secret_key = "my_secret_key" region = "ap-southeast-2" } resource "aws_security_group" "allow_ssh" { name = "allow_all" description = "Allow inbound SSH traffic from my IP" vpc_id = "VPC-ID" ingress { from_port = 22 to_port = 22 protocol = "tcp" cidr_blocks = ["6x.24x.5x.167/32"] } …
Continue reading Create a AWS security group using Terraform
Install Python Paramiko on Centos 7
You need the following packages installed so that the Paramiko module installation can be completed successfully: yum install python-devel yum install libffi-devel yum install -y openssl-devel [root@localhost python2.7]# pip install paramiko Collecting paramiko Using cached paramiko-2.0.2-py2.py3-none-any.whl Collecting cryptography>=1.1 (from paramiko) Using cached cryptography-1.5.tar.gz Requirement already satisfied (use --upgrade to upgrade): pyasn1>=0.1.7 in ./site-packages (from paramiko) …