Skip to content
This repository has been archived by the owner on Jun 22, 2021. It is now read-only.

TiDB's Distribution Proposal #1

Open
4 tasks
glorv opened this issue Dec 8, 2019 · 9 comments
Open
4 tasks

TiDB's Distribution Proposal #1

glorv opened this issue Dec 8, 2019 · 9 comments

Comments

@glorv
Copy link
Contributor

glorv commented Dec 8, 2019

Summary

Build package of TiDB for better distribution, Maybe include:

1. Building binaries for all components of TiDB

  • Linux amd64
  • Darwin amd64
  • Windows exe

2. Packaging for various operating systems / platforms

  • RPM
  • Debian
  • AUR for Archlinux
  • Home-brew or DMG
  • Zip or NSIS windows installer
  • Docker image
  • Amazon AMI

3. TiDB version release on GitHub?

  • Tar ball

Background

rpm/deb is the most popular installation method. So provide rpm build package with all three Components will make it easier for user to install TiDB, thus provide better experience.

Compability

version: tidb-v3.0+

Proposal - rpm version

Create a new helper repo

https://github.com/pingcap/tidb-helper.git

Build

git clone https://github.com/pingcap/tidb-helper.git
cd tidb-helper/
make rpm
ls tidb-latest-centos7-x86_64.rpm
make rpm tag=4.0 tidb=455147c pd=6e7b03b tikv=24257d7
ls dist/rpm/tidb-4.0-centos7-x86_64.rpm

Output

dist/rpm/tidb-4.0-centos7-x86_64.rpm

umask: 022
owner: tidb

  • /usr/bin/tidb-server

  • /usr/bin/tidb-ctl

  • /usr/bin/pd-server

  • /usr/bin/pd-ctl

  • /usr/bin/pd-recover

  • /usr/bin/tikv-server

  • /usr/bin/tikv-ctl

  • /usr/bin/binlogctl

  • /usr/bin/pump

  • /usr/bin/etcdctl

  • config dir

    • /etc/tidb/
    • /etc/tidb/config.toml
    • /etc/pd/
    • /etc/pd/config.toml
    • /etc/tikv/
    • /etc/tikv/config.toml
  • data dir

    • /var/lib/tidb
    • /var/lib/pd
    • /var/lib/tikv
  • log dir

    • /var/log/tidb
    • /var/log/pd
    • /var/log/tikv
  • systemd example files WON’T register service, just put examples

    • /usr/share/tidb/systemd/tidb-server.service
    • /usr/share/tidb/systemd/pd-server.service
    • /usr/share/tidb/systemd/tikv-server.service

Usage

Install

yum install tidb -y

Config

copy /usr/share/tidb/systemd/tidb-server-service.service /lib/systemd/system/tidb-server.service
vim  ## some edit

Start/Stop

systemctl start tidb-server
systemctl start tikv-server
systemctl start pd-server

Upgrade

yum update tidb

prompt: Override the old configs[y/n]?

Uninstall

yum remove tidb

Testing

There should be some testing steps before/after the RPM released:
We need to make sure that the RPM installation can pass integration tests, also at least 1 benchmark result is also required.

Download Page ?

TODO

Hosting yum?

Need Discuss

Success Criteria

  • Build the components in docker contain so that we can support multi-platforms easily.

TODO

  • make rpm
  • make deb
  • make brew
  • register tidb in EPEL repo

Diffculty

Easy

Score

3000

Mentors

@glorv

@kennytm

This comment has been minimized.

@sykp241095 sykp241095 changed the title Support build rpm for TiDB TiDB's Distribution Proposal Dec 9, 2019
@AstroProfundis
Copy link

AstroProfundis commented Dec 10, 2019

There are already AUR packages tidb, tikv, and tikv-pd maintained by @Xuanwo
See: https://aur.archlinux.org/packages/?K=xuanwo&SeB=m

And I'm the maintainer of AUR package tidb-bin at present, I can add co-maintainer(s) if anyone needed.

@Xuanwo
Copy link

Xuanwo commented Dec 10, 2019

Great project, I can add co-maintainer(s) too if needed.

@reafans
Copy link

reafans commented Dec 10, 2019

I want to join in this task~

@bb7133
Copy link
Member

bb7133 commented Dec 10, 2019

Great project, I can add co-maintainer(s) too if needed.

Great! Thank you for maintaining AUR repo.

Please check our working group proposal and join the slack channel:

https://tidbcommunity.slack.com/archives/CRGH2NF3J

@sykp241095
Copy link
Member

I want to join in this task~

Wow, this issue seems so welcomed, just join.

@bb7133
Copy link
Member

bb7133 commented Dec 11, 2019

Hi @Xuanwo @reafans , I've added you to the member list in our working group proposal, welcome!

@Xuanwo
Copy link

Xuanwo commented Dec 11, 2019

tidbcommunity.slack.com/archives/CRGH2NF3J

image

This channel looks like need a @pingcap.com account?

@Xuanwo
Copy link

Xuanwo commented Dec 11, 2019

Visit https://pingcap.com/tidbslack before join into this channel.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants