r/openstack • • Oct 20 '19

Minimum number of machines to run

Hi,

I'm thinking about setting up a lab for myself to do sone tinkering with openstack. I'm an experienced Linux administrator, so this is mostly to get familiar with a new type of software stack.

I would like to explore the following things with openstack:

  • live migration of virtual machines to other nodes

  • Distributed storage with ceph

  • Running image services and a kubernetes container service

I know that I could probably use several vms on top of a hypervisor, but I fear that the performance of this thing would be so far from anything production related that it would be really hard to gauge how feasible the thing is in the real world.

So what would be the minimum of physical servers to run an environment I pictured above?

8 Upvotes

2 comments sorted by

8

u/DMRv2 Oct 20 '19 edited Oct 20 '19

For homelab/experimental purposes, 2 hosts is fine. One is the "controller" or head node and runs Cinder (block storage), Glance (image storage), Neutron and Nova (network and compute, respectfully) APIs and the Horizon (management GUI) dashboard. The other is the compute and storage node, which runs nova-compute (the per-hypervisor agent) and presumably some agent for presenting block storage to OpenStack, less you bring your own storage network of sorts.

The controller needs to have at least 4GB of RAM, ideally 8GB+ and 2-4 CPU threads. The hypervisor/compute and storage node should be minimally about the same size so you can at least spin up a couple VMs afterwards.

You can setup the network like this for starters: https://docs.openstack.org/neutron/pike/_images/deploy-lb-provider-overview.png

EDIT: I should add, in order to "make things interesting" with Ceph and k8s, you probably want 3 hypervisors/storage nodes + 1 controller (4 total). This is what I started with in my homelab. Ceph and k8s use leader election algos like PAXOS which ideally requires an odd number of hosts -- this makes 1 fine for experimentation, but you really need 3 in order to "play" with and see them kick in fault-tolerance if you want to simulate failures.

3

u/xakaitetoia Oct 25 '19 edited Oct 25 '19

Hello,

I was trying to do same thing all in my personal computer. I have a nice i7 with 12 cores and 48 gb ram and 500 nvme disk(although i have my vms in a qnap). I know performance is not great but i am just testing things with openstack and ceph and raddosgw. I mainly use Vagrant with Virtual Box and so far i say that my lab is really going well.

My Lab:

Openstack pike with 3 nodes (1 controller, 2 compute nodes). I had 5 nodes in total, 2 extra for block /object storage but moved to ceph integration.

Ceph with 5 nodes (1 mon, 3 osds, 1 admin) - Should turn off admin.. not really need it.

Devstack 1 node (all in one) - Connected to same ceph cluster as well.

➜ ~ vbr

"controller" {9c5cc35b-0116-43da-834e-f20c8afd9616}

"ceph-admin" {505a4671-ad06-4817-898c-1fd593018d78}

"ceph-mon01" {2b0a2cd0-856d-45cd-a137-4e940ad42a58}

"ceph-osd01" {744fbe61-ae08-4b62-ba52-75d1fbd9be1e}

"ceph-osd02" {b65b5029-71ed-4b0c-af7e-4aea27a89073}

"ceph-osd03" {0a6858e6-68e6-41f4-8cd9-434bffdf3a45}

"ceph-mon02" {675cd24d-f990-4e02-8cbe-7915309299f2}

"ceph-osd04" {e3bf8059-b7f7-4d33-a30a-9fddb907bbe1}

"xen-srv1" {7dae694f-a461-48f4-9dbc-b08b264e8fd6} - This is for playing

"compute2" {d96b37d2-a0b2-4cde-989c-f1f8330a5fd3}

"compute1" {2263d272-1922-4ffd-830f-ae8ecd29fb85}

"radosgw-srv-2" {d314cfa4-614e-4b24-9309-a9aa41a42579}

"raddosgw" {6eef5a4e-aabf-49f3-90a7-85dec18759ed}

"devstack" {b5725a16-d369-4db5-a723-9e120b25bb3a}

CEPH

My Ceph osd tree is below a bit long :P with 31 osd's as i was playing with different drives from VirtualBox and wanted to do bluestore/filestore migrations, create new osd's crush rules etc.

My latest project was to connect two radosgw to same ceph cluster for 2 different openstack environments. So raddosgw is for openstack pike and raddosgw-srv2 is for devstack node. For this to work i had to create two different realms with different zones. Works perfectly fine.

zone1.rgw.buckets.data 144 MiB 38 0 114 0 0 0 0 0 B 63 144 MiB 0 B 0 B

