Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Add tldr section for coredb contributors #22172

Merged
merged 53 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
fbbfefe
refactor: reword update/install packages
jaki Feb 23, 2023
0933830
refactor: add "using the following command"
jaki Feb 23, 2023
22fb457
refactor: split yb_release command from output
jaki Feb 23, 2023
e91cb8f
refactor: mv ninja to include
jaki Feb 23, 2023
8ecb8ca
refactor: reword to "Install" and "as follows"
jaki Feb 23, 2023
a58586e
refactor: mv ccache to includes
jaki Feb 23, 2023
ec198e3
refactor: reword "Install and configure"...
jaki Feb 23, 2023
35b88a0
refactor: use numbered list for release package
jaki Feb 23, 2023
acf790a
refactor: mv /opt/yb-build section higher
jaki Feb 23, 2023
3a4aaab
refactor: mv optional sections lower
jaki Feb 23, 2023
021ecd2
refactor: reword Java install instruction
jaki Feb 23, 2023
20482d9
refactor: use USER instead of whoami
jaki Feb 23, 2023
8d4c7d5
refactor: use dnf for alma 8
jaki Feb 24, 2023
56c90da
feat: add TLDR section for alma
jaki Feb 24, 2023
7a64c9b
feat: improve TLDR to auto-detect shell
jaki Feb 24, 2023
580de7a
style: add newline for separation
jaki Feb 24, 2023
23d5a13
feat: add TLDR section for centos
jaki Mar 17, 2023
3e8a87c
feat: add TLDR section for ubuntu
jaki Mar 18, 2023
a27fd61
Merge branch 'master' into docs-coredb-revamp
jaki Mar 18, 2023
354ef15
Merge branch 'docs-coredb-revamp' into docs-coredb-tldr
jaki Mar 21, 2023
3b1d9ca
fix: add missing instructions to ubuntu TLDR
jaki Mar 21, 2023
d8db185
Merge branch 'master' into docs-coredb-tldr
jaki Dec 22, 2023
746a0f4
fix: handle ubuntu golang versions
jaki Dec 22, 2023
fa199e3
refactor: reorg ubuntu instructions
jaki Dec 22, 2023
16200d8
refactor: do same for almalinux, centos
jaki Dec 22, 2023
94e0262
fix: add missing "Detailed instructions" heading
jaki Dec 22, 2023
0adb68e
fix: sort almalinux packages
jaki Dec 22, 2023
4daa11b
feat: add assumptions to tldr
jaki Dec 22, 2023
0d7f02b
refactor: add gcc to ubuntu tldr
jaki Dec 22, 2023
c27a585
refactor: fix shell vars warning
jaki Dec 22, 2023
cfacaa3
style: s/SHELLRC/shellrc/g
jaki Dec 22, 2023
7bce825
fix: add missing ;; in case
jaki Dec 22, 2023
0abcedf
fix: leave shellrc to user responsibility
jaki Dec 22, 2023
ad446ab
fix: typo verison
jaki Dec 22, 2023
60bfc5d
fix: ${1:~/.bashrc} doesn't work outside script
jaki Dec 22, 2023
50ae54c
fix: pass --clang17 for ubuntu 23.04
jaki Dec 22, 2023
dbcc33a
fix: put repo-changing package installs ahead
jaki Dec 26, 2023
0127701
fix: gcc version for ubuntu 20.04
jaki Dec 26, 2023
3955d4c
fix: put repo-changing package ahead for alma
jaki Dec 27, 2023
e9a6c7d
Merge branch 'master' into docs-coredb-tldr
jaki Apr 5, 2024
d597036
fix: ubuntu and yugabyted-ui Go version req
jaki Apr 13, 2024
f2c57cb
style: reword
jaki Apr 13, 2024
0abc611
Merge branch 'docs-contribute-ubuntu-go' into docs-coredb-tldr
jaki Apr 13, 2024
a9a2fd6
fix: update ubuntu changes merged in
jaki Apr 13, 2024
a43326e
Merge branch 'master' into docs-coredb-tldr
jaki Apr 17, 2024
a6325dd
Merge branch 'master' into docs-coredb-tldr
jaki Apr 22, 2024
8683ffe
fix: add patchelf to tldr
jaki Apr 22, 2024
e5a62d2
fix: add articles
jaki Apr 26, 2024
81ef903
wip: style: try to make text small
jaki Apr 26, 2024
f32512c
Revert "wip: style: try to make text small"
jaki Apr 26, 2024
a4a764f
refactor: reword tldr
jaki May 3, 2024
d0a8c23
fix: avoid heading level 1
jaki May 8, 2024
7cc5695
Merge branch 'master' into docs-coredb-tldr
jaki May 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -50,6 +50,53 @@ AlmaLinux 8 is the recommended Linux development platform for YugabyteDB.

