globally configure make to use the available cores

pull/7102/head
Nils Dijk 2023-10-09 12:07:25 +00:00
parent c072915726
commit b76c873844
No known key found for this signature in database
GPG Key ID: CA1177EF9434F241
3 changed files with 5 additions and 2 deletions

View File

@ -52,6 +52,9 @@ RUN useradd -ms /bin/bash citus \
WORKDIR /home/citus WORKDIR /home/citus
USER citus USER citus
# run all make commands with the number of cores available
RUN echo "export MAKEFLAGS=\"-j \$(nproc)\"" >> "/home/citus/.bashrc"
RUN git clone --branch v1.3.2 --depth 1 https://github.com/theory/pgenv.git .pgenv RUN git clone --branch v1.3.2 --depth 1 https://github.com/theory/pgenv.git .pgenv
COPY --chown=citus:citus pgenv/config/ .pgenv/config/ COPY --chown=citus:citus pgenv/config/ .pgenv/config/
ENV PATH="/home/citus/.pgenv/bin:${PATH}" ENV PATH="/home/citus/.pgenv/bin:${PATH}"

View File

@ -1,4 +1,4 @@
PGENV_MAKE_OPTIONS=(-sj8) PGENV_MAKE_OPTIONS=(-s)
PGENV_CONFIGURE_OPTIONS=( PGENV_CONFIGURE_OPTIONS=(
--enable-debug --enable-debug

View File

@ -31,7 +31,7 @@ This will create an isolated Workspace in vscode, complete with all tools requir
To quickly start we suggest splitting your terminal once to have two shells. The left one in the `/workspaces/citus`, the second one changed to `/data`. The left terminal will be used to interact with the project, the right one with a testing cluster. To quickly start we suggest splitting your terminal once to have two shells. The left one in the `/workspaces/citus`, the second one changed to `/data`. The left terminal will be used to interact with the project, the right one with a testing cluster.
To get citus installed from source we run `make install -sj8` in the first terminal, adjust `j8` to suite to the number of cores you have available. Once installed you can start a Citus cluster in the second terminal via `citus_dev make citus`. The cluster will run in the background, and can be interacted with via `citus_dev`. To get an overview of the available commands. To get citus installed from source we run `make install -s` in the first terminal. Once installed you can start a Citus cluster in the second terminal via `citus_dev make citus`. The cluster will run in the background, and can be interacted with via `citus_dev`. To get an overview of the available commands.
With the Citus cluster running you can connect to the coordinator in the first terminal via `psql -p9700`. Because the coordinator is the most common entrypoint the `PGPORT` environment is set accordingly, so a simple `psql` will connect directly to the coordinator. With the Citus cluster running you can connect to the coordinator in the first terminal via `psql -p9700`. Because the coordinator is the most common entrypoint the `PGPORT` environment is set accordingly, so a simple `psql` will connect directly to the coordinator.