Deploy to OpenShift Zend 6.1 Server

General discussion on Zend Studio
mich3548
Posts: 17
Joined: Wed Aug 14, 2013 4:21 am

Deploy to OpenShift Zend 6.1 Server

Post by mich3548 » Tue Feb 04, 2014 3:05 am

Hi,

OpenShift recently added support for Zend Server 6.1. I created an application in OpenShift and am trying to deploy to it via Zend Studio 10.5. When I try to add the target from Zend Studio it says "Could not detect any valid targets. You can create new OpenShift target by using 'Create New Target' button below." Then if I try to create a new target from Zend Studio it doesn't give an option to create a Zend Server 6.1 target. Does Zend Studio not support deploying to Zend Server 6.1 targets on OpenShift? If not, when will this be available?

Thanks,

Michael

User avatar
zvika
Zend Global Support
Posts: 997
Joined: Sun Dec 14, 2008 9:48 am
Contact:

Re: Deploy to OpenShift Zend 6.1 Server

Post by zvika » Tue Feb 04, 2014 9:56 am

Hi Michael

I'm not fully familiar with OpenShift although I was testing it when we first introduced it,
so I'm going to ask first and check later.
Can you get the Zend Server credentials off Openshift instance and create a new target in Zend Studio with those?

If not, can you specify if the problem is getting the credentials or connecting to the target, or different?
Zvika Dror
Zend Support Team

rosh2734
Posts: 1
Joined: Thu Feb 27, 2014 9:43 am

Re: Deploy to OpenShift Zend 6.1 Server

Post by rosh2734 » Thu Feb 27, 2014 10:13 am

Pls help me. Thank you in advance.

I'm trying to use Zend Studio 10.6.0(Trial) and add (PHP 5.4 with Zend Server 6.1) on OpenShift.
Tried two options below.
1. Import an already created OpenShift application/target (PHP 5.4 with Zend Server 6.1) ------ got the response as no application available in OpenShift(But App was there)
2. Create New target after removing all apps in Open shift from web. ------ only zend-5.6 available in the drop down list, if select zend-5.6 request failed as its is not available in Openshift at the moment, if change 5.6 to 6.1 manually again the request is failed.

Pls help.

User avatar
zvika
Zend Global Support
Posts: 997
Joined: Sun Dec 14, 2008 9:48 am
Contact:

Re: Deploy to OpenShift Zend 6.1 Server

Post by zvika » Sun Mar 02, 2014 12:37 pm

Hi

Did you try to deploy an app to the target, using Zend Studio deployment feature (right click -> configure -> add deployment support)?
Did you try to deploy a ZPK in the Zend Server UI on OpenShift app management UI?

This is the main ref point in openshift website, it has pointers to zend.com online reference:
https://www.openshift.com/developers/zend

I removed the existing ZS on my openshift account, created new "app" with PHP 5.4 ZS 6.1 cartridge, and go to the Zend Server UI page.
This is NOT an app in terms of Zend, it is a cartridge holding platform and code under that (which you are given a GIT repo for).
You Zend Server UI will show you installed applications (in forms of ZPK - Zend Packages) under the Applications navigation tab.

When I check the Zend Server UI, I have a bootstrap to initially load settings (DEV / Production) and passwords for Admin and Developer.

Then I add the target to Zend Studio, after setting up SSH keypair using 'rhc setup' gem they provide for CLI tool.
[UPDATE] - indeed, I have a problem detecting existing target 6.1 with Zend Studio add new Openshift target. Use the method below until our next cartridge verson [/UPDATE]

You can also add a regular Zend Server and use the address in openshift (port 80 and not 10081/10082)
Zend Server URL: http://appname-username.rhcloud.com:80
Web API Name: admin
Web API Secret: (From UI Administration -> WebAPI)

From this point, I can use the Studio to prepare and deploy an application to the OpenShift target, or export a ZPK (or use a ZPK from known source, like zend.com Server Downloads page or other) and deploy it directly within the Zend Server UI.
Zvika Dror
Zend Support Team

mich3548
Posts: 17
Joined: Wed Aug 14, 2013 4:21 am

Re: Deploy to OpenShift Zend 6.1 Server

