Skip to content

Commit

Permalink
Merge pull request #1263 from tigrisdata/main
Browse files Browse the repository at this point in the history
Beta release
  • Loading branch information
JigarJoshi authored Jun 6, 2023
2 parents 1aaf908 + 53ba9fe commit 50a70d3
Show file tree
Hide file tree
Showing 41 changed files with 1,324 additions and 255 deletions.
20 changes: 3 additions & 17 deletions .github/workflows/test-docker-local-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ on:
- docker/Dockerfile.local
- scripts/install_local_deps.sh
- .github/workflows/test-docker-local-image.yaml
merge_group:
paths:
- docker/Dockerfile.local
- scripts/install_local_deps.sh
- .github/workflows/test-docker-local-image.yaml
- scripts/test_docker_local.sh
push:
branches:
- main
Expand All @@ -24,15 +20,5 @@ jobs:
with:
submodules: true

- name: Build local image
run: make docker-local

- name: Run local image
run: docker run -d -p 8081:8081 tigris_local

- name: Run CLI tests
run: |
curl -sSL https://tigris.dev/cli-linux | tar -xz -C .
TIGRIS_URL=localhost:8081 ./tigris ping --timeout 20s
TIGRIS_TEST_PORT=8081 TIGRIS_CLI_TEST_FAST=1 noup=1 /bin/bash test/v1/cli/main.sh
- name: Run tests
run: SUDO=sudo /bin/bash scripts/test_docker_local.sh
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ local_test: generate lint
local_run: server
$(DOCKER_COMPOSE) up --no-build --detach tigris_search tigris_db2 tigris_cache
fdbcli -C ./test/config/fdb.cluster --exec "configure new single memory" || true
./server/service -c config/server.dev.yaml
./server/service -c test/config/server.dev.yaml

# Start local instance with server running on the host in realtime mode.
# This is useful for debugging the server. The process is attachable from IDE.
Expand Down
3 changes: 2 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ RUN groupadd -r tigris && useradd -r -s /bin/false -g tigris tigris
RUN mkdir -p /server /etc/tigrisdata/tigris /etc/foundationdb/

ARG BUILD_PROFILE=""
ARG CONF_PATH=""

COPY --from=build /build/server/service /server/service
COPY --from=build /build/config/server${BUILD_PROFILE}.yaml /etc/tigrisdata/tigris
COPY --from=build /build/${CONF_PATH}config/server${BUILD_PROFILE}.yaml /etc/tigrisdata/tigris
COPY --from=build /usr/lib/libfdb_c.so /usr/lib/libfdb_c.so
COPY --from=build /usr/bin/fdbcli /usr/bin/fdbcli

Expand Down
9 changes: 6 additions & 3 deletions docker/Dockerfile.local
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ RUN go mod download
COPY . /build
RUN --mount=type=cache,target=/root/.cache/go-build rm -f server/service && make bins

RUN go install -tags tigris_http,tigris_grpc -ldflags "-w -s" github.com/tigrisdata/gotrue@latest

FROM ubuntu:20.04 AS server

RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
ca-certificates openssh-client jq \
curl && apt-get clean

COPY scripts/install_local_docker_deps.sh /tmp/
Expand All @@ -35,15 +37,16 @@ RUN rm -rf /etc/apt/* /var/lib/dpkg/* /var/lib/apt/*
# Setup an unprivileged user
RUN groupadd -r tigris && useradd -r -s /bin/false -g tigris tigris

RUN mkdir -p /server /etc/tigrisdata/tigris /etc/foundationdb /var/lib/foundationdb/logs
RUN mkdir -p /server /etc/tigrisdata/tigris

COPY --from=build /build/server/service /server/service
COPY --from=build /build/config/server.yaml /etc/tigrisdata/tigris
COPY --from=build /usr/lib/libfdb_c.so /usr/lib/libfdb_c.so
COPY --from=build /usr/bin/fdbcli /usr/bin/fdbcli
COPY --from=build /root/go/bin/gotrue /usr/bin/gotrue

RUN chown -R tigris:tigris /server /etc/tigrisdata/tigris
COPY docker/service-local.sh /server/service.sh
COPY scripts/service-local.sh /server/service.sh

EXPOSE 8081

Expand Down
61 changes: 0 additions & 61 deletions docker/service-local.sh

This file was deleted.

9 changes: 6 additions & 3 deletions scripts/install_local_docker_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.


set -ex

D=/var/lib/tigris

ARCH=$(dpkg --print-architecture)

case "${ARCH}" in
Expand Down Expand Up @@ -69,5 +70,7 @@ curl --create-dirs -Lo "$TS_PACKAGE_PATH" "https://dl.typesense.org/releases/${T
dpkg --unpack "$TS_PACKAGE_PATH"
rm -f /var/lib/dpkg/info/typesense-server.postinst
dpkg --configure typesense-server
sed -i "s/\$API_KEY/ts_dev_key/g" /etc/typesense/typesense-server.ini && \
rm -f "$TS_PACKAGE_PATH"
rm -rf /var/lib/typesense /etc/typesense

mkdir $D

Loading

0 comments on commit 50a70d3

Please sign in to comment.