{"id":302928,"date":"2020-05-02T21:00:35","date_gmt":"2020-05-02T21:00:35","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=302928"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=302928","title":{"rendered":"\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 Java \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 OpenShift"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/500076\/\">\u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u0442\u0430\u043a\u043e\u0433\u043e? \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0443 fabric8-maven-plugin \u0438 \u0432\u043f\u0435\u0440\u0435\u0434: \u0441\u0431\u043e\u0440\u043a\u0430, \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 OpenShift. \u041d\u043e \u043a\u043e\u0433\u0434\u0430 \u0438\u0437\u0443\u0447\u0430\u043b \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u0430 \u0437\u0430\u0442\u0435\u043c \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0438 \u0441\u0432\u043e\u0431\u043e\u0434\u044b \u043d\u0430\u0434 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 OpenShift. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0438 \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u043c\u0438.<\/p>\n<ul>\n<li>\u0421\u0431\u043e\u0440\u043a\u0443 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0436\u0443 \u0441\u0430\u043c, \u0441\u0432\u043e\u0438\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c (maven, gradle \u0438 \u0434\u0440.)<\/li>\n<li>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u044e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 Docker Image \u0447\u0435\u0440\u0435\u0437 Dockerfile<\/li>\n<li>Build \u0438 Deployment \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432 Openshift \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435, \u0442.\u0435. \u043b\u044e\u0431\u044b\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430, pod \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e\u0442\u0441\u044f.<\/li>\n<li>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0441\u0430\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u044e\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441\u0431\u043e\u0440\u043a\u0438, \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f   <\/li>\n<\/ul>\n<p> \u2014 <a name=\"habracut\"><\/a><br \/>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u0430\u043c\u043e\u0433\u043e OpenShift, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e.<br \/>  \u0418 \u0442\u0430\u043a \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 java \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442, \u0434\u0430\u043b\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u044e Dockerfile c \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u043c\u043d\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u043c\u0438 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e  <\/p>\n<blockquote><p>Dockerfile <\/p><\/blockquote>\n<p>  <code>FROM openjdk<\/p>\n<p>  MAINTAINER Rylkov Alexander &lt;arylkov@\u0445\u0445\u0445\u0445\u0445.\u0445\u0445\u0445&gt;<\/p>\n<p>  COPY demo.springboot.mvn-0.0.1-SNAPSHOT.jar \/deployments\/app.jar<\/p>\n<p>  ENV JAVA_OPTS=&quot;$JAVA_OPTS -Xms500m -Xmx1024m&quot;<\/p>\n<p>  EXPOSE 8080<br \/>  EXPOSE 5005<\/p>\n<p>  ENTRYPOINT [&quot;sh&quot;, &quot;-c&quot;, &quot;java $JAVA_OPTS -jar \/deployments\/app.jar&quot; ]<br \/>  <\/code> <\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432 \u043f\u0430\u043f\u043a\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u0432\u0430 \u0444\u0430\u0439\u043b\u0430: \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442 \u0438 Dockerfile <br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/sf\/qa\/ka\/sfqaka7ktv6dgiq4x5hgtjjjars.png\"><br \/>  \u0421\u043e\u0441\u0442\u0430\u0432 \u0444\u0430\u0439\u043b\u043e\u0432 \u044d\u0442\u043e \u0443\u0441\u043b\u043e\u0432\u043d\u043e, \u0435\u0441\u043b\u0438 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432 Dockerfile \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u0435\u0449\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0434\u043b\u044f docker image, \u0442\u043e \u0438\u0445 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u044e\u0434\u0430. \u0421\u0435\u0439\u0447\u0430\u0441 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 Dockerfile \u0443\u043a\u0430\u0437\u0430\u043d \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 java \u0438 \u043c\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Spring boot, \u043e\u0442\u043a\u0440\u044b\u0442\u043e \u0434\u0432\u0430 \u043f\u043e\u0440\u0442\u0430 \u0438 \u0434\u0440. <br \/>  \u041d\u0430 \u044d\u0442\u043e\u043c \u0448\u0430\u0433\u0435 \u0438\u043c\u0435\u0435\u043c \u0432\u044b\u0431\u043e\u0440\/\u0441\u0432\u043e\u0431\u043e\u0434\u0443 \u0432 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0441\u0431\u043e\u0440\u043a\u0438 docker image.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u044e OpenShift template \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u044d\u0442\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043e\u0432\u043e\u0439, \u0435\u0435 \u043d\u0430\u0434\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432 \u0441\u0435\u0431\u0435 \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0435 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f, \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0442\u043e \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0433\u043e \u0438 \u0431\u0443\u0434\u0435\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u044d\u0442\u0438\u043c\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438. \u0423 \u043c\u0435\u043d\u044f \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u0442\u044c \u0438\u0437 \u0442\u0440\u0435\u0445 \u0441\u0430\u043c\u044b\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439  <\/p>\n<ul>\n<li>ImageStream<\/li>\n<li>BuildConfig<\/li>\n<li>DeploymentConfig <\/li>\n<\/ul>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">Template java-app-sample<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"plaintext\">kind: Template apiVersion: v1 metadata:   labels:     app: java-app-sample   name: java-app-sample   annotations:     description: &gt;-       This example shows how to create a simple Java application in openshift     tags: java parameters:   - name: APP_NAME     description: application name     value: app-sample     required: true objects:   - kind: ImageStream     apiVersion: v1     metadata:       name: &quot;${APP_NAME}&quot;     spec:       tags:         - from:             kind: DockerImage             name: 172.30.1.1:5000\/myproject\/${APP_NAME}:latest           name: latest   - kind: BuildConfig     apiVersion: v1     metadata:       name: &quot;${APP_NAME}&quot;       labels:         name: &quot;${APP_NAME}&quot;     spec:       source:         binary: {}         type: Binary       strategy:         type: Docker       output:         to:           kind: DockerImage           name: 172.30.1.1:5000\/myproject\/${APP_NAME}:latest       postCommit: {}       resources: {}   - kind: DeploymentConfig     apiVersion: v1     metadata:       name: &quot;${APP_NAME}&quot;     spec:       strategy:         type: Rolling         rollingParams:           updatePeriodSeconds: 1           intervalSeconds: 1           timeoutSeconds: 120         resources: {}       replicas: 1       selector:         app: &quot;${APP_NAME}&quot;       template:         metadata:           labels:             app: &quot;${APP_NAME}&quot;         spec:           containers:             - name: &quot;${APP_NAME}&quot;               image: 172.30.1.1:5000\/myproject\/${APP_NAME}:latest               ports:                 - containerPort: 8080                   protocol: TCP                 - containerPort: 5005                   protocol: TCP               env:                 - name: TZ                   value: Europe\/Moscow               resources:                 limits:                   cpu: '0.5'                   memory: 1000Mi                 requests:                   cpu: '0.2'                   memory: 500Mi               imagePullPolicy: Always           restartPolicy: Always           dnsPolicy: ClusterFirst     triggers:       - type: ConfigChange         imageChangeParams:           automatic: true           containerNames:             - &quot;${APP_NAME}&quot;           from:             kind: ImageStreamTag             name: 172.30.1.1:5000\/myproject\/${APP_NAME}:latest       - type: ImageChange     status: {} <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0412 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043a\u0430\u043a \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430, \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0441\u0443\u0440\u0441\u044b\/\u043b\u0438\u043c\u0438\u0442\u044b, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u0435\u043d\u043d\u0430\u044f \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f TZ, \u0443\u043a\u0430\u0437\u0430\u043d \u043e\u0434\u0438\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u2014 \u0438\u043c\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (APP_NAME). \u0410\u0434\u0440\u0435\u0441 docker \u0440\u0435\u0435\u0441\u0442\u0440\u0430 \u0443\u043a\u0430\u0437\u0430\u043d \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0438 minishift (172.30.1.1:5000\/myproject\/ \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438) \u0438 \u0434\u0440.<\/p>\n<p>  \u041d\u043e \u0434\u043b\u044f \u043c\u043e\u0435\u0433\u043e \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0437\u0434\u0435\u0441\u044c  <\/p>\n<pre><code class=\"plaintext\">  - kind: BuildConfig     spec:       source:         binary: {}         type: Binary       strategy:         type: Docker <\/code><\/pre>\n<p>  \u0412 BuildConfig \u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0447\u0442\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0444\u0430\u0439\u043b(\u044b), \u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0435\u0439 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 docker image \u2014 Dockerfile (type: Docker)<\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u044d\u0442\u043e\u0442 \u0448\u0430\u0431\u043b\u043e\u043d \u0432 OpenShift<br \/>  <code> oc create -f template.yaml<\/code><br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/jv\/4d\/k6\/jv4dk6xvbzm3dblcyw6m6vptjgw.png\"><br \/>  \u042d\u0442\u043e\u0442 \u0448\u0430\u0431\u043b\u043e\u043d \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 (\u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438 \u0438\u0437 web UI \u043a\u043e\u043d\u0441\u043e\u043b\u0438, \u043d\u043e \u043d\u0435 \u0437\u0434\u0435\u0441\u044c).<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/9g\/ps\/vk\/9gpsvkelhgapvyrs8ypt4wgbwmc.png\"><\/p>\n<p>  \u041f\u043e \u044d\u0442\u043e\u043c\u0443 \u0448\u0430\u0431\u043b\u043e\u043d\u0443 \u0434\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 (\u043f\u043e \u0444\u0430\u043a\u0442\u0443 \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u044f \u0438 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435)<br \/>  <code>oc new-app java-app-sample -p APP_NAME=app-sample<\/code><br \/>  \u0443\u043a\u0430\u0436\u0435\u043c \u0438\u043c\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0438\u043c\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/_s\/po\/ei\/_spoeigfhi4yfrjvslwc9qkqogs.png\"><br \/>  \u0421\u043e\u0437\u0434\u0430\u043b\u0438\u0441\u044c \u0442\u0440\u0438 \u043c\u043e\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438<\/p>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0430\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435. <br \/>  <code>&gt;oc start-build app-sample --from-dir . --follow<\/code><\/p>\n<p>  \u0412\u0430\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0438\u0437 \u043f\u0430\u043f\u043a\u0438 \u0433\u0434\u0435 \u0443\u043a\u0430\u0437\u0430\u043d \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0438 Dockerfile, \u043a\u0430\u043a \u0440\u0430\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 &#8212;from-dir \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u044d\u0442\u043e, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0430 \u0432\u0441\u044f \u043f\u0430\u043f\u043a\u0430 \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0432 OpenShift \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f image \u0432 docker \u0440\u0435\u0435\u0441\u0442\u0440\u0435. \u0415\u0441\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u0430. <br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/km\/zg\/x8\/kmzgx8pdj4fdijpjszymorixogw.png\"><\/p>\n<p>  \u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u0430\u043f\u043a\u0438 \u0431\u044b\u043b\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043e \u0432 OpenShift, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b \u043f\u0440\u043e\u0446\u0435\u0441\u0441 Docker \u0434\u043b\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 Image \u043f\u043e Dockerfile \u0438 \u0432 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043b \u043e\u0431\u0440\u0430\u0437 \u0432 docker registry. <\/p>\n<p>  \u0412 web \u043a\u043e\u043d\u0441\u043e\u043b\u0438 OpenShift \u0432\u0438\u0434\u043d\u043e \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u043b\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/gq\/up\/w2\/gqupw2cdds-aqrk1eeyevl-lzna.png\"><\/p>\n<p>  \u0423\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/qv\/oy\/il\/qvoyiltd_mfmwkxrk56_pufkdxg.png\"><\/p>\n<p>  \u0423\u043a\u0430\u0437\u0430\u043d\u043d\u0430\u044f \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ef\/e0\/_t\/efe0_t9q-0rnwfbmueirqml6wp4.png\"> <\/p>\n<p>  \u0412 \u043b\u043e\u0433\u0435<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/tt\/wc\/ce\/ttwccef2ab99saldv_kfhmszro0.png\"><\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0431\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432, \u0441 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u043c \u0438 \u0441\u0432\u043e\u0431\u043e\u0434\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u0430 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 OpenShift. <\/p>\n<p>  \u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b <br \/>  <a href=\"https:\/\/docs.okd.io\/3.11\/minishift\/getting-started\/installing.html\" rel=\"nofollow\">Installing Minishift<\/a><br \/>  \u0434\u043b\u044f \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u0442\u0435\u043c\u044b OpenShift \u044f \u0431\u044b \u043f\u043e\u0441\u043e\u0432\u0435\u0442\u043e\u0432\u0430\u043b \u043d\u0430\u0447\u0430\u0442\u044c \u0441 Minishift<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/500076\/\"> https:\/\/habr.com\/ru\/post\/500076\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/500076\/\">\u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u0442\u0430\u043a\u043e\u0433\u043e? \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0443 fabric8-maven-plugin \u0438 \u0432\u043f\u0435\u0440\u0435\u0434: \u0441\u0431\u043e\u0440\u043a\u0430, \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 OpenShift. \u041d\u043e \u043a\u043e\u0433\u0434\u0430 \u0438\u0437\u0443\u0447\u0430\u043b \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u0430 \u0437\u0430\u0442\u0435\u043c \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0438 \u0441\u0432\u043e\u0431\u043e\u0434\u044b \u043d\u0430\u0434 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 OpenShift. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0438 \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u043c\u0438.<\/p>\n<ul>\n<li>\u0421\u0431\u043e\u0440\u043a\u0443 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0436\u0443 \u0441\u0430\u043c, \u0441\u0432\u043e\u0438\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c (maven, gradle \u0438 \u0434\u0440.)<\/li>\n<li>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u044e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 Docker Image \u0447\u0435\u0440\u0435\u0437 Dockerfile<\/li>\n<li>Build \u0438 Deployment \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432 Openshift \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435, \u0442.\u0435. \u043b\u044e\u0431\u044b\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430, pod \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e\u0442\u0441\u044f.<\/li>\n<li>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0441\u0430\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u044e\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441\u0431\u043e\u0440\u043a\u0438, \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f   <\/li>\n<\/ul>\n<p> \u2014 <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-302928","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/302928","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=302928"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/302928\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=302928"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=302928"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=302928"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}