Initial commit
This commit is contained in:
commit
be1576f26c
67
.github/workflows/maven-publish.yml
vendored
Normal file
67
.github/workflows/maven-publish.yml
vendored
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
|
||||||
|
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path
|
||||||
|
|
||||||
|
name: Maven Package
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * 0' # weekly
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- { os: ubuntu-20.04, arch: "linux/amd64" }
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: "recursive"
|
||||||
|
- name: Setup variables
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
# ====== Variables
|
||||||
|
export REVISION=${{ github.run_number }}
|
||||||
|
|
||||||
|
echo "REVISION=$REVISION" >> $GITHUB_ENV
|
||||||
|
- name: Set up JDK 17
|
||||||
|
if: github.ref == 'refs/heads/master'
|
||||||
|
uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: 17
|
||||||
|
server-id: mchv-release-distribution
|
||||||
|
server-username: MAVEN_USERNAME
|
||||||
|
server-password: MAVEN_PASSWORD
|
||||||
|
env:
|
||||||
|
MAVEN_USERNAME: ${{ secrets.MCHV_USERNAME }}
|
||||||
|
MAVEN_PASSWORD: ${{ secrets.MCHV_TOKEN }}
|
||||||
|
# - name: Deploy lucene to Maven (Release)
|
||||||
|
# if: github.ref == 'refs/heads/master'
|
||||||
|
# shell: bash
|
||||||
|
# run: |
|
||||||
|
# cd lucene
|
||||||
|
# ./gradlew assemble -x test -x errorprone publishToMavenLocal -x signJarsPublication
|
||||||
|
# mvn deploy:deploy-file -DgroupId=org.lucene -DartifactId=lucene-core -Dversion=9.0.0-SNAPSHOT -DgeneratePom=true -Dpackaging=jar -DrepositoryId=mchv-release-distribution -Durl=https://mvn.mchv.eu/repository/mchv-snapshot -Dfile=lucene/core/build/libs/lucene-core-9.0.0-SNAPSHOT.jar -Djavadoc=lucene/core/build/libs/lucene-core-9.0.0-SNAPSHOT-javadoc.jar -Dsources=lucene/core/build/libs/lucene-core-9.0.0-SNAPSHOT-sources.jar
|
||||||
|
# mvn deploy:deploy-file -DgroupId=org.lucene -DartifactId=lucene-join -Dversion=9.0.0-SNAPSHOT -DgeneratePom=true -Dpackaging=jar -DrepositoryId=mchv-release-distribution -Durl=https://mvn.mchv.eu/repository/mchv-snapshot -Dfile=lucene/join/build/libs/lucene-join-9.0.0-SNAPSHOT.jar -Djavadoc=lucene/join/build/libs/lucene-join-9.0.0-SNAPSHOT-javadoc.jar -Dsources=lucene/join/build/libs/lucene-join-9.0.0-SNAPSHOT-sources.jar
|
||||||
|
# mvn deploy:deploy-file -DgroupId=org.lucene -DartifactId=lucene-analysis-common -Dversion=9.0.0-SNAPSHOT -DgeneratePom=true -Dpackaging=jar -DrepositoryId=mchv-release-distribution -Durl=https://mvn.mchv.eu/repository/mchv-snapshot -Dfile=lucene/analysis/common/build/libs/lucene-analysis-common-9.0.0-SNAPSHOT.jar -Djavadoc=lucene/analysis/common/build/libs/lucene-analysis-common-9.0.0-SNAPSHOT-javadoc.jar -Dsources=lucene/analysis/common/build/libs/lucene-analysis-common-9.0.0-SNAPSHOT-sources.jar
|
||||||
|
# mvn deploy:deploy-file -DgroupId=org.lucene -DartifactId=lucene-analysis-icu -Dversion=9.0.0-SNAPSHOT -DgeneratePom=true -Dpackaging=jar -DrepositoryId=mchv-release-distribution -Durl=https://mvn.mchv.eu/repository/mchv-snapshot -Dfile=lucene/analysis/icu/build/libs/lucene-analysis-icu-9.0.0-SNAPSHOT.jar -Djavadoc=lucene/analysis/icu/build/libs/lucene-analysis-icu-9.0.0-SNAPSHOT-javadoc.jar -Dsources=lucene/analysis/icu/build/libs/lucene-analysis-icu-9.0.0-SNAPSHOT-sources.jar
|
||||||
|
# mvn deploy:deploy-file -DgroupId=org.lucene -DartifactId=lucene-codecs -Dversion=9.0.0-SNAPSHOT -DgeneratePom=true -Dpackaging=jar -DrepositoryId=mchv-release-distribution -Durl=https://mvn.mchv.eu/repository/mchv-snapshot -Dfile=lucene/codecs/build/libs/lucene-codecs-9.0.0-SNAPSHOT.jar -Djavadoc=lucene/codecs/build/libs/lucene-codecs-9.0.0-SNAPSHOT-javadoc.jar -Dsources=lucene/codecs/build/libs/lucene-codecs-9.0.0-SNAPSHOT-sources.jar
|
||||||
|
# mvn deploy:deploy-file -DgroupId=org.lucene -DartifactId=lucene-backward-codecs -Dversion=9.0.0-SNAPSHOT -DgeneratePom=true -Dpackaging=jar -DrepositoryId=mchv-release-distribution -Durl=https://mvn.mchv.eu/repository/mchv-snapshot -Dfile=lucene/backward-codecs/build/libs/lucene-backward-codecs-9.0.0-SNAPSHOT.jar -Djavadoc=lucene/backward-codecs/build/libs/lucene-backward-codecs-9.0.0-SNAPSHOT-javadoc.jar -Dsources=lucene/backward-codecs/build/libs/lucene-backward-codecs-9.0.0-SNAPSHOT-sources.jar
|
||||||
|
# mvn deploy:deploy-file -DgroupId=org.lucene -DartifactId=lucene-queries -Dversion=9.0.0-SNAPSHOT -DgeneratePom=true -Dpackaging=jar -DrepositoryId=mchv-release-distribution -Durl=https://mvn.mchv.eu/repository/mchv-snapshot -Dfile=lucene/queries/build/libs/lucene-queries-9.0.0-SNAPSHOT.jar -Djavadoc=lucene/queries/build/libs/lucene-queries-9.0.0-SNAPSHOT-javadoc.jar -Dsources=lucene/queries/build/libs/lucene-queries-9.0.0-SNAPSHOT-sources.jar
|
||||||
|
# mvn deploy:deploy-file -DgroupId=org.lucene -DartifactId=lucene-misc -Dversion=9.0.0-SNAPSHOT -DgeneratePom=true -Dpackaging=jar -DrepositoryId=mchv-release-distribution -Durl=https://mvn.mchv.eu/repository/mchv-snapshot -Dfile=lucene/misc/build/libs/lucene-misc-9.0.0-SNAPSHOT.jar -Djavadoc=lucene/misc/build/libs/lucene-misc-9.0.0-SNAPSHOT-javadoc.jar -Dsources=lucene/misc/build/libs/lucene-misc-9.0.0-SNAPSHOT-sources.jar
|
||||||
|
# env:
|
||||||
|
# MAVEN_USERNAME: ${{ secrets.MCHV_USERNAME }}
|
||||||
|
# MAVEN_PASSWORD: ${{ secrets.MCHV_TOKEN }}
|
||||||
|
- name: Deploy to Maven (Release)
|
||||||
|
if: github.ref == 'refs/heads/master'
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "REVISION: $REVISION"
|
||||||
|
|
||||||
|
mvn -B -Drevision=${REVISION} -Ddbengine.ci=true clean deploy
|
||||||
|
env:
|
||||||
|
MAVEN_USERNAME: ${{ secrets.MCHV_USERNAME }}
|
||||||
|
MAVEN_PASSWORD: ${{ secrets.MCHV_TOKEN }}
|
@ -0,0 +1,49 @@
|
|||||||
|
package it.cavallium.dbengine.database.remote;
|
||||||
|
|
||||||
|
import io.netty.handler.ssl.ClientAuth;
|
||||||
|
import io.netty.incubator.codec.quic.InsecureQuicTokenHandler;
|
||||||
|
import io.netty.incubator.codec.quic.QuicSslContext;
|
||||||
|
import io.netty.incubator.codec.quic.QuicSslContextBuilder;
|
||||||
|
import it.cavallium.dbengine.rpc.current.data.ServerBoundRequest;
|
||||||
|
import java.io.File;
|
||||||
|
import java.net.URI;
|
||||||
|
import java.net.URISyntaxException;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
public class QuicServer {
|
||||||
|
|
||||||
|
public static void main(String[] args) throws URISyntaxException {
|
||||||
|
String keyFileLocation = System.getProperty("it.cavalliumdb.keyFile", null);
|
||||||
|
String keyFilePassword = System.getProperty("it.cavalliumdb.keyPassword", null);
|
||||||
|
String certFileLocation = System.getProperty("it.cavalliumdb.certFile", null);
|
||||||
|
String clientCertsLocation = System.getProperty("it.cavalliumdb.clientCerts", null);
|
||||||
|
String bindAddress = Objects.requireNonNull(System.getProperty("it.cavalliumdb.bindAddress", null), "Empty bind address");
|
||||||
|
var bindURI = new URI("inet://" + bindAddress);
|
||||||
|
|
||||||
|
QuicSslContext sslContext = QuicSslContextBuilder
|
||||||
|
.forServer(new File(keyFileLocation), keyFilePassword, new File(certFileLocation))
|
||||||
|
.trustManager(new File(clientCertsLocation))
|
||||||
|
.applicationProtocols("db/0.9")
|
||||||
|
.clientAuth(ClientAuth.REQUIRE)
|
||||||
|
.build();
|
||||||
|
var qs = reactor.netty.incubator.quic.QuicServer
|
||||||
|
.create()
|
||||||
|
.port(bindURI.getPort())
|
||||||
|
.host(bindURI.getHost())
|
||||||
|
.tokenHandler(InsecureQuicTokenHandler.INSTANCE)
|
||||||
|
.secure(sslContext)
|
||||||
|
.handleStream((in, out) -> in
|
||||||
|
.withConnection(conn -> conn.addHandler(new RPCServerBoundRequestDecoder()))
|
||||||
|
.receiveObject()
|
||||||
|
.doFirst(() -> {
|
||||||
|
System.out.println("###################################Stream created");
|
||||||
|
})
|
||||||
|
.cast(ServerBoundRequest.class)
|
||||||
|
.log()
|
||||||
|
.then()
|
||||||
|
);
|
||||||
|
qs.warmup().block();
|
||||||
|
var conn = qs.bindNow();
|
||||||
|
conn.onDispose().block();
|
||||||
|
}
|
||||||
|
}
|
0
src/main/resources/log4j2.xml
Normal file
0
src/main/resources/log4j2.xml
Normal file
Loading…
x
Reference in New Issue
Block a user