Is it possible to deploy meteor 1.1 on openshift ?
I tried the options described in the links below, but failed on both
http://www.tutas-labs.com/deploying-meteor-applications-to-openshift-paas/
Is it possible to deploy meteor 1.1 on openshift ?
I tried the options described in the links below, but failed on both
http://www.tutas-labs.com/deploying-meteor-applications-to-openshift-paas/
Created a new repo based on a few others for easier deployment to openshift.
If anyone else also looking to deploy please give it a shot and share your experience.
Not sure if Openshiftās auto-scaling can be used with meteor, would appreciate any experience or inputs in this regard.
Cheers
Sach!n
I was actually able to deploy a Meteor test app following that Tutas tutorial. I was also able to deploy using your quickstart as well. I like your method better than the Tutas one.
The only thing I havenāt been able to get working is setting the METEOR_SETTINGS env variable. I set it using the rhc env-set
command, but I still get an error regarding the Slack API when I look at my app in a browser. Is there a better way to using different Meteor settings?
Hi I am not able to deploy using sachinās way.
āgit pull -s recursive -X theirs upstream masterā
Error:
fatal: unable to connect to github.com:
github.com[0: 192.30.252.121]: errno= No error
So I took the code directly from repo and deployed. Nodejs is in my app now successfully but I am not able to deploy my meteor app.
I did the build got the tar and added in mylocalnodeapp folder but I am not able to see my meteor app running and I donāt see any errors. Please let me know if i am doing anything wrong and I am not sure about the updating env variables in meteorshim.js . I am using local mongodb within app. Isnāt it similar to deploying to meteor servers earlier without any of these configs?
Please help. Thanks
I have used this repo to deploy a Meteor 1.3 app to openshift successfully, try it out, maybe it can help you
also, I have to mention that instead of
git remote add meteor-openshift -m master git@github.com:jeeeyul/meteor-openshift.git
i used
git remote add meteor-openshift -m master https://github.com/jeeeyul/meteor-openshift.git
Also just in case you are trying to use a private domain, this is not possible if you use websockets, since openshift doesnāt use your private ssl certificate for websockets, so you can only use the rhcloud domain link (and you have to change the Default DDP port to 8443)
Hi Toni,
Thanks for sharing this . I deployed my app partially i guess. I canāt see it running properly I think it is because of mongodb issue. Can u please let me know how to configure mongo? I tried to connect to mongo from putty that didnt work too but i see it running on my app.
TIA.
If you have installed the mongodb cartridge like the instructions, before deploying change this line in meteorshim
process.env.MONGO_URL = process.env.MONGODB_URL || āPLEASE_PROVIDE_A_MONGO_URLā;
with the proper address of a database connection uri. By default the process.env.MONGODB_URL
has no database or users so you should create one to connect.
In order to create a new database, do
rhc port-forward -a yourappName -n yourNamespace(not needed if only one namespace)
you will see something like
Service Local OpenShift
mongod 127.0.0.1:27017 => xxx.yyy.zzz.www:ppp
Then you can connect to the remote database in robomongo or any other mongodb management gui tool (choose your favourite from here )with the ip 127.0.0.1 and the port 27017 in this example.
process.env.MONGO_URL = "mongodb://username:password@xxx.yyy.zzz.www:ppp/databasename"
in meteorshim.jsAs an alternative way If you canāt manage, go and create a free database at mLab repeat the same steps of creating a database and a user/password (itās easier since you can do this directly from their website) and then look for this text in your webpage( after clicking on the database)
To connect using a driver via the standard MongoDB URI (whatās this?):
āmongodb://dbuser:dbpassword@xxxxxx.mlab.com:ppppppp/databasenameā
copy that url to meteorshim replacing the dbuser, dbpassword, xxxxx, ppppp, database name values and voila!
Oh yeah I got it thanks a lot
Hi Toni,
I am facing a weird issue:
I deployed my app to Openshift but I am not able to load the desktop version. It is taking forever to load. At the same time I can access it from my phone. Not sure why? any idea
TIA.
Hi @tcastelli,
For the first time I deploy meteor as your approach, itās succeeded, of course, with down mongoDB, my app not work correctly.
Hence, I followed your mongoDb process to create new one.
However, from that on, I always got this error from OpenShift:
remote: Waiting for application port (8080) become available ā¦
remote: Application āappnameā failed to start (port 8080 not available)
remote: -------------------------
remote: Git Post-Receive Result: failure
remote: Activation status: failure
remote: Activation failed for the following gears:
remote: 576a23da0c1e66eae6000019 (Error activating gear: CLIENT_ERROR: Failed to execute: ācontrol startā for /var/lib/openshift/576a23da0c1e66eae6000019/nodejs
remote: #IO:0x0000000065f298
remote: #IO:0x0000000065f220
remote: )
remote: Deployment completed with status: failure
remote: postreceive failed
Even I delete everything, start from beginning: add mongoDB url before I run git push, still got those error and fail to deploy.
What could I done wrong?
Im actually using an external db mongo_url from mLab so not sure of what could be wrong. Have you tried using a free database from mLab for example?
Also if you bring more details about the error maybe we can see what is happening,
try with
rhc tail "-n 100"
and copy the results of the errors, maybe thereās valuable information of what is going wrong
Your command not work.
However, I maintain to start from fresh again and using external mongoDB (from mLab). My app start (as the first time) and mongoDB not a problem anymore.
From browser console log, I got this error:
Error: [ng:areq] Argument āInboxCtrlā is not a function, got undefined
Yet, Iām using Angular-Meteor app. Maybe Itād be my problem now, not sure how to survive this.
From your method, I still saw local mongoDB running on server, because I add mongo_url from another site, no need the local anymore, right? I thought I should shut it down, you know, donāt want to waste my free server quota. How can I do that?
Thanks @tcastelli.
sorry forgot to tell that you that you must set the application name and domain if you have more than one so it will be
rhc tail "-n 100" -a appName -n domainName
or try without ā-n 100ā
the ng:areq is indeed something related with angular, which Iām not familiar with so canāt help you on that.
To remove the mongo cartridge you can use the command
rhc cartridge remove -a appName -n domainName -c mongodb
Thank @tcastelli,
Iāve created a new topic to ask someone else about deploy angular-meteor on openshift.
Not sure what to do next.
thank you for the great forum thread you guys have createdā¦ I do not why connection to mongod has refused.
I started using the mongodb catridge but failed , then i also tried the mlab database it also failed to connect.
These are url iam using.
To connect using a driver via the standard MongoDB URI on mlab.
mongodb://:@ds151228.mlab.com:51228/kazi
in the meteorshim.js file iam using the following connection code.
process.env.MONGO_URL = process.env.MONGODB_URL || "mongodb://user1:123?@ds151228.mlab.com:51228/kazi";
At first i also tried using the mongodb catridge on openshift using this connection string.
process.env.MONGO_URL = process.env.MONGODB_URL || "mongodb://admin:12345iop@http://localhost:27017/hello";
But have trying all these connection url, iam just getting the same errorā¦
remote: js-bson: Failed to load c++ bson extension, using pure JS version
remote:
remote: /var/lib/openshift/587407407628e1ca850000cb/app-root/runtime/repo/programs/server/node_modules/fibers/future.js:278
remote: throw(ex);
remote: ^
remote: Error: failed to connect to [goldsoft:NaN]
remote: at Object.Future.wait (/var/lib/openshift/587407407628e1ca850000cb/app-root/runtime/repo/programs/server/node_modules/fibers/future.js:398:15)
remote: at new MongoConnection (packages/mongo/mongo_driver.js:213:1)
remote: at new MongoInternals.RemoteCollectionDriver (packages/mongo/remote_collection_driver.js:4:1)
remote: at Object.<anonymous> (packages/mongo/remote_collection_driver.js:38:1)
remote: at Object.defaultRemoteCollectionDriver (packages/underscore/underscore.js:750:1)
remote: at new Mongo.Collection (packages/mongo/collection.js:102:1)
remote: at Package (packages/idmontie_migrations/migrations.js:23:1)
remote: at /var/lib/openshift/587407407628e1ca850000cb/app-root/runtime/repo/programs/server/packages/idmontie_migrations.js:254:4
remote: at /var/lib/openshift/587407407628e1ca850000cb/app-root/runtime/repo/programs/server/packages/idmontie_migrations.js:261:3
remote: at /var/lib/openshift/587407407628e1ca850000cb/app-root/runtime/repo/programs/server/boot.js:242:10
remote: - - - - -
remote: at [object Object].<anonymous> (/var/lib/openshift/587407407628e1ca850000cb/app-root/runtime/repo/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/connection/server.js:556:74)
Thanx in advance
What version of Meteor are you trying to deploy? I havenāt tested with 1.4.x , but since you need support for Node4 , I guess the default github repo wonāt work anymore. (You will have to use a custom cartdridge to support Node4)
Iam using meteor versionā¦ METEOR@1.2.1 in this project.
Ok i will try using the custom catridge to deploy ā¦ Thank you for your help.