Jetty Http2 connector for Jenkins

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Jetty Http2 connector for Jenkins

Olivier Lamy-2
Hi
I found a bit of time to finsih the changes to add http2 capability for Jenkins via Jetty.
So it's 3 prs to review:

To test this http2 connector you need to start jenkins adding alpn-boot in -Xbootclasspath (alpn is not available in java8 but should be in java9 but that's an other story :-) )

In my case, I run with such command:

/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/java -Xbootclasspath/p:/Users/olamy/repository/org/mortbay/jetty/alpn/alpn-boot/8.1.11.v20170118/alpn-boot-8.1.11.v20170118.jar -jar target/jenkins.war --http2Port=9090

Note the option --http2Port (using default home made generated ssl certificate)
The alpnboot version depends on your jdk version.
I usually find it looking at the mapping in the jetty pom: https://github.com/eclipse/jetty.project/blob/jetty-9.4.x/pom.xml

You will have profiles such:
    <profile>
      <id>8u121</id>
      <activation>
        <property>
          <name>java.version</name>
          <value>1.8.0_121</value>
        </property>
      </activation>
      <properties>
        <alpn.version>8.1.11.v20170118</alpn.version>
      </properties>
    </profile>

So you have the alpn.version to use.
Then get it:
or 
<a href="http://repo.maven.apache.org/maven2/org/mortbay/jetty/alpn/alpn-boot/${alpn.version}/alpn-boot-${alpn.version}.jar">http://repo.maven.apache.org/maven2/org/mortbay/jetty/alpn/alpn-boot/${alpn.version}/alpn-boot-${alpn.version}.jar
-Xbootclasspath/p:  only need to contain the downloaded jar.

Cheers
--

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAPoyBqTVLSs3MJWLFtWpCRLL_%2B%2Bst%2BW75eQOxpOXNGR46M8Vmg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Jetty Http2 connector for Jenkins

Oleg Nenashev
Even if alpn is not available by default, it will be a useful enhancement.
Let's see if we can land it till the next LTS baseline cut-off.

BR, Oleg

вторник, 11 июля 2017 г., 7:18:03 UTC+2 пользователь Olivier Lamy написал:
Hi
I found a bit of time to finsih the changes to add http2 capability for Jenkins via Jetty.
So it's 3 prs to review:
* winstone: <a href="https://github.com/jenkinsci/winstone/pull/39" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fwinstone%2Fpull%2F39\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNE9xzI5hss70hL9pQEaoB92z02yYg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fwinstone%2Fpull%2F39\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNE9xzI5hss70hL9pQEaoB92z02yYg&#39;;return true;">https://github.com/jenkinsci/winstone/pull/39
* extras-executable-war: <a href="https://github.com/jenkinsci/extras-executable-war/pull/11" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fextras-executable-war%2Fpull%2F11\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF1HK-GaZdh2quxBmMTFKqJnmv7Mw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fextras-executable-war%2Fpull%2F11\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF1HK-GaZdh2quxBmMTFKqJnmv7Mw&#39;;return true;">https://github.com/jenkinsci/extras-executable-war/pull/11
* jenkins: <a href="https://github.com/jenkinsci/jenkins/pull/2937" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fjenkins%2Fpull%2F2937\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHnMOTFCmhv2o2_uohPehxuqW5OKA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjenkinsci%2Fjenkins%2Fpull%2F2937\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHnMOTFCmhv2o2_uohPehxuqW5OKA&#39;;return true;">https://github.com/jenkinsci/jenkins/pull/2937

To test this http2 connector you need to start jenkins adding alpn-boot in -Xbootclasspath (alpn is not available in java8 but should be in java9 but that's an other story :-) )

In my case, I run with such command:

/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/java -Xbootclasspath/p:/Users/olamy/repository/org/mortbay/jetty/alpn/alpn-boot/8.1.11.v20170118/alpn-boot-8.1.11.v20170118.jar -jar target/jenkins.war --http2Port=9090

Note the option --http2Port (using default home made generated ssl certificate)
The alpnboot version depends on your jdk version.
I usually find it looking at the mapping in the jetty pom: <a href="https://github.com/eclipse/jetty.project/blob/jetty-9.4.x/pom.xml" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Feclipse%2Fjetty.project%2Fblob%2Fjetty-9.4.x%2Fpom.xml\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG6czhBT_uXUCGO94WDltVGK0gO5A&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Feclipse%2Fjetty.project%2Fblob%2Fjetty-9.4.x%2Fpom.xml\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG6czhBT_uXUCGO94WDltVGK0gO5A&#39;;return true;">https://github.com/eclipse/jetty.project/blob/jetty-9.4.x/pom.xml

You will have profiles such:
    <profile>
      <id>8u121</id>
      <activation>
        <property>
          <name>java.version</name>
          <value>1.8.0_121</value>
        </property>
      </activation>
      <properties>
        <alpn.version>8.1.11.v20170118</alpn.version>
      </properties>
    </profile>

So you have the alpn.version to use.
Then get it:
<a href="http://repo.maven.apache.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.1.9.v20160720/alpn-boot-8.1.9.v20160720.jar" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frepo.maven.apache.org%2Fmaven2%2Forg%2Fmortbay%2Fjetty%2Falpn%2Falpn-boot%2F8.1.9.v20160720%2Falpn-boot-8.1.9.v20160720.jar\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHVD24I_c2cwkaen8ZFtBh8ttVE5Q&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frepo.maven.apache.org%2Fmaven2%2Forg%2Fmortbay%2Fjetty%2Falpn%2Falpn-boot%2F8.1.9.v20160720%2Falpn-boot-8.1.9.v20160720.jar\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHVD24I_c2cwkaen8ZFtBh8ttVE5Q&#39;;return true;">http://repo.maven.apache.org/maven2/org/mortbay/jetty/alpn/alpn-boot/8.1.9.v20160720/alpn-boot-8.1.9.v20160720.jar
or 
<a href="http://repo.maven.apache.org/maven2/org/mortbay/jetty/alpn/alpn-boot/$%7Balpn.version%7D/alpn-boot-$%7Balpn.version%7D.jar" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frepo.maven.apache.org%2Fmaven2%2Forg%2Fmortbay%2Fjetty%2Falpn%2Falpn-boot%2F%24%257Balpn.version%257D%2Falpn-boot-%24%257Balpn.version%257D.jar\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFOOA__tkMZGRFDaToR5Ksy51ihNA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frepo.maven.apache.org%2Fmaven2%2Forg%2Fmortbay%2Fjetty%2Falpn%2Falpn-boot%2F%24%257Balpn.version%257D%2Falpn-boot-%24%257Balpn.version%257D.jar\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFOOA__tkMZGRFDaToR5Ksy51ihNA&#39;;return true;">http://repo.maven.apache.org/maven2/org/mortbay/jetty/alpn/alpn-boot/${alpn.version}/alpn-boot-${alpn.version}.jar
-Xbootclasspath/p:  only need to contain the downloaded jar.

Cheers
--
Olivier Lamy
<a href="http://twitter.com/olamy" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Ftwitter.com%2Folamy\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG3_k_gv9cUwvcyUBPJ8SxlVlyHIA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Ftwitter.com%2Folamy\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG3_k_gv9cUwvcyUBPJ8SxlVlyHIA&#39;;return true;">http://twitter.com/olamy | <a href="http://linkedin.com/in/olamy" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Flinkedin.com%2Fin%2Folamy\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFW3LvCBS5n8T5Sdb3_deNvChR2yQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Flinkedin.com%2Fin%2Folamy\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFW3LvCBS5n8T5Sdb3_deNvChR2yQ&#39;;return true;">http://linkedin.com/in/olamy

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/9d92fdca-7b07-4b41-83d7-23e187f04be9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Jetty Http2 connector for Jenkins

Olivier Lamy-2
Hi
Once all prs are merged I will improve the wiki page here [1] to add http2 parameter and explain how to include alpn.

Cheers
Olivier


On 14 July 2017 at 02:35, Oleg Nenashev <[hidden email]> wrote:
Even if alpn is not available by default, it will be a useful enhancement.
Let's see if we can land it till the next LTS baseline cut-off.

BR, Oleg

вторник, 11 июля 2017 г., 7:18:03 UTC+2 пользователь Olivier Lamy написал:
Hi
I found a bit of time to finsih the changes to add http2 capability for Jenkins via Jetty.
So it's 3 prs to review:

To test this http2 connector you need to start jenkins adding alpn-boot in -Xbootclasspath (alpn is not available in java8 but should be in java9 but that's an other story :-) )

In my case, I run with such command:

/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/java -Xbootclasspath/p:/Users/olamy/repository/org/mortbay/jetty/alpn/alpn-boot/8.1.11.v20170118/alpn-boot-8.1.11.v20170118.jar -jar target/jenkins.war --http2Port=9090

Note the option --http2Port (using default home made generated ssl certificate)
The alpnboot version depends on your jdk version.
I usually find it looking at the mapping in the jetty pom: https://github.com/eclipse/jetty.project/blob/jetty-9.4.x/pom.xml

You will have profiles such:
    <profile>
      <id>8u121</id>
      <activation>
        <property>
          <name>java.version</name>
          <value>1.8.0_121</value>
        </property>
      </activation>
      <properties>
        <alpn.version>8.1.11.v20170118</alpn.version>
      </properties>
    </profile>

So you have the alpn.version to use.
Then get it:
or 
-Xbootclasspath/p:  only need to contain the downloaded jar.

Cheers
--

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/9d92fdca-7b07-4b41-83d7-23e187f04be9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAPoyBqQcR3L%2BY23%3DUZkt9uEw_m%2BtBfWPv3L--Ea00StDaVBaOQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...