Openshift first steps - openshift

I'm really new about Openshift. I create a new wildfly application, make some change ("helloword" with static html) and push everything. The application build fine and restart, but when I try to access it, I'm always getting the Wildfly's welcome page. Did I miss something? Do I have to install rhc client to see Widlfy's log file?

Related

Cannot find module "mysql" while running on heroku

I have been trying to deploy my app on heroku.
I first used the command git push heroku master
and then running the node server using heroku run node server.js
However I get this error. Can anyone help me with this?
enter image description here
I've run into this error before using ibm db2... what you have to do is make a new directory locally, and login to Heroku using git in that new directory. once you do that, copy each folder and file into your new directory from your old one, (you can cp ../olddirectory/app.js,etc, etc)including the package.json and package-lock.json. once you do all that, push it, and it should work.
This sounds so stupid, but it works. every. freaken. time. I do this with all my projects as they all use db2. let me know if you need any more help.

Openshift Origin (Minishift) - Making changes to application repository pulled on VM

I have installed and configured a custom Laravel private repository hosted on bitbucket on minishift running on my laptop. I found that all the files were imported properly without any issues and the image is running.
However, now I want to make configuration changes in my repository for my application to work. How do I make it?
Will I have to import the image from VM on my laptop, work on them
and then push the changes back
Or will I be able to access the files or folder from within my editor or IDE?
I am new to Openshift origin and using it for the first time.
If you have your source code on Bitbucket, you would checkout the repository to your local laptop, make the changes, commit them, and push them back to the repository on Bitbucket. You would then tell OpenShift to rebuild the application by clicking on the Start Build button on the build configuration details in the web console, or by using oc start-build on the command line, supplying it the name of the build configuration to do the build for. The rebuilding of the image from the code when done will automatically trigger a new deployment. If you set up a webhook in Bitbucket, you can have it tell OpenShift when new changes have been pushed and that will trigger a build without you needing to do it manually.
If you are quite new, I would suggest you work through the interactive tutorials at:
https://learn.openshift.com
Also read the free eBook on OpenShift.
https://www.openshift.com/promotions/for-developers.html

openshift ghost mail config

I installed ghost via Openshift. When signing in I get a sendmail/email configuration popup. Ghost appears to be attempting to use sendmail. I updated the config.js file (via git push) to use gmail. I still get the popup. Either config isn't being read/used or my push isn't successful (it appears to be). Any ideas?
Fritz
Hy Fritz,
You should try reloading the openshift application so it's reading the config.js file again:
rhc app reload
Or if that doesnt seem to be enouguh you can restart it with
rhc app restart

Clone Openshift application in scalable

I have an application in Openshift free plan with only one gear. I want to change it to scalabe and take usage of all of 3 free gears.
I read this blog post from openshift and I found that there is a way to do it. I should clone my current application to a new one as a scalable which will use the 2 remaining gears and then I will delete the original application. Thus, the new one will have 3 free gears.
The way that blog suggest is: rhc create-app <clone> --from-app <existing> --scaling
I have the following error: invalid option --from-app
Update
After running the command gem update rhc, I don't have the error above but...A new application with the given name has created with the same starting package (Python 2.7) just like the existing one, but all the files are missing. It actually create a blank application and not a clone of the existing.
Update 2
Here is the structure of the folder:
-.git
-.openshift
-wsgi
---static
---views
---application
---main.py
-requirements.txt
-setup.py
From what we've talked on IRC, your problem was around missing SSH configuration on Windows machine:
Creating application xxx ... done
Waiting for your DNS name to be available ...done
Setting deployment configuration ... done
No system SSH available. Please use the --ssh option to specify the path to your SSH executable, or install SSH.
I've double checked it, and it appears to be working without any problem.
The only requirement is to have the latest rhc client and putty or any other
SSH client. I'd recommend going through this tutorial once again and double-check everything to make sure everything is working properly.
Make sure you are using the newest version of the rhc gem with "gem update rhc" to make sure that you have access to that feature from the command line.
The --from-app will essentially do a 'rhc snapshot save & snapshot restore` (amoung other things) as you can see here from the source:
if from_app
say "Setting deployment configuration ... "
rest_app.configure({:auto_deploy => from_app.auto_deploy, :keep_deployments => from_app.keep_deployments , :deployment_branch => from_app.deployment_branch, :deployment_type => from_app.deployment_type})
success 'done'
snapshot_filename = temporary_snapshot_filename(from_app.name)
save_snapshot(from_app, snapshot_filename)
restore_snapshot(rest_app, snapshot_filename)
File.delete(snapshot_filename) if File.exist?(snapshot_filename)
paragraph { warn "The application '#{from_app.name}' has aliases set which were not copied. Please configure the aliases of your new application manually." } unless from_app.aliases.empty?
end
However this will not copy over anything in your $OPENSHIFT_DATA_DIR directory so if you're storing files there, you'll need to copy them over manually.

openshift : need to edit httpd.conf to enable or add directive according to my needs but it's not work

i've build my application on localhost and running it without any error. i choose openshift to host my application code but i have a problem to make it works perfectly like on my localhost.
i want to add directive of AllowEncodedSlashes and set it to On in my apache2 configuration file, i have tried to edit the file from ~/php/configuration/etc/conf/httpd.conf and then restart the server using ctl_all restart. but the result are http error code 400 (Bad Request). before i add this directive into httpd.conf the result are http error code 404, i am just not sure if the changes are in effect or not. or apache is bugging?
is there anyone knows howto make this work for me?
See if you can add it into .htaccess file instead of httpd.conf file. Also the best way to troubleshoot these problems would be by reviewing your application logs for errors. All you have to do is run "rhc tail {appName}" from your client machine (where the rhc client tools are installed). That gives you the current log entries.
To get to the entire log, you'll want to ssh onto the gear(s) on which the language framework/cartridge is installed using this FAQ and run: more ~/{cartridgeID}/logs/*.log
where {cartridgeID} is your framework cartridge like nodejs-0.6, or your embedded cartridge logs like mysql-5.1.
I created a feature request for this. See this Trello card and feel free to vote it up.