guys I am using OpenShift to conatinerize and run application on kubernetes, I have started the open shift cluster using oc cluster up now how do I open in the web console.
For the mini shift I have user minishift start and then minishift console it's not working the same with oc cluster up
Running oc whoami --show-console returns the link to the console app.
You can obtain the console URL in OpenShift Container Platform 4 as follows:
$ oc get routes -n openshift-console
Thanks, oc login helped me to get the web console url
Related
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
I am trying to create a build and deployment pipeline in OpenShift via Jenkins. I have followed their official tutorial: https://github.com/OpenShiftDemos/openshift-cd-demo
and properly set all policies ( i am using different project names and application but the same strategy ) yet the Jenkins app deployed on cicd project cant start to build in dev project.
Error:
Error from server (Forbidden): buildconfigs.build.openshift.io buildconfig not found though the build is created and can be seen via the web console.
I am using the --from-file instead of --from-dir for binary input.
Please help if any other policies need to be set for the Jenkins service account in cicd project to "start-build" in dev project.
Yes, the Jenkins need to have access to dev project, you can use the following command to give access:
oc policy add-role-to-user edit system:serviceaccount:cicd-tools:jenkins -n example-openshift-dockerfile
cicd-tools: Project jenkins is installed in
example-openshift-dockerfile: Project that will be changed by Jenkins
I have a scalable Python 2.7 app on OpenShift and I'm getting this 503 error.
I checked some answers that might work but they say to rhc into the app and change the Haproxy configurations, but I don't have a clue on how to do it.
Can someone help me please?
1) Install rhc: https://developers.openshift.com/en/managing-client-tools.html and read https://blog.openshift.com/how-haproxy-scales-openshift-apps/
2) Run $ rhc setup for the initial configuration of the tool and check https://developers.openshift.com/en/managing-log-files.html#accessing-logs-via-ssh for viewing haproxy logs
3) Run rhc ssh --app yourapp, once inside, cd haproxy/conf and change your haproxy.cfg appropriately
I edited haproxy.cfg:
option httpchk OPTIONS * HTTP/1.1\r\nHost:\ {{ my app link }}
It’s working now.
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.
I am a collaborator on an OpenShift Online app with administrator privileges, and when I do rhc apps I can see the application, but when I do rhc tail <appname> I get Application '<appname>' not found.
Is there something I am missing?
Using rhc on Ubuntu Server 12.04.
"rhc apps" shows me the app that I am authorized to administer as a collaborator, however "rhc app stop" says - "app not found"
rhc -a app stop gave me the usage help - rhc app-stop <app> [--namespace NAME]
which hinted that a namespace might be necessary for stopping an app in another domain where I am a collaborator
and rhc app-stop testappname --namespace domainname worked!
Try appending your rhc commands with the -l option to specify a login.