removed openstack_x started adding swift, swift_keystone

This commit is contained in:
Gunther Hagleitner 2012-02-01 18:50:48 -08:00
parent dc9f916a9d
commit cbf9e191f3
12 changed files with 144 additions and 88 deletions

View File

@ -1,16 +0,0 @@
# This is a extended json package definition file
# We allow simple comments (lines starting with a hash symbol)
{
# This is currently our "master" repo set with versions
# that we are trying to align other distributions with.
# The versions should at least be major + minor!
"ubuntu-oneiric": {
"python-httplib2": {
"version": "0.7*",
"removable": true
}
},
"rhel-6": {
# TBD
}
}

View File

@ -5,12 +5,7 @@
# that we are trying to align other distributions with.
# The versions should at least be major + minor!
"ubuntu-oneiric": {
# Is this really needed?
"gcc": {
"version": "4:4.6*",
"removable": true
},
# This may not always be needed (maybe have code not always install this) - or add a new key in that is used for this
# installed for swift-keystone
"memcached": {
"version": "1.4*",
"removable": true
@ -46,10 +41,6 @@
"sqlite3": {
"version": "3.7*",
"removable": true
},
"xfsprogs": {
"version": "3.1*",
"removable": true
}
},
"rhel-6": {

View File

@ -228,11 +228,6 @@ keystoneclient_branch = master
novaclient_repo = https://github.com/openstack/python-novaclient.git
novaclient_branch = master
# Openstackx is a collection of extensions to openstack.compute & nova
# that is *deprecated*. The code is being moved into python-novaclient & nova.
openstackx_repo = https://github.com/cloudbuilders/openstackx.git
openstackx_branch = master
# Quantum service git repo
quantum_repo = https://github.com/openstack/quantum.git
quantum_branch = master
@ -273,6 +268,15 @@ apache_group = ${APACHE_GROUP:-$(horizon:apache_user)}
# Port horizon should run on
port = ${HORIZON_PORT:-80}
[swift]
# default is APP_DIR/data
data_location = ${SWIFT_DATA_LOCATION:-data}
loopback_disk_size = ${SWIFT_LOOPBACK_DISK_SIZE:-1000000}
partition_power_size = ${SWIFT_PARTITION_POWER_SIZE:-9}
[ci]
# CI test suite
@ -328,3 +332,5 @@ service_token = ${SERVICE_TOKEN:-}
# The xen api connection password
xenapi_connection = ${XENAPI_CONNECTION:-}
# swift password (random unique string)
swift_hash = ${SWIFT_HASH:-}

View File

@ -1,8 +1,11 @@
[DEFAULT]
bind_port = 8080
user = %USER%
log_facility = LOG_LOCAL1
swift_dir = %SWIFT_CONFIG_LOCATION%
workers = 1
log_name = swift
log_facility = LOG_LOCAL1
log_level = DEBUG
[pipeline:main]
pipeline = healthcheck cache %AUTH_SERVER% proxy-server
@ -16,7 +19,7 @@ account_autocreate = true
use = egg:swiftkeystone2#keystone2
keystone_admin_token = %SERVICE_TOKEN%
keystone_url = http://localhost:35357/v2.0
keystone_swift_operator_roles = Member
keystone_swift_operator_roles = Member,Admin
[filter:tempauth]
use = egg:swift#tempauth

View File

@ -0,0 +1,26 @@
# Uncomment the following to have a log containing all logs together
#local1,local2,local3,local4,local5.* %SWIFT_LOGDIR%/all.log
# Uncomment the following to have hourly proxy logs for stats processing
#$template HourlyProxyLog,"%SWIFT_LOGDIR%/hourly/%$YEAR%%$MONTH%%$DAY%%$HOUR%"
#local1.*;local1.!notice ?HourlyProxyLog
local1.*;local1.!notice %SWIFT_LOGDIR%/proxy.log
local1.notice %SWIFT_LOGDIR%/proxy.error
local1.* ~
local2.*;local2.!notice %SWIFT_LOGDIR%/storage1.log
local2.notice %SWIFT_LOGDIR%/storage1.error
local2.* ~
local3.*;local3.!notice %SWIFT_LOGDIR%/storage2.log
local3.notice %SWIFT_LOGDIR%/storage2.error
local3.* ~
local4.*;local4.!notice %SWIFT_LOGDIR%/storage3.log
local4.notice %SWIFT_LOGDIR%/storage3.error
local4.* ~
local5.*;local5.!notice %SWIFT_LOGDIR%/storage4.log
local5.notice %SWIFT_LOGDIR%/storage4.error
local5.* ~

View File

@ -111,7 +111,7 @@ class DBUninstaller(comp.PkgUninstallComponent):
utils.execute_template(*cmds, params=params, shell=True)
except IOError:
LOG.warn(("Could not reset the database password. You might have to manually "
"reset the password to \"%s\" before the next install") % (RESET_BASE_PW), exc_info=True)
"reset the password to \"%s\" before the next install") % (RESET_BASE_PW))
LOG.info("To aid in this check out: [%s]", " or ".join(SQL_RESET_PW_LINKS))

