Trying to run foreman on OpenShift, having cartridge issues - openshift

Does anyone know why running
rhc app create test ruby-2.0 mysql-5.5 http://cartreflect-claytondev.rhcloud.com/reflect?github=cantino/openshift-foreman-cartridge
works on OpenShift, but running
rhc app create test ruby-2.0 mysql-5.5 http://cartreflect-claytondev.rhcloud.com/reflect?github=cantino/openshift-foreman-cartridge -s
gives the following error:
Creating application 'test' ... cantino-foreman-0.63.0 cannot be embedded in scalable app 'test'.
I want to be able to run this as a scalable app, so that I can run one gear with MySQL and the other with foreman and passenger (ruby-2.0).
Any help appreciated! Is my custom cartridge misconfigured?

It turned out that #ncdc on GitHub was able to solve my issue.
https://github.com/ncdc/openshift-foreman-cartridge/issues/1
We needed to add plugin as a category.

Related

Run docker container on OpenShift from Nexus unsecure private registry

I'm trying to run a containerized app which is stored in Nexus docker hosted on url 12.23.34.55:8086
I'm trying to run it on my Openshift Cluster, but I'm getting error. Commands I'm using to run
oc create secret docker-registry mysecret --docker-server=http://12.23.34.55/ --docker-username=aditya --docker-password=aditya --docker-email=aditya#example.org
oc secrets link default mysecret --for=pull
My nexus is running on http://12.23.34.55:8081
Now I'm using command to launch in OpenShift using below command.
oc new-app 12.23.34.55:8085/mytestapp:11 --insecure-registry=true
as per $ oc new-app myregistry:5000/example/myimage
https://docs.openshift.com/container-platform/4.1/applications/application_life_cycle_management/creating-new-applications.html
But it does not work, it asks for password and not able to deploy from console too, can anyone help me with exact commmand.
Creating the secret is not enough for OpenShift to be able to pull from the registry. You still need to link that secret as well.
Take a look at the official documentation here:
https://docs.openshift.com/container-platform/4.1/openshift_images/managing_images/using-image-pull-secrets.html#images-allow-pods-to-reference-images-from-secure-registries_using-image-pull-secrets
Okay! I found an answer, so using private registry first we should import image using
oc import name url/imagename:tag
then we can create new app with the same
oc new app name

How to deploy Go server on Heroku with a MySQL database?

I am a complete beginner at hosting applications right now but am trying to get a hold of it.
- I have the MySQL database running locally on my PC. How to exactly should I host it somewhere online.
- When I tried to deploy my Go server on Heroku, I got the following error and couldn't find a solution for it anywhere online.
-----> App not compatible with buildpack: https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/go.tgz
More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
! Push failed
Any help in this regard would be appreciated!
To fix this problem you need to use some of vendoring tools - e.g. Godep, dep etc.
Heroku can't deploy golang app without 'vendor' folder
just run this command:
go mod init [app-name]
this will create a go mod file and a go sum for you
then run:
go get
to install those packages you called in your go app.
developers usually use go mod init github.com/name/repo
but go mod init [app-name]
will do the job!

Pod installation failed ? No module found

I'm running into problems with the installation of Alamofire and SwiftyJSON. I follwed the tutorial https://www.youtube.com/watch?v=Rqr3w8scm2E and https://www.youtube.com/watch?v=Brei27hdnF8&feature=iv&src_vid=Rqr3w8scm2E&annotation_id=annotation_700071403 which includes a description of the installation process.
I created the Pod file
and my pod install seemed to work as well
Now I'm not quite sure if I missed something. I thought maybe the two tests in the in the pod file need the two pods as well, but even after i tried that it still didn't work.
Can anyone tell me what i'm missing?
Thank you
Did you forgot to open the <your project name>.xcworkspace file with Xcode in your project root folder instead of the regular <your project name>.xcodeproj?
CocoaPods creates <your project name>.xcodeproj for you once you install the pods and requires you to use it from that moment on. You can type in the terminal open <your project name>.xcodeproj and Xcode will open it for you.

${Env.CATALINA_HOME} does not exit in openshift

I have a question which is related to openshift online and I am using a Tomcat7 cartridge,Mysql5.5 and Ant Cartridge 0.1.And I am trying to deploy OpenGTS project to openshift but when I open a SSH session and I try to run this command "ant all" it shows that "BUILD FAILED
/var/lib/openshift/568e35812d52717d1f000122/app-root/runtime/repo/build.xml:66:
/var/lib/openshift/568e35812d52717d1f000122/app-root/runtime/repo/${Env.CATALINA_HOME} does not exit"
I am worry about that,I deleted the tomcat application and created again but it is showing same error.please help me.thanks.
Make sure <property environment="env"/> is present at the top of the script.
Also CATALINA_HOME environment variable is defined in the system.
Use ${env.CATALINA_HOME} instead of ${Env.CATALINA_HOME}.

Unable to delete openshift application

I installed a PHP application on one of my gears in Openshift. It is a git clone from https://github.com/ThinkUpLLC/ThinkUp/tree/v2.0-beta.10. Something went wrong with the application and hence I would like to delete this application now. However I get an error as "Unable to perform action on app object. Another operation is already running." while trying to delete the application using rhc command tool. I have already tried using rhc app-force-stop, however it did not make any difference.
Sounds a bit like this bug - https://bugzilla.redhat.com/show_bug.cgi?id=997008. There seems to be no solution/workaround though.
Have you tried deleting the application via the web console?
You can try this command, this will kill all the background processes associated with the app.
pbrun /usr/sbin/oo-admin-ctl-app -l svc-<domain-id> -c destroy -a <app-name> -n <domain-id>