Skip to content

shyam0209/mediawiki_shyam_kumar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

MediaWiki on a Red Hat Enterprise Linux

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.

Steps to provision MediaWiki stack on AWS

Prerequisite

* terraform. 
* AWS access and secret keys.
* RHEL 8 AMI details from the AWS account where we are going to provision MediaWiki stack.
  1. Clone the repository to your local.

    git clone
  2. Switch to terraform folder.

    navigate to terraform folder
  3. Excute terraform commands

    terraform init terraform plan terraform apply
  4. Access the Wikimedia URL and login with the wiki user configured.

    wikimedia login wikimedia home

Inputs

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

Outputs

Name Description
Wikimedia_URL Wikimedia login instructions

TO DO

Blue Green Deployment

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.

Scaling

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.

cluster

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published