Recent Updates Toggle Comment Threads | Keyboard Shortcuts

  • Serdar Osman Onur 2:43 pm on January 2, 2018 Permalink | Reply
    Tags: , , , windows   

    Installing Minishift on Windows 10

    1 – Download and install VirtualBox
    https://www.virtualbox.org/wiki/Downloads
    2- Download and install Minshift
    https://github.com/minishift/minishift/releases
    3- Configure minishift to use VirtualBox
    >minishift config set vm-driver virtualbox
    4- Add minishift directory to PATH
    5- Restart CMD
    6- Start minishift
    >minishift start

    Note: Disable Hyper-V if it is enabled.

    Now your local OpenShift Origin instance should be available through a url like this: https://192.168.99.100:8443. How about all those “oc” commands? If you type “oc” and hit enter you will see that the command is not recognized. That is because we have added “oc” binary to our PATH. Run “$minishift oc-env” to see how to update your environment variables in order to be able to use the “oc” command.

    C:\Users\serdar>minishift oc-env
    SET PATH=C:\Users\serdar\.minishift\cache\oc\v3.6.0\windows;%PATH%
    REM Run this command to configure your shell:
    REM @FOR /f “tokens=*” %i IN (‘minishift oc-env’) DO @call %i

    Above is the output of “minishift oc-env” command. All you have to do is to add “C:\Users\serdar\.minishift\cache\oc\v3.6.0\windows” to the system PATH and restart CMD.

     
  • Serdar Osman Onur 4:46 pm on December 20, 2017 Permalink | Reply
    Tags: , , ,   

    Installing OpenShift Client Tools on CentOS 7

    I am trying to install OpenShift Pipeline Plugin (https://wiki.jenkins-ci.org/display/JENKINS/OpenShift+Pipeline+Plugin) following the documentation here: https://access.redhat.com/documentation/en-us/reference_architectures/2017/html-single/build_and_deployment_of_java_applications_on_openshift_container_platform_3/index#Jenkins

    There it says “This plugin does NOT require the oc binary/CLI to be present. However, for certain features not provided in this plugin, (for example, new-app and start-build with binary source), it’s required to download and install the oc client binary on the machine where Jenkins is installed.”.

    Installing Client Tools for OpenShift Origin (Or Enterprise OCP)

    https://docs.openshift.org/latest/cli_reference/get_started_cli.html#installing-the-cli

    1- Download CLI from GitHub (https://github.com/openshift/origin/releases) (Don’t have internet connection? Download on another machine and transfer the file using an ftp client like Filezilla)
    2- Extract the zip file
    3- One of the extracted contents is “oc” executable
    4- Type echo $PATH to see the folders that are in your PATH
    5- Copy “oc” executable to one of those folders (for example I copy it under /usr/local/bin)

    If you type “oc” in the terminal you will see the client tools working.

    Now you can do “oc login” to connect to your OpenShift master.

    Installing Client Tools for OpenShift Online

    This is how you install client tools for OpenShift Online. Also see-> https://developers.openshift.com/getting-started/rhel-centos.html#client-tools

    1- Install Ruby (yum install ruby)
    2- Install rubygems (yum install rubygems)
    3- Install rhc (gem install rhc)

    Don’t have yum? Below is the longer version of installing ruby and rubygems:

    1) Install Ruby

    wget http://ftp.ruby-lang.org/pub/ruby/2.5/ruby-2.5.0-rc1.tar.gz
    tar xvzf ruby-2.1.1.tar.gz
    cd ruby-2.1.1
    ./configure –prefix=/usr
    make
    make install

    2) Install RubyGems

    wget http://production.cf.rubygems.org/rubygems/rubygems-2.7.3.tgz
    tar xvzf rubygems-1.8.25.tgz
    cd rubygems-1.8.25
    ruby setup.rb config
    ruby setup.rb setup
    ruby setup.rb install

    Then you can execute step 3 same as before..

    Finally, you run “rhc setup” to setup the client tools.

     
  • Serdar Osman Onur 2:37 pm on December 14, 2017 Permalink | Reply
    Tags: , , ,   

    Simple and Quick Way to Deploy Red Hat SSO on OpenShift

    Today I worked with Bruno from Brasil to solve my deployment problem with Red Hat SSO PostgreSQL persistent image on OpenShift.

    We followed the steps before and able to solve the problem:

    1- Run the command below
    oc create -f https://gitlab.com/redhat-openshift/deployment/config/json/sso-deployment/raw/master/keystores-secret-sa

    This command uses the json file specified on the link to create service account, secret, jks and jceks files.
    Keystores are created and associated with the secret and this secret is associated with the service account. (Inspect the file contents to see this relation/mechanism). You can create jks and jceks files yourself and paste the content in this json yourself using the steps I described here: http://ocgetall.org/blog/2017/11/23/this-is-how-i-deployed-red-hat-sso/

    2- oc policy add-role-to-user view sso-service-account

    This will add view role to our service account which is needed for the sso to talk to other apps.

    3- oc process sso71-postgresql-persistent -n openshift | oc create -f –

    This command will “process” the sso71-postgresql-persiste template, associate it with some default values and environment variables, and feed it to oc create comamnd to create the objects (service, dc, pod etc) for this deployment.

    That is all.

    You can edit the username and password values auto-generated by ocp.
    Open the corresponding deployment config search SSO_ADMIN_USERNAME…

     
  • Serdar Osman Onur 4:04 pm on December 6, 2017 Permalink | Reply
    Tags: , ,   

    This is where the .git repositories are stored on the Red Hat BPM Suite Server

    JBOSS_HOME/bin/.niogit

    On my server it is /home/remote/eap_area/eap/bin/.niogit

     
  • Serdar Osman Onur 4:00 pm on December 6, 2017 Permalink | Reply
    Tags: ,   

    Disabling Selinux

    Sometimes you may need to configure selinux to enable the communication between tools and applications.
    To do this you need to edit /etc/sysconfig/selinux file

    https://www.centos.org/docs/5/html/5.1/Deployment_Guide/s3-SELinux-files-etc-sysconfig-selinux.html

     
  • Serdar Osman Onur 3:51 pm on December 6, 2017 Permalink | Reply
    Tags: , , ,   

    Business-Central Suddenly Stopped Working

    Below is how I solved this problem.

    1- First, somehow EAP was down so I had to start it up.

    Go to “JBOSS_HOME/bin” and run standalone.sh (in my server it is standalone.sh is here: /home/remote/eap_area/eap/bin/standalone.sh)
    If the script is not runnable run this: chmod +x standalone.sh
    Now the script should execute and EAP should start up

    If you see errors like dependency errors and others on the terminal while EAP is booting, reboot the system (by the way my server is CentOS) and run standalone.sh again.

    2- Check if the Business-Central is deployed. To check this go to “JBOSS_HOME/standalone/deployments”
    If you see a file named “business-central.war.undeployed” use the command below to rename it:

    mv business-central.war.undeployed business-central.war.dodeploy

    Business-Central deployment should start. You can see the progress inside the terminal that you run standalone.sh script to boot JBOSS EAP server.

     
  • Serdar Osman Onur 2:10 pm on December 5, 2017 Permalink | Reply
    Tags: , , , ,   

    Problem Deploying Persistent Images on OpenShift

    If you are having problems deploying persistent images on OpenShift no matter what image you are trying to deploy, there is a good chance that your NFS service is not up.
    Login to your NFS server (in our dev. environment this is the infra node) and run the commands below:

    rpcinfo -p | grep nfs -> run this to check if nfs service is up

    If there are no outputs from the aboce command run the below to start the nfs service

    /sbin/service nfs start

    Re-run this -> rpcinfo -p | grep nfs – Now you should be seeing nfs service processes running and your persistent images should install.

    Scale the failed installations to 0 and back to 1.

    oc scale dc sso-postgresql –replicas=0
    oc scale dc sso-postgresql –replicas=1

    If they are still failing try deleting and re-installing them.

    Might be useful: https://linuxconfig.org/how-to-configure-nfs-on-linux

     
  • Serdar Osman Onur 11:32 am on December 5, 2017 Permalink | Reply
    Tags: , , , ,   

    Binding a PVC to a Specific PV

    This is possible. To do this we need to first create a PV. I created my PV using the yaml file below:

    As you can see I have already created the claimRef section before any claims were made by an existing PVC. A note here: “resourceVersion” and “uid” values were added after I created the PVC from the yaml file below. Another note is, although I have added the claimRef section in the yaml file of the PV, it was not set to “Bound” status until PVC was actually created.

     
  • Serdar Osman Onur 9:01 am on December 5, 2017 Permalink | Reply
    Tags: , , , ,   

    OpenShift Persistent Volume YAML – accessModes

    accessModes:
    Though this appears to be related to controlling access to the volume, it is actually used similarly to labels and used to match a PVC to a PV. Currently, no access rules are enforced based on the accessModes.

     
  • Serdar Osman Onur 12:15 pm on December 4, 2017 Permalink | Reply
    Tags: , , , ,   

    On OpenShift Templates, Images, Maven Fabric8 plugin, FIS

    Last week on Friday I was on a call with Phil (from Red Hat) who is a senior Red Hat consultant. There were some highlights from from my point of view. Let me write them down below…

    1- Phil said FIS- images (the 2 images you can find in OpenShift web console) were for deploying camel applications, not for like springboot microservices. He also said that if you were to deploy springboot microservices on OpenShift using these FIS images, they would not be supported by Red Hat. I think not supported means if you were to encounter any problems with those deployments all Red Hat would say is gonna be “re-deploy your services using other JAVA images”.

    2- There are templates and images in OpenShift. They are not the same things. You can find templates using OpenShift web console if you go to Resources -> Other Resources -> Templates. You must do this in “openshift” project.

    3- You can copy existing templates, change the source code url and environment variables and create your own templates for reusing later.

    4- You can browse Red Hat image Container Catalog and find yourself different images for deploying JAVA applications with various runtimes. https://access.redhat.com/containers/

    You can watch the full discussion here:
    https://bluejeans.com/playback/s/VgankQ2tfHg5cjJAGP85pYUpuNJGUsbjc9OfRXFoUHfMTkpMVxGsb1n8k57AoeXt

     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel