From 15000a349ab1990209e55d7dc664386faa1f118b Mon Sep 17 00:00:00 2001 From: Cory Hawkless Date: Tue, 23 Mar 2021 09:05:06 +1030 Subject: [PATCH] First stage of conversion to Ubuntu 18.04 and Ceph Octopus --- Vagrantfile | 9 +++++---- scripts/ceph-install.sh | 4 +++- scripts/provision.sh | 6 +++--- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 43b0821..8f9d0d7 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -6,15 +6,13 @@ Vagrant.configure("2") do |config| vagrant_root = File.dirname(__FILE__) # Trigger the Vagrant pre-up script before uping the first VM only - config.trigger.before :up, :vm => ["node-admin"], :append_to_path => ["#{vagrant_root}/scripts"] do - run "pre-up.sh" - end + # Shell provisionner for all VMs config.vm.provision "ceph-preflight", type: "shell", path: "scripts/provision.sh" # All VMs are based on the same box - config.vm.box = "bento/ubuntu-16.04" + config.vm.box = "generic/ubuntu1804" # Use nfs for shared folder config.vm.synced_folder ".", "/vagrant", @@ -42,6 +40,9 @@ Vagrant.configure("2") do |config| config.vm.define "node-admin", primary: true do |admin| admin.vm.hostname = "node-admin" admin.vm.provision "ceph-install", type: "shell", keep_color: true, path: "scripts/provision-admin.sh" + admin.trigger.before :up do |trigger| + trigger.run = {path: "scripts/pre-up.sh"} + end end # osd1 VM with private cluster network diff --git a/scripts/ceph-install.sh b/scripts/ceph-install.sh index 3368b92..27e4b26 100755 --- a/scripts/ceph-install.sh +++ b/scripts/ceph-install.sh @@ -49,6 +49,8 @@ ceph-deploy new $ADMIN_NODE # Initialize cluster configuration $OUTPUT_LOG "Initialize cluster configuration" cat << CLUSTERCONFIG | tee -a ceph.conf +[global] +mon_inital_members = ceph-admin public network = $PUBLIC_NETWORK cluster network = $CLUSTER_NETWORK @@ -69,7 +71,7 @@ done # Deploy ceph on all nodes $OUTPUT_LOG "Deploy ceph on all nodes" -ceph-deploy install --release luminous $NODES +ceph-deploy install --release octopus $NODES # Create initial monitor $OUTPUT_LOG "Create initial monitor" diff --git a/scripts/provision.sh b/scripts/provision.sh index f688286..3571fb7 100755 --- a/scripts/provision.sh +++ b/scripts/provision.sh @@ -41,10 +41,10 @@ export DEBIAN_FRONTEND=noninteractive # Make sure we have the french locale locale-gen fr_FR.UTF-8 -# Install ceph repository (luminous version) -$OUTPUT_LOG "Install ceph repository (luminous version)" +# Install ceph repository (Octopus version) +$OUTPUT_LOG "Install ceph repository (Octopus version)" wget -q -O- 'https://download.ceph.com/keys/release.asc' | apt-key add - -echo deb https://download.ceph.com/debian-luminous/ $(lsb_release -sc) main | tee /etc/apt/sources.list.d/ceph.list +echo deb https://download.ceph.com/debian-octopus/ $(lsb_release -sc) main | tee /etc/apt/sources.list.d/ceph.list apt-get update # Install chrony for time synchronization, gdisk for GPT partitioning,