Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lifting the scripts to be usable after 6 years #34

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions standalone/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 = {
Expand Down
16 changes: 16 additions & 0 deletions standalone/roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -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

Expand Down
16 changes: 8 additions & 8 deletions standalone/roles/heketi/files/topology_virtualbox.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
4 changes: 3 additions & 1 deletion standalone/roles/heketi/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down