Deployment of Source Code on Openshift
In the previous article, sour code was converted to docker image and showed how to deploy that image. This article is about how to deploy source code on openshift. The docker image was deployed via DockerHub. This time github and the same spring project will be used for this deployment.
To do that, first enter the openshift web console.
In web console click Red Hat OpenJDK 8. Click Next button for passing information section.
After fill in the blanks, click create.
Click close button. That’s it. The project is ready to use. The result is shown at below.
Deployment Source Code on Openshift with Using Terminal
Source code deployment was shown via an openshift web console. Now let’s make same deployment via windows terminal.
Open a windows terminal and find oc.exe file. After the .exe file is run, login openshift.
Create a project when the process of login is finished. After that, write oc import-image — from=registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift s2i-java — confirm .
To pull the code from github, write oc new-app s2i-java~https://github.com/username/repository name — name=name_choice .
To show the application’s status, terminal or web console can be used.
This deployment was not performed by the web console. Because of this route has to be given. After the route process, this project can start to work.