-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Changes from all commits
fbbfefe
0933830
22fb457
e91cb8f
8ecb8ca
a58586e
ec198e3
35b88a0
acf790a
3a4aaab
021ecd2
20482d9
8d4c7d5
56c90da
7a64c9b
580de7a
23d5a13
3e8a87c
a27fd61
354ef15
3b1d9ca
d8db185
746a0f4
fa199e3
16200d8
94e0262
0adb68e
4daa11b
0d7f02b
c27a585
cfacaa3
7bce825
0abcedf
ad446ab
60bfc5d
50ae54c
dbcc33a
0127701
3955d4c
e9a6c7d
d597036
f2c57cb
0abc611
a9a2fd6
a43326e
a6325dd
8683ffe
e5a62d2
81ef903
f32512c
a4a764f
d0a8c23
7cc5695
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,52 @@ AlmaLinux 8 is the recommended Linux development platform for YugabyteDB. | |
|
||
{{< /note >}} | ||
|
||
## Install necessary packages | ||
## TLDR | ||
|
||
{{% 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 | ||
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
||
Update and install basic development packages as follows: | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,7 +52,86 @@ AlmaLinux 8 is the recommended Linux development platform for YugabyteDB. | |
|
||
The following instructions are for Ubuntu 20.04 and 22.04. | ||
|
||
## Install necessary packages | ||
## TLDR | ||
|
||
{{% 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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we really need support for building on Ubuntu 20.04? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
||
Update and install basic development packages as follows: | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
The commands below assume the following: | ||
|
||
- You have sudo access. | ||
- You are using a bash or zsh shell. | ||
- You are running the commands as the user who will be doing development. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no
python310
orpython311
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.