如何在openshift v3.x上创建配置和解聚PHP应用程序 [英] how to create configure and depoly Php app on openshift v3.x

查看:97
本文介绍了如何在openshift v3.x上创建配置和解聚PHP应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们作为开发人员相信Openshift v2是开发和部署应用程序的绝佳平台,现在v2的生命即将终结,而v3.x即将发挥作用. 作为v3架构的新成员,我想说这像v2一样容易上手,我首先要问一些问题:

We as developers believe that Openshift v2 was a great platform for developing and deploying apps, now the Life of v2 is going to be end and the v3.x is arrived to play its role. As a new to v3 architecture, I would say this is bit difficult to get started as easy as v2 was, I have some questions to ask in first place :

  • 在v2中,我们可以创建一个应用程序,并且提供了一个本地克隆存储库的链接,我们如何在v3上创建没有Github存储库的PHP应用程序并将其克隆到本地存储库,以便源可以是私有的?
  • 在v2上添加数据库要容易得多,但是在v3上,这对像我这样的开发人员来说就像一场噩梦,我们如何才能在v3上将MySQL DB添加到我们的PHP应用程序中?
  • 在第2版中,我们对源代码进行了更改提交推送,该应用简而言之,我们如何提交新更改在v3中?
  • In v2 we can create an application and there comes a link to clone the repo locally, how can we create a PHP application on v3 without Github repo and clone that to local repo so that source may be private?
  • Adding databases on v2 were much easier, but on v3 it is like a nightmare for developers like me, How can we add MySQL DB to our PHP application on v3?
  • In v2 we make a change to source code, commit and push the app was live in short, How can we commit new changes in v3?

这些是必须回答的基本问题,任何资源都可以挽救生命.

these are the basic questions which must be answered, any resource would be a life saving.

推荐答案

如果要保持与OpenShift v2中相同的工作流程(提交/推送/实时),请在

If you want to keep the same workflow you had in OpenShift v2 (commit/push/live), sign up for a free account on GitLab.com or Bitbucket.com which both include free private repos (or bite the bullet and pay for an account on GitHub.com).

然后,查看Graham的有关在OpenShift v3中使用私有git仓库的最佳实践的文章,该文章链接到有关该主题的一些指南:

Then, check out Graham's post on best practices for using private git repos with OpenShift v3, which links to several guides on the subject: https://blog.openshift.com/private-git-repositories-part-1-best-practices/

对于数据库,您可以按照Graham所述的事实添加数据库(将数据库添加到项目中,告诉PHP应用程序要查找哪些变量,然后为PHP应用程序的部署配置设置这些环境变量),或者您可以编写一个可重复使用的模板,以将您的应用程序部署到任何包含PHP应用程序和数据库及其配置的OpenShift集群中(请参阅

As for the DB, you can add the database after the fact as Graham described (add a database to your project, tell your PHP application which variables to look for, then set those environment variables for your PHP app's deployment config), or you can write a re-usable template to deploy your application to any OpenShift cluster that includes the PHP app and database along with their configuration (see CakePHP template examples). I prefer creating a template for my apps with v3, but maybe I'm crazy :)

这篇关于如何在openshift v3.x上创建配置和解聚PHP应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