Post by mich3548 » Wed Apr 23, 2014 3:48 am

Thanks, that work around helped me. I was having the same issue as rosh2734. The odd thing is there is a tutorial on how to setup a Zend Server 6.1 cartridge on OpenShift and they do it through Zend Studio. There guide is located here: https://www.openshift.com/blogs/zend-se ... ud-hosting. Oh well, at least adding the target as a generic Zend Server works. Thanks for the help.

mich3548
Posts: 17
Joined: Wed Aug 14, 2013 4:21 am

Re: Deploy to OpenShift Zend 6.1 Server

Post by mich3548 » Wed Apr 23, 2014 4:04 am

Well that mostly worked for me. The first time it created the package, sent the package, and then failed because I didn't have Zend Framework 2.2.5 installed. So I updated the Zend Framework version on the server, and now it sends the package, stages it, activates it, and then says "Cannot establish remote connection with "app-domain-rhcloud.com". I think it's trying to use SSH or something. It looks like it's actually deploying successfully though.

mich3548
Posts: 17
Joined: Wed Aug 14, 2013 4:21 am

Re: Deploy to OpenShift Zend 6.1 Server

Post by mich3548 » Wed Apr 23, 2014 4:33 am

The application is deploying now, but now I have an error when trying to run the application.
Fatal error: Uncaught exception 'Zend\ModuleManager\Exception\RuntimeException' with message 'Module (ZendServerGateway) could not be initialized.' in /var/lib/openshift/xxx/zend/php-5.4/var/libraries/Zend_Framework_2/2.2.5/library/Zend/ModuleManager/ModuleManager.php:175 Stack trace: #0 /var/lib/openshift/xxx/zend/php-5.4/var/libraries/Zend_Framework_2/2.2.5/library/Zend/ModuleManager/ModuleManager.php(149): Zend\ModuleManager\ModuleManager->loadModuleByName(Object(Zend\ModuleManager\ModuleEvent)) #1 /var/lib/openshift/xxx/zend/php-5.4/var/libraries/Zend_Framework_2/2.2.5/library/Zend/ModuleManager/ModuleManager.php(90): Zend\ModuleManager\ModuleManager->loadModule('ZendServerGatew...') #2 [internal function]: Zend\ModuleManager\ModuleManager->onLoadModules(Object(Zend\ModuleManager\ModuleEvent)) #3 /var/lib/openshift/xxx/zend/php-5.4/var/apps/http/__default__/0/MarginGuardServer/1.0.0/vendor/zendframework/zend-eventmanager/Zend/EventMana in /var/lib/openshift/xxx/zend/php-5.4/var/libraries/Zend_Framework_2/2.2.5/library/Zend/ModuleManager/ModuleManager.php on line 175
I'm wondering if this is related to the error I'm getting when I deploy. Maybe it didn't deploy all the way? This exact same application was working on Amazon.

bvirzi
Posts: 34
Joined: Tue Nov 16, 2010 3:51 pm

Re: Deploy to OpenShift Zend 6.1 Server

Post by bvirzi » Thu May 08, 2014 4:40 pm

Hi,

I have done this work around but when I deploy an application I receive this error:

Error during deploying application to '2'
WebAPI action is not supported by this version

I have Zend studio Build ID: 10.6.1.v20140121-20140329-2132-194

Can you help me?

Benny

User avatar
natalia_b_zend
Posts: 366
Joined: Wed Jan 25, 2012 5:51 pm

Re: Deploy to OpenShift Zend 6.1 Server

Post by natalia_b_zend » Tue May 27, 2014 4:13 pm

Full support for Zend Server 6.1 cartridge on OpenShift has been implement in latest 10.6.2 release: http://forums.zend.com/viewtopic.php?f=59&t=118603.
Natalia Bartol
Zend Studio Team

bvirzi
Posts: 34
Joined: Tue Nov 16, 2010 3:51 pm

Re: Deploy to OpenShift Zend 6.1 Server

Post by bvirzi » Tue Jun 03, 2014 2:35 pm

Great!!

It's work fine.

Another question: Can I set "scaling application" option when I create a new target?

Thanks
Benny

Post Reply