{{< /note >}}

# TLDR
jasonyb marked this conversation as resolved.
Show resolved Hide resolved
jasonyb marked this conversation as resolved.
Show resolved Hide resolved

{{% readfile "includes/tldr.md" %}}

```sh
# Modify to your preference:
shellrc=~/.bashrc

sudo dnf update -y
sudo dnf groupinstall -y 'Development Tools'
sudo dnf -y install epel-release
packages=(
ccache
cmake3
gcc-toolset-11
gcc-toolset-11-libatomic-devel
golang
java-1.8.0-openjdk
libatomic
maven
npm
patchelf
python39
rsync
)
sudo dnf -y install "${packages[@]}"
sudo alternatives --set python3 /usr/bin/python3.9
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some systems may use Python 3.10 or 3.11. Can we remove the hard-coded 3.9?

Copy link
Contributor Author

@jaki jaki May 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no python310 or python311 package yet on Almalinux 8 as far as I can tell. Also, this is based off of the python section below, so changing both copies of this could be considered out of scope of this PR.

latest_zip_url=$(curl -Ls "https://api.github.com/repos/ninja-build/ninja/releases/latest" \
| grep browser_download_url | grep ninja-linux.zip | cut -d \" -f 4)
curl -Ls "$latest_zip_url" | zcat | sudo tee /usr/local/bin/ninja >/dev/null
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of piping output to /dev/null, maybe pass the -s / --silent option to curl?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-s is used. sudo tee is piping to /dev/null

sudo chmod +x /usr/local/bin/ninja
sudo mkdir /opt/yb-build

# If you'd like to use an unprivileged user for development, manually
# run/modify instructions from here onwards (change $USER, make sure shell
# variables are set appropriately when switching users).
sudo chown "$USER" /opt/yb-build
source <(echo 'export YB_CCACHE_DIR="$HOME/.cache/yb_ccache"' \
| tee -a "$shellrc")

git clone https://github.com/yugabyte/yugabyte-db
cd yugabyte-db
./yb_release
```

# Detailed instructions
jasonyb marked this conversation as resolved.
Show resolved Hide resolved

## Install necessary packages
jasonyb marked this conversation as resolved.
Show resolved Hide resolved

Update and install basic development packages as follows:
Expand Down
Expand Up @@ -52,6 +52,57 @@ AlmaLinux 8 is the recommended Linux development platform for YugabyteDB.

The following instructions are for CentOS 7.

# TLDR
jasonyb marked this conversation as resolved.
Show resolved Hide resolved

{{% readfile "includes/tldr.md" %}}