View File

@ -483,9 +483,7 @@ class NovaConfigurator(object):
instance_template = self._getstr('instance_name_prefix') + self._getstr('instance_name_postfix')
nova_conf.add('instance_name_template', instance_template)
if settings.OPENSTACK_X in self.instances:
nova_conf.add('osapi_compute_extension', 'nova.api.openstack.compute.contrib.standard_extensions')
nova_conf.add('osapi_compute_extension', 'extensions.admin.Admin')
nova_conf.add('osapi_compute_extension', 'nova.api.openstack.compute.contrib.standard_extensions')
if settings.NOVNC in self.instances:
vncproxy_url = self._getstr('vncproxy_url')

View File

@ -14,6 +14,9 @@
# License for the specific language governing permissions and limitations
# under the License.
import os
import os.path
from devstack import component as comp
from devstack import log as logging
from devstack import settings
@ -22,44 +25,68 @@ from devstack import utils
LOG = logging.getLogger("devstack.components.swift")
#id
# id
TYPE = settings.SWIFT
SWIFT_CONF = 'swift.conf'
PROXY_SERVER_CONF = 'proxy-server.conf'
ACCOUNT_SERVER_CONF = 'account-server.conf'
CONTAINER_SERVER_CONF = 'container-server.conf'
OBJECT_SERVER_CONF = 'object-server.conf'
RSYNC_CONF = 'rsyncd.conf'
SYSLOG_CONF = 'rsyslog.conf'
SWIFT_MAKERINGS = 'swift-remakerings'
SWIFT_STARTMAIN = 'swift-startmain'
CONFIGS = [SWIFT_CONF, PROXY_SERVER_CONF, ACCOUNT_SERVER_CONF,
CONTAINER_SERVER_CONF, OBJECT_SERVER_CONF, RSYNC_CONF,
SYSLOG_CONF, SWIFT_MAKERINGS, SWIFT_STARTMAIN]
class SwiftUninstaller(comp.ComponentBase):
SWIFT_NAME = 'swift'
# subdirs of the git checkout
BIN_DIR = 'bin'
CONFIG_DIR = 'etc'
# what to start
APP_OPTIONS = {
}
#the pkg json files swift requires for installation
REQ_PKGS = ['general.json', 'swift.json']
class SwiftUninstaller(comp.PythonUninstallComponent):
def __init__(self, *args, **kargs):
comp.ComponentBase.__init__(self, TYPE, *args, **kargs)
def unconfigure(self):
raise NotImplementedError()
def uninstall(self):
raise NotImplementedError()
comp.PythonUninstallComponent.__init__(self, TYPE, *args, **kargs)
class SwiftInstaller(comp.ComponentBase):
class SwiftInstaller(comp.PythonInstallComponent):
def __init__(self, *args, **kargs):
comp.ComponentBase.__init__(self, TYPE, *args, **kargs)
comp.PythonInstallComponent.__init__(self, TYPE, *args, **kargs)
self.cfgdir = sh.joinpths(self.appdir, CONFIG_DIR)
self.bindir = sh.joinpths(self.appdir, BIN_DIR)
self.datadir = sh.joinpths(self.appdir, self.cfg.get('swift', 'data_location'))
def download(self):
raise NotImplementedError()
def _get_download_locations(self):
return comp.PythonInstallComponent._get_download_locations(self) + [
{
'uri': ('git', 'swift_repo'),
'branch': ('git', 'swift_branch')
}]
def configure(self):
raise NotImplementedError()
def _get_config_files(self):
return CONFIGS
def pre_install(self):
raise NotImplementedError()
def _get_pkgs(self):
return REQ_PKGS
def install(self):
raise NotImplementedError()
def post_install(self):
raise NotImplementedError()
def _post_install(self):
pass
class SwiftRuntime(comp.EmptyRuntime):
class SwiftRuntime(comp.PythonRuntime):
def __init__(self, *args, **kargs):
comp.EmptyRuntime.__init__(self, TYPE, *args, **kargs)
comp.PythonRuntime.__init__(self, TYPE, *args, **kargs)
def describe(opts=None):

View File

