{"id":285,"date":"2020-12-28T17:08:19","date_gmt":"2020-12-28T17:08:19","guid":{"rendered":"http:\/\/cephswift.com\/?page_id=285"},"modified":"2020-12-28T17:08:19","modified_gmt":"2020-12-28T17:08:19","slug":"centos7_podman_ceph_cluster_init_setup-sh","status":"publish","type":"page","link":"https:\/\/cephswift.com\/index.php\/centos7_podman_ceph_cluster_init_setup-sh\/","title":{"rendered":"centos7_podman_ceph_cluster_init_setup.sh"},"content":{"rendered":"<p>## boot order setup<br \/>\n# echo &#8220;HOSTNAME&#8221; &gt; \/etc\/hostname<br \/>\n# grub2-mkconfig -o \/boot\/grub2\/grub.cfg; yum install yum-utils -y; package-cleanup &#8211;oldkernels &#8211;count=2; reboot;<br \/>\n#<br \/>\n## pre-config for ntp`<br \/>\nyum install ntp ntpdate -y;<br \/>\nsystemctl start ntpd<br \/>\nsystemctl enable ntpd<br \/>\nntpdate -u -s 0.centos.pool.ntp.org 1.centos.pool.ntp.org 2.centos.pool.ntp.org<br \/>\nsystemctl restart ntpd<br \/>\n#systemctl status ntpd<br \/>\ntimedatectl<br \/>\nhwclock -w<\/p>\n<p>#######################################################################################<br \/>\n## software install<br \/>\nyum update<br \/>\nyum install podman -y;<br \/>\npodman info<br \/>\nyum install -y python3<br \/>\ncurl &#8211;silent &#8211;remote-name &#8211;location https:\/\/github.com\/ceph\/ceph\/raw\/octopus\/src\/cephadm\/cephadm<br \/>\nchmod +x cephadm<br \/>\nmkdir -p \/etc\/ceph<br \/>\n.\/cephadm add-repo &#8211;release octopus;<br \/>\n.\/cephadm install cephadm ceph-common;<br \/>\nblu@test1:~$ vi centos7_podman_ceph_cluster_init_setup.sh<br \/>\nblu@test1:~$ cat centos7_podman_ceph_cluster_init_setup.sh<br \/>\n## boot order setup<br \/>\n# echo &#8220;HOSTNAME&#8221; &gt; \/etc\/hostname<br \/>\n# grub2-mkconfig -o \/boot\/grub2\/grub.cfg; yum install yum-utils -y; package-cleanup &#8211;oldkernels &#8211;count=2; reboot;<br \/>\n#<br \/>\n## pre-config for ntp`<br \/>\nyum install ntp ntpdate -y;<br \/>\nsystemctl start ntpd<br \/>\nsystemctl enable ntpd<br \/>\nntpdate -u -s 0.centos.pool.ntp.org 1.centos.pool.ntp.org 2.centos.pool.ntp.org<br \/>\nsystemctl restart ntpd<br \/>\n#systemctl status ntpd<br \/>\ntimedatectl<br \/>\nhwclock -w<\/p>\n<p>#######################################################################################<br \/>\n## software install<br \/>\nyum update<br \/>\nyum install podman -y;<br \/>\npodman info<br \/>\nyum install -y python3<br \/>\ncurl &#8211;silent &#8211;remote-name &#8211;location https:\/\/github.com\/ceph\/ceph\/raw\/octopus\/src\/cephadm\/cephadm<br \/>\nchmod +x cephadm<br \/>\nmkdir -p \/etc\/ceph<br \/>\n.\/cephadm add-repo &#8211;release octopus;<br \/>\n.\/cephadm install cephadm ceph-common;<br \/>\n########################################################################################<br \/>\n## cluster setup<br \/>\n.\/cephadm bootstrap &#8211;mon-ip &lt;1st_mon_node_ip&gt;<br \/>\nssh-copy-id -f -i \/etc\/ceph\/ceph.pub root@&lt;2nd_hostname&gt;<br \/>\nssh-copy-id -f -i \/etc\/ceph\/ceph.pub root@&lt;3rd_hostname&gt;<br \/>\nssh-copy-id -f -i \/etc\/ceph\/ceph.pub root@&lt;..n_hostname&gt;<\/p>\n<p>ceph orch host ls<br \/>\nceph orch host add &lt;2nd_hostname&gt;<br \/>\nceph orch host add &lt;3rd_hostname&gt;<br \/>\nceph orch host add &lt;..n_hostname&gt;<\/p>\n<p>ceph orch host ls<\/p>\n<p>ceph orch ls<\/p>\n<p>ceph orch host add &lt;2nd_hostname&gt; &lt;ip of 2nd_node&gt; mon<br \/>\nceph orch host add &lt;3rd_hostname&gt; &lt;ip of 3rd_node&gt; mon<br \/>\nceph orch host add &lt;1st_hostname&gt; &lt;ip of 1st_node&gt; mon<\/p>\n<p>ceph orch host ls<\/p>\n<p>ceph orch ls<\/p>\n<p>ceph orch device ls<\/p>\n<p>ceph orch apply osd &#8211;all-available-devices<\/p>\n<p>ceph orch device ls<\/p>\n<p>ceph -s<\/p>\n<p>scp \/etc\/ceph\/ceph* root@&lt;2nd_hostname&gt;:\/etc\/ceph\/<br \/>\nscp \/etc\/ceph\/ceph* root@&lt;3rd_hostname&gt;:\/etc\/ceph\/<br \/>\nscp \/etc\/ceph\/ceph* root@&lt;..n_hostname&gt;:\/etc\/ceph\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>## boot order setup # echo &#8220;HOSTNAME&#8221; &gt; \/etc\/hostname # grub2-mkconfig -o \/boot\/grub2\/grub.cfg; yum install yum-utils -y; package-cleanup &#8211;oldkernels &#8211;count=2; reboot; # ## pre-config for ntp` yum install ntp ntpdate -y; systemctl start ntpd systemctl enable ntpd ntpdate -u -s 0.centos.pool.ntp.org 1.centos.pool.ntp.org 2.centos.pool.ntp.org systemctl restart ntpd #systemctl status ntpd timedatectl hwclock -w ####################################################################################### ## software [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/cephswift.com\/index.php\/wp-json\/wp\/v2\/pages\/285"}],"collection":[{"href":"https:\/\/cephswift.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cephswift.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cephswift.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cephswift.com\/index.php\/wp-json\/wp\/v2\/comments?post=285"}],"version-history":[{"count":1,"href":"https:\/\/cephswift.com\/index.php\/wp-json\/wp\/v2\/pages\/285\/revisions"}],"predecessor-version":[{"id":287,"href":"https:\/\/cephswift.com\/index.php\/wp-json\/wp\/v2\/pages\/285\/revisions\/287"}],"wp:attachment":[{"href":"https:\/\/cephswift.com\/index.php\/wp-json\/wp\/v2\/media?parent=285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}