import traceback
import time
import os
+import ConfigParser
daisy_version = 1.0
daisyrc_path = "/root/daisyrc_admin"
+daisy_conf_path = "/home/daisy_install/daisy.conf"
iso_path = "/var/lib/daisy/kolla/"
+deployment_interface = "ens3"
cluster_name = "clustertest"
_CLI_OPTS = [
print ("--------------------------------------------")
+def get_configure_from_daisyconf(section, key):
+ config = ConfigParser.ConfigParser()
+ config.read(daisy_conf_path)
+ option_value = config.get(section, key)
+ return option_value
+
+
def get_endpoint(file_path):
for line in open(file_path):
if 'OS_ENDPOINT' in line:
def prepare_install():
+ global deployment_interface
try:
print("get config...")
conf = cfg.ConfigOpts()
print("cluster_id=%s." % cluster_id)
print("update network...")
update_network(cluster_id, network_map)
+ print("build pxe server to install os...")
+ deployment_interface = get_configure_from_daisyconf("PXE", "eth_name")
+ build_pxe_for_discover(cluster_id)
elif conf['host'] and conf['host'] == 'yes':
isbare = False if 'isbare' in conf and conf['isbare'] == 0 else True
print("discover host...")
print_bar("Everything is done!")
+def build_pxe_for_discover(cluster_id):
+ cluster_meta = {'cluster_id': cluster_id,
+ 'deployment_interface': deployment_interface}
+ client.install.install(**cluster_meta)
+
+
def install_os_for_vm_step1(cluster_id):
cluster_meta = {'cluster_id': cluster_id,
'pxe_only': "true"}
3. "os_install_type" field just support "pxe" for now.
-4. Daisy now use pxe server to install the os, so "build_pxe" must set to "yes".
- If the value in daisy.conf in your env of /home/daisy_install/ dir is "no",
- you must change this field to "yes" manually before installing Daisy.
+4. Daisy now use pxe server to install the os, the "build_pxe" item must set to "no".
5. "eth_name" field is the pxe server interface, and this field is required when
the "build_pxe" field set to "yes".This should be set to the interface