Deploy application in openshift using web console

In the previous tutorial, I showed you how khổng lồ deploy an application in OpenShift using the client tool oc. Deploying applications that use the web console in OpenShift is much simpler và we can monitor the process of this deployment in the most intuitive sầu way. How is it in details? We will find out in this tutorial together!

First, you need to login khổng lồ OpenShift using the website console with the mặc định user and password as developer/developer.

Bạn đang xem: Deploy application in openshift using web console

Then select the project you need to deploy the application. Mine as follows:

*

Here, we have 4 ways to deploy an application in OpenShift that is using Catalog (in this case, OpenShift provides us with environments for us khổng lồ run our applications, for example, for Java applications, OpenShift provides WildFly to run them, our application will be packaged with these environments lớn create Image that can be deployed khổng lồ Kubernetes), using an existing Image, using the spec file khổng lồ define Kubernetes objects or use a resource from this Project or other Projects in OpenShift.

In the example of this tutorial, I will use the Catalog!

Please click Browse Catalog lớn start deploying an application.

The result is as follows:

*

I will use the example project in the tutorial InternalResourceViewResolver in Spring MVC as an example for this tutorial. Since it is a Java application, I will choose WildFly in the Catalog menu above sầu, you will see a dialog shown as follows:

*

The first screen of this dialog is just the information section, please click the Next button to begin configuring our deployment section!

*

Here we have sầu 3 basic information, by mặc định, we need to fill in the information that is the version of WildFly we will use lớn deploy the application, the name of the application và Git repository contains the source code of the application. You can select the “advanced options” liên kết on this window to lớn enable additional information, as follows:

*

As you can see, we can also select the branch of the source code, select the directory of Git repository, select the options related to lớn Routing:

*

Build Configuration, Deployment Configuration:

*

Scaling, Resource Limits:

*

và Labels:

*

I will leave sầu the default value of all information except the name of the application, Git repository. The source code of the example in the tutorial InternalResourceViewResolver in Spring MVC is pushed to the Huong Dan Java’s Github at https://github.com/autocadtfesvb.comcom/autocadtfesvb.com and located in the spring-mvc-internalresourceviewresolver directory so I will configure it as follows:

*

Then cliông xã the “Create” button in the bottom of this dialog.

Xem thêm: Sáng Tạo Việt Cách Làm Súng Bằng Bìa Giấy Bỏ Đi, 3 Cách Gấp Súng Nhanh Và Đẹp Tại Nhà

Result:

*

Now, our application is automatically built, automatically creates Image, creates Pod, creates Deployment, creates Service và creates Route.

To kiểm tra these, you, from the left menu, cliông chồng on the Builds then select Builds, you will see the following result:

*

Select the Build name “spring-mvc-example” then View Log, you will see the results of the code we have sầu built, created Image and pushed into lớn the Registry as follows:

*

You will see an Image created if you cliông xã on Builds và select Images on the left menu as follows:

*

Now, if you kiểm tra Applications -> Deployments, Applications -> Services, Applications -> Pods, Applications -> Routes, you will see the following result:

Deployments:

*

Services:

*

Pods:

*

Routes:

*

Cliông chồng Hostname “http://spring-mvc-example-autocadtfesvb.com.127.0.0.1.nip.io/“, you will see the following result:

*

As you can see, this is just the homepage of WildFly, not the result page I am looking forward lớn in the tutorial InternalResourceViewResolver in Spring MVC, the reason is that because our application is deployed at context path “/spring-mvc-internalresourceviewresolver-1.0.0-BUILD-SNAPSHOT”. You can check this by going to Applications -> Deployments, selecting our application and selecting View Log, as follows:

*

(Line 75).

Xem thêm: Số Tổng Đài Thông Tin Và Báo Hỏng Dịch Vụ Internet Viettel Telecom

Results when I request “http://spring-mvc-example-autocadtfesvb.com.127.0.0.1.nip.io/spring-mvc-internalresourceviewresolver-1.0.0-BUILD-SNAPSHOT/” will be as follows:

*

So, we have successfully deployed an application khổng lồ OpenShift using the web console.


Chuyên mục: kiến thức