From 8797736821a98515680225d48e16b6154ae5b7e1 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Wed, 18 Dec 2013 10:56:05 -0800 Subject: [PATCH] Support launching rax performance nodes And recommend them. Change-Id: I2a45ef250378604aba72b74b170cec127b18d1be --- doc/source/running-your-own.rst | 8 ++++---- launch/README | 7 ++++--- launch/launch-node.py | 7 +++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/source/running-your-own.rst b/doc/source/running-your-own.rst index b0761e1b3b..ba24463c4e 100644 --- a/doc/source/running-your-own.rst +++ b/doc/source/running-your-own.rst @@ -223,8 +223,8 @@ to use ``: |``:: contents here -Launch a node - be sure to pass --ram 10240 to get a flavor with at least 10G+ -or RAM, as gerrit is configured for 8G of heap. +Launch a node - be sure to pass --flavor "10G" to get a flavor with at +least 10G+ of RAM, as gerrit is configured for 8G of heap. Follow the :file:`doc/source/gerrit.rst` for instructions on getting gerrit configured once installed. @@ -354,10 +354,10 @@ gets their own puppet cert. The openstack/site.pp has a legacy setting for #. Remove the certname override - upstream are dropping this gradually. -#. Launch a node, passing in --image and --ram to get a node that you +#. Launch a node, passing in --image and --flavor to get a node that you want :). e.g:: - launch-node.py centos6-1.slave.openstack.org --image $IMAGE --ram 1024 \ + launch-node.py centos6-1.slave.openstack.org --image $IMAGE --flavor "1G" \ mydns #. Go into the Jenkins config and press 'test connection' on the gearman config diff --git a/launch/README b/launch/README index 80189c825b..0b339edcd2 100644 --- a/launch/README +++ b/launch/README @@ -16,9 +16,10 @@ to a group.) To launch a node in the OpenStack CI account (production servers):: . ~root/ci-launch/openstackci-rs-nova.sh + export FLAVOR="8 GB Performance" export FQDN=servername.openstack.org sudo puppet cert generate $FQDN - ./launch-node.py $FQDN + ./launch-node.py $FQDN --flavor "$FLAVOR" To launch a node in the OpenStack Jenkins account (slave nodes):: @@ -27,9 +28,9 @@ To launch a node in the OpenStack Jenkins account (slave nodes):: nova image-list export IMAGE='Ubuntu 12.04 LTS (Precise Pangolin)' nova flavor-list - export RAM=8192 + export FLAVOR="8 GB Performance" sudo puppet cert generate $FQDN - ./launch-node.py $FQDN --image "$IMAGE" --ram $RAM --salt + ./launch-node.py $FQDN --image "$IMAGE" --flavor "$FLAVOR" --salt The --salt option tells the script to automatically configure and enroll the server as a minion on the salt master. diff --git a/launch/launch-node.py b/launch/launch-node.py index 176445f697..3150083e5e 100755 --- a/launch/launch-node.py +++ b/launch/launch-node.py @@ -176,8 +176,8 @@ def build_server( def main(): parser = argparse.ArgumentParser() parser.add_argument("name", help="server name") - parser.add_argument("--ram", dest="ram", default=1024, type=int, - help="minimum amount of ram") + parser.add_argument("--flavor", dest="flavor", default='1GB', + help="name (or substring) of flavor") parser.add_argument("--image", dest="image", default="Ubuntu 12.04 LTS (Precise Pangolin)", help="image name") @@ -204,8 +204,7 @@ def main(): cert)): raise Exception("Please specify the name of a signed puppet cert.") - flavors = [f for f in client.flavors.list() if f.ram >= options.ram] - flavors.sort(lambda a, b: cmp(a.ram, b.ram)) + flavors = [f for f in client.flavors.list() if options.flavor in f.name] flavor = flavors[0] print "Found flavor", flavor