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

Commit

Permalink
Fixed error with Puppet's "each" function syntax in default.pp
Browse files Browse the repository at this point in the history
Updated .gitignore with git repositories paths.
Translated README to spanish.
  • Loading branch information
Luis Montealegre committed Dec 27, 2013
1 parent ba01ec0 commit ba3c77a
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 20 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/files/dot/.ssh
/.vagrant/
/dbal-fixtures/
/echale-gas-api/
/echale-gas-app/
/restful-extensions/
27 changes: 18 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,38 @@
# Échale Gas Virtual Machine
# Máquina Virtual para Échale Gas

Virtual Machine for Échale Gas project
Máquina virtual para el proyecto [Échale Gas](http://echalegas.comunidadphppuebla.com/)
creado durante el
[Hackathón de Datos y Gobierno Abierto Puebla 2013](https://www.facebook.com/OpenDataPuebla).

1.- Clone this repository and copy your Github SSH keys to the `files/dot` folder
## Instalación

1.- Clona este repositorio y copia tus llaves SSH de Github ala carpeta `files/dot` ya que
los repositorios del proyecto se descargan automáticamente al instalar la máquina virtual.
```bash
$ git clone [email protected]:ComPHPPuebla/echale-gas-vm.git echalegas
$ cd echalegas
$ cp -R ~/.ssh files/dot
$ cp -R ~/.ssh/ files/dot/
$ vagrant up
```

2.- Add VM Apache virtual hosts to `/etc/hosts` file
2.- Agrega los hosts virtuales de Apache en la máquina virtual al archivo `/etc/hosts`
para que puedas acceder a ellos desde la máquina anfitrión.
```bash
192.168.56.101 echalegas.dev
192.168.56.101 api.echalegas.dev
192.168.56.101 echalegas.dev
192.168.56.101 api.echalegas.dev
```

3.- Access your VM via `http://api.echalegas.dev`
3.- Estás list@ para usar la máquina virtual con:
* `http://echalegas.dev` ó
* `http://api.echalegas.dev`

## Installed software
## Software instalado

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

12 changes: 2 additions & 10 deletions puppet/manifests/default.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@
$php_values = hiera('php', false)
}

# copy dot files to ssh user's home directory
#exec { 'dotfiles':
# cwd => "/home/${::ssh_username}",
# command => "cp -r /vagrant/files/dot/.[a-zA-Z0-9]* /home/${::ssh_username}/ && chown -R ${::ssh_username} /home/${::ssh_username}/.[a-zA-Z0-9]*",
# onlyif => "test -d /vagrant/files/dot",
# require => User[$::ssh_username]
#}

# debian, ubuntu
case $::osfamily {
'debian': {
Expand Down Expand Up @@ -181,7 +173,7 @@
php_pecl_mod { $php_values['modules']['pecl']:; }
}
if count($php_values['ini']) > 0 {
$php_values['ini'].each { |$key, $value|
each( $php_values['ini'] ) |$key, $value| {
puphpet::ini { $key:
entry => "CUSTOM/${key}",
value => $value,
Expand Down Expand Up @@ -241,7 +233,7 @@
}

if is_hash($xdebug_values['settings']) and count($xdebug_values['settings']) > 0 {
$xdebug_values['settings'].each { |$key, $value|
each( $xdebug_values['settings'] ) |$key, $value| {
xdebug::augeas { $key:
value => $value,
service => $xdebug_webserver_service
Expand Down
5 changes: 5 additions & 0 deletions shell/echalegas-repos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ if [ ! -d /var/www/restful-extensions ]; then
sudo su -l vagrant -c 'cd /var/www && git clone [email protected]:ComPHPPuebla/restful-extensions.git'
fi

if [ ! -d /var/www/dbal-fixtures ]; then
echo "Cloning dbal-fixtures repository"
sudo su -l vagrant -c 'cd /var/www && git clone [email protected]:ComPHPPuebla/dbal-fixtures.git'
fi

if [ ! -d /var/www/echale-gas-api ]; then
echo "Cloning echale-gas-api repository"
sudo su -l vagrant -c 'cd /var/www && git clone [email protected]:ComPHPPuebla/echale-gas-api.git'
Expand Down
1 change: 0 additions & 1 deletion shell/folders-permissions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ cp /vagrant/files/dot/.ssh/config /home/vagrant/.ssh/config && chown vagrant /ho
chgrp -R vagrant /home/vagrant

apt-get install -y ack-grep
apt-get install -y php5-sqlite

1 change: 1 addition & 0 deletions shell/mysql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ sed -i "/skip/s/^/#/" /etc/mysql/my.cnf
sed -i "/bind/s/^/#/" /etc/mysql/my.cnf

service mysql restart

0 comments on commit ba3c77a

Please sign in to comment.