Giter VIP home page Giter VIP logo

vagrant-ansible-wordpress-1's Introduction

Vagrant Ansible Wordpress

Vagrant-Ansible-Wordpress

Prerequisites

You'll need to have the following prerequisites installed on your workstation:

vagrant box add bento/ubuntu-16.04

What is included?

  • Unzip
  • Curl
  • Git
  • PHP 7
  • Apache
  • MySql
  • PhpMyAdmin
  • Wordpress
  • Wp-cli
  • Zsh
  • Oh-My-ZSH
  • Terminal Fonts

Quick Start 🏁

  $ git clone [email protected]:Mayccoll/Vagrant-Ansible-Wordpress.git
  $ cd Vagrant-Ansible-Wordpress
  $ vagrant up

DONE!!!

Once the process is finished you will see the installation data in your terminal

Terminal

Install wordpress

In your browser go to http://192.168.70.70 and follow the installation process.

Wordpress

Optional: you can add the next rule to your host file and go to http://mywordpress.local

192.168.70.70     mywordpress.local

use this command line to add the rule:

$ echo "\n192.168.70.70     mywordpress.local" | sudo tee -a /etc/hosts

Access wordpress files:

Inside your repository in ./www/wordpress/ folder you will find all the wordpress files

.
├── ansible
├── config.yaml
├── README
├── share
├── Vagrantfile
└── www
    └── wordpress
        ├── index.php
        ├── license.txt
        ├── readme.html
        ├── wp-activate.php
        ├── wp-admin
        ├── wp-blog-header.php
        ├── wp-comments-post.php
        ├── wp-config-sample.php
        ├── wp-content
        ├── wp-cron.php
        ├── wp-includes
        ├── wp-links-opml.php
        ├── wp-load.php
        ├── wp-login.php
        ├── wp-mail.php
        ├── wp-settings.php
        ├── wp-signup.php
        ├── wp-trackback.php
        └── xmlrpc.php

Advanced

Configuration

There are one configuration file CONFIG.yml.

.
└── CONFIG.yml

Config VirtualBox VM

./CONFIG.yaml

- name               : vag-wordpress
  box                : bento/ubuntu-16.04
  box_version        : 2.2.9
  box_check_update   : false
  ram                : 1028
  cpus               : 1

Defining a Forwarded Port

./CONFIG.yaml

ports           :
  - guest       : 3000
    host        : 3000

  - guest       : 80
    host        : 8080

Config Synced folders

./CONFIG.yaml

  syncDir         :
    - host        : share
      guest       : /home/vagrant/share

    - host        : www
      guest       : /home/vagrant/www
      owner       : vagrant
      group       : vagrant
      dmode       : 775
      fmode       : 775

Ansible

Ansible Playbook

This playbook will install all the dependencies for wordpress.

It can be found in:

./ansible/playbook.yaml

Config Ansible Vars

You can config wordpress database, user and password in CONFIG.yml

./CONFIG.yml

---
  # | ······ Set Domain URL
  wpDomain          : 'mywordpress.local'

  # | ······ MySQL Config
  mysqlUser         : 'root'
  mysqlPass         : 'vagrant'
  mysqlTemplatePath : 'templates/my.cnf'

  # | ······ MySQL Database
  dbName            : 'wordpress'
  dbUser            : 'wordpress'
  dbPass            : 'vagrant'

  # | ······ Wordpress Config
  wordpressPath     : '/home/vagrant/www'
  wordpressTemPath  : 'templates/wp-config.php'
  vhostTemplatePath : 'templates/vhost.conf'

  # | ······ Vagrant User and Group
  home              : '/home/vagrant'
  owner             : 'vagrant'
  group             : 'vagrant'

PhpMyAdmin

http://192.168.70.99:8088

  • Username: wordpress
  • Password: vagrant

www

http://192.168.70.99:8080

Local folder: ./html

vagrant-ansible-wordpress-1's People

Watchers

James Cloos avatar athiwatp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.