@ -14,45 +14,65 @@
# License for the specific language governing permissions and limitations
# under the License.
import os
import os.path
from devstack import component as comp
from devstack import log as logging
from devstack import settings
from devstack import shell as sh
from devstack import utils
LOG = logging.getLogger("devstack.components.openstackx")
LOG = logging.getLogger("devstack.components.swift_keystone")
#id
TYPE = settings.OPENSTACK_X
# id
TYPE = settings.SWIFT_KEYSTONE
#the pkg json files novnc requires for installation
REQ_PKGS = ['general.json', 'openstackx.json']
# subdirs of the git checkout
BIN_DIR = 'bin'
CONFIG_DIR = 'etc'
CONFIGS = []
# what to start
APP_OPTIONS = {
}
#the pkg json files swift_keystone requires for installation
REQ_PKGS = ['general.json', 'swift.json']
class OpenstackXUninstaller(comp.PythonUninstallComponent):
class SwiftKeystoneUninstaller(comp.PythonUninstallComponent):
def __init__(self, *args, **kargs):
comp.PythonUninstallComponent.__init__(self, TYPE, *args, **kargs)
class OpenstackXInstaller(comp.PythonInstallComponent):
class SwiftKeystoneInstaller(comp.PythonInstallComponent):
def __init__(self, *args, **kargs):
comp.PythonInstallComponent.__init__(self, TYPE, *args, **kargs)
self.cfgdir = sh.joinpths(self.appdir, CONFIG_DIR)
self.bindir = sh.joinpths(self.appdir, BIN_DIR)
def _get_download_locations(self):
places = list()
places.append({
'uri': ("git", "openstackx_repo"),
'branch': ("git", "openstackx_branch"),
})
return places
return comp.PythonInstallComponent._get_download_locations(self) + [
{
'uri': ('git', 'swift_keystone_repo'),
'branch': ('git', 'swift_keystone_branch')
}]
def _get_config_files(self):
return CONFIGS
def _get_pkgs(self):
return list(REQ_PKGS)
return REQ_PKGS
def _post_install(self):
pass
class OpenstackXRuntime(comp.EmptyRuntime):
class SwiftKeystoneRuntime(comp.PythonRuntime):
def __init__(self, *args, **kargs):
comp.EmptyRuntime.__init__(self, TYPE, *args, **kargs)
comp.PythonRuntime.__init__(self, TYPE, *args, **kargs)
def describe(opts=None):
@ -66,6 +86,6 @@ def describe(opts=None):
params = dict()
params['component_opts'] = "TBD"
params['module_name'] = __name__
params['description'] = __doc__ or "Handles actions for the no-vnc component."
params['description'] = __doc__ or "Handles actions for the swift keystone component."
out = description.format(**params)
return out.strip("\n")

View File

