{"id":308479,"date":"2020-08-14T15:00:30","date_gmt":"2020-08-14T15:00:30","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=308479"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=308479","title":{"rendered":"\u0417\u0430\u043f\u0443\u0441\u043a \u0442\u0435\u0441\u0442\u043e\u0432 JMeter \u0432 OpenShift, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Jenkins Pipeline"},"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\/company\/tsystems\/blog\/515166\/\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! <\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 JMeter \u0432 OpenShift&#8217;e \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Jenkins&#8217;a \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u0435\u043c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f (\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 <code>ImageStreams<\/code>, <code>BuildConfig<\/code>, <code>Job<\/code> \u0438 \u043f\u0440\u043e\u0447) \u0432 \u0440\u0443\u0447\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043f\u0438\u0448\u0438\u043c Jenkins Pipeline.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0443 \u043d\u0430\u0441 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c:<\/p>\n<p>  <\/p>\n<ol>\n<li>\u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 OpenShift (v3.11) \u043a\u043b\u0430\u0441\u0442\u0435\u0440<\/li>\n<li>Jenkins server \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c\u0438 \u0443\u0447\u0435\u0442\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0432 OpenShift<\/li>\n<li>\u0444\u0430\u0439\u043b <code>apache-jmeter-5.2.tgz<\/code><\/li>\n<\/ol>\n<p>  <\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0435\u0441\u0442\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 <code>HTTP Request<\/code> \u043d\u0430 <code>ya.ru<\/code> \u0432 \u043e\u0434\u0438\u043d \u043f\u043e\u0442\u043e\u043a. <\/p>\n<p>  <\/p>\n<h3 id=\"sozdanie-proekta-v-openshift\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 OpenShift<\/h3>\n<p>  <\/p>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c <code>perftest<\/code> \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ oc new-project perftest --display-name=&quot;Performance Tests&quot; --description=&quot;Performance Tests - JMeter&quot;<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430\u0441 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0435\u0440\u0435\u043a\u0438\u043d\u0435\u0442 \u0432 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 <code>perftest<\/code>, \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u044d\u0442\u043e \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ oc project Using project &quot;perftest&quot; on server &quot;https:\/\/127.0.0.1:8443&quot;.<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"sozdanie-storagea\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 Storage&#8217;a<\/h3>\n<p>  <\/p>\n<p>\u041e\u0442\u0447\u0435\u0442\u044b \u0442\u0435\u0441\u0442\u043e\u0432 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u043e\u0431\u0449\u0435\u043c \u0434\u043b\u044f \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 <code>jmeter-meter<\/code>&#8216;a \u043c\u0435\u0441\u0442\u0435 \u2014 <code>\/jmeter\/reports<\/code>. <\/p>\n<p>  <\/p>\n<p>\u0421\u0442\u043e\u0440\u0430\u0434\u0436\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0435 \u0441\u0435\u0439\u0447\u0430\u0441, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0430 \u043d\u0438\u0445 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u0432\u044f\u0437\u0430\u043d\u044b POD&#8217;\u044b <code>jmeter-web<\/code> \u0438 <code>jmeter-master<\/code>. <\/p>\n<p>  <\/p>\n<p>\u0411\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u0441\u0442\u043e\u0440\u0430\u0434\u0436\u0430\u043c \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 <a href=\"https:\/\/docs.openshift.com\/container-platform\/3.11\/architecture\/additional_concepts\/storage.html\">Persistent Storage<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c yaml-\u0444\u0430\u0439\u043b\u044b \u0434\u043b\u044f <code>PV<\/code> \u0438 <code>PVC<\/code>.<\/p>\n<p>  <\/p>\n<p><strong>pv.yaml<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ tee pv.yaml&lt;&lt;EOF apiVersion: v1 kind: PersistentVolume metadata:   name: jmeter-reports spec:   capacity:     storage: 10Gi   accessModes:     - ReadWriteMany   glusterfs:     endpoints: glusterfs-cluster     path: \/jmeter\/reports     readOnly: false   persistentVolumeReclaimPolicy: Retain EOF<\/code><\/pre>\n<p>  <\/p>\n<p><strong>pvc.yaml<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ tee pvc.yaml&lt;&lt;EOF apiVersion: v1 kind: PersistentVolumeClaim metadata:   name: jmeter-reports spec:   accessModes:     - ReadWriteMany   resources:     requests:       storage: 10Gi EOF<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c <code>PV<\/code> \u0438 <code>PVC<\/code> \u0432 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438 OpenShift&#8217;a:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ oc create -f pv.yaml -n perftest $ oc create -f pvc.yaml -n perftest<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u0442\u0430\u0442\u0443\u0441 \u0434\u043b\u044f <code>PVC<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ oc get pvc -n perftest NAME             STATUS    VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS        AGE jmeter-reports   Bound     pvc-b0e5f152-db4b-11ea-a497-566f75280024   10Gi       RWX            glusterfs-storage   8m<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u043e\u0442, \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432 GUI:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/hk\/9b\/66\/hk9b66usm4bgp-v30mmcs-gl5xk.png\"\/><\/p>\n<p>  <\/p>\n<h3 id=\"sozdanie-bazovogo-obraza-jmeter\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430 JMeter<\/h3>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e <code>ImageStream<\/code> \u0438 <code>BuildConfig<\/code>. <\/p>\n<p>  <\/p>\n<p>\u0412\u0441\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u2014 <a href=\"https:\/\/docs.openshift.com\/container-platform\/3.11\/architecture\/core_concepts\/builds_and_image_streams.html\">Builds and Image Streams<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0441\u0431\u043e\u0440\u043a\u0438 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <code>Docker<\/code> \u0438\u0437 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430.<\/p>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 <code>jmeter-base<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u043e\u0439 \u0434\u043b\u044f <code>jmeter-master<\/code>.<\/p>\n<p>  <\/p>\n<p><strong>Dockerfile<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">FROM openjdk:8u212-jdk  ARG JMETER_VER=&quot;5.2&quot; ENV JMETER_HOME \/jmeter\/apache-jmeter-$JMETER_VER ENV PATH $JMETER_HOME\/bin:$PATH  RUN mkdir -p \/jmeter\/results \\     &amp;&amp; mkdir \/jmeter\/tests  WORKDIR \/jmeter  COPY apache-jmeter-$JMETER_VER.tgz .  RUN tar -xzf $JMETER_HOME.tgz \\     &amp;&amp; rm $JMETER_HOME.tgz \\     &amp;&amp; ls -la  RUN sed -i s\/#server.rmi.ssl.disable=false\/server.rmi.ssl.disable=true\/ $JMETER_HOME\/bin\/jmeter.properties  EXPOSE 60000<\/code><\/pre>\n<p>  <\/p>\n<p><strong>is.yaml<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ tee is.yaml&lt;&lt;EOF apiVersion: v1 kind: ImageStream metadata:   labels:     build: jmeter-base   name: jmeter-base EOF<\/code><\/pre>\n<p>  <\/p>\n<p><strong>bc.yaml<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ tee bc.yaml&lt;&lt;EOF apiVersion: v1 kind: BuildConfig metadata:   name: jmeter-base spec:   failedBuildsHistoryLimit: 5   nodeSelector: null   output:     to:       kind: ImageStreamTag       name: 'jmeter-base:latest'   postCommit: {}   resources: {}   runPolicy: Serial   source:     binary: {}     type: Binary   strategy:     dockerStrategy:       from:         kind: ImageStreamTag         name: 'openjdk:8u212-jdk'     type: Docker   successfulBuildsHistoryLimit: 5 EOF<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u044b <code>IS<\/code> \u0438 <code>BC<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ oc create -f is.yaml -n perftest $ oc create -f bc.yaml -n perftest<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0431\u0435\u0440\u0435\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 <code>jmeter-base<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ oc start-build jmeter-base -n perftest --from-dir=. --follow<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"jmeter-web\">JMeter WEB<\/h3>\n<p>  <\/p>\n<p><code>jmeter-web<\/code> \u044d\u0442\u043e \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 Apache. \u0412 \u0435\u0433\u043e \u0437\u0430\u0434\u0430\u0447\u0443 \u0432\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430. <\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d <code>Dockerfile<\/code> \u0438 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 <code>httpd.conf<\/code>. \u0414\u043b\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b <code>DocumentRoot<\/code> \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>\/jmeter\/reports<\/code>, \u0442.\u0435. \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p><strong>Dockerfile<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ tee Dockerfile&lt;&lt;EOF FROM httpd:2.4  COPY httpd.conf \/usr\/local\/apache2\/conf\/httpd.conf RUN chmod -R 777 \/usr\/local\/apache2\/logs  EXPOSE 8080  CMD [&quot;httpd&quot;, &quot;-D&quot;, &quot;FOREGROUND&quot;] EOF<\/code><\/pre>\n<p>  <\/p>\n<p><strong>is.yaml<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ tee is.yaml&lt;&lt;EOF apiVersion: v1 kind: ImageStream metadata:   generation: 1   labels:     build: jmeter-web   name: jmeter-web EOF<\/code><\/pre>\n<p>  <\/p>\n<p><strong>bc.yaml<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ tee bc.yaml&lt;&lt;EOF apiVersion: v1 kind: BuildConfig metadata:   name: jmeter-web spec:   failedBuildsHistoryLimit: 5   nodeSelector: null   output:     to:       kind: ImageStreamTag       name: 'jmeter-web:latest'   runPolicy: Serial   source:     binary: {}     type: Binary   strategy:     dockerStrategy:       from:         kind: ImageStreamTag         name: 'httpd:2.4'     type: Docker   successfulBuildsHistoryLimit: 5 EOF<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c <code>ImageStream<\/code> \u0438 <code>BuildConfig<\/code> \u043e\u0431\u044a\u0435\u043a\u0442\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ oc create -f is.yaml -n perftest $ oc create -f bc.yaml -n perftest<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043e\u0431\u0440\u0430\u0437 \u0438\u0437 <code>Dockerfile<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ oc start-build jmeter-web -n perftest --from-dir=. --follow<\/code><\/pre>\n<p>  <\/p>\n<p><strong>dc.yaml<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ tee dc.yaml&lt;&lt;EOF apiVersion: apps.openshift.io\/v1 kind: DeploymentConfig metadata:   name: jmeter-web spec:   replicas: 1   template:     metadata:       labels:         name: jmeter-web     spec:       containers:         - image: 172.30.1.1:5000\/perftest\/jmeter-web           name: jmeter-web           volumeMounts:             - mountPath: \/jmeter\/reports               name: jmeter-reports           ports:             - containerPort: 80               protocol: TCP             - containerPort: 8080               protocol: TCP       volumes:         - name: jmeter-reports           persistentVolumeClaim:             claimName: jmeter-reports EOF<\/code><\/pre>\n<p>  <\/p>\n<p><strong>sc.yaml<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ tee sc.yaml&lt;&lt;EOF apiVersion: v1 kind: Service metadata:   labels:     app: jmeter-web   name: jmeter-web spec:   ports:     - name: 8080-tcp       port: 8080       protocol: TCP       targetPort: 8080   selector:     deploymentconfig: jmeter-web   sessionAffinity: None   type: ClusterIP EOF<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u044b <code>Service<\/code> \u0438 <code>DeploymentConfig<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ oc create -f sc.yaml -n perftest $ oc create -f dc.yaml -n perftest<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"jmeter-master\">Jmeter-master<\/h3>\n<p>  <\/p>\n<p>\u0417\u0430\u0439\u043c\u0435\u043c\u0441\u044f \u0434\u0435\u043f\u043b\u043e\u0439\u043c\u0435\u043d\u0442\u043e\u043c \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 Apache.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e Dockerfile <code>jmeter-master<\/code>&#8216;a, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 <code>jmeter-base<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432 \u0441\u0442\u043e\u0440\u0430\u0434\u0436.<\/p>\n<p>  <\/p>\n<p><strong>Dockerfile<\/strong><\/p>\n<p>  <\/p>\n<p><code>Dockerfile<\/code> \u0434\u043b\u044f <code>jmeter-master<\/code>, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 <code>jmeter-base<\/code>.<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">FROM jmeter-base  ARG JMETER_VER=&quot;5.2&quot; ENV JMETER_HOME \/jmeter\/apache-jmeter-$JMETER_VER ENV PATH $JMETER_HOME\/bin:$PATH  WORKDIR \/jmeter COPY run.sh \/jmeter\/ COPY tests\/*.jmx \/jmeter\/tests\/ RUN chmod +x \/jmeter\/run.sh  ENTRYPOINT [&quot;\/bin\/bash&quot;] CMD [&quot;\/jmeter\/run.sh&quot;]<\/code><\/pre>\n<p>  <\/p>\n<p><strong>run.sh<\/strong><\/p>\n<p>  <\/p>\n<p><code>run.sh<\/code> \u044d\u0442\u043e \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a JMeter&#8217;a \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <code>files<\/code>.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0441\u043a\u0440\u0438\u043f\u0442 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0442\u0435\u0441\u0442\u044b, \u0442\u0430\u043a \u0447\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u043e\u0434 \u0441\u0432\u043e\u0438 \u043d\u0443\u0436\u0434\u044b.<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">#!\/bin\/bash  set -e  if [ -d &quot;\/jmeter\/reports\/files&quot; ] then     echo &quot;Directory \/jmeter\/reports\/files exist - OK&quot; else     echo &quot;Creating \/jmeter\/reports\/files directory&quot;     mkdir \/jmeter\/reports\/files fi  if [ -d &quot;\/jmeter\/reports\/dashboards&quot; ] then     echo &quot;Directory \/jmeter\/reports\/dashboards exist&quot; else     echo &quot;Creating \/jmeter\/reports\/dashboards directory&quot;     mkdir \/jmeter\/reports\/dashboards fi  echo &quot;*** JMeter START Tests ***&quot;  for item in $(ls -1 \/jmeter\/tests | grep jmx) do     echo &quot;*** Removing dashboard directory for $item&quot;     rm -rdf \/jmeter\/reports\/dashboards\/${item}*      echo &quot;*** Removing tests directory for $item&quot;     rm -rdf \/jmeter\/reports\/files\/${item}*      echo &quot;*** Testing a $item file ***&quot;     jmeter -n -t \/jmeter\/tests\/${item} -l \/jmeter\/reports\/files\/${item}-report.jtl -e -o \/jmeter\/reports\/dashboards\/${item}-dash done<\/code><\/pre>\n<p>  <\/p>\n<p><strong>is.yaml<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ tee is.yaml&lt;&lt;EOF apiVersion: image.openshift.io\/v1 kind: ImageStream metadata:   generation: 1   labels:     build: jmeter-master   name: jmeter-master EOF<\/code><\/pre>\n<p>  <\/p>\n<p><strong>bc.yaml<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ tee bc.yaml&lt;&lt;EOF apiVersion: build.openshift.io\/v1 kind: BuildConfig metadata:   name: jmeter-master spec:   failedBuildsHistoryLimit: 5   nodeSelector: null   output:     to:       kind: ImageStreamTag       name: 'jmeter-master:latest'   runPolicy: Serial   source:     binary: {}     type: Binary   strategy:     dockerStrategy:       from:         kind: ImageStreamTag         name: 'jmeter-base:latest'     type: Docker   successfulBuildsHistoryLimit: 5 EOF<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c <code>IS<\/code> \u0438 <code>BC<\/code> \u043e\u0431\u044a\u0435\u043a\u0442\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ oc create -f is.yaml -n perftest $ oc create -f bc.yaml -n perftest<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c <code>jmeter-master<\/code> \u043e\u0431\u0440\u0430\u0437:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ oc start-build jmeter-master -n perftest --from-dir=. --follow<\/code><\/pre>\n<p>  <\/p>\n<p><strong>Job<\/strong><\/p>\n<p>  <\/p>\n<p><code>Job<\/code>&#8216;\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 <code>OpenShift<\/code>&#8216;e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e <code>POD<\/code>&#8216;\u043e\u0432 \u0438 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b\/\u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f .<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ tee job.yaml&lt;&lt;EOF apiVersion: batch\/v1 kind: Job metadata:   name: jmeter-master   labels:     jobName: jmeter-master spec:   completions: 1   parallelism: 1   template:     metadata:       name: jmeter-master       labels:         jobName: jmeter-master     spec:       containers:         - name: jmeter-master           image: 172.30.1.1:5000\/perftest\/jmeter-master:latest           volumeMounts:             - mountPath: \/jmeter\/reports               name: jmeter-reports           imagePullPolicy: Always       volumes:         - name: jmeter-reports           persistentVolumeClaim:             claimName: jmeter-reports       restartPolicy: Never       terminationGracePeriodSeconds: 30 EOF<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442 <code>Job<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ oc create -f job.yaml -n perftest<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0441\u0442\u0430\u0442\u0443\u0441 \u0434\u0436\u043e\u0431\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ oc get jobs -n perftest NAME            DESIRED   SUCCESSFUL   AGE jmeter-master   1         1            5m<\/code><\/pre>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0443\u0434\u0430\u043b\u0438\u0442\u044c <code>Job<\/code> \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ oc delete jobs\/jmeter-master -n perftest --ignore-not-found=true<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"jenkins-pipeline\">Jenkins Pipeline<\/h3>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f. \u0415\u0449\u0435 \u0440\u0430\u0437 \u043f\u0440\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u0448\u0430\u0433\u0438:<\/p>\n<p>  <\/p>\n<ol>\n<li><code>git clone<\/code><\/li>\n<li><code>oc whoami -t<\/code><\/li>\n<li><code>oc start-build ...<\/code><\/li>\n<li><code>oc delete jobs\/jmeter-master<\/code><\/li>\n<li><code>oc create -f job.yaml -n perftest<\/code><\/li>\n<\/ol>\n<p>  <\/p>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f, \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 OpenShift <code>Job<\/code>&#8216;\u044b. <\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">#!groovy  pipeline {      agent any      stages {          stage('Start Notifications') {             steps {                 echo &quot;Sending Email Notification&quot;             }             post {                 always {                     echo &quot;STARTED - Performance Tests&quot;                     mail(to: 'username@srv.net', from: &quot;jenkins@srv.net&quot;, subject: &quot;START - Performance Tests&quot;,mimeType: &quot;text\/html&quot;, body: &quot;&lt;strong&gt;START - Performance Tests&lt;\/strong&gt;&lt;br \/&gt;&lt;br \/&gt;Project: Name of Project&lt;br \/&gt;Environment: PerfTest&lt;br \/&gt;Build number: ${env.BUILD_NUMBER}&lt;br \/&gt;Build URL:   ${env.BUILD_URL}&quot;                 }             }         }          stage('Git checkout') {             steps {                 ...             }         }          stage('Perf Tests') {             steps {                 script {                     sh '''                         OC_CMD1=&quot;oc login -u=username -p=PASS -n=perftest \\                         --server=https:\/\/...:8443&quot;                          $OC_CMD1                          OC_TOKEN=`oc whoami -t`                          OC_CMD2=&quot;oc --token=$OC_TOKEN --server=https:\/\/...:8443 \\                         start-build jmeter-master -n=perftest --from-dir=.\/master \\                         --follow=true&quot;                          OC_CMD3=&quot;oc --token=$OC_TOKEN --server=https:\/\/...:8443 \\                         delete jobs\/jmeter-master -n=perftest --ignore-not-found=true&quot;                          OC_CMD4=&quot;oc--token=$OC_TOKEN --server=https:\/\/...:8443 \\                         create -f .\/master\/job.yaml -n=perftest&quot;                          $OC_CMD2                         $OC_CMD3                         $OC_CMD4                     '''                 }             }         }          post {             failure {                 echo &quot;FAILED - Performance Tests&quot;                 mail(to: 'username@srv.net', from: &quot;jenkins@srv.net&quot;, subject: &quot;FAILED - Performance Tests&quot;,mimeType: &quot;text\/html&quot;, body: &quot;&lt;strong&gt;FAILED - Performance Tests&lt;\/strong&gt;&lt;br \/&gt;&lt;br \/&gt;Project: Name of Project&lt;br \/&gt;Environment: PerfTest&lt;br \/&gt;Build number: ${env.BUILD_NUMBER}&lt;br \/&gt;Build URL: ${env.BUILD_URL}&quot;                 }              success {                 echo &quot;SUCCESSED - Performance Tests&quot;                 mail(to: 'username@srv.net', from: &quot;jenkins@srv.net&quot;, subject: &quot;SUCCESSED - Performance Tests&quot;,mimeType: &quot;text\/html&quot;, body: &quot;&lt;strong&gt;SUCCESSED - Performance Tests&lt;\/strong&gt;&lt;br \/&gt;&lt;br \/&gt;Project: Name of Project&lt;br \/&gt;Environment: PerfTest&lt;br \/&gt;Build number: ${env.BUILD_NUMBER}&lt;br \/&gt;Build URL:   ${env.BUILD_URL}&quot;             }         }      } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a Pipeline \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u0443\u044e \u043f\u043e\u0447\u0442\u0443 <code>'username@srv.net<\/code> \u043e\u0442 <code>jenkins@srv.net<\/code>. <\/p>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u044f \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 <a href=\"http:\/\/jmeter-web.127.0.0.1.nip.io\/\">http:\/\/jmeter-web.127.0.0.1.nip.io\/<\/a> \u0443\u0432\u0438\u0434\u0438\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <code>files<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043e\u0442\u0447\u0435\u0442\u044b \u0442\u0435\u0441\u0442\u043e\u0432:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ux\/rq\/q_\/uxrqq__woz-inyo3xiw-nydmwpa.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 <code>ya.HTTP.Request.jmx-report.jtk<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,sentBytes,grpThreads,allThreads,URL,Latency,IdleTime,Connect 1597311456443,569,Yandex - HTTP Request,200,Ok,Thread Group 1-1,text,true,,59449,220,1,1,https:\/\/ya.ru\/,145,0,57 1597311456443,147,Yandex - HTTP Request-0,302,Found,Thread Group 1-1,,true,,478,110,1,1,http:\/\/ya.ru\/,145,0,57 1597311456592,420,Yandex - HTTP Request-1,200,Ok,Thread Group 1-1,text,true,,58971,110,1,1,https:\/\/ya.ru\/,370,0,259<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"zaklyuchenie\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u044b\u043b \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u043e\u0434\u0438\u043d \u0438\u0437 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432 JMeter \u0432 OpenShift \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438. \u0421\u0434\u0435\u043b\u0430\u043b\u0438 \u0432\u0441\u0435 \u0448\u0430\u0433\u0438 \u0432 \u0440\u0443\u0447\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043b\u0438 Jenkins Pipeline \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<p>  <\/p>\n<h3 id=\"istochniki-i-dokumentaciya\">\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 \u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/h3>\n<p>  <\/p>\n<ul>\n<li><a href=\"http:\/\/www.testautomationguru.com\/jmeter-distributed-load-testing-using-docker\/\">JMeter \u2013 Distributed Load Testing using Docker<\/a><\/li>\n<li><a href=\"https:\/\/eleanordare.com\/blog\/2017\/6\/14\/using-a-jenkins-pipeline-to-run-jmeter-tests-in-\">Running JMeter Tests in OpenShift from a Jenkins Pipeline<\/a>openshift<\/li>\n<li><a href=\"https:\/\/docs.openshift.com\/container-platform\/3.11\/architecture\/additional_concepts\/storage.html\">Persistent Storage<\/a><\/li>\n<li><a href=\"https:\/\/docs.openshift.com\/container-platform\/3.11\/architecture\/core_concepts\/builds_and_image_streams.html\">Builds and Image Streams<\/a><\/li>\n<\/ul>\n<\/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\/company\/tsystems\/blog\/515166\/\"> https:\/\/habr.com\/ru\/company\/tsystems\/blog\/515166\/<\/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\/company\/tsystems\/blog\/515166\/\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! <\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 JMeter \u0432 OpenShift&#8217;e \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Jenkins&#8217;a \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u0435\u043c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f (\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 <code>ImageStreams<\/code>, <code>BuildConfig<\/code>, <code>Job<\/code> \u0438 \u043f\u0440\u043e\u0447) \u0432 \u0440\u0443\u0447\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043f\u0438\u0448\u0438\u043c Jenkins Pipeline.<\/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-308479","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/308479","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=308479"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/308479\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=308479"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=308479"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=308479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}