Created by Akanksha

Automation — WordPress Deployment on Kubernetes Multi-Node Cluster launched over AWS using Ansible

Deploying website using WordPress is an easy task but when it comes to high availability and Fast Deployment with Orchestration and Auto-Provisioning facility — We are referring MNA over Cloud….

Kubernetes :

Ansible :

AWS :

WordPress:

Let’s Brief our Plan before Proceeding further:

# mkdir kube-ansible
# cd kube-ansible
# mkdir roles
# vim ansible.cfg
ansible.cfg
file format:
access_key: GUJGWDUYGUEWVVFEWGVFUYV
secret_key: huadub7635897^%&hdfqt57gvhg

Steps:

# mkdir role
# cd role
# ansible-galaxy init ec2
# ansible-galaxy init k8s_master
# ansible-galaxy init k8s_slave
# ansible-galaxy init k8s_client
# ansible-galaxy init nfs-server
NFS-Server Setup
# cd role/nfs-server/tasks
# vim main.yml
task.yml
# cd role/nfs-server/vars
# vim main.yml
var.yml
ec2-ansible-role
# cd role/ec2/tasks
# vim main.yml
task.yml
# cd role/ec2/vars
# vim main.yml
var.yml
k8s-master-role
# cd role/k8s_master/tasks
# vim main.yml
task.yml
# cd role/k8s_master/vars
# vim main.yml
k8s-slave-role
# cd role/k8s_slave/tasks
# vim main.yml
task.yml
# cd role/k8s_master/vars
# vim main.yml
var.yml
kube-wordpress-role
# cd role/kube_wordpress/tasks
# vim main.yml
task.yml
# cd role/k8s_master/vars
# vim storage.yml.j2
storage.yml.j2
# cd role/kube_wordpress/files
# vim kustomization.yml
# vim mysql-deploy.yml
# vim secret.yml
# vim wordpress-deploy.yml
Kustomization.yml
mysql-deploy.yml
secret.yml
wordpress-deploy.yml
# cd kube_ansible/
# vim setup.yml
setup.yml
# ansible-playbook setup.yml -ask-vault-pass

Thanks for reading. Hope this blog have given you some valuable inputs!!

Technology enhancement take a journey of learning and exploring!! On a way to achieve and Follow my own star!!