Skip to content

Commit

Permalink
initial setup
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterOdin committed Nov 17, 2023
1 parent cd742f7 commit 47c8d41
Show file tree
Hide file tree
Showing 9 changed files with 89 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Docker Build

on:
workflow_dispatch:
inputs:
prestoVersion:
description: 'Presto version to build'
required: true
type: string

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/popsql/prestodb-sandbox
tags: |
type=raw,value=${{ inputs.prestoVersion }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
28 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM amazoncorretto:11-alpine

EXPOSE 8080

ENV PRESTO_HOME=/opt/presto-server
WORKDIR /opt/presto-server

CMD ["/bin/sh", "-c", "./bin/launcher run"]

ARG PRESTO_VERSION=0.281
ARG PRESTO_PKG=presto-server-${PRESTO_VERSION}.tar.gz
ARG PRESTO_PKG_URL=https://repo1.maven.org/maven2/com/facebook/presto/presto-server/${PRESTO_VERSION}/${PRESTO_PKG}

RUN apk add --no-cache \
curl \
gzip \
less \
tar \
&& curl -o ${PRESTO_PKG} ${PRESTO_PKG_URL} \
&& tar -zxf ${PRESTO_PKG} \
&& rm -rf ${PRESTO_PKG} \
&& mv presto-server-${PRESTO_VERSION} ${PRESTO_HOME} \
&& mkdir -p ${PRESTO_HOME}/etc \
&& mkdir -p ${PRESTO_HOME}/etc/catalog \
&& mkdir -p /var/lib/presto/data \
&& apk del curl tar

ADD etc etc/
1 change: 1 addition & 0 deletions etc/catalog/jmx.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
connector.name=jmx
1 change: 1 addition & 0 deletions etc/catalog/memory.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
connector.name=memory
1 change: 1 addition & 0 deletions etc/catalog/tpcds.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
connector.name=tpcds
1 change: 1 addition & 0 deletions etc/catalog/tpch.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
connector.name=tpch
5 changes: 5 additions & 0 deletions etc/config.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
coordinator=true
node-scheduler.include-coordinator=true
http-server.http.port=8080
discovery-server.enabled=true
discovery.uri=http://localhost:8080
9 changes: 9 additions & 0 deletions etc/jvm.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-server
-Xmx1G
-XX:+UseG1GC
-XX:G1HeapRegionSize=32M
-XX:+UseGCOverheadLimit
-XX:+ExplicitGCInvokesConcurrent
-XX:+HeapDumpOnOutOfMemoryError
-XX:+ExitOnOutOfMemoryError
-Djdk.attach.allowAttachSelf=true
2 changes: 2 additions & 0 deletions etc/node.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node.environment=test
node.data-dir=/var/lib/presto/datanode.id=aea65cc99403

0 comments on commit 47c8d41

Please sign in to comment.