Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Rob Allen:
Using Composer with Serverless & OpenWhisk
Jun 12, 2018 @ 17:36:46

Rob Allen has posted a quick tutorial to his site showing how to user Composer in a PHP project on OpenWhisk. OpenWhisk is Apache's serverless cloud platform that's easy to scale and relatively easy to use. This is the latest in a series of posts from Rob covering its use in PHP projects.

Every PHP project I write has dependencies on components from Packagist and my Serverless OpenWhisk PHP projects are no different. It turns out that adding Composer dependencies is trivial.

He uses a simple action that coverts a number to the matching string, showing the yaml configuration changes and code to include to define the action. The action makes use of the NFNumberToWord package which is then added via Composer. He deploys the action and calls it directly, showing the result to be the correct string for the number "123". He also mentions an archive file (zip) that the serverless functionality creates containing all of the files related to the project. He shows the configuration option you can use to split these by action, making it easier to create a more modular system.

tagged: composer service openwhisk tutorial serverless deploy apache

Link: https://akrabat.com/using-composer-with-serverless-openwhisk/

Rob Allen:
Using Serverless Framework with OpenWhisk PHP
May 31, 2018 @ 15:43:01

In a new post to his site Rob Allen provides the steps you'll need to follow to use the Serverless Framework toolkit with OpenWisk to host PHP-based applications.

