diff --git a/standalone/Vagrantfile b/standalone/Vagrantfile index 9707b6f..13bae9e 100644 --- a/standalone/Vagrantfile +++ b/standalone/Vagrantfile @@ -3,22 +3,23 @@ # NODES = 4 -DISKS = 8 +DISKS = 1 Vagrant.configure("2") do |config| config.ssh.insert_key = false config.vm.provider :libvirt do |v,override| - override.vm.box = "centos/7" + #override.vm.box = "centos/7" + override.vm.box = "centos-7.9" override.vm.synced_folder '.', '/home/vagrant/sync', disabled: true end config.vm.provider :virtualbox do |v| - config.vm.box = "bento/centos-7.1" + config.vm.box = "bento/centos-7.9" end # Make the client config.vm.define :client do |client| - client.vm.network :private_network, ip: "192.168.10.90" + client.vm.network :private_network, ip: "192.168.56.90" client.vm.host_name = "client" client.vm.provider :virtualbox do |vb| vb.memory = 512 @@ -36,10 +37,10 @@ Vagrant.configure("2") do |config| (0..NODES-1).each do |i| config.vm.define "storage#{i}" do |storage| storage.vm.hostname = "storage#{i}" - storage.vm.network :private_network, ip: "192.168.10.10#{i}" + storage.vm.network :private_network, ip: "192.168.56.10#{i}" (0..DISKS-1).each do |d| storage.vm.provider :virtualbox do |vb| - vb.customize [ "createhd", "--filename", "disk-#{i}-#{d}.vdi", "--size", 500*1024 ] + vb.customize [ "createhd", "--filename", "disk-#{i}-#{d}.vdi", "--size", 10*1024 ] vb.customize [ "storageattach", :id, "--storagectl", "SATA Controller", "--port", 3+d, "--device", 0, "--type", "hdd", "--medium", "disk-#{i}-#{d}.vdi" ] vb.memory = 1024 vb.cpus = 2 @@ -56,6 +57,7 @@ Vagrant.configure("2") do |config| # View the documentation for the provider you're using for more # information on available options. storage.vm.provision :ansible do |ansible| + #ansible.verbose = "vvv" ansible.limit = "all" ansible.playbook = "site.yml" ansible.groups = { diff --git a/standalone/roles/common/tasks/main.yml b/standalone/roles/common/tasks/main.yml index c462c4d..15dc14b 100644 --- a/standalone/roles/common/tasks/main.yml +++ b/standalone/roles/common/tasks/main.yml @@ -1,11 +1,27 @@ +- name: upgrade all packages + yum: name=* state=latest + + + - name: install packages yum: name={{ item }} state=present with_items: + - python-setuptools + - python3-setuptools + - python3-pip + - tmux - wget - screen - epel-release - centos-release-gluster +#- name: pip self-update +# pip: +# name: pip3 +# state: latest +- name: Update Pip + ansible.builtin.command: pip3 install --upgrade pip + - name: copy private key copy: src=insecure_private_key owner=vagrant group=vagrant dest=/home/vagrant/.ssh/id_rsa force=no mode=0600 diff --git a/standalone/roles/heketi/files/topology_virtualbox.json b/standalone/roles/heketi/files/topology_virtualbox.json index e481528..5b4a9ff 100644 --- a/standalone/roles/heketi/files/topology_virtualbox.json +++ b/standalone/roles/heketi/files/topology_virtualbox.json @@ -6,10 +6,10 @@ "node": { "hostnames": { "manage": [ - "192.168.10.100" + "192.168.56.100" ], "storage": [ - "192.168.10.100" + "192.168.56.100" ] }, "zone": 1 @@ -29,10 +29,10 @@ "node": { "hostnames": { "manage": [ - "192.168.10.101" + "192.168.56.101" ], "storage": [ - "192.168.10.101" + "192.168.56.101" ] }, "zone": 2 @@ -52,10 +52,10 @@ "node": { "hostnames": { "manage": [ - "192.168.10.102" + "192.168.56.102" ], "storage": [ - "192.168.10.102" + "192.168.56.102" ] }, "zone": 1 @@ -75,10 +75,10 @@ "node": { "hostnames": { "manage": [ - "192.168.10.103" + "192.168.56.103" ], "storage": [ - "192.168.10.103" + "192.168.56.103" ] }, "zone": 2 diff --git a/standalone/roles/heketi/tasks/main.yml b/standalone/roles/heketi/tasks/main.yml index c6d2e64..5945dd0 100644 --- a/standalone/roles/heketi/tasks/main.yml +++ b/standalone/roles/heketi/tasks/main.yml @@ -4,7 +4,9 @@ - heketi-client - heketi-templates - heketi - - python-heketi + +- name: Install python heketi + ansible.builtin.command: pip3 install heketi - name: copy private key copy: src=insecure_private_key owner=heketi group=heketi dest=/etc/heketi force=yes mode=600