Remove some files not worth maintaining
Change-Id: I4d7fc4b212a42c29839e1c6915ec6aab3ee4ed15
This commit is contained in:
parent
e6c7c42f35
commit
865858460c
|
@ -8,14 +8,8 @@ manner.
|
|||
Basic configuration
|
||||
-------------------
|
||||
|
||||
Sahara is packaged with a basic sample configuration file:
|
||||
``sahara.conf.sample-basic``. This file contains all the essential
|
||||
parameters that are required for sahara. We recommend creating your
|
||||
configuration file based on this basic example.
|
||||
|
||||
If a more thorough configuration is needed we recommend using the ``tox``
|
||||
tool to create a full configuration file by executing the following
|
||||
command:
|
||||
A full configuration file showing all possible configuration options and their
|
||||
defaults can be generated with the following command:
|
||||
|
||||
.. sourcecode:: cfg
|
||||
|
||||
|
@ -24,8 +18,8 @@ command:
|
|||
Running this command will create a file named ``sahara.conf.sample``
|
||||
in the ``etc/sahara`` directory of the project.
|
||||
|
||||
After creating a configuration file by either copying the basic example
|
||||
or generating one, edit the ``connection`` parameter in the
|
||||
After creating a configuration file by either generating one or starting with
|
||||
an empty file, edit the ``connection`` parameter in the
|
||||
``[database]`` section. The URL provided here should point to an empty
|
||||
database. For example, the connection string for a MySQL database will be:
|
||||
|
||||
|
|
|
@ -144,13 +144,16 @@ For example, you can get Sahara Mitaka release by executing:
|
|||
$ sahara-venv/bin/pip install 'http://tarballs.openstack.org/sahara/sahara-stable-mitaka.tar.gz'
|
||||
..
|
||||
|
||||
4. After installation you should create a configuration file from the sample
|
||||
file located in ``sahara-venv/share/sahara/sahara.conf.sample-basic``:
|
||||
4. After installation you should create a configuration file; as seen below it
|
||||
is possible to generate a sample one:
|
||||
|
||||
.. sourcecode:: console
|
||||
|
||||
$ mkdir sahara-venv/etc
|
||||
$ cp sahara-venv/share/sahara/sahara.conf.sample-basic sahara-venv/etc/sahara.conf
|
||||
$ SAHARA_SOURCE_DIR="/path/to/sahara/source"
|
||||
$ pushd $SAHARA_SOURCE_DIR
|
||||
$ tox -e genconfig
|
||||
$ popd
|
||||
$ cp $SAHARA_SOURCE_DIR/etc/sahara/sahara.conf.sample sahara-venv/etc/sahara.conf
|
||||
..
|
||||
|
||||
Make any necessary changes to ``sahara-venv/etc/sahara.conf``.
|
||||
|
|
|
@ -1,119 +0,0 @@
|
|||
[DEFAULT]
|
||||
|
||||
# Hostname or IP address that will be used to listen on.
|
||||
# (string value)
|
||||
#host=
|
||||
|
||||
# Port that will be used to listen on. (integer value)
|
||||
#port=8386
|
||||
|
||||
# If set to True, Sahara will use floating IPs to communicate
|
||||
# with instances. If Neutron is used for networking, make
|
||||
# sure that all Node Groups have "floating_ip_pool" parameter
|
||||
# defined. (boolean value)
|
||||
#use_floating_ips=true
|
||||
|
||||
# Use network namespaces for communication
|
||||
#use_namespaces=false
|
||||
|
||||
# Use Designate for internal and external hostnames resolution (boolean value)
|
||||
#use_designate=false
|
||||
|
||||
# IP addresses of Designate nameservers. This is required if 'use_designate' is
|
||||
# True
|
||||
#nameservers =
|
||||
|
||||
# Maximum length of job binary data in kilobytes that may be
|
||||
# stored or retrieved in a single operation (integer value)
|
||||
#job_binary_max_KB=5120
|
||||
|
||||
# Postfix for storing jobs in hdfs. Will be added to
|
||||
# /user/hadoop/ (string value)
|
||||
#job_workflow_postfix=
|
||||
|
||||
# enable periodic tasks (boolean value)
|
||||
#periodic_enable=true
|
||||
|
||||
|
||||
|
||||
# Enables data locality for hadoop cluster.
|
||||
# Also enables data locality for Swift used by hadoop.
|
||||
# If enabled, 'compute_topology' and 'swift_topology'
|
||||
# configuration parameters should point to OpenStack and Swift
|
||||
# topology correspondingly. (boolean value)
|
||||
#enable_data_locality=false
|
||||
|
||||
# File with nova compute topology. It should
|
||||
# contain mapping between nova computes and racks.
|
||||
# File format:
|
||||
# compute1 /rack1
|
||||
# compute2 /rack2
|
||||
# compute3 /rack2
|
||||
# (string value)
|
||||
#compute_topology_file=etc/sahara/compute.topology
|
||||
|
||||
# File with Swift topology. It should contains mapping
|
||||
# between Swift nodes and racks. File format:
|
||||
# node1 /rack1
|
||||
# node2 /rack2
|
||||
# node3 /rack2
|
||||
# (string value)
|
||||
#swift_topology_file=etc/sahara/swift.topology
|
||||
|
||||
|
||||
|
||||
# Log request/response exchange details: environ, headers and
|
||||
# bodies. (boolean value)
|
||||
#log_exchange=false
|
||||
|
||||
# Print debugging output (set logging level to DEBUG instead
|
||||
# of default WARNING level). (boolean value)
|
||||
#debug=false
|
||||
|
||||
# Log output to standard error. (boolean value)
|
||||
#use_stderr=true
|
||||
|
||||
# (Optional) Name of log file to output to. If no default is
|
||||
# set, logging will go to stdout. (string value)
|
||||
#log_file=<None>
|
||||
|
||||
# (Optional) The base directory used for relative --log-file
|
||||
# paths. (string value)
|
||||
#log_dir=<None>
|
||||
|
||||
# Use syslog for logging. Existing syslog format is DEPRECATED
|
||||
# during I, and will change in J to honor RFC5424. (boolean
|
||||
# value)
|
||||
#use_syslog=false
|
||||
|
||||
# Syslog facility to receive log lines. (string value)
|
||||
#syslog_log_facility=LOG_USER
|
||||
|
||||
# List of plugins to be loaded. Sahara preserves the order of
|
||||
# the list when returning it. (list value)
|
||||
#plugins=vanilla,spark,cdh,ambari,storm,mapr
|
||||
|
||||
[database]
|
||||
|
||||
# The SQLAlchemy connection string used to connect to the
|
||||
# database (string value)
|
||||
#connection=<None>
|
||||
|
||||
[keystone_authtoken]
|
||||
# Complete public Identity API endpoint (string value)
|
||||
#auth_uri=http://127.0.0.1:5000/v2.0/
|
||||
|
||||
# Complete admin Identity API endpoint. This should specify
|
||||
# the unversioned root endpoint eg. https://localhost:35357/
|
||||
# (string value)
|
||||
#identity_uri=http://127.0.0.1:35357/
|
||||
|
||||
# Keystone account username (string value)
|
||||
#admin_user=demo
|
||||
|
||||
# Keystone account password (string value)
|
||||
#admin_password=nova
|
||||
|
||||
# Keystone service account tenant name to validate user tokens
|
||||
# (string value)
|
||||
#admin_tenant_name=demo
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
tox -evenv -- python $(dirname $0)/get_auth_token.py $*
|
|
@ -1,88 +0,0 @@
|
|||
# Copyright (c) 2013 Mirantis Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
# implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
from keystoneclient.v2_0 import Client as keystone_client
|
||||
from oslo_config import cfg
|
||||
|
||||
|
||||
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
||||
os.pardir,
|
||||
os.pardir))
|
||||
if os.path.exists(os.path.join(possible_topdir,
|
||||
'sahara',
|
||||
'__init__.py')):
|
||||
sys.path.insert(0, possible_topdir)
|
||||
|
||||
cli_opts = [
|
||||
cfg.StrOpt('username', default='',
|
||||
help='set username'),
|
||||
cfg.StrOpt('password', default='',
|
||||
help='set password'),
|
||||
cfg.StrOpt('tenant', default='',
|
||||
help='set tenant'),
|
||||
]
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('auth_uri', 'keystonemiddleware.auth_token', group='keystone_authtoken')
|
||||
CONF.import_opt('admin_user', 'keystonemiddleware.auth_token', group='keystone_authtoken')
|
||||
CONF.import_opt('admin_password', 'keystonemiddleware.auth_token', group='keystone_authtoken')
|
||||
CONF.import_opt('admin_tenant_name', 'keystonemiddleware.auth_token', group='keystone_authtoken')
|
||||
CONF.register_cli_opts(cli_opts)
|
||||
|
||||
|
||||
def main():
|
||||
dev_conf = os.path.join(possible_topdir,
|
||||
'etc',
|
||||
'sahara',
|
||||
'sahara.conf')
|
||||
config_files = None
|
||||
if os.path.exists(dev_conf):
|
||||
config_files = [dev_conf]
|
||||
|
||||
CONF(sys.argv[1:], project='get_auth_token',
|
||||
default_config_files=config_files)
|
||||
|
||||
auth_uri = CONF.keystone_authtoken.auth_uri
|
||||
user = CONF.username or CONF.keystone_authtoken.admin_user
|
||||
password = CONF.password or CONF.keystone_authtoken.admin_password
|
||||
tenant = CONF.tenant or CONF.keystone_authtoken.admin_tenant_name
|
||||
|
||||
print "User: %s" % user
|
||||
print "Password: %s" % password
|
||||
print "Tenant: %s" % tenant
|
||||
print "Auth URI: %s" % auth_uri
|
||||
|
||||
keystone = keystone_client(
|
||||
username=user,
|
||||
password=password,
|
||||
tenant_name=tenant,
|
||||
auth_url=auth_uri
|
||||
)
|
||||
|
||||
result = keystone.authenticate()
|
||||
|
||||
print "Auth succeed: %s" % result
|
||||
print "Auth token: %s" % keystone.auth_token
|
||||
print "Tenant [%s] id: %s" % (tenant, keystone.tenant_id)
|
||||
print "For bash:"
|
||||
print "export TOKEN=%s" % keystone.auth_token
|
||||
print "export TENANT_ID=%s" % keystone.tenant_id
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Loading…
Reference in New Issue