Beispiel #1
0
    # run different scripts based on mode
    if params.mode == 'experiment':
        # install management software on first node
        if i == 0:
            run_install_script(node, 'install_snmp_manager.sh')
            run_install_script(node, 'install_slate_cli.sh')
            run_install_script(node, 'install_minikube.sh')
            run_install_script(node, 'install_helm.sh')
            run_install_script(node, 'install_docker_compose.sh')
        # run install scripts on each node
        run_install_script(node, 'install_snmp_agent.sh')
        run_install_script(node, 'install_docker.sh')

    #  elif params.mode == 'slate_cluster':
    # put slate cluster specific install scripts and configuration here (CentOS7)
    #  if i == 0:
    #  run_install_script(node, 'install_kubernetes_cluster.sh')
    #  else:
    #  run_install_script(node, 'install_kubernetes_worker_node.sh')

# request a pool of dynamic publically routable ip addresses at the utah cloudlab location
if params.public_ip_count > 0:
    address_pool = igext.AddressPool('address_pool', params.public_ip_count)
    address_pool.component_manager_id = (
        'urn:publicid:IDN+utah.cloudlab.us+authority+cm')
    request.addResource(address_pool)

# output RSpec
pc.printRequestRSpec(request)
Beispiel #2
0
nodes = []
for i in range(1, params.node_count + 1):
    if params.use_bare_metal:
        nodes.append(request.RawPC('node' + str(i)))
    else:
        node = request.XenVM('node' + str(i))
        node.cores = 2
        node.ram = 4096
        nodes.append(node)

# Set node images
for node in nodes:
    node.disk_image = CENTOS7_IMG

# Request a pool of dynamic publically routable ip addresses - pool name cannot contain underscores - hidden bug
addressPool = igext.AddressPool('addressPool', int(params.public_ip_count))
request.addResource(addressPool)

# Add LAN to the rspec.
lan = request.LAN("lan")

# Specify duplex parameters for each of the nodes in the link (or lan).
# BW is in Kbps
lan.bandwidth = 110000
# Latency is in milliseconds
lan.latency = params.lan_latency
# Packet loss is a number 0.0 <= loss <= 1.0
lan.plr = packet_loss_float

interfaces = []
# Add interfaces to nodes
                "/bin/sh",
                "/bin/curl -sSL https://raw.githubusercontent.com/slateci/slate-puppet/master/scripts/bootstrap_puppet.sh | sudo /bin/bash",
            ))

        if "site_name" in v:
            node.component_manager_id = ("urn:publicid:IDN+" + v["site_name"] +
                                         "+authority+cm")

            if "node_type" in v:
                node.xen_ptype = v["node_type"] + "-vm"

        else:
            node.Site(k)

        node_count += 1

    if "site_name" in v:
        addr_pool = igext.AddressPool("metallb_ips_" + v["site_name"],
                                      v["node_count"])
        addr_pool.component_manager_id = ("urn:publicid:IDN+" +
                                          v["site_name"] + "+authority+cm")
        request.addResource(addr_pool)

    else:
        addr_pool = igext.AddressPool("metallb_ips_" + k.replace(" ", "_"),
                                      v["node_count"])
        addr_pool.Site(k)
        request.addResource(addr_pool)

portal.context.printRequestRSpec()