@ -28,11 +28,11 @@ from devstack.components import keystone_client
from devstack.components import nova
from devstack.components import nova_client
from devstack.components import novnc
from devstack.components import openstack_x
from devstack.components import quantum
from devstack.components import quantum_client
from devstack.components import rabbit
from devstack.components import swift
from devstack.components import swift_keystone
# This determines what classes to use to install/uninstall/...
ACTION_CLASSES = {
@ -41,13 +41,13 @@ ACTION_CLASSES = {
settings.GLANCE: glance.GlanceInstaller,
settings.QUANTUM: quantum.QuantumInstaller,
settings.SWIFT: swift.SwiftInstaller,
settings.SWIFT: swift_keystone.SwiftKeystoneInstaller,
settings.HORIZON: horizon.HorizonInstaller,
settings.KEYSTONE: keystone.KeystoneInstaller,
settings.DB: db.DBInstaller,
settings.RABBIT: rabbit.RabbitInstaller,
settings.KEYSTONE_CLIENT: keystone_client.KeyStoneClientInstaller,
settings.NOVA_CLIENT: nova_client.NovaClientInstaller,
settings.OPENSTACK_X: openstack_x.OpenstackXInstaller,
settings.NOVNC: novnc.NoVNCInstaller,
settings.QUANTUM_CLIENT: quantum_client.QuantumClientInstaller,
},
@ -56,13 +56,13 @@ ACTION_CLASSES = {
settings.GLANCE: glance.GlanceUninstaller,
settings.QUANTUM: quantum.QuantumUninstaller,
settings.SWIFT: swift.SwiftUninstaller,
settings.SWIFT: swift_keystone.SwiftKeystoneUninstaller,
settings.HORIZON: horizon.HorizonUninstaller,
settings.KEYSTONE: keystone.KeystoneUninstaller,
settings.DB: db.DBUninstaller,
settings.RABBIT: rabbit.RabbitUninstaller,
settings.KEYSTONE_CLIENT: keystone_client.KeyStoneClientUninstaller,
settings.NOVA_CLIENT: nova_client.NovaClientUninstaller,
settings.OPENSTACK_X: openstack_x.OpenstackXUninstaller,
settings.NOVNC: novnc.NoVNCUninstaller,
settings.QUANTUM_CLIENT: quantum_client.QuantumClientUninstaller,
},
@ -71,13 +71,13 @@ ACTION_CLASSES = {
settings.GLANCE: glance.GlanceRuntime,
settings.QUANTUM: quantum.QuantumRuntime,
settings.SWIFT: swift.SwiftRuntime,
settings.SWIFT: swift_keystone.SwiftKeystoneRuntime,
settings.HORIZON: horizon.HorizonRuntime,
settings.KEYSTONE: keystone.KeystoneRuntime,
settings.DB: db.DBRuntime,
settings.RABBIT: rabbit.RabbitRuntime,
settings.KEYSTONE_CLIENT: keystone_client.KeyStoneClientRuntime,
settings.NOVA_CLIENT: nova_client.NovaClientRuntime,
settings.OPENSTACK_X: openstack_x.OpenstackXRuntime,
settings.NOVNC: novnc.NoVNCRuntime,
settings.QUANTUM_CLIENT: quantum_client.QuantumClientRuntime,
},
@ -86,13 +86,13 @@ ACTION_CLASSES = {
settings.GLANCE: glance.GlanceRuntime,
settings.QUANTUM: quantum.QuantumRuntime,
settings.SWIFT: swift.SwiftRuntime,
settings.SWIFT: swift_keystone.SwiftKeystoneRuntime,
settings.HORIZON: horizon.HorizonRuntime,
settings.KEYSTONE: keystone.KeystoneRuntime,
settings.DB: db.DBRuntime,
settings.RABBIT: rabbit.RabbitRuntime,
settings.KEYSTONE_CLIENT: keystone_client.KeyStoneClientRuntime,
settings.NOVA_CLIENT: nova_client.NovaClientRuntime,
settings.OPENSTACK_X: openstack_x.OpenstackXRuntime,
settings.NOVNC: novnc.NoVNCRuntime,
settings.QUANTUM_CLIENT: quantum_client.QuantumClientRuntime,
},

View File

@ -27,11 +27,11 @@ from devstack.components import keystone_client
from devstack.components import nova
from devstack.components import nova_client
from devstack.components import novnc
from devstack.components import openstack_x
from devstack.components import quantum
from devstack.components import quantum_client
from devstack.components import rabbit
from devstack.components import swift
from devstack.components import swift_keystone
PROG_NAME = "Describer"
@ -44,10 +44,10 @@ _DESCR_MAP = {
settings.KEYSTONE_CLIENT: keystone_client.describe,
settings.NOVA: nova.describe,
settings.NOVA_CLIENT: nova_client.describe,
settings.OPENSTACK_X: openstack_x.describe,
settings.QUANTUM: quantum.describe,
settings.RABBIT: rabbit.describe,
settings.SWIFT: swift.describe,
settings.SWIFT_KEYSTONE: swift_keystone.describe,
settings.NOVNC: novnc.describe,
settings.QUANTUM_CLIENT: quantum_client.describe,
}

View File

@ -40,21 +40,21 @@ GLANCE = "glance"
QUANTUM = "quantum"
QUANTUM_CLIENT = 'quantum-client'
SWIFT = "swift"
SWIFT_KEYSTONE = "swift_keystone"
HORIZON = "horizon"
KEYSTONE = "keystone"
KEYSTONE_CLIENT = 'keystone-client'
DB = "db"
RABBIT = "rabbit"
OPENSTACK_X = 'openstack-x'
NOVNC = 'novnc'
COMPONENT_NAMES = [
NOVA, NOVA_CLIENT,
GLANCE,
QUANTUM, QUANTUM_CLIENT,
SWIFT,
SWIFT_KEYSTONE,
HORIZON,
KEYSTONE, KEYSTONE_CLIENT,
OPENSTACK_X,
DB,
RABBIT,
NOVNC,
@ -71,8 +71,9 @@ COMPONENT_DEPENDENCIES = {
KEYSTONE: [DB],
NOVA: [KEYSTONE, GLANCE, DB, RABBIT, NOVA_CLIENT],
SWIFT: [],
SWIFT_KEYSTONE: [SWIFT],
NOVA_CLIENT: [],
HORIZON: [KEYSTONE_CLIENT, GLANCE, NOVA_CLIENT, OPENSTACK_X],
HORIZON: [KEYSTONE_CLIENT, GLANCE, NOVA_CLIENT],
#the db isn't always a dependency (depending on the quantum component to be activated)
#for now assume it is (TODO make it better?)
#the client isn't always needed either (TODO make it better?)