Giter VIP home page Giter VIP logo

bluemix-php-sample's Introduction

Ejecutar playbook de Ansible desde Pipelines de IBM Cloud

En este tutorial usaremos un Playbook Ansible ejecutado desde el servicio IBM Cloud Continuous Delivery para implementar una aplicación PHP de muestra. Crearemos automáticamente un delivery pipeline a partir de una tool chain. Luego usaremos Ansible para desplegarla en Cloud Foundry. Ansible Playbooks se pueden usar para entregar aplicaciones simples, como en este hands-on, así como una infraestructura de aplicaciones compleja.

Requisitos

  • Cuenta en github
  • Cuenta en IBM Cloud
  • Conocimientos básicos de php
  • Conocimientos básicos de shell scripting

Setup

Para hacer la instalación del entorno de trabajo del taller, debes realizar los siguientes pasos en tu estación de trabajo:

  1. Instalar PHP. Puedes instalar cualquier versión de PHP 5.X.X. o superior
$ php --version
PHP 5.4.16 (cli) (built: Oct 30 2018 19:30:51)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
  1. Instalar la CLI de Cloud Foundry. La versión puede ser 6.X.X o superior
cf --version
cf version 6.46.0+29d6257f1.2019-07-09
  1. Instalar cliente de git. Puede usarse la versión 1.8.X.X o superior.
$ git --version
git version 1.8.3.1
  1. Crear un directorio de trabajo en la estación de trabajo. P.e. en Linux /home/mcuevas/lab
  2. Clonar este repositorio en el directorio creado en el paso 4
$ git clone https://github.com/surasiterix/bluemix-php-sample.git
Cloning into 'bluemix-php-sample'...
remote: Enumerating objects: 74, done.
remote: Total 74 (delta 0), reused 0 (delta 0), pack-reused 74
Unpacking objects: 100% (74/74), done.
  1. Ahora levantaremos nuestra aplicación web de prueba usando el web server de desarrollo que viene en php. Entremos en el directorio bluemix-php-sample y ejecutemos el siguiente comando
$ php -S localhost:8000
PHP 5.4.16 Development Server started at Wed Aug  7 16:32:53 2019
Listening on http://localhost:8000
Document root is /home/mcuevas/lab/bluemix-php-sample
Press Ctrl-C to quit.
  1. Desde un browser, accedemos a nuestra aplicación web en http://localhost:8000
  2. Creamos nuestro toolchain en IBM Cloud para automatizar el despliegue de nuestra aplicación Web en los servicios de Cloud Foundry.

Crear Toolchain

Agradecimientos

Este laboratorio fue adaptado del original (https://github.com/IBMCloudDevOps/bluemix-php-sample) para el IBM Code Day 2019 en Montevideo (https://www.ibm.com/events/uy/es/ibm-code-mvd/montevideo/)

bluemix-php-sample's People

Contributors

abgutierrez avatar adamkingit avatar jcantosz avatar surasiterix avatar

Stargazers

 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.