##For all open source software USE only main repos####
---On ALL Nodes---
wget -q -O- 'https://download.ceph.com/keys/release.asc' | sudo apt-key add -
lsb_release -a
apt-add-repository 'deb https://download.ceph.com/debian-mimic/ bionic main'
apt update
###### Ubuntu Main Repos
deb http://in.archive.ubuntu.com/ubuntu/ bionic main restricted universe
deb-src http://in.archive.ubuntu.com/ubuntu/ bionic main restricted universe
root@cephstor3:~# cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.239.11 cephstor1
192.168.239.12 cephstor2
192.168.239.13 cephstor3
root@cephstor3:~# cat /etc/network/interfaces
auto ens33
iface ens33 inet static
address 192.168.85.13
netmask 255.255.255.0
gateway 192.168.85.2
dns-nameservers 8.8.8.8
auto ens38
iface ens38 inet static
address 192.168.239.13
netmask 255.255.255.0
echo -e 'Defaults:cephuser !requiretty\ncephuser ALL = (root) NOPASSWD:ALL' | tee /etc/sudoers.d/cephuser
root@ctrl01:~# cat /etc/sudoers.d/ceph
Defaults:fortunath !requiretty
fortunath ALL = (root) NOPASSWD:ALL
---on Deployserver node---
fortunath@cephstor01:~$ ssh-keygen
fortunath@cephstor01:~$ vi ~/.ssh/config
fortunath@cephstor01:~$ cat ~/.ssh/config
# create new ( define all nodes and users )
Host cephstor01
Hostname cephstor01
User fortunath
Host cephstor02
Hostname cephstor02
User fortunath
Host cephstor03
Hostname cephstor03
User fortunath
---
ssh-copy-id cephstor03
ssh-copy-id cephstor02
-----On ALL Nodes---
fortunath@cephstor01:~$ cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.239.130 cephstor03
192.168.239.129 cephstor02
192.168.239.128 cephstor012
----
ensure true in:
fortunath@ctrl01:~$ grep preserve_hostname /etc/cloud/cloud.cfg
preserve_hostname: true
--
curl https://repogen.simplylinux.ch/txt/bionic/sources_fad62524984e5e894141cfb0002fbf836014d01d.txt | sudo tee -a /etc/apt/sources.list
--
https://www.server-world.info/en/note?os=Ubuntu_16.04&p=ceph&f=1
https://gist.github.com/vanduc95/a17f80d0636badd9aa002f2b493b777b
---On ALL Nodes---
apt-get update && apt-get -y upgrade ; apt-get install python-minimal
--
apt-get -y install chrony
insert /etc/chrony/chrony.conf
--
pool 0.asia.pool.ntp.org iburst maxsources 4
pool 1.asia.pool.ntp.org iburst maxsources 1
pool 2.asia.pool.ntp.org iburst maxsources 1
pool 3.asia.pool.ntp.org iburst maxsources 2
----
64 vi /etc/chrony/chrony.conf
65 scp /etc/chrony/chrony.conf cephstor2:/etc/chrony/chrony.conf
66 scp /etc/chrony/chrony.conf cephstor3:/etc/chrony/chrony.conf
67 service chrony restart
68 ssh cephstor2 \ service chrony restart
69 ssh cephstor3 \ service chrony restart
70 for i in stop disable; do ssh cephstor2 \ systemctl $i ufw; done
71 for i in stop disable; do ssh cephstor3 \ systemctl $i ufw; done
72 for i in stop disable; do ssh cephstor1 \ systemctl $i ufw; done
--
fortunath@cephstor01:~$ cat /etc/rc.local
echo nameserver 8.8.8.8 > /etc/resolv.conf
fortunath@cephstor01:~$ ll /etc/rc.local
-rwxr-xr-x 1 root root 43 Oct 4 18:00 /etc/rc.local*
---
apt-get install ceph-deploy
mkdir cluster
cd cluster
ceph-deploy new ceph1 ceph2 ceph3
--
fortunath@cephstor01:~/cluster$ cat ceph.conf
#[global]
#fsid = c3289b18-9d58-432e-8cf1-a107691edcb0
#mon_initial_members = cephstor01, cephstor02, cephstor03
#mon_host = 192.168.239.128,192.168.239.129,192.168.239.130
#auth_cluster_required = cephx
#auth_service_required = cephx
#auth_client_required = cephx
[global]
fsid = 36c5aa41-dc4c-424e-9adc-1c052929971b
mon_initial_members = cephstor01, cephstor02, cephstor03
mon_host = 192.168.239.128,192.168.239.129,192.168.239.130
auth_cluster_required = cephx
auth_service_required = cephx
auth_client_required = cephx
cluster network = 192.168.85.0/24
public network = 192.168.239.0/24
osd pool default size = 2
---
149 ceph-deploy new cephstor01 cephstor02 cephstor03
150 ca ceph.conf
151 cat ceph.conf
152 cat ~/ceph/ceph.conf
153 vi ceph.conf
154 cat ceph.conf
155 ip r
156 vi ceph.conf
157 ceph-deploy install --release luminous cephstor1 cephstor2 cephstor3
ceph-deploy mon create-initial
which will
1. do mon create on each mon in the mon_initial_quorum set in ceph.conf
2. wait for them to form a quorum
3. gatherkeys
219 ceph-authtool --create-keyring /tmp/ceph.mon.keyring --gen-key -n mon. --cap mon 'allow *'
220 sudo ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring --gen-key -n client.admin --set-uid=0 --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow *' --cap mgr 'allow *'
221 sudo ceph-authtool --create-keyring /var/lib/ceph/bootstrap-osd/ceph.keyring --gen-key -n client.bootstrap-osd --cap mon 'profile bootstrap-osd'
222 sudo ceph-authtool /tmp/ceph.mon.keyring --import-keyring /etc/ceph/ceph.client.admin.keyring
223 sudo ceph-authtool /tmp/ceph.mon.keyring --import-keyring /var/lib/ceph/bootstrap-osd/ceph.keyring
224 ll /etc/ceph/ceph.client.admin.keyring
225 ll /etc/ceph/
226 sudo chmod +r /etc/ceph/ceph.client.admin.keyring
227 scp /etc/ceph/ceph.client.admin.keyring cephstor01:
228 scp /etc/ceph/ceph.client.admin.keyring cephstor02:
229 scp /etc/ceph/ceph.client.admin.keyring cephstor03:
230 ssh cephstor02 \ sudo cp ceph.client.admin.keyring /etc/ceph/ceph.client.admin.keyring
231 ssh cephstor03 \ sudo cp ceph.client.admin.keyring /etc/ceph/ceph.client.admin.keyring
158 source /etc/rc.local
159 sudo source /etc/rc.local
160 bash /etc/rc.local
161 sudo bash /etc/rc.local
162 ssh cephstor02
163 ssh cephstor03
164 ceph-deploy install --release mimic cephstor01 cephstor02 cephstor03
165 ceph-deploy mon create-initial
172 ceph-deploy --overwrite-conf mon create-initial
173 sudo ceph health
174 ceph-deploy admin cephstor01 cephstor02 cephstor03
175 ls /etc/ceph/ceph.client.admin.keyring
176 ll /etc/ceph/ceph.client.admin.keyring
177 +sudo chmod +r /etc/ceph/ceph.client.admin.keyring
178 sudo chmod +r /etc/ceph/ceph.client.admin.keyring
179 ssh cephstor02 \ sudo chmod +r /etc/ceph/ceph.client.admin.keyring
180 ssh cephstor03 \ sudo chmod +r /etc/ceph/ceph.client.admin.keyring
181 sudo ceph health
182 ceph-deploy mgr cephstor01 cephstor02 cephstor03
183 ceph-deploy mgr create cephstor01 cephstor02 cephstor03
184 sudo ceph hea+65lth
185 sudo ceph health
186 history
#######################
sudo apt-get -y install ceph-deploy ceph-common ceph-mds python-minimal ; ssh cephstor2 \ "sudo apt-get -y install ceph-deploy ceph-common ceph-mds python-minimal" ; ssh cephstor3 \ "sudo apt-get -y install ceph-deploy ceph-common ceph-mds python-minimal"
########################
##For all opensource software USE only main repos####
---On ALL Nodes---
wget -q -O- 'https://download.ceph.com/keys/release.asc' | sudo apt-key add -
lsb_release -a
apt-add-repository 'deb https://download.ceph.com/debian-mimic/ bionic main'
apt update
###### Ubuntu Main Repos
deb http://in.archive.ubuntu.com/ubuntu/ bionic main restricted universe
deb-src http://in.archive.ubuntu.com/ubuntu/ bionic main restricted universe
root@cephstor3:~# cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.239.11 cephstor1
192.168.239.12 cephstor2
192.168.239.13 cephstor3
root@cephstor3:~# cat /etc/network/interfaces
auto ens33
iface ens33 inet static
address 192.168.85.13
netmask 255.255.255.0
gateway 192.168.85.2
dns-nameservers 8.8.8.8
auto ens38
iface ens38 inet static
address 192.168.239.13
netmask 255.255.255.0
echo -e 'Defaults:cephuser !requiretty\ncephuser ALL = (root) NOPASSWD:ALL' | tee /etc/sudoers.d/cephuser
root@ctrl01:~# cat /etc/sudoers.d/ceph
Defaults:fortunath !requiretty
fortunath ALL = (root) NOPASSWD:ALL
---on Deployserver node---
fortunath@cephstor01:~$ ssh-keygen
fortunath@cephstor01:~$ vi ~/.ssh/config
fortunath@cephstor01:~$ cat ~/.ssh/config
# create new ( define all nodes and users )
Host cephstor01
Hostname cephstor01
User fortunath
Host cephstor02
Hostname cephstor02
User fortunath
Host cephstor03
Hostname cephstor03
User fortunath
---
ssh-copy-id cephstor03
ssh-copy-id cephstor02
-----On ALL Nodes---
fortunath@cephstor01:~$ cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.239.130 cephstor03
192.168.239.129 cephstor02
192.168.239.128 cephstor012
----
ensure true in:
fortunath@ctrl01:~$ grep preserve_hostname /etc/cloud/cloud.cfg
preserve_hostname: true
--
curl https://repogen.simplylinux.ch/txt/bionic/sources_fad62524984e5e894141cfb0002fbf836014d01d.txt | sudo tee -a /etc/apt/sources.list
--
https://www.server-world.info/en/note?os=Ubuntu_16.04&p=ceph&f=1
https://gist.github.com/vanduc95/a17f80d0636badd9aa002f2b493b777b
---On ALL Nodes---
apt-get update && apt-get -y upgrade ; apt-get install python-minimal
--
apt-get -y install chrony
insert /etc/chrony/chrony.conf
--
pool 0.asia.pool.ntp.org iburst maxsources 4
pool 1.asia.pool.ntp.org iburst maxsources 1
pool 2.asia.pool.ntp.org iburst maxsources 1
pool 3.asia.pool.ntp.org iburst maxsources 2
----
64 vi /etc/chrony/chrony.conf
65 scp /etc/chrony/chrony.conf cephstor2:/etc/chrony/chrony.conf
66 scp /etc/chrony/chrony.conf cephstor3:/etc/chrony/chrony.conf
67 service chrony restart
68 ssh cephstor2 \ service chrony restart
69 ssh cephstor3 \ service chrony restart
70 for i in stop disable; do ssh cephstor2 \ systemctl $i ufw; done
71 for i in stop disable; do ssh cephstor3 \ systemctl $i ufw; done
72 for i in stop disable; do ssh cephstor1 \ systemctl $i ufw; done
--
fortunath@cephstor01:~$ cat /etc/rc.local
echo nameserver 8.8.8.8 > /etc/resolv.conf
fortunath@cephstor01:~$ ll /etc/rc.local
-rwxr-xr-x 1 root root 43 Oct 4 18:00 /etc/rc.local*
---
apt-get install ceph-deploy
mkdir cluster
cd cluster
ceph-deploy new ceph1 ceph2 ceph3
--
fortunath@cephstor01:~/cluster$ cat ceph.conf
#[global]
#fsid = c3289b18-9d58-432e-8cf1-a107691edcb0
#mon_initial_members = cephstor01, cephstor02, cephstor03
#mon_host = 192.168.239.128,192.168.239.129,192.168.239.130
#auth_cluster_required = cephx
#auth_service_required = cephx
#auth_client_required = cephx
[global]
fsid = 36c5aa41-dc4c-424e-9adc-1c052929971b
mon_initial_members = cephstor01, cephstor02, cephstor03
mon_host = 192.168.239.128,192.168.239.129,192.168.239.130
auth_cluster_required = cephx
auth_service_required = cephx
auth_client_required = cephx
cluster network = 192.168.85.0/24
public network = 192.168.239.0/24
osd pool default size = 2
---
149 ceph-deploy new cephstor01 cephstor02 cephstor03
150 ca ceph.conf
151 cat ceph.conf
152 cat ~/ceph/ceph.conf
153 vi ceph.conf
154 cat ceph.conf
155 ip r
156 vi ceph.conf
157 ceph-deploy install --release luminous cephstor1 cephstor2 cephstor3
ceph-deploy mon create-initial
which will
1. do mon create on each mon in the mon_initial_quorum set in ceph.conf
2. wait for them to form a quorum
3. gatherkeys
219 ceph-authtool --create-keyring /tmp/ceph.mon.keyring --gen-key -n mon. --cap mon 'allow *'
220 sudo ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring --gen-key -n client.admin --set-uid=0 --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow *' --cap mgr 'allow *'
221 sudo ceph-authtool --create-keyring /var/lib/ceph/bootstrap-osd/ceph.keyring --gen-key -n client.bootstrap-osd --cap mon 'profile bootstrap-osd'
222 sudo ceph-authtool /tmp/ceph.mon.keyring --import-keyring /etc/ceph/ceph.client.admin.keyring
223 sudo ceph-authtool /tmp/ceph.mon.keyring --import-keyring /var/lib/ceph/bootstrap-osd/ceph.keyring
224 ll /etc/ceph/ceph.client.admin.keyring
225 ll /etc/ceph/
226 sudo chmod +r /etc/ceph/ceph.client.admin.keyring
227 scp /etc/ceph/ceph.client.admin.keyring cephstor01:
228 scp /etc/ceph/ceph.client.admin.keyring cephstor02:
229 scp /etc/ceph/ceph.client.admin.keyring cephstor03:
230 ssh cephstor02 \ sudo cp ceph.client.admin.keyring /etc/ceph/ceph.client.admin.keyring
231 ssh cephstor03 \ sudo cp ceph.client.admin.keyring /etc/ceph/ceph.client.admin.keyring
158 source /etc/rc.local
159 sudo source /etc/rc.local
160 bash /etc/rc.local
161 sudo bash /etc/rc.local
162 ssh cephstor02
163 ssh cephstor03
164 ceph-deploy install --release mimic cephstor01 cephstor02 cephstor03
165 ceph-deploy mon create-initial
172 ceph-deploy --overwrite-conf mon create-initial
173 sudo ceph health
174 ceph-deploy admin cephstor01 cephstor02 cephstor03
175 ls /etc/ceph/ceph.client.admin.keyring
176 ll /etc/ceph/ceph.client.admin.keyring
177 +sudo chmod +r /etc/ceph/ceph.client.admin.keyring
178 sudo chmod +r /etc/ceph/ceph.client.admin.keyring
179 ssh cephstor02 \ sudo chmod +r /etc/ceph/ceph.client.admin.keyring
180 ssh cephstor03 \ sudo chmod +r /etc/ceph/ceph.client.admin.keyring
181 sudo ceph health
182 ceph-deploy mgr cephstor01 cephstor02 cephstor03
183 ceph-deploy mgr create cephstor01 cephstor02 cephstor03
184 sudo ceph hea+65lth
185 sudo ceph health
186 history
#######################
sudo apt-get -y install ceph-deploy ceph-common ceph-mds python-minimal ; ssh cephstor2 \ "sudo apt-get -y install ceph-deploy ceph-common ceph-mds python-minimal" ; ssh cephstor3 \ "sudo apt-get -y install ceph-deploy ceph-common ceph-mds python-minimal"
########################
##For all opensource software USE only main repos####
---On ALL Nodes---
wget -q -O- 'https://download.ceph.com/keys/release.asc' | sudo apt-key add -
lsb_release -a
apt-add-repository 'deb https://download.ceph.com/debian-mimic/ bionic main'
apt update
###### Ubuntu Main Repos
deb http://in.archive.ubuntu.com/ubuntu/ bionic main restricted universe
deb-src http://in.archive.ubuntu.com/ubuntu/ bionic main restricted universe
root@cephstor3:~# cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.239.11 cephstor1
192.168.239.12 cephstor2
192.168.239.13 cephstor3
root@cephstor3:~# cat /etc/network/interfaces
auto ens33
iface ens33 inet static
address 192.168.85.13
netmask 255.255.255.0
gateway 192.168.85.2
dns-nameservers 8.8.8.8
auto ens38
iface ens38 inet static
address 192.168.239.13
netmask 255.255.255.0
echo -e 'Defaults:cephuser !requiretty\ncephuser ALL = (root) NOPASSWD:ALL' | tee /etc/sudoers.d/cephuser
root@ctrl01:~# cat /etc/sudoers.d/ceph
Defaults:fortunath !requiretty
fortunath ALL = (root) NOPASSWD:ALL
---on Deployserver node---
fortunath@cephstor01:~$ ssh-keygen
fortunath@cephstor01:~$ vi ~/.ssh/config
fortunath@cephstor01:~$ cat ~/.ssh/config
# create new ( define all nodes and users )
Host cephstor01
Hostname cephstor01
User fortunath
Host cephstor02
Hostname cephstor02
User fortunath
Host cephstor03
Hostname cephstor03
User fortunath
---
ssh-copy-id cephstor03
ssh-copy-id cephstor02
-----On ALL Nodes---
fortunath@cephstor01:~$ cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.239.130 cephstor03
192.168.239.129 cephstor02
192.168.239.128 cephstor012
----
ensure true in:
fortunath@ctrl01:~$ grep preserve_hostname /etc/cloud/cloud.cfg
preserve_hostname: true
--
curl https://repogen.simplylinux.ch/txt/bionic/sources_fad62524984e5e894141cfb0002fbf836014d01d.txt | sudo tee -a /etc/apt/sources.list
--
https://www.server-world.info/en/note?os=Ubuntu_16.04&p=ceph&f=1
https://gist.github.com/vanduc95/a17f80d0636badd9aa002f2b493b777b
---On ALL Nodes---
apt-get update && apt-get -y upgrade ; apt-get install python-minimal
--
apt-get -y install chrony
insert /etc/chrony/chrony.conf
--
pool 0.asia.pool.ntp.org iburst maxsources 4
pool 1.asia.pool.ntp.org iburst maxsources 1
pool 2.asia.pool.ntp.org iburst maxsources 1
pool 3.asia.pool.ntp.org iburst maxsources 2
----
64 vi /etc/chrony/chrony.conf
65 scp /etc/chrony/chrony.conf cephstor2:/etc/chrony/chrony.conf
66 scp /etc/chrony/chrony.conf cephstor3:/etc/chrony/chrony.conf
67 service chrony restart
68 ssh cephstor2 \ service chrony restart
69 ssh cephstor3 \ service chrony restart
70 for i in stop disable; do ssh cephstor2 \ systemctl $i ufw; done
71 for i in stop disable; do ssh cephstor3 \ systemctl $i ufw; done
72 for i in stop disable; do ssh cephstor1 \ systemctl $i ufw; done
--
fortunath@cephstor01:~$ cat /etc/rc.local
echo nameserver 8.8.8.8 > /etc/resolv.conf
fortunath@cephstor01:~$ ll /etc/rc.local
-rwxr-xr-x 1 root root 43 Oct 4 18:00 /etc/rc.local*
---
apt-get install ceph-deploy
mkdir cluster
cd cluster
ceph-deploy new ceph1 ceph2 ceph3
--
fortunath@cephstor01:~/cluster$ cat ceph.conf
#[global]
#fsid = c3289b18-9d58-432e-8cf1-a107691edcb0
#mon_initial_members = cephstor01, cephstor02, cephstor03
#mon_host = 192.168.239.128,192.168.239.129,192.168.239.130
#auth_cluster_required = cephx
#auth_service_required = cephx
#auth_client_required = cephx
[global]
fsid = 36c5aa41-dc4c-424e-9adc-1c052929971b
mon_initial_members = cephstor01, cephstor02, cephstor03
mon_host = 192.168.239.128,192.168.239.129,192.168.239.130
auth_cluster_required = cephx
auth_service_required = cephx
auth_client_required = cephx
cluster network = 192.168.85.0/24
public network = 192.168.239.0/24
osd pool default size = 2
---
149 ceph-deploy new cephstor01 cephstor02 cephstor03
150 ca ceph.conf
151 cat ceph.conf
152 cat ~/ceph/ceph.conf
153 vi ceph.conf
154 cat ceph.conf
155 ip r
156 vi ceph.conf
157 ceph-deploy install --release luminous cephstor1 cephstor2 cephstor3
ceph-deploy mon create-initial
which will
1. do mon create on each mon in the mon_initial_quorum set in ceph.conf
2. wait for them to form a quorum
3. gatherkeys
219 ceph-authtool --create-keyring /tmp/ceph.mon.keyring --gen-key -n mon. --cap mon 'allow *'
220 sudo ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring --gen-key -n client.admin --set-uid=0 --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow *' --cap mgr 'allow *'
221 sudo ceph-authtool --create-keyring /var/lib/ceph/bootstrap-osd/ceph.keyring --gen-key -n client.bootstrap-osd --cap mon 'profile bootstrap-osd'
222 sudo ceph-authtool /tmp/ceph.mon.keyring --import-keyring /etc/ceph/ceph.client.admin.keyring
223 sudo ceph-authtool /tmp/ceph.mon.keyring --import-keyring /var/lib/ceph/bootstrap-osd/ceph.keyring
224 ll /etc/ceph/ceph.client.admin.keyring
225 ll /etc/ceph/
226 sudo chmod +r /etc/ceph/ceph.client.admin.keyring
227 scp /etc/ceph/ceph.client.admin.keyring cephstor01:
228 scp /etc/ceph/ceph.client.admin.keyring cephstor02:
229 scp /etc/ceph/ceph.client.admin.keyring cephstor03:
230 ssh cephstor02 \ sudo cp ceph.client.admin.keyring /etc/ceph/ceph.client.admin.keyring
231 ssh cephstor03 \ sudo cp ceph.client.admin.keyring /etc/ceph/ceph.client.admin.keyring
158 source /etc/rc.local
159 sudo source /etc/rc.local
160 bash /etc/rc.local
161 sudo bash /etc/rc.local
162 ssh cephstor02
163 ssh cephstor03
164 ceph-deploy install --release mimic cephstor01 cephstor02 cephstor03
165 ceph-deploy mon create-initial
172 ceph-deploy --overwrite-conf mon create-initial
173 sudo ceph health
174 ceph-deploy admin cephstor01 cephstor02 cephstor03
175 ls /etc/ceph/ceph.client.admin.keyring
176 ll /etc/ceph/ceph.client.admin.keyring
177 +sudo chmod +r /etc/ceph/ceph.client.admin.keyring
178 sudo chmod +r /etc/ceph/ceph.client.admin.keyring
179 ssh cephstor02 \ sudo chmod +r /etc/ceph/ceph.client.admin.keyring
180 ssh cephstor03 \ sudo chmod +r /etc/ceph/ceph.client.admin.keyring
181 sudo ceph health
182 ceph-deploy mgr cephstor01 cephstor02 cephstor03
183 ceph-deploy mgr create cephstor01 cephstor02 cephstor03
184 sudo ceph hea+65lth
185 sudo ceph health
186 history
#######################
sudo apt-get -y install ceph-deploy ceph-common ceph-mds python-minimal ; ssh cephstor2 \ "sudo apt-get -y install ceph-deploy ceph-common ceph-mds python-minimal" ; ssh cephstor3 \ "sudo apt-get -y install ceph-deploy ceph-common ceph-mds python-minimal"
########################
##For all opensource software USE only main repos####
---On ALL Nodes---
wget -q -O- 'https://download.ceph.com/keys/release.asc' | sudo apt-key add -
lsb_release -a
apt-add-repository 'deb https://download.ceph.com/debian-mimic/ bionic main'
apt update
###### Ubuntu Main Repos
deb http://in.archive.ubuntu.com/ubuntu/ bionic main restricted universe
deb-src http://in.archive.ubuntu.com/ubuntu/ bionic main restricted universe
root@cephstor3:~# cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.239.11 cephstor1
192.168.239.12 cephstor2
192.168.239.13 cephstor3
root@cephstor3:~# cat /etc/network/interfaces
auto ens33
iface ens33 inet static
address 192.168.85.13
netmask 255.255.255.0
gateway 192.168.85.2
dns-nameservers 8.8.8.8
auto ens38
iface ens38 inet static
address 192.168.239.13
netmask 255.255.255.0
echo -e 'Defaults:cephuser !requiretty\ncephuser ALL = (root) NOPASSWD:ALL' | tee /etc/sudoers.d/cephuser
root@ctrl01:~# cat /etc/sudoers.d/ceph
Defaults:fortunath !requiretty
fortunath ALL = (root) NOPASSWD:ALL
---on Deployserver node---
fortunath@cephstor01:~$ ssh-keygen
fortunath@cephstor01:~$ vi ~/.ssh/config
fortunath@cephstor01:~$ cat ~/.ssh/config
# create new ( define all nodes and users )
Host cephstor01
Hostname cephstor01
User fortunath
Host cephstor02
Hostname cephstor02
User fortunath
Host cephstor03
Hostname cephstor03
User fortunath
---
ssh-copy-id cephstor03
ssh-copy-id cephstor02
-----On ALL Nodes---
fortunath@cephstor01:~$ cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.239.130 cephstor03
192.168.239.129 cephstor02
192.168.239.128 cephstor012
----
ensure true in:
fortunath@ctrl01:~$ grep preserve_hostname /etc/cloud/cloud.cfg
preserve_hostname: true
--
curl https://repogen.simplylinux.ch/txt/bionic/sources_fad62524984e5e894141cfb0002fbf836014d01d.txt | sudo tee -a /etc/apt/sources.list
--
https://www.server-world.info/en/note?os=Ubuntu_16.04&p=ceph&f=1
https://gist.github.com/vanduc95/a17f80d0636badd9aa002f2b493b777b
---On ALL Nodes---
apt-get update && apt-get -y upgrade ; apt-get install python-minimal
--
apt-get -y install chrony
insert /etc/chrony/chrony.conf
--
pool 0.asia.pool.ntp.org iburst maxsources 4
pool 1.asia.pool.ntp.org iburst maxsources 1
pool 2.asia.pool.ntp.org iburst maxsources 1
pool 3.asia.pool.ntp.org iburst maxsources 2
----
64 vi /etc/chrony/chrony.conf
65 scp /etc/chrony/chrony.conf cephstor2:/etc/chrony/chrony.conf
66 scp /etc/chrony/chrony.conf cephstor3:/etc/chrony/chrony.conf
67 service chrony restart
68 ssh cephstor2 \ service chrony restart
69 ssh cephstor3 \ service chrony restart
70 for i in stop disable; do ssh cephstor2 \ systemctl $i ufw; done
71 for i in stop disable; do ssh cephstor3 \ systemctl $i ufw; done
72 for i in stop disable; do ssh cephstor1 \ systemctl $i ufw; done
--
fortunath@cephstor01:~$ cat /etc/rc.local
echo nameserver 8.8.8.8 > /etc/resolv.conf
fortunath@cephstor01:~$ ll /etc/rc.local
-rwxr-xr-x 1 root root 43 Oct 4 18:00 /etc/rc.local*
---
apt-get install ceph-deploy
mkdir cluster
cd cluster
ceph-deploy new ceph1 ceph2 ceph3
--
fortunath@cephstor01:~/cluster$ cat ceph.conf
#[global]
#fsid = c3289b18-9d58-432e-8cf1-a107691edcb0
#mon_initial_members = cephstor01, cephstor02, cephstor03
#mon_host = 192.168.239.128,192.168.239.129,192.168.239.130
#auth_cluster_required = cephx
#auth_service_required = cephx
#auth_client_required = cephx
[global]
fsid = 36c5aa41-dc4c-424e-9adc-1c052929971b
mon_initial_members = cephstor01, cephstor02, cephstor03
mon_host = 192.168.239.128,192.168.239.129,192.168.239.130
auth_cluster_required = cephx
auth_service_required = cephx
auth_client_required = cephx
cluster network = 192.168.85.0/24
public network = 192.168.239.0/24
osd pool default size = 2
---
149 ceph-deploy new cephstor01 cephstor02 cephstor03
150 ca ceph.conf
151 cat ceph.conf
152 cat ~/ceph/ceph.conf
153 vi ceph.conf
154 cat ceph.conf
155 ip r
156 vi ceph.conf
157 ceph-deploy install --release luminous cephstor1 cephstor2 cephstor3
ceph-deploy mon create-initial
which will
1. do mon create on each mon in the mon_initial_quorum set in ceph.conf
2. wait for them to form a quorum
3. gatherkeys
219 ceph-authtool --create-keyring /tmp/ceph.mon.keyring --gen-key -n mon. --cap mon 'allow *'
220 sudo ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring --gen-key -n client.admin --set-uid=0 --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow *' --cap mgr 'allow *'
221 sudo ceph-authtool --create-keyring /var/lib/ceph/bootstrap-osd/ceph.keyring --gen-key -n client.bootstrap-osd --cap mon 'profile bootstrap-osd'
222 sudo ceph-authtool /tmp/ceph.mon.keyring --import-keyring /etc/ceph/ceph.client.admin.keyring
223 sudo ceph-authtool /tmp/ceph.mon.keyring --import-keyring /var/lib/ceph/bootstrap-osd/ceph.keyring
224 ll /etc/ceph/ceph.client.admin.keyring
225 ll /etc/ceph/
226 sudo chmod +r /etc/ceph/ceph.client.admin.keyring
227 scp /etc/ceph/ceph.client.admin.keyring cephstor01:
228 scp /etc/ceph/ceph.client.admin.keyring cephstor02:
229 scp /etc/ceph/ceph.client.admin.keyring cephstor03:
230 ssh cephstor02 \ sudo cp ceph.client.admin.keyring /etc/ceph/ceph.client.admin.keyring
231 ssh cephstor03 \ sudo cp ceph.client.admin.keyring /etc/ceph/ceph.client.admin.keyring
158 source /etc/rc.local
159 sudo source /etc/rc.local
160 bash /etc/rc.local
161 sudo bash /etc/rc.local
162 ssh cephstor02
163 ssh cephstor03
164 ceph-deploy install --release mimic cephstor01 cephstor02 cephstor03
165 ceph-deploy mon create-initial
172 ceph-deploy --overwrite-conf mon create-initial
173 sudo ceph health
174 ceph-deploy admin cephstor01 cephstor02 cephstor03
175 ls /etc/ceph/ceph.client.admin.keyring
176 ll /etc/ceph/ceph.client.admin.keyring
177 +sudo chmod +r /etc/ceph/ceph.client.admin.keyring
178 sudo chmod +r /etc/ceph/ceph.client.admin.keyring
179 ssh cephstor02 \ sudo chmod +r /etc/ceph/ceph.client.admin.keyring
180 ssh cephstor03 \ sudo chmod +r /etc/ceph/ceph.client.admin.keyring
181 sudo ceph health
182 ceph-deploy mgr cephstor01 cephstor02 cephstor03
183 ceph-deploy mgr create cephstor01 cephstor02 cephstor03
184 sudo ceph hea+65lth
185 sudo ceph health
186 history
#######################
sudo apt-get -y install ceph-deploy ceph-common ceph-mds python-minimal ; ssh cephstor2 \ "sudo apt-get -y install ceph-deploy ceph-common ceph-mds python-minimal" ; ssh cephstor3 \ "sudo apt-get -y install ceph-deploy ceph-common ceph-mds python-minimal"
########################
---On ALL Nodes---
wget -q -O- 'https://download.ceph.com/keys/release.asc' | sudo apt-key add -
lsb_release -a
apt-add-repository 'deb https://download.ceph.com/debian-mimic/ bionic main'
apt update
###### Ubuntu Main Repos
deb http://in.archive.ubuntu.com/ubuntu/ bionic main restricted universe
deb-src http://in.archive.ubuntu.com/ubuntu/ bionic main restricted universe
root@cephstor3:~# cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.239.11 cephstor1
192.168.239.12 cephstor2
192.168.239.13 cephstor3
root@cephstor3:~# cat /etc/network/interfaces
auto ens33
iface ens33 inet static
address 192.168.85.13
netmask 255.255.255.0
gateway 192.168.85.2
dns-nameservers 8.8.8.8
auto ens38
iface ens38 inet static
address 192.168.239.13
netmask 255.255.255.0
echo -e 'Defaults:cephuser !requiretty\ncephuser ALL = (root) NOPASSWD:ALL' | tee /etc/sudoers.d/cephuser
root@ctrl01:~# cat /etc/sudoers.d/ceph
Defaults:fortunath !requiretty
fortunath ALL = (root) NOPASSWD:ALL
---on Deployserver node---
fortunath@cephstor01:~$ ssh-keygen
fortunath@cephstor01:~$ vi ~/.ssh/config
fortunath@cephstor01:~$ cat ~/.ssh/config
# create new ( define all nodes and users )
Host cephstor01
Hostname cephstor01
User fortunath
Host cephstor02
Hostname cephstor02
User fortunath
Host cephstor03
Hostname cephstor03
User fortunath
---
ssh-copy-id cephstor03
ssh-copy-id cephstor02
-----On ALL Nodes---
fortunath@cephstor01:~$ cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.239.130 cephstor03
192.168.239.129 cephstor02
192.168.239.128 cephstor012
----
ensure true in:
fortunath@ctrl01:~$ grep preserve_hostname /etc/cloud/cloud.cfg
preserve_hostname: true
--
curl https://repogen.simplylinux.ch/txt/bionic/sources_fad62524984e5e894141cfb0002fbf836014d01d.txt | sudo tee -a /etc/apt/sources.list
--
https://www.server-world.info/en/note?os=Ubuntu_16.04&p=ceph&f=1
https://gist.github.com/vanduc95/a17f80d0636badd9aa002f2b493b777b
---On ALL Nodes---
apt-get update && apt-get -y upgrade ; apt-get install python-minimal
--
apt-get -y install chrony
insert /etc/chrony/chrony.conf
--
pool 0.asia.pool.ntp.org iburst maxsources 4
pool 1.asia.pool.ntp.org iburst maxsources 1
pool 2.asia.pool.ntp.org iburst maxsources 1
pool 3.asia.pool.ntp.org iburst maxsources 2
----
64 vi /etc/chrony/chrony.conf
65 scp /etc/chrony/chrony.conf cephstor2:/etc/chrony/chrony.conf
66 scp /etc/chrony/chrony.conf cephstor3:/etc/chrony/chrony.conf
67 service chrony restart
68 ssh cephstor2 \ service chrony restart
69 ssh cephstor3 \ service chrony restart
70 for i in stop disable; do ssh cephstor2 \ systemctl $i ufw; done
71 for i in stop disable; do ssh cephstor3 \ systemctl $i ufw; done
72 for i in stop disable; do ssh cephstor1 \ systemctl $i ufw; done
--
fortunath@cephstor01:~$ cat /etc/rc.local
echo nameserver 8.8.8.8 > /etc/resolv.conf
fortunath@cephstor01:~$ ll /etc/rc.local
-rwxr-xr-x 1 root root 43 Oct 4 18:00 /etc/rc.local*
---
apt-get install ceph-deploy
mkdir cluster
cd cluster
ceph-deploy new ceph1 ceph2 ceph3
--
fortunath@cephstor01:~/cluster$ cat ceph.conf
#[global]
#fsid = c3289b18-9d58-432e-8cf1-a107691edcb0
#mon_initial_members = cephstor01, cephstor02, cephstor03
#mon_host = 192.168.239.128,192.168.239.129,192.168.239.130
#auth_cluster_required = cephx
#auth_service_required = cephx
#auth_client_required = cephx
[global]
fsid = 36c5aa41-dc4c-424e-9adc-1c052929971b
mon_initial_members = cephstor01, cephstor02, cephstor03
mon_host = 192.168.239.128,192.168.239.129,192.168.239.130
auth_cluster_required = cephx
auth_service_required = cephx
auth_client_required = cephx
cluster network = 192.168.85.0/24
public network = 192.168.239.0/24
osd pool default size = 2
---
149 ceph-deploy new cephstor01 cephstor02 cephstor03
150 ca ceph.conf
151 cat ceph.conf
152 cat ~/ceph/ceph.conf
153 vi ceph.conf
154 cat ceph.conf
155 ip r
156 vi ceph.conf
157 ceph-deploy install --release luminous cephstor1 cephstor2 cephstor3
ceph-deploy mon create-initial
which will
1. do mon create on each mon in the mon_initial_quorum set in ceph.conf
2. wait for them to form a quorum
3. gatherkeys
219 ceph-authtool --create-keyring /tmp/ceph.mon.keyring --gen-key -n mon. --cap mon 'allow *'
220 sudo ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring --gen-key -n client.admin --set-uid=0 --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow *' --cap mgr 'allow *'
221 sudo ceph-authtool --create-keyring /var/lib/ceph/bootstrap-osd/ceph.keyring --gen-key -n client.bootstrap-osd --cap mon 'profile bootstrap-osd'
222 sudo ceph-authtool /tmp/ceph.mon.keyring --import-keyring /etc/ceph/ceph.client.admin.keyring
223 sudo ceph-authtool /tmp/ceph.mon.keyring --import-keyring /var/lib/ceph/bootstrap-osd/ceph.keyring
224 ll /etc/ceph/ceph.client.admin.keyring
225 ll /etc/ceph/
226 sudo chmod +r /etc/ceph/ceph.client.admin.keyring
227 scp /etc/ceph/ceph.client.admin.keyring cephstor01:
228 scp /etc/ceph/ceph.client.admin.keyring cephstor02:
229 scp /etc/ceph/ceph.client.admin.keyring cephstor03:
230 ssh cephstor02 \ sudo cp ceph.client.admin.keyring /etc/ceph/ceph.client.admin.keyring
231 ssh cephstor03 \ sudo cp ceph.client.admin.keyring /etc/ceph/ceph.client.admin.keyring
158 source /etc/rc.local
159 sudo source /etc/rc.local
160 bash /etc/rc.local
161 sudo bash /etc/rc.local
162 ssh cephstor02
163 ssh cephstor03
164 ceph-deploy install --release mimic cephstor01 cephstor02 cephstor03
165 ceph-deploy mon create-initial
172 ceph-deploy --overwrite-conf mon create-initial
173 sudo ceph health
174 ceph-deploy admin cephstor01 cephstor02 cephstor03
175 ls /etc/ceph/ceph.client.admin.keyring
176 ll /etc/ceph/ceph.client.admin.keyring
177 +sudo chmod +r /etc/ceph/ceph.client.admin.keyring
178 sudo chmod +r /etc/ceph/ceph.client.admin.keyring
179 ssh cephstor02 \ sudo chmod +r /etc/ceph/ceph.client.admin.keyring
180 ssh cephstor03 \ sudo chmod +r /etc/ceph/ceph.client.admin.keyring
181 sudo ceph health
182 ceph-deploy mgr cephstor01 cephstor02 cephstor03
183 ceph-deploy mgr create cephstor01 cephstor02 cephstor03
184 sudo ceph hea+65lth
185 sudo ceph health
186 history
#######################
sudo apt-get -y install ceph-deploy ceph-common ceph-mds python-minimal ; ssh cephstor2 \ "sudo apt-get -y install ceph-deploy ceph-common ceph-mds python-minimal" ; ssh cephstor3 \ "sudo apt-get -y install ceph-deploy ceph-common ceph-mds python-minimal"
########################
##For all opensource software USE only main repos####
---On ALL Nodes---
wget -q -O- 'https://download.ceph.com/keys/release.asc' | sudo apt-key add -
lsb_release -a
apt-add-repository 'deb https://download.ceph.com/debian-mimic/ bionic main'
apt update
###### Ubuntu Main Repos
deb http://in.archive.ubuntu.com/ubuntu/ bionic main restricted universe
deb-src http://in.archive.ubuntu.com/ubuntu/ bionic main restricted universe
root@cephstor3:~# cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.239.11 cephstor1
192.168.239.12 cephstor2
192.168.239.13 cephstor3
root@cephstor3:~# cat /etc/network/interfaces
auto ens33
iface ens33 inet static
address 192.168.85.13
netmask 255.255.255.0
gateway 192.168.85.2
dns-nameservers 8.8.8.8
auto ens38
iface ens38 inet static
address 192.168.239.13
netmask 255.255.255.0
echo -e 'Defaults:cephuser !requiretty\ncephuser ALL = (root) NOPASSWD:ALL' | tee /etc/sudoers.d/cephuser
root@ctrl01:~# cat /etc/sudoers.d/ceph
Defaults:fortunath !requiretty
fortunath ALL = (root) NOPASSWD:ALL
---on Deployserver node---
fortunath@cephstor01:~$ ssh-keygen
fortunath@cephstor01:~$ vi ~/.ssh/config
fortunath@cephstor01:~$ cat ~/.ssh/config
# create new ( define all nodes and users )
Host cephstor01
Hostname cephstor01
User fortunath
Host cephstor02
Hostname cephstor02
User fortunath
Host cephstor03
Hostname cephstor03
User fortunath
---
ssh-copy-id cephstor03
ssh-copy-id cephstor02
-----On ALL Nodes---
fortunath@cephstor01:~$ cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.239.130 cephstor03
192.168.239.129 cephstor02
192.168.239.128 cephstor012
----
ensure true in:
fortunath@ctrl01:~$ grep preserve_hostname /etc/cloud/cloud.cfg
preserve_hostname: true
--
curl https://repogen.simplylinux.ch/txt/bionic/sources_fad62524984e5e894141cfb0002fbf836014d01d.txt | sudo tee -a /etc/apt/sources.list
--
https://www.server-world.info/en/note?os=Ubuntu_16.04&p=ceph&f=1
https://gist.github.com/vanduc95/a17f80d0636badd9aa002f2b493b777b
---On ALL Nodes---
apt-get update && apt-get -y upgrade ; apt-get install python-minimal
--
apt-get -y install chrony
insert /etc/chrony/chrony.conf
--
pool 0.asia.pool.ntp.org iburst maxsources 4
pool 1.asia.pool.ntp.org iburst maxsources 1
pool 2.asia.pool.ntp.org iburst maxsources 1
pool 3.asia.pool.ntp.org iburst maxsources 2
----
64 vi /etc/chrony/chrony.conf
65 scp /etc/chrony/chrony.conf cephstor2:/etc/chrony/chrony.conf
66 scp /etc/chrony/chrony.conf cephstor3:/etc/chrony/chrony.conf
67 service chrony restart
68 ssh cephstor2 \ service chrony restart
69 ssh cephstor3 \ service chrony restart
70 for i in stop disable; do ssh cephstor2 \ systemctl $i ufw; done
71 for i in stop disable; do ssh cephstor3 \ systemctl $i ufw; done
72 for i in stop disable; do ssh cephstor1 \ systemctl $i ufw; done
--
fortunath@cephstor01:~$ cat /etc/rc.local
echo nameserver 8.8.8.8 > /etc/resolv.conf
fortunath@cephstor01:~$ ll /etc/rc.local
-rwxr-xr-x 1 root root 43 Oct 4 18:00 /etc/rc.local*
---
apt-get install ceph-deploy
mkdir cluster
cd cluster
ceph-deploy new ceph1 ceph2 ceph3
--
fortunath@cephstor01:~/cluster$ cat ceph.conf
#[global]
#fsid = c3289b18-9d58-432e-8cf1-a107691edcb0
#mon_initial_members = cephstor01, cephstor02, cephstor03
#mon_host = 192.168.239.128,192.168.239.129,192.168.239.130
#auth_cluster_required = cephx
#auth_service_required = cephx
#auth_client_required = cephx
[global]
fsid = 36c5aa41-dc4c-424e-9adc-1c052929971b
mon_initial_members = cephstor01, cephstor02, cephstor03
mon_host = 192.168.239.128,192.168.239.129,192.168.239.130
auth_cluster_required = cephx
auth_service_required = cephx
auth_client_required = cephx
cluster network = 192.168.85.0/24
public network = 192.168.239.0/24
osd pool default size = 2
---
149 ceph-deploy new cephstor01 cephstor02 cephstor03
150 ca ceph.conf
151 cat ceph.conf
152 cat ~/ceph/ceph.conf
153 vi ceph.conf
154 cat ceph.conf
155 ip r
156 vi ceph.conf
157 ceph-deploy install --release luminous cephstor1 cephstor2 cephstor3
ceph-deploy mon create-initial
which will
1. do mon create on each mon in the mon_initial_quorum set in ceph.conf
2. wait for them to form a quorum
3. gatherkeys
219 ceph-authtool --create-keyring /tmp/ceph.mon.keyring --gen-key -n mon. --cap mon 'allow *'
220 sudo ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring --gen-key -n client.admin --set-uid=0 --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow *' --cap mgr 'allow *'
221 sudo ceph-authtool --create-keyring /var/lib/ceph/bootstrap-osd/ceph.keyring --gen-key -n client.bootstrap-osd --cap mon 'profile bootstrap-osd'
222 sudo ceph-authtool /tmp/ceph.mon.keyring --import-keyring /etc/ceph/ceph.client.admin.keyring
223 sudo ceph-authtool /tmp/ceph.mon.keyring --import-keyring /var/lib/ceph/bootstrap-osd/ceph.keyring
224 ll /etc/ceph/ceph.client.admin.keyring
225 ll /etc/ceph/
226 sudo chmod +r /etc/ceph/ceph.client.admin.keyring
227 scp /etc/ceph/ceph.client.admin.keyring cephstor01:
228 scp /etc/ceph/ceph.client.admin.keyring cephstor02:
229 scp /etc/ceph/ceph.client.admin.keyring cephstor03:
230 ssh cephstor02 \ sudo cp ceph.client.admin.keyring /etc/ceph/ceph.client.admin.keyring
231 ssh cephstor03 \ sudo cp ceph.client.admin.keyring /etc/ceph/ceph.client.admin.keyring
158 source /etc/rc.local
159 sudo source /etc/rc.local
160 bash /etc/rc.local
161 sudo bash /etc/rc.local
162 ssh cephstor02
163 ssh cephstor03
164 ceph-deploy install --release mimic cephstor01 cephstor02 cephstor03
165 ceph-deploy mon create-initial
172 ceph-deploy --overwrite-conf mon create-initial
173 sudo ceph health
174 ceph-deploy admin cephstor01 cephstor02 cephstor03
175 ls /etc/ceph/ceph.client.admin.keyring
176 ll /etc/ceph/ceph.client.admin.keyring
177 +sudo chmod +r /etc/ceph/ceph.client.admin.keyring
178 sudo chmod +r /etc/ceph/ceph.client.admin.keyring
179 ssh cephstor02 \ sudo chmod +r /etc/ceph/ceph.client.admin.keyring
180 ssh cephstor03 \ sudo chmod +r /etc/ceph/ceph.client.admin.keyring
181 sudo ceph health
182 ceph-deploy mgr cephstor01 cephstor02 cephstor03
183 ceph-deploy mgr create cephstor01 cephstor02 cephstor03
184 sudo ceph hea+65lth
185 sudo ceph health
186 history
#######################
sudo apt-get -y install ceph-deploy ceph-common ceph-mds python-minimal ; ssh cephstor2 \ "sudo apt-get -y install ceph-deploy ceph-common ceph-mds python-minimal" ; ssh cephstor3 \ "sudo apt-get -y install ceph-deploy ceph-common ceph-mds python-minimal"
########################
##For all opensource software USE only main repos####
---On ALL Nodes---
wget -q -O- 'https://download.ceph.com/keys/release.asc' | sudo apt-key add -
lsb_release -a
apt-add-repository 'deb https://download.ceph.com/debian-mimic/ bionic main'
apt update
###### Ubuntu Main Repos
deb http://in.archive.ubuntu.com/ubuntu/ bionic main restricted universe
deb-src http://in.archive.ubuntu.com/ubuntu/ bionic main restricted universe
root@cephstor3:~# cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.239.11 cephstor1
192.168.239.12 cephstor2
192.168.239.13 cephstor3
root@cephstor3:~# cat /etc/network/interfaces
auto ens33
iface ens33 inet static
address 192.168.85.13
netmask 255.255.255.0
gateway 192.168.85.2
dns-nameservers 8.8.8.8
auto ens38
iface ens38 inet static
address 192.168.239.13
netmask 255.255.255.0
echo -e 'Defaults:cephuser !requiretty\ncephuser ALL = (root) NOPASSWD:ALL' | tee /etc/sudoers.d/cephuser
root@ctrl01:~# cat /etc/sudoers.d/ceph
Defaults:fortunath !requiretty
fortunath ALL = (root) NOPASSWD:ALL
---on Deployserver node---
fortunath@cephstor01:~$ ssh-keygen
fortunath@cephstor01:~$ vi ~/.ssh/config
fortunath@cephstor01:~$ cat ~/.ssh/config
# create new ( define all nodes and users )
Host cephstor01
Hostname cephstor01
User fortunath
Host cephstor02
Hostname cephstor02
User fortunath
Host cephstor03
Hostname cephstor03
User fortunath
---
ssh-copy-id cephstor03
ssh-copy-id cephstor02
-----On ALL Nodes---
fortunath@cephstor01:~$ cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.239.130 cephstor03
192.168.239.129 cephstor02
192.168.239.128 cephstor012
----
ensure true in:
fortunath@ctrl01:~$ grep preserve_hostname /etc/cloud/cloud.cfg
preserve_hostname: true
--
curl https://repogen.simplylinux.ch/txt/bionic/sources_fad62524984e5e894141cfb0002fbf836014d01d.txt | sudo tee -a /etc/apt/sources.list
--
https://www.server-world.info/en/note?os=Ubuntu_16.04&p=ceph&f=1
https://gist.github.com/vanduc95/a17f80d0636badd9aa002f2b493b777b
---On ALL Nodes---
apt-get update && apt-get -y upgrade ; apt-get install python-minimal
--
apt-get -y install chrony
insert /etc/chrony/chrony.conf
--
pool 0.asia.pool.ntp.org iburst maxsources 4
pool 1.asia.pool.ntp.org iburst maxsources 1
pool 2.asia.pool.ntp.org iburst maxsources 1
pool 3.asia.pool.ntp.org iburst maxsources 2
----
64 vi /etc/chrony/chrony.conf
65 scp /etc/chrony/chrony.conf cephstor2:/etc/chrony/chrony.conf
66 scp /etc/chrony/chrony.conf cephstor3:/etc/chrony/chrony.conf
67 service chrony restart
68 ssh cephstor2 \ service chrony restart
69 ssh cephstor3 \ service chrony restart
70 for i in stop disable; do ssh cephstor2 \ systemctl $i ufw; done
71 for i in stop disable; do ssh cephstor3 \ systemctl $i ufw; done
72 for i in stop disable; do ssh cephstor1 \ systemctl $i ufw; done
--
fortunath@cephstor01:~$ cat /etc/rc.local
echo nameserver 8.8.8.8 > /etc/resolv.conf
fortunath@cephstor01:~$ ll /etc/rc.local
-rwxr-xr-x 1 root root 43 Oct 4 18:00 /etc/rc.local*
---
apt-get install ceph-deploy
mkdir cluster
cd cluster
ceph-deploy new ceph1 ceph2 ceph3
--
fortunath@cephstor01:~/cluster$ cat ceph.conf
#[global]
#fsid = c3289b18-9d58-432e-8cf1-a107691edcb0
#mon_initial_members = cephstor01, cephstor02, cephstor03
#mon_host = 192.168.239.128,192.168.239.129,192.168.239.130
#auth_cluster_required = cephx
#auth_service_required = cephx
#auth_client_required = cephx
[global]
fsid = 36c5aa41-dc4c-424e-9adc-1c052929971b
mon_initial_members = cephstor01, cephstor02, cephstor03
mon_host = 192.168.239.128,192.168.239.129,192.168.239.130
auth_cluster_required = cephx
auth_service_required = cephx
auth_client_required = cephx
cluster network = 192.168.85.0/24
public network = 192.168.239.0/24
osd pool default size = 2
---
149 ceph-deploy new cephstor01 cephstor02 cephstor03
150 ca ceph.conf
151 cat ceph.conf
152 cat ~/ceph/ceph.conf
153 vi ceph.conf
154 cat ceph.conf
155 ip r
156 vi ceph.conf
157 ceph-deploy install --release luminous cephstor1 cephstor2 cephstor3
ceph-deploy mon create-initial
which will
1. do mon create on each mon in the mon_initial_quorum set in ceph.conf
2. wait for them to form a quorum
3. gatherkeys
219 ceph-authtool --create-keyring /tmp/ceph.mon.keyring --gen-key -n mon. --cap mon 'allow *'
220 sudo ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring --gen-key -n client.admin --set-uid=0 --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow *' --cap mgr 'allow *'
221 sudo ceph-authtool --create-keyring /var/lib/ceph/bootstrap-osd/ceph.keyring --gen-key -n client.bootstrap-osd --cap mon 'profile bootstrap-osd'
222 sudo ceph-authtool /tmp/ceph.mon.keyring --import-keyring /etc/ceph/ceph.client.admin.keyring
223 sudo ceph-authtool /tmp/ceph.mon.keyring --import-keyring /var/lib/ceph/bootstrap-osd/ceph.keyring
224 ll /etc/ceph/ceph.client.admin.keyring
225 ll /etc/ceph/
226 sudo chmod +r /etc/ceph/ceph.client.admin.keyring
227 scp /etc/ceph/ceph.client.admin.keyring cephstor01:
228 scp /etc/ceph/ceph.client.admin.keyring cephstor02:
229 scp /etc/ceph/ceph.client.admin.keyring cephstor03:
230 ssh cephstor02 \ sudo cp ceph.client.admin.keyring /etc/ceph/ceph.client.admin.keyring
231 ssh cephstor03 \ sudo cp ceph.client.admin.keyring /etc/ceph/ceph.client.admin.keyring
158 source /etc/rc.local
159 sudo source /etc/rc.local
160 bash /etc/rc.local
161 sudo bash /etc/rc.local
162 ssh cephstor02
163 ssh cephstor03
164 ceph-deploy install --release mimic cephstor01 cephstor02 cephstor03
165 ceph-deploy mon create-initial
172 ceph-deploy --overwrite-conf mon create-initial
173 sudo ceph health
174 ceph-deploy admin cephstor01 cephstor02 cephstor03
175 ls /etc/ceph/ceph.client.admin.keyring
176 ll /etc/ceph/ceph.client.admin.keyring
177 +sudo chmod +r /etc/ceph/ceph.client.admin.keyring
178 sudo chmod +r /etc/ceph/ceph.client.admin.keyring
179 ssh cephstor02 \ sudo chmod +r /etc/ceph/ceph.client.admin.keyring
180 ssh cephstor03 \ sudo chmod +r /etc/ceph/ceph.client.admin.keyring
181 sudo ceph health
182 ceph-deploy mgr cephstor01 cephstor02 cephstor03
183 ceph-deploy mgr create cephstor01 cephstor02 cephstor03
184 sudo ceph hea+65lth
185 sudo ceph health
186 history
#######################
sudo apt-get -y install ceph-deploy ceph-common ceph-mds python-minimal ; ssh cephstor2 \ "sudo apt-get -y install ceph-deploy ceph-common ceph-mds python-minimal" ; ssh cephstor3 \ "sudo apt-get -y install ceph-deploy ceph-common ceph-mds python-minimal"
########################
##For all opensource software USE only main repos####
---On ALL Nodes---
wget -q -O- 'https://download.ceph.com/keys/release.asc' | sudo apt-key add -
lsb_release -a
apt-add-repository 'deb https://download.ceph.com/debian-mimic/ bionic main'
apt update
###### Ubuntu Main Repos
deb http://in.archive.ubuntu.com/ubuntu/ bionic main restricted universe
deb-src http://in.archive.ubuntu.com/ubuntu/ bionic main restricted universe
root@cephstor3:~# cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.239.11 cephstor1
192.168.239.12 cephstor2
192.168.239.13 cephstor3
root@cephstor3:~# cat /etc/network/interfaces
auto ens33
iface ens33 inet static
address 192.168.85.13
netmask 255.255.255.0
gateway 192.168.85.2
dns-nameservers 8.8.8.8
auto ens38
iface ens38 inet static
address 192.168.239.13
netmask 255.255.255.0
echo -e 'Defaults:cephuser !requiretty\ncephuser ALL = (root) NOPASSWD:ALL' | tee /etc/sudoers.d/cephuser
root@ctrl01:~# cat /etc/sudoers.d/ceph
Defaults:fortunath !requiretty
fortunath ALL = (root) NOPASSWD:ALL
---on Deployserver node---
fortunath@cephstor01:~$ ssh-keygen
fortunath@cephstor01:~$ vi ~/.ssh/config
fortunath@cephstor01:~$ cat ~/.ssh/config
# create new ( define all nodes and users )
Host cephstor01
Hostname cephstor01
User fortunath
Host cephstor02
Hostname cephstor02
User fortunath
Host cephstor03
Hostname cephstor03
User fortunath
---
ssh-copy-id cephstor03
ssh-copy-id cephstor02
-----On ALL Nodes---
fortunath@cephstor01:~$ cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.239.130 cephstor03
192.168.239.129 cephstor02
192.168.239.128 cephstor012
----
ensure true in:
fortunath@ctrl01:~$ grep preserve_hostname /etc/cloud/cloud.cfg
preserve_hostname: true
--
curl https://repogen.simplylinux.ch/txt/bionic/sources_fad62524984e5e894141cfb0002fbf836014d01d.txt | sudo tee -a /etc/apt/sources.list
--
https://www.server-world.info/en/note?os=Ubuntu_16.04&p=ceph&f=1
https://gist.github.com/vanduc95/a17f80d0636badd9aa002f2b493b777b
---On ALL Nodes---
apt-get update && apt-get -y upgrade ; apt-get install python-minimal
--
apt-get -y install chrony
insert /etc/chrony/chrony.conf
--
pool 0.asia.pool.ntp.org iburst maxsources 4
pool 1.asia.pool.ntp.org iburst maxsources 1
pool 2.asia.pool.ntp.org iburst maxsources 1
pool 3.asia.pool.ntp.org iburst maxsources 2
----
64 vi /etc/chrony/chrony.conf
65 scp /etc/chrony/chrony.conf cephstor2:/etc/chrony/chrony.conf
66 scp /etc/chrony/chrony.conf cephstor3:/etc/chrony/chrony.conf
67 service chrony restart
68 ssh cephstor2 \ service chrony restart
69 ssh cephstor3 \ service chrony restart
70 for i in stop disable; do ssh cephstor2 \ systemctl $i ufw; done
71 for i in stop disable; do ssh cephstor3 \ systemctl $i ufw; done
72 for i in stop disable; do ssh cephstor1 \ systemctl $i ufw; done
--
fortunath@cephstor01:~$ cat /etc/rc.local
echo nameserver 8.8.8.8 > /etc/resolv.conf
fortunath@cephstor01:~$ ll /etc/rc.local
-rwxr-xr-x 1 root root 43 Oct 4 18:00 /etc/rc.local*
---
apt-get install ceph-deploy
mkdir cluster
cd cluster
ceph-deploy new ceph1 ceph2 ceph3
--
fortunath@cephstor01:~/cluster$ cat ceph.conf
#[global]
#fsid = c3289b18-9d58-432e-8cf1-a107691edcb0
#mon_initial_members = cephstor01, cephstor02, cephstor03
#mon_host = 192.168.239.128,192.168.239.129,192.168.239.130
#auth_cluster_required = cephx
#auth_service_required = cephx
#auth_client_required = cephx
[global]
fsid = 36c5aa41-dc4c-424e-9adc-1c052929971b
mon_initial_members = cephstor01, cephstor02, cephstor03
mon_host = 192.168.239.128,192.168.239.129,192.168.239.130
auth_cluster_required = cephx
auth_service_required = cephx
auth_client_required = cephx
cluster network = 192.168.85.0/24
public network = 192.168.239.0/24
osd pool default size = 2
---
149 ceph-deploy new cephstor01 cephstor02 cephstor03
150 ca ceph.conf
151 cat ceph.conf
152 cat ~/ceph/ceph.conf
153 vi ceph.conf
154 cat ceph.conf
155 ip r
156 vi ceph.conf
157 ceph-deploy install --release luminous cephstor1 cephstor2 cephstor3
ceph-deploy mon create-initial
which will
1. do mon create on each mon in the mon_initial_quorum set in ceph.conf
2. wait for them to form a quorum
3. gatherkeys
219 ceph-authtool --create-keyring /tmp/ceph.mon.keyring --gen-key -n mon. --cap mon 'allow *'
220 sudo ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring --gen-key -n client.admin --set-uid=0 --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow *' --cap mgr 'allow *'
221 sudo ceph-authtool --create-keyring /var/lib/ceph/bootstrap-osd/ceph.keyring --gen-key -n client.bootstrap-osd --cap mon 'profile bootstrap-osd'
222 sudo ceph-authtool /tmp/ceph.mon.keyring --import-keyring /etc/ceph/ceph.client.admin.keyring
223 sudo ceph-authtool /tmp/ceph.mon.keyring --import-keyring /var/lib/ceph/bootstrap-osd/ceph.keyring
224 ll /etc/ceph/ceph.client.admin.keyring
225 ll /etc/ceph/
226 sudo chmod +r /etc/ceph/ceph.client.admin.keyring
227 scp /etc/ceph/ceph.client.admin.keyring cephstor01:
228 scp /etc/ceph/ceph.client.admin.keyring cephstor02:
229 scp /etc/ceph/ceph.client.admin.keyring cephstor03:
230 ssh cephstor02 \ sudo cp ceph.client.admin.keyring /etc/ceph/ceph.client.admin.keyring
231 ssh cephstor03 \ sudo cp ceph.client.admin.keyring /etc/ceph/ceph.client.admin.keyring
158 source /etc/rc.local
159 sudo source /etc/rc.local
160 bash /etc/rc.local
161 sudo bash /etc/rc.local
162 ssh cephstor02
163 ssh cephstor03
164 ceph-deploy install --release mimic cephstor01 cephstor02 cephstor03
165 ceph-deploy mon create-initial
172 ceph-deploy --overwrite-conf mon create-initial
173 sudo ceph health
174 ceph-deploy admin cephstor01 cephstor02 cephstor03
175 ls /etc/ceph/ceph.client.admin.keyring
176 ll /etc/ceph/ceph.client.admin.keyring
177 +sudo chmod +r /etc/ceph/ceph.client.admin.keyring
178 sudo chmod +r /etc/ceph/ceph.client.admin.keyring
179 ssh cephstor02 \ sudo chmod +r /etc/ceph/ceph.client.admin.keyring
180 ssh cephstor03 \ sudo chmod +r /etc/ceph/ceph.client.admin.keyring
181 sudo ceph health
182 ceph-deploy mgr cephstor01 cephstor02 cephstor03
183 ceph-deploy mgr create cephstor01 cephstor02 cephstor03
184 sudo ceph hea+65lth
185 sudo ceph health
186 history
#######################
sudo apt-get -y install ceph-deploy ceph-common ceph-mds python-minimal ; ssh cephstor2 \ "sudo apt-get -y install ceph-deploy ceph-common ceph-mds python-minimal" ; ssh cephstor3 \ "sudo apt-get -y install ceph-deploy ceph-common ceph-mds python-minimal"
########################
No comments:
Post a Comment