Powershell AWS Automation Management (10)-Create a highly available WordPress blog (top)

Source: Internet
Author: User
Tags wordpress blog elastic load balancer

It took 2 weeks for the beans to learn some of the core commands of AWS PowerShell intermittently, and then took 2 days to assemble the knowledge points together. Currently, in addition to the official documentation of the Quick Manuals and command Daquan basically there is not much PowerShell to manage the content of AWS, most of the command beans is a search and view help hard to try out, the following share out, if you have similar needs later can save some time.

Now demonstrate how to create a highly available WordPress blog on AWS with PowerShell scripts. This is a typical high-availability scenario for AWS.

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/84/57/wKioL1eN0BuT7xdhAAdA3ToXccI699.png "title=" 0.PNG " alt= "Wkiol1en0but7xdhaada3toxcci699.png"/>

Here are the basic requirements

  1. The user elastic Load balancer URL,ELB forwards requests through DNS to the EC2 instance of any of these word press, which accesses the remote MARIADB RDS instance via port 3309;

  2. MySQL achieves high availability through Multiple-az;

  3. Web server enables load balancing and high availability through ELB;

  4. According to the CPU or other load standard, ELB inside the cluster can automatically increase, delete EC2 instance;

  5. The server created by auto Scaling must be automatically updated to the latest version;

  6. All the pictures and videos involved in the blog must be saved on the S3 bucket, and the CDN acceleration via CloudFront, the blog's Media resource URL automatically redirects to the CDN address for parsing.

Now look at how PowerShell implements each of these features.

My basic idea

    1. Create EC2-S3 role, which is assigned to EC2 virtual machines so that they automatically have access to S3 content after they are created.

    2. Create a VPC Network

    3. Create 2 subnets of a VPC, located in different AZ

    4. Create an Internet gateway

    5. Configure the routing table

    6. Create and configure the EC2 security Group to ensure that 80 and 22 ports are available

    7. Create a highly available MARIADB database

    8. Configure the security Group for the database to ensure that port 3306 is available

    9. Create a S3 Bucket and configure policy

    10. Create CloudFront distribution points, bind S3 buckets

    11. Preparing the WordPress configuration document

    12. Preparing the configuration document for VirtualHost

    13. Uploading the configuration document into the S3 bucket

    14. Configure bash shell scripts, including Lamp,wordpress,aws,crontab and S3 synchronization, and more

    15. Create a EC2 virtual machine, specify the bootstrap command created in 14 steps

    16. Update DNS records, point to the virtual machine

    17. Initializing the WordPress interface

    18. Generate image file after confirmation is correct

    19. Configure Elb

    20. Update DNS records to ELB address

    21. Configuring launch Configuration

    22. Configure Auto Scaling

The next section looks at the specific scripting implementation.

This article is from the "Mapo Tofu" blog, please be sure to keep this source http://beanxyz.blog.51cto.com/5570417/1827724

Powershell AWS Automation Management (10)-Create a highly available WordPress blog (top)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.