-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CMS Openstack: Basic Openstack cloud scenario
Very basic Openstack test scenario that brings up three compute nodes and provisions one Project with internal network and external connectivity. Signed-off-by: Martin Kalcok <[email protected]>
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import logging | ||
|
||
from ovn_ext_cmd import ExtCmd | ||
from ovn_context import Context | ||
from ovn_workload import ChassisNode | ||
|
||
from cms.openstack import OpenStackCloud | ||
|
||
log = logging.getLogger(__name__) | ||
|
||
|
||
class BaseOpenstack(ExtCmd): | ||
def __init__(self, config, central_node, worker_nodes, global_cfg): | ||
super().__init__(config, central_node, worker_nodes) | ||
|
||
def run(self, ovn: OpenStackCloud, global_cfg): | ||
# create ovn topology | ||
worker_count = len(ovn.worker_nodes) | ||
with Context(ovn, "base_cluster_bringup", worker_count) as ctx: | ||
for i in ctx: | ||
worker_node: ChassisNode = ovn.worker_nodes[i] | ||
log.info( | ||
f"Provisioning {worker_node.__class__.__name__} " | ||
f"({i+1}/{worker_count})" | ||
) | ||
worker_node.provision(ovn) | ||
|
||
_ = ovn.new_project(gw_nodes=ovn.worker_nodes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
global: | ||
log_cmds: false | ||
cms_name: openstack | ||
|
||
cluster: | ||
clustered_db: true | ||
log_txns_db: true | ||
n_workers: 3 | ||
|
||
base_openstack: | ||
foo: bar |