Download presentation
Presentation is loading. Please wait.
Published byLester Jacobs Modified over 9 years ago
1
Wordpress with Mina Automated Deployment Solution Jonathan Gravato DIG 4104c
2
What is Mina? Ruby gem Fast deployer and server automation tool Creates Mina tasks (shell script) preset to Create new directory Make symbolic to common resources Point public directory to new directory Clean up old data Uploads to server & executes from local Requires SSH connection Git repository Permission to change server config.
3
Alternatives Capistrano Remote server automation tool Heavy on Ruby/Rails related features Large learning curve Capistrano Capistrano Vlad Similar to Mina Vlad the Deployer Vlad the Deployer
4
What’s the difference? Capistrano and Vlad Each command run separately on their own SSH sessions Mina Entire procedure generated as remote run Bash script Only one SSH session created for whole shell Reduces SSH connection overhead Mina should be faster to deploy Requires less Ruby knowledge to implement.
5
Why Automated Deployment? Saves time Minimizes downtime during deployment Reduces human mistakes Missing files Uploading wrong files Shared between multiple developers in a team Usually tied to source code control system
6
Why Automated Deployment? Deploying with Git Hooks? Git generates URL in reference to PHP script to perform tasks Hole exposed due to URL URL can be used to deploy files manually using PHP Cleanup, roll back and lock cmds need to be created All tasks handled in a simple Rake file tutorial link Mina task example
7
Case Study: Knights Capital Lost $172,000+ per second for 45 minutes 2700 seconds in 45 minutes $465 million loss Went bankrupt in 2012 due to failed deployment and cleanup procedures New code deployed to 7 of 8 servers New deploy did not remove old code 8 th server utilized old code errors prompted warning messages to developers but were ignored No one reviewed deployment records
8
Steps for Deploying with Mina 1. Prepare Server Layout New three directory layout required for Mina (example)example Releases, Shared and Current directories created Change Document Root to point to current directory Location of symlink which references newest version and shared files 2. Install Mina $ gem install mina 3. Setup Mina with Wordpress Git repository with Wordpress source code Generate config/deploy.rb shell script Cleanup unnecessary lines of code Configure server/login info Configure Setup, Deploy and Rollback task
9
Steps for Deploying with Mina SSH to server Create new directory featuring your domain (root access) Set ownership of new directory to user (vs server) Create Mina directory structure on local machine $ mina setup Deploy current release (version) of code Update code Commit change Push to repo $ mina deploy To roll back $ mina rollback
10
Questions 1. What is Mina? Deployer & server automation tool that uses a shell script to handle tasks. 2. What is a Rake file? A rake file is the shell script which holds tasks or blocks of code to be run in Ruby. 3. What is one benefit to using automated deployment? Explain this benefit. More secure Saves time Minimizes downtime Reduces human mistakes
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.