```sh
# Modify to your preference:
shellrc=~/.bashrc

sudo yum update -y
sudo yum groupinstall -y 'Development Tools'
sudo yum install -y centos-release-scl epel-release
packages=(
ccache
cmake3
devtoolset-11
devtoolset-11-libatomic-devel
git
golang
java-1.8.0-openjdk
libatomic
ninja-build
npm
patchelf
rh-maven35
rh-python38
rsync
which
)
sudo yum install -y "${packages[@]}"
sudo ln -s /usr/bin/cmake3 /usr/local/bin/cmake
sudo ln -s /usr/bin/ctest3 /usr/local/bin/ctest
sudo mkdir /opt/yb-build

# If you'd like to use an unprivileged user for development, manually
# run/modify instructions from here onwards (change $USER, make sure shell
# variables are set appropriately when switching users).
sudo chown "$USER" /opt/yb-build
source <(echo 'source /opt/rh/rh-python38/enable' \
| tee -a "$shellrc")
source <(echo 'source /opt/rh/rh-maven35/enable' \
| tee -a "$shellrc")
source <(echo 'export YB_CCACHE_DIR="$HOME/.cache/yb_ccache"' \
| tee -a "$shellrc")

git clone https://github.com/yugabyte/yugabyte-db
cd yugabyte-db
./yb_release
```

# Detailed instructions
jasonyb marked this conversation as resolved.
Show resolved Hide resolved

## Install necessary packages
jasonyb marked this conversation as resolved.
Show resolved Hide resolved

Update and install basic development packages as follows:
Expand Down
Expand Up @@ -52,6 +52,87 @@ AlmaLinux 8 is the recommended Linux development platform for YugabyteDB.

The following instructions are for Ubuntu 20.04 and 22.04.

# TLDR
jasonyb marked this conversation as resolved.
Show resolved Hide resolved

{{% readfile "includes/tldr.md" %}}

```sh
# Modify to your preference:
shellrc=~/.bashrc

source <(cat /etc/os-release | grep '^VERSION_ID=')
case "$VERSION_ID" in
20.04)
gcc_version=10
;;
22.04)
gcc_version=11
;;
*)
echo "Unknown version $VERSION_ID"
exit 1
esac

sudo apt update
DEBIAN_FRONTEND=noninteractive sudo apt upgrade -y
packages=(
autoconf
build-essential
ccache
curl
file
g++-"$gcc_version"
gcc-"$gcc_version"
gettext
git
golang-1.20
libffi-dev
locales
maven
ninja-build
npm
patchelf
pkg-config
python3
python3-dev
python3-venv
rsync
)
# Avoid tzdata package configuration prompt.
if [ ! -e /etc/localtime ]; then
sudo ln -s /usr/share/zoneinfo/Etc/UTC /etc/localtime
fi
DEBIAN_FRONTEND=noninteractive sudo apt install -y "${packages[@]}"
sudo locale-gen en_US.UTF-8
sudo mkdir /opt/yb-build

# If you'd like to use an unprivileged user for development, manually
# run/modify instructions from here onwards (change $USER, make sure shell
# variables are set appropriately when switching users).
sudo chown "$USER" /opt/yb-build
mkdir ~/tools
curl -L "https://github.com/Kitware/CMake/releases/download/v3.25.2/cmake-3.25.2-linux-x86_64.tar.gz" | tar xzC ~/tools
source <(echo 'export PATH="$HOME/tools/cmake-3.25.2-linux-x86_64/bin:$PATH"' \
| tee -a "$shellrc")
source <(echo 'export PATH="/usr/lib/go-1.20/bin:$PATH"' \
| tee -a "$shellrc")
source <(echo 'export YB_CCACHE_DIR="$HOME/.cache/yb_ccache"' \
| tee -a "$shellrc")

git clone https://github.com/yugabyte/yugabyte-db
cd yugabyte-db
case "$VERSION_ID" in
20.04)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need support for building on Ubuntu 20.04?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no point in removing it yet

./yb_release --build_args=--clang16
;;
22.04)
./yb_release --build_args=--clang17
;;
esac
```

# Detailed instructions
jasonyb marked this conversation as resolved.
Show resolved Hide resolved

## Install necessary packages
jasonyb marked this conversation as resolved.
Show resolved Hide resolved

Update and install basic development packages as follows:
Expand Down
@@ -0,0 +1,5 @@
The following assumes
jasonyb marked this conversation as resolved.
Show resolved Hide resolved

- the presence of `sudo`
- run in a bash or zsh shell
- run as the user that will do development