Build a ceph Deb installation package

Source: Internet
Author: User
Tags file copy gz file mkdir git clone
first, compile the Ceph package
1.1. Clone the Ceph code and switch branches
git clone--recursive https://github.com/ceph/ceph.git
cd ceph
git checkout v0.94.3-f
Note: Recursive will clone the module together

1.2. Installing dependent Packages
./install-deps.sh
./autogen.sh

1.3. Pre-compilation configuration
./configure      --prefix=/  
Note: If the--prefix option is not configured here, all programs are installed by default under/usr/local, which may involve problems with the path later


1.4. Compiling

Make-j 4
Determine the total number of cores by the following command
Cat/proc/cpuinfo | grep cores
1.5. Build a Ceph Deb installation package
Apt-get Install Debhelper
dpkg-buildpackage-j8 2>err0813dpkg.txt

1.6. When the compilation is complete, the following packages are present


second, make the Deb package local installation source
2.1. Install the Dpkg-scanpackages command

Apt-get Install Dpkg-dev

2.2 Creating the Ceph package directory
mkdir  /home/ceph-hammer
cd  /home/ceph-hammer
mkdir pools mkdir-p
dists/trusty/main/ binary-i386
mkdir-p Dists/trusty/main/binary-amd64
Note: Pools the physical address that is stored for the package


2.3 Copy Ceph package to pools

CP *.deb/home/ceph-hammer/pools

2.4 Generating an override file
Write all the Deb package names in the pools directory to the file override
Ls-1 Pools | Sed ' s/_.*$/extra bogus/' | Uniq > Override

2.5 Generating Packages
Writes the package name, version number, dependency, and other information of all packages to the file packages
Dpkg-scanpackages pools override > Dists/trusty/main/binary-i386/packages
dpkg-scanpackages pools override > Dists/trusty/main/binary-amd64/packages

Note: To change the packages file into a packages.gz file in the etch version


2.6 Change Sources.list

echo "Deb File:///home/ceph-hammer trusty main" >>/etc/apt/sources.list
Note: Since ceph-deploy1.5 is connected to the network by default to download the latest version, the configuration on this side does not seem to work.


2.7 Local Installation Source directory structure

After you create the local installation source, the directory structure looks like this:



2.8 Setup Complete, update Deb source
Once you have completed the above setup and file copy, you can start working on the local source and using the source on the network.

Apt-get Update
Apt-get dist-upgrade

Third, install Ceph

3.1 Preparation before installation
Turn off Ubuntu's Packages authentication feature, otherwise the following packages cannot be authenticated! will be reported
echo "apt::get::allowunauthenticated 1;" | sudo tee-a  /etc/apt/apt.conf

3.1. Install and change Ceph-deploy
1. Install Ceph-deploy in CEPH01
Apt-get Install Ceph-deploy


2. Modify the install.py file
When installing a Ceph node via Ceph-deploy (that is, Ceph-deploy install monitor), the install.py of Ceph-deploy is invoked, and the script is used to connect to the network to download the Deb package, and because of the use of the local source, you need to modify The path of the Deb package download in install.py.
install.py Location:/usr/lib/python2.7/dist-packages/ceph_deploy/hosts/debian/install.py
Modify the following:
Before modification
---------------------------
if Version_kind = = ' Stable ':
url = ' http://ceph.com/debian-{version}/'. Format (
Version=version,
35)
elif Version_kind = = ' testing ':
PNs url = ' http://ceph.com/debian-testing/'
---------------------------


After modification:
---------------------------
if Version_kind = = ' Stable ':
# url = ' http://ceph.com/debian-{version}/'. Format (
url = ' file:///home/ceph-{version}/'. Format (
Version=version,
36)
Panax Notoginseng elif Version_kind = = ' testing ':
The URL = ' http://ceph.com/debian-testing/'
---------------------------
3.2 Installing Ceph

See Ceph official documentation


Iv. Problems encountered
Question 1:
Perform Ceph-deploy install CEPH01 to report the following error:
[CEPH01] [DEBUG] The following packages has unmet dependencies:
[CEPH01] [DEBUG] Ceph:depends:liblttng-ust0 (>= 2.5.1-1ubuntu2~cloud0) but 2.4.0-4UBUNTU1 was to be installed
[CEPH01]         [DEBUG] Depends:librados2 but it isn't going to being installed
[CEPH01] [DEBUG] CEPH-COMMON:DEPENDS:LIBRBD1 (= 0.94.7-1) But it isn't going to be installed
[CEPH01]                [DEBUG] Depends:librados2 but it isn't going to being installed
[CEPH01]                [DEBUG] Depends:python-rados (= 0.94.7-1) But it isn't going to be installed
[CEPH01]                [DEBUG] DEPENDS:PYTHON-RBD (= 0.94.7-1) But it isn't going to be installed
[CEPH01] [DEBUG] Ceph-mds:depends:librados2 but it isn't going to be installed


cause and resolution process:
Execute Apt-get Install LIBRADOS2 report
Librados2:depends:liblttng-ust0 (>= 2.5.1-1ubuntu2~cloud0) but 2.4.0-4UBUNTU1 was to be installed
E:unable to correct problems and you have held broken packages.
Use Apt-cache show liblttng-ust0 to see if the version installed in the discovery environment is 2.4.0-4UBUNTU1, and Librados2 needs to install the 2.5.1-1UBUNTU2 version, so there is an error.

Solve:
1. Download Liblttng-ust0_2.5.1-1ubuntu2_amd64.deb
Liblttng-ust-ctl2_2.5.1-1ubuntu2_amd64.deb and
Liburcu2_0.8.4-6ubuntu1_amd64.deb
Three Deb Packs
(Download Address:
Liblttng-ust0_2.5.1-1ubuntu2_amd64.deb
Liblttng-ust-ctl2_2.5.1-1ubuntu2_amd64.deb
https://mirror.umd.edu/ubuntu/pool/main/u/ust/
Liburcu2_0.8.4-6ubuntu1_amd64.deb
HTTPS://LAUNCHPAD.NET/UBUNTU/VIVID/AMD64/LIBURCU2/0.8.4-6UBUNTU1)
Add the Deb package to the local installation source directory.

Perform

Dpkg-scanpackages Pools override > Dists/trusty/main/binary-amd64/packages
Update packages.gz Package


Question 2
Ceph-deploy install my own compiled Deb package, error warning:the following packages cannot be authenticated!
Solution:
Turn off Ubuntu's packages authentication feature:
echo "apt::get::allowunauthenticated 1;" | sudo tee-a  /etc/apt/apt.conf

References:

Installation method of local source under 1.Debian Linux operating system
Http://soft.zdnet.com.cn/software_zone/2007/1006/536773.shtml
2. CentOS6.5 local source to build Ceph
Http://www.cnblogs.com/linprogram/p/5482513.html



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.