OPENSHIFT V3 Free Deployment Java-web

Source: Internet
Author: User
Tags jboss webhook

  

OpenShift is Red Hat's cloud development platform as a service (PaaS). The free and open source cloud computing platform enables developers to create, test, and run their applications, and deploy them to the cloud. OpenShift supports a wide range of programming languages and frameworks, such as Java,ruby and PHP. It also offers a variety of integrated development tools such as Eclipse Integration,jboss Developer Studio and Jenkins, among others. OpenShift provides support for mobile applications, database services, and more, based on an open source ecosystem. The OpenShift online service is built on Red Hat Enterprise Linux. Red Hat Enterprise Linux offers integrated applications, a runtime and an operating system with scalable multi-user single instancing to meet the diverse needs of enterprise-class applications.
The above content, Baidu encyclopedia inside can see. Crucially, you can deploy a Java application for free (as well as other languages, Php,python, etc.), knowing that the deployment environment for Java and Python in the celestial world is not cheap. It is said that the V2 era can be deployed free of 3.  WTF is finished.  Now the registration OpenShift Basic is directly the V3 version. I also recommend the V3 version. After all, the deployment of their own projects to the network is not a distinction between novice, veteran, master, that is, do not need your command line knock Bang Bang Bang bang .... And can be deployed to the network. V3 version of the basic full view of the operation is also more convenient. The documentation is also comprehensive and official GitHub also has a number of QuickStart programs in various languages. V3 Official Document Address: Https://access.redhat.com/documentation/en-us/openshift_online/V3 official JAVA QuickStarts Github address: https:// Github.com/jboss-openshift/openshift-quickstarts it started. First, create the project 1. Register your account (skip) 2. Select 1 Free server environmentsServer address can only select the United States, the East Coast, the West Coast, XXX (and a forgotten) randomly choose a 3. Create a projectClick on "Open Web Console" 4. Choose RED HAT JBOSS, Java, langauge
    • You can also choose a different language
    • You can also select a different container
5. Configure the container
    1. The name of the item, only the letter + number
    2. Project aliases
    3. Project description
    4. App Name
    5. The app's Git repository address is recommended for GitHub, which is also the case with GitHub.

Get the GitHub project address. Here's how:

If you are the first to build, suggest to use this brother to build a Oenshift java-web demo

Github Address: Https://github.com/OpenShiftDemos/os-sample-java-web

Warehouse Address: Https://github.com/OpenShiftDemos/os-sample-java-web.git

  Copy the address of the warehouse to Git Repository.

6. To the third section, you can either close directly or wait a moment when "successfully" appears to indicate that the project was created successfully.

Close the window and you will see that there is already a project created right.

II. Deployment Project &github Code Automatic UpdateBy default, when a project is created, it is basically Deployment SuccessThe Click on the item in the Web console and we will be able to enter management interface of the projectThe 1. Interface Menu DescriptionBasic overview of the overview Project applications application options, primarily for the management of the entire application. Contains deployments (deployment), Pods (the container should be the meaning), Services (service), Router (routing) Builds compiled or built, mainly for your source code management. Other menus that contain Builds (compile or build), Images (image management) are monitoring, storage, security, users, etc. Explore or refer to the documentation yourself. 2. How the OpenShift worksCan read this article https://blog.openshift.com/builds-deployments-services-v3/is divided into the following 2 parts

2.1 More straightforward.

1. Download code from GitHub (first, updated)

2. A new build is created. (You can see the list in the Bulids menu)

3. After build, the existing image content is replaced.

4. Deployment the image (deployment)

5. Place the contents of the deployment in the Pod (container) to provide service.

Stage 2.2, we only need to care

1. GitHub code syncs automatically

2. Build is successful

3. Deployment success

4. Whether pod start is successful

The above content can be viewed in a list of the corresponding menus.

3. Places to be aware of

3.1 Build can have only one execution

When you create a new bulid, you want to see if there is a status of "Pending", "runing" in the list, and if so, close it before performing a new build

3.2 Bulid Branch version

Build supports branch version, or one commit as the initial version, if not selected, the default is master

Select Menu Builds->builds, select the name of the item in the list. Go to the project's historical Build page. Click "Actions" and select Edit

Select Show Advanced Options

    

Git Reference Hint also said, you can specify branch, tag, commit as a reference for this compilation

Context Dir, this directory is what you need to publish the content directory, by default is the/root directory, but if your GitHub like

Officially provided Java-quickstart this is included with multiple Project. Then you need to choose a directory as Project for your application

    

For example: I want to publish the Tomcat-websocket-chat in Java-quickstart. And for Branch 1.2 of this version.

Git Repository Url:https://github.com/liuqi0725/openshift-quickstarts

Git reference:1.2

Context Dir:tomcat-websocket-chat

    

3.3 Headache Medical head, piecemeal.

The publishing process may fail with build failure, deployment failure, and pods failure.

Build successful Flag "Complate" status, depoyment Success Flag "active" status, POD Success flag "Running" status, and containers ready is "1/1"

    The above 3 items are all viewed in the corresponding menu.

That link failed, click to enter for a re-build, deply

4. Automatically associate GitHub code changes with Webhook

4.1 Select Menu builds-builds, click Porject name to enter the build history of project. Select the Configuration at the Top tab. Copy webhook URL

    

4.2 Open GitHub for your project, select setting, select Webhook

   

After success, it should be a green right sign.

    

OPENSHIFT V3 Free Deployment Java-web

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.