zone1.rgw.buckets.index 1.6 KiB 2 0 6 0 0 0 177 177 KiB 13 6 KiB 0 B 0 B

zone1.rgw.control 0 B 8 0 24 0 0 0 0 0 B 0 0 B 0 B 0 B

zone1.rgw.log 88 B 210 0 630 0 0 0 55408 54 MiB 36910 24 KiB 0 B 0 B

zone1.rgw.meta 1.3 KiB 6 0 18 0 0 0 120 108 KiB 47 18 KiB 0 B 0 B

zone2.rgw.buckets.data 283 MiB 71 0 213 0 0 0 0 0 B 79 283 MiB 0 B 0 B

zone2.rgw.buckets.index 0 B 2 0 6 0 0 0 20 20 KiB 5 2 KiB 0 B 0 B

zone2.rgw.control 0 B 8 0 24 0 0 0 0 0 B 0 0 B 0 B 0 B

zone2.rgw.log 63 B 178 0 534 0 0 0 51456 50 MiB 34345 54 KiB 0 B 0 B

zone2.rgw.meta 2.1 KiB 6 0 18 0 0 0 29 27 KiB 21 9 KiB 0 B 0 B

####CEPH####

cluster:

id: c9977119-c185-4b32-aa9b-70dfca5aec85

health: HEALTH_WARN

2 pools have too many placement groups

services:

mon: 2 daemons, quorum ceph-mon01,ceph-mon02 (age 51m)

mgr: ceph-mon02(active, since 75m), standbys: ceph-mon01

mds: cephfs:1 {0=ceph-mon01=up:active} 1 up:standby

osd: 31 osds: 31 up (since 38m), 31 in (since 3w)

rgw: 2 daemons active (radosgw-srv, radosgw-srv-2)

data:

pools: 19 pools, 877 pgs

objects: 25.24k objects, 9.5 GiB

usage: 65 GiB used, 1.9 TiB / 1.9 TiB avail

pgs: 877 active+clean

io:

client: 1.5 KiB/s rd, 1 op/s rd, 0 op/s wr

ceph config radosgw

[[client.rgw.radosgw-srv]

rgw_frontends = "civetweb port=7480"

host = radosgw-srv

keyring = /var/lib/ceph/radosgw/ceph-rgw.radosgw-srv/keyring

rgw socket path = /tmp/radosgw-radosgw-srv.sock

log file = /var/log/ceph/ceph-rgw-radosgw-srv.log

rgw data = /var/lib/ceph/radosgw/ceph-rgw.radosgw-srv

#rgw frontends = civetweb port=8080

# Keystone information

#rgw swift account in url = true

rgw keystone url = http://10.0.0.11:5000

#rgw keystone api version = 3

rgw keystone admin user = swift_admin

rgw keystone admin password = openstack

rgw keystone admin tenant = service

rgw keystone accepted roles = user, admin

rgw keystonetoken cache size = 10

rgw keystone revocation interval = 300

rgw keystone make new tenants = true

rgw s3 auth use keystone = true

#nss_db_path = /var/lib/ceph/nss

rgw keystone verify ssl = false

rgw keystone admin domain = default

rgw keystone admin project = service

debug rgw = 20

rgw_zonegroup = site1

rgw_zone = zone1

[client.rgw.radosgw-srv-2]

rgw_frontends = "civetweb port=7480"

host = radosgw-srv-2

keyring = /var/lib/ceph/radosgw/ceph-rgw.radosgw-srv-2/keyring

rgw socket path = /tmp/radosgw-radosgw-srv-2.sock

log file = /var/log/ceph/ceph-rgw-radosgw-srv-2.log

rgw data = /var/lib/ceph/radosgw/ceph-rgw.radosgw-srv-2

# Keystone information

rgw swift account in url = True

rgw keystone url = http://192.168.58.201/identity

rgw keystone api version = 3

rgw keystone admin user = swift_admin

rgw keystone admin password = openstack

rgw keystone admin tenant = service

rgw keystone accepted roles = member, admin

rgw keystonetoken cache size = 10

rgw keystone revocation interval = 300

rgw keystone make new tenants = true

rgw keystone implicit tenants= true

rgw s3 auth use keystone = true

#nss_db_path = /var/lib/ceph/nss

rgw keystone verify ssl = false

rgw keystone admin domain = default

rgw keystone admin project = service

debug rgw = 2

rgw_zone = zone2

rgw_zonegroup = site2

Sorry for long post, just wanted to share my experience on this and also wanted to see how other people experimenting. Kubernetes is my next stop but i think my systems will start slugging a lot :P