This module will create a single EC2 instance which will configure MediaWiki in it. Apache , MediaWiki and MariaDB are configured in the same EC2 and the installation steps is managed via EC2 user data . The customization available with this stacks are mentioned in the below Inputs section.
* terraform.
* AWS access and secret keys.
* RHEL 8 AMI details from the AWS account where we are going to provision MediaWiki stack.
-
Clone the repository to your local.
-
Switch to terraform folder.
-
Excute terraform commands
-
Access the Wikimedia URL and login with the wiki user configured.
Name | Description | Type | Default | Required |
---|---|---|---|---|
access_key | AWS Access Key | string |
n/a | yes |
db_root_pwd | DB root user password | string |
n/a | yes |
ec2_ami | The AMI to use for the instance . PS : select Red Hat Enterprise Linux 8 AMI | string |
n/a | yes |
ec2_instance_type | The type of instance | string |
"t2.micro" |
no |
http_range | Source from which media wiki URL to be access.Dafault accessible from everywhere | string |
"0.0.0.0/0" |
no |
public_key | The public key material. For more details abpout generation of public key ,refer Readme file | string |
n/a | yes |
region | AWS region | string |
"us-east-1" |
no |
secret_key | AWS Secret Key | string |
n/a | yes |
ssh_range | Source from which SSH access to be enabled for the EC2. Dafault accessible from everywhere | string |
"0.0.0.0/0" |
no |
subnet_cidr_block | The CIDR block for the subnet | string |
"10.0.0.0/24" |
no |
vpc_cidr_block | The CIDR block of the VPC | string |
"10.0.0.0/22" |
no |
wiki_db | Wiki db name | string |
n/a | yes |
wiki_db_pwd | Wiki DB user password | string |
n/a | yes |
wiki_db_user | Wiki DB user name | string |
n/a | yes |
wiki_name | Wiki name | string |
n/a | yes |
wiki_pwd | Wiki user password . PS : Min length 10 | string |
n/a | yes |
wiki_user | Wiki user name | string |
n/a | yes |
Name | Description |
---|---|
Wikimedia_URL | Wikimedia login instructions |
Create target group and register Wikimedia EC2 with appropriate health checks (HTTP).Create ALB and attach target group and add path based routing. For example , /mediawiki path redirect traffic to TG1 . Then create TG2 with changes and add to ALB . Add new path /mediawikinew and configure listener rule to route traffic to TG2. Post testing point /mediawiki to TG2 and TG1 will be idle and wait for next changes.
Current installation won’t support cluster configuration. We need to have multiple application servers which will point to the central DB. Once we know procedure to implement , we can make use of AWS ALB with ASG to achieve elastic architecture. Please find below a proposed architect using ALB , EC2 and RDS. We can further add more AWS services such as Route 53 to achieve blue green or rolling deployment techniques.