← Back to team overview

openstack team mailing list archive

Re: Proposal for new devstack (v2?)

 

On Sat, Jan 21, 2012 at 5:47 AM, Joshua Harlow <harlowja@xxxxxxxxxxxxx> wrote:
>
> Note rhel6 isn’t fully there yet. But in progress ;)
>

Anyone working on fedora version of it? Any known major issues
preventing it? I quickly added fedora labels next to RHEL6 in the
code, and added db.py stuff. By quick test it does nova mysql config,
and then stops at rabbitmq password change for command returning exit
code2.
diff --git a/conf/pkgs/db.json b/conf/pkgs/db.json
index b044d10..d684551 100644
--- a/conf/pkgs/db.json
+++ b/conf/pkgs/db.json
@@ -66,5 +66,35 @@
                 }
             ]
         }
+    },
+    "fedora-16": {
+        "mysql": {
+            "version": "5.5.18-1.fc16",
+            "allowed": ">=",
+            "removable": true
+        },
+        "mysql-server": {
+            "version": "5.5.18-1.fc16",
+            "allowed": ">=",
+            "removable": true,
+            "post-install": [
+                { 
+                    # Make sure it'll start on reboot
+                    "run_as_root": true,
+                    "cmd" : [ "chkconfig", "mysqld", "on"]
+                },
+                { 
+                    # Start the mysql service
+                    "run_as_root": true,
+                    "cmd" : [ "service", "mysqld", "start"]
+                },
+                {  
+                    # Set the root password
+                    "run_as_root": true,
+                    "cmd" : [ "mysqladmin", "-u", "root", 
+                               "password", "%PASSWORD%" ]
+                }
+            ]
+        }
     }
 }
diff --git a/devstack/components/db.py b/devstack/components/db.py
index b694397..9895e0b 100644
--- a/devstack/components/db.py
+++ b/devstack/components/db.py
@@ -28,10 +28,10 @@ MYSQL = 'mysql'
 DB_ACTIONS = {
     MYSQL: {
         #hopefully these are distro independent, these should be since they are invoking system init scripts
-        'start': ["service", "mysql", 'start'],
-        'stop': ["service", 'mysql', "stop"],
-        'status': ["service", 'mysql', "status"],
-        'restart': ["service", 'mysql', "status"],
+        'start': ["service", "mysqld", 'start'],
+        'stop': ["service", 'mysqld', "stop"],
+        'status': ["service", 'mysqld', "status"],
+        'restart': ["service", 'mysqld', "status"],
         #
         'create_db': ['mysql', '--user=%USER%', '--password=%PASSWORD%', '-e', 'CREATE DATABASE %DB%;'],
         'drop_db': ['mysql', '--user=%USER%', '--password=%PASSWORD%', '-e', 'DROP DATABASE IF EXISTS %DB%;'],
diff --git a/devstack/progs/actions.py b/devstack/progs/actions.py
index 7478a52..9bf17ff 100644
--- a/devstack/progs/actions.py
+++ b/devstack/progs/actions.py
@@ -43,6 +43,7 @@ LOG = logging.getLogger("devstack.progs.actions")
 _PKGR_MAP = {
     settings.UBUNTU11: apt.AptPackager,
     settings.RHEL6: yum.YumPackager,
+    settings.FEDORA16: yum.YumPackager,
 }
 
 # This is used to map an action to a useful string for
diff --git a/devstack/settings.py b/devstack/settings.py
index 305ad55..534b6dd 100644
--- a/devstack/settings.py
+++ b/devstack/settings.py
@@ -25,6 +25,7 @@ LOG = logging.getLogger("devstack.settings")
 # ie in the pkg/pip listings so update there also!
 UBUNTU11 = "ubuntu-oneiric"
 RHEL6 = "rhel-6"
+FEDORA16 = "fedora-16"
 
 # What this program is called
 PROG_NICE_NAME = "DEVSTACK"
@@ -36,7 +37,8 @@ POST_INSTALL = 'post-install'
 # Default interfaces for network ip detection
 IPV4 = 'IPv4'
 IPV6 = 'IPv6'
-DEFAULT_NET_INTERFACE = 'eth0'
+#DEFAULT_NET_INTERFACE = 'eth0'
+DEFAULT_NET_INTERFACE = 'br_iscsi'
 DEFAULT_NET_INTERFACE_IP_VERSION = IPV4
 
 # Component name mappings
@@ -120,6 +122,7 @@ STACK_CONFIG_LOCATION = os.path.join(STACK_CONFIG_DIR, "stack.ini")
 KNOWN_DISTROS = {
     UBUNTU11: re.compile('Ubuntu(.*)oneiric', re.IGNORECASE),
     RHEL6: re.compile('redhat-6\.(\d+)', re.IGNORECASE),
+    FEDORA16: re.compile('fedora-16(.*)verne', re.IGNORECASE),
 }
 
 

Follow ups

References