Serverless Framework is a toolkit to help you mange and deploy a serverless application. (Personally, I'm not a fan of the name as the word "Serverless" already has a meaning in the same space!) It's a useful tool and supports all the major providers, though AWS Lambda seems to be first-among-equals. The OpenWhisk plugin for Serverless is maintained by the rather excellent James Thomas, so if you have any questions, ping him!

As I build more complex PHP based OpenWhisk applications, I thought I'd explore how Serverless makes this easier.

He starts with helping you get the Serverless framework and the related OpenWisk plugin installed. He then helps you create a project, modify the configuration for a simple "Hello world" kind of script and create the PHP script to act as an endpoint. With the setup complete, he includes the steps to deploy and run the project, invoking the action and enabling it (as a Web Action) to make it reachable via the web.

tagged: serverless framework tutorial openwisk helloworld setup configure deploy

Link: https://akrabat.com/using-serverless-framework-with-openwhisk-php/

Learnk8s.io Blog:
How to deploy Laravel to Kubernetes
Apr 30, 2018 @ 18:10:24

The Learnk8x.io blog has a tutorial they've posted showing you how to deploy a Laravel application to Kubernetes. Kubernetes is a system created to make it simpler to deploy containerized applications in a clustered context.

Vagrant is very good with setting up a local environment similar to a remote server. However, in production, you will most likely require more than just one web host and one database. You’ll probably have separate services for several requirements. You also need to have mechanisms in place to ensure that the application is always online and that the servers can efficiently balance the load.

In this article, I’ll explain how to deal with the simple requirement of running a Laravel application as a local Kubernetes set up.

The article then gets into the "whats" and "whys" of using Kubernetes and an introduction to the Minikube local Kubernetes environment. It runs through some of the prerequisites to getting the deployment set up and provides the Docker configuration to create and link the containers together. With that defined it provides the commands to get the environment up and running and the application deployed. The final part of the tutorial covers the scaling of the system and allowing ingress to the application through a certain URL.

tagged: kubernetes tutorial deploy laravel application docker container

Link: https://learnk8s.io/blog/deploying-laravel-to-kubernetes

Auth0 Blog:
Symfony Tutorial: Building a Blog (Part 3)
Mar 27, 2018 @ 16:20:06

The Auth0 blog has posted the third part of their "Building a Blog" series of tutorials showing the use of their authentication technologies coupled with a Symfony framework backend. In this latest article author Greg Holmes shows how to deploy the application created in parts one and two to Heroku.

Symfony is a PHP framework as well as a set of reusable PHP components and libraries. It uses the Model-View-Controller design pattern and can be scaled to be used in any requirement. It aims to speed up the creation and maintenance of web applications, replacing repetitive code. In this part of the series, you will learn how to deploy the blog engine that you have created in the previous parts on Heroku. The final code can be found at this repository.

He starts with a bit of catching up, briefly covering the contents of the first two articles before getting into the main content of this third. He covers some of the basics of Heroku and Travis-CI before getting into the actual deployment flow. He then helps you set up a GitHub account (used as a source for the deployment), set up a local MySQL database for testing and the installation of a few required dependencies. Next is the installation of the Heroku and Travis-CI command line tools, the configuration for each and some basic setup steps for each service.

Finally, he gets back to the Symfony application, setting up a few additional options in the Composer configuration to create a few commands. These commands are then executed as a part of the deployment process. There's also changes to the Symfony configuration files to reference the environment rather than a local path in several locations. The post ends with the setup instructions on the Auth0 side to allow handling to work from the newly deployed Heroku instance.

tagged: auth0 blog symfony tutorial series part3 deploy heroku

Link: https://auth0.com/blog/symfony-tutorial-building-a-blog-part-3/

Three Devs & A Maybe:
Build, Provision and Deploy in the Cloud with Thijs Feryn
Feb 16, 2018 @ 17:31:13

The Three Devs and a Maybe podcast, with hosts Michael Budd, Fraser Hart, Lewis Cains and Edd Mann, has posted their latest episode with special guest Thijs Feryn talking about the build/provision/deploy pipeline "in the cloud".

In this weeks episode we are joined by Thijs Feryn to discuss his upcoming PHP UK conference talk. We start of the show highlighting what drew him to a Tech. evangelist role, bridging the gap between code/infrastructure and the ideas behind ‘Infrastructure as Code’. From here we move on to discuss system and infrastructure provisioning automation tools such Ansible and Terraform. This leads on to adding Packer into the mix, moving towards immutable infrastructure, testing these automation tools and how history has a way of repeating itself. Finally, we touch upon the philosophy behind DevOps, focusing on empathy and its core values CAMS.

You can listen to this latest episode either by using the in-page audio player or by downloading the mp3 directly. If you enjoy the show, be sure to subscribe to their feed and follow them on Twitter for updates when new shows are released.

tagged: threedevsandamaybe podcast thijsferyn build provision deploy cloud server

Link: http://threedevsandamaybe.com/build-provision-and-deploy-in-the-cloud-with-thijs-feryn/

Asmir Mustafic:
How do I deploy my Symfony API - Part 5 - Conclusion
Oct 31, 2017 @ 17:47:25

Asmir Mustafic has finished out his series showing his method for the deployment of Symfony applications with part five sharing some additional improvements that could be made to the system created in the four previous parts.

This is the fifth post from a series of posts that described the whole deploy process from development to production of a Symfony API. This series of blog posts had the aim to show a possible approach to build a continuous integration and continuous delivery pipeline.

The continuous integration and continuous delivery process reduces bugs and makes the development simper. [...] As always happen in software development, solutions are not perfect. There is always room for improvement. Here are few examples of what could have be done better. Obviously can be done better and this are not all the possible improvements that can be done on the system.

In the remainder of the article he includes changes that could be made to the:

  • migration execution, allowing for it to be done between deployments
  • performing health checks of the API
  • Docker container placement
  • putting PHP and Nginx into the same container
  • "node draining" (removing a node from a cluster)

He wraps up the post with a mention of a tool, Kubernetes, that can help to make the configuration and management of your containers easier.

tagged: deploy symfony api tutorial series part5 conclusion

Link: https://www.goetas.com/blog/how-do-i-deploy-my-symfony-api-part-5-conclusion/

Dev.to:
Deploy Laravel Application On Cloud Easily With Cloudways
Sep 21, 2017 @ 16:38:55

The Dev.to blog has a tutorial posted from author Saquib Rizwan showing an easy way to deploy a Laravel application to Cloudways via their platform and the PHP stack they offer.

Even if you know all about it, setting up and configuring a dedicated server is a time consuming multi-step process. But thanks to managed hosting solutions available in the market today, setting up servers is no longer a major action item on project task lists.

Deploying Laravel application on cloud infrastructure is never been this fast and easy before. [...] Cloudways provides an incredible platform for Laravel Community. It makes it easy to deploy and host laravel applications so that developers can focus on the development process rather than worrying about deployment and server level issues.

The post lists out some of the benefits of the Cloudways platform before starting in on the technology behind their "ThunderStack" PHP environment. With the basics covered, Saquib then moves on to deploying the server via Cloudways, linking it to your application on GitHub and providing the proper key information for them to connect. With all of this in place, the "Start Deployment" button is ready for use and the application and server can be started quickly.

tagged: deploy laravel application cloud cloudways tutorial configuration

Link: https://dev.to/rizwan_saquib/deploy-laravel-application-on-cloud-easily-with-cloudways

Stephan Hochdöfer:
Dockerizing GitLab Review Apps
Jun 07, 2017 @ 15:28:15

On the BitExpert blog Stephan Hochdöfer has written up a post showing how to "Dockerize" GitLab review apps to create a consistent platform for these self-contained environments.

Last year GitLab introduced the Review Apps feature. Review Apps are app environments that are created dynamically every time you push a new branch up to GitLab. As a bonus point the app environments are automatically deleted when the branch is deleted. Since we moved to using docker for quite a few of our projects I was keen on figuring out how to combine Docker and the GitLab Review Apps functionality as the documentation only mentions NGINX as a way to run Review Apps. As it turns out, it is rather simple to deploy docker containers as a Review App.

He describes the environment he needs and which tools he'll be using to perform the build of the environments. He then defines the sample GitLab configuration file including the "build" stage. He briefly explains the steps this follows then shows the configuration for the "deploy" step, grabbing the latest image from his Docker repo and running it. He ends the post with an "undeploy" stage that removes the Docker build automatically when the environment is no longer needed.

tagged: gitlab review application apps tutorial docker deploy undeploy

Link: https://blog.bitexpert.de/blog/dockerizing-gitlab-review-apps/

Phillip Shipley:
How to automatically deploy static single-page-apps to Amazon S3 and Cloudfront or
Jun 02, 2017 @ 15:39:26

Phillip Shipley has a post to his site for the AWS and Cloudflare users out there (or those that want to use these together) about an easy way to automatically deploy static sites.

Managing web servers can be a lot of work. Especially when it comes to configuring and maintaining SSL certs, server and software updates, etc. Let’s Encrypt has made the SSL part a lot easier, but it is still work and to me feels like overkill for something as simple as a static single-page-application. Especially when there are dead simple solutions like Amazon S3 that can be used to host and scale a static website without any server configuration or maintenance. Adding CloudFront with a free SSL certificate from Amazon’s Certificate Manager service make SSL painless too.

[...] In this article I’ll cover how to use Codeship’s continuous integration and deployment service to build/test your app, deploy it to S3, and then clear cached versions of it from CloudFront and Cloudflare.

He then shows how to use the Codeship service to do the actual deployment, broken down into a few steps:

  • Step 1: Setting up project in Codeship
  • Step 2: Configure Tests
  • Step 3: Configure Environment Variables
  • Step 4: Configure Deployment

Each step includes both screenshots and configuration examples you'll need to get the workflow set up and running for your site.

tagged: deploy tutorial singlepage amazon s3 cloudfront cloudflare codeship process

Link: http://www.phillipshipley.com/2017/05/how-to-automatically-deploy-single-page-apps-to-amazon-s3-and-cloudfront-or-cloudflare-using-codeship/

SitePoint PHP Blog:
The Ultimate Guide to Deploying PHP Apps in the Cloud
May 12, 2017 @ 17:18:59

On the SitePoint PHP blog author Prosper Otemuyiwa shares what they call the ultimate guide to deploying PHP apps in the cloud with examples for Heroku, Google Cloud, IBM BlueMix, Microsoft Azure, Amazon Web Services and Laravel Forge.

There is a popular mantra amongst developers that goes like this write, test and deploy. In this tutorial, I’ll show you how to deploy your PHP apps to different cloud server platforms such as Google Cloud, Microsoft Azure, Heroku, IBM Bluemix, and others.

Cloud servers are basically virtual servers that run within a cloud computing environment. There are various benefits to hosting and deploying your applications in the cloud. [...] In fact, many companies have moved their infrastructure to the cloud in order to reduce cost and complexity. It’s a great option for small, mid-sized, and enterprise scale businesses. If you write a lot of tutorials and do POCs (Proof-of-concepts) like me, it’s also a great choice for you!

He starts off by covering the technologies that will be involved in each deploy: Linux, Apache, MySQL and of course PHP. Then, for each of the platforms previously mentioned, he goes through the setup and configuration of the same functionality. Most include screenshots of the UI in the service setting up the account and application. He also links to two tools that can make it easier to deploy your actual application to these newly configured cloud instances: Envoyer and Deployer.

tagged: guide deploy application cloud google bluemix azure aws forge

Link: https://www.sitepoint.com/ultimate-guide-deploying-php-apps-cloud/


Trending Topics: