Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Traduccion del Capitulo 13: Servers an Deployment Issue #26 #57

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions _posts/04-01-01-Dependency-Management.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Gestión de Dependencias
anchor: dependency_management
anchor: gestion_de_dependencias
---

# Dependency Management {#dependency_management_title}
# Gestión de Dependencias {#gestion_de_dependencias_title}

There are a ton of PHP libraries, frameworks, and components to choose from. Your project will likely use
several of them — these are project dependencies. Until recently, PHP did not have a good way to manage
Expand All @@ -14,5 +14,5 @@ Currently there are two major package management systems for PHP - [Composer] an
the most popular package manager for PHP, however for a long time PEAR was the primary package manager in use.
Knowing PEAR's history is a good idea, since you may still find references to it even if you never use it.

[Composer]: /#composer_and_packagist
[Composer]: /#composer_y_packagist
[PEAR]: /#pear
4 changes: 2 additions & 2 deletions _posts/04-02-01-Composer-and-Packagist.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: Composer y Packagist
isChild: true
anchor: composer_and_packagist
anchor: composer_y_packagist
---

## Composer and Packagist {#composer_and_packagist_title}
## Composer and Packagist {#composer_y_packagist_title}

Composer is a **brilliant** dependency manager for PHP. List your project's dependencies in a `composer.json` file and,
with a few simple commands, Composer will automatically download your project's dependencies and setup autoloading for
Expand Down
2 changes: 1 addition & 1 deletion _posts/04-03-01-PEAR.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,5 @@ $request = new pear2\HTTP\Request();
[2]: http://pear.php.net/manual/en/installation.getting.php
[3]: http://pear.php.net/packages.php
[4]: http://pear.php.net/manual/en/guide.users.commandline.channels.php
[5]: /#composer_and_packagist
[5]: /#composer_y_packagist
[6]: http://getcomposer.org/doc/05-repositories.md#pear
6 changes: 3 additions & 3 deletions _posts/12-01-01-Servers-and-Deployment.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Servidores y Despliegue
anchor: servers_and_deployment
anchor: servidores_y_despliegue
---

# Servers and Deployment {#servers_and_deployment_title}
# Servidores y Despliegue {#servidores_y_despliegue_title}

PHP applications can be deployed and run on production web servers in a number of ways.
Las aplicaciones escritas en PHP pueden ser desplegadas y correr en una gran variedad de formas.
10 changes: 4 additions & 6 deletions _posts/12-02-01-Platform-as-a-Service.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
---
title: Plataforma como Servicio (PaaS)
isChild: true
anchor: platform_as_a_service
anchor: plataforma_como_servicio
---

## Platform as a Service (PaaS) {#platform_as_a_service_title}
## Plataforma como Servicio (PaaS) {#plataforma_como_servicio_title}

PaaS provides the system and network architecture necessary to run PHP applications on the web. This means little to no
configuration for launching PHP applications or PHP frameworks.
El modelo PaaS provee del sistema y la arquitectura de red necesarios para correr aplicaciones PHP en la web. Lo cual implica ninguna o prácticamente ninguna necesidad de configuración previa para lanzar aplicaciones o frameworks de PHP.

