Skip to content
This repository was archived by the owner on Jan 30, 2022. It is now read-only.

Commit

Permalink
Added PuPHPet configuration and echalegas-* Github repositories.
Browse files Browse the repository at this point in the history
  • Loading branch information
Luis Montealegre committed Dec 27, 2013
1 parent 02484e3 commit ba01ec0
Show file tree
Hide file tree
Showing 20 changed files with 1,233 additions and 2 deletions.
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
echale-gas-vm
=============
# Échale Gas Virtual Machine

Virtual Machine for Échale Gas project

1.- Clone this repository and copy your Github SSH keys to the `files/dot` folder
```bash
$ git clone [email protected]:ComPHPPuebla/echale-gas-vm.git echalegas
$ cd echalegas
$ cp -R ~/.ssh files/dot
$ vagrant up
```

2.- Add VM Apache virtual hosts to `/etc/hosts` file
```bash
192.168.56.101 echalegas.dev
192.168.56.101 api.echalegas.dev
```

3.- Access your VM via `http://api.echalegas.dev`

## Installed software

* PHP 5.4
* XDebug
* MySQL
* SQLite
* Composer
* Vim

43 changes: 43 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Vagrant.configure("2") do |config|
config.vm.box = "echalegas32"
config.vm.box_url = "http://files.vagrantup.com/precise32.box"

config.vm.network "private_network", ip: "192.168.56.101"
#config.vm.network "private_network", ip: "10.0.0.100"
config.vm.network :forwarded_port, guest: 3306, host: 3309

config.vm.synced_folder "./", "/var/www", id: "vagrant-root", owner: 'vagrant', group: 'vagrant', :nfs => false

config.vm.usable_port_range = (2200..2250)

config.vm.provider :virtualbox do |virtualbox|
virtualbox.customize ["modifyvm", :id, "--name", "echalegas"]
virtualbox.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
virtualbox.customize ["modifyvm", :id, "--memory", "1024"]
virtualbox.customize ["setextradata", :id, "--VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
end

config.vm.provision :shell, :path => "shell/initial-setup.sh"
config.vm.provision :shell, :path => "shell/update-puppet.sh"
config.vm.provision :shell, :path => "shell/librarian-puppet-vagrant.sh"
config.vm.provision :shell, :path => "shell/folders-permissions.sh"
config.vm.provision :shell, :path => "shell/echalegas-repos.sh"
config.vm.provision :puppet do |puppet|
puppet.facter = {
"ssh_username" => "vagrant"
}

puppet.manifests_path = "puppet/manifests"
puppet.options = ["--verbose", "--hiera_config /vagrant/hiera.yaml", "--parser future"]
end
config.vm.provision :shell, :path => "shell/mysql.sh"

config.ssh.username = "vagrant"
config.ssh.shell = "bash -l"
config.ssh.keep_alive = true
config.ssh.forward_agent = false
config.ssh.forward_x11 = false

config.vagrant.host = :detect
end

52 changes: 52 additions & 0 deletions files/dot/.bash_aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
if [ -f /etc/bash_completion ]; then
source /etc/bash_completion
fi

__has_parent_dir () {
# Utility function so we can test for things like .git/.hg without firing up a
# separate process
test -d "$1" && return 0;

current="."
while [ ! "$current" -ef "$current/.." ]; do
if [ -d "$current/$1" ]; then
return 0;
fi
current="$current/..";
done

return 1;
}

__vcs_name() {
if [ -d .svn ]; then
echo "-[svn]";
elif __has_parent_dir ".git"; then
echo "-[$(__git_ps1 'git %s')]";
elif __has_parent_dir ".hg"; then
echo "-[hg $(hg branch)]"
fi
}

black=$(tput -Txterm setaf 0)
red=$(tput -Txterm setaf 1)
green=$(tput -Txterm setaf 2)
yellow=$(tput -Txterm setaf 3)
dk_blue=$(tput -Txterm setaf 4)
pink=$(tput -Txterm setaf 5)
lt_blue=$(tput -Txterm setaf 6)

bold=$(tput -Txterm bold)
reset=$(tput -Txterm sgr0)

# Nicely formatted terminal prompt
export PS1='\n\[$bold\]\[$black\][\[$dk_blue\]\@\[$black\]]-[\[$green\]\u\[$yellow\]@\[$green\]\h\[$black\]]-[\[$pink\]\w\[$black\]]\[\033[0;33m\]$(__vcs_name) \[\033[00m\]\[$reset\]\n\[$reset\]\$ '

alias ls='ls -F --color=always'
alias dir='dir -F --color=always'
alias ll='ls -al'
alias cp='cp -iv'
alias rm='rm -i'
alias mv='mv -iv'
alias grep='grep --color=auto -in'
alias ..='cd ..'
25 changes: 25 additions & 0 deletions files/dot/.gitconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[core]
editor = nano
autocrlf = input

[color]
branch = auto
diff = auto
status = auto
ui = auto

[color "branch"]
current = yellow reverse
local = yellow
remote = green

[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold

[color "status"]
added = yellow
changed = green
untracked = cyan
2 changes: 2 additions & 0 deletions files/dot/.ssh/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Host github.com
StrictHostKeyChecking no
Loading

0 comments on commit ba01ec0

Please sign in to comment.