Recently PaaS has become a popular method for deploying, hosting, and scaling PHP applications of all sizes. You can
find a list of [PHP PaaS "Platform as a Service" providers](#php_paas_providers) in our [resources section](#resources).
Recientemente el modelo PaaS se ha convertido en un método popular para el despliegue, hospedaje y escalado de aplicaciones PHP sin importar el tamaño de estas. Puedes encontrar una lista de [proveedores de PHP PaaS “Plataforma como Servicio”](#php_paas_providers) en nuestra [sección de recursos](#recursos).
50 changes: 19 additions & 31 deletions _posts/12-03-01-Virtual-or-Dedicated-Servers.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,42 @@
---
title: Servidores Virtuales y Dedicados
isChild: true
anchor: virtual_or_dedicated_servers
anchor: servidores_virtuales_y_dedicados
---

## Virtual or Dedicated Servers {#virtual_or_dedicated_servers_title}
## Servidores Virtuales y Dedicados {#servidores_virtuales_y_dedicados_title}

If you are comfortable with systems administration, or are interested in learning it, virtual or dedicated servers give
you complete control of your application's production environment.
Si te sientes cómodo con la Administración de Sistemas o si deseas aprender sobre ella, los servidores virtuales o dedicados te dan el control completo sobre el entorno de producción de tu aplicación.

### nginx and PHP-FPM
### nginx y PHP-FPM

PHP, via PHP's built-in FastCGI Process Manager (FPM), pairs really nicely with [nginx], which is a lightweight,
high-performance web server. It uses less memory than Apache and can better handle more concurrent requests. This is
especially important on virtual servers that don't have much memory to spare.
PHP a través del manejador de procesos integrado FastCGI (FPM por sus siglas en inglés) hace una pareja perfecta con [nginx] el cual es un servidor web ligero y de alto rendimiento. Usa menos memoria que Apache y puede manejar mejor una mayor cantidad de solicitudes concurrentes. Esto es especialmente importante cuando se trata de servidores virtuales que no poseen mucha memoria.

* [Read more on nginx][nginx]
* [Read more on PHP-FPM][phpfpm]
* [Read more on setting up nginx and PHP-FPM securely][secure-nginx-phpfpm]
* [Lee más sobre nginx][nginx]
* [Lee más sobre PHP-FPM][phpfpm]
* [Lee más sobre configurar nginx y PHP-FPM de forma segura][secure-nginx-phpfpm]

### Apache and PHP
### Apache y PHP

PHP and Apache have a long history together. Apache is wildly configurable and has many available
[modules][apache-modules] to extend functionality. It is a popular choice for shared servers and an easy setup for PHP
frameworks and open source apps like WordPress. Unfortunately, Apache uses more resources than nginx by default and
cannot handle as many visitors at the same time.
PHP y apache comparten una larga historia juntos. Apache es ampliamente configurable y hay muchos [módulos][apache-modules] disponibles para extender su funcionalidad. Es una opción popular para los servidores compartidos y para frameworks y aplicaciones *open source* como WordPress. Desafortunadamente Apache por defecto usa muchos más recursos que nginx y no puede manejar tantos visitantes al mismo tiempo.

Apache has several possible configurations for running PHP. The most common and easiest to setup is the [prefork MPM]
with mod_php5. While it isn't the most memory efficient, it is the simplest to get working and to use. This is probably
the best choice if you don't want to dig too deeply into the server administration aspects. Note that if you use
mod_php5 you MUST use the prefork MPM.
Apache tiene muchas posibles configuraciones para correr PHP, la más común y fácil de configurar es el [prefork MPM] con mod_php5. A pesar de que no es la más eficiente con la memoria, es la más simple de poner a trabajar y usar. Esta es probablemente la mejor opción si no deseas profundizar demasiado en los aspectos de la Administración de Sistemas. Ten en cuenta que si usas mod_php5 DEBES usar el prefork MPM.

Alternatively, if you want to squeeze more performance and stability out of Apache then you can take advantage of the
same FPM system as nginx and run the [worker MPM] or [event MPM] with mod_fastcgi or mod_fcgid. This configuration will
be significantly more memory efficient and much faster but it is more work to set up.

* [Read more on Apache][apache]
* [Read more on Multi-Processing Modules][apache-MPM]
* [Read more on mod_fastcgi][mod_fastcgi]
* [Read more on mod_fcgid][mod_fcgid]
Alternativamente, si deseas exprimir de Apache más rendimiento y estabilidad puedes entonces tomar ventaja del mismo sistema FPM que nginx y correr el [worker MPM] o el [event MPM] con mod_fastcgi o mod_fcgid. Esta configuración será mucho más eficiente con la memoria y mucho más veloz, sin embargo su configuración implica más trabajo.

* [Lee más sobre Apache][apache]
* [Lee más sobre Módulos de Multiprocesamiento (Multi-Processing Modules: MPM)][apache-MPM]
* [Lee más sobre mod_fastcgi][mod_fastcgi]
* [Lee más sobre mod_fcgid][mod_fcgid]

[nginx]: http://nginx.org/
[phpfpm]: http://php.net/install.fpm
[phpfpm]: http://php.net/manual/es/install.fpm.php
[secure-nginx-phpfpm]: https://nealpoole.com/blog/2011/04/setting-up-php-fastcgi-and-nginx-dont-trust-the-tutorials-check-your-configuration/
[apache-modules]: http://httpd.apache.org/docs/2.4/mod/
[apache-modules]: http://httpd.apache.org/docs/2.4/es/mod/
[prefork MPM]: http://httpd.apache.org/docs/2.4/mod/prefork.html
[worker MPM]: http://httpd.apache.org/docs/2.4/mod/worker.html
[event MPM]: http://httpd.apache.org/docs/2.4/mod/event.html
[apache]: http://httpd.apache.org/
[apache-MPM]: http://httpd.apache.org/docs/2.4/mod/mpm_common.html
[mod_fastcgi]: http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html
[mod_fastcgi]: https://docs.oracle.com/cd/B31017_01/web.1013/q20204/mod_fastcgi.html
[mod_fcgid]: http://httpd.apache.org/mod_fcgid/
12 changes: 4 additions & 8 deletions _posts/12-04-01-Shared-Servers.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
---
title: Servidores Compartidos
isChild: true
anchor: shared_servers
anchor: servidores_compartidos
---

## Shared Servers {#shared_servers_title}
## Servidores Compartidos {#servidores_compartidos_title}

PHP has shared servers to thank for its popularity. It is hard to find a host without PHP installed, but be sure it's
the latest version. Shared servers allow you and other developers to deploy websites to a single machine. The upside to
this is that it has become a cheap commodity. The downside is that you never know what kind of a ruckus your
neighboring tenants are going to create; loading down the server or opening up security holes are the main concerns. If
your project's budget can afford to avoid shared servers you should.
PHP tiene que agradecerle a los servidores compartidos su enorme popularidad. Es difícil encontrar un hospedaje sin PHP instalado, pero debes asegurarte que sea la última versión al elegir uno. Los servidores compartidos, te permiten a ti y a otros desarrolladores desplegar sitios web en una sola máquina (compartiendo sus recursos). La ventaja de esto es que ha convertido al proceso en algo económico. La desventaja por otro lado es que no sabes que problemas van a causar tus vecinos en el servidor, ralentizándolo o incluso abriendo brechas de seguridad en el mismo, lo cual es una preocupación principal. Si el presupuesto de tu proyecto te lo permite deberías evitar el uso de un servidor compartido.

To make sure your shared servers are offering the latest versions of PHP, check out [PHP Versions](http://phpversions.info/shared-hosting/).
Para asegurarte que tu servidor compartido está ofreciéndote la última versión de PHP, puedes consultar [este sitio](http://phpversions.info/shared-hosting/).
86 changes: 32 additions & 54 deletions _posts/12-05-01-Building-your-Application.md
Original file line number Diff line number Diff line change
@@ -1,81 +1,59 @@
---
title: Construyendo tu Aplicación
isChild: true
anchor: building_and_deploying_your_application
anchor: construyendo_y_desplegando_tu_aplicacion
---

## Building and Deploying your Application {#building_and_deploying_your_application_title}
## Construyendo Y Desplegando Tu Aplicación {#construyendo_y_desplegando_tu_aplicacion_title}

If you find yourself doing manual database schema changes or running your tests manually before updating your files
(manually), think twice! With every additional manual task needed to deploy a new version of your app, the chances for
potentially fatal mistakes increase. Whether you're dealing with a simple update, a comprehensive build process or even
a continuous integration strategy, [build automation][buildautomation] is your friend.
Si te encuentras haciendo cambios al esquema de base de datos o corriendo pruebas (de forma manual) antes de modificar tus archivos (de forma manual), entonces piénsalo nuevamente. Con cada tarea manual adicional para desplegar tu aplicación las oportunidades para la aparición de errores fatales se multiplican. Bien sea que estés manejando una simple actualización, un completo proceso de implementación o incluso una estrategia continua de integración, en esos casos la [automatización del build][buildautomation] es tu mejor amiga.

Among the tasks you might want to automate are:
Entre las tareas que podrías querer automatizar podemos encontrar:
* Manejo de dependencias.
* Compilación y minificación de los recursos.
* Corrida de pruebas.
* Creación de la documentación.
* Empaquetado.
* Despliegue.

* Dependency management
* Compilation, minification of your assets
* Running tests
* Creation of documentation
* Packaging
* Deployment
### Herramientas de automatización del build

Las herramientas de automatización del build pueden ser descritas como una colección de scripts que manejan tareas comunes del despliegue de software. Las herramientas de automatización del build no son parte de tu software, ellas actúan sobre él desde fuera.

### Build Automation Tools
Hay muchas herramientas *open source* disponibles que pueden ayudarte con la automatización del build, algunas están escritas en PHP, otras en cambio no lo están, esto ultimo no debe limitarte al momento de usarlas si se ajustan mejor a alguna tarea específica. Aquí proponemos algunos ejemplos de esta clase de software:

Build tools can be described as a collection of scripts that handle common tasks of software deployment. The build tool
is not a part of your software, it acts on your software from 'outside'.
**[Phing]** representa la manera más fácil de comenzar a experimentar con el despliegue automático en el mundo de PHP. Con Phing puedes controlar tu empaquetado, despliegue o procesos de prueba desde un solo archivo XML. Phing (el cual está basado en [Apache Ant]) provee un rico set de tareas usualmente necesarias para instalar o actualizar una aplicación web, su funcionalidad puede ser extendida con tareas adicionales personalizadas escritas en PHP.

There are many open source tools available to help you with build automation, some are written in PHP others aren't.
This shouldn't hold you back from using them, if they're better suited for the specific job. Here are a few examples:
**[Capistrano]** es un Sistema para “programadores intermedios-avanzados” que permite ejecutar comandos de una forma estructurada y repetible en una o más maquinas remotas. Esta preconfigurado para el despliegue de aplicaciones en Ruby on Rails, sin embargo, hay personas que **despliegan sistemas en PHP satisfactoriamente** con él. El uso satisfactorio de Capistrano depende de un conocimiento funcional de Ruby y Rake.

[Phing] is the easiest way to get started with automated deployment in the PHP world. With Phing you can control your
packaging, deployment or testing process from within a simple XML build file. Phing (which is based on [Apache Ant])
provides a rich set of tasks usually needed to install or update a web app and can be extended with additional custom
tasks, written in PHP.
El artículo de Dave Gardner sobre [Despliegue de PHP con Capistrano][phpdeploy_capistrano] es un buen punto de partida para los desarrolladores PHP interesados en Capistrano.

[Capistrano] is a system for *intermediate-to-advanced programmers* to execute commands in a structured, repeatable way
on one or more remote machines. It is pre-configured for deploying Ruby on Rails applications, however people are **successfully deploying PHP systems** with it. Successful use of Capistrano depends on a working knowledge of Ruby and
Rake.
**[Chef]** es más que solo un framework de despliegue, es un poderoso framework de integración de sistemas basado en Ruby. No solo despliega tu aplicación, sino que también puede construir todo tu ambiente de servidor o cajas virtuales.

Dave Gardner's blog post [PHP Deployment with Capistrano][phpdeploy_capistrano] is a good starting point for PHP
developers interested in Capistrano.
**[Deployer]** es una herramienta de despliegue escrita en PHP, es simple y funcional. Ejecuta tareas de despliegue atómico paralelo y mantiene la consistencia entre servidores. Contiene recetas para tareas comunes en Symfony, Laravel, Zend Framework y Yii.

[Chef] is more than a deployment framework, it is a very powerful Ruby based system integration framework that doesn't
just deploy your app but can build your whole server environment or virtual boxes.
#### Recursos sobre Chef para desarrolladores PHP:

[Deployer] is a deployment tool written in PHP, it's simple and functional. Runs tasks in parallel, atomic deployment, keeps consistency between servers. Recipes of common tasks for Symfony, Laravel, Zend Framework and Yii.
* [Serie de artículos en tres partes acerca del despliegue de una aplicación LAMP con Chef, Vagrant y EC2][chef_vagrant_and_ec2]
* [Recetario de Chef que te enseñara a instalar y configurar PHP y el sistema de manejo de paquetes PEAR][Chef_cookbook]
* [Serie de video tutoriales sobre Chef][Chef_tutorial]

#### Chef resources for PHP developers:
#### Lecturas adicionales:

* [Three part blog series about deploying a LAMP application with Chef, Vagrant, and EC2][chef_vagrant_and_ec2]
* [Chef Cookbook which installs and configures PHP and the PEAR package management system][Chef_cookbook]
* [Chef video tutorial series][Chef_tutorial]
* [Automatiza tu proyecto con Apache Ant][apache_ant_tutorial]

#### Further reading:

* [Automate your project with Apache Ant][apache_ant_tutorial]

### Continuous Integration

> Continuous Integration is a software development practice where members of a team integrate their work frequently,
> usually each person integrates at least daily — leading to multiple integrations per day. Many teams find that this
> approach leads to significantly reduced integration problems and allows a team to develop cohesive software more
> rapidly.
### Integración Continua
>La integración continua en una práctica del desarrollo de software en la cual los miembros de un equipo integran su trabajo de manera frecuente, usualmente cada persona hace integraciones diarias, lo que lleva a múltiples integraciones por día. Muchos grupos encuentran que este acercamiento genera una cantidad reducida de problemas de integración y permite al grupo desarrollar software cohesivo de una manera más rápida.

*-- Martin Fowler*

There are different ways to implement continuous integration for PHP. [Travis CI] has done a great job of
making continuous integration a reality even for small projects. Travis CI is a hosted continuous integration service
for the open source community. It is integrated with GitHub and offers first class support for many languages including
PHP.

#### Further reading:
Existen muchas maneras diferentes de implementar la integración continua para PHP. [Travis CI] ha hecho un trabajo grandioso haciendo de la integración continua una realidad, incluso para proyectos pequeños. Travis CI es un servicio hospedado de integración continua para la comunidad open source, está integrado con GitHub y ofrece soporte de primera clase para muchos lenguajes, entre ellos PHP.

* [Continuous Integration with Jenkins][Jenkins]
* [Continuous Integration with PHPCI][PHPCI]
* [Continuous Integration with Teamcity][Teamcity]
#### Lecturas adicionales:

* [Integración continua con Jenkins][Jenkins]
* [Integración continua con PHPCI][PHPCI]
* [Integración continua con Teamcity][Teamcity]

[buildautomation]: http://en.wikipedia.org/wiki/Build_automation
[Phing]: http://www.phing.info/
Expand All @@ -91,4 +69,4 @@ PHP.
[Jenkins]: http://jenkins-ci.org/
[PHPCI]: http://www.phptesting.org/
[Teamcity]: http://www.jetbrains.com/teamcity/
[Deployer]: https://github.com/deployphp/deployer
[Deployer]: https://github.com/deployphp/deployer
4 changes: 2 additions & 2 deletions _posts/16-01-01-Resources.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Recursos
anchor: resources
anchor: recursos
---

# Resources {#resources_title}
# Recursos {#recursos_title}
8 changes: 4 additions & 4 deletions _posts/16-02-01-From-the-Source.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: Documentación Principal
isChild: true
anchor: from_the_source
anchor: documentacion_principal
---

## From the Source {#from_the_source_title}
## Documentación Principal {#documentacion_principal_title}

* [PHP Website](http://php.net/)
* [PHP Documentation](http://php.net/docs.php)
* [Sitio Oficial de PHP](http://php.net/)
* [Documentación Oficial de PHP](http://php.net/manual/